# PVXMLGrammar Class Reference

`#include <vxml.h>`

Inheritance diagram for PVXMLGrammar:

List of all members.

## Public Types

| Idle
| Not yet started.
| Started
| Grammar awaiting input.
| Filled
| got something that matched the grammar
| NoInput
| timeout or still waiting to match
| NoMatch
| recognized something but didn't match the grammar
| Help
| help keyword
enum | GrammarState { Idle, Started, Filled, NoInput, NoMatch, Help }

## Public Member Functions

| PVXMLGrammar (PVXMLSession &session, PXMLElement &field)
virtual void | OnUserInput (const char ch)=0
virtual void | Start ()
virtual bool | Process ()
GrammarState | GetState () const
void | SetTimeout (const PTimeInterval &timeout)

## Protected Member Functions

| PDECLARE_NOTIFIER (PTimer, PVXMLGrammar, OnTimeout)

## Protected Attributes

PVXMLSession & | m_session
PXMLElement & | m_field
PString | m_value
GrammarState | m_state
PTimeInterval | m_timeout
PTimer | m_timer
PMutex | m_mutex

## Member Enumeration Documentation

enum PVXMLGrammar::GrammarState

Enumerator:

  Idle | Not yet started.
  Started | Grammar awaiting input.
  Filled | got something that matched the grammar
  NoInput | timeout or still waiting to match
  NoMatch | recognized something but didn't match the grammar
  Help | help keyword

## Constructor & Destructor Documentation

PVXMLGrammar::PVXMLGrammar | ( | PVXMLSession & | session,
|  | PXMLElement & | field |
| ) |  |  |

## Member Function Documentation

GrammarState PVXMLGrammar::GetState | ( |  | ) | const`[inline]`

virtual void PVXMLGrammar::OnUserInput | ( | const char | ch | ) | `[pure virtual]`

Implemented in PVXMLMenuGrammar, and PVXMLDigitsGrammar.

PVXMLGrammar::PDECLARE_NOTIFIER | ( | PTimer | ,
|  | PVXMLGrammar | ,
|  | OnTimeout |  |
| ) |  |  | `[protected]`

virtual bool PVXMLGrammar::Process | ( |  | ) | `[virtual]`

Reimplemented in PVXMLMenuGrammar.

void PVXMLGrammar::SetTimeout | ( | const PTimeInterval & | timeout | ) |

virtual void PVXMLGrammar::Start | ( |  | ) | `[virtual]`

## Member Data Documentation

PXMLElement& PVXMLGrammar::m_field `[protected]`

PMutex PVXMLGrammar::m_mutex `[protected]`

PVXMLSession& PVXMLGrammar::m_session `[protected]`

GrammarState PVXMLGrammar::m_state `[protected]`

PTimeInterval PVXMLGrammar::m_timeout `[protected]`

PTimer PVXMLGrammar::m_timer `[protected]`

PString PVXMLGrammar::m_value `[protected]`

The documentation for this class was generated from the following file:

- vxml.h