CLAM::DescriptionScheme Class Reference
[Semantical Analysis]

#include <DescriptionScheme.hxx>

Inheritance diagram for CLAM::DescriptionScheme:

CLAM::Component

List of all members.


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.


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.

Constructor & Destructor Documentation

CLAM::DescriptionScheme::DescriptionScheme (  )  [inline]

Definition at line 70 of file DescriptionScheme.hxx.

CLAM::DescriptionScheme::~DescriptionScheme (  ) 

Definition at line 27 of file DescriptionScheme.cxx.


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

DescriptionScope& CLAM::DescriptionScheme::SearchScopeOrAdd ( const std::string  scopeName  )  [inline]

Definition at line 92 of file DescriptionScheme.hxx.

Referenced by AddAttribute().

unsigned CLAM::DescriptionScheme::GetScopeIndex ( const std::string &  name  )  const [inline]

const DescriptionScope& CLAM::DescriptionScheme::GetScope ( unsigned  scopeIndex  )  const [inline]

const DescriptionScope& CLAM::DescriptionScheme::GetScope ( const std::string &  name  )  const [inline]

Definition at line 118 of file DescriptionScheme.hxx.

References GetScope(), and GetScopeIndex().

unsigned CLAM::DescriptionScheme::GetNScopes (  )  const [inline]

Definition at line 123 of file DescriptionScheme.hxx.

Referenced by StoreOn().

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::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 68 of file DescriptionScheme.cxx.

References CLAM::DescriptionScope::GetAttribute(), CLAM::DescriptionScope::GetNAttributes(), GetNScopes(), GetScope(), and CLAM::Storage::Store().

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 81 of file DescriptionScheme.cxx.

References CLAM::Storage::Load().

const char* CLAM::DescriptionScheme::GetClassName (  )  const [inline, virtual]

Return the class name.

Implements CLAM::Component.

Definition at line 135 of file DescriptionScheme.hxx.


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

Generated on Tue Aug 12 22:33:47 2008 for CLAM by  doxygen 1.5.5