B
Bit Byte
Must be the time of the day, but I seem to get my head in a spin over
this ...
I have a base class B, from which I have a derived class.
In class B, i have a (public access) typedef of a template class functor
(lets call it F for convenience)
I want to declare a variable of type F in class D.
the desired behaviour (i.e. what I'm after is this) :
class D calls a method in its base class, passing it a variable of type
F - and under a particular scenario - for a particular event, I want the
base class (B) to notify/callback the derived class D (so that
additional processing can be carried out when that event occurs.
For some reason, I can't quite implement it. A simple example will be
appreciated.
this ...
I have a base class B, from which I have a derived class.
In class B, i have a (public access) typedef of a template class functor
(lets call it F for convenience)
I want to declare a variable of type F in class D.
the desired behaviour (i.e. what I'm after is this) :
class D calls a method in its base class, passing it a variable of type
F - and under a particular scenario - for a particular event, I want the
base class (B) to notify/callback the derived class D (so that
additional processing can be carried out when that event occurs.
For some reason, I can't quite implement it. A simple example will be
appreciated.