ObserverFunctor is an observer implemented via Functor object which will call an object's member function. More...
Inheritance diagram for MAKLogger::DtObserverFunctor< ClassType, SubjectType >:
Collaboration diagram for MAKLogger::DtObserverFunctor< ClassType, SubjectType >:Public Types | |
| typedef void(ClassType::* | ObserverMemberFunction )(const SubjectType &) |
Public Member Functions | |
| DtObserverFunctor (ClassType &object, ObserverMemberFunction function) | |
| void | observe (const SubjectType &subject) |
| Abstract observe function called when a connected event fires. | |
Protected Member Functions | |
| DtObserverFunctor (const DtObserverFunctor &) | |
| CopyCTOR not implemented. | |
| DtObserverFunctor & | operator= (const DtObserverFunctor &) |
| Assignment operator not implemented. | |
Protected Attributes | |
| ClassType & | myObject |
| ObserverMemberFunction | myFunction |
ObserverFunctor is an observer implemented via Functor object which will call an object's member function.
The ObserverFunctor should be used with Value semantics (ie a value member of the calling object) however they are not copyable and this is since if the owner object is copied the copy's functor will need to be reassigned.