VR-Exchange 2.6 API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
portal
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
31
class
DT_DLL_LIBPORTAL
DtPortalReflectedObject
32
{
33
public
:
34
37
DtPortalReflectedObject
();
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>
58
class
DtPortalReflectedObjectTemplate
:
public
DtPortalReflectedObject
59
{
60
public
:
61
62
typedef
void (*
ObjectUpdateCallback
)(
63
const
DtPortalReflectedObjectTemplate<T_PortalObject>
& obj,
void
* usr );
64
65
public
:
66
68
DtPortalReflectedObjectTemplate
(
const
T_PortalObject& obj );
69
71
DtPortalReflectedObjectTemplate
(
const
DtPortalReflectedObjectTemplate<T_PortalObject>
& other );
72
74
virtual
~DtPortalReflectedObjectTemplate
();
75
76
// ! Assignment operator.
77
const
DtPortalReflectedObjectTemplate<T_PortalObject>
&
78
operator =
(
const
DtPortalReflectedObjectTemplate<T_PortalObject>
& other );
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
106
struct
CallbackPair
107
{
108
ObjectUpdateCallback
fcn
;
109
void
*
userData
;
110
};
111
112
typedef
std::list<CallbackPair>
CallbackPairList
;
113
mutable
CallbackPairList
myCallbackList
;
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 Jan 30 18:15:18 EST 2019 from SVN revision 195534
Copyright © 2005-2019 VT MÄK. All Rights Reserved (
www.mak.com
)