15 #ifndef Om_Language_Operation_SwapOperation_
21 #ifndef Om_Macro_Precompilation_
23 #include "boost/test/unit_test.hpp"
33 BOOST_AUTO_TEST_SUITE(SwapOperationTest)
35 BOOST_AUTO_TEST_CASE(DefinitionTest) {
42 BOOST_AUTO_TEST_CASE(SimpleTest) {
49 BOOST_AUTO_TEST_SUITE_END()
66 Om::Language::Operation::SwapOperation
70 inline char const * Type_::GetName() {
74 template <
typename TheSwapOperation>
75 inline void Type_::GiveElements(
76 TheSwapOperation & theSwapOperation,
77 Consumer & theConsumer
79 theConsumer.TakeElement(
83 !theSwapOperation.thisOperand.IsEmpty()
85 theConsumer.TakeElement(theSwapOperation.thisOperand);
91 inline Type_::SwapOperation():
94 template <
typename TheOperand>
95 inline bool Type_::TakeOperand(
96 Evaluation & theEvaluation,
97 TheOperand & theOperand
100 !theOperand.IsEmpty()
103 this->thisOperand.IsEmpty()
105 this->thisOperand.Take(theOperand);
108 theEvaluation.TakeOperand(this->thisOperand);
109 theEvaluation.TakeOperand(theOperand);
113 template <
typename TheProducer>
114 inline bool Type_::TakeQuotedProducer(
115 Evaluation & theEvaluation,
116 TheProducer & theProducer
119 this->thisOperand.IsEmpty()
121 this->thisOperand.SetProgram(
122 theProducer.GiveProgram()
126 theEvaluation.TakeOperand(this->thisOperand);
127 theEvaluation.TakeQuotedProducer(theProducer);
#define Om_Language_Operation_SwapOperation_GetName_()