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 
56  bool GiveTerm(Evaluator &);
57 
62  template <typename TheOperand>
63  void TakeOperand(TheOperand &);
64 
69  template <typename TheOperation>
70  void TakeOperation(
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 
97  Evaluation(Evaluation const &);
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
Om source file.
void TakeQuotedProducer(TheProducer &)
Pushes the quoted Producer onto the front of the Expression.
void TakeProducer(TheProducer &)
Pushes the produced Elements onto the front of the Expression, last first.
Evaluator & thisEvaluator
The Evaluator.
Definition: evaluation.hpp:111
bool GiveTerm(Evaluator &)
Evaluation const & operator=(Evaluation const &)
The Om library.
Definition: code_point.hpp:26
Om header file.
void TakeOperand(TheOperand &)
Pushes the Operand onto the front of the Expression.
Expression thisExpression
The Expression.
Definition: evaluation.hpp:105
The current evaluation.
Definition: evaluation.hpp:42
void TakeOperation(std::auto_ptr< TheOperation >)
Takes the Operation, and gives it to the Evaluator.
void TakeOperator(TheOperator &)
Pushes the Operator onto the front of the Expression.
Evaluation(Evaluator &)
Constructs an Evaluation on the given Evaluator.
An Operator lookup for use by an Evaluator.
Definition: translator.hpp:62
A Consumer that evaluates Program instances.
Definition: evaluator.hpp:58
The Expression Program implementation.
Definition: expression.hpp:55
Translator const & GetTranslator() const