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

Public Member Functions

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

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from Puma::TokenProvider
typedef TokenStore::Iterator State
 Read position. More...
 
- 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 Tue Oct 28 2014.