Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

basic_stringstream

Module:  Standard C++ Library   Library:  Input/output


basic_ostream basic_stringstreambasic_iostream basic_iosios_base basic_istream

Local Index

Members

Non-Members

Summary

Class that supports writing and reading objects of specializations of the class template basic_string to and from an array in memory

Synopsis

#include <sstream> 

namespace std {
  template<class charT, class traits = char_traits<charT>,
           class Allocator = allocator<charT> >
  class basic_stringstream;
}

Description

The class template basic_stringstream reads and writes to an array in memory. It supports writing and reading objects of class basic_string, and 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

Member Types

allocator_type 
char_type
int_type
off_type
pos_type
string_type
traits_type

Nonmember Types

stringstream
wstringstream

Constructors

explicit basic_stringstream(ios_base::openmode which =
                   ios_base::in | ios_base::out); 
explicit basic_stringstream(const basic_string<char_type,
                   traits_type, allocator_type>& str,
                   ios_base::openmode which =
                   ios_base::in | ios_base::out); 

Destructor

virtual ~basic_stringstream();

Member Functions

basic_stringbuf<char_type, traits_type, allocator_type>* 
rdbuf() const; 
basic_string<char_type, traits_type, allocator_type> 
str() const; 
void 
str(const basic_string<char_type, traits_type,
                       allocator_type>& str); 

Example

See Also

char_traits, ios_base, basic_ios, basic_stringbuf, basic_string, basic_istringstream, basic_ostringstream

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems --Programming Language C++, Section 27.7.4



Previous fileTop of DocumentContentsIndex pageNext file

Copyright (c) 1994-2006 Rogue Wave Software, a Quovadx Division.
Licensed under the Apache License, Version 2.0.
Contact Rogue Wave about documentation or support issues. You can also seek help from other developers through the Apache stdcxx community (see below).

For more information on the Rogue Wave Standard C++ Library under open source, see Section 1.2 of the user's guide.