VR-Exchange 2.5 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pReflectedObject.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pEntity.h>
13 #include <portal/pGenericObject.h>
14 #include <portal/pAggregate.h>
15 #include <vlutil/vlString.h>
16 #include <iosfwd>
17 #include <list>
18 
19 namespace MAKVrExchange
20 {
21 
22  class DtPortalConnection;
23 
32  {
33  public:
34 
38 
41  virtual ~DtPortalReflectedObject();
42 
45  virtual std::ostream& printDataToStream( std::ostream& str ) const = 0;
46 
48  virtual const DtPortalObject* baseObject() const = 0;
49 
50  };
51 
57  template<class T_PortalObject>
59  {
60  public:
61 
62  typedef void (*ObjectUpdateCallback)(
64 
65  public:
66 
68  DtPortalReflectedObjectTemplate( const T_PortalObject& obj );
69 
72 
75 
76  // ! Assignment operator.
79 
82  virtual void processUpdate( const T_PortalObject& obj );
83 
85  virtual const T_PortalObject* sr() const;
86 
89  virtual const DtPortalObject* baseObject() const;
90 
92  virtual void addUpdateCallback( ObjectUpdateCallback cb, void* uData ) const;
93 
95  virtual void removeUpdateCallback( ObjectUpdateCallback cb, void* uData ) const;
96 
98  virtual std::ostream& printDataToStream( std::ostream& str ) const;
99 
100  public:
101 
102  typedef T_PortalObject TheTypeOfThisObject;
103 
104  protected:
105 
107  {
109  void* userData;
110  };
111 
112  typedef std::list<CallbackPair> CallbackPairList;
114 
115  T_PortalObject myObject;
116 
117  };
118 
119  std::ostream& operator << ( std::ostream& str, const DtPortalReflectedObject& refObj );
120 
121 }
122 
123 #define _pReflectedObject_INL_
124 #include <portal/pReflectedObject.inl>
125 #undef _pReflectedObject_INL_

Document ID: Generated on Wed Dec 21 15:05:11 EST 2016 from SVN revision 171891
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)