open-dis-cpp
EntityTypeVP.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 // Association or disassociation of two entities. Section 6.2.93.5
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS7_EXPORT EntityTypeVP
17 {
18 protected:
20  unsigned char _recordType;
21 
23  unsigned char _changeIndicator;
24 
26  EntityType _entityType;
27 
29  unsigned short _padding;
30 
32  unsigned int _padding1;
33 
34 
35  public:
36  EntityTypeVP();
37  virtual ~EntityTypeVP();
38 
39  virtual void marshal(DataStream& dataStream) const;
40  virtual void unmarshal(DataStream& dataStream);
41 
42  unsigned char getRecordType() const;
43  void setRecordType(unsigned char pX);
44 
45  unsigned char getChangeIndicator() const;
46  void setChangeIndicator(unsigned char pX);
47 
48  EntityType& getEntityType();
49  const EntityType& getEntityType() const;
50  void setEntityType(const EntityType &pX);
51 
52  unsigned short getPadding() const;
53  void setPadding(unsigned short pX);
54 
55  unsigned int getPadding1() const;
56  void setPadding1(unsigned int pX);
57 
58 
59 virtual int getMarshalledSize() const;
60 
61  bool operator ==(const EntityTypeVP& 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
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned char _recordType
the identification of the Variable Parameter record.
Definition: EntityTypeVP.h:20
unsigned char _changeIndicator
Indicates if this VP has changed since last issuance.
Definition: EntityTypeVP.h:23
unsigned short _padding
padding
Definition: EntityTypeVP.h:29
unsigned int _padding1
padding
Definition: EntityTypeVP.h:32
Definition: EntityType.h:15
Definition: EntityTypeVP.h:16