Om
consumer.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Consumer_
16 
17  #define Om_Language_Consumer_ \
18  Om::Language::Consumer
19 
20 namespace Om {
21 
22  namespace Language {
23 
25  class Null;
26 
27  class Operand;
28 
29  class Operator;
30 
31  class Producer;
32 
33  class Reader;
34 
35  class Separator;
37 
42  class Consumer {
43 
44  public: // MARK: public (non-static)
45 
46  virtual ~Consumer() = 0;
47 
48  template<
49  typename TheOperator,
50  typename TheSeparator
51  >
52  void Parse(Reader &);
53 
54  virtual void ParseElements(Reader &) = 0;
55 
56  virtual void ParseQuotedElements(Reader &) = 0;
57 
62  void TakeElement(Null &);
63 
68  void TakeElement(Null const &);
69 
78  virtual void TakeElement(Operand &) = 0;
79 
84  virtual void TakeElement(Operand const &) = 0;
85 
90  virtual void TakeElement(Operator &) = 0;
91 
96  virtual void TakeElement(Operator const &) = 0;
97 
102  virtual void TakeElement(Separator &) = 0;
103 
108  virtual void TakeElement(Separator const &) = 0;
109 
114  virtual void TakeElements(Producer &) = 0;
115 
120  virtual void TakeElements(Producer const &) = 0;
121 
126  virtual void TakeQuotedElements(Producer &) = 0;
127 
132  virtual void TakeQuotedElements(Producer const &) = 0;
133 
134  private: // MARK: private (non-static)
135 
137 
138  };
139 
140  }
141 
142 }
143 
144  #include "om/language/consumer.cpp"
145 
146 #endif
An Element taker; takes at the back.
Definition: consumer.hpp:42
virtual void TakeElement(Separator &)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void TakeElements(Producer const &)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
void TakeElement(Null &)
Takes a Null Element, which is disregarded.
Consumer & operator=(Consumer const &)
virtual void TakeElement(Operator &)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
void TakeElement(Null const &)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void TakeQuotedElements(Producer const &)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void ParseElements(Reader &)=0
virtual void TakeQuotedElements(Producer &)=0
Constructs and takes an Operand, which takes each Element from the argument Producer.
virtual void TakeElement(Operator const &)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void TakeElement(Operand &)=0
Takes a non-empty Element, which gets copied or swapped.
virtual void TakeElement(Separator const &)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
void Parse(Reader &)
virtual void ParseQuotedElements(Reader &)=0
virtual void TakeElement(Operand const &)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void TakeElements(Producer &)=0
Takes each Element of the argument.
The Null Element implementation.
Definition: null.hpp:54
The Operand implementation.
Definition: operand.hpp:56
The Operator implementation.
Definition: operator.hpp:60
An Element giver; gives from the front.
Definition: producer.hpp:40
Produces each CodePoint until the end of the Source.
Definition: reader.hpp:37
The Separator implementation.
Definition: separator.hpp:53
Om source file.
The Om library.
Definition: code_point.hpp:26