A
Andy Venikov
Hi all,
is there a way to make certain functions of a
class be accessible only by specific class?
Like "friend class whatever", but only for a few
functions?
This could be usefull in a following relationship:
Client
/ \
/ \
use/ \use
/ \
Managed Object<---->Object Manager
Lets say I have a class Widget.
I also have a manager for that class, called
WidgetManager. Widget is accessed by both a client and
a widget manager. Client shouldn't be able to access functions
used only by a WidgetManager. But I don't want to make
WidgetManager a friend of Widget because I want to hide
implementation details of the Widget from WidgetManager.
Is there a trick to do that?
Thanks,
Andy.
is there a way to make certain functions of a
class be accessible only by specific class?
Like "friend class whatever", but only for a few
functions?
This could be usefull in a following relationship:
Client
/ \
/ \
use/ \use
/ \
Managed Object<---->Object Manager
Lets say I have a class Widget.
I also have a manager for that class, called
WidgetManager. Widget is accessed by both a client and
a widget manager. Client shouldn't be able to access functions
used only by a WidgetManager. But I don't want to make
WidgetManager a friend of Widget because I want to hide
implementation details of the Widget from WidgetManager.
Is there a trick to do that?
Thanks,
Andy.