CLAM-Development  1.4.0
Public Types | Public Member Functions | Protected Member Functions
CLAM::Attribute< AttributeType > Class Template Reference

This class is the concrete implementation for AbstractAttribute for a given type of attributes. More...

#include <DescriptionAttributes.hxx>

List of all members.

Public Types

typedef AttributeType DataType

Public Member Functions

 Attribute (const std::string &attributeName)
 Attribute (const std::string &scopeName, const std::string &attributeName)
virtual void * Allocate (unsigned size) const
 Allocates and construct 'size' elements for the attribute.
virtual void Deallocate (void *data) const
 Destroys and deallocates the elements pointed by 'data'.
virtual void Insert (void *data, unsigned pos) const
 Inserts an element at position pos.
virtual void Remove (void *data, unsigned pos) const
 Removes an element at position pos.
virtual void XmlDumpData (Storage &storage, const void *data, unsigned size) const
 Dumps the 'data' into the storage.
virtual void XmlRestoreData (Storage &storage, void *data, unsigned size) const
 Restore the 'data' from the storage.
void XmlDumpSchemaType (Storage &storage) const
 Dumps the type definition for the attribute into the storage.
- Public Member Functions inherited from CLAM::AbstractAttribute
 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.
template<typename TypeToCheck >
void CheckType () const
 Asserts false whenever TypeToCheck is not the one that the attribute contains.
- Public Member Functions inherited from CLAM::Component
virtual ~Component ()
virtual ComponentShallowCopy () const
virtual ComponentDeepCopy () const

Protected Member Functions

virtual const std::type_info & TypeInfo () const
 Returns the type_info for the attribute type.

Detailed Description

template<typename AttributeType>
class CLAM::Attribute< AttributeType >

This class is the concrete implementation for AbstractAttribute for a given type of attributes.

It implements functionalities that are type dependant in an attribute.

Definition at line 115 of file DescriptionAttributes.hxx.


Member Typedef Documentation

template<typename AttributeType >
typedef AttributeType CLAM::Attribute< AttributeType >::DataType

Definition at line 122 of file DescriptionAttributes.hxx.


Constructor & Destructor Documentation

template<typename AttributeType >
CLAM::Attribute< AttributeType >::Attribute ( const std::string &  attributeName)
inline

Definition at line 118 of file DescriptionAttributes.hxx.

template<typename AttributeType >
CLAM::Attribute< AttributeType >::Attribute ( const std::string &  scopeName,
const std::string &  attributeName 
)
inline

Definition at line 120 of file DescriptionAttributes.hxx.


Member Function Documentation

template<typename AttributeType >
virtual void* CLAM::Attribute< AttributeType >::Allocate ( unsigned  size) const
inlinevirtual

Allocates and construct 'size' elements for the attribute.

Implements CLAM::AbstractAttribute.

Definition at line 123 of file DescriptionAttributes.hxx.

template<typename AttributeType >
virtual void CLAM::Attribute< AttributeType >::Deallocate ( void *  data) const
inlinevirtual

Destroys and deallocates the elements pointed by 'data'.

Implements CLAM::AbstractAttribute.

Definition at line 127 of file DescriptionAttributes.hxx.

template<typename AttributeType >
virtual void CLAM::Attribute< AttributeType >::Insert ( void *  data,
unsigned  pos 
) const
inlinevirtual

Inserts an element at position pos.

Implements CLAM::AbstractAttribute.

Definition at line 131 of file DescriptionAttributes.hxx.

template<typename AttributeType >
virtual void CLAM::Attribute< AttributeType >::Remove ( void *  data,
unsigned  pos 
) const
inlinevirtual

Removes an element at position pos.

Implements CLAM::AbstractAttribute.

Definition at line 136 of file DescriptionAttributes.hxx.

template<typename AttributeType >
virtual const std::type_info& CLAM::Attribute< AttributeType >::TypeInfo ( ) const
inlineprotectedvirtual

Returns the type_info for the attribute type.

Implements CLAM::AbstractAttribute.

Definition at line 220 of file DescriptionAttributes.hxx.

template<typename AttributeType >
virtual void CLAM::Attribute< AttributeType >::XmlDumpData ( Storage storage,
const void *  data,
unsigned  size 
) const
inlinevirtual

Dumps the 'data' into the storage.

Implements CLAM::AbstractAttribute.

Definition at line 141 of file DescriptionAttributes.hxx.

References CLAM::AbstractAttribute::GetName(), and CLAM::Storage::Store().

template<typename AttributeType >
void CLAM::Attribute< AttributeType >::XmlDumpSchemaType ( Storage storage) const
inlinevirtual

Dumps the type definition for the attribute into the storage.

Implements CLAM::AbstractAttribute.

Definition at line 159 of file DescriptionAttributes.hxx.

References CLAM::Storage::Store().

template<typename AttributeType >
virtual void CLAM::Attribute< AttributeType >::XmlRestoreData ( Storage storage,
void *  data,
unsigned  size 
) const
inlinevirtual

Restore the 'data' from the storage.

Implements CLAM::AbstractAttribute.

Definition at line 148 of file DescriptionAttributes.hxx.

References CLAM_ASSERT, CLAM::AbstractAttribute::GetName(), CLAM::AbstractAttribute::GetScope(), and CLAM::Storage::Load().


The documentation for this class was generated from the following file: