open-dis-cpp
Expendable.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 // An entity's expendable (chaff, flares, etc) information. Section 6.2.36
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS7_EXPORT Expendable
17 {
18 protected:
21 
22  unsigned int _station;
23 
24  unsigned short _quantity;
25 
26  unsigned char _expendableStatus;
27 
28  unsigned char _padding;
29 
30 
31  public:
32  Expendable();
33  virtual ~Expendable();
34 
35  virtual void marshal(DataStream& dataStream) const;
36  virtual void unmarshal(DataStream& dataStream);
37 
38  EntityType& getExpendable();
39  const EntityType& getExpendable() const;
40  void setExpendable(const EntityType &pX);
41 
42  unsigned int getStation() const;
43  void setStation(unsigned int pX);
44 
45  unsigned short getQuantity() const;
46  void setQuantity(unsigned short pX);
47 
48  unsigned char getExpendableStatus() const;
49  void setExpendableStatus(unsigned char pX);
50 
51  unsigned char getPadding() const;
52  void setPadding(unsigned char pX);
53 
54 
55 virtual int getMarshalledSize() const;
56 
57  bool operator ==(const Expendable& rhs) const;
58 };
59 }
60 
61 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
62 // Redistribution and use in source and binary forms, with or without
63 // modification, are permitted provided that the following conditions
64 // are met:
65 //
66 // * Redistributions of source code must retain the above copyright
67 // notice, this list of conditions and the following disclaimer.
68 // * Redistributions in binary form must reproduce the above copyright
69 // notice, this list of conditions and the following disclaimer
70 // in the documentation and/or other materials provided with the
71 // distribution.
72 // * Neither the names of the Naval Postgraduate School (NPS)
73 // Modeling Virtual Environments and Simulation (MOVES) Institute
74 // (http://www.nps.edu and http://www.MovesInstitute.org)
75 // nor the names of its contributors may be used to endorse or
76 // promote products derived from this software without specific
77 // prior written permission.
78 //
79 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
80 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
81 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
82 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
83 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
84 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
85 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
86 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
87 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
88 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
89 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
90 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
EntityType _expendable
Type of expendable.
Definition: Expendable.h:20
Definition: EntityType.h:15
Definition: Expendable.h:16