VR-Exchange 2.1 API Documentation
pReflectedObject.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 1992-2010 VT MAK
3  ** All rights reserved.
4  *********************************************************************/
5 
6 #ifndef pReflectedObject_H_
7 #define pReflectedObject_H_
8 
13 
14 
15 #include <portal/pEntity.h>
16 #include <portal/pGenericObject.h>
17 #include <portal/pAggregate.h>
18 #include <vlutil/vlString.h>
19 #include <iosfwd>
20 #include <list>
21 
22 namespace MAKVrExchange {
23 
24 class DtPortalConnection;
25 
26 
29 //
36 {
37 public:
38 
42 
46 
49  virtual std::ostream &printDataToStream(std::ostream &str) const = 0;
50 
52  virtual const DtPortalObject *baseObject() const = 0;
53 
54 };
55 
58 //
62 template<class T_PortalObject>
64 {
65 public:
66 
67  typedef void (*ObjectUpdateCallback)
69 
70 public:
71 
73  DtPortalReflectedObjectTemplate(const T_PortalObject &obj);
75 
78 
81 
84  virtual void processUpdate(const T_PortalObject& obj);
85 
87  virtual const T_PortalObject *sr() const;
88 
91  virtual const DtPortalObject *baseObject() const;
92 
94  virtual void addUpdateCallback(ObjectUpdateCallback cb, void* uData) const;
95 
97  virtual void removeUpdateCallback(ObjectUpdateCallback cb, void* uData) const;
98 
101  virtual std::ostream &printDataToStream(std::ostream &str) const;
102 
103 public:
104 
105  typedef T_PortalObject TheTypeOfThisObject;
106 
107 protected:
108 
110  {
112  void *userData;
113  };
114 
115  typedef std::list<CallbackPair> CallbackPairList;
117 
118  T_PortalObject myObject;
119 };
120 
121 std::ostream & operator << (std::ostream &str, const DtPortalReflectedObject &refObj);
122 
123 }
124 
125 #define pReflectedObject_INL_
126 #include <portal/pReflectedObject.inl>
127 #undef pReflectedObject_INL_
128 
129 #endif //end #ifndef pReflectedObject_H_

Document ID: Generated on Tue Aug 7 22:07:13 EDT 2012 from SVN revision 117874
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)