Puma Reference Manual | Puma: Puma::CT_ClassDef Class Reference |
Tree node representing a class definition. More...
#include <Puma/CTree.h>
Public Member Functions | |
CT_ClassDef (CTree *k, CTree *n, CTree *b=(CTree *) 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. | |
CT_SimpleName * | Name () const |
Get the name of the class. | |
CT_MembList * | Members () const |
Get the member declarations list. | |
CT_BaseSpecList * | BaseClasses () const |
Get the base class specifiers list. | |
CT_ObjDecl * | ObjDecl () const |
Get the object declaration node containing the class definition. | |
CSemObject * | SemObject () const |
Get the semantic information about the declared class. | |
void | Members (CTree *m) |
Set the member declarations list. | |
void | BaseClasses (CTree *bc) |
Set the base class specifiers list. | |
void | ObjDecl (CTree *od) |
Set the object declaration containing the class definition. | |
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 class definition.
Example:
class X : Y { int x; }
Constructor.
k | The keyword 'class' or 'struct'. |
n | The name of the class. |
b | The base class list. |
CT_BaseSpecList* Puma::CT_ClassDef::BaseClasses | ( | ) | const [inline] |
Get the base class specifiers list.
void Puma::CT_ClassDef::BaseClasses | ( | CTree * | bc | ) | [inline] |
Set the base class specifiers list.
void Puma::CT_ClassDef::Members | ( | CTree * | m | ) | [inline] |
Set the member declarations list.
CT_MembList* Puma::CT_ClassDef::Members | ( | ) | const [inline] |
Get the member declarations list.
CT_SimpleName* Puma::CT_ClassDef::Name | ( | ) | const [inline] |
Get the name of the class.
static const char* Puma::CT_ClassDef::NodeId | ( | ) | [static] |
Get the identifier for this node type.
Can be compared with NodeName().
Reimplemented in Puma::CT_UnionDef.
const char* Puma::CT_ClassDef::NodeName | ( | ) | const [inline, virtual] |
Get the name of the node.
Can be compared with NodeId().
Implements Puma::CTree.
Reimplemented in Puma::CT_UnionDef.
CT_ObjDecl* Puma::CT_ClassDef::ObjDecl | ( | ) | const [inline] |
Get the object declaration node containing the class definition.
void Puma::CT_ClassDef::ObjDecl | ( | CTree * | od | ) | [inline] |
Set the object declaration containing the class definition.
Replace a son.
old_son | The son to replace. |
new_son | The new son. |
Reimplemented from Puma::CTree.
CSemObject* Puma::CT_ClassDef::SemObject | ( | ) | const [inline, virtual] |
Get the semantic information about the declared class.
Reimplemented from Puma::CTree.
CTree* Puma::CT_ClassDef::Son | ( | int | n | ) | const [inline, virtual] |
Get the n-th son.
n | The index of the son. |
Reimplemented from Puma::CTree.
int Puma::CT_ClassDef::Sons | ( | ) | const [inline, virtual] |
Get the number of sons.
Implements Puma::CTree.