This class, derived from the C++ standard library class bsl::streambuf, is a mechanism that can be associated with an opened file descriptor, and, except for changing the locale, enables the caller to invoke all the standard bsl::streambuf operations on that file descriptor. Note that objects of this class are always in exactly one of the 5 modes outlined in the enum FdStreamBuf::FdStreamBufMode.
Synopsis
Declared in <bdls_fdstreambuf.h>
class FdStreamBuf
: public std::streambuf
Base Classes
Name |
Description |
|
Member Functions
Name |
Description |
|
Create a |
|
Destroy this object and, if |
Release any file descriptor that may be associated with this file handler. If |
|
Return the file descriptor associated with this object, or |
|
Return |
|
Disassociate this file handler from any file descriptor with which it may be associated without closing that file descriptor. This method succeeds with no effect is |
|
Associate this object with the specified |
|
Return |
Protected Member Functions
Name |
Description |
|
Set the locale for this object. This method has no effect. The behavior is undefined unless the specified |
|
If in output mode, write the contents of the buffer to output. Return |
|
If the optionally specified |
|
Set the file pointer associated with the file descriptor according to the specified |
|
Seek to the specified |
|
Use the specified |
|
If this object is in putback mode, return the number of characters remaining to be read in the putback buffer, and otherwise the number of characters remaining in the file to be read. Return a non‐negative number of characters on success and a negative value otherwise. The behavior is undefined unless this object is in input mode and the file descriptor is associated with a regular file. |
|
If in output mode, flush the buffer to the associated file descriptor; otherwise do nothing. Return 0 on success, ‐1 otherwise. |
|
Replenish the input buffer with data obtained from the file descriptor, and return the next character of input (or eof if no input is available). Note that in windows text mode, `\r ` sequences on the device will be translated to ` `s. |
|
Read up to the specified |
|
Write up to the specified |
Created with MrDocs