OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::CSpeechSet Class Reference

#include <SpeechSet.h>

Inheritance diagram for ot::CSpeechSet:

Inheritance graph
[legend]
Collaboration diagram for ot::CSpeechSet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

DWORD GetId ()
const char * GetName ()
bool IsCommandRegistered (const char *p_Command)
bool IsCommandIdRegistered (DWORD p_CommandId)
long GetCommandId (const char *p_Command)
bool GetCommand (DWORD p_CommandId, std::string &p_Command)
void AddCommand (const char *p_Command, DWORD p_CommandId=-1, float p_Weight=1.0f)
void RemoveCommand (const char *p_Command)
void RemoveCommand (DWORD p_CommandId)
bool IsReco ()
bool GetReco (std::string &p_Result)
void Activate ()
void Deactivate ()
bool IsActive ()

Protected Member Functions

void Initialize ()
void Destroy ()
 CSpeechSet (const char *p_Name, DWORD p_Id, CSpeechCore *p_SpeechCore)
virtual ~CSpeechSet ()
void Recognize (const char *p_String)
void RebuildRule ()

Protected Attributes

bool m_Active
std::string m_Name
DWORD m_Id
CSpeechCorem_SpeechCore
std::vector< SSpeechCommandm_RegisteredCommands
StringQueue m_RecogizedCommands

Friends

class CSpeechCore

Detailed Description

Definition at line 185 of file SpeechSet.h.


Constructor & Destructor Documentation

ot::CSpeechSet::CSpeechSet ( const char *  p_Name,
DWORD  p_Id,
CSpeechCore p_SpeechCore 
) [protected]

destroys (cleanup) all class members

Definition at line 188 of file SpeechSet.cxx.

References Initialize(), m_Id, m_Name, and m_SpeechCore.

virtual ot::CSpeechSet::~CSpeechSet (  )  [inline, protected, virtual]

Definition at line 211 of file SpeechSet.h.

References Destroy().


Member Function Documentation

void ot::CSpeechSet::Activate (  ) 

Activate this SpeechSet.

Reimplemented from ot::SpeechSetBase.

Definition at line 458 of file SpeechSet.cxx.

References Destroy(), GetName(), IsActive(), m_Active, ot::CSpeechCore::m_CmdGrammar, m_SpeechCore, and ot::CSpeechCore::StrToWide().

Referenced by RebuildRule().

void ot::CSpeechSet::AddCommand ( const char *  p_Command,
DWORD  p_CommandId = -1,
float  p_Weight = 1.0f 
) [virtual]

void ot::CSpeechSet::Deactivate (  ) 

Deactivate this SpeechSet.

Reimplemented from ot::SpeechSetBase.

Definition at line 479 of file SpeechSet.cxx.

References Destroy(), GetName(), IsActive(), m_Active, ot::CSpeechCore::m_CmdGrammar, m_SpeechCore, and ot::CSpeechCore::StrToWide().

Referenced by RebuildRule().

void ot::CSpeechSet::Destroy (  )  [protected, virtual]

initializes all class members

Reimplemented from ot::SpeechSetBase.

Definition at line 204 of file SpeechSet.cxx.

References GetName(), m_Active, ot::CSpeechCore::m_CmdGrammar, m_Id, m_SpeechCore, and ot::CSpeechCore::StrToWide().

Referenced by Activate(), AddCommand(), Deactivate(), RebuildRule(), and ~CSpeechSet().

bool ot::CSpeechSet::GetCommand ( DWORD  p_CommandId,
std::string &  p_Command 
) [virtual]

get the command from a command id

Reimplemented from ot::SpeechSetBase.

Definition at line 274 of file SpeechSet.cxx.

References m_RegisteredCommands.

long ot::CSpeechSet::GetCommandId ( const char *  p_Command  )  [virtual]

get id of the command

Reimplemented from ot::SpeechSetBase.

Definition at line 263 of file SpeechSet.cxx.

References m_RegisteredCommands.

DWORD ot::CSpeechSet::GetId (  ) 

get the id of this SpeechSet

Reimplemented from ot::SpeechSetBase.

Definition at line 225 of file SpeechSet.cxx.

References m_Id, and m_SpeechCore.

const char * ot::CSpeechSet::GetName (  )  [virtual]

get the name of this SpeechSet

Reimplemented from ot::SpeechSetBase.

Definition at line 233 of file SpeechSet.cxx.

References m_Name, and m_SpeechCore.

Referenced by Activate(), AddCommand(), Deactivate(), Destroy(), and RebuildRule().

bool ot::CSpeechSet::GetReco ( std::string &  p_Result  )  [virtual]

get the next recognized command, returns true when there is a result

Reimplemented from ot::SpeechSetBase.

Definition at line 443 of file SpeechSet.cxx.

References m_RecogizedCommands, and m_SpeechCore.

void ot::CSpeechSet::Initialize (  )  [protected, virtual]

Recognized Commands queue.

Reimplemented from ot::SpeechSetBase.

Definition at line 197 of file SpeechSet.cxx.

References m_Active, and m_SpeechCore.

Referenced by CSpeechSet().

bool ot::CSpeechSet::IsActive (  ) 

Wether this SpeechSet is active or not.

Reimplemented from ot::SpeechSetBase.

Definition at line 500 of file SpeechSet.cxx.

References m_Active.

Referenced by Activate(), Deactivate(), and RebuildRule().

bool ot::CSpeechSet::IsCommandIdRegistered ( DWORD  p_CommandId  )  [virtual]

wheter this command is register or not

Reimplemented from ot::SpeechSetBase.

Definition at line 252 of file SpeechSet.cxx.

References m_RegisteredCommands.

bool ot::CSpeechSet::IsCommandRegistered ( const char *  p_Command  )  [virtual]

wheter this command is register or not

Reimplemented from ot::SpeechSetBase.

Definition at line 241 of file SpeechSet.cxx.

References m_RegisteredCommands.

Referenced by AddCommand().

bool ot::CSpeechSet::IsReco (  ) 

wheter there is a reco command in the queue or not

Definition at line 436 of file SpeechSet.cxx.

References m_RecogizedCommands, and m_SpeechCore.

void ot::CSpeechSet::RebuildRule (  )  [protected]

void ot::CSpeechSet::Recognize ( const char *  p_String  )  [protected]

when a command of this set is recognized by SpeechCore, this method will be called

Definition at line 430 of file SpeechSet.cxx.

References m_RecogizedCommands.

Referenced by ot::CSpeechCore::ProcessRecognitionPoll().

void ot::CSpeechSet::RemoveCommand ( DWORD  p_CommandId  )  [virtual]

Remove a command from this set.

Reimplemented from ot::SpeechSetBase.

Definition at line 363 of file SpeechSet.cxx.

References m_RegisteredCommands, and RebuildRule().

void ot::CSpeechSet::RemoveCommand ( const char *  p_Command  )  [virtual]

Remove a command from this set.

Reimplemented from ot::SpeechSetBase.

Definition at line 349 of file SpeechSet.cxx.

References m_RegisteredCommands, and RebuildRule().


Friends And Related Function Documentation

friend class CSpeechCore [friend]

Definition at line 274 of file SpeechSet.h.


Member Data Documentation

bool ot::CSpeechSet::m_Active [protected]

Reimplemented from ot::SpeechSetBase.

Definition at line 189 of file SpeechSet.h.

Referenced by Activate(), Deactivate(), Destroy(), Initialize(), and IsActive().

Name of this Speech Set.

Reimplemented from ot::SpeechSetBase.

Definition at line 192 of file SpeechSet.h.

Referenced by AddCommand(), CSpeechSet(), Destroy(), GetId(), and RebuildRule().

std::string ot::CSpeechSet::m_Name [protected]

is this speech set active

Reimplemented from ot::SpeechSetBase.

Definition at line 191 of file SpeechSet.h.

Referenced by CSpeechSet(), and GetName().

All registered Commands in this SpeechSet.

Reimplemented from ot::SpeechSetBase.

Definition at line 197 of file SpeechSet.h.

Referenced by GetReco(), IsReco(), and Recognize().

Parent Speech Core object (must be always valid).

Reimplemented from ot::SpeechSetBase.

Definition at line 195 of file SpeechSet.h.

Referenced by AddCommand(), GetCommand(), GetCommandId(), IsCommandIdRegistered(), IsCommandRegistered(), RebuildRule(), and RemoveCommand().

Id of this Speech Set.

Reimplemented from ot::SpeechSetBase.

Definition at line 193 of file SpeechSet.h.

Referenced by Activate(), AddCommand(), CSpeechSet(), Deactivate(), Destroy(), GetId(), GetName(), GetReco(), Initialize(), IsReco(), and RebuildRule().


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

copyright (c) 2006 Graz University of Technology