K
Krice
There is a component class inside the host class:
class Host
{
Component *c;
....
In some cases Component needs to call the host and
I guess the only way is that you pass the host for it:
Component::Component(Host *h)
{
h->Do_Something();
....
Somehow I think this is bad design, but how to avoid it?
class Host
{
Component *c;
....
In some cases Component needs to call the host and
I guess the only way is that you pass the host for it:
Component::Component(Host *h)
{
h->Do_Something();
....
Somehow I think this is bad design, but how to avoid it?