15 #ifndef EVT_STREAM_ADAPTER_HH
16 #define EVT_STREAM_ADAPTER_HH
26 virtual Point currentValue() = 0;
27 virtual void advance() = 0;
28 virtual bool pastEnd() = 0;
34 template <
class Po
int,
class Generator>
38 : _gen(gen), _count(count)
48 virtual Point currentValue() {
return _gen(); }
49 virtual bool pastEnd() {
return (_count <= 0); }
50 virtual void advance() { _count--; }
60 template <
class Po
int,
class Iterator,
class Predicate>
64 : _pred(pred), _it(it), _end(end)
73 virtual Point currentValue() {
78 if(_pred(value))
break;
84 virtual bool pastEnd() {
return _it == _end; }
85 virtual void advance() { _it++; }