Generic Function. More...

#include <rprgfunc.h>

Collaboration diagram for RPrgFunc:
[legend]

Public Member Functions

int Compare (const RPrgFunc &f) const
 
int Compare (const RString &f) const
 
RString GetDescription (void) const
 
RString GetName (void) const
 
 RPrgFunc (const RString &name, const RString desc=RString::Null)
 
virtual void Run (RInterpreter *prg, RPrgOutput *o, RPrgVarInst *inst, RContainer< RPrgVar, true, false > &args)=0
 
virtual ~RPrgFunc (void)
 

Protected Attributes

RString Description
 
RString Name
 

Detailed Description

Generic Function.

The RPrgFunc provides a class for a generic function.

Constructor & Destructor Documentation

RPrgFunc ( const RString name,
const RString  desc = RString::Null 
)

Construct the function.

Parameters
nameName.
descDescription.
virtual ~RPrgFunc ( void  )
virtual

Destruct the function.

Member Function Documentation

int Compare ( const RPrgFunc f) const

This methods compares two functions using their names and works like the "strcpy" function of the ANSI C/C++ library.

See also
R::RContainer.
Parameters
fPointer to a function.
Returns
int
int Compare ( const RString f) const

This methods compares the name of a function with a string and works like the "strcpy" function of the ANSI C/C++ library.

See also
R::RContainer.
Parameters
fString representing the name of the function.
Returns
int
RString GetName ( void  ) const

Get the name of the function.

RString GetDescription ( void  ) const

Get the description of the function.

virtual void Run ( RInterpreter prg,
RPrgOutput o,
RPrgVarInst inst,
RContainer< RPrgVar, true, false > &  args 
)
pure virtual

Execute the function.

Parameters
prgProgram.
oOutput.
instInstance of the class.
argsParameters of the function.

Member Data Documentation

RString Name
protected

Name of the function.

RString Description
protected

Description of the function.