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

Source wrapper that copies all the data read from it into the sink specified on construction. More...

#include <staticlib/io/copying_source.hpp>

Public Member Functions

 copying_source (Source &&src, Sink &&sink)
 Constructor, created source wrapper will own specified source and sink.
 copying_source (const copying_source &)
 Deleted copy constructor.
copying_source & operator= (const copying_source &)
 Deleted copy assignment operator.
 copying_source (copying_source &&other) STATICLIB_NOEXCEPT
 Move constructor.
copying_source & operator= (copying_source &&other) STATICLIB_NOEXCEPT
 Move assignment operator.
std::streamsize read (span< char > span)
 Read implementation with additional copy to the sink specified on construction.
std::streamsize flush ()
 Flushes copy sink.
Source & get_source ()
 Underlying source accessor.
Sink & get_sink ()
 Underlying copy sink accessor.

Detailed Description

template<typename Source, typename Sink>
class staticlib::io::copying_source< Source, Sink >

Source wrapper that copies all the data read from it into the sink specified on construction.

Constructor & Destructor Documentation

template<typename Source , typename Sink >
staticlib::io::copying_source< Source, Sink >::copying_source ( Source &&  src,
Sink &&  sink 
)
inline

Constructor, created source wrapper will own specified source and sink.

Parameters
srcinput source
sinksink for data copy
template<typename Source , typename Sink >
staticlib::io::copying_source< Source, Sink >::copying_source ( const copying_source< Source, Sink > &  )

Deleted copy constructor.

Parameters
otherinstance
template<typename Source , typename Sink >
staticlib::io::copying_source< Source, Sink >::copying_source ( copying_source< Source, Sink > &&  other)
inline

Move constructor.

Parameters
otherother instance

Member Function Documentation

template<typename Source , typename Sink >
std::streamsize staticlib::io::copying_source< Source, Sink >::flush ( )
inline

Flushes copy sink.

Returns
number of bytes flushed
template<typename Source , typename Sink >
Sink& staticlib::io::copying_source< Source, Sink >::get_sink ( )
inline

Underlying copy sink accessor.

Returns
underlying copy sink reference
template<typename Source , typename Sink >
Source& staticlib::io::copying_source< Source, Sink >::get_source ( )
inline

Underlying source accessor.

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

Deleted copy assignment operator.

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

Move assignment operator.

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

Read implementation with additional copy to the sink specified on construction.

Parameters
spanbuffer span
Returns
number of bytes processed

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