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

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

#include <staticlib/io/shared_sink.hpp>

Public Member Functions

 shared_sink (std::shared_ptr< Sink > sink)
 Constructor.
 shared_sink (const shared_sink &other)
 Copy constructor.
shared_sink & operator= (const shared_sink &other)
 Copy assignment operator.
 shared_sink (shared_sink &&other) STATICLIB_NOEXCEPT
 Move constructor.
shared_sink & operator= (shared_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::shared_sink< Sink >

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

Constructor & Destructor Documentation

template<typename Sink >
staticlib::io::shared_sink< Sink >::shared_sink ( std::shared_ptr< Sink >  sink)
inline

Constructor.

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

Copy constructor.

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

Move constructor.

Parameters
otherother instance

Member Function Documentation

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

Flushes destination sink.

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

Underlying sink accessor.

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

Copy assignment operator.

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

Move assignment operator.

Parameters
otherother instance
Returns
this instance
template<typename Sink >
std::streamsize staticlib::io::shared_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: