15 #ifndef Om_Source_StreamSource_
24 template <typename ThisItem>
27 Om::Source::StreamSource<ThisItem>
32 inline Type_::StreamSource():
37 inline Type_::StreamSource(std::istream & theStream):
38 thisStreamIterator(theStream),
42 inline Type_ & Type_::operator =(StreamSource theStreamSource) {
43 this->Swap(theStreamSource);
48 inline bool Type_::operator !()
const {
49 return StreamIterator() == this->thisStreamIterator;
53 inline ThisItem
const & Type_::operator *()
const {
55 StreamIterator() != this->thisStreamIterator
57 this->thisItem = *this->thisStreamIterator;
58 return *this->thisItem;
62 inline bool Type_::Equals(StreamSource
const & theStreamSource)
const {
63 return this->thisStreamIterator == theStreamSource.thisStreamIterator;
67 inline void Type_::Pop() {
69 StreamIterator() != this->thisStreamIterator
71 ++this->thisStreamIterator;
75 inline void Type_::Swap(StreamSource & theStreamSource) {
77 this->thisStreamIterator,
78 theStreamSource.thisStreamIterator
80 this->thisItem.swap(theStreamSource.thisItem);
89 template <typename TheItem>
92 Om::Source::StreamSource<TheItem>
96 Type_
const & theFirst,
97 Type_
const & theSecond
99 return theFirst.Equals(theSecond);
104 Type_
const & theFirst,
105 Type_
const & theSecond
107 return !theFirst.Equals(theSecond);
117 theFirst.Swap(theSecond);
bool operator==(CodePointSource< TheCodeUnitIterator > const &, CodePointSource< TheCodeUnitIterator > const &)
bool operator!=(CodePointSource< TheCodeUnitIterator > const &, CodePointSource< TheCodeUnitIterator > const &)
void swap(Om::Language::Expression &, Om::Language::Expression &)