nds2-client - ClientUser  0.16.8
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
NDS::abi_0::data_stream_iterator Class Reference

A input iterator. More...

#include <nds_data_iterator.hh>

Public Member Functions

DLL_EXPORT data_stream_iterator ()
 Default constructor. More...
 
DLL_EXPORT data_stream_iterator (const data_stream_iterator &other)
 Copy constructor. More...
 
DLL_EXPORT data_stream_iterator (data_stream_iterator &&other) noexcept
 Move constructor. More...
 
DLL_EXPORT data_stream_iteratoroperator= (const data_stream_iterator &other)
 Copy operator. More...
 
DLL_EXPORT data_stream_iteratoroperator= (data_stream_iterator &&other) noexcept
 Move operator. More...
 
DLL_EXPORT reference operator* ()
 Access the data at the current location of the iteration. More...
 
DLL_EXPORT data_stream_iteratoroperator++ ()
 
DLL_EXPORT data_stream_iterator operator++ (int)
 

Detailed Description

A input iterator.

This is the iterator type used by NDS::data_iterable.

Note
Due to the demands of iterators, and to keep the number of times buffers are copied, the iteration is done in terms of std::shared_ptr<NDS::buffers_type>. As such the current value is tracked by the data_iterable object and by the iterators. It is important to complete the iteration, and allow the iterators to go out of scope (or be assigned to the sentinal/empty value) to allow the internal buffers to be released.

Constructor & Destructor Documentation

NDS::abi_0::data_stream_iterator::data_stream_iterator ( )

Default constructor.

The iterator is defined in an empty/end state.

NDS::abi_0::data_stream_iterator::data_stream_iterator ( const data_stream_iterator other)
default

Copy constructor.

A data_stream_iterator can be safely copied. When done the two iterators will refer to the same iteration and reference the same data.

Parameters
otherThe iterator to copy from.
NDS::abi_0::data_stream_iterator::data_stream_iterator ( data_stream_iterator &&  other)
defaultnoexcept

Move constructor.

A data_stream_iterator can be safely moved. When done other will be in an empty/end state.

Parameters
otherThe iterator to move from.

Member Function Documentation

data_stream_iterator::reference NDS::abi_0::data_stream_iterator::operator* ( )

Access the data at the current location of the iteration.

Returns
A reference to the current data.
Note
While the iterator is not in an end/empty state and the iteration is not complete this will never return a null shared_ptr.
data_stream_iterator & NDS::abi_0::data_stream_iterator::operator++ ( )
Note
This updates the state of the associated data_iterable object.
data_stream_iterator NDS::abi_0::data_stream_iterator::operator++ ( int  )
Note
This updates the state of the associated data_iterable object.
data_stream_iterator & NDS::abi_0::data_stream_iterator::operator= ( const data_stream_iterator other)
default

Copy operator.

A data_stream_iterator can be safely copied. When done the two iterators will refer to the same iteration and reference the same data.

Parameters
otherThe iterator to copy from.
data_stream_iterator & NDS::abi_0::data_stream_iterator::operator= ( data_stream_iterator &&  other)
defaultnoexcept

Move operator.

A data_stream_iterator can be safely moved. When done other will be in an empty/end state.

Parameters
otherThe iterator to move from.

The documentation for this class was generated from the following files: