open-dis-cpp
AggregateIdentifier.h
1 #pragma once
2 
3 #include <dis7/SimulationAddress.h>
4 #include <dis7/utils/DataStream.h>
5 #include <dis7/opendis7_export.h>
6 
7 
8 namespace DIS
9 {
10 // The unique designation of each aggrgate in an exercise is specified by an aggregate identifier record. The aggregate ID is not an entity and shall not be treated as such. Section 6.2.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 AggregateIdentifier
17 {
18 protected:
21 
23  unsigned short _aggregateID;
24 
25 
26  public:
28  virtual ~AggregateIdentifier();
29 
30  virtual void marshal(DataStream& dataStream) const;
31  virtual void unmarshal(DataStream& dataStream);
32 
33  SimulationAddress& getSimulationAddress();
34  const SimulationAddress& getSimulationAddress() const;
35  void setSimulationAddress(const SimulationAddress &pX);
36 
37  unsigned short getAggregateID() const;
38  void setAggregateID(unsigned short pX);
39 
40 
41 virtual int getMarshalledSize() const;
42 
43  bool operator ==(const AggregateIdentifier& rhs) const;
44 };
45 }
46 
47 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
48 // Redistribution and use in source and binary forms, with or without
49 // modification, are permitted provided that the following conditions
50 // are met:
51 //
52 // * Redistributions of source code must retain the above copyright
53 // notice, this list of conditions and the following disclaimer.
54 // * Redistributions in binary form must reproduce the above copyright
55 // notice, this list of conditions and the following disclaimer
56 // in the documentation and/or other materials provided with the
57 // distribution.
58 // * Neither the names of the Naval Postgraduate School (NPS)
59 // Modeling Virtual Environments and Simulation (MOVES) Institute
60 // (http://www.nps.edu and http://www.MovesInstitute.org)
61 // nor the names of its contributors may be used to endorse or
62 // promote products derived from this software without specific
63 // prior written permission.
64 //
65 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
66 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
67 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
68 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
69 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
70 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
71 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
72 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
73 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
74 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
75 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
76 // POSSIBILITY OF SUCH DAMAGE.
Definition: SimulationAddress.h:15
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
Definition: AggregateIdentifier.h:16
unsigned short _aggregateID
the aggregate ID
Definition: AggregateIdentifier.h:23
SimulationAddress _simulationAddress
Simulation address, ie site and application, the first two fields of the entity ID.
Definition: AggregateIdentifier.h:20