"for" Instruction. More...

#include <rprginstfor.h>

Inheritance diagram for RPrgInstFor:
[legend]
Collaboration diagram for RPrgInstFor:
[legend]

Public Member Functions

 RPrgInstFor (RInterpreter *prg, size_t t, const RString &var, RContainer< RPrgVar, false, false > &val)
 
virtual void RunBlock (RInterpreter *prg, RPrgOutput *o)
 
virtual ~RPrgInstFor (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

RContainer< RPrgVar, true, false > Values
 
RString Var
 

Additional Inherited Members

- Protected Attributes inherited from RPrgInstBlock
size_t Depth
 
R::RContainer< RPrgInst, true,
false > 
Insts
 
RPrgScopeVars
 

Detailed Description

"for" Instruction.

The RPrgInstFor provides a class for a "for" instruction.

Constructor & Destructor Documentation

RPrgInstFor ( RInterpreter prg,
size_t  t,
const RString var,
RContainer< RPrgVar, false, false > &  val 
)

Construct a "for" instruction.

Parameters
prgProgram.
tIndentation.
varName of the variable.
valValues for the variable.
virtual ~RPrgInstFor ( void  )
virtual

Destruct the "for" instruction.

Member Function Documentation

virtual void RunBlock ( RInterpreter prg,
RPrgOutput o 
)
virtual

Run the instructions in the for for the different values of its variable.

Parameters
prgProgram.
oOutput.

Reimplemented from RPrgInstBlock.

Member Data Documentation

RString Var
private

Variable defined in the for.

RContainer<RPrgVar,true,false> Values
private

Values of the variable.