]> git.mxchange.org Git - simgear.git/blobdiff - simgear/hla/HLAArrayDataType.hxx
Merge branch 'timoore/optimizations' into next
[simgear.git] / simgear / hla / HLAArrayDataType.hxx
index eac645b4a886545129c66197fff07ca11603bd79..87be38517b7c34aad14c48391d283cf171350a80 100644 (file)
@@ -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<const HLADataType> _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<const HLADataType> _sizeDataType;
+    SGSharedPtr<const HLABasicDataType> _sizeDataType;
 };
 
 } // namespace simgear