Om
operator_front_push_operation.cpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Operation_OperatorFrontPushOperation_
16 
18 
19  #ifdef Om_Macro_Test_
20 
21  #ifndef Om_Macro_Precompilation_
22 
23  #include "boost/test/unit_test.hpp"
24 
25  #endif
26 
27 namespace Om {
28 
29  namespace Language {
30 
31  namespace Operation {
32 
33  BOOST_AUTO_TEST_SUITE(OperatorFrontPushOperationTest)
34 
35  BOOST_AUTO_TEST_CASE(DefinitionTest) {
36  BOOST_CHECK_EQUAL(
37  "{->[operator]}",
38  System::Get().Evaluate("drop find {->[operator]} system")
39  );
40  }
41 
42  BOOST_AUTO_TEST_SUITE_END()
43 
44  }
45 
46  }
47 
48 }
49 
50  #endif
51 
52 #else
53 
55 
56 // MARK: - Om::Language::Operation::OperatorFrontPushOperation
57 
58  #define Type_ \
59  Om::Language::Operation::OperatorFrontPushOperation
60 
61 // MARK: public (static)
62 
63 inline char const * Type_::GetName() {
65 }
66 
67 inline void Type_::Give(Evaluation & theEvaluation) {
68  theEvaluation.TakeOperation(
69  std::auto_ptr<IncompleteOperation>(
70  new FrontPushOperation<
71  Operator,
72  OperatorFrontPushOperation
73  >
74  )
75  );
76 }
77 
78  #undef Type_
79 
80 #endif
static System & Get()
The Om library.
Definition: code_point.hpp:26
std::auto_ptr< TheGiveable > Give(TheGiveable &)
Calls Move on the object.
#define Om_Language_Operation_OperatorFrontPushOperation_GetName_()