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 
93 
94  };
95 
96  // MARK: - Om::Language::
97 
99  Program const &,
100  Program const &
101  );
102 
104  Program const &,
105  Program const &
106  );
107 
108  }
109 
110 }
111 
112  #include "om/language/program.cpp"
113 
114 #endif
An object that can be copied or moved via Give.
Definition: giveable.hpp:33
An Element taker; takes at the back.
Definition: consumer.hpp:42
An Element giver; gives from the front.
Definition: producer.hpp:40
The Program implementation.
Definition: program.hpp:62
Program & operator=(Program const &)
virtual std::auto_ptr< Program > GiveProgram()
Returns a new Program populated with the contents of this.
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange() const =0
virtual std::auto_ptr< Program > GiveProgram() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual bool Equals(Program const &) const =0
virtual bool IsEmpty() const =0
virtual void Clear()=0
A pointee for boost::intrusive_ptr.
Definition: shareable.hpp:37
Any object that items can be pulled from.
Definition: source.hpp:31
Om header file.
Om header file.
bool operator!=(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
bool operator==(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
The Om library.
Definition: code_point.hpp:26
Om header file.
Om source file.
Om header file.