Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: speechrecognitiondatadevasr.h
Link against: speechrecognitiondata.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class CSDGrammar

class CSDGrammar : public CBase;

Description

Class to encapsulate a Speaker Dependent Grammar.

A grammar consists of a list of rules.

Derivation

Members

Defined in CSDGrammar:
Add(), At(), Count(), Delete(), FindRule(), GrammarID(), NewL(), NewLC(), ~CSDGrammar()

Inherited from CBase:
Extension_(), operator new()


Construction and destruction


~CSDGrammar()

IMPORT_C ~CSDGrammar();

Description

Destructor.


NewL()

static IMPORT_C CSDGrammar *NewL(TGrammarID aGrammarID);

Description

Instantiates an instance of CSDGrammar.

Parameters

TGrammarID aGrammarID

The grammar identifier.

Return value

CSDGrammar *

A pointer to a CSDGrammar object.


NewLC()

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

CSDGrammar *

A pointer to CSDGrammar object.

[Top]


Member functions


GrammarID()

IMPORT_C TGrammarID GrammarID() const;

Description

Returns the grammar ID of the result.

Return value

TGrammarID

The grammar identifier.


Add()

IMPORT_C TInt Add(CSDRule &aRule);

Description

Adds a rule to the grammar.

Parameters

CSDRule &aRule

A reference to a CSDRule object.

Return value

TInt

An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.


Delete()

IMPORT_C void Delete(TRuleID aRuleID);

Description

Deletes a rule from the grammar.

Parameters

TRuleID aRuleID

The rule identifier to delete.


At()

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

const CSDRule &

A reference to a CSDRule object.


FindRule()

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.


Count()

IMPORT_C TInt Count() const;

Description

Returns the number of rules in the grammar

Return value

TInt

The number of rules.