CLAM-Development
1.4.0
|
Defines the interface for an Attribute definition in a DescriptionScheme. More...
#include <DescriptionAttributes.hxx>
Public Member Functions | |
AbstractAttribute (const std::string &attributeName) | |
AbstractAttribute (const std::string &scopeName, const std::string &attributeName) | |
virtual | ~AbstractAttribute () |
const char * | GetClassName () const |
Return the class name. | |
void | StoreOn (Storage &storage) const |
Stores component's subitems on the given Storage. | |
void | LoadFrom (Storage &storage) |
Loads component's subitems from the given Storage. | |
const std::string & | GetName () const |
Returns the attribute name. | |
const std::string & | GetScope () const |
Returns the scope name. | |
virtual void * | Allocate (unsigned size) const =0 |
Allocates and construct 'size' elements for the attribute. | |
virtual void | Deallocate (void *data) const =0 |
Destroys and deallocates the elements pointed by 'data'. | |
virtual void | Insert (void *data, unsigned pos) const =0 |
Inserts an element at position pos. | |
virtual void | Remove (void *data, unsigned pos) const =0 |
Removes an element at position pos. | |
virtual void | XmlDumpData (Storage &storage, const void *data, unsigned size) const =0 |
Dumps the 'data' into the storage. | |
virtual void | XmlRestoreData (Storage &storage, void *data, unsigned size) const =0 |
Restore the 'data' from the storage. | |
virtual void | XmlDumpSchemaType (Storage &storage) const =0 |
Dumps the type definition for the attribute into the storage. | |
template<typename TypeToCheck > | |
void | CheckType () const |
Asserts false whenever TypeToCheck is not the one that the attribute contains. | |
![]() | |
virtual | ~Component () |
virtual Component * | ShallowCopy () const |
virtual Component * | DeepCopy () const |
Protected Member Functions | |
virtual const std::type_info & | TypeInfo () const =0 |
Returns the type_info for the attribute type. |
Defines the interface for an Attribute definition in a DescriptionScheme.
It offers a type independent interface to do type dependent operations defined on the specialization of the Attribute template.
Definition at line 43 of file DescriptionAttributes.hxx.
|
inline |
Definition at line 46 of file DescriptionAttributes.hxx.
|
inline |
Definition at line 48 of file DescriptionAttributes.hxx.
|
virtual |
Definition at line 5 of file DescriptionAttributes.cxx.
|
pure virtual |
Allocates and construct 'size' elements for the attribute.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CLAM::AttributePool::Allocate().
|
inline |
Asserts false whenever TypeToCheck is not the one that the attribute contains.
Definition at line 91 of file DescriptionAttributes.hxx.
References CLAM_ASSERT, and TypeInfo().
|
pure virtual |
Destroys and deallocates the elements pointed by 'data'.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CLAM::AttributePool::Deallocate().
|
inlinevirtual |
Return the class name.
Implements CLAM::Component.
Definition at line 52 of file DescriptionAttributes.hxx.
|
inline |
Returns the attribute name.
Definition at line 68 of file DescriptionAttributes.hxx.
Referenced by CLAM::Attribute< AttributeType >::XmlDumpData(), and CLAM::Attribute< AttributeType >::XmlRestoreData().
|
inline |
Returns the scope name.
Definition at line 70 of file DescriptionAttributes.hxx.
Referenced by CLAM::Attribute< AttributeType >::XmlRestoreData().
|
pure virtual |
Inserts an element at position pos.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CLAM::AttributePool::Insert().
|
inlinevirtual |
Loads component's subitems from the given Storage.
storage | The given storage where the subitem will be loaded from |
Implements CLAM::Component.
Definition at line 63 of file DescriptionAttributes.hxx.
|
pure virtual |
Removes an element at position pos.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CLAM::AttributePool::Remove().
|
inlinevirtual |
Stores component's subitems on the given Storage.
storage | The given storage where the subitem will be stored |
Implements CLAM::Component.
Definition at line 53 of file DescriptionAttributes.hxx.
References CLAM::Storage::Store(), and XmlDumpSchemaType().
|
protectedpure virtual |
Returns the type_info for the attribute type.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CheckType().
|
pure virtual |
Dumps the 'data' into the storage.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CLAM::AttributePool::StoreOn().
|
pure virtual |
Dumps the type definition for the attribute into the storage.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by StoreOn().
|
pure virtual |
Restore the 'data' from the storage.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CLAM::AttributePool::LoadFrom().