CSDGrammar Class Reference

#include <mmf/common/speechrecognitiondatadevasr.h>

Link against: speechrecognitiondata.lib

class CSDGrammar : public CBase

Inherits from

Detailed Description

Class to encapsulate a Speaker Dependent Grammar.

A grammar consists of a list of rules.

Since
8.0

Constructor & Destructor Documentation

~CSDGrammar ( )

IMPORT_C~CSDGrammar()

Destructor.

Member Function Documentation

Add ( CSDRule & )

IMPORT_C TIntAdd(CSDRule &aRule)

Adds a rule to the grammar.

Since
8.0
Parameters
aRuleA reference to a CSDRule object.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

At ( TInt )

IMPORT_C const CSDRule &At(TIntaIndex)const

Returns a rule based at an index.

Since
8.0
Parameters
aIndexAn 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
A reference to a CSDRule object.

Count ( )

IMPORT_C TIntCount()const

Returns the number of rules in the grammar

Since
8.0
Return Value
The number of rules.

Delete ( TRuleID )

IMPORT_C voidDelete(TRuleIDaRuleID)

Deletes a rule from the grammar.

Since
8.0
Parameters
aRuleIDThe rule identifier to delete.

FindRule ( TRuleID )

IMPORT_C TIntFindRule(TRuleIDaRuleID)const

Finds a rule in the grammar based on the rule ID.

Since
8.0
Parameters
aRuleIDThe rule identifier.
Return Value
The index of the first matching rule within the grammar. Returns KErrNotFound, if a matching rule can not be found.

GrammarID ( )

IMPORT_C TGrammarIDGrammarID()const

Returns the grammar ID of the result.

Since
8.0
Return Value
The grammar identifier.

NewL ( TGrammarID )

IMPORT_C CSDGrammar *NewL(TGrammarIDaGrammarID)[static]

Instantiates an instance of CSDGrammar.

Parameters
aGrammarIDThe grammar identifier.
Return Value
A pointer to a CSDGrammar object.

NewLC ( TGrammarID )

IMPORT_C CSDGrammar *NewLC(TGrammarIDaGrammarID)[static]

Instantiates an instance of CSDGrammar and leaves a pointer on the cleanup stack.

Parameters
aGrammarIDThe grammar identifier.
Return Value
A pointer to CSDGrammar object.