[Uml-devel] c++ get... set methods.
seb_stein at gmx.de
Mon Sep 6 08:57:03 UTC 2004
gregee123 at o2.pl <gregee123 at o2.pl> [040906 17:54]:
> I noticed that when generating source code, umbrello automatically
> generates get and set methods for each property. That is helpful
> most of the time, but what if I want to make a property private-only
> (means no get or set methods) or read-only (means only get method).
> How could I accomplish this. Do I need to remove these methods by
> hand, everytime I generate the source ??
Each accessor method of a private member is also private. That is considered
to be a bug. For you it is a feature, because it is impossible to access the
member or accessor method from outside, because it is private. If you don't
call the methods your compiler will throw them out anyway, so don't worry
Umbrello UML Modeller
Description : UML diagram drawing tool for KDE with code generation
Homepage : http://www.umbrello.org/
Bug Reports : http://bugs.kde.org/
CVS : kdesdk/umbrello on cvs.kde.org:/home/kde
More information about the umbrello-devel