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

basic_istringstream

Library:  Input/output


basic_istringstream basic_istream basic_ios ios_base

Local Index

Members

Non-Members

Summary

Class that supports reading objects of specializations of class template basic_string from an array in memory

Synopsis

#include <sstream> 

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

Description

The class template basic_istringstream reads from an array in memory. It supports reading objects of class basic_string, and uses a basic_stringbuf object to control the associated storage. It inherits from basic_istream, and therefore can use all the formatted and unformatted input functions.

Interface

Member Types

allocator_type
char_type
int_type
off_type
pos_type
traits_type

Nonmember Types

istringstream
wistringstream

Constructors

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

Destructor

virtual ~basic_istringstream();

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_ostringstream, basic_stringstream

Standards Conformance

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



Previous fileTop of DocumentContentsIndex pageNext file