Difference between revisions of "Cpp Coding Standards/ENC"
From Apache OpenOffice Wiki
(improve formatting for printing) |
m |
||
Line 1: | Line 1: | ||
− | + | == Encapsulation (ENC) == | |
''Information hiding in classes. These items are all implementations of the meta rule [[../PRINC#Hide | PRINC:Hide]] - Hide Information.'' | ''Information hiding in classes. These items are all implementations of the meta rule [[../PRINC#Hide | PRINC:Hide]] - Hide Information.'' | ||
Line 13: | Line 13: | ||
===== Protect <span id="Protect">(Protect)</span> ===== | ===== Protect <span id="Protect">(Protect)</span> ===== | ||
Make all functions only to be used by derived classes protected. [[/Protect|-> Details]] | Make all functions only to be used by derived classes protected. [[/Protect|-> Details]] | ||
− | |||
− | |||
− | |||
− | |||
---- | ---- | ||
[[Category:Coding Standards]] | [[Category:Coding Standards]] |
Latest revision as of 09:04, 23 May 2007
Contents
Encapsulation (ENC)
Information hiding in classes. These items are all implementations of the meta rule PRINC:Hide - Hide Information.
Private Data (PrivData)
Make all class member data private. -> Details
No Friends (NoFriends)
Don't use “friend” except for the classical cases like stream operators. -> Details
Keep Internals (Internal)
Don't give out handles to class-internal data. -> Details
Protect (Protect)
Make all functions only to be used by derived classes protected. -> Details