6#include <QtCore/QByteArray>
27template <
typename Value>
45 virtual const Value&
GetValue()
const;
46 virtual void SetValue(
const Value& value);
64template <
typename Value>
71template <
typename Value>
79template <
typename Value>
82 m_value(attribute.GetValue())
87template <
typename Value>
94template <
typename Value>
97 if (m_value != value){
107template <
typename Value>
110 return GetTypeName();
116template <
typename Value>
126 retVal = retVal && archive.
BeginTag(valueTag);
127 retVal = retVal && archive.
Process(m_value);
128 retVal = retVal && archive.
EndTag(valueTag);
136template <
typename Value>
139 return istd::CClassInfo::GetName<TAttribute<Value> >();
Template implementation of single component attribute.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
iser::TCopySerializedWrap< iser::IObject > BaseClass
virtual const Value & GetValue() const
static QByteArray GetTypeName()
virtual void SetValue(const Value &value)
virtual QByteArray GetFactoryId() const override
Process tag used to group data in archive stream.
@ TT_LEAF
Leaf tag, it can contain only one primitive element.
Represents an input/output persistence archive for object serialization.
virtual bool Process(bool &value)=0
Processes (reads or writes) a boolean value.
virtual bool EndTag(const CArchiveTag &tag)=0
Ends a tagged section in the archive.
virtual bool IsStoring() const =0
Checks if this archive is in storing (writing) or loading (reading) mode.
virtual bool BeginTag(const CArchiveTag &tag)=0
Begins a tagged section in the archive.
Help class which provides the automatic update mechanism of the model.
This namespace containes implementations of attributes concept.
TAttribute< int > CIntegerAttribute
TAttribute< QString > CStringAttribute
TAttribute< QByteArray > CIdAttribute
TAttribute< bool > CBooleanAttribute
TAttribute< double > CRealAttribute