Generic Class. More...

#include <rprgclass.h>

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

Public Member Functions

int Compare (const RPrgClass &c) const
 
int Compare (const RString &c) const
 
RPrgFuncGetMethod (const RString &method) const
 
RCursor< RPrgFuncGetMethods (void) const
 
RString GetName (void) const
 
virtual RPrgVarNewVar (RInterpreter *prg, RPrgOutput *o, const RString &name, RContainer< RPrgVar, true, false > &params)=0
 
 RPrgClass (const RString &name)
 
virtual ~RPrgClass (void)
 

Protected Attributes

R::RContainer< RPrgFunc, true,
true > 
Methods
 
RString Name
 
R::RContainer< RPrgVar, true,
true > 
Vars
 

Detailed Description

Generic Class.

The RPrgClass provides a class for a generic class.

Constructor & Destructor Documentation

RPrgClass ( const RString name)

Construct the class.

Parameters
nameName.
virtual ~RPrgClass ( void  )
virtual

Destruct the class.

Member Function Documentation

int Compare ( const RPrgClass c) const

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

See also
R::RContainer.
Parameters
cPointer to a class.
Returns
int
int Compare ( const RString c) const

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

See also
R::RContainer.
Parameters
cString representing the name of a class.
Returns
int
RPrgFunc* GetMethod ( const RString method) const

Find a method.

Parameters
methodName of the method.
Returns
Pointer to RPrgInst.
RString GetName ( void  ) const

Get the name of the function.

RCursor<RPrgFunc> GetMethods ( void  ) const

Get a cursor over the methods defined in the class.

virtual RPrgVar* NewVar ( RInterpreter prg,
RPrgOutput o,
const RString name,
RContainer< RPrgVar, true, false > &  params 
)
pure virtual

Create a variable.

Parameters
prgProgram asking the creation.
oOutput.
nameName of the variable to create.
paramsParameters of the constructor.
Returns

Implemented in RPrgStringClass.

Member Data Documentation

RString Name
protected

Name of the class.

R::RContainer<RPrgVar,true,true> Vars
protected

Variables defined in the class.

R::RContainer<RPrgFunc,true,true> Methods
protected

Methods defined in the class.