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