Puma Reference Manual Puma::InstantiationTokenProvider Class Reference



Puma::InstantiationTokenProvider Class Reference

Provides tokens from a syntax tree. More...

#include <Puma/InstantiationTokenProvider.h>

Inheritance diagram for Puma::InstantiationTokenProvider:
Inheritance graph

List of all members.

Public Member Functions

 InstantiationTokenProvider (InstantiationTokenSource &s)
 Constructor.
CTree * node () const
 Get current token node.
- Public Member Functions inherited from Puma::TokenProvider
 TokenProvider (PumaTokenSource &s)
 Constructor.
virtual ~TokenProvider ()
 Destructor.
void init ()
 Initialize the token provider by reading the first token.
PumaTokenSource & source () const
 Get the token source.
Token * next ()
 Read the next token from the token source.
Token * current () const
 Get the last token read from the token source.
State get_state ()
 Get the current read position.
void set_state (State restored_pos)
 Restore the read position.

Protected Member Functions

virtual void * read ()
 Read next token.
virtual Token * token () const
 Get the current token.

Additional Inherited Members

- Public Types inherited from Puma::TokenProvider
typedef TokenStore::Iterator State
 Read position.
- Protected Types inherited from Puma::TokenProvider
typedef BCList< void *, 8192 > TokenStore
- Protected Attributes inherited from Puma::TokenProvider
PumaTokenSource & _source
TokenStore _tokens
TokenStore::Iterator _read_pos

Detailed Description

Provides tokens from a syntax tree.


Constructor & Destructor Documentation

Puma::InstantiationTokenProvider::InstantiationTokenProvider ( InstantiationTokenSource &  s)
inline

Constructor.

Parameters:
sThe token source from which to read the tokens.

Member Function Documentation

CTree* Puma::InstantiationTokenProvider::node ( ) const

Get current token node.

virtual void* Puma::InstantiationTokenProvider::read ( )
protectedvirtual

Read next token.

Reimplemented from Puma::TokenProvider.

virtual Token* Puma::InstantiationTokenProvider::token ( ) const
protectedvirtual

Get the current token.

Reimplemented from Puma::TokenProvider.




Puma Reference Manual. Created on Sun Jul 1 2012.