10 #ifndef DtMessageMemberCall_H_
11 #define DtMessageMemberCall_H_
19 #include <boost/type_traits.hpp>
24 template <
typename T,
bool isPo
inter,
bool isDriver>
27 typedef typename boost::remove_const<typename boost::remove_reference<T>::type>::type
Result;
41 typedef typename boost::remove_pointer<typename boost::remove_const<T>::type>::type
TClass;
43 enum {
IsObject = boost::is_class<typename boost::remove_pointer<T>::type>::value};
50 template <
typename DesiredType>
108 de.DT_LOG_WARN << ex << std::endl;
112 de.DT_LOG_WARN <<
"Caught unknown exception" << std::endl;
125 #define DT_DEFINE_MESSAGE_MEMBER_CALL(argCount)\
126 template < class C, MAKE_LIST(typename T,argCount) >\
127 class DtMessageMemberCall##argCount : public DtMessageMemberCall<C>\
130 typedef void (C::*MemberFuncPtr)( MAKE_LIST(T,argCount) );\
131 DtMessageMemberCall##argCount(MemberFuncPtr m) \
135 virtual void call(DtDe& de, C* c,DtMessage& msg)\
137 MAKE_DECL_MULTILIST(typename CleanupType<T,>::Result a,argCount);\
138 msg >> MAKE_STREAMOUT(a,argCount);\
141 (c->*myFunc)(MAKE_CAST_CALL(Cast<T,>::toFunctionType,de,a,argCount));\
143 catch(DtException& ex)\
145 de.DT_LOG_WARN << ex << std::endl;\
149 de.DT_LOG_WARN << "Caught unknown exception" << std::endl;\
152 MemberFuncPtr myFunc;\
155 template <class C, MAKE_LIST(typename T,argCount) >\
156 DtMessageMemberCall<C>* bindMember(void (C::*m)( MAKE_LIST(T,argCount) ))\
158 return new DtMessageMemberCall##argCount<C, MAKE_LIST(T,argCount) >(m);\
174 #define DtMessageMemberCall_INL_
175 #include "DtMessageMemberCall.inl"
176 #undef DtMessageMemberCall_INL_
virtual void call(DtDe &de, C *c, DtMessage &msg)=0
MemberFuncPtr myFunc
Definition: DtMessageMemberCall.h:115
static DtUniqueID toFunctionType(DtDe &, DtUniqueID input)
Definition: DtMessageMemberCall.h:75
The IGI Message. Is easily encoded and decoding using stream operators. It also provides validation d...
Definition: DtMessage.h:30
Abstract base class for object updaters.
Definition: DtAgentUpdateResolverInterface.h:20
Definition: DtMessageMemberCall.h:25
DtMessageMemberCall0(MemberFuncPtr m)
Definition: DtMessageMemberCall.h:98
DtMessageMemberCall< C > * bindMember(void(C::*m)())
Definition: DtMessageMemberCall.h:119
Contains makVrv::DtDe class.
Definition: DtMessageMemberCall.h:43
StorageType< T, boost::is_pointer< T >::value, IsObject >::Result Result
Definition: DtMessageMemberCall.h:46
DtAgentManager & agentManager()
Get the scene manager.
#define DT_DEFINE_MESSAGE_MEMBER_CALL(argCount)
Definition: DtMessageMemberCall.h:125
DtUniqueID Result
Definition: DtMessageMemberCall.h:33
boost::remove_pointer< typename boost::remove_const< T >::type >::type TClass
Definition: DtMessageMemberCall.h:41
virtual DtAgentUpdateResolverInterface * findUpdater(DtUniqueID id)
Find the update handler for a particular object id.
Contains makVrv:DtAgentManager class.
void(C::* MemberFuncPtr)()
Definition: DtMessageMemberCall.h:96
Definition: DtMessageMemberCall.h:51
Special case for a function with zero arguments.
Definition: DtMessageMemberCall.h:93
virtual void call(DtDe &de, C *c, DtMessage &msg)
Definition: DtMessageMemberCall.h:100
static DesiredType toFunctionType(DtDe &, DesiredType input)
Definition: DtMessageMemberCall.h:53
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv:DtAgent class.
Abstract base class with wraps a member call with it's arguments stored in a message.
Definition: DtMessageMemberCall.h:84
Definition: DtMessageMemberCall.h:37
boost::remove_const< typename boost::remove_reference< T >::type >::type Result
Definition: DtMessageMemberCall.h:27
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
virtual void * objectMemoryAddress() const =0
Abstract getting the object memory address necessary for casting the ObjectType.
static DesiredType toFunctionType(DtDe &de, DtUniqueID input)
Definition: DtMessageMemberCall.h:58
Contains DLL export macros.