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