CLAM-Development
1.4.0
|
Contains the extracted data for a given description process. More...
#include <Pool.hxx>
Public Member Functions | |
DescriptionDataPool (const DescriptionScheme &scheme) | |
Constructs a desciption data pool. | |
~DescriptionDataPool () | |
void | SetNumberOfContexts (const std::string &scopeName, unsigned size) |
Sets how many values will the attributes on the specified scope have. | |
unsigned | GetNumberOfContexts (const std::string &scopeName) const |
void | Insert (const std::string &scopeName, unsigned pos) |
void | Remove (const std::string &scopeName, unsigned pos) |
void | InstantiateAttribute (const std::string &scopeName, const std::string &attributeName) |
template<typename AttributeType > | |
AttributeType * | GetWritePool (const std::string &scopeName, const std::string &attributeName) |
Returns a pointer to the C array of data with all the values for the specified attribute. | |
template<typename AttributeType > | |
const AttributeType * | GetReadPool (const std::string &scopeName, const std::string &attributeName) const |
Returns a pointer to the C array of data with all the values for the specified attribute. | |
bool | IsInstantiated (const std::string &scopeName, const std::string &attributeName) const |
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. | |
![]() | |
virtual | ~Component () |
virtual Component * | ShallowCopy () const |
virtual Component * | DeepCopy () const |
Contains the extracted data for a given description process.
Its structure conforms the one defined by a DescriptionScheme specified when constructed.
Data is stored for each attribute as a C array.
The values can be dumped and restored to and from an XML file.
|
inline |
Constructs a desciption data pool.
By default all the scopes are size 0 and no attributes are instanciated.
scheme | the DescriptionScheme to be taken as specification. |
|
inlinevirtual |
|
inline |
Definition at line 67 of file Pool.hxx.
References CLAM_ASSERT, and CLAM::DescriptionScheme::GetScopeIndex().
Referenced by CLAM::ReadHook< AttributeType >::IsInsideScope(), and CLAM::WriteHook< AttributeType >::IsInsideScope().
|
inline |
Returns a pointer to the C array of data with all the values for the specified attribute.
The C array lenght will be the GetScopeSize(scope) long.
Definition at line 123 of file Pool.hxx.
References CLAM_ASSERT, and CLAM::DescriptionScheme::GetScopeIndex().
|
inline |
Returns a pointer to the C array of data with all the values for the specified attribute.
The C array lenght will be the GetScopeSize(scope) long. This methods allocates the array value the first time is invoqued for an attribute.
Definition at line 105 of file Pool.hxx.
References CLAM_ASSERT, and CLAM::DescriptionScheme::GetScopeIndex().
|
inline |
Definition at line 75 of file Pool.hxx.
References CLAM_ASSERT, and CLAM::DescriptionScheme::GetScopeIndex().
|
inline |
Definition at line 89 of file Pool.hxx.
References CLAM_ASSERT, CLAM::DescriptionScope::GetIndex(), CLAM::DescriptionScheme::GetScope(), and CLAM::DescriptionScheme::GetScopeIndex().
|
inline |
Definition at line 132 of file Pool.hxx.
References CLAM::DescriptionScheme::GetScopeIndex().
|
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 149 of file Pool.hxx.
References CLAM::DescriptionScheme::GetScope(), and CLAM::Storage::Load().
|
inline |
Definition at line 81 of file Pool.hxx.
References CLAM_ASSERT, and CLAM::DescriptionScheme::GetScopeIndex().
|
inline |
Sets how many values will the attributes on the specified scope have.
Sets the number of contexts (ie. number of notes) for the given Scope (Note), so that every attribute registered for that scope will have a single value for each context.
Definition at line 60 of file Pool.hxx.
References CLAM::DescriptionScheme::GetScope(), and CLAM::DescriptionScheme::GetScopeIndex().
|
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 141 of file Pool.hxx.
References CLAM::Storage::Store().