open-dis-cpp
MunitionReload.h
1 #pragma once
2 
3 #include <dis7/EntityType.h>
4 #include <dis7/utils/DataStream.h>
5 #include <dis7/opendis7_export.h>
6 
7 
8 namespace DIS
9 {
10 // indicate weapons (munitions) previously communicated via the Munition record. Section 6.2.61
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS7_EXPORT MunitionReload
17 {
18 protected:
21 
23  unsigned int _station;
24 
26  unsigned short _standardQuantity;
27 
29  unsigned short _maximumQuantity;
30 
32  unsigned short _stationName;
33 
35  unsigned short _stationNumber;
36 
37 
38  public:
40  virtual ~MunitionReload();
41 
42  virtual void marshal(DataStream& dataStream) const;
43  virtual void unmarshal(DataStream& dataStream);
44 
45  EntityType& getMunitionType();
46  const EntityType& getMunitionType() const;
47  void setMunitionType(const EntityType &pX);
48 
49  unsigned int getStation() const;
50  void setStation(unsigned int pX);
51 
52  unsigned short getStandardQuantity() const;
53  void setStandardQuantity(unsigned short pX);
54 
55  unsigned short getMaximumQuantity() const;
56  void setMaximumQuantity(unsigned short pX);
57 
58  unsigned short getStationName() const;
59  void setStationName(unsigned short pX);
60 
61  unsigned short getStationNumber() const;
62  void setStationNumber(unsigned short pX);
63 
64 
65 virtual int getMarshalledSize() const;
66 
67  bool operator ==(const MunitionReload& rhs) const;
68 };
69 }
70 
71 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
72 // Redistribution and use in source and binary forms, with or without
73 // modification, are permitted provided that the following conditions
74 // are met:
75 //
76 // * Redistributions of source code must retain the above copyright
77 // notice, this list of conditions and the following disclaimer.
78 // * Redistributions in binary form must reproduce the above copyright
79 // notice, this list of conditions and the following disclaimer
80 // in the documentation and/or other materials provided with the
81 // distribution.
82 // * Neither the names of the Naval Postgraduate School (NPS)
83 // Modeling Virtual Environments and Simulation (MOVES) Institute
84 // (http://www.nps.edu and http://www.MovesInstitute.org)
85 // nor the names of its contributors may be used to endorse or
86 // promote products derived from this software without specific
87 // prior written permission.
88 //
89 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
90 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
91 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
92 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
93 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
94 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
95 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
96 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
97 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
98 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
99 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
100 // POSSIBILITY OF SUCH DAMAGE.
unsigned int _station
the station or launcher to which the munition is assigned.
Definition: MunitionReload.h:23
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned short _stationName
the station name within the host at which the part entity is located.
Definition: MunitionReload.h:32
EntityType _munitionType
This field shall identify the entity type of the munition.
Definition: MunitionReload.h:20
Definition: MunitionReload.h:16
unsigned short _maximumQuantity
the maximum quantity of this munition type that this station/launcher is capable of holding when a st...
Definition: MunitionReload.h:29
unsigned short _stationNumber
the number of the particular wing station, cargo hold etc., at which the part is attached.
Definition: MunitionReload.h:35
Definition: EntityType.h:15
unsigned short _standardQuantity
the standard quantity of this munition type normally loaded at this station/launcher if a station/lau...
Definition: MunitionReload.h:26