-// 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
// 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 "HLAFixedRecordDataElement.hxx"
#include <string>
HLAFixedRecordDataElement::~HLAFixedRecordDataElement()
{
+ clearStamp();
}
bool
{
if (getNumFields() <= index)
return;
+ if (_fieldVector[index].valid())
+ _fieldVector[index]->clearStamp();
_fieldVector[index] = value;
+ if (value)
+ value->attachStamp(*this);
+ setDirty(true);
}
void
setField(getFieldNumber(name), value);
}
+void
+HLAFixedRecordDataElement::_setStamp(Stamp* stamp)
+{
+ HLAAbstractFixedRecordDataElement::_setStamp(stamp);
+ for (FieldVector::iterator i = _fieldVector.begin(); i != _fieldVector.end(); ++i) {
+ if (!i->valid())
+ continue;
+ (*i)->attachStamp(*this);
+ }
+}
+
}