OpendTect  6.6
Public Member Functions | Public Attributes | List of all members
std::fixedstreambuf Class Reference

Adapter to use a fixed buffer as a stream. More...

Inheritance diagram for std::fixedstreambuf:
[legend]

Public Member Functions

 fixedstreambuf (char_type *b, off_type sz, bool manbuf=false)
 
 ~fixedstreambuf ()
 
virtual pos_type seekoff (off_type offs, ios_base::seekdir sd, ios_base::openmode which)
 
virtual pos_type seekpos (pos_type newpos, ios_base::openmode which)
 
virtual fixedstreambufsetbuf (char_type *b, streamsize n)
 
virtual streamsize xsgetn (char_type *s, streamsize n)
 
virtual streamsize xsputn (const char_type *s, streamsize n)
 

Public Attributes

char_type * buf_
 
bool mine_
 
off_type newpos_
 
off_type sz_
 

Detailed Description

Adapter to use a fixed buffer as a stream.

Usage like:

std::fixedstreambuf fsb( mybuf, mybufsize ); std::istream strm( &fsb );

Tested for istream with char* only.

<>

Constructor & Destructor Documentation

◆ fixedstreambuf()

std::fixedstreambuf::fixedstreambuf ( char_type *  b,
off_type  sz,
bool  manbuf = false 
)
inline

◆ ~fixedstreambuf()

std::fixedstreambuf::~fixedstreambuf ( )
inline

Member Function Documentation

◆ seekoff()

virtual pos_type std::fixedstreambuf::seekoff ( off_type  offs,
ios_base::seekdir  sd,
ios_base::openmode  which 
)
inlinevirtual

◆ seekpos()

virtual pos_type std::fixedstreambuf::seekpos ( pos_type  newpos,
ios_base::openmode  which 
)
inlinevirtual

◆ setbuf()

virtual fixedstreambuf* std::fixedstreambuf::setbuf ( char_type *  b,
streamsize  n 
)
inlinevirtual

◆ xsgetn()

virtual streamsize std::fixedstreambuf::xsgetn ( char_type *  s,
streamsize  n 
)
inlinevirtual

◆ xsputn()

virtual streamsize std::fixedstreambuf::xsputn ( const char_type *  s,
streamsize  n 
)
inlinevirtual

Member Data Documentation

◆ buf_

char_type* std::fixedstreambuf::buf_

◆ mine_

bool std::fixedstreambuf::mine_

◆ newpos_

off_type std::fixedstreambuf::newpos_

◆ sz_

off_type std::fixedstreambuf::sz_

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022