Om
evaluation.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Evaluation_
16 
17  #define Om_Language_Evaluation_ \
18  Om::Language::Evaluation
19 
21 
22 namespace Om {
23 
24  namespace Language {
25 
27  class Evaluator;
28 
29  class Translator;
31 
32  // MARK: - Om::Language::Evaluation
33 
42  class Evaluation {
43 
44  public: // MARK: public (non-static)
45 
46  virtual ~Evaluation();
47 
52  explicit Evaluation(Evaluator &);
53 
54  Translator const & GetTranslator() const;
55 
57 
62  template <typename TheOperand>
63  void TakeOperand(TheOperand &);
64 
69  template <typename TheOperation>
71  std::auto_ptr<TheOperation>
72  );
73 
78  template <typename TheOperator>
79  void TakeOperator(TheOperator &);
80 
85  template <typename TheProducer>
86  void TakeProducer(TheProducer &);
87 
92  template <typename TheProducer>
93  void TakeQuotedProducer(TheProducer &);
94 
95  private: // MARK: private (non-static)
96 
98 
99  Evaluation const & operator =(Evaluation const &);
100 
106 
112 
113  };
114 
115  }
116 
117 }
118 
119  #include "om/language/evaluation.cpp"
120 
121 #endif
The current evaluation.
Definition: evaluation.hpp:42
bool GiveTerm(Evaluator &)
void TakeOperand(TheOperand &)
Pushes the Operand onto the front of the Expression.
Translator const & GetTranslator() const
void TakeOperation(std::auto_ptr< TheOperation >)
Takes the Operation, and gives it to the Evaluator.
void TakeProducer(TheProducer &)
Pushes the produced Elements onto the front of the Expression, last first.
Evaluation(Evaluator &)
Constructs an Evaluation on the given Evaluator.
void TakeOperator(TheOperator &)
Pushes the Operator onto the front of the Expression.
Evaluation const & operator=(Evaluation const &)
Expression thisExpression
The Expression.
Definition: evaluation.hpp:105
Evaluator & thisEvaluator
The Evaluator.
Definition: evaluation.hpp:111
Evaluation(Evaluation const &)
void TakeQuotedProducer(TheProducer &)
Pushes the quoted Producer onto the front of the Expression.
A Consumer that evaluates Program instances.
Definition: evaluator.hpp:60
The Expression Program implementation.
Definition: expression.hpp:56
An Operator lookup for use by an Evaluator.
Definition: translator.hpp:62
Om source file.
Om header file.
The Om library.
Definition: code_point.hpp:26