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

Sink wrapper that implements no-op flush. More...

#include <staticlib/io/flushable_sink.hpp>

Public Member Functions

 flushable_sink (NonFlushableSink &&sink)
 Constructor, created sink wrapper will own specified sink.
 flushable_sink (const flushable_sink &)
 Deleted copy constructor.
flushable_sink & operator= (const flushable_sink &)
 Deleted copy assignment operator.
 flushable_sink (flushable_sink &&other) STATICLIB_NOEXCEPT
 Move constructor.
flushable_sink & operator= (flushable_sink &&other) STATICLIB_NOEXCEPT
 Move assignment operator.
std::streamsize write (span< const char > span)
 Write implementation delegated to the underlying sink.
std::streamsize flush ()
 No-op flush implementation.
NonFlushableSink & get_sink ()
 Underlying sink accessor.

Detailed Description

template<typename NonFlushableSink>
class staticlib::io::flushable_sink< NonFlushableSink >

Sink wrapper that implements no-op flush.

Constructor & Destructor Documentation

template<typename NonFlushableSink >
staticlib::io::flushable_sink< NonFlushableSink >::flushable_sink ( NonFlushableSink &&  sink)
inlineexplicit

Constructor, created sink wrapper will own specified sink.

Parameters
sinkdestination sink
template<typename NonFlushableSink >
staticlib::io::flushable_sink< NonFlushableSink >::flushable_sink ( const flushable_sink< NonFlushableSink > &  )

Deleted copy constructor.

Parameters
otherinstance
template<typename NonFlushableSink >
staticlib::io::flushable_sink< NonFlushableSink >::flushable_sink ( flushable_sink< NonFlushableSink > &&  other)
inline

Move constructor.

Parameters
otherother instance

Member Function Documentation

template<typename NonFlushableSink >
std::streamsize staticlib::io::flushable_sink< NonFlushableSink >::flush ( )
inline

No-op flush implementation.

Returns
0
template<typename NonFlushableSink >
NonFlushableSink& staticlib::io::flushable_sink< NonFlushableSink >::get_sink ( )
inline

Underlying sink accessor.

Returns
underlying sink reference
template<typename NonFlushableSink >
flushable_sink& staticlib::io::flushable_sink< NonFlushableSink >::operator= ( const flushable_sink< NonFlushableSink > &  )

Deleted copy assignment operator.

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

Move assignment operator.

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