staticlib_io  1.2.11
 All Classes Namespaces Files Functions Variables
Public Member Functions | List of all members
staticlib::io::string_sink Class Reference

Sink implementation that writes data to the underlying "std::string". More...

#include <staticlib/io/string_sink.hpp>

Public Member Functions

 string_sink ()
 Constructor.
 string_sink (std::string &&str)
 Constructor.
 string_sink (const string_sink &)
 Deleted copy constructor.
string_sink & operator= (const string_sink &)
 Deleted copy assignment operator.
 string_sink (string_sink &&other) STATICLIB_NOEXCEPT
 Move constructor.
string_sink & operator= (string_sink &&other) STATICLIB_NOEXCEPT
 Move assignment operator.
std::streamsize write (span< const char > span)
 Buffered write implementation.
std::string & get_string ()
 Underlying string accessor.
std::streamsize flush ()
 No-op flush implementation.

Detailed Description

Sink implementation that writes data to the underlying "std::string".

Constructor & Destructor Documentation

staticlib::io::string_sink::string_sink ( )
inline

Constructor.

staticlib::io::string_sink::string_sink ( std::string &&  str)
inlineexplicit

Constructor.

Parameters
strstring to write to
staticlib::io::string_sink::string_sink ( const string_sink &  )

Deleted copy constructor.

Parameters
otherinstance
staticlib::io::string_sink::string_sink ( string_sink &&  other)
inline

Move constructor.

Parameters
otherother instance

Member Function Documentation

std::streamsize staticlib::io::string_sink::flush ( )
inline

No-op flush implementation.

Returns
0
std::string& staticlib::io::string_sink::get_string ( )
inline

Underlying string accessor.

Returns
underlying string
string_sink& staticlib::io::string_sink::operator= ( const string_sink &  )

Deleted copy assignment operator.

Parameters
otherinstance
Returns
this instance
string_sink& staticlib::io::string_sink::operator= ( string_sink &&  other)
inline

Move assignment operator.

Parameters
otherother instance
Returns
this instance
std::streamsize staticlib::io::string_sink::write ( span< const char >  span)
inline

Buffered write implementation.

Parameters
spanbuffer span
Returns
number of bytes processed

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