CLAM::DescriptionScheme Class Reference
[Semantical Analysis]

The description scheme defines the set of attributes (Attribute) to be used for feature extraction systems. More...

#include <DescriptionScheme.hxx>

List of all members.

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.
DescriptionScopeSearchScopeOrAdd (const std::string scopeName)
unsigned GetScopeIndex (const std::string &name) const
const DescriptionScopeGetScope (unsigned scopeIndex) const
const DescriptionScopeGetScope (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.

Detailed Description

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.

See also:
Semantical Analysis module, that describes the full usage of those classes.
DescriptionDataPool class, which instanciates a DescriptionScheme

Definition at line 61 of file DescriptionScheme.hxx.


Constructor & Destructor Documentation

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().


Member Function Documentation

template<typename DataType >
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.

Precondition:
The name is alphanumeric
The scope has no other attribute with the same name
Parameters:
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]
unsigned CLAM::DescriptionScheme::GetScopeIndex ( const std::string &  name  )  const [inline]
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.

Parameters:
storage The given storage where the subitem will be loaded from
See also:
Storage

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.

Parameters:
storage The given storage where the subitem will be stored
See also:
Storage

Implements CLAM::Component.

Definition at line 65 of file DescriptionScheme.cxx.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3