Puma Reference Manual Puma: Puma::CT_ArrayDeclarator Class Reference



Puma::CT_ArrayDeclarator Class Reference

#include <Puma/CTree.h>

Inheritance diagram for Puma::CT_ArrayDeclarator:

Inheritance graph

List of all members.


Detailed Description

Tree node representing an array declarator.

Example:

 a[10] 

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.

Constructor & Destructor Documentation

Puma::CT_ArrayDeclarator::CT_ArrayDeclarator ( CTree *  d,
CTree *  o,
CTree *  ad,
CTree *  c 
) [inline]

Constructor.

Parameters:
d The array declarator.
o Left bracket around the delimiter.
ad The array delimiter.
c Right bracket around the delimiter.


Member Function Documentation

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]

Get the name of the node.

Can be compared with NodeId().

Implements Puma::CTree.

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

Get the number of sons.

Implements Puma::CTree.

CTree* Puma::CT_ArrayDeclarator::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.

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.

void Puma::CT_ArrayDeclarator::ReplaceSon ( CTree *  old_son,
CTree *  new_son 
) [inline, virtual]

Replace a son.

Parameters:
old_son The son to replace.
new_son The new son.

Reimplemented from 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.

CSemValue* Puma::CT_ArrayDeclarator::SemValue (  )  const [inline, virtual]

Get the semantic information object.

Reimplemented from Puma::CTree.




Puma Reference Manual. Created on 11 Jul 2008.