class CSDGrammar : public CBase |
Class to encapsulate a Speaker Dependent Grammar.
A grammar consists of a list of rules.
8.0
Public Member Functions | |
---|---|
~CSDGrammar() | |
IMPORT_C TInt | Add(CSDRule &) |
IMPORT_C const CSDRule & | At(TInt) |
IMPORT_C TInt | Count() |
IMPORT_C void | Delete(TRuleID) |
IMPORT_C TInt | FindRule(TRuleID) |
IMPORT_C TGrammarID | GrammarID() |
IMPORT_C CSDGrammar * | NewL(TGrammarID) |
IMPORT_C CSDGrammar * | NewLC(TGrammarID) |
Private Member Functions | |
---|---|
CSDGrammar(TGrammarID) | |
void | ConstructL() |
Private Attributes | |
---|---|
TGrammarID | iGrammarID |
RPointerArray< CSDRule > | iRuleArray |
IMPORT_C TInt | Add | ( | CSDRule & | aRule | ) |
Adds a rule to the grammar.
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
8.0
CSDRule & aRule | A reference to a CSDRule object. |
IMPORT_C const CSDRule & | At | ( | TInt | aIndex | ) | const |
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. |
IMPORT_C TInt | Count | ( | ) | const |
Returns the number of rules in the grammar
The number of rules.
8.0
IMPORT_C void | Delete | ( | TRuleID | aRuleID | ) |
Deletes a rule from the grammar.
8.0
TRuleID aRuleID | The rule identifier to delete. |
IMPORT_C TInt | FindRule | ( | TRuleID | aRuleID | ) | const |
Finds a rule in the grammar based on the rule ID.
The index of the first matching rule within the grammar. Returns KErrNotFound, if a matching rule can not be found.
8.0
TRuleID aRuleID | The rule identifier. |
IMPORT_C TGrammarID | GrammarID | ( | ) | const |
Returns the grammar ID of the result.
The grammar identifier.
8.0
IMPORT_C CSDGrammar * | NewL | ( | TGrammarID | aGrammarID | ) | [static] |
Instantiates an instance of CSDGrammar.
A pointer to a CSDGrammar object.
TGrammarID aGrammarID | The grammar identifier. |
IMPORT_C CSDGrammar * | NewLC | ( | TGrammarID | aGrammarID | ) | [static] |
Instantiates an instance of CSDGrammar and leaves a pointer on the cleanup stack.
A pointer to CSDGrammar object.
TGrammarID aGrammarID | The grammar identifier. |