Puma Reference Manual | Puma: Puma::CT_FctDef Class Reference |
#include <Puma/CTree.h>
Example:
int mul(int x, int y) { return x*y; }
Public Member Functions | |
CT_FctDef (CTree *dss, CTree *d, CTree *t, CTree *ci, CTree *as, CTree *b, CTree *hs) | |
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_DeclSpecSeq * | DeclSpecs () const |
Get the declaration specifier sequence. | |
CTree * | Declarator () const |
Get the function declarator. | |
CT_Token * | TryKey () const |
Get the 'try' keyword of the function try-block. | |
CTree * | CtorInit () const |
Get the constructor initializer list. | |
CT_ArgDeclSeq * | ArgDeclSeq () const |
Get the K&R argument declaration sequence. | |
CT_CmpdStmt * | Body () const |
Get the function body. | |
CT_HandlerSeq * | Handlers () const |
Get the exception handler sequence of a function try-block. | |
CSemObject * | SemObject () const |
Get the semantic information about the function. | |
void | CtorInit (CTree *i) |
Set the constructor initializer list. | |
void | Body (CTree *b) |
Set the function body. | |
void | FctTryBlock (CTree *t, CTree *c, CTree *b, CTree *h) |
Set the function try-block. | |
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. |
Puma::CT_FctDef::CT_FctDef | ( | CTree * | dss, | |
CTree * | d, | |||
CTree * | t, | |||
CTree * | ci, | |||
CTree * | as, | |||
CTree * | b, | |||
CTree * | hs | |||
) | [inline] |
Constructor.
dss | The declaration specifier sequence. | |
d | The function declarator. | |
t | Optional keyword 'try' for a function try-block. | |
ci | Optional constructor initializer list. | |
as | Optional K&R argument declaration list. | |
b | The function body. | |
hs | Exception handler sequence for a function try-block. |
static const char* Puma::CT_FctDef::NodeId | ( | ) | [static] |
Get the identifier for this node type.
Can be compared with NodeName().
const char* Puma::CT_FctDef::NodeName | ( | ) | const [inline, virtual] |
int Puma::CT_FctDef::Sons | ( | ) | const [inline, virtual] |
CTree* Puma::CT_FctDef::Son | ( | int | n | ) | const [inline, virtual] |
Get the n-th son.
n | The index of the son. |
Reimplemented from Puma::CTree.
CT_DeclSpecSeq* Puma::CT_FctDef::DeclSpecs | ( | ) | const [inline] |
Get the declaration specifier sequence.
CTree* Puma::CT_FctDef::Declarator | ( | ) | const [inline] |
Get the function declarator.
CT_Token* Puma::CT_FctDef::TryKey | ( | ) | const [inline] |
Get the 'try' keyword of the function try-block.
CTree* Puma::CT_FctDef::CtorInit | ( | ) | const [inline] |
Get the constructor initializer list.
CT_ArgDeclSeq* Puma::CT_FctDef::ArgDeclSeq | ( | ) | const [inline] |
Get the K&R argument declaration sequence.
CT_CmpdStmt* Puma::CT_FctDef::Body | ( | ) | const [inline] |
Get the function body.
CT_HandlerSeq* Puma::CT_FctDef::Handlers | ( | ) | const [inline] |
Get the exception handler sequence of a function try-block.
CSemObject* Puma::CT_FctDef::SemObject | ( | ) | const [inline, virtual] |
void Puma::CT_FctDef::CtorInit | ( | CTree * | i | ) | [inline] |
Set the constructor initializer list.
i | The initializer list. |
void Puma::CT_FctDef::Body | ( | CTree * | b | ) | [inline] |
Set the function body.
b | The function body. |
Set the function try-block.
t | The keyword 'try'. | |
c | Optional constructor initializer list. | |
b | The function body. | |
h | The exception handler sequence. |
Replace a son.
old_son | The son to replace. | |
new_son | The new son. |
Reimplemented from Puma::CTree.