|
SXEval 1.0.3
A generic s-expression interpreter library.
|
The EncapsulatedVariable class represents a variable that can be encapsulated in an unaccessible Object. More...
#include <EncapsulatedVariable.hpp>
Public Member Functions | |
| EncapsulatedVariable (const std::function< T(void)> get, const std::string &name) | |
| Default constructor. | |
| T & | getResult () override |
| Get a reference to the variable. | |
| void | retrieve () |
| Retrieve the value of the encapsulated variable. | |
| std::string | toString () const override |
| String representation of the encapsulated variable. | |
Public Member Functions inherited from sxeval::IOperand< T > | |
| virtual | ~IOperand () override=default |
| Default destructor. | |
Public Member Functions inherited from sxeval::IInstruction< T > | |
| virtual | ~IInstruction ()=default |
| Default destructor. | |
The EncapsulatedVariable class represents a variable that can be encapsulated in an unaccessible Object.
| T | The type of the variable. The supported types are int, signed char, short int, long int, unsigned int, unsigned char, unsigned long int, float, double and long double. |
|
inline |
Default constructor.
| get | The function to retrieve the value of the variable. |
| name | The name of the variable. |
|
inlineoverridevirtual |
Get a reference to the variable.
Implements sxeval::IInstruction< T >.
|
inline |
Retrieve the value of the encapsulated variable.
|
inlineoverridevirtual |
String representation of the encapsulated variable.
Implements sxeval::IInstruction< T >.