VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>
18 
19 class DtExerciseConn;
21 
24 
30 {
31 
32 protected:
33 
38 
39 public:
40 
46  DtInfluenceInteractionExtension(const DtString& influenceName);
47 
50 
53 
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 
106 
107 protected:
108 
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 
141 {
142 public:
144  DtInfluenceInterExtensionEncoder(DtExerciseConn* exConn,
145  DtInterClassDesc* classDesc);
146 
149 
152 
155 
156 protected:
157 
160 
163 
166 
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 
196 {
197 public:
199  DtInfluenceInterExtensionDecoder(DtExerciseConn* exConn,
200  DtInterClassDesc* classDesc);
201 
204 
207 
210 
211 protected:
212 
215 
218 
221 
224 
225 };
226 
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)