This class implements a standard input stream that provides a constructor and manipulator for setting the sequence of characters from which input is streamed to a supplied bsl::basic_string.

Synopsis

Declared in <bslstl_istringstream.h>

template<
    class CHAR_TYPE,
    class CHAR_TRAITS = char_traits<CHAR_TYPE>,
    class ALLOCATOR = allocator<CHAR_TYPE>>
class basic_istringstream
    : public std::basic_istream<CHAR_TYPE, CHAR_TRAITS>

Base Classes

Name

Description

std::basic_istream<CHAR_TYPE, CHAR_TRAITS>

Template class basic_istream.

Types

Name

Description

sentry

Performs setup work for input streams.

Type Aliases

Name

Description

__ctype_type

__ios_type

__istream_type

__num_get_type

__streambuf_type

allocator_type

This typedef is an alias to the (template parameter) ALLOCATOR.

char_type

Alias for the character type of this stream.

int_type

This typedef is an alias to traits_type::int_type.

off_type

This typedef is an alias to traits_type::off_type.

pos_type

This typedef is an alias to traits_type::pos_type.

traits_type

This typedef is an alias to the (template parameter) CHAR_TRAITS.

Member Functions

Name

Description

basic_istringstream [constructor]

Constructors

operator=

Assign to this object the value of the specified rhs, and return a reference providing modifiable access to this object. The contents of rhs are move‐assigned to this object. rhs is left in a valid but unspecified state.

gcount

Character counting

get

get overloads

getline

String extraction.

ignore

Discarding characters

operator>>

Right shift operators

peek

Looking ahead in the stream

putback

Unextracting a single character.

rdbuf

Return an address providing modifiable access to the basic_stringbuf object that is internally used by this string stream to buffer unformatted characters.

read

Extraction without delimiters.

readsome

Extraction until the buffer is exhausted, but no more.

seekg

Changing the current read position.

str

str overloads

swap

Efficiently exchange the value of this object with the value of the specified other object. This method provides the no‐throw exception‐safety guarantee if *this and other allocators compare equal. The behavior is undefined unless either *this and other allocators compare equal or propagate_on_container_swap is true. Note that this function is only available for C++11 (and later) language standards because it requires that swap be provided on the (platform supplied) base class for this type.

sync

Synchronizing the stream buffer.

tellg

Getting the current read position.

unget

Unextracting the previous character.

view

Return a view of the internally buffered sequence of characters maintained by this stream object.

Protected Member Functions

Protected Data Members

Name

Description

_M_gcount

The number of characters extracted in the previous unformatted function; see gcount().

Non-Member Functions

Name

Description

swap

Efficiently exchange the values of the specified a and b objects. This method provides the no‐throw exception‐safety guarantee if a and b allocators compare equal. Note that this function is only available for C++11 (and later) language standards.

Created with MrDocs