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

#include <Maximum.hpp>

Inheritance diagram for sxeval::operations::Maximum< T >:
sxeval::AOperation< T > sxeval::IInstruction< T >

Public Member Functions

 Maximum (const std::vector< IInstruction< T > * > &args)
 
void execute () override
 Execute the operation.
 
std::string toString () const override
 String representation of the instruction.
 
- Public Member Functions inherited from sxeval::AOperation< T >
 AOperation (const std::vector< IInstruction< T > * > &args)
 Constructor that initializes the operation.
 
 AOperation (const AOperation &other)
 Copy constructor.
 
virtual ~AOperation () override=default
 Default destructor.
 
TgetResult () override
 Get the result of the operation.
 
- Public Member Functions inherited from sxeval::IInstruction< T >
virtual ~IInstruction ()=default
 Default destructor.
 

Static Public Attributes

static constexpr const charKEY = "max"
 
static constexpr const int ARITY_MIN = 2
 
static constexpr const int ARITY_MAX = AOperation<T>::UNLIMITED_ARITY
 
- Static Public Attributes inherited from sxeval::AOperation< T >
static constexpr const int UNLIMITED_ARITY = -1
 The value for an unlimited number of arguments.
 
static constexpr const charKEY = "AOperation"
 Default key for the operation.
 
static constexpr const int ARITY_MIN = 0
 Default minimum number of arguments for the operation.
 
static constexpr const int ARITY_MAX = UNLIMITED_ARITY
 Default maximum number of arguments for the operation.
 

Additional Inherited Members

- Protected Attributes inherited from sxeval::AOperation< T >
T _result
 
std::vector< std::reference_wrapper< T > > _args
 

Constructor & Destructor Documentation

◆ Maximum()

template<typename T >
sxeval::operations::Maximum< T >::Maximum ( const std::vector< IInstruction< T > * > &  args)
inline

Member Function Documentation

◆ execute()

template<typename T >
void sxeval::operations::Maximum< T >::execute ( )
overridevirtual

Execute the operation.

This method must be implemented by derived classes to perform the specific operation logic.

Implements sxeval::AOperation< T >.

◆ toString()

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

String representation of the instruction.

Returns
A string representation of the instruction.

Implements sxeval::IInstruction< T >.

Member Data Documentation

◆ ARITY_MAX

◆ ARITY_MIN

template<typename T >
constexpr const int sxeval::operations::Maximum< T >::ARITY_MIN = 2
staticconstexpr

◆ KEY

template<typename T >
constexpr const char * sxeval::operations::Maximum< T >::KEY = "max"
staticconstexpr

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