X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fhla%2FHLADataTypeVisitor.hxx;h=a73488af84e1e90007957910f566acf0aa9403d6;hb=d4db4fcac304c44e97d8db51f94cd25117b3956d;hp=2af1012c5eeb37691ae92e51cc1a4be052ca1b44;hpb=a0c48de39d7ef7cb26dcf0b7d3026880010750b3;p=simgear.git diff --git a/simgear/hla/HLADataTypeVisitor.hxx b/simgear/hla/HLADataTypeVisitor.hxx index 2af1012c..a73488af 100644 --- a/simgear/hla/HLADataTypeVisitor.hxx +++ b/simgear/hla/HLADataTypeVisitor.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 @@ -27,7 +27,7 @@ #include "HLADataElement.hxx" #include "HLAEnumeratedDataType.hxx" #include "HLAFixedRecordDataType.hxx" -#include "HLAVariantDataType.hxx" +#include "HLAVariantRecordDataType.hxx" namespace simgear { @@ -38,16 +38,6 @@ public: virtual void apply(const HLADataType& dataType) { } - virtual void apply(const HLADataTypeReference& dataType) - { - SGSharedPtr dataTypeReference = dataType.getDataType(); - if (!dataTypeReference.valid()) { - SG_LOG(SG_NETWORK, SG_WARN, "HLADataTypeReference weak reference vanished!"); - return; - } - dataTypeReference->accept(*this); - } - virtual void apply(const HLABasicDataType& dataType) { apply(static_cast(dataType)); } virtual void apply(const HLAInt8DataType& dataType) @@ -84,7 +74,7 @@ public: virtual void apply(const HLAFixedRecordDataType& dataType) { apply(static_cast(dataType)); } - virtual void apply(const HLAVariantDataType& dataType) + virtual void apply(const HLAVariantRecordDataType& dataType) { apply(static_cast(dataType)); } }; @@ -145,7 +135,7 @@ public: } } - virtual void apply(const HLAVariantDataType& dataType) + virtual void apply(const HLAVariantRecordDataType& dataType) { assert(0); } protected: @@ -188,7 +178,7 @@ public: dataType.getFieldDataType(i)->accept(*this); } - virtual void apply(const HLAVariantDataType& dataType) { assert(0); } + virtual void apply(const HLAVariantRecordDataType& dataType) { assert(0); } protected: HLADecodeStream& _stream; @@ -232,7 +222,7 @@ public: dataType.getFieldDataType(i)->accept(*this); } - virtual void apply(const HLAVariantDataType& dataType) { assert(0); } + virtual void apply(const HLAVariantRecordDataType& dataType) { assert(0); } protected: HLAEncodeStream& _stream; @@ -269,7 +259,7 @@ public: HLADataTypeDecodeVisitor::apply(dataType); } - virtual void apply(const HLAVariantDataType& dataType) + virtual void apply(const HLAVariantRecordDataType& dataType) { SG_LOG(SG_NETWORK, SG_WARN, "Unexpected HLADataType while decodeing scalar value"); HLADataTypeDecodeVisitor::apply(dataType); @@ -305,7 +295,7 @@ public: HLADataTypeEncodeVisitor::apply(dataType); } - virtual void apply(const HLAVariantDataType& dataType) + virtual void apply(const HLAVariantRecordDataType& dataType) { SG_LOG(SG_NETWORK, SG_WARN, "Unexpected HLADataType while writing scalar value"); HLADataTypeEncodeVisitor::apply(dataType); @@ -386,7 +376,7 @@ public: HLADataTypeDecodeVisitor::apply(dataType); } - virtual void apply(const HLAVariantDataType& dataType) + virtual void apply(const HLAVariantRecordDataType& dataType) { SG_LOG(SG_NETWORK, SG_WARN, "Unexpected HLADataType while decodeing a fixed record value"); HLADataTypeDecodeVisitor::apply(dataType); @@ -467,7 +457,7 @@ public: HLADataTypeEncodeVisitor::apply(dataType); } - virtual void apply(const HLAVariantDataType& dataType) + virtual void apply(const HLAVariantRecordDataType& dataType) { SG_LOG(SG_NETWORK, SG_WARN, "Unexpected HLADataType while writing a fixed record value"); HLADataTypeEncodeVisitor::apply(dataType); @@ -654,14 +644,14 @@ public: virtual void apply(const HLAFixedRecordDataType& dataType); - virtual void apply(const HLAVariantDataType& dataType); + virtual void apply(const HLAVariantRecordDataType& dataType); HLADataElement* getDataElement() { return _dataElement.release(); } protected: class ArrayDataElementFactory; - class VariantDataElementFactory; + class VariantRecordDataElementFactory; SGSharedPtr _dataElement; };