VR-Link API Documentation for HLA 1516
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
hObjPub.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
6
7
#if DtHLA
8
9
#ifndef hObjPub_H_
10
#define hObjPub_H_
11
12
13
#include <
vlutil/vlMachineTypes.h
>
14
#include "
rtiNamespace.h
"
15
#include "
objectId.h
"
16
#include "
globalObjDes.h
"
17
#include "
hlaObjWithSR.h
"
18
#include "
region.h
"
19
23
24
class
DtStateRepository
;
25
class
DtExerciseConn
;
26
class
DtHlaStateDecoder
;
27
class
DtHlaStateEncoder
;
28
34
class
DT_DLL_VL
DtObjectPublisher
35
{
36
public
:
37
40
DtObjectPublisher
(
DtExerciseConn
* conn,
41
DtStateRepository
* stateRep,
42
DtStateRepository
* asSeenByRemote,
43
bool
okToDeleteStateRep =
true
,
44
const
DtDDMRegionSet
* regionSet = 0);
45
49
virtual
~
DtObjectPublisher
();
50
51
private
:
52
54
DtObjectPublisher
(
const
DtObjectPublisher
& orig);
55
57
DtObjectPublisher
& operator= (
const
DtObjectPublisher
& orig);
58
59
public
:
60
67
70
virtual
void
setHlaObject(
71
const
char
* className,
72
DtHlaStateEncoder
* encoder = 0,
73
DtHlaStateDecoder
* decoder = 0,
74
const
char
* objectName = 0,
75
const
DtDDMRegionSet
* regionSet = 0);
76
79
virtual
void
setHlaObject(
80
RTI::ObjectClassHandle hand,
81
DtHlaStateEncoder
* encoder = 0,
82
DtHlaStateDecoder
* decoder = 0,
83
const
char
* objectName = 0,
84
const
DtDDMRegionSet
* regionSet = 0);
85
88
virtual
void
setHlaObject(
89
DtHlaObjectWithStateRep
* obj,
90
DtHlaStateEncoder
* encoder = 0,
91
DtHlaStateDecoder
* decoder = 0);
92
96
virtual
void
detachHlaObject();
97
100
virtual
DtStateRepository
* stateRep();
101
103
virtual
DtStateRepository
* sr();
104
109
virtual
DtStateRepository
* approximateRemoteStateRep();
110
114
virtual
DtHlaStateDecoder
* decoder();
115
118
virtual
DtHlaStateEncoder
* encoder();
119
121
virtual
DtHlaObjectWithStateRep
* hlaObject();
122
124
virtual
DtExerciseConn
* exerciseConn();
125
127
virtual
const
DtObjectId
& id()
const
;
128
130
virtual
const
DtObjectId
& objectId()
const
;
131
133
virtual
const
DtObjectId
& localId()
const
;
134
136
virtual
const
DtString
& name()
const
;
137
140
virtual
const
DtGlobalObjectDesignator
& globalId()
const
;
141
147
virtual
void
forceUpdate();
148
virtual
void
forceUpdate(
const
RTI::AttributeHandleSet&
set
);
149
151
virtual
void
tick();
152
156
virtual
void
setDeleteObjInDtorFlag(
bool
onOff);
157
virtual
bool
deleteObjInDtorFlag()
const
;
158
159
virtual
const
DtDDMRegionSet
& publishingRegions()
const
;
160
163
virtual
void
addRegion(
DtDDMRegionSP
regionToAdd);
164
169
virtual
void
removeRegion(
DtDDMRegionSP
regionToRemove);
170
171
public
:
172
174
static
void
removeObjectCb(
DtHlaObject
* obj,
void
* pub);
175
176
protected
:
177
178
181
virtual
void
processRemoveObject(
DtHlaObject
* obj);
182
183
protected
:
184
185
DtExerciseConn
*
myExConn
;
186
DtHlaObjectWithStateRep
*
myHlaObj
;
187
DtStateRepository
*
myStateRep
;
188
DtStateRepository
*
myAsSeenByRemote
;
189
DtHlaStateEncoder
*
myEncoder
;
190
DtHlaStateDecoder
*
myDecoder
;
191
DtObjectId
myObjectId
;
192
bool
myOkToDeleteStateRepFlag
;
193
DtString
myName
;
194
bool
myDeleteObjInDtorFlag
;
195
DtDDMRegionSet
myPublishingRegions
;
196
197
public
:
198
203
DtObjectPublisher
(
DtExerciseConn
* conn,
const
char
* name = 0);
204
void
init(RTI::ObjectClassHandle hand,
DtStateRepository
* stateRep,
205
DtStateRepository
* asSeenByRemote,
DtHlaStateEncoder
* encoder = 0,
206
DtHlaStateDecoder
* decoder = 0);
207
void
init(
const
char
* className,
DtStateRepository
* stateRep,
208
DtStateRepository
* asSeenByRemote,
DtHlaStateEncoder
* encoder = 0,
209
DtHlaStateDecoder
* decoder = 0);
210
};
211
212
inline
DtStateRepository
*
DtObjectPublisher::stateRep
()
213
{
214
return
myStateRep
;
215
}
216
217
inline
DtStateRepository
*
DtObjectPublisher::sr
()
218
{
219
return
myStateRep
;
220
}
221
222
inline
DtExerciseConn
*
DtObjectPublisher::exerciseConn
()
223
{
224
return
myExConn
;
225
}
226
227
inline
DtHlaObjectWithStateRep
*
DtObjectPublisher::hlaObject
()
228
{
229
return
myHlaObj
;
230
}
231
232
inline
const
DtObjectId
&
DtObjectPublisher::localId
()
const
233
{
234
return
id
();
235
}
236
237
inline
DtStateRepository
*
DtObjectPublisher::approximateRemoteStateRep
()
238
{
239
return
myAsSeenByRemote
;
240
}
241
242
#endif //DtObjectPublisher_H_
243
#endif //DtHLA
244
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
)