SXEval 1.0.3
A generic s-expression interpreter library.
Loading...
Searching...
No Matches
sxeval::Value< T > Class Template Reference

The Value class represents a constant value in the SXEval library. More...

#include <Value.hpp>

Inheritance diagram for sxeval::Value< T >:
sxeval::IOperand< T > sxeval::IInstruction< T >

Public Member Functions

 Value (T val)
 Default constructor.
 
TgetResult () override
 Get a reference to the value.
 
std::string toString () const override
 String representation of the instruction.
 
- 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.
 

Detailed Description

template<typename T>
class sxeval::Value< T >

The Value class represents a constant value in the SXEval library.

Template Parameters
TThe type of the value. The supported types are int, signed char, short int, long int, unsigned int, unsigned char, unsigned long int, float, double and long double.

Constructor & Destructor Documentation

◆ Value()

template<typename T >
sxeval::Value< T >::Value ( T  val)
inline

Default constructor.

Parameters
valThe value to store.

Member Function Documentation

◆ getResult()

template<typename T >
T & sxeval::Value< T >::getResult ( )
inlineoverridevirtual

Get a reference to the value.

Returns
A reference to the value.

Implements sxeval::IInstruction< T >.

◆ toString()

template<typename T >
std::string sxeval::Value< T >::toString ( ) const
inlineoverridevirtual

String representation of the instruction.

Returns
A string representation of the instruction.

Implements sxeval::IInstruction< T >.


The documentation for this class was generated from the following file: