VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAgentDefinition.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtAgentDefinition.h,v $ $Revision: 1.15 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtSceneObjectDefinition_H_
14 #define DtSceneObjectDefinition_H_
15 
16 #include <vrvCore/vrvCore.h>
18 
19 #include <map>
20 #include <string>
21 
22 namespace makVrv
23 {
24 
25  class DtDe;
26 
34  template <typename ObjectClass>
36  {
37  public:
38 
39  typedef std::map<unsigned int,DtMessageMemberCall<ObjectClass>*> CallMap;
40 
42  DtAgentDefinition(const std::string& className)
43  {
45  }
46 
48  {
50  }
51 
53  virtual bool doCall(DtDe& de,unsigned int function,ObjectClass* o, DtMessage& message);
54 
56  virtual void handle(DtDe& de, ObjectClass* o,DtMessage& msg);
57 
59  virtual void bindFunction(unsigned int function,DtMessageMemberCall<ObjectClass>* member);
60 
61  virtual const std::string& className() const
62  {
63  return myClassName;
64  }
65 
66  virtual bool containsClassName(const std::string& className)
67  {
68  return myClassName == className;
69  }
70 
71  protected:
72  std::string myClassName;
74  };
75 
85  template <typename BaseClassDefinition, typename ObjectClass>
87  : public DtAgentDefinition<ObjectClass>
88  , public BaseClassDefinition
89  {
90  public:
91 
93  : DtAgentDefinition<ObjectClass>(className)
94  , BaseClassDefinition(className)
95  {
97  }
98 
100  {
102  }
103 
104  typedef std::map<unsigned int,DtMessageMemberCall<ObjectClass>*> CallMap;
105 
108  virtual bool doCall(DtDe& de,unsigned int function,ObjectClass* o, DtMessage& message);
109 
113  virtual void handle(DtDe& de,ObjectClass* o,DtMessage& msg);
114 
116  virtual void bindFunction(unsigned int function,DtMessageMemberCall<ObjectClass>* member);
117 
119  virtual const std::string& className() const
120  {
121  return myClassName;
122  }
123 
124  virtual bool containsClassName(const std::string& className)
125  {
126  return myClassName == className ||
129  }
130 
131  protected:
132  std::string myClassName;
134  };
135 }
136 
137 #define DtAgentDefinition_INL_
138 #include "DtAgentDefinition.inl"
139 #undef DtAgentDefinition_INL_
140 
141 #endif
142 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)