Puma Reference Manual | Puma: Puma::CT_InitDeclarator Class Reference |
Tree node representing a declarator with initializer. More...
#include <Puma/CTree.h>
Inherits Puma::CT_Declarator, and Puma::CSemObject.
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. | |
CTree * | Son (int n) const |
Get the n-th son. | |
CTree * | Declarator () const |
Get the declarator. | |
CTree * | Extension () const |
Get the extensions list. | |
CT_ExprList * | Initializer () const |
Get the initializer. | |
CSemObject * | SemObject () const |
Get the semantic information about the declared object. | |
CT_ObjDecl * | ObjDecl () 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. |
Tree node representing a declarator with initializer.
Example:
int *i = 0;
Constructor.
d | The declarator. | |
e | Optional extension list. | |
i | The initializer. |
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] |
void Puma::CT_InitDeclarator::ObjDecl | ( | CTree * | od | ) | [inline] |
Set the object declaration node containing the declarator.
od | The object declaration node. |
CT_ObjDecl* Puma::CT_InitDeclarator::ObjDecl | ( | ) | const [inline] |
Get the object declaration node containing the declarator.
Replace a son.
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.
n | The index of the son. |
Reimplemented from Puma::CTree.
int Puma::CT_InitDeclarator::Sons | ( | ) | const [inline, virtual] |
Get the number of sons.
Implements Puma::CTree.