Om
pair.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Pair_
16 
17  #define Om_Language_Pair_ \
18  Om::Language::Pair
19 
20  #include "om/language/operator.hpp"
21 
22 namespace Om {
23 
24  namespace Language {
25 
26  // MARK: - Om::Language::Pair
27 
32  class Pair {
33 
34  public: // MARK: public (static)
35 
36  static Pair const & GetEmpty();
37 
38  public: // MARK: public (non-static)
39 
40  virtual ~Pair();
41 
42  Pair();
43 
44  void ClearOperand();
45 
46  Operand const & GetOperand() const;
47 
48  Operator const & GetOperator() const;
49 
51 
52  void GiveElements(Consumer &) const;
53 
54  bool IsEmpty() const;
55 
56  template <typename TheOperand>
57  void TakeOperand(TheOperand &);
58 
63  template <typename TheOperator>
64  void TakeOperator(TheOperator &);
65 
66  template <typename TheProducer>
67  void TakeQuotedProducer(TheProducer &);
68 
69  private: // MARK: private (static)
70 
71  template <typename ThePair>
72  static void GiveElements(
73  ThePair &,
74  Consumer &
75  );
76 
77  private: // MARK: private (non-static)
78 
80 
82 
83  };
84 
85  }
86 
87 }
88 
89  #include "om/language/pair.cpp"
90 
91 #endif
An Element taker; takes at the back.
Definition: consumer.hpp:42
The Operand implementation.
Definition: operand.hpp:56
The Operator implementation.
Definition: operator.hpp:60
An Operator and an Operand.
Definition: pair.hpp:32
Operand thisOperand
Definition: pair.hpp:81
bool IsEmpty() const
void TakeOperator(TheOperator &)
Replaces the Operator.
static void GiveElements(ThePair &, Consumer &)
void TakeOperand(TheOperand &)
static Pair const & GetEmpty()
Operator thisOperator
Definition: pair.hpp:79
Operator const & GetOperator() const
Operand const & GetOperand() const
void GiveElements(Consumer &) const
void GiveElements(Consumer &)
void TakeQuotedProducer(TheProducer &)
The Om library.
Definition: code_point.hpp:26
Om header file.
Om source file.