| Puma Reference Manual | Puma: Puma::CT_ClassDef Class Reference |
#include <Puma/CTree.h>

Example:
class X : Y { int x; }
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. | |
Constructor.
| k | The keyword 'class' or 'struct'. | |
| n | The name of the class. | |
| b | The base class list. |
| 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.
| int Puma::CT_ClassDef::Sons | ( | ) | const [inline, virtual] |
| 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.
| CT_SimpleName* Puma::CT_ClassDef::Name | ( | ) | const [inline] |
Get the name of the class.
| CT_MembList* Puma::CT_ClassDef::Members | ( | ) | const [inline] |
Get the member declarations list.
| CT_BaseSpecList* Puma::CT_ClassDef::BaseClasses | ( | ) | const [inline] |
Get the base class specifiers list.
| CT_ObjDecl* Puma::CT_ClassDef::ObjDecl | ( | ) | const [inline] |
Get the object declaration node containing the class definition.
| CSemObject* Puma::CT_ClassDef::SemObject | ( | ) | const [inline, virtual] |
| void Puma::CT_ClassDef::Members | ( | CTree * | m | ) | [inline] |
Set the member declarations list.
| void Puma::CT_ClassDef::BaseClasses | ( | CTree * | bc | ) | [inline] |
Set the base class specifiers list.
| 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.