Puma Reference Manual | Puma: Puma::CT_ArrayDeclarator Class Reference |
Tree node representing an array declarator. More...
#include <Puma/CTree.h>
Public Member Functions | |
CT_ArrayDeclarator (CTree *d, CTree *o, CTree *ad, CTree *c) | |
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 array declarator. | |
CT_ArrayDelimiter * | Delimiter () const |
Get the array delimiter. | |
void | ReplaceSon (CTree *old_son, CTree *new_son) |
Replace a son. | |
CTypeInfo * | Type () const |
Get the semantic information for the type of the declared array. | |
CExprValue * | Value () const |
Get the semantic information for the value of the declared array. | |
CSemValue * | SemValue () const |
Get the semantic information object. | |
Static Public Member Functions | |
static const char * | NodeId () |
Get the identifier for this node type. |
Tree node representing an array declarator.
Example:
a[10]
Puma::CT_ArrayDeclarator::CT_ArrayDeclarator | ( | CTree * | d, |
CTree * | o, | ||
CTree * | ad, | ||
CTree * | c | ||
) | [inline] |
Constructor.
d | The array declarator. |
o | Left bracket around the delimiter. |
ad | The array delimiter. |
c | Right bracket around the delimiter. |
CTree* Puma::CT_ArrayDeclarator::Declarator | ( | ) | const [inline, virtual] |
Get the array declarator.
Implements Puma::CT_Declarator.
CT_ArrayDelimiter* Puma::CT_ArrayDeclarator::Delimiter | ( | ) | const [inline] |
Get the array delimiter.
static const char* Puma::CT_ArrayDeclarator::NodeId | ( | ) | [static] |
Get the identifier for this node type.
Can be compared with NodeName().
const char* Puma::CT_ArrayDeclarator::NodeName | ( | ) | const [inline, virtual] |
Replace a son.
old_son | The son to replace. |
new_son | The new son. |
Reimplemented from Puma::CTree.
CSemValue* Puma::CT_ArrayDeclarator::SemValue | ( | ) | const [inline, virtual] |
Get the semantic information object.
Reimplemented from Puma::CTree.
CTree* Puma::CT_ArrayDeclarator::Son | ( | int | n | ) | const [inline, virtual] |
Get the n-th son.
n | The index of the son. |
Reimplemented from Puma::CTree.
int Puma::CT_ArrayDeclarator::Sons | ( | ) | const [inline, virtual] |
Get the number of sons.
Implements Puma::CTree.
CTypeInfo* Puma::CT_ArrayDeclarator::Type | ( | ) | const [inline, virtual] |
Get the semantic information for the type of the declared array.
Reimplemented from Puma::CTree.
CExprValue* Puma::CT_ArrayDeclarator::Value | ( | ) | const [inline, virtual] |
Get the semantic information for the value of the declared array.
Reimplemented from Puma::CTree.