ot::CSpeechSet Class Reference
#include <SpeechSet.h>
Inheritance diagram for ot::CSpeechSet:


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 |
| CSpeechCore * | m_SpeechCore |
| std::vector< SSpeechCommand > | m_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] |
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] |
Add a new command to this set.
Reimplemented from ot::SpeechSetBase.
Definition at line 289 of file SpeechSet.cxx.
References Destroy(), GetName(), IsCommandRegistered(), ot::CSpeechCore::m_CmdGrammar, ot::SSpeechCommand::m_Command, ot::SSpeechCommand::m_CommandId, m_Id, m_RegisteredCommands, ot::SSpeechCommand::m_Seperator, m_SpeechCore, ot::SSpeechCommand::m_Weight, and ot::CSpeechCore::StrToWide().
| 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] |
clear and rebuild the rule
Definition at line 377 of file SpeechSet.cxx.
References Activate(), Deactivate(), Destroy(), GetName(), IsActive(), ot::CSpeechCore::m_CmdGrammar, m_Id, m_RegisteredCommands, m_SpeechCore, and ot::CSpeechCore::StrToWide().
Referenced by RemoveCommand().
| 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().
DWORD ot::CSpeechSet::m_Id [protected] |
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().
StringQueue ot::CSpeechSet::m_RecogizedCommands [protected] |
All registered Commands in this SpeechSet.
Reimplemented from ot::SpeechSetBase.
Definition at line 197 of file SpeechSet.h.
Referenced by GetReco(), IsReco(), and Recognize().
std::vector<SSpeechCommand> ot::CSpeechSet::m_RegisteredCommands [protected] |
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().
CSpeechCore* ot::CSpeechSet::m_SpeechCore [protected] |
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: