VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
dReflectedEnt.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
8
9
#ifndef dReflectedEnt_H_
10
#define dReflectedEnt_H_
11
12
#if DtDIS
13
14
#include "
dReflectedObj.h
"
15
#include "
dEntityDec.h
"
16
#include "
esPdu.h
"
17
#include "
globalObjDes.h
"
18
#include "
objIdHashKey.h
"
19
#include "
relLocPdu.h
"
20
#include "
esUpdatePdu.h
"
21
#include "
supEmisEsPdu.h
"
22
#include "
diGuyCustomPdu.h
"
23
24
class
DtEntityStateRepository
;
25
class
DtExerciseConn
;
26
class
DtReflectedEntity
;
27
30
typedef
void (*
DtEntityCallbackFunction
)(
31
DtReflectedEntity
* obj,
void
* userData);
32
36
class
DT_DLL_VL
DtReflectedEntity
:
public
DtReflectedObject
37
{
38
public
:
39
41
typedef
DtEntityStateRepository
* (*DtStateRepCreator)();
42
43
public
:
44
46
DtReflectedEntity
(
DtExerciseConn
* conn,
47
const
DtEntityIdentifier
&
id
,
48
const
DtEntityType
& type);
49
51
virtual
~
DtReflectedEntity
();
52
55
virtual
DtEntityStateRepository
* entityStateRep()
const
;
56
58
virtual
DtEntityStateRepository
* esr()
const
;
59
63
virtual
DtStateRepository
*
stateRep
()
const
;
64
67
virtual
DtEntityStateDecoder
* decoder();
68
70
virtual
const
DtEntityIdentifier
& entityId()
const
;
71
73
virtual
const
DtObjectId
& id()
const
;
74
76
virtual
const
DtObjectId
& localId()
const
;
77
80
virtual
const
DtGlobalObjectDesignator
&
globalId
()
const
;
81
83
virtual
void
processStateMessage
(
const
DtStateMsg
& msg);
84
86
virtual
void
processRelativeLocation(
const
DtRelativeLocationPdu
& pdu);
87
89
virtual
void
processEntityStateUpdate(
const
DtEntityStateUpdatePdu
& pdu);
90
92
virtual
void
processSees(
const
DtSuppEmisEntStatePdu
& pdu);
93
95
virtual
void
processDiGuyPdu(
const
DtDIGuyCustomPdu
& pdu);
96
98
virtual
DtReflectedEntity
*
next
()
const
;
99
virtual
DtReflectedEntity
*
prev
()
const
;
100
102
virtual
DtReflectedEntity
*
wrapNext
()
const
;
103
virtual
DtReflectedEntity
*
wrapPrev
()
const
;
104
106
virtual
void
addPostUpdateCallback(
107
DtEntityCallbackFunction
cb,
void
* userData);
108
virtual
void
removePostUpdateCallback(
109
DtEntityCallbackFunction
cb,
void
* userData);
110
112
virtual
const
DtBaseHashKey
&
hashKey
()
const
;
113
115
virtual
DtString
idString
()
const
;
116
119
virtual
void
processEntityState(
const
DtEntityStatePdu
& pdu);
120
121
public
:
122
124
static
void
setStateRepCreator(DtStateRepCreator creator);
125
static
DtStateRepCreator stateRepCreator(
void
);
126
127
protected
:
128
130
DtReflectedEntity
(
const
DtReflectedEntity
& orig);
131
133
DtReflectedEntity
&
operator=
(
const
DtReflectedEntity
& orig);
134
135
protected
:
136
137
DtEntityIdentifier
myId
;
138
DtEntityStateRepository
*
myEntityStateRep
;
139
DtEntityStateDecoder
*
myEntityDecoder
;
140
DtEntityIdentifierHashKey
myHashKey
;
141
142
protected
:
143
144
static
DtStateRepCreator
theStateRepCreator
;
145
146
};
147
148
inline
const
DtObjectId
&
DtReflectedEntity::localId
()
const
149
{
150
return
id
();
151
}
152
153
#endif
154
#endif
155
Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)