-// Copyright (C) 2009 - 2011 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
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
+#include <simgear/compiler.h>
+
#include "HLAPropertyDataElement.hxx"
#include "HLAArrayDataElement.hxx"
#include "HLADataElementVisitor.hxx"
#include "HLADataTypeVisitor.hxx"
#include "HLAFixedRecordDataElement.hxx"
-#include "HLAVariantDataElement.hxx"
+#include "HLAVariantRecordDataElement.hxx"
namespace simgear {
_dataElement = recordDataElement;
}
- class VariantDataElementFactory : public HLAVariantDataElement::DataElementFactory {
+ class VariantRecordDataElementFactory : public HLAVariantRecordDataElement::DataElementFactory {
public:
- VariantDataElementFactory(SGPropertyNode* propertyNode) :
+ VariantRecordDataElementFactory(SGPropertyNode* propertyNode) :
_propertyNode(propertyNode)
{ }
- virtual HLADataElement* createElement(const HLAVariantDataElement& element, unsigned index)
+ virtual HLADataElement* createElement(const HLAVariantRecordDataElement& element, unsigned index)
{
- const HLAVariantDataType* dataType = element.getDataType();
+ const HLAVariantRecordDataType* dataType = element.getDataType();
if (!dataType)
return 0;
const HLADataType* alternativeDataType = element.getAlternativeDataType();
SGSharedPtr<SGPropertyNode> _propertyNode;
};
- virtual void apply(const HLAVariantDataType& dataType)
+ virtual void apply(const HLAVariantRecordDataType& dataType)
{
- SGSharedPtr<HLAVariantDataElement> variantDataElement;
- variantDataElement = new HLAVariantDataElement(&dataType);
- variantDataElement->setDataElementFactory(new VariantDataElementFactory(_propertyNode.get()));
- _dataElement = variantDataElement;
+ SGSharedPtr<HLAVariantRecordDataElement> variantRecordDataElement;
+ variantRecordDataElement = new HLAVariantRecordDataElement(&dataType);
+ variantRecordDataElement->setDataElementFactory(new VariantRecordDataElementFactory(_propertyNode.get()));
+ _dataElement = variantRecordDataElement;
}
HLADataElement* getDataElement()