MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLAfixedRecord.h
Go to the documentation of this file.
1 /***********************************************************************
2  The IEEE hereby grants a general, royalty-free license to copy, distribute,
3  display and make derivative works from this material, for all purposes,
4  provided that any use of the material contains the following
5  attribution: "Reprinted with permission from IEEE 1516.1(TM)-2010".
6  Should you require additional information, contact the Manager, Standards
7  Intellectual Property, IEEE Standards Association (stds-ipr@ieee.org).
8 ***********************************************************************/
9 /***********************************************************************
10  IEEE 1516.1 High Level Architecture Interface Specification C++ API
11  File: HLAfixedRecord.h
12 ***********************************************************************/
13 #ifndef RTI_HLAfixedRecord_h_
14 #define RTI_HLAfixedRecord_h_
15 
18 #include <RTI/SpecificConfig.h>
19 
20 namespace rti1516e
21 {
22  // Forward Declarations
23  class VariableLengthData;
24  class HLAfixedRecordImplementation;
25 
26  // Interface for the HLAfixedRecord complex data element
28  {
29  public:
30 
31  // Default Constructor
32  HLAfixedRecord ();
33 
34  // Copy Constructor
36  HLAfixedRecord const & rhs);
37 
38  // Destructor
39  virtual ~HLAfixedRecord ();
40 
41  // Return a new copy of the DataElement
42  virtual std::auto_ptr<DataElement> clone () const;
43 
44  // Encode this element into a new VariableLengthData
45  virtual VariableLengthData encode () const
46  throw (EncoderException);
47 
48  // Encode this element into an existing VariableLengthData
49  virtual void encode (
50  VariableLengthData& inData) const
51  throw (EncoderException);
52 
53  // Encode this element and append it to a buffer
54  virtual void encodeInto (
55  std::vector<Octet>& buffer) const
56  throw (EncoderException);
57 
58  // Decode this element from the RTI's VariableLengthData.
59  virtual void decode (
60  VariableLengthData const & inData)
61  throw (EncoderException);
62 
63  // Decode this element starting at the index in the provided buffer
64  virtual size_t decodeFrom (
65  std::vector<Octet> const & buffer,
66  size_t index)
67  throw (EncoderException);
68 
69  // Return the size in bytes of this record's encoding.
70  virtual size_t getEncodedLength () const
71  throw (EncoderException);
72 
73  // Return the octet boundary of this element.
74  virtual unsigned int getOctetBoundary () const;
75 
76  // Return true if given element is same type as this; otherwise, false.
77  virtual bool isSameTypeAs(
78  DataElement const& inData ) const;
79 
80  // Return true if given element is same type as the indexed element;
81  // otherwise, false.
82  virtual bool hasElementSameTypeAs(size_t index,
83  DataElement const& inData ) const;
84 
85  // Return the number of elements in this fixed record.
86  virtual size_t size () const;
87 
88  // Append a copy of the dataElement instance to this fixed record.
89  virtual void appendElement (const DataElement& dataElement);
90 
91  // Append the dataElement instance to this fixed record.
92  // Null pointer results in an exception.
93  virtual void appendElementPointer (DataElement* dataElement);
94 
95  // Sets the element at the given index to a copy of the given element instance
96  // Element must match prototype of existing element at this index.
97  virtual void set (size_t index,
98  const DataElement& dataElement)
99  throw (EncoderException);
100 
101  // Sets the element at the given index to the given element instance
102  // Element must match prototype of existing element at this index.
103  // Null pointer results in an exception.
104  virtual void setElementPointer (size_t index, DataElement* dataElement)
105  throw (EncoderException);
106 
107  // Return a const reference to the element at the specified index.
108  // Must use set to change element.
109  virtual const DataElement& get (
110  size_t index) const
111  throw (EncoderException);
112 
113  // Return a const reference to the element instance at the specified index.
114  // Must use set to change element.
115  DataElement const& operator [](size_t index) const
116  throw (EncoderException);
117 
118  private:
119 
120  // Assignment Operator not allowed
121  HLAfixedRecord& operator=(
122  HLAfixedRecord const & rhs);
123 
124  protected:
125 
126  HLAfixedRecordImplementation* _impl;
127  };
128 }
129 
130 #endif // RTI_HLAfixedRecord_h_
131 

Document ID: Generated on Fri Sep 27 00:57:56 EDT 2019 from SVN revision 201708
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)