Difference between revisions of "Cpp Coding Standards/ENC"
From Apache OpenOffice Wiki
m |
|||
Line 17: | Line 17: | ||
---- | ---- | ||
=== Related Rules === | === Related Rules === | ||
− | * [[../META | META:HideInformation]] | + | * [[../META#HideInformation | META:HideInformation]] |
---- | ---- | ||
[[Category:Coding Standards]] | [[Category:Coding Standards]] |
Revision as of 15:56, 27 November 2006
Contents
Encapsulation
Information hiding in classes. These items are all implementations of the meta rule META:HideInformation.
Rules
PrivateData
Make all class member data private.
NoFriends
Don't use “friend” except for the classical cases like stream operators.
KeepInternals
Don't give out handles to class-internal data.
Protect
Make all functions only to be used by derived classes protected.