X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fhla%2FHLAPropertyDataElement.cxx;h=0b9e354ea0ab496a24b786833ddb14e6331a82fe;hb=d4db4fcac304c44e97d8db51f94cd25117b3956d;hp=af19ff4d0de4f09e3fd8036e89fa5a4afe95c559;hpb=110753e92c4d512432b93d8789348a54341dec98;p=simgear.git diff --git a/simgear/hla/HLAPropertyDataElement.cxx b/simgear/hla/HLAPropertyDataElement.cxx index af19ff4d..0b9e354e 100644 --- a/simgear/hla/HLAPropertyDataElement.cxx +++ b/simgear/hla/HLAPropertyDataElement.cxx @@ -1,4 +1,4 @@ -// 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 @@ -15,6 +15,12 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + #include "HLAPropertyDataElement.hxx" #include "HLAArrayDataElement.hxx" @@ -22,7 +28,7 @@ #include "HLADataElementVisitor.hxx" #include "HLADataTypeVisitor.hxx" #include "HLAFixedRecordDataElement.hxx" -#include "HLAVariantDataElement.hxx" +#include "HLAVariantRecordDataElement.hxx" namespace simgear { @@ -373,14 +379,14 @@ public: _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(); @@ -394,12 +400,12 @@ public: SGSharedPtr _propertyNode; }; - virtual void apply(const HLAVariantDataType& dataType) + virtual void apply(const HLAVariantRecordDataType& dataType) { - SGSharedPtr variantDataElement; - variantDataElement = new HLAVariantDataElement(&dataType); - variantDataElement->setDataElementFactory(new VariantDataElementFactory(_propertyNode.get())); - _dataElement = variantDataElement; + SGSharedPtr variantRecordDataElement; + variantRecordDataElement = new HLAVariantRecordDataElement(&dataType); + variantRecordDataElement->setDataElementFactory(new VariantRecordDataElementFactory(_propertyNode.get())); + _dataElement = variantRecordDataElement; } HLADataElement* getDataElement()