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