Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

basic_stringstream


inherits frombasic_ostream basic_stringstreaminherits frombasic_iostream inherits frombasic_iosinherits fromios_base inherits frombasic_istream

Summary

Supports writing and reading objects of class basic_string<charT,traits,Alocator> to/from an array in memory.

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

Synopsis

#include <sstream> 
template<class charT, class traits = char_traits<charT>,
         class Allocator = allocator<charT> >
class basic_stringstream
: public basic_iostream<charT, traits>

Description

The template class basic_stringstream<charT,traits,Allocator> reads and writes to an array in memory. It supports writing and reading objects of class basic_string<charT,traits,Alocator>. It uses a basic_stringbuf object to control the associated storage. It inherits from basic_iostream and therefore can use all the formatted and unformatted output and input functions.

Interface

Types

char_type
int_type
ios_type
off_type
pos_type
sb_type
string_type
stringstream
traits_type
wstringstream

Constructors

explicit basic_stringstream(ios_base::openmode which =
                   ios_base::in | ios_base::out); 
explicit basic_stringstream(const string_type& str,
                   ios_base::openmode which =
                   ios_base::in | ios_base::out); 

Destructors

virtual ~basic_stringstream();

Member Functions

basic_stringbuf<charT,traits,Allocator>* 
rdbuf() const; 
string_type 
str() const; 
void 
str(const string_type& str); 

Example

See Also

char_traits(3C++), ios_base(3C++), basic_ios(3C++), basic_stringbuf(3C++), basic_string(3C++), basic_istringstream(3C++), basic_ostringstream(3c++)

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

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