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. | |
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.
| CLAM::AbstractAttribute::AbstractAttribute | ( | const std::string & | attributeName | ) | [inline] |
Definition at line 46 of file DescriptionAttributes.hxx.
| CLAM::AbstractAttribute::AbstractAttribute | ( | const std::string & | scopeName, | |
| const std::string & | attributeName | |||
| ) | [inline] |
Definition at line 48 of file DescriptionAttributes.hxx.
| CLAM::AbstractAttribute::~AbstractAttribute | ( | ) | [virtual] |
Definition at line 5 of file DescriptionAttributes.cxx.
| virtual void* CLAM::AbstractAttribute::Allocate | ( | unsigned | size | ) | const [pure virtual] |
Allocates and construct 'size' elements for the attribute.
Implemented in CLAM::Attribute< AttributeType >.
| void CLAM::AbstractAttribute::CheckType | ( | ) | const [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().
| virtual void CLAM::AbstractAttribute::Deallocate | ( | void * | data | ) | const [pure virtual] |
Destroys and deallocates the elements pointed by 'data'.
Implemented in CLAM::Attribute< AttributeType >.
| const char* CLAM::AbstractAttribute::GetClassName | ( | ) | const [inline, virtual] |
Return the class name.
Implements CLAM::Component.
Definition at line 52 of file DescriptionAttributes.hxx.
| const std::string& CLAM::AbstractAttribute::GetName | ( | ) | const [inline] |
Returns the attribute name.
Definition at line 68 of file DescriptionAttributes.hxx.
Referenced by CLAM::Attribute< AttributeType >::XmlDumpData(), and CLAM::Attribute< AttributeType >::XmlRestoreData().
| const std::string& CLAM::AbstractAttribute::GetScope | ( | ) | const [inline] |
Returns the scope name.
Definition at line 70 of file DescriptionAttributes.hxx.
Referenced by CLAM::Attribute< AttributeType >::XmlRestoreData().
| virtual void CLAM::AbstractAttribute::Insert | ( | void * | data, | |
| unsigned | pos | |||
| ) | const [pure virtual] |
Inserts an element at position pos.
Implemented in CLAM::Attribute< AttributeType >.
| void CLAM::AbstractAttribute::LoadFrom | ( | Storage & | storage | ) | [inline, virtual] |
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.
| virtual void CLAM::AbstractAttribute::Remove | ( | void * | data, | |
| unsigned | pos | |||
| ) | const [pure virtual] |
Removes an element at position pos.
Implemented in CLAM::Attribute< AttributeType >.
| void CLAM::AbstractAttribute::StoreOn | ( | Storage & | storage | ) | const [inline, virtual] |
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().
| virtual const std::type_info& CLAM::AbstractAttribute::TypeInfo | ( | ) | const [protected, pure virtual] |
Returns the type_info for the attribute type.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by CheckType().
| virtual void CLAM::AbstractAttribute::XmlDumpData | ( | Storage & | storage, | |
| const void * | data, | |||
| unsigned | size | |||
| ) | const [pure virtual] |
Dumps the 'data' into the storage.
Implemented in CLAM::Attribute< AttributeType >.
| virtual void CLAM::AbstractAttribute::XmlDumpSchemaType | ( | Storage & | storage | ) | const [pure virtual] |
Dumps the type definition for the attribute into the storage.
Implemented in CLAM::Attribute< AttributeType >.
Referenced by StoreOn().
| virtual void CLAM::AbstractAttribute::XmlRestoreData | ( | Storage & | storage, | |
| void * | data, | |||
| unsigned | size | |||
| ) | const [pure virtual] |
Restore the 'data' from the storage.
Implemented in CLAM::Attribute< AttributeType >.
1.6.3