unsigned
HLAAbstractFixedRecordDataElement::getNumFields() const
{
+ if (!_dataType.valid())
+ return 0;
return _dataType->getNumFields();
}
unsigned
HLAAbstractFixedRecordDataElement::getFieldNumber(const std::string& name) const
{
+ if (!_dataType.valid())
+ return ~0u;
return _dataType->getFieldNumber(name);
}
const HLADataType*
HLAAbstractFixedRecordDataElement::getFieldDataType(unsigned i) const
{
+ if (!_dataType.valid())
+ return 0;
return _dataType->getFieldDataType(i);
}
const HLADataType*
HLAAbstractFixedRecordDataElement::getFieldDataType(const std::string& name) const
{
+ if (!_dataType.valid())
+ return 0;
return getFieldDataType(getFieldNumber(name));
}
clearStamp();
}
+bool
+HLAFixedRecordDataElement::setDataType(const HLADataType* dataType)
+{
+ if (!HLAAbstractFixedRecordDataElement::setDataType(dataType))
+ return false;
+ _fieldVector.resize(getNumFields());
+ return true;
+}
+
bool
HLAFixedRecordDataElement::decodeField(HLADecodeStream& stream, unsigned i)
{
HLAFixedRecordDataElement(const HLAFixedRecordDataType* dataType);
virtual ~HLAFixedRecordDataElement();
+ virtual bool setDataType(const HLADataType* dataType);
+
virtual bool decodeField(HLADecodeStream& stream, unsigned i);
virtual bool encodeField(HLAEncodeStream& stream, unsigned i) const;