Om
program.hpp
Go to the documentation of this file.
1 
21 #ifndef Om_Language_Program_
22 
23  #define Om_Language_Program_ \
24  Om::Language::Program
25 
26  #include "om/giveable.hpp"
27  #include "om/language/consumer.hpp"
28  #include "om/language/producer.hpp"
29  #include "om/shareable.hpp"
30 
31 namespace Om {
32 
34  namespace Source {
35 
36  template <typename ThisItem>
37  class Source;
38 
39  }
41 
42  namespace Language {
43 
45  class Element;
47 
48  // MARK: - Om::Language::Program
49 
58  class Program:
59  public Consumer,
60  public Giveable,
61  public Producer,
62  public Shareable<> {
63 
64  public: // MARK: public (non-static)
65 
66  virtual ~Program() = 0;
67 
68  virtual void Clear() = 0;
69 
70  virtual bool Equals(Program const &) const = 0;
71 
76  virtual std::auto_ptr<
78  > GetElementRange() const = 0;
79 
80  virtual std::auto_ptr<Program> GiveProgram();
81 
82  virtual std::auto_ptr<Program> GiveProgram() const;
83 
88  virtual bool IsEmpty() const = 0;
89 
90  private: // MARK: private (non-static)
91 
92  Program & operator =(Program const &);
93 
94  };
95 
96  // MARK: - Om::Language::
97 
98  bool operator ==(
99  Program const &,
100  Program const &
101  );
102 
103  bool operator !=(
104  Program const &,
105  Program const &
106  );
107 
108  }
109 
110 }
111 
112  #include "om/language/program.cpp"
113 
114 #endif
Program & operator=(Program const &)
bool operator !=(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
virtual bool IsEmpty() const =0
The Om library.
Definition: code_point.hpp:26
virtual std::auto_ptr< Program > GiveProgram()
Returns a new Program populated with the contents of this.
The Program implementation.
Definition: program.hpp:58
Om header file.
A pointee for boost::intrusive_ptr.
Definition: shareable.hpp:37
virtual void Clear()=0
An Element taker; takes at the back.
Definition: consumer.hpp:42
Om source file.
virtual bool Equals(Program const &) const =0
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange() const =0
An object that can be copied or moved via Give.
Definition: giveable.hpp:31
bool operator==(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
Om header file.
Om header file.
Om header file.
An Element giver; gives from the front.
Definition: producer.hpp:40
Any object that items can be pulled from.
Definition: source.hpp:31