template<typename
Impl>
class zypp::detail::SimpleStreamBuf< Impl >
Implementation of a std::streambuf that is using a std::vector<char> as buffer, relies on a Impl class that must implement the basic i/o functionality:
class streambufimpl {
public:
using error_type = my_error_type;
~streambufimpl();
bool isOpen () const;
bool canRead () const;
bool canWrite () const;
bool canSeek ( std::ios_base::seekdir way_r ) const;
std::streamsize readData ( char * buffer_r, std::streamsize maxcount_r );
bool writeData( const char * buffer_r, std::streamsize count_r );
off_t seekTo( off_t off_r, std::ios_base::seekdir way_r, std::ios_base::openmode omode_r );
off_t tell() const;
error_type error() const;
protected:
bool openImpl( const char * name_r, std::ios_base::openmode mode_r );
bool closeImpl ();
};
- Note
- Currently only supports reading or writing at the same time, but can be extended to support both
Definition at line 54 of file simplestreambuf.h.