10 #ifndef HLAfixedArrayImpl_H_
11 #define HLAfixedArrayImpl_H_
15 #include <RTI/encoding/DataElement.h>
21 class VariableLengthData;
23 class HLAfixedArrayImplementation
27 HLAfixedArrayImplementation(
const DataElement& proto,
size_t length );
31 HLAfixedArrayImplementation(HLAfixedArrayImplementation
const & rhs)
32 throw (EncoderException);
35 ~HLAfixedArrayImplementation();
39 virtual rti1516e::VariableLengthData encode()
const;
43 virtual void encode(rti1516e::VariableLengthData& inData)
const;
47 virtual void encodeInto( std::vector<Octet>& buffer )
const;
51 virtual void decode(rti1516e::VariableLengthData
const & inData)
52 throw (EncoderException);
57 virtual size_t decodeFrom( std::vector<Octet>
const & buffer,
unsigned int index )
58 throw (EncoderException);
62 virtual size_t getEncodedLength()
const;
66 virtual unsigned int getOctetBoundary()
const;
70 virtual size_t size()
const;
73 virtual bool hasPrototypeSameTypeAs(DataElement
const& dataElement )
const;
76 virtual bool hasSamePrototypeTypeAs(HLAfixedArrayImplementation
const& inData)
const;
80 virtual void set(
size_t index,
const DataElement& dataElement)
81 throw (EncoderException);
86 virtual void setElementPointer(
size_t index, DataElement* dataElement,
87 bool takeOwnership=
false)
88 throw (EncoderException);
93 virtual const rti1516e::DataElement& get(
95 throw (EncoderException);
101 virtual
size_t resetEncodedLength( );
105 virtual
void clear( );
108 HLAfixedArrayImplementation* self() const;
113 HLAfixedArrayImplementation();
117 std::auto_ptr<rti1516e::DataElement> myPrototypeElement;
118 mutable std::vector<rti1516e::DataElement*> myData;
119 mutable std::vector<
bool> myDataOwnership;
121 unsigned int myOctetBoundary;
122 unsigned int myEncodedLength;
127 #endif // DtIFSPEC1516E
virtual Boolean throw(SpecifiedSaveLabelDoesNotExist, ConcurrentAccessAttempted, RTIinternalError)