![]() |
|
Declaration object for functions and tasks. More...
#include <cfunction.h>
Public Member Functions | |
| CFunction (CSymbol *symbol, Coord_t *aLoc, int automatic) | |
| Create function/task declaration object. | |
| virtual void | Dump (FILE *f) |
| Dump function info to file descriptor. | |
| virtual vector< CPortDir * > * | GetPortDirList () |
| Get array of port declarations. | |
| void | SetTrailingLabel (CSymbol *label) |
| Set trailing function label. | |
| CSymbol * | GetTrailingLabel () |
| Get trailing function label. | |
| void | SetPorts (CNode *n) |
| Set function port list. | |
| CNode * | GetPorts () |
| Get function port list. | |
| int | InlinePortDecls () |
| Get inline declaration attribute. | |
| void | InlinePortDecls (int v) |
| Set inline declaration attribute. | |
| void | SetOutput (CDecl *output) |
| Set output declaration for function. | |
| CDecl * | GetOutput () |
| Get output declaration. | |
| int | GetAutomatic () |
| Get automatic attribute. | |
Static Public Member Functions | |
| static int | Width (CSymbol *symbol, CNode *args, CBlock *block) |
| Get width of function. | |
| static CNode * | WidthExp (CSymbol *symbol, CNode *args, CBlock *block) |
| Get width of function as an expression. | |
| static int | WidthConstant (CSymbol *symbol, CNode *args, CBlock *block) |
| Determine if width of function is constant. | |
| static int | WidthVolatile (CSymbol *symbol, CNode *args, CBlock *block) |
| Determine if width of function is volatile. | |
| static int | WidthEvaluateable (CSymbol *symbol, CNode *args, CBlock *block) |
| Determine if width of function is evaluateable. | |
| static NodeType_t | Type (CSymbol *symbol, CNode *args, CBlock *block) |
| Determine if type of result of function. | |
| static int | Evaluateable (CSymbol *symbol, CNode *args, CBlock *block) |
| Determine if function can be evaluated. | |
| static void | EvalVector (CVector &v, CSymbol *symbol, CNode *args, CBlock *block) |
| Evaluate function as a vector and return result. | |
| static double | EvalReal (CSymbol *symbol, CNode *args, CBlock *block) |
| Evaluate function as a real and return result. | |
Declaration object for functions and tasks.
Create function/task declaration object.
| symbol | name of function/task. | |
| aLoc | file coordinates of declaration. | |
| automatic | non-zero if function is automatic. |
| virtual void CFunction::Dump | ( | FILE * | f | ) | [virtual] |
Evaluate function as a real and return result.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
Determine if function can be evaluated.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
| static void CFunction::EvalVector | ( | CVector & | v, | |
| CSymbol * | symbol, | |||
| CNode * | args, | |||
| CBlock * | block | |||
| ) | [static] |
Evaluate function as a vector and return result.
| v | container for result | |
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
| int CFunction::GetAutomatic | ( | ) | [inline, virtual] |
Get automatic attribute.
Reimplemented from CDecl.
| CDecl* CFunction::GetOutput | ( | ) | [inline] |
Get output declaration.
| virtual vector<CPortDir*>* CFunction::GetPortDirList | ( | ) | [virtual] |
| CNode* CFunction::GetPorts | ( | ) | [inline] |
Get function port list.
| CSymbol* CFunction::GetTrailingLabel | ( | ) | [inline] |
Get trailing function label.
| void CFunction::InlinePortDecls | ( | int | v | ) | [inline] |
Set inline declaration attribute.
| v | non-zero if port declarations are inline. |
| int CFunction::InlinePortDecls | ( | ) | [inline] |
Get inline declaration attribute.
| void CFunction::SetOutput | ( | CDecl * | output | ) | [inline] |
Set output declaration for function.
| output | output declaration. |
| void CFunction::SetPorts | ( | CNode * | n | ) | [inline] |
Set function port list.
| n | port list. |
| void CFunction::SetTrailingLabel | ( | CSymbol * | label | ) | [inline] |
Set trailing function label.
| label | trailing function label |
| static NodeType_t CFunction::Type | ( | CSymbol * | symbol, | |
| CNode * | args, | |||
| CBlock * | block | |||
| ) | [static] |
Determine if type of result of function.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
Get width of function.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
Determine if width of function is constant.
ie dependent upon constants and parameters only.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
Determine if width of function is evaluateable.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
Get width of function as an expression.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
Determine if width of function is volatile.
ie dependent upon variables and parameters.
| symbol | name of function. | |
| args | function argument list | |
| block | scope of function instantation |
1.7.1