Om
program.cpp
Go to the documentation of this file.
1 
15 #ifndef Om_Language_Program_
16 
17  #include "om/language/program.hpp"
18 
19 #else
20 
21 // MARK: - Om::Language::Program
22 
23  #define Type_ \
24  Om::Language::Program
25 
26 // MARK: public (non-static)
27 
28 inline Type_::~Program() {}
29 
30 inline void Type_::Clear() {
31  assert(0);
32  throw std::logic_error("Pure virtual function called.");
33 }
34 
35 inline bool Type_::Equals(Program const &) const {
36  assert(0);
37  throw std::logic_error("Pure virtual function called.");
38 }
39 
40 inline std::auto_ptr<
42 > Type_::GetElementRange() const {
43  assert(0);
44  throw std::logic_error("Pure virtual function called.");
45 }
46 
47 inline std::auto_ptr<Om::Language::Program> Type_::GiveProgram() {
48  return Give(*this);
49 }
50 
51 inline std::auto_ptr<Om::Language::Program> Type_::GiveProgram() const {
52  return Give(*this);
53 }
54 
55 inline bool Type_::IsEmpty() const {
56  assert(0);
57  throw std::logic_error("Pure virtual function called.");
58 }
59 
60 // MARK: - Om::Language::
61 
62 inline bool Om::Language::operator ==(
63  Type_ const & theFirst,
64  Type_ const & theSecond
65 ) {
66  return theFirst.Equals(theSecond);
67 }
68 
69 inline bool Om::Language::operator !=(
70  Type_ const & theFirst,
71  Type_ const & theSecond
72 ) {
73  return !theFirst.Equals(theSecond);
74 }
75 
76  #undef Type_
77 
78 #endif
Any object that items can be pulled from.
Definition: source.hpp:31
bool operator!=(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
bool operator==(DefaultAtom< TheImplementation > const &, DefaultAtom< TheImplementation > const &)
std::auto_ptr< TheGiveable > Give(TheGiveable &)
Calls Move on the object.
Om header file.