VR-Forces 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;
23  DtVector targetPoint;
24 };
25 
29 {
30 public:
33 
36 
40 
42  virtual ~DtNextLaunchTimeMunitionResponseAdmin() override;
43 
45  static DtAdminContent* create();
46 
48  virtual bool init() override;
49 
51  virtual const DtAdminContentMessageType& type() const override;
52 
55  virtual DtAdminContent * clone() const override;
56 
58  virtual DtString stringRep() const override;
59 
61  virtual int netRepSize() const override;
62 
64  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
65 
67  virtual bool setToNet() override;
68 
70  virtual void setLaunchTime(double);
71  double launchTime() const
72  {
73  return myLaunchTime;
74  }
75 
76 protected:
77  double myLaunchTime;
78 };
79 
83 {
84 public:
87 
90 
94 
96  virtual ~DtNextLaunchedMunitionResponseAdmin() override;
97 
99  static DtAdminContent* create();
100 
102  virtual bool init() override;
103 
105  virtual const DtAdminContentMessageType& type() const override;
106 
109  virtual DtAdminContent * clone() const override;
110 
112  virtual DtString stringRep() const override;
113 
115  virtual int netRepSize() const override;
116 
118  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
119 
121  virtual bool setToNet() override;
122 
124  virtual void setNextLaunchMunition(const DtMunitionInFlight&);
126  {
127  return myNextLaunchMunition;
128  }
129 
130 protected:
132 };
133 
137 {
138 public:
141 
144 
148 
150  virtual ~DtLaunchedMunitionsResponseAdmin() override;
151 
153  static DtAdminContent* create();
154 
156  virtual bool init() override;
157 
159  virtual const DtAdminContentMessageType& type() const override;
160 
163  virtual DtAdminContent * clone() const override;
164 
166  virtual DtString stringRep() const override;
167 
169  virtual int netRepSize() const override;
170 
172  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
173 
175  virtual bool setToNet() override;
176 
178  virtual void addLaunchedMunition(const DtMunitionInFlight&);
179  const std::vector<DtMunitionInFlight>& launchedMunitions() const
180  {
181  return myLaunchedMunitions;
182  }
183 
184 protected:
185  std::vector<DtMunitionInFlight> myLaunchedMunitions;
186 };
187 
191 
196 DT_DLL_vrftasks char *encode(const DtMunitionInFlight& val, char *buffer);
197 
201 DT_DLL_vrftasks const char *decode(DtMunitionInFlight& val, const char *buffer);
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtLaunchedMunitionsResponseAdmin The list of all munitions launched.
Definition: launchedMunitionsResponseAdmin.h:136
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:185
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:125
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:71
const DtAdminContent & operator=(const DtAdminContent &orig)
assignment operator; same as copy costructor.
DtMunitionInFlight myNextLaunchMunition
Definition: launchedMunitionsResponseAdmin.h:131
DtNextLaunchedMunitionResponseAdmin The next munition that is to land as shot by the indirect fire...
Definition: launchedMunitionsResponseAdmin.h:82
double myLaunchTime
Definition: launchedMunitionsResponseAdmin.h:77
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:179
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 Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)