Location:
speechrecognitiondatadevasr.h
Link against: speechrecognitiondata.lib
class CSDGrammar : public CBase;
Description
Class to encapsulate a Speaker Dependent Grammar.
A grammar consists of a list of rules.
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CSDGrammar
- Class to encapsulate a Speaker Dependent Grammar
Members
Defined in CSDGrammar
:
Add()
, At()
, Count()
, Delete()
, FindRule()
, GrammarID()
, NewL()
, NewLC()
, ~CSDGrammar()
Inherited from CBase
:
Extension_()
,
operator new()
static IMPORT_C CSDGrammar *NewL(TGrammarID aGrammarID);
Description
Instantiates an instance of CSDGrammar.
Parameters
TGrammarID aGrammarID |
The grammar identifier.
|
|
Return value
static IMPORT_C CSDGrammar *NewLC(TGrammarID aGrammarID);
Description
Instantiates an instance of CSDGrammar and leaves a pointer on the cleanup stack.
Parameters
TGrammarID aGrammarID |
The grammar identifier.
|
|
Return value
IMPORT_C TGrammarID GrammarID() const;
Description
Returns the grammar ID of the result.
Return value
TGrammarID
|
The grammar identifier.
|
|
IMPORT_C TInt Add(CSDRule &aRule);
Description
Adds a rule to the grammar.
Parameters
Return value
TInt
|
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error
codes.
|
|
IMPORT_C void Delete(TRuleID aRuleID);
Description
Deletes a rule from the grammar.
Parameters
TRuleID aRuleID |
The rule identifier to delete.
|
|
IMPORT_C const CSDRule &At(TInt aIndex) const;
Description
Returns a rule based at an index.
Parameters
TInt aIndex |
An index value. The value must not be negative and must not be greater than the number of rules currently in the grammar,
otherwise the function will panic.
|
|
Return value
IMPORT_C TInt FindRule(TRuleID aRuleID) const;
Description
Finds a rule in the grammar based on the rule ID.
Parameters
TRuleID aRuleID |
The rule identifier.
|
|
Return value
TInt
|
The index of the first matching rule within the grammar. Returns KErrNotFound, if a matching rule can not be found.
|
|
IMPORT_C TInt Count() const;
Description
Returns the number of rules in the grammar
Return value
TInt
|
The number of rules.
|
|