Om
default_element.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_DefaultElement_
16 
17  #define Om_Language_DefaultElement_ \
18  Om::Language::DefaultElement
19 
21 
22 namespace Om {
23 
24  namespace Language {
25 
26  // MARK: - Om::Language::DefaultElement
27 
34  template <
35  typename ThisImplementation,
36  typename ThisInterface = Om::Language::Element
37  >
39  public DefaultProgram<
40  ThisImplementation,
41  ThisInterface
42  > {
43 
44  public: // MARK: public (non-static)
45 
46  virtual ~DefaultElement() = 0;
47 
48  using DefaultProgram<
49  ThisImplementation,
50  ThisInterface
51  >::Equals;
52 
53  virtual bool Equals(Element const &) const;
54 
59  bool Equals(ThisImplementation const &) const;
60 
61  virtual std::auto_ptr<
64 
65  virtual std::auto_ptr<
67  > GetElementRange() const;
68 
69  virtual void GiveElements(Consumer &);
70 
71  virtual void GiveElements(Consumer &) const;
72 
73  private: // MARK: private (non-static)
74 
76 
77  };
78 
79  }
80 
81 }
82 
84 
85 #endif
An Element taker; takes at the back.
Definition: consumer.hpp:42
A partial implementation of Element.
Element & operator=(Element const &)
virtual std::auto_ptr< Om::Source::Source< Element > > GetElementRange()
virtual void GiveElements(Consumer &)
virtual void GiveElements(Consumer &) const
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange() const
bool Equals(ThisImplementation const &) const
virtual bool Equals(Element const &) const
A partial implementation of Program.
A Program that contains a single elemental item (or none, when IsEmpty() returns true).
Definition: element.hpp:33
Any object that items can be pulled from.
Definition: source.hpp:31
Om source file.
Om header file.
The Om library.
Definition: code_point.hpp:26