Subroutine. More...
#include <rprginstsub.h>
Inheritance diagram for RPrgInstSub:
Collaboration diagram for RPrgInstSub:
Public Member Functions | |
int | Compare (const RPrgInstSub &t) const |
int | Compare (const RString &t) const |
virtual void | Execute (RInterpreter *prg, RPrgOutput *o, RContainer< RPrgVar, true, false > &args) |
RPrgInstSub (RInterpreter *prg, size_t t, const RString &sub, RContainer< RPrgVar, false, false > ¶ms) | |
virtual void | RunBlock (RInterpreter *prg, RPrgOutput *o) |
virtual | ~RPrgInstSub (void) |
Public Member Functions inherited from RPrgInstBlock | |
void | AddInst (RPrgInst *ins) |
void | AddVar (RPrgVar *var) |
void | ClearInstructions (void) |
void | DelVar (RPrgVar *var) |
size_t | GetDepth (void) const |
RPrgInstBlock (RInterpreter *prg, size_t depth) | |
virtual void | Run (RInterpreter *prg, RPrgOutput *o) |
virtual | ~RPrgInstBlock (void) |
Public Member Functions inherited from RPrgInst | |
int | Compare (const RPrgInst &t) const |
int | Compare (const RString &t) const |
size_t | GetLine (void) const |
RPrgInst (size_t line) | |
virtual | ~RPrgInst (void) |
Private Attributes | |
RString | Name |
RContainer< RString, true, false > | Params |
Additional Inherited Members | |
Protected Attributes inherited from RPrgInstBlock | |
size_t | Depth |
R::RContainer< RPrgInst, true, false > | Insts |
RPrgScope * | Vars |
Detailed Description
Subroutine.
The RPrgInstSub provides a class to define a subroutine.
Constructor & Destructor Documentation
RPrgInstSub | ( | RInterpreter * | prg, |
size_t | t, | ||
const RString & | sub, | ||
RContainer< RPrgVar, false, false > & | params | ||
) |
Construct a "for" instruction.
- Parameters
-
prg Program. t Indentation. sub Name of the subroutine params Parameters
|
virtual |
Destruct the "for" instruction.
Member Function Documentation
int Compare | ( | const RPrgInstSub & | t | ) | const |
This method compares two functions.
- See also
- R::RContainer.
int Compare | ( | const RString & | t | ) | const |
This method compares two functions.
- See also
- R::RContainer.
|
virtual |
Run the instructions in the for for the different values of its variable.
- Parameters
-
prg Program. o Output.
Reimplemented from RPrgInstBlock.
|
virtual |
Execute the function.
- Parameters
-
prg Program. o Output. args Parameters of the function.
Member Data Documentation
|
private |
Name of the subroutine.
|
private |
Parameter.