Generic Variable. More...
#include <rprgvar.h>
Inheritance diagram for RPrgVar:
Collaboration diagram for RPrgVar:
Public Member Functions | |
virtual void | Assign (const void *data) |
int | Compare (const RPrgVar &v) const |
int | Compare (const RString &v) const |
RString | GetName (void) const |
RString | GetType (void) const |
virtual RString | GetValue (RInterpreter *prg) |
RPrgVar (const RString &name, const RString &type) | |
RPrgVar (const RPrgVar &var) | |
virtual | ~RPrgVar (void) |
Protected Attributes | |
RString | Name |
RString | Type |
Detailed Description
Generic Variable.
The RPrgVar provides a class for a generic variable of a given type.
Constructor & Destructor Documentation
Constructor of a variable.
- Parameters
-
name Name. type Type of the variable.
|
virtual |
Destruct the variable.
Member Function Documentation
int Compare | ( | const RPrgVar & | v | ) | const |
This methods compares two variables using their names and works like the "strcpy" function of the ANSI C/C++ library.
- See also
- R::RContainer.
- Parameters
-
v Pointer to a variable.
- Returns
- int
int Compare | ( | const RString & | v | ) | const |
This methods compares the name of a variable with a string and works like the "strcpy" function of the ANSI C/C++ library.
- See also
- R::RContainer.
- Parameters
-
v String representing the name of the variable.
- Returns
- int
|
virtual |
Assign some data to the variable.
- Parameters
-
data Data.
Reimplemented in RPrgVarInst, RPrgVarString, RPrgVarRef, and RPrgVarLiteral.
|
virtual |
Get the value of the variable.
- Parameters
-
prg Program.
Reimplemented in RPrgVarInst, RPrgVarString, RPrgVarRef, and RPrgVarLiteral.
RString GetType | ( | void | ) | const |
Get the type of the variable.
RString GetName | ( | void | ) | const |
Get the name of the variable.
Member Data Documentation
|
protected |
Name of the variable.
|
protected |
Type of the variable.