Puma Reference Manual Puma: Puma::CT_Token Class Reference



Puma::CT_Token Class Reference

Tree node representing a single token in the source code. More...

#include <Puma/CTree.h>

Inheritance diagram for Puma::CT_Token:
Inheritance graph

List of all members.

Public Member Functions

 CT_Token (Token *token, unsigned long int number=0)
 Constructor.
const char * NodeName () const
 Get the name of the node.
int Sons () const
 Get the number of sons.
Tokentoken () const
 Get the represented token.
Tokenend_token () const
 Get the represented token.
CT_Tokentoken_node () const
 Get this.
CT_Tokenend_token_node () const
 Get this.
void Number (unsigned long int number)
 Set the token number.
unsigned long int Number () const
 Get the token number.
void * operator new (size_t)
 Own new operator reusing memory.
void operator delete (void *)
 Own delete operator.

Static Public Member Functions

static const char * NodeId ()
 Get the identifier for this node type.

Detailed Description

Tree node representing a single token in the source code.


Constructor & Destructor Documentation

Puma::CT_Token::CT_Token ( Token token,
unsigned long int  number = 0 
) [inline]

Constructor.

Parameters:
tokenThe represented token.
numberThe token number (a consecutive number).

Member Function Documentation

Token* Puma::CT_Token::end_token ( ) const [inline, virtual]

Get the represented token.

Reimplemented from Puma::CTree.

CT_Token* Puma::CT_Token::end_token_node ( ) const [inline, virtual]

Get this.

Reimplemented from Puma::CTree.

static const char* Puma::CT_Token::NodeId ( ) [static]

Get the identifier for this node type.

Can be compared with NodeName().

const char* Puma::CT_Token::NodeName ( ) const [inline, virtual]

Get the name of the node.

Can be compared with NodeId().

Implements Puma::CTree.

unsigned long int Puma::CT_Token::Number ( ) const [inline]

Get the token number.

Can be used to indentify this token.

void Puma::CT_Token::Number ( unsigned long int  number) [inline]

Set the token number.

Parameters:
numberThe token number.
void Puma::CT_Token::operator delete ( void *  )

Own delete operator.

void* Puma::CT_Token::operator new ( size_t  )

Own new operator reusing memory.

int Puma::CT_Token::Sons ( ) const [inline, virtual]

Get the number of sons.

Implements Puma::CTree.

Token* Puma::CT_Token::token ( ) const [inline, virtual]

Get the represented token.

Reimplemented from Puma::CTree.

CT_Token* Puma::CT_Token::token_node ( ) const [inline, virtual]

Get this.

Reimplemented from Puma::CTree.