Puma Reference Manual | Puma: Puma::CTypeFunction Class Reference |
Type of a function. More...
#include <Puma/CTypeInfo.h>
Public Member Functions | |
CTypeFunction (CTypeInfo *base, CTypeList *args, bool prototype) | |
Constructor. | |
~CTypeFunction () | |
Destructor. | |
CTypeList * | ArgTypes () const |
Get the argument type list. | |
CTypeInfo * | ReturnType () const |
Get the return type. | |
CFunctionInfo * | FunctionInfo () const |
Get the semantic information about the function. | |
CRecord * | Record () const |
Get the semantic information about the class if the function is a class method. | |
void | FunctionInfo (CFunctionInfo *) |
Set the semantic information about the function. | |
bool | isStatic () const |
Check if the function is declared static. | |
bool | hasPrototype () const |
Check if the function has a prototype. |
Type of a function.
Example:
void foo(int); // foo has type 'function returning void with one argument int' // type structure: // CTypeFunction args=int // CTypePrimitive void
Constructor.
Type has id CTypeInfo::TYPE_FUNCTION.
base | The base type (return type). |
args | The argument type list. |
prototype | Function has prototype. |
Puma::CTypeFunction::~CTypeFunction | ( | ) | [inline] |
Destructor.
CTypeList * Puma::CTypeFunction::ArgTypes | ( | ) | const [inline] |
Get the argument type list.
Reimplemented from Puma::CTypeInfo.
void Puma::CTypeFunction::FunctionInfo | ( | CFunctionInfo * | info | ) | [inline] |
Set the semantic information about the function.
CFunctionInfo * Puma::CTypeFunction::FunctionInfo | ( | ) | const [inline] |
Get the semantic information about the function.
Reimplemented from Puma::CTypeInfo.
bool Puma::CTypeFunction::hasPrototype | ( | ) | const [inline] |
Check if the function has a prototype.
bool Puma::CTypeFunction::isStatic | ( | ) | const |
Check if the function is declared static.
CRecord* Puma::CTypeFunction::Record | ( | ) | const |
Get the semantic information about the class if the function is a class method.
Reimplemented from Puma::CTypeInfo.
CTypeInfo * Puma::CTypeFunction::ReturnType | ( | ) | const [inline] |
Get the return type.