koffice
Thomas Zander
zander at kde.org
Tue Sep 29 13:28:32 CEST 2009
On Tuesday 29. September 2009 13.15.54 Dmitry Kazakov wrote:
> Argh! =(
> You are beaking encapsulation! Isn't this a basic principle of
> object-oriented programming?
> There is an object (doc), and there is it's interface (undoLastCommand).
> And no calls to private members! (undo stack is private, right?) Why do you
> use private members?
The code is;
m_doc->undoStack()->undo();
undoStack is a public method, not a private member. There is no breaking of
encapsulation in this code.
--
Thomas Zander
Qt Developer Days 2009 | Save your seat - REGISTER NOW!
Munich, Germany: October 12th - 14th LAST CHANCE TO REGISTER!
San Francisco, California: November 2nd - 4th EARLY BIRD PRICING - SAVE $200!
For more info: http://qt.nokia.com/qtdevdays2009
More information about the kimageshop
mailing list