Support Class Library
A set of tools providing classes and utility
Stream.h
Go to the documentation of this file.
1 #pragma once
3 
6 #include <scl/macros.h>
7 
8 namespace scl{
9  namespace stream{
14  template <class T>
15  class Stream{
16  static_assert(!META::is_void<T>(), "Cannot make a Stream<void>");
17  public:
23 
29 
35 
40  explicit Stream(iterator_type* iterator) : iterator{iterator}{
41  }
42 
47 // iterator_type& it() const{ return *(this->iterator); }
48  it_t it() const{ return this->iterator; }
49 
50  protected:
56  };
57  }
58 }
it_t iterator
The iterator used to get values.
Definition: Stream.h:55
typename payload_type::value_type value_type
Type alias for the data type manipulated.
Global namespace of the SCL.
Definition: alias.hpp:3
it_t it() const
Get a reference to the underlying iterator.
Definition: Stream.h:48
Stream(iterator_type *iterator)
Construct a stream a raw pointer to an iterator.
Definition: Stream.h:40
std::shared_ptr< parent_iterator_type > parent_type
A class for iterators that start a stream chain.
typename iterator_type::value_type value_type
value_type The value type used by this stream
Definition: Stream.h:34
typename details::iterator::OpStreamIterator< T >::parent_type it_t
The type of pointer to the iterator used by this stream.
Definition: Stream.h:28
Class representing a stream of data.
Definition: Stream.h:15