15 #ifndef Om_Language_Operation_TranslateOperation_
23 #ifndef Om_Macro_Precompilation_
25 #include "boost/utility/in_place_factory.hpp"
32 template <typename ThisImplementation>
35 Om::Language::Operation::TranslateOperation<ThisImplementation>
40 template <
typename TheTranslateOperation>
41 inline void Type_::GiveElements(
42 TheTranslateOperation & theTranslateOperation,
43 Consumer & theConsumer
46 typeid(TheTranslateOperation) ==
typeid(ThisImplementation)
48 theConsumer.TakeElement(
49 ThisImplementation::GetOperator()
51 if (theTranslateOperation.thisLexicon) {
52 theConsumer.TakeQuotedElements(*theTranslateOperation.thisLexicon);
59 inline Type_::~TranslateOperation() {}
62 template <
typename TheOperand>
63 inline bool Type_::TakeOperand(
64 Evaluation & theEvaluation,
65 TheOperand & theOperand
70 return this->TakeQuotedProducer(
72 *theOperand.GetProgram()
77 template <
typename TheProducer>
78 inline bool Type_::TakeQuotedProducer(
79 Evaluation & theEvaluation,
80 TheProducer & theProducer
82 if (this->thisLexicon) {
85 Expression theExpression;
87 dynamic_cast<ThisImplementation *
>(
this)
89 static_cast<ThisImplementation &
>(*this).Translate(
90 theEvaluation.GetTranslator(),
94 theEvaluation.TakeQuotedProducer(theExpression);
96 theEvaluation.TakeQuotedProducer(*this->thisLexicon);
99 this->thisLexicon = boost::in_place();
100 assert(this->thisLexicon);
101 this->thisLexicon->TakeElements(theProducer);
108 inline Type_::TranslateOperation():