open-dis-cpp
GridAxisRecordRepresentation2.h
1 #pragma once
2 
3 #include <dis6/FourByteChunk.h>
4 #include <vector>
5 #include <dis6/GridAxisRecord.h>
6 #include <dis6/utils/DataStream.h>
7 #include <dis6/opendis6_export.h>
8 
9 
10 namespace DIS
11 {
12 // 5.2.44: Grid data record, representation 1
13 
14 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
15 //
16 // @author DMcG, jkg
17 
18 class OPENDIS6_EXPORT GridAxisRecordRepresentation2 : public GridAxisRecord
19 {
20 protected:
22  unsigned short _numberOfValues;
23 
25  std::vector<FourByteChunk> _dataValues;
26 
27 
28  public:
31 
32  virtual void marshal(DataStream& dataStream) const;
33  virtual void unmarshal(DataStream& dataStream);
34 
35  unsigned short getNumberOfValues() const;
36 
37  std::vector<FourByteChunk>& getDataValues();
38  const std::vector<FourByteChunk>& getDataValues() const;
39  void setDataValues(const std::vector<FourByteChunk>& pX);
40 
41 
42 virtual int getMarshalledSize() const;
43 
44  bool operator ==(const GridAxisRecordRepresentation2& rhs) const;
45 };
46 }
47 
48 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
49 // Redistribution and use in source and binary forms, with or without
50 // modification, are permitted provided that the following conditions
51 // are met:
52 //
53 // * Redistributions of source code must retain the above copyright
54 // notice, this list of conditions and the following disclaimer.
55 // * Redistributions in binary form must reproduce the above copyright
56 // notice, this list of conditions and the following disclaimer
57 // in the documentation and/or other materials provided with the
58 // distribution.
59 // * Neither the names of the Naval Postgraduate School (NPS)
60 // Modeling Virtual Environments and Simulation (MOVES) Institute
61 // (http://www.nps.edu and http://www.MovesInstitute.org)
62 // nor the names of its contributors may be used to endorse or
63 // promote products derived from this software without specific
64 // prior written permission.
65 //
66 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
67 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
68 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
69 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
70 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
71 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
72 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
73 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
74 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
75 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
76 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
77 // 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
Definition: GridAxisRecordRepresentation2.h:18
unsigned short _numberOfValues
number of values
Definition: GridAxisRecordRepresentation2.h:22
Definition: GridAxisRecord.h:15
std::vector< FourByteChunk > _dataValues
variable length list of data parameters ^^^this is wrong–need padding as well
Definition: GridAxisRecordRepresentation2.h:25