Google


   


You are here: CodeIdol.com > C++ > C++ Coding Standards: 101 Rules, Guidelines, and Best Practices > Make Data Members Private, Except In Behaviorless Aggregates (C Style Structs)

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices



41. SummaryDiscussionExamplesExceptionsReferences...



They're none of your caller's business: Keep data members private. Only in the case of simple C-style struct types that aggregate a bunch of values...

read more: Summary


Information hiding is key to good software engineering (see Item 11). Prefer making all data members private; private data is the best means that a...

read more: Discussion


Example 1: Proper encapsulation. Most classes (e.g., Matrix, File, Date, BankAccount, Security) should have all private data members and expose adequate interfaces. Allowing calling code...

read more: Examples


Get/set functions are useful, but a class consisting mostly of gets/sets is probably poorly designed: Decide whether it wants to provide an abstraction or be...

read more: Exceptions


[Dewhurst03] §80 • [Henricson97] pg. • [Koenig97] §4 • [Lakos96] §• [Meyers97] §20 • [Murray93] §• [Stroustrup00] §10.2.8, §15.3.1.1, §24.4.• [SuttHysl04a]...

read more: References

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

You are here: CodeIdol.com > C++ > C++ Coding Standards: 101 Rules, Guidelines, and Best Practices > Make Data Members Private, Except In Behaviorless Aggregates (C Style Structs)


ADBRITE ads links
   
Related tags







Popular Categories
Unix books and guides

AJAX popular information
C# language guides
Windows books and cookbooks

.......








Business Key Top Sites

be number one
rate your site




    С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.

    Русский Polski Francais Deutsch
    support sitemap terms

© CodeIdol Labs, 2007 - 2009