Cpp Coding Standards/ENC/Internal

From Apache OpenOffice Wiki
< Cpp Coding Standards‎ | ENC
Revision as of 17:09, 14 December 2009 by B michaelsen (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

Personal tools