Hi all,
I have a question on interface design: I have a set of objects that are
interlinked in the real world: object of class A needs for example for the
operator() an object of class B. On what arguments do you decide whether to
pass a reference to the object of class B to the member function like this
operator()(clas sB& objB) or to have in class A a data member (a const
pointer to a class B object or so) and have this set during construction or
with a Set-function? Class B is designed to deliver the necessary data
through Get-functions. Or do friends come in handy here?
Thanks for tips,
gert
I have a question on interface design: I have a set of objects that are
interlinked in the real world: object of class A needs for example for the
operator() an object of class B. On what arguments do you decide whether to
pass a reference to the object of class B to the member function like this
operator()(clas sB& objB) or to have in class A a data member (a const
pointer to a class B object or so) and have this set during construction or
with a Set-function? Class B is designed to deliver the necessary data
through Get-functions. Or do friends come in handy here?
Thanks for tips,
gert
Comment