J
jp
Hi.
I have another design problem. I hope someone can help me. Thanks in
advance.
I want to write a "library" consisting in a bunch of objects like
Info, Utils, etc..
I made a member with each of these inside de main class (the
"library") and made the constructors private for Info, Utils, etc. and
made them friend classes of the main class.
Is this the right approach or should I use heritance from a base
class? I also need to access some of the methods in Utils from Info,
for instance, Format date function, trims, etc. etc. meaning that
utils will be accessible from outside the library and from within.
LIBRARY
|_ INFO
|_ UTILS
|_ etc.
I have another design problem. I hope someone can help me. Thanks in
advance.
I want to write a "library" consisting in a bunch of objects like
Info, Utils, etc..
I made a member with each of these inside de main class (the
"library") and made the constructors private for Info, Utils, etc. and
made them friend classes of the main class.
Is this the right approach or should I use heritance from a base
class? I also need to access some of the methods in Utils from Info,
for instance, Format date function, trims, etc. etc. meaning that
utils will be accessible from outside the library and from within.
LIBRARY
|_ INFO
|_ UTILS
|_ etc.