Cpp Coding Standards/ENC

From Apache OpenOffice Wiki
< Cpp Coding Standards
Revision as of 14:13, 27 November 2006 by Np (Talk | contribs)

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

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.


Related Rules


Personal tools