Puma Reference Manual Puma::CT_InitDeclarator Class Reference



Puma::CT_InitDeclarator Class Reference

Tree node representing a declarator with initializer. More...

#include <Puma/CTree.h>

Inheritance diagram for Puma::CT_InitDeclarator:
Inheritance graph

List of all members.

Public Member Functions

 CT_InitDeclarator (CTree *d, CTree *i=0)
 Constructor.
const char * NodeName () const
 Get the name of the node.
int Sons () const
 Get the number of sons.
CTreeSon (int n) const
 Get the n-th son.
CTreeDeclarator () const
 Get the declarator.
CT_ExprListInitializer () const
 Get the initializer.
CSemObjectSemObject () const
 Get the semantic information about the declared object.
CT_ObjDeclObjDecl () const
 Get the object declaration node containing the declarator.
void Initializer (CTree *i)
 Set the initializer.
void ObjDecl (CTree *od)
 Set the object declaration node containing the declarator.
void ReplaceSon (CTree *old_son, CTree *new_son)
 Replace a son.

Static Public Member Functions

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

Detailed Description

Tree node representing a declarator with initializer.

Example:

 int *i = 0; 

Constructor & Destructor Documentation

Puma::CT_InitDeclarator::CT_InitDeclarator ( CTree d,
CTree i = 0 
) [inline]

Constructor.

Parameters:
dThe declarator.
eOptional extension list.
iThe initializer.

Member Function Documentation

CTree* Puma::CT_InitDeclarator::Declarator ( ) const [inline, virtual]

Get the declarator.

Implements Puma::CT_Declarator.

Get the initializer.

Set the initializer.

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

Get the identifier for this node type.

Can be compared with NodeName().

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

Get the name of the node.

Can be compared with NodeId().

Implements Puma::CTree.

Get the object declaration node containing the declarator.

void Puma::CT_InitDeclarator::ObjDecl ( CTree od) [inline]

Set the object declaration node containing the declarator.

Parameters:
odThe object declaration node.
void Puma::CT_InitDeclarator::ReplaceSon ( CTree old_son,
CTree new_son 
) [inline, virtual]

Replace a son.

Parameters:
old_sonThe son to replace.
new_sonThe new son.

Reimplemented from Puma::CTree.

CSemObject* Puma::CT_InitDeclarator::SemObject ( ) const [inline, virtual]

Get the semantic information about the declared object.

Reimplemented from Puma::CTree.

CTree* Puma::CT_InitDeclarator::Son ( int  n) const [inline, virtual]

Get the n-th son.

Parameters:
nThe index of the son.
Returns:
The n-th son or NULL.

Reimplemented from Puma::CTree.

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

Get the number of sons.

Implements Puma::CTree.