VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Attributes
makVrv::DtSubjectBinder Class Reference

Base class for DtSubjectObservers that allow "delayed virtual construction via functors". Basically, this class is has a list of functors that get executed after the creation of the DtSubjectObserver. In this way, it acts as if you could have virtual functions in your ctor. This was neccessary in order to have the DtSubjectObservers automatically connect to activated subjects. To do that, we needed to call a the virtual method slot_activate() after the contruction of the observer. The observer adds the functor to this list and the logic calls bind() after creation. The logic's ctor is protected and can only be created via a creator method that calls bind().

Inheritance diagram for makVrv::DtSubjectBinder:
Inheritance graph
[legend]

Public Member Functions

void bind (DtDe &de)
 

Protected Types

typedef boost::function< void(DtDe &)> BindFunction
 
typedef std::list< BindFunctionBindFunctionList
 

Protected Attributes

BindFunctionList myBindFunctionList
 

Member Typedef Documentation

typedef boost::function<void (DtDe&)> makVrv::DtSubjectBinder::BindFunction
protected

Member Function Documentation

void makVrv::DtSubjectBinder::bind ( DtDe de)

Note: do not give this class a CTOR. Using the auto generated CTOR makes it so that we don't have to call it in the ctor initialization list.

Referenced by TestObserverLogic::create().

Member Data Documentation

BindFunctionList makVrv::DtSubjectBinder::myBindFunctionList
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)