F
Furqan
Hi,
Consider the following class hierarchy:
A
B C D
a has a fcuntion func() which needs to be called only once during
application lifetime.
B b;
b.func();
.......
later
C c;
c.func(); //should nt get called or executed.
How can this be done?
One way is to use a mutex and initialize the first time func is called.
Is there any other way?Some design pattern?
Regards,
Furqan
Consider the following class hierarchy:
A
B C D
a has a fcuntion func() which needs to be called only once during
application lifetime.
B b;
b.func();
.......
later
C c;
c.func(); //should nt get called or executed.
How can this be done?
One way is to use a mutex and initialize the first time func is called.
Is there any other way?Some design pattern?
Regards,
Furqan