Om
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Om::Language::Evaluation Class Reference

The current evaluation. More...

#include "evaluation.hpp"

+ Collaboration diagram for Om::Language::Evaluation:

Public Member Functions

virtual ~Evaluation ()
 
 Evaluation (Evaluator &)
 Constructs an Evaluation on the given Evaluator. More...
 
Translator const & GetTranslator () const
 
bool GiveTerm (Evaluator &)
 
template<typename TheOperand >
void TakeOperand (TheOperand &)
 Pushes the Operand onto the front of the Expression. More...
 
template<typename TheOperation >
void TakeOperation (std::auto_ptr< TheOperation >)
 Takes the Operation, and gives it to the Evaluator. More...
 
template<typename TheOperator >
void TakeOperator (TheOperator &)
 Pushes the Operator onto the front of the Expression. More...
 
template<typename TheProducer >
void TakeProducer (TheProducer &)
 Pushes the produced Elements onto the front of the Expression, last first. More...
 
template<typename TheProducer >
void TakeQuotedProducer (TheProducer &)
 Pushes the quoted Producer onto the front of the Expression. More...
 

Private Member Functions

 Evaluation (Evaluation const &)
 
Evaluation const & operator= (Evaluation const &)
 

Private Attributes

Expression thisExpression
 The Expression. More...
 
EvaluatorthisEvaluator
 The Evaluator. More...
 

Detailed Description

An Evaluation contains an Expression and a reference to an Evaluator, and prevents a more recursive evaluation algorithm that would overflow the stack in the event of a recursive Om program.

Each Element that it takes is pushed onto a stack, resulting in a LIFO-ordered application of each Element to the Evaluator.

Definition at line 42 of file evaluation.hpp.

Constructor & Destructor Documentation

virtual Om::Language::Evaluation::~Evaluation ( )
virtual
Om::Language::Evaluation::Evaluation ( Evaluator )
explicit
Om::Language::Evaluation::Evaluation ( Evaluation const &  )
private

Member Function Documentation

Translator const& Om::Language::Evaluation::GetTranslator ( ) const
bool Om::Language::Evaluation::GiveTerm ( Evaluator )
template<typename TheOperand >
void Om::Language::Evaluation::TakeOperand ( TheOperand &  )
template<typename TheOperation >
void Om::Language::Evaluation::TakeOperation ( std::auto_ptr< TheOperation >  )
template<typename TheOperator >
void Om::Language::Evaluation::TakeOperator ( TheOperator &  )
template<typename TheProducer >
void Om::Language::Evaluation::TakeProducer ( TheProducer &  )
template<typename TheProducer >
void Om::Language::Evaluation::TakeQuotedProducer ( TheProducer &  )
Evaluation const& Om::Language::Evaluation::operator= ( Evaluation const &  )
private

Member Data Documentation

Expression Om::Language::Evaluation::thisExpression
private

Definition at line 105 of file evaluation.hpp.

Evaluator& Om::Language::Evaluation::thisEvaluator
private

Definition at line 111 of file evaluation.hpp.


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