Generic Instruction. More...

#include <rprginst.h>

Inheritance diagram for RPrgInst:
[legend]

Public Member Functions

int Compare (const RPrgInst &t) const
 
int Compare (const RString &t) const
 
size_t GetLine (void) const
 
 RPrgInst (size_t line)
 
virtual void Run (RInterpreter *prg, RPrgOutput *o)
 
virtual ~RPrgInst (void)
 

Private Attributes

size_t Line
 

Detailed Description

Generic Instruction.

The RPrgInst provides a class for a generic instruction.

The Compare methods needed by R::RContainer are implemented so that it is impossible to construct an ordered container of instructions.

Constructor & Destructor Documentation

RPrgInst ( size_t  line)

Construct a generic instruction.

Parameters
lineLine.
virtual ~RPrgInst ( void  )
virtual

Destruct the generic instruction.

Member Function Documentation

int Compare ( const RPrgInst t) const

This method compares two instructions.

See also
R::RContainer.
Returns
-1
int Compare ( const RString t) const

This method compares two instructions.

See also
R::RContainer.
Returns
-1
size_t GetLine ( void  ) const

Get the line number of the instruction.

virtual void Run ( RInterpreter prg,
RPrgOutput o 
)
virtual

Run the instruction.

Parameters
prgProgram.
oOutput.

Reimplemented in RPrgInstAssignVar, RPrgInstBlock, RPrgInstMethod, RPrgInstNew, RPrgInstDelete, and RPrgInstPrint.

Member Data Documentation

size_t Line
private

Line in the source file.