-// 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
#include "HLADataElement.hxx"
#include "HLAEnumeratedDataType.hxx"
#include "HLAFixedRecordDataType.hxx"
-#include "HLAVariantDataType.hxx"
+#include "HLAVariantRecordDataType.hxx"
namespace simgear {
virtual void apply(const HLADataType& dataType)
{ }
- virtual void apply(const HLADataTypeReference& dataType)
- {
- SGSharedPtr<const HLADataType> 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<const HLADataType&>(dataType)); }
virtual void apply(const HLAInt8DataType& dataType)
virtual void apply(const HLAFixedRecordDataType& dataType)
{ apply(static_cast<const HLADataType&>(dataType)); }
- virtual void apply(const HLAVariantDataType& dataType)
+ virtual void apply(const HLAVariantRecordDataType& dataType)
{ apply(static_cast<const HLADataType&>(dataType)); }
};
}
}
- virtual void apply(const HLAVariantDataType& dataType)
+ virtual void apply(const HLAVariantRecordDataType& dataType)
{ assert(0); }
protected:
dataType.getFieldDataType(i)->accept(*this);
}
- virtual void apply(const HLAVariantDataType& dataType) { assert(0); }
+ virtual void apply(const HLAVariantRecordDataType& dataType) { assert(0); }
protected:
HLADecodeStream& _stream;
dataType.getFieldDataType(i)->accept(*this);
}
- virtual void apply(const HLAVariantDataType& dataType) { assert(0); }
+ virtual void apply(const HLAVariantRecordDataType& dataType) { assert(0); }
protected:
HLAEncodeStream& _stream;
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);
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);
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);
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);
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<HLADataElement> _dataElement;
};