VR-Exchange 2.1 API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
portal
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
//
35
class
DT_DLL_LIBPORTAL
DtPortalReflectedObject
36
{
37
public
:
38
41
DtPortalReflectedObject
() {}
42
45
virtual
~DtPortalReflectedObject
() {}
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>
63
class
DtPortalReflectedObjectTemplate
:
public
DtPortalReflectedObject
64
{
65
public
:
66
67
typedef
void (*
ObjectUpdateCallback
)
68
(
const
DtPortalReflectedObjectTemplate<T_PortalObject>
&obj,
void
*usr);
69
70
public
:
71
73
DtPortalReflectedObjectTemplate
(
const
T_PortalObject &obj);
74
virtual
~DtPortalReflectedObjectTemplate
();
75
76
DtPortalReflectedObjectTemplate
(
77
const
DtPortalReflectedObjectTemplate<T_PortalObject>
&other);
78
79
const
DtPortalReflectedObjectTemplate<T_PortalObject>
&
80
operator=
(
const
DtPortalReflectedObjectTemplate<T_PortalObject>
&other);
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
109
struct
CallbackPair
110
{
111
ObjectUpdateCallback
fcn
;
112
void
*
userData
;
113
};
114
115
typedef
std::list<CallbackPair>
CallbackPairList
;
116
mutable
CallbackPairList
myCallbackList
;
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
)