Om
iterator_source.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Source_IteratorSource_
16 
17  #define Om_Source_IteratorSource_ \
18  Om::Source::IteratorSource
19 
21 
22 namespace Om {
23 
24  namespace Source {
25 
26  // MARK: - Om::Source::IteratorSource
27 
36  template <
37  typename ThisItem,
38  typename ThisIterator
39  >
41  public DefaultSource<
42  ThisItem,
43  IteratorSource<
44  ThisItem,
45  ThisIterator
46  >
47  > {
48 
49  public: // MARK: public (non-static)
50 
55  explicit IteratorSource(ThisIterator const theIterator);
56 
58 
59  virtual bool operator !() const;
60 
61  virtual ThisItem & operator *() const;
62 
63  using DefaultSource<
64  ThisItem,
66  ThisItem,
67  ThisIterator
68  >
69  >::Equals;
70 
71  bool Equals(IteratorSource const &) const;
72 
73  virtual void Pop();
74 
76 
77  private: // MARK: private (non-static)
78 
83  ThisIterator thisIterator;
84 
85  };
86 
87  // MARK: - Om::Source::
88 
89  template <
90  typename TheItem,
91  typename TheIterator
92  >
95  TheItem,
96  TheIterator
97  > const &,
99  TheItem,
100  TheIterator
101  > const &
102  );
103 
104  template <
105  typename TheItem,
106  typename TheIterator
107  >
110  TheItem,
111  TheIterator
112  > const &,
114  TheItem,
115  TheIterator
116  > const &
117  );
118 
119  }
120 
121 }
122 
123 namespace boost {
124 
125  // MARK: - boost::
126 
127  template <
128  typename TheItem,
129  typename TheIterator
130  >
131  void swap(
133  TheItem,
134  TheIterator
135  > &,
137  TheItem,
138  TheIterator
139  > &
140  );
141 
142 }
143 
145 
146 #endif
A partial implementation of Source.
A Source adapter for a sentinal-terminated input iterator.
ThisIterator thisIterator
The input iterator.
IteratorSource & operator=(IteratorSource)
virtual bool operator!() const
virtual ThisItem & operator*() const
virtual void Pop()
Pops the current item.
bool Equals(IteratorSource const &) const
void Swap(IteratorSource &)
IteratorSource(ThisIterator const theIterator)
Om header file.
Om source file.
bool operator==(CodePointSource< TheCodeUnitIterator > const &, CodePointSource< TheCodeUnitIterator > const &)
bool operator!=(CodePointSource< TheCodeUnitIterator > const &, CodePointSource< TheCodeUnitIterator > const &)
The Om library.
Definition: code_point.hpp:26
void swap(Om::Language::Expression &, Om::Language::Expression &)