VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrfExtendedProperties
influenceInteractionExtension.h
Go to the documentation of this file.
1
/****************************************************************************
2
* Copyright (c) 2018 VT MAK
3
* All rights reserved.
4
****************************************************************************/
5
8
9
#pragma once
10
11
#if DtHLA
12
13
#include <vl/interactionWithEncDec.h>
14
#include <
vrfExtObjects/influenceInterDecoderHLA.h
>
15
#include <
vrfExtObjects/influenceInterEncoderHLA.h
>
16
#include <
vrfExtObjects/influenceInteractionHLA.h
>
17
#include <
vrfExtendedProperties/vrfExtendedPropertiesDefines.h
>
18
19
class
DtExerciseConn;
20
class
DtInfluenceInteractionExtension
;
21
23
typedef
void(*
DtInfluenceInterExtensionCb
) (
DtInfluenceInteractionExtension
* inter,
void
* usr);
24
29
class
DT_DLL_vrfExtendedProperties
DtInfluenceInteractionExtension
:
public
DtInfluenceInteraction
30
{
31
32
protected
:
33
37
DtInfluenceInteractionExtension
();
38
39
public
:
40
46
DtInfluenceInteractionExtension
(
const
DtString
& influenceName);
47
49
virtual
~
DtInfluenceInteractionExtension
();
50
52
DtInfluenceInteractionExtension
(
const
DtInfluenceInteractionExtension
& orig);
53
55
DtInfluenceInteractionExtension
&
operator=
(
const
DtInfluenceInteractionExtension
& orig);
56
58
virtual
void
printData
()
const
;
59
61
virtual
void
printDataToStream
(std::ostream&
stream
)
const
;
62
64
virtual
void
setWeaponType(
const
DtString
& val);
65
67
virtual
const
DtString
& weaponType()
const
;
68
70
virtual
void
setGuidanceSystem(
const
DtString
& val);
71
73
virtual
const
DtString
& guidanceSystem()
const
;
74
76
virtual
void
setTargetPart(
const
DtString
& val);
77
79
virtual
const
DtString
& targetPart()
const
;
80
82
virtual
void
setIsPointAttack(
bool
val);
83
85
virtual
bool
isPointAttack()
const
;
86
88
virtual
const
char
*
name
()
const
{
return
"DtInfluenceInteraction"
; }
89
90
public
:
91
94
static
DtInteraction
*
create
();
95
98
static
void
addCallback
(DtExerciseConn* conn,
99
DtInfluenceInterExtensionCb
cb,
void
* usr,
100
DtDDMRegionSP region = DtDDMRegionSP());
101
static
void
removeCallback
(DtExerciseConn* conn,
102
DtInfluenceInterExtensionCb
cb,
void
* usr,
103
DtDDMRegionSP region = DtDDMRegionSP());
104
105
static
const
DtString
theEngagementInfluenceName
;
106
107
protected
:
108
109
DtString
myWeaponType
;
110
DtString
myGuidanceSystem
;
111
DtString
myTargetPart
;
112
bool
myIsPointAttack
;
113
114
};
115
118
#define DtDECLARE_INFLUENCE_W_G_PARAM_ENCODER(paramName) \
119
DtDECLARE_PARAM_ENCODER(DtInfluenceInteractionExtension, paramName)
120
121
#define DtDEFINE_SIMPLE_INFLUENCE_W_G_PARAM_ENCODER( \
122
paramName, netType, inspector) \
123
DtDEFINE_SIMPLE_PARAM_ENCODER( \
124
DtInfluenceInterExtensionEncoder, DtInfluenceInteractionExtension, \
125
paramName, netType, inspector)
126
127
#define DtDEFINE_SIMPLE_INFLUENCE_W_G_STRING_PARAM_ENCODER( \
128
paramName, inspector) \
129
void DtInfluenceInterExtensionEncoder::encode##paramName(const DtInfluenceInteractionExtension& inter, \
130
RTI::ParameterHandleValuePairSet* params, \
131
RTI::ParameterHandle paramHandle) \
132
{ \
133
DtString netVal = inter.inspector(); \
134
params->add(paramHandle, (char*) netVal.c_str(), netVal.length()+1); \
135
}
136
140
class
DT_DLL_vrfExtendedProperties
DtInfluenceInterExtensionEncoder
:
public
DtInfluenceInterEncoder
141
{
142
public
:
144
DtInfluenceInterExtensionEncoder
(DtExerciseConn* exConn,
145
DtInterClassDesc* classDesc);
146
148
virtual
~
DtInfluenceInterExtensionEncoder
();
149
151
DtInfluenceInterExtensionEncoder
(
const
DtInfluenceInterExtensionEncoder
& orig);
152
154
DtInfluenceInterExtensionEncoder
&
operator=
(
const
DtInfluenceInterExtensionEncoder
& orig);
155
156
protected
:
157
159
DtDECLARE_INFLUENCE_W_G_PARAM_ENCODER
(WeaponType);
160
162
DtDECLARE_INFLUENCE_W_G_PARAM_ENCODER
(GuidanceSystem);
163
165
DtDECLARE_INFLUENCE_W_G_PARAM_ENCODER
(TargetPart);
166
168
DtDECLARE_INFLUENCE_W_G_PARAM_ENCODER
(IsPointAttack);
169
170
};
171
172
#define DtDECLARE_INFLUENCE_W_G_PARAM_DECODER(paramName) \
173
DtDECLARE_PARAM_DECODER(DtInfluenceInteractionExtension, paramName)
174
175
#define DtDEFINE_SIMPLE_INFLUENCE_W_G_PARAM_DECODER( \
176
paramName, netType, mutator) \
177
DtDEFINE_SIMPLE_PARAM_DECODER( \
178
DtInfluenceInterExtensionDecoder, DtInfluenceInteractionExtension, \
179
paramName, netType, mutator)
180
181
#define DtDEFINE_SIMPLE_INFLUENCE_W_G_STRING_PARAM_DECODER( \
182
paramName, mutator) \
183
void DtInfluenceInterExtensionDecoder::decode##paramName(DtInfluenceInteractionExtension* inter, \
184
const RTI::ParameterHandleValuePairSet& params, \
185
int index) \
186
{ \
187
RTI::ULong length = 0; \
188
char* buf = (char*) params.getValuePointer(index, length); \
189
DtString val(buf, length); \
190
inter->mutator(val); \
191
}
192
195
class
DT_DLL_vrfExtendedProperties
DtInfluenceInterExtensionDecoder
:
public
DtInfluenceInterDecoder
196
{
197
public
:
199
DtInfluenceInterExtensionDecoder
(DtExerciseConn* exConn,
200
DtInterClassDesc* classDesc);
201
203
virtual
~
DtInfluenceInterExtensionDecoder
();
204
206
DtInfluenceInterExtensionDecoder
(
const
DtInfluenceInterExtensionDecoder
& orig);
207
209
DtInfluenceInterExtensionDecoder
&
operator=
(
const
DtInfluenceInterExtensionDecoder
& orig);
210
211
protected
:
212
214
DtDECLARE_INFLUENCE_W_G_PARAM_DECODER
(WeaponType);
215
217
DtDECLARE_INFLUENCE_W_G_PARAM_DECODER
(GuidanceSystem);
218
220
DtDECLARE_INFLUENCE_W_G_PARAM_DECODER
(TargetPart);
221
223
DtDECLARE_INFLUENCE_W_G_PARAM_DECODER
(IsPointAttack);
224
225
};
226
227
DT_DLL_vrfExtendedProperties
void
registerInfluenceInteractionExtension
(DtExerciseConn* exConn);
228
229
#endif
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)