Standard stream buffer backed by a character string.
Synopsis
Declared in <bslstl_stringbuf.h>
template<
class CHAR_TYPE,
class CHAR_TRAITS = char_traits<CHAR_TYPE>,
class ALLOCATOR = allocator<CHAR_TYPE>>
class basic_stringbuf
: public std::basic_streambuf<CHAR_TYPE, CHAR_TRAITS>
Description
This class implements a standard stream buffer providing an unformatted character input sequence and an unformatted character output sequence that may be initialized or accessed using a string value.
Base Classes
Name |
Description |
|
The actual work of input and output (interface). |
Type Aliases
Name |
Description |
@{ This is a non‐standard type. |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object. |
Move‐assign from the specified |
|
Return the allocator used by the underlying string to supply memory. |
|
Locale access. |
|
Looking ahead into the stream. |
|
Entry point for imbue(). |
|
Alters the stream position. |
|
Alters the stream position. |
|
Entry points for derived buffer functions. |
|
Calls virtual sync function. |
|
Getting the next character. |
|
Getting the next character. |
|
Entry point for xsgetn. |
|
Getting the next character. |
|
Pushing characters back into the input stream. |
|
Entry point for all single‐character output functions. |
|
Entry point for all single‐character output functions. |
|
|
|
Moving backwards in the input stream. |
|
Efficiently exchange the value of this object with |
|
Return a view of the currently buffered sequence of characters. |
Using Declarations
Name |
Description |
Return the currently imbued locale (inherited). |
|
Return how many characters are available in the get area (inherited). |
|
Imbue this buffer with a locale and return the previous locale (inherited). |
|
Seek to a relative position in the controlled sequences (inherited). |
|
Seek to an absolute position in the controlled sequences (inherited). |
|
Offer a character array as the controlled sequence (inherited). |
|
Synchronize the put and/or get area with the underlying sequence (inherited). |
|
Return the current get character and advance the get pointer (inherited). |
|
Return the current get character without advancing (inherited). |
|
Read characters into a buffer (inherited). |
|
Advance the get pointer and return the next character (inherited). |
|
Put a character back into the input sequence (inherited). |
|
Append a character to the output sequence (inherited). |
|
Append characters to the output sequence (inherited). |
|
Move the get pointer back by one character (inherited). |
Protected Member Functions
Name |
Description |
Access to the get area. |
|
Moving the read position. |
|
|
Changes translations. |
|
|
|
|
Access to the put area. |
|
Moving the write position. |
|
|
|
|
|
|
Manipulates the buffer. |
Setting the three read area pointers. |
|
Setting the three write area pointers. |
|
|
Investigating the data available. |
|
Synchronizes the buffer arrays with the controlled sequences. |
|
Return the character at the current get position and advance past it. |
|
Return the character at the current get position, if any. |
|
|
|
Protected Data Members
Name |
Description |
Current locale setting. |
|
Start of get area. |
|
Current read area. |
|
End of get area. |
|
Start of put area. |
|
Current put area. |
|
End of put area. |
Protected Using Declarations
Name |
Description |
Return the start of the get area (inherited). |
|
Return the end of the get area (inherited). |
|
Return the end of the put area (inherited). |
|
Advance the get pointer by the specified number of characters (inherited). |
|
Return the current get pointer (inherited). |
|
Imbue this stream buffer with a locale (inherited). |
|
Assign the get/put pointers and locale from a base stream buffer (inherited). |
|
Return the start of the put area (inherited). |
|
Advance the put pointer by the specified number of characters (inherited). |
|
Return the current put pointer (inherited). |
|
Offer a character array as the controlled sequence (inherited). |
|
Set the beginning, next, and end pointers of the get area (inherited). |
|
Set the beginning and end pointers of the put area (inherited). |
|
Estimate how many characters can be extracted (inherited). |
|
Exchange get/put pointers and locale with another stream buffer (inherited). |
|
Synchronize the controlled sequences with the character sequence (inherited). |