15 #ifndef Om_Language_DefaultProgram_
24 #ifndef Om_Macro_Precompilation_
34 typename ThisImplementation, \
35 typename ThisInterface \
39 Om::Language::DefaultProgram< \
47 inline Type_::~DefaultProgram() {}
54 inline bool Type_::Equals(Program
const & theProgram)
const {
57 std::auto_ptr<ElementSource> theRange = this->GetElementRange();
62 std::auto_ptr<ElementSource> theOtherRange = theProgram.GetElementRange();
71 bool const theRangeHasNext = *theRange;
72 bool const theOtherRangeHasNext = *theOtherRange;
77 return theRangeHasNext == theOtherRangeHasNext;
79 if (**theRange != **theOtherRange) {
88 inline void Type_::TakeElements(Producer & theProducer) {
89 this->TakeProducer<ThisImplementation>(theProducer);
93 inline void Type_::TakeElements(Producer
const & theProducer) {
94 this->TakeProducer<ThisImplementation const>(theProducer);
104 inline void Type_::TakeProducer(TheProducer & theProducer) {
106 dynamic_cast<ThisImplementation *
>(
this)
109 typeid(TheCast) ==
typeid(ThisImplementation)
112 typeid(TheCast) ==
typeid(theProducer) &&
116 static_cast<TheCast &
>(theProducer)
119 theProducer.GiveElements(*
this);
Any object that items can be pulled from.