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_ostringstream

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


basic_ostringstream basic_ostream basic_ios ios_base

Local Index

Members

Non-Members

Summary

Class that supports writing objects of specializations of class template basic_string

Synopsis

#include <sstream> 

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

Description

The class template basic_ostringstream writes to an array in memory. It supports writing objects of class basic_string. It uses a basic_stringbuf object to control the associated storage. It inherits from basic_ostream, and therefore can use all the formatted and unformatted output functions.

Interface

Member Types

allocator_type
char_type
int_type
ios_type
off_type
pos_type
traits_type

Nonmember Types

ostringstream
wostringstream

Constructors

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

Destructors

virtual ~basic_ostringstream();

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 basic_stringstream, basic_istringstream and basic_stringbuf examples.

See Also

char_traits, ios_base, basic_ios, basic_stringbuf, basic_string, basic_istringstream, basic_stringstream

Standards Conformance

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



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.