Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library Reference Guide

strstreambuf

Library:  Input/output


strstreambuf basic_streambuf

Local Index

Members

Summary

Class that associates either the input sequence or the output sequence with a tiny character array whose elements store arbitrary values

Synopsis

#include <strstream> 

namespace std {
  class strstreambuf;
}

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:


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

Interface

Member Types

char_type
int_type
ios_type
off_type
pos_type
traits_type

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 = true); 
int_type 
overflow( int_type c = traits_type::eof() ); 
int_type 
pbackfail( int_type c = traits_type::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, ios_base, basic_ios, basic_streambuf, istrstream, ostrstream, strstream

Standards Conformance

Deprecated. See ISO/IEC 14882:1998 -- International Standard for Information Systems --Programming Language C++, Annex D Compatibility features Section D.7.1



Previous fileTop of DocumentContentsIndex pageNext file