5 #ifndef NDS2_CLIENT_NDS_DATA_ITERATOR_HH
6 #define NDS2_CLIENT_NDS_DATA_ITERATOR_HH
11 #include "nds_buffer.hh"
12 #include "nds_channel.hh"
18 class iterate_handler;
21 inline namespace abi_0
39 using gps_second_type = NDS::buffer::gps_second_type;
40 typedef long stride_type;
41 gps_second_type start;
83 : start( 0 ), stop( 0 ), stride( requested_stride )
100 gps_second_type requested_stop )
101 : start( requested_start ), stop( requested_stop ), stride( 0 )
122 gps_second_type requested_stop,
123 stride_type requested_stride )
124 : start( requested_start ), stop( requested_stop ),
125 stride( requested_stride )
147 typedef std::shared_ptr< buffers_type > value_type;
148 typedef value_type& reference;
149 typedef value_type* pointer;
150 typedef std::size_t difference_type;
151 typedef std::input_iterator_tag iterator_category;
183 DLL_EXPORT ~data_stream_iterator( );
194 DLL_EXPORT data_stream_iterator&
195 operator=(
const data_stream_iterator& other );
203 DLL_EXPORT data_stream_iterator&
204 operator=( data_stream_iterator&& other ) noexcept;
207 operator==(
const data_stream_iterator& other )
const;
210 operator!=(
const data_stream_iterator& other )
const;
225 DLL_EXPORT data_stream_iterator&
operator++( );
230 DLL_EXPORT data_stream_iterator
operator++(
int );
233 std::shared_ptr< detail::iterate_handler > p_;
272 std::shared_ptr< NDS::detail::iterate_handler > handler );
302 DLL_EXPORT data_iterable& operator=( const data_iterable& other );
310 DLL_EXPORT data_iterable&
311 operator=( data_iterable&& other ) noexcept;
343 DLL_EXPORT
void abort( );
346 std::shared_ptr< NDS::detail::iterate_handler > p_;
351 #endif // NDS2_CLIENT_NDS_DATA_ITERATOR_HH
The data_iterable manages streaming data from an NDS::connection.
Definition: nds_data_iterator.hh:262
DLL_EXPORT data_stream_iterator()
Default constructor.
Definition: nds_data_iterator.cc:13
A input iterator.
Definition: nds_data_iterator.hh:144
static const stride_type FAST_STRIDE
a data stride of FAST_STRIDE requests sub-second data if possible. On systems that do not support sub...
Definition: nds_data_iterator.hh:51
request_period(stride_type requested_stride)
Represent a request for an endless amount of live data with a given stride.
Definition: nds_data_iterator.hh:82
request_period()
Default constructor, represent a request for an endless amount of live data.
Definition: nds_data_iterator.hh:68
This represents a [start, stop) time with an optional data stride.
Definition: nds_data_iterator.hh:37
request_period(gps_second_type requested_start, gps_second_type requested_stop)
Represent a request for bounded data [start, stop)
Definition: nds_data_iterator.hh:99
DLL_EXPORT iterator_type end()
Return a end/sentinal iterator.
Definition: nds_data_iterator.cc:97
data_stream_iterator iterator_type
NDS::data_stream_iterator is the iterator type for this object.
Definition: nds_data_iterator.hh:269
DLL_EXPORT reference operator*()
Access the data at the current location of the iteration.
Definition: nds_data_iterator.cc:52
DLL_EXPORT iterator_type begin()
Return the current start tof the iteration.
Definition: nds_data_iterator.cc:91
request_period(gps_second_type requested_start, gps_second_type requested_stop, stride_type requested_stride)
Represent a request for bounded data [start, stop) with a stride.
Definition: nds_data_iterator.hh:121
DLL_EXPORT void abort()
Abort an on-going iteration and close the underlying connection.
Definition: nds_data_iterator.cc:103
static const stride_type AUTO_STRIDE
a data stride of AUTO_STRIDE requests that the NDS systems determine the stride of data...
Definition: nds_data_iterator.hh:61
DLL_EXPORT data_stream_iterator & operator=(const data_stream_iterator &other)
Copy operator.
DLL_EXPORT data_stream_iterator & operator++()
Definition: nds_data_iterator.cc:57