Difference between revisions of "Cpp Coding Standards/ENC/Internal"
From Apache OpenOffice Wiki
< Cpp Coding Standards | ENC
m (Cpp Coding Standards/Encapsulation/Internal moved to Cpp Coding Standards/ENC/Internal: consistency) |
B michaelsen (Talk | contribs) |
||
Line 2: | Line 2: | ||
Exception: Sometimes member data of a class are just aggregated to it, but the state of this one member is not part of the class's invariants. In such case a get-/set-access to this data may be okay. | Exception: Sometimes member data of a class are just aggregated to it, but the state of this one member is not part of the class's invariants. In such case a get-/set-access to this data may be okay. | ||
+ | [[Category:Coding Standards]] |
Latest revision as of 17:09, 14 December 2009
Giving out handles to your class internals is just another way to make internals public, and makes keeping class invariants hard to impossible (see ENC:PrivData).
Exception: Sometimes member data of a class are just aggregated to it, but the state of this one member is not part of the class's invariants. In such case a get-/set-access to this data may be okay.