TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  STY#006

This rule is Obsolete
Synopsis:In a class definition use separate public, protected, and private sections for type definitions, constants, enumerations, nested classes, friends, methods and data members
Language:C++
Severity Level:9
Category:Style


Description:

The reason to use separate sections for type definitions, constants, enumerations, nested classes, friends, methods and data members is to improve readability. Most categories can exist for each access level, that is public, protected and private. Friends and data members are always private. When a category is empty, do not include it. Of each category an example is given:

public:    // TYPE DEFINITIONS

public:    // CONSTANTS

public:    // METHODS

private:   // ENUMERATIONS

private:   // NESTED CLASSES

private:   // FRIENDS

private:   // DATA