Om
iterator_sink.hpp
Go to the documentation of this file.
1 
15 #ifndef Om_Sink_IteratorSink_
16 
17  #define Om_Sink_IteratorSink_ \
18  Om::Sink::IteratorSink
19 
20  #include "om/sink/default_sink.hpp"
21 
22 namespace Om {
23 
24  namespace Sink {
25 
26  // MARK: - Om::Sink::IteratorSink
27 
32  template <
33  typename ThisItem,
34  typename ThisIterator
35  >
36  class IteratorSink:
37  public DefaultSink<
38  ThisItem,
39  IteratorSink<
40  ThisItem,
41  ThisIterator
42  >
43  > {
44 
45  public: // MARK: public (non-static)
46 
47  explicit IteratorSink(ThisIterator);
48 
50 
51  virtual void Push(ThisItem &);
52 
53  void Swap(IteratorSink &);
54 
55  private: // MARK: private (non-static)
56 
61  ThisIterator thisIterator;
62 
63  };
64 
65  }
66 
67 }
68 
69 namespace boost {
70 
71  // MARK: - boost::
72 
73  template <
74  typename TheItem,
75  typename TheIterator
76  >
77  void swap(
79  TheItem,
80  TheIterator
81  > &,
83  TheItem,
84  TheIterator
85  > &
86  );
87 
88 }
89 
90  #include "om/sink/iterator_sink.cpp"
91 
92 #endif
A partial Sink implementation.
A Sink adapter for an output iterator.
IteratorSink & operator=(IteratorSink)
ThisIterator thisIterator
The output iterator.
void Swap(IteratorSink &)
IteratorSink(ThisIterator)
virtual void Push(ThisItem &)
Pushes an item.
Om header file.
Om source file.
The Om library.
Definition: code_point.hpp:26
void swap(Om::Language::Expression &, Om::Language::Expression &)