Om
element.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Element_
16 
17  #define Om_Language_Element_ \
18  Om::Language::Element
19 
20  #include "om/language/program.hpp"
21 
22 namespace Om {
23 
24  namespace Language {
25 
26  // MARK: - Om::Language::Element
27 
32  class Element:
33  public Program {
34 
35  public: // MARK: public (non-static)
36 
37  virtual ~Element() = 0;
38 
43  virtual Program & operator *() = 0;
44 
48  virtual Program const & operator *() const = 0;
49 
51 
52  Program const * operator ->() const;
53 
54  using Program::Equals;
55 
56  virtual bool Equals(Element const &) const = 0;
57 
59 
64  virtual std::auto_ptr<
66  > GetElementRange() = 0;
67 
72  virtual bool Merge(Operator &);
73 
77  virtual bool Merge(Operator const &);
78 
82  virtual bool Merge(Separator &);
83 
87  virtual bool Merge(Separator const &);
88 
89  private: // MARK: private (non-static)
90 
92 
93  };
94 
95  // MARK: - Om::Language::
96 
98  Element const &,
99  Element const &
100  );
101 
103  Element const &,
104  Element const &
105  );
106 
114 
115  }
116 
117 }
118 
119  #include "om/language/element.cpp"
120 
121 #endif
A Program that contains a single elemental item (or none, when IsEmpty() returns true).
Definition: element.hpp:33
Element & operator=(Element const &)
Program * operator->()
virtual bool Merge(Operator &)
virtual bool Merge(Operator const &)
virtual bool Equals(Element const &) const =0
virtual std::auto_ptr< Om::Source::Source< Element > > GetElementRange()=0
virtual Program & operator*()=0
virtual bool Merge(Separator const &)
virtual bool Merge(Separator &)
The Operator implementation.
Definition: operator.hpp:60
The Program implementation.
Definition: program.hpp:62
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange() const =0
virtual bool Equals(Program const &) const =0
The Separator implementation.
Definition: separator.hpp:53
Any object that items can be pulled from.
Definition: source.hpp:31
Om source file.
bool operator!=(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
Atom * new_clone(Atom const &)
bool operator==(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
The Om library.
Definition: code_point.hpp:26
Om header file.