Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

strstreambuf


strstreambufinherits frombasic_streambuf

Summary

Associates either the input sequence or the output sequence with a tiny character array whose elements store arbitrary values.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <strstream> 
class strstreambuf
: public basic_streambuf<char>

Description

The class strstreambuf is derived from basic_streambuf specialized on type char to associate either the input sequence or the output sequence with a tiny character array whose elements store arbitrary values.

Each object of type strstreambuf controls two character sequences:

Note: see basic_streambuf.

The two sequences are related to each other, but are manipulated separately. This means that you can read and write characters at different positions in objects of type strstreambuf without any conflict (in opposition to the basic_filebuf objects).

The underlying array has several attributes:

This is a deprecated feature and might not be available in future versions.

Interface

Types

char_type
int_type
ios_type
off_type
pos_type
traits

Constructors

explicit strstreambuf(streamsize alsize = 0); 
strstreambuf(void* (*palloc)(size_t),
             void (*pfree)(void*));
strstreambuf(char* gnext, streamsize n,
             char* pbeg = 0);
strstreambuf(signed char* gnext, streamsize n,
             signed char* pbeg = 0);
strstreambuf(unsigned char* gnext, streamsize n,
             unsigned char* pbeg = 0); 
strstreambuf(const char* gnext, streamsize n);
strstreambuf(const signed char* gnext, streamsize n);
strstreambuf(const unsigned char* gnext, streamsize n); 

Destructors

virtual ~strstreambuf();

Member Functions

void 
freeze(bool freezefl = 1); 
int_type 
overflow( int_type c = traits::eof() ); 
int_type 
pbackfail( int_type c = traits::eof() ); 
int 
pcount() const; 
pos_type 
seekoff(off_type off, ios_base::seekdir way,
        ios_base::openmode which = 
        ios_base::in | ios_base::out); 
pos_type 
seekpos(pos_type sp, ios_base::openmode which = 
        ios_base::in | ios_base::out); 
strstreambuf* 
setbuf(char* s, streamsize n); 
char* 
str();
int_type 
underflow();
streamsize 
xsputn(const char_type* s, streamsize n); 

Example

See Also

char_traits(3C++), ios_base(3C++), basic_ios(3C++), basic_streambuf(3C++), istrstream(3c++), ostrstream(3C++), strstream(3c++)

Working Paper for Draft Proposed International Standard for Information Systems--Programming Language C++, Annex D Compatibility features Section D.5

Standards Conformance

ANSI X3J16/ISO WG21 Joint C++ Committee



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998