|
BDE 4.39.x Production Release
|
#include <bslstl_ostringstream.h>
This class implements a standard output stream that provides an accessor for obtaining a bsl::basic_string containing the sequence of characters that have been written to the stream.
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_ostringstream (const allocator_type &allocator=allocator_type()) | |
| basic_ostringstream (ios_base::openmode modeBitMask, const allocator_type &allocator=allocator_type()) | |
| basic_ostringstream (const StringType &initialString, const allocator_type &allocator=allocator_type()) | |
| basic_ostringstream (const StringType &initialString, ios_base::openmode modeBitMask, const allocator_type &allocator=allocator_type()) | |
| basic_ostringstream (BloombergLP::bslmf::MovableRef< StringType > initialString) | |
| basic_ostringstream (BloombergLP::bslmf::MovableRef< StringType > initialString, const allocator_type &allocator) | |
| basic_ostringstream (BloombergLP::bslmf::MovableRef< StringType > initialString, ios_base::openmode modeBitMask) | |
| basic_ostringstream (BloombergLP::bslmf::MovableRef< StringType > initialString, ios_base::openmode modeBitMask, const allocator_type &allocator) | |
| template<class SALLOC > | |
| basic_ostringstream (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_ostringstream (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) | |
| template<class STRING_VIEW_LIKE_TYPE > | |
| basic_ostringstream (const STRING_VIEW_LIKE_TYPE &initialString, allocator=allocator_type()) | |
| template<class STRING_VIEW_LIKE_TYPE > | |
| basic_ostringstream (const STRING_VIEW_LIKE_TYPE &initialString, ios_base::openmode modeBitMask, allocator=allocator_type()) | |
| ~basic_ostringstream ()=default | |
| void | str (const StringType &value) |
| void | str (BloombergLP::bslmf::MovableRef< StringType > value) |
| template<class SALLOC > | |
| bsl::enable_if<!bsl::is_same< ALLOCATOR, SALLOC >::value, void >::type | str (const basic_string< CHAR_TYPE, CHAR_TRAITS, SALLOC > &value) |
| template<class STRING_VIEW_LIKE_TYPE > | |
| str (const STRING_VIEW_LIKE_TYPE &value) | |
| allocator_type | get_allocator () const BSLS_KEYWORD_NOEXCEPT |
| StreamBufType * | rdbuf () 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 |
| typedef ALLOCATOR bsl::basic_ostringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::allocator_type |
| typedef CHAR_TYPE bsl::basic_ostringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::char_type |
| typedef traits_type::int_type bsl::basic_ostringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::int_type |
| typedef traits_type::off_type bsl::basic_ostringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::off_type |
| typedef traits_type::pos_type bsl::basic_ostringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::pos_type |
| typedef CHAR_TRAITS bsl::basic_ostringstream< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::traits_type |
|
inlineexplicit |
Create a basic_ostringstream object. Optionally specify a modeBitMask indicating whether the underlying stream-buffer may also be read from (rdbuf is created using modeBitMask | ios_base::out). If modeBitMask is not supplied, rdbuf will be created using ios_base::out. Optionally specify an initialString indicating the value that will be returned by a call to str prior to any streaming operations performed on this object. If initialString is not supplied, str will initially return an empty string. 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.
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
Create a basic_ostringstream object. Use the specified initialString indicating the value that will be returned by a call to str prior to any streaming operations performed on this object. Optionally specify a modeBitMask indicating whether the underlying stream-buffer may also be read from (rdbuf is created using modeBitMask | ios_base::out). If modeBitMask is not supplied, rdbuf will be created using ios_base::out. 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.
|
inline |
|
inline |
|
inline |
|
inline |
Create a basic_ostringstream object. Use the specified initialString as the value that will be returned by a call to str prior to any streaming operations performed on this object. rdbuf is created using ios_base::out. 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.
|
inline |
Create a basic_ostringstream object. Use the specified initialString as the value that will be returned by a call to str prior to any streaming operations performed on this object. Use the specified modeBitMask to indicate whether the underlying stream-buffer may also be read from (rdbuf is created using modeBitMask | ios_base::out). 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.
|
inlineexplicit |
Create a basic_ostringstream object. Use the specified initialString (of a type convertible to basic_string_view<CHAR_TYPE, CHAR_TRAITS> but not to const CHAR_TYPE *) indicating the initial sequence of characters that have been written to this stream. rdbuf is created using ios_base::out. 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.
|
inline |
Create a basic_ostringstream object. Use the specified initialString (of a type convertible to basic_string_view<CHAR_TYPE, CHAR_TRAITS> but not to const CHAR_TYPE *) indicating the initial sequence of characters that have been written to this stream. Use the specified modeBitMask to indicate whether this buffer may be read from, written to, or both. rdbuf is created using modeBitMask | ios_base::out. 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.
|
default |
|
inline |
Return the allocator used by the underlying buffer to supply memory.
|
inline |
Return an address providing modifiable access to the basic_stringbuf object that is internally used by this string stream to buffer unformatted characters.
|
inline |
|
inline |
|
inline |
|
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.
|
inline |
Reset the internally buffered sequence of characters maintained by this stream object to the specified value (of a type convertible to basic_string_view<CHAR_TYPE, CHAR_TRAITS> but not to const CHAR_TYPE *).
|
inline |
Reset the internally buffered sequence of characters maintained by this stream object to the specified value. If value is passed by MovableRef, it is left in a valid but unspecified state.
|
inline |
Return a view of the internally buffered sequence of characters maintained by this stream object.