CSDGrammar Class Reference

#include <mmf/common/speechrecognitiondatadevasr.h>

Link against: speechrecognitiondata.lib

class CSDGrammar : public CBase

Inherits from

  • CSDGrammar

    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
    ParameterDescription
    aRuleA reference to a CSDRule object.

    Returns: 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
    ParameterDescription
    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.

    Returns: A reference to a CSDRule object.

    Count ( )

    IMPORT_C TIntCount()const

    Returns the number of rules in the grammar

    Since
    8.0

    Returns: The number of rules.

    Delete ( TRuleID )

    IMPORT_C voidDelete(TRuleIDaRuleID)

    Deletes a rule from the grammar.

    Since
    8.0
    ParameterDescription
    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
    ParameterDescription
    aRuleIDThe rule identifier.

    Returns: 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

    Returns: The grammar identifier.

    NewL ( TGrammarID )

    IMPORT_C CSDGrammar *NewL(TGrammarIDaGrammarID)[static]

    Instantiates an instance of CSDGrammar.

    ParameterDescription
    aGrammarIDThe grammar identifier.

    Returns: 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.

    ParameterDescription
    aGrammarIDThe grammar identifier.

    Returns: A pointer to CSDGrammar object.