12#ifndef ZYPP_CORE_BASE_SIMPLESTREAMBUF_H_DEFINED
13#define ZYPP_CORE_BASE_SIMPLESTREAMBUF_H_DEFINED
53 template<
typename Impl>
67 if ( this->canRead() ) {
80 if ( !this->isOpen() )
83 if ( this->canWrite() )
86 if ( !this->closeImpl() )
98 if ( traits_type::eq_int_type(
res, traits_type::eof() ) )
106 if ( this->canWrite() ) {
107 if ( ! traits_type::eq_int_type(
c, traits_type::eof() ) )
109 *
pptr() = traits_type::to_char_type(
c );
117 ret = traits_type::not_eof(
c );
127 if ( this->canRead() )
130 return traits_type::to_int_type( *
gptr() );
136 ret = traits_type::to_int_type( *
gptr() );
155 if ( !this->canSeek(
way_r) )
158 if ( this->isOpen() ) {
159 if (
openMode == std::ios_base::out ) {
161 if ( !this->canWrite() ||
sync() != 0 )
166 }
else if (
openMode == std::ios_base::in ) {
167 if ( !this->canRead() )
174 if (
way_r == std::ios_base::end ) {
185 if (
way_r == std::ios_base::cur ) {
187 way_r = std::ios_base::beg;
191 if (
way_r == std::ios_base::beg ) {
RepoManager implementation.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
~SimpleStreamBuf() override
SimpleStreamBuf * close()
pos_type seekoff(off_type off_r, std::ios_base::seekdir way_r, std::ios_base::openmode openMode) override
pos_type seekpos(pos_type pos_r, std::ios_base::openmode openMode) override
int_type underflow() override
int_type overflow(int_type c=traits_type::eof()) override
std::vector< char > buffer_type
SimpleStreamBuf(size_t bufsize_r=512)
SimpleStreamBuf * open(const char *name_r, std::ios_base::openmode mode_r=std::ios_base::in)
Easy-to use interface to the ZYPP dependency resolver.