VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
launchedMunitionsResponseAdmin.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #include <vrfutil/rwUUID.h>
10 #include <matrix/vlVector.h>
11 
12 
16 {
18 
21  double flightTime;
24 };
25 
29 {
30 public:
33 
36 
40 
43 
45  static DtAdminContent* create();
46 
48  virtual bool init();
49 
51  virtual const DtAdminContentMessageType& type() const;
52 
55  virtual DtAdminContent * clone() const;
56 
58  virtual DtString stringRep() const;
59 
61  virtual int netRepSize() const;
62 
64  virtual bool setFromNet(const char* contentBuffer,
65  unsigned contentSize);
66 
68  virtual bool setToNet();
69 
71  virtual void setLaunchTime(double);
72  double launchTime() const
73  {
74  return myLaunchTime;
75  }
76 
77 protected:
78  double myLaunchTime;
79 };
80 
84 {
85 public:
88 
91 
95 
98 
100  static DtAdminContent* create();
101 
103  virtual bool init();
104 
106  virtual const DtAdminContentMessageType& type() const;
107 
110  virtual DtAdminContent * clone() const;
111 
113  virtual DtString stringRep() const;
114 
116  virtual int netRepSize() const;
117 
119  virtual bool setFromNet(const char* contentBuffer,
120  unsigned contentSize);
121 
123  virtual bool setToNet();
124 
126  virtual void setNextLaunchMunition(const DtMunitionInFlight&);
128  {
129  return myNextLaunchMunition;
130  }
131 
132 protected:
134 };
135 
139 {
140 public:
143 
146 
150 
153 
155  static DtAdminContent* create();
156 
158  virtual bool init();
159 
161  virtual const DtAdminContentMessageType& type() const;
162 
165  virtual DtAdminContent * clone() const;
166 
168  virtual DtString stringRep() const;
169 
171  virtual int netRepSize() const;
172 
174  virtual bool setFromNet(const char* contentBuffer,
175  unsigned contentSize);
176 
178  virtual bool setToNet();
179 
181  virtual void addLaunchedMunition(const DtMunitionInFlight&);
182  const std::vector<DtMunitionInFlight>& launchedMunitions() const
183  {
184  return myLaunchedMunitions;
185  }
186 
187 protected:
188  std::vector<DtMunitionInFlight> myLaunchedMunitions;
189 };
190 
191 #ifdef WIN32
192 namespace DtBufferSerialize
193 {
194 #endif
198 
203  DT_DLL_vrftasks char *encode(const DtMunitionInFlight& val, char *buffer);
204 
208  DT_DLL_vrftasks const char *decode(DtMunitionInFlight& val, const char *buffer);
209 #ifdef WIN32
210 }
211 #endif
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
DtLaunchedMunitionsResponseAdmin The list of all munitions launched.
Definition: launchedMunitionsResponseAdmin.h:138
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets the contents of this set request based on the network buffer. Base class does nothing and return...
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
virtual int netRepSize() const
std::vector< DtMunitionInFlight > myLaunchedMunitions
Definition: launchedMunitionsResponseAdmin.h:188
virtual DtAdminContent * clone() const =0
Make a copy of this content. Returns a pointer to a newly created copy of this class. Derived classes must override this function to create and return an instance of the derived type.
const DtMunitionInFlight & nextLaunchMunition() const
Definition: launchedMunitionsResponseAdmin.h:127
Definition: vrfObjectMessageTypeTemplate.h:24
Contains the DtUUID class declaration.
double flightTime
Definition: launchedMunitionsResponseAdmin.h:21
double launchedAtTime
Definition: launchedMunitionsResponseAdmin.h:22
DtVector targetPoint
Definition: launchedMunitionsResponseAdmin.h:23
double launchTime() const
Definition: launchedMunitionsResponseAdmin.h:72
const DtAdminContent & operator=(const DtAdminContent &orig)
assignment operator; same as copy costructor.
DtMunitionInFlight myNextLaunchMunition
Definition: launchedMunitionsResponseAdmin.h:133
DtNextLaunchedMunitionResponseAdmin The next munition that is to land as shot by the indirect fire...
Definition: launchedMunitionsResponseAdmin.h:83
double myLaunchTime
Definition: launchedMunitionsResponseAdmin.h:78
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer. buffer must have at least the number of bytes returned...
DtNextLaunchTimeMunitionsResponseAdmin The next time a munition is to be launched.
Definition: launchedMunitionsResponseAdmin.h:28
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
virtual bool init()
Base class init does nothing, but this will be called by create, in case any other deriving class nee...
DtAdminContent.
Definition: adminContent.h:23
virtual const DtAdminContentMessageType & type() const =0
DtString eventId
Definition: launchedMunitionsResponseAdmin.h:17
DtMunitionInFlight()
Definition: launchedMunitionsResponseAdmin.h:17
virtual bool setToNet()
Sets netRep buffer to the contents of this set request. Base class does nothing and returns true...
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
const std::vector< DtMunitionInFlight > & launchedMunitions() const
Definition: launchedMunitionsResponseAdmin.h:182
virtual DtString stringRep() const =0
Get a readable string representation of this content. Derived classes must implement this function...
DtUUID munitionUUID
Definition: launchedMunitionsResponseAdmin.h:20
This structure contains the information related to an individual munition currently in launch...
Definition: launchedMunitionsResponseAdmin.h:15

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)