staticlib_io  1.2.11
 All Classes Namespaces Files Functions Variables
Public Member Functions | List of all members
staticlib::io::counting_source< Source > Class Template Reference

Source wrapper that counts the number of bytes read through it. More...

#include <staticlib/io/counting_source.hpp>

Public Member Functions

 counting_source (Source &&src)
 Constructor, created source wrapper will own specified source.
 counting_source (const counting_source &)
 Deleted copy constructor.
counting_source & operator= (const counting_source &)
 Deleted copy assignment operator.
 counting_source (counting_source &&other) STATICLIB_NOEXCEPT
 Move constructor.
counting_source & operator= (counting_source &&other) STATICLIB_NOEXCEPT
 Move assignment operator.
std::streamsize read (span< char > span)
 Counting read implementation.
size_t get_count ()
 Returns number of bytes read through this instance.
Source & get_source ()
 Underlying source accessor.

Detailed Description

template<typename Source>
class staticlib::io::counting_source< Source >

Source wrapper that counts the number of bytes read through it.

Constructor & Destructor Documentation

template<typename Source >
staticlib::io::counting_source< Source >::counting_source ( Source &&  src)
inlineexplicit

Constructor, created source wrapper will own specified source.

Parameters
srcinput source
template<typename Source >
staticlib::io::counting_source< Source >::counting_source ( const counting_source< Source > &  )

Deleted copy constructor.

Parameters
otherinstance
template<typename Source >
staticlib::io::counting_source< Source >::counting_source ( counting_source< Source > &&  other)
inline

Move constructor.

Parameters
otherother instance

Member Function Documentation

template<typename Source >
size_t staticlib::io::counting_source< Source >::get_count ( )
inline

Returns number of bytes read through this instance.

Returns
number of bytes read through this instance
template<typename Source >
Source& staticlib::io::counting_source< Source >::get_source ( )
inline

Underlying source accessor.

Returns
underlying source reference
template<typename Source >
counting_source& staticlib::io::counting_source< Source >::operator= ( const counting_source< Source > &  )

Deleted copy assignment operator.

Parameters
otherinstance
Returns
this instance
template<typename Source >
counting_source& staticlib::io::counting_source< Source >::operator= ( counting_source< Source > &&  other)
inline

Move assignment operator.

Parameters
otherother instance
Returns
this instance
template<typename Source >
std::streamsize staticlib::io::counting_source< Source >::read ( span< char >  span)
inline

Counting read implementation.

Parameters
spanbuffer span
Returns
number of bytes processed

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