Puma Reference Manual Puma: Puma::CT_InitDeclarator Class Reference



Puma::CT_InitDeclarator Class Reference

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

#include <Puma/CTree.h>

Inherits Puma::CT_Declarator, and Puma::CSemObject.

List of all members.

Public Member Functions

 CT_InitDeclarator (CTree *d, CTree *e=0, 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.
CTreeExtension () const
 Get the extensions list.
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 Extension (CTree *e)
 Set the extensions list.
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 e = 0,
CTree i = 0 
) [inline]

Constructor.

Parameters:
d The declarator.
e Optional extension list.
i The initializer.

Member Function Documentation

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

Get the declarator.

Implements Puma::CT_Declarator.

void Puma::CT_InitDeclarator::Extension ( CTree e  )  [inline]

Set the extensions list.

CTree* Puma::CT_InitDeclarator::Extension (  )  const [inline]

Get the extensions list.

void Puma::CT_InitDeclarator::Initializer ( CTree i  )  [inline]

Set the initializer.

CT_ExprList* Puma::CT_InitDeclarator::Initializer (  )  const [inline]

Get 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.

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

Set the object declaration node containing the declarator.

Parameters:
od The object declaration node.
CT_ObjDecl* Puma::CT_InitDeclarator::ObjDecl (  )  const [inline]

Get the object declaration node containing the declarator.

void Puma::CT_InitDeclarator::ReplaceSon ( CTree old_son,
CTree new_son 
) [inline]

Replace a son.

Parameters:
old_son The son to replace.
new_son The new son.
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:
n The 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.




Puma Reference Manual. Created on 24 Nov 2009.