#include <DescriptionScope.hxx>
Public Types | |
typedef std::map< std::string, unsigned > | NamesMap |
typedef std::vector < AbstractAttribute * > | Attributes |
Public Member Functions | |
DescriptionScope (const std::string &name) | |
~DescriptionScope () | |
const std::string & | GetName () const |
template<typename AttributeType > | |
void | Add (const std::string &name) |
Adds the scope an attribute named 'name' using the template parameter as the attribute type. | |
unsigned | GetIndex (const std::string &name) const |
Returns the attribute index that can be used for fast access to the attribute in a spec or even . | |
unsigned | GetIndexSafe (const std::string &name) const |
The same as GetIndex but it throws a catchable exception whenever the name is not available. | |
unsigned | GetNAttributes () const |
void * | Allocate (unsigned attribute, unsigned size) const |
void | Deallocate (unsigned attribute, void *buffer) const |
template<typename AttributeType > | |
void | CheckType (unsigned attributeIndex, AttributeType *) const |
const std::string & | GetAttributeName (unsigned attributeIndex) const |
const AbstractAttribute & | GetAttribute (unsigned int attribute) const |
Definition at line 51 of file DescriptionScope.hxx.
typedef std::vector<AbstractAttribute *> CLAM::DescriptionScope::Attributes |
Definition at line 55 of file DescriptionScope.hxx.
typedef std::map<std::string, unsigned> CLAM::DescriptionScope::NamesMap |
Definition at line 54 of file DescriptionScope.hxx.
CLAM::DescriptionScope::DescriptionScope | ( | const std::string & | name | ) | [inline] |
Definition at line 61 of file DescriptionScope.hxx.
CLAM::DescriptionScope::~DescriptionScope | ( | ) |
Definition at line 6 of file DescriptionScope.cxx.
void CLAM::DescriptionScope::Add | ( | const std::string & | name | ) | [inline] |
Adds the scope an attribute named 'name' using the template parameter as the attribute type.
Definition at line 77 of file DescriptionScope.hxx.
References CLAM_ASSERT.
Definition at line 116 of file DescriptionScope.hxx.
void CLAM::DescriptionScope::CheckType | ( | unsigned | attributeIndex, | |
AttributeType * | ||||
) | const [inline] |
Definition at line 126 of file DescriptionScope.hxx.
Referenced by CLAM::ScopePool::GetReadPool(), and CLAM::ScopePool::GetWritePool().
void CLAM::DescriptionScope::Deallocate | ( | unsigned | attribute, | |
void * | buffer | |||
) | const [inline] |
Definition at line 120 of file DescriptionScope.hxx.
const AbstractAttribute& CLAM::DescriptionScope::GetAttribute | ( | unsigned int | attribute | ) | const [inline] |
Definition at line 138 of file DescriptionScope.hxx.
Referenced by CLAM::ScopePool::ScopePool().
const std::string& CLAM::DescriptionScope::GetAttributeName | ( | unsigned | attributeIndex | ) | const [inline] |
Definition at line 131 of file DescriptionScope.hxx.
References CLAM_ASSERT.
unsigned CLAM::DescriptionScope::GetIndex | ( | const std::string & | name | ) | const [inline] |
Returns the attribute index that can be used for fast access to the attribute in a spec or even .
Definition at line 92 of file DescriptionScope.hxx.
References CLAM_ASSERT.
Referenced by CLAM::ScopePool::GetReadPool(), CLAM::ScopePool::GetWritePool(), CLAM::DescriptionDataPool::InstantiateAttribute(), and CLAM::ScopePool::IsInstantiated().
unsigned CLAM::DescriptionScope::GetIndexSafe | ( | const std::string & | name | ) | const [inline] |
The same as GetIndex but it throws a catchable exception whenever the name is not available.
Definition at line 103 of file DescriptionScope.hxx.
const std::string& CLAM::DescriptionScope::GetName | ( | ) | const [inline] |
Definition at line 65 of file DescriptionScope.hxx.
Referenced by CLAM::ScopePool::GetReadPool(), CLAM::DescriptionScheme::GetScopeName(), CLAM::ScopePool::LoadFrom(), and CLAM::ScopePool::StoreOn().
unsigned CLAM::DescriptionScope::GetNAttributes | ( | ) | const [inline] |
Definition at line 111 of file DescriptionScope.hxx.
Referenced by CLAM::ScopePool::GetNAttributes().