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

Sink wrapper that holds a "std::reference_wrapper" to the underlying sink. More...

#include <staticlib/io/reference_sink.hpp>

Public Member Functions

 reference_sink (Sink &sink)
 Constructor.
 reference_sink (const reference_sink &other)
 Copy constructor.
reference_sink & operator= (const reference_sink &other)
 Copy assignment operator.
 reference_sink (reference_sink &&other) STATICLIB_NOEXCEPT
 Move constructor.
reference_sink & operator= (reference_sink &&other) STATICLIB_NOEXCEPT
 Move assignment operator.
std::streamsize write (span< const char > span)
 Write implementation delegated to the underlying sink.
std::streamsize flush ()
 Flushes destination sink.
Sink & get_sink ()
 Underlying sink accessor.

Detailed Description

template<typename Sink>
class staticlib::io::reference_sink< Sink >

Sink wrapper that holds a "std::reference_wrapper" to the underlying sink.

Constructor & Destructor Documentation

template<typename Sink >
staticlib::io::reference_sink< Sink >::reference_sink ( Sink &  sink)
inlineexplicit

Constructor.

Parameters
sinkdestination sink
template<typename Sink >
staticlib::io::reference_sink< Sink >::reference_sink ( const reference_sink< Sink > &  other)
inline

Copy constructor.

Parameters
otherinstance
template<typename Sink >
staticlib::io::reference_sink< Sink >::reference_sink ( reference_sink< Sink > &&  other)
inline

Move constructor.

Parameters
otherother instance

Member Function Documentation

template<typename Sink >
std::streamsize staticlib::io::reference_sink< Sink >::flush ( )
inline

Flushes destination sink.

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

Underlying sink accessor.

Returns
underlying sink reference
template<typename Sink >
reference_sink& staticlib::io::reference_sink< Sink >::operator= ( const reference_sink< Sink > &  other)
inline

Copy assignment operator.

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

Move assignment operator.

Parameters
otherother instance
Returns
this instance
template<typename Sink >
std::streamsize staticlib::io::reference_sink< Sink >::write ( span< const char >  span)
inline

Write implementation delegated to the underlying sink.

Parameters
spanbuffer span
Returns
number of bytes processed

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