BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > Class Template Reference

#include <bslstl_istringstream.h>

Inheritance diagram for bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >:
bsl::StringBufContainer< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >

Public Types

typedef CHAR_TYPE char_type
 
typedef CHAR_TRAITS traits_type
 
typedef ALLOCATOR allocator_type
 
typedef traits_type::int_type int_type
 
typedef traits_type::off_type off_type
 
typedef traits_type::pos_type pos_type
 

Public Member Functions

 basic_istringstream (const allocator_type &allocator=allocator_type())
 
 basic_istringstream (ios_base::openmode modeBitMask, const allocator_type &allocator=allocator_type())
 
 basic_istringstream (const StringType &initialString, const allocator_type &allocator=allocator_type())
 
 basic_istringstream (const StringType &initialString, ios_base::openmode modeBitMask, const allocator_type &allocator=allocator_type())
 
 basic_istringstream (BloombergLP::bslmf::MovableRef< StringType > initialString)
 
 basic_istringstream (BloombergLP::bslmf::MovableRef< StringType > initialString, const allocator_type &allocator)
 
 basic_istringstream (BloombergLP::bslmf::MovableRef< StringType > initialString, ios_base::openmode modeBitMask)
 
 basic_istringstream (BloombergLP::bslmf::MovableRef< StringType > initialString, ios_base::openmode modeBitMask, const allocator_type &allocator)
 
template<class SALLOC >
 basic_istringstream (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > &initialString, const allocator_type &allocator=allocator_type(), typename bsl::enable_if< !bsl::is_same< ALLOCATOR, SALLOC >::value, void * >::type=0)
 
template<class SALLOC >
 basic_istringstream (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > &initialString, ios_base::openmode modeBitMask, const allocator_type &allocator=allocator_type(), typename bsl::enable_if< !bsl::is_same< ALLOCATOR, SALLOC >::value, void * >::type=0)
 
 ~basic_istringstream ()=default
 
void str (const StringType &value)
 
void str (BloombergLP::bslmf::MovableRef< StringType > value)
 Note: implemented inline due to Sun CC compilation error.
 
template<class SALLOC >
bsl::enable_if<!bsl::is_same< ALLOCATOR, SALLOC >::value, void >::type str (const basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > &value)
 
StreamBufTyperdbuf () const
 
StringType str () const
 
template<class SALLOC >
bsl::enable_if< bsl::IsStdAllocator< SALLOC >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > >::type str (const SALLOC &allocator) const
 
ViewType view () const BSLS_KEYWORD_NOEXCEPT
 

Detailed Description

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
class bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >

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.

Member Typedef Documentation

◆ allocator_type

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
typedef ALLOCATOR bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::allocator_type

◆ char_type

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
typedef CHAR_TYPE bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::char_type

◆ int_type

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
typedef traits_type::int_type bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::int_type

◆ off_type

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
typedef traits_type::off_type bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::off_type

◆ pos_type

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
typedef traits_type::pos_type bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::pos_type

◆ traits_type

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
typedef CHAR_TRAITS bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::traits_type

Constructor & Destructor Documentation

◆ basic_istringstream() [1/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( const allocator_type allocator = allocator_type())
inlineexplicit

◆ basic_istringstream() [2/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( ios_base::openmode  modeBitMask,
const allocator_type allocator = allocator_type() 
)
inlineexplicit

◆ basic_istringstream() [3/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( const StringType initialString,
const allocator_type allocator = allocator_type() 
)
inlineexplicit

◆ basic_istringstream() [4/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( const StringType initialString,
ios_base::openmode  modeBitMask,
const allocator_type allocator = allocator_type() 
)
inline

Create a basic_istringstream object. Optionally specify a modeBitMask indicating whether the underlying stream-buffer may also be written to (rdbuf is created using modeBitMask | ios_base::in). If modeBitMask is not supplied, rdbuf will be created using ios_base::in. Optionally specify an initialString indicating the sequence of characters from which input will be streamed. If initialString is not supplied, there will not be data to stream (until a subsequent call to the str manipulator). Optionally specify the allocator used to supply memory. If allocator is not supplied, a default-constructed object of the (template parameter) ALLOCATOR type is used. If the ALLOCATOR argument is of type bsl::allocator (the default), then allocator, if supplied, shall be convertible to bslma::Allocator *. If the ALLOCATOR argument is of type bsl::allocator and allocator is not supplied, the currently installed default allocator will be used to supply memory. If initialString is passed by MovableRef, it is left in a valid but unspecified state.

◆ basic_istringstream() [5/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( BloombergLP::bslmf::MovableRef< StringType initialString)
inlineexplicit

◆ basic_istringstream() [6/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( BloombergLP::bslmf::MovableRef< StringType initialString,
const allocator_type allocator 
)
inline

◆ basic_istringstream() [7/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( BloombergLP::bslmf::MovableRef< StringType initialString,
ios_base::openmode  modeBitMask 
)
inline

◆ basic_istringstream() [8/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( BloombergLP::bslmf::MovableRef< StringType initialString,
ios_base::openmode  modeBitMask,
const allocator_type allocator 
)
inline

Create a basic_istringstream object. Use the specified initialString indicating the initial sequence of characters from which input will be streamed. Optionally specify a modeBitMask indicating whether the underlying stream-buffer may also be written to (rdbuf is created using modeBitMask | ios_base::in). If modeBitMask is not supplied, rdbuf will be created using ios_base::in. Optionally specify the allocator used to supply memory. If allocator is not supplied, the allocator in initialString is used. initialString is left in a valid but unspecified state.

◆ basic_istringstream() [9/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class SALLOC >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > &  initialString,
const allocator_type allocator = allocator_type(),
typename bsl::enable_if< !bsl::is_same< ALLOCATOR, SALLOC >::value, void * >::type  = 0 
)
inline

Create a basic_istringstream object. Use the specified initialString indicating the sequence of characters from which input will be streamed. rdbuf is created using ios_base::in. Optionally specify the allocator used to supply memory. If allocator is not supplied, a default-constructed object of the (template parameter) ALLOCATOR type is used. If the ALLOCATOR argument is of type bsl::allocator (the default), then allocator, if supplied, shall be convertible to bslma::Allocator *. If the ALLOCATOR argument is of type bsl::allocator and allocator is not supplied, the currently installed default allocator will be used to supply memory.

Note: implemented inline due to Sun CC compilation error.

◆ basic_istringstream() [10/10]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class SALLOC >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_istringstream ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > &  initialString,
ios_base::openmode  modeBitMask,
const allocator_type allocator = allocator_type(),
typename bsl::enable_if< !bsl::is_same< ALLOCATOR, SALLOC >::value, void * >::type  = 0 
)
inline

Create a basic_istringstream object. Use the specified initialString indicating the sequence of characters from which input will be streamed. Use the specified modeBitMask to indicate whether this buffer may be read from, written to, or both. Optionally specify the allocator used to supply memory. If allocator is not supplied, a default-constructed object of the (template parameter) ALLOCATOR type is used. If the ALLOCATOR argument is of type bsl::allocator (the default), then allocator, if supplied, shall be convertible to bslma::Allocator *. If the ALLOCATOR argument is of type bsl::allocator and allocator is not supplied, the currently installed default allocator will be used to supply memory.

Note: implemented inline due to Sun CC compilation error.

◆ ~basic_istringstream()

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::~basic_istringstream ( )
default

Member Function Documentation

◆ rdbuf()

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::StreamBufType * bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rdbuf ( ) const
inline

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

◆ str() [1/5]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::StringType bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::str ( ) const
inline

◆ str() [2/5]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::str ( BloombergLP::bslmf::MovableRef< StringType value)
inline

◆ str() [3/5]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class SALLOC >
bsl::enable_if<!bsl::is_same< ALLOCATOR, SALLOC >::value, void >::type bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::str ( const basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > &  value)
inline

◆ str() [4/5]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class SALLOC >
bsl::enable_if< bsl::IsStdAllocator< SALLOC >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > >::type bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::str ( const SALLOC &  allocator) const
inline

Return a copy of the internally buffered sequence of characters maintained by this stream object in a basic_string that uses the specified allocator.

Note: implemented inline due to Sun CC compilation error.

◆ str() [5/5]

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::str ( const StringType value)
inline

Reset the internally buffered sequence of characters provided as input by this stream to the specified value. If value is passed by MovableRef, it is left in a valid but unspecified state.

◆ view()

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::ViewType bsl::basic_istringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::view ( ) const
inline

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


The documentation for this class was generated from the following files: