open-dis-cpp
AggregateType.h
1 #pragma once
2 
3 #include <dis6/utils/DataStream.h>
4 #include <dis6/opendis6_export.h>
5 
6 
7 namespace DIS
8 {
9 // Section 5.2.38. Identifies the type of aggregate including kind of entity, domain (surface, subsurface, air, etc) country, category, etc.
10 
11 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
12 //
13 // @author DMcG, jkg
14 
15 class OPENDIS6_EXPORT AggregateType
16 {
17 protected:
19  unsigned char _aggregateKind;
20 
22  unsigned char _domain;
23 
25  unsigned short _country;
26 
28  unsigned char _category;
29 
31  unsigned char _subcategory;
32 
34  unsigned char _specific;
35 
36  unsigned char _extra;
37 
38 
39  public:
40  AggregateType();
41  virtual ~AggregateType();
42 
43  virtual void marshal(DataStream& dataStream) const;
44  virtual void unmarshal(DataStream& dataStream);
45 
46  unsigned char getAggregateKind() const;
47  void setAggregateKind(unsigned char pX);
48 
49  unsigned char getDomain() const;
50  void setDomain(unsigned char pX);
51 
52  unsigned short getCountry() const;
53  void setCountry(unsigned short pX);
54 
55  unsigned char getCategory() const;
56  void setCategory(unsigned char pX);
57 
58  unsigned char getSubcategory() const;
59  void setSubcategory(unsigned char pX);
60 
61  unsigned char getSpecific() const;
62  void setSpecific(unsigned char pX);
63 
64  unsigned char getExtra() const;
65  void setExtra(unsigned char pX);
66 
67 
68 virtual int getMarshalledSize() const;
69 
70  bool operator ==(const AggregateType& rhs) const;
71 };
72 }
73 
74 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
75 // Redistribution and use in source and binary forms, with or without
76 // modification, are permitted provided that the following conditions
77 // are met:
78 //
79 // * Redistributions of source code must retain the above copyright
80 // notice, this list of conditions and the following disclaimer.
81 // * Redistributions in binary form must reproduce the above copyright
82 // notice, this list of conditions and the following disclaimer
83 // in the documentation and/or other materials provided with the
84 // distribution.
85 // * Neither the names of the Naval Postgraduate School (NPS)
86 // Modeling Virtual Environments and Simulation (MOVES) Institute
87 // (http://www.nps.edu and http://www.MovesInstitute.org)
88 // nor the names of its contributors may be used to endorse or
89 // promote products derived from this software without specific
90 // prior written permission.
91 //
92 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
93 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
94 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
95 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
96 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
97 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
98 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
99 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
100 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
101 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
102 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
103 // POSSIBILITY OF SUCH DAMAGE.
unsigned short _country
country to which the design of the entity is attributed
Definition: AggregateType.h:25
unsigned char _subcategory
subcategory of entity
Definition: AggregateType.h:31
Definition: AggregateType.h:15
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned char _domain
Domain of entity (air, surface, subsurface, space, etc)
Definition: AggregateType.h:22
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned char _aggregateKind
Kind of entity.
Definition: AggregateType.h:19
unsigned char _category
category of entity
Definition: AggregateType.h:28
unsigned char _specific
specific info based on subcategory field
Definition: AggregateType.h:34