The description scheme defines the set of attributes (Attribute) to be used for feature extraction systems. More...
#include <DescriptionScheme.hxx>
Public Member Functions | |
| DescriptionScheme () | |
| ~DescriptionScheme () | |
| template<typename DataType > | |
| void | AddAttribute (const std::string &scope, const std::string &name) |
| Adds a new attribute to the description scheme. | |
| DescriptionScope & | SearchScopeOrAdd (const std::string scopeName) |
| unsigned | GetScopeIndex (const std::string &name) const |
| const DescriptionScope & | GetScope (unsigned scopeIndex) const |
| const DescriptionScope & | GetScope (const std::string &name) const |
| unsigned | GetNScopes () const |
| const std::string & | GetScopeName (unsigned scopeIndex) const |
| 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 char * | GetClassName () const |
| Return the class name. | |
The description scheme defines the set of attributes (Attribute) to be used for feature extraction systems.
A DescriptionScheme is only an specification. The real data is held in a DescriptionDataPool, a container that fits its structure to the one defined on the DescriptionScheme specification.
Attributes in a DescriptionScheme have a name and a type and they are organized in scopes. Each scope (see DescriptionScope) defines a kind of target for the attributes: (note scope, sample scope, frame scope, phrase scope, sample scope...)
You can add Attributes to the DescriptionScheme by using the DescriptionScheme::AddAttribute method. The rest of the methods are utility for the pool classes.
Definition at line 61 of file DescriptionScheme.hxx.
| CLAM::DescriptionScheme::DescriptionScheme | ( | ) | [inline] |
Definition at line 70 of file DescriptionScheme.hxx.
| CLAM::DescriptionScheme::~DescriptionScheme | ( | ) |
Definition at line 24 of file DescriptionScheme.cxx.
References CLAM::Storage::Load().
| void CLAM::DescriptionScheme::AddAttribute | ( | const std::string & | scope, | |
| const std::string & | name | |||
| ) | [inline] |
Adds a new attribute to the description scheme.
If the scope does not exist it will be added.
| DataType | The type of the argument to be added | |
| scope | The scope where the attributes applies to | |
| name | The name for the attribute |
Definition at line 86 of file DescriptionScheme.hxx.
References SearchScopeOrAdd().
| const char* CLAM::DescriptionScheme::GetClassName | ( | ) | const [inline, virtual] |
Return the class name.
Implements CLAM::Component.
Definition at line 135 of file DescriptionScheme.hxx.
| unsigned CLAM::DescriptionScheme::GetNScopes | ( | ) | const [inline] |
Definition at line 123 of file DescriptionScheme.hxx.
| const DescriptionScope& CLAM::DescriptionScheme::GetScope | ( | const std::string & | name | ) | const [inline] |
Definition at line 118 of file DescriptionScheme.hxx.
References GetScope(), and GetScopeIndex().
| const DescriptionScope& CLAM::DescriptionScheme::GetScope | ( | unsigned | scopeIndex | ) | const [inline] |
Definition at line 112 of file DescriptionScheme.hxx.
References CLAM_ASSERT.
Referenced by GetScope(), GetScopeName(), CLAM::DescriptionDataPool::InstantiateAttribute(), CLAM::DescriptionDataPool::LoadFrom(), and CLAM::DescriptionDataPool::SetNumberOfContexts().
| unsigned CLAM::DescriptionScheme::GetScopeIndex | ( | const std::string & | name | ) | const [inline] |
Definition at line 105 of file DescriptionScheme.hxx.
References CLAM_ASSERT.
Referenced by CLAM::DescriptionDataPool::GetNumberOfContexts(), CLAM::DescriptionDataPool::GetReadPool(), GetScope(), CLAM::DescriptionDataPool::GetWritePool(), CLAM::DescriptionDataPool::Insert(), CLAM::DescriptionDataPool::InstantiateAttribute(), CLAM::DescriptionDataPool::IsInstantiated(), CLAM::DescriptionDataPool::Remove(), and CLAM::DescriptionDataPool::SetNumberOfContexts().
| const std::string& CLAM::DescriptionScheme::GetScopeName | ( | unsigned | scopeIndex | ) | const [inline] |
Definition at line 128 of file DescriptionScheme.hxx.
References CLAM::DescriptionScope::GetName(), and GetScope().
| void CLAM::DescriptionScheme::LoadFrom | ( | Storage & | storage | ) | [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 78 of file DescriptionScheme.cxx.
| DescriptionScope& CLAM::DescriptionScheme::SearchScopeOrAdd | ( | const std::string | scopeName | ) | [inline] |
Definition at line 92 of file DescriptionScheme.hxx.
Referenced by AddAttribute().
| void CLAM::DescriptionScheme::StoreOn | ( | Storage & | storage | ) | const [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 65 of file DescriptionScheme.cxx.
1.6.3