Google


   


You are here: CodeIdol.com > C++ > C++ Coding Standards: 101 Rules, Guidelines, and Best Practices > Dont Give Away Your Internals

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



42. SummaryDiscussionExceptionsReferences...



Don't volunteer too much: Avoid returning handles to internal data managed by your class, so clients won't uncontrollably modify state that your object thinks it...

read more: Summary


Consider: class Socket { public: // … constructor that opens handle_, destructor that closes handle_, etc. … int GetHandle() const {return handle_;}...

read more: Discussion


Sometimes classes must provide access to internal handles for compatibility reasons, such as interfacing with legacy code or other systems. For example, std::basic_string offers access...

read more: Exceptions


[C++03] §23 • [Dewhurst03] §80 • [Meyers97] #29 • [Saks99] • [Stroustrup00] §• [Sutter02] §9...

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 > Dont Give Away Your Internals


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