X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fhla%2FHLAArrayDataType.hxx;h=87be38517b7c34aad14c48391d283cf171350a80;hb=d6361dfee43c0595a19d409b438c6d1cdd65d2ea;hp=eac645b4a886545129c66197fff07ca11603bd79;hpb=44ff23b227dcc1f3efbd10a4df4d8b723165c11c;p=simgear.git diff --git a/simgear/hla/HLAArrayDataType.hxx b/simgear/hla/HLAArrayDataType.hxx index eac645b4..87be3851 100644 --- a/simgear/hla/HLAArrayDataType.hxx +++ b/simgear/hla/HLAArrayDataType.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2009 - 2010 Mathias Froehlich - Mathias.Froehlich@web.de +// Copyright (C) 2009 - 2012 Mathias Froehlich - Mathias.Froehlich@web.de // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -35,6 +35,8 @@ public: virtual const HLAArrayDataType* toArrayDataType() const; + virtual void releaseDataTypeReferences(); + virtual bool decode(HLADecodeStream& stream, HLAAbstractArrayDataElement& value) const = 0; virtual bool encode(HLAEncodeStream& stream, const HLAAbstractArrayDataElement& value) const = 0; @@ -42,8 +44,21 @@ public: const HLADataType* getElementDataType() const { return _elementDataType.get(); } + void setIsOpaque(bool isOpaque); + bool getIsOpaque() const + { return _isOpaque; } + + void setIsString(bool isString); + bool getIsString() const + { return _isString; } + +protected: + virtual void _recomputeAlignmentImplementation(); + private: SGSharedPtr _elementDataType; + bool _isOpaque; + bool _isString; }; class HLAFixedArrayDataType : public HLAArrayDataType { @@ -75,12 +90,15 @@ public: virtual bool decode(HLADecodeStream& stream, HLAAbstractArrayDataElement& value) const; virtual bool encode(HLAEncodeStream& stream, const HLAAbstractArrayDataElement& value) const; - void setSizeDataType(const HLADataType* sizeDataType); - const HLADataType* getSizeDataType() const + void setSizeDataType(const HLABasicDataType* sizeDataType); + const HLABasicDataType* getSizeDataType() const { return _sizeDataType.get(); } +protected: + virtual void _recomputeAlignmentImplementation(); + private: - SGSharedPtr _sizeDataType; + SGSharedPtr _sizeDataType; }; } // namespace simgear