Adapter to use a fixed buffer as a stream.
More...
List of all members.
Public Member Functions |
| | fixedstreambuf (char_type *b, off_type sz, bool manbuf=false) |
| | ~fixedstreambuf () |
| virtual fixedstreambuf * | setbuf (char_type *b, streamsize n) |
| 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 streamsize | xsgetn (char_type *s, streamsize n) |
| virtual streamsize | xsputn (const char_type *s, streamsize n) |
Public Attributes |
| char_type * | buf_ |
| off_type | sz_ |
| bool | mine_ |
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
| std::fixedstreambuf::fixedstreambuf |
( |
char_type * |
b, |
|
|
off_type |
sz, |
|
|
bool |
manbuf = false | |
|
) |
| | [inline] |
| std::fixedstreambuf::~fixedstreambuf |
( |
|
) |
[inline] |
Member Function Documentation
| virtual pos_type std::fixedstreambuf::seekoff |
( |
off_type |
offs, |
|
|
ios_base::seekdir |
sd, |
|
|
ios_base::openmode |
which | |
|
) |
| | [inline, virtual] |
| virtual pos_type std::fixedstreambuf::seekpos |
( |
pos_type |
newpos, |
|
|
ios_base::openmode |
which | |
|
) |
| | [inline, virtual] |
| virtual fixedstreambuf* std::fixedstreambuf::setbuf |
( |
char_type * |
b, |
|
|
streamsize |
n | |
|
) |
| | [inline, virtual] |
| virtual streamsize std::fixedstreambuf::xsgetn |
( |
char_type * |
s, |
|
|
streamsize |
n | |
|
) |
| | [inline, virtual] |
| virtual streamsize std::fixedstreambuf::xsputn |
( |
const char_type * |
s, |
|
|
streamsize |
n | |
|
) |
| | [inline, virtual] |
Member Data Documentation