Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

basic_streambuf



Summary

Abstract base class for deriving various stream buffers to facilitate control of character sequences.

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

Synopsis

#include <streambuf>
template<class charT, class traits = char_traits<charT> >
class basic_streambuf;

Description

The class template basic_streambuf<charT,traits> serves as an abstract base class for deriving various stream buffers to facilitate control of character sequences such as:

Each sequence is associated with three pointers (as described below), which, if non-null, all point into the same charT array object. The array object represents, at any moment, a segment of characters from the sequence. Operations performed on a sequence alter the values pointed to by these pointers, perform reads and writes directly to or from associated sequences, and alter "the stream position" and conversion state as needed to maintain this segment to sequence relationship. The three pointers are:

Stream buffers can impose various constraints on the sequences they control, including:

Interface

Types

char_type
int_type
off_type
pos_type
streambuf
traits_type
wstreambuf

Public Constructors

basic_streambuf();

Public Destructors

virtual ~basic_streambuf();

Public Member Functions

locale 
getloc() const; 
streamsize 
in_avail();
locale 
pubimbue(const locale& loc); 
pos_type 
pubseekoff(off_type off, ios_base::seekdir way,
           ios_base::openmode which =
           ios_base::in | ios_base::out ); 
pos_type 
pubseekpos(pos_type sp, ios_base::openmode which=
           ios_base::in | ios_base::out ); 
basic_streambuf<char_type,traits>* 
pubsetbuf(char_type* s,streamsize n); 
int 
pubsync();
int_type 
sbumpc();
int_type 
sgetc();
streamsize 
sgetn(char_type* s, streamsize n); 
int_type 
snextc();
int_type 
sputbackc(char_type c); 
int_type 
sputc(char_type c);
streamsize 
sputn(const char_type* s, streamsize n); 
int_type 
sungetc();
ios_base::openmode 
which_open_mode();

Protected Member Functions

char_type* 
eback() const; 
char_type* 
egptr() const; 
char_type* 
epptr() const; 
void 
gbump(int n); 
char_type* 
gptr() const; 
void 
imbue(const locale&);
int_type 
overflow(int_type c = traits::eof() ); 
int_type 
pbackfail(int_type c = traits::eof() ); 
char_type* 
pbase() const; 
void 
pbump(int n); 
char_type* 
pptr() 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 ); 
basic_streambuf* 
setbuf(char_type* s, streamsize n); 
void 
setg(char_type* gbeg, char_type* gnext, char_type* gend); 
void 
setp(char_type* pbeg, char_type* pend); 
int 
showmanyc();
int 
sync();
int_type 
underflow();
int_type 
uflow();
streamsize 
xsgetn(char_type* s, streamsize n); 
streamsize 
xsputn(const char_type* s, streamsize n); 

See Also

char_traits(3C++), basic_filebuf(3C++), basic_stringbuf(3C++), strstreambuf(3C++)

Working Paper for Draft Proposed International Standard for Information Systems--Programming Language C++, Section 27.5.2

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