CSDGrammar Class Reference

class CSDGrammar : public CBase

Class to encapsulate a Speaker Dependent Grammar.

A grammar consists of a list of rules.

8.0

Inherits from

Constructor & Destructor Documentation

CSDGrammar(TGrammarID)

CSDGrammar(TGrammarIDaGrammarID)[private]

Parameters

TGrammarID aGrammarID

~CSDGrammar()

IMPORT_C~CSDGrammar()

Destructor.

Member Functions Documentation

Add(CSDRule &)

IMPORT_C TIntAdd(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

Parameters

CSDRule & aRuleA reference to a CSDRule object.

At(TInt)

IMPORT_C const CSDRule &At(TIntaIndex)const

Returns a rule based at an index.

A reference to a CSDRule object.

8.0

Parameters

TInt 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.

ConstructL()

voidConstructL()[private]

Count()

IMPORT_C TIntCount()const

Returns the number of rules in the grammar

The number of rules.

8.0

Delete(TRuleID)

IMPORT_C voidDelete(TRuleIDaRuleID)

Deletes a rule from the grammar.

8.0

Parameters

TRuleID aRuleIDThe rule identifier to delete.

FindRule(TRuleID)

IMPORT_C TIntFindRule(TRuleIDaRuleID)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

Parameters

TRuleID aRuleIDThe rule identifier.

GrammarID()

IMPORT_C TGrammarIDGrammarID()const

Returns the grammar ID of the result.

The grammar identifier.

8.0

NewL(TGrammarID)

IMPORT_C CSDGrammar *NewL(TGrammarIDaGrammarID)[static]

Instantiates an instance of CSDGrammar.

A pointer to a CSDGrammar object.

Parameters

TGrammarID aGrammarIDThe grammar identifier.

NewLC(TGrammarID)

IMPORT_C CSDGrammar *NewLC(TGrammarIDaGrammarID)[static]

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

A pointer to CSDGrammar object.

Parameters

TGrammarID aGrammarIDThe grammar identifier.

Member Data Documentation

TGrammarID iGrammarID

TGrammarID iGrammarID[private]

RPointerArray< CSDRule > iRuleArray

RPointerArray< CSDRule >iRuleArray[private]