VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSubjectBinder.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtSubjectBinder_H_
11 #define DtSubjectBinder_H_
12 
13 #include <vrvCore/vrvCore.h>
14 #include <boost/function.hpp>
15 #include <list>
16 
17 namespace makVrv
18 {
19  class DtDe;
20 
30  {
31 
32  public:
33 
36 
37  void bind(DtDe& de);
38 
39  protected:
40 
41  typedef boost::function<void (DtDe&)> BindFunction;
42  typedef std::list<BindFunction> BindFunctionList;
43 
45  };
46 
47 }
48 
49 #endif
50 
boost::function< void(DtDe &)> BindFunction
Definition: DtSubjectBinder.h:41
BindFunctionList myBindFunctionList
Definition: DtSubjectBinder.h:44
std::list< BindFunction > BindFunctionList
Definition: DtSubjectBinder.h:42
Base class for DtSubjectObservers that allow &quot;delayed virtual construction via functors&quot;. 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&#39;s ctor is protected and can only be created via a creator method that calls bind().
Definition: DtSubjectBinder.h:29
binderNoArgs< _Fn > bind(const _Fn &_Func, const _Ty &_Left)
Definition: DtSTLUtilities.h:76
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
Contains DLL export macros.

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)