Om
default_consumer.cpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_DefaultConsumer_
16 
18 
19 #else
20 
21  #include "om/language/producer.hpp"
22 
23 // MARK: - Om::Language::DefaultConsumer
24 
25  #define Template_ \
26  template < \
27  typename ThisImplementation, \
28  typename ThisInterface \
29  >
30 
31  #define Type_ \
32  Om::Language::DefaultConsumer< \
33  ThisImplementation, \
34  ThisInterface \
35  >
36 
37 // MARK: public (non-static)
38 
39 Template_
40 inline Type_::~DefaultConsumer() {}
41 
42 Template_
43 inline void Type_::TakeElement(Operand & theOperand) {
44  assert(
45  dynamic_cast<ThisImplementation *>(this)
46  );
47  static_cast<ThisImplementation &>(*this).TakeOperand(theOperand);
48 }
49 
50 Template_
51 inline void Type_::TakeElement(Operand const & theOperand) {
52  assert(
53  dynamic_cast<ThisImplementation *>(this)
54  );
55  static_cast<ThisImplementation &>(*this).TakeOperand(theOperand);
56 }
57 
58 Template_
59 inline void Type_::TakeElement(Operator & theOperator) {
60  assert(
61  dynamic_cast<ThisImplementation *>(this)
62  );
63  static_cast<ThisImplementation &>(*this).TakeOperator(theOperator);
64 }
65 
66 Template_
67 inline void Type_::TakeElement(Operator const & theOperator) {
68  assert(
69  dynamic_cast<ThisImplementation *>(this)
70  );
71  static_cast<ThisImplementation &>(*this).TakeOperator(theOperator);
72 }
73 
74 Template_
75 inline void Type_::TakeElement(Separator & theSeparator) {
76  assert(
77  dynamic_cast<ThisImplementation *>(this)
78  );
79  static_cast<ThisImplementation &>(*this).TakeSeparator(theSeparator);
80 }
81 
82 Template_
83 inline void Type_::TakeElement(Separator const & theSeparator) {
84  assert(
85  dynamic_cast<ThisImplementation *>(this)
86  );
87  static_cast<ThisImplementation &>(*this).TakeSeparator(theSeparator);
88 }
89 
90 Template_
91 inline void Type_::TakeElements(Producer & theProducer) {
92  theProducer.GiveElements(*this);
93 }
94 
95 Template_
96 inline void Type_::TakeElements(Producer const & theProducer) {
97  theProducer.GiveElements(*this);
98 }
99 
100 Template_
101 inline void Type_::TakeQuotedElements(Producer & theProducer) {
102  assert(
103  dynamic_cast<ThisImplementation *>(this)
104  );
105  static_cast<ThisImplementation &>(*this).TakeQuotedProducer(theProducer);
106 }
107 
108 Template_
109 inline void Type_::TakeQuotedElements(Producer const & theProducer) {
110  assert(
111  dynamic_cast<ThisImplementation *>(this)
112  );
113  static_cast<ThisImplementation &>(*this).TakeQuotedProducer(theProducer);
114 }
115 
116  #undef Type_
117  #undef Template_
118 
119 #endif
Om header file.
Om header file.