An interface for writing blocks of data to a data source.
More...
#include <OutputStream.h>
|
| char * | m_wcur |
| | Inline write window over memory owned by the implementation, mirroring InputStream's read window.
|
| |
|
char * | m_wend |
| |
An interface for writing blocks of data to a data source.
◆ disableWriteWindow()
| void OutputStream::disableWriteWindow |
( |
| ) |
|
|
protected |
Disarm the window, once its pending bytes have been handed to the sink.
◆ enableWriteWindow()
| void OutputStream::enableWriteWindow |
( |
char * |
cur, |
|
|
char * |
end |
|
) |
| |
|
protected |
Enable the inline write window over the supplied memory region.
◆ Write() [1/3]
Write the character in the device.
- Parameters
-
◆ Write() [2/3]
Write data to the output stream.
- Parameters
-
| buffer | the data is read from this buffer |
| size | the size of the buffer |
◆ Write() [3/3]
| void PoDoFo::OutputStream::Write |
( |
const std::string_view & |
view | ) |
|
Write the view to the OutputStream.
- Parameters
-
| view | the view to be written |
◆ m_wcur
| char* PoDoFo::OutputStream::m_wcur |
|
protected |
Inline write window over memory owned by the implementation, mirroring InputStream's read window.
It has three states:
- unarmed: m_wend == nullptr, every write takes the virtual slow path
- armed, full: m_wend != nullptr && m_wcur == m_wend, no room left
- armed, with room: m_wcur < m_wend, writes are served by the window Unlike the read window, which can be dropped at any time, the bytes before m_wcur are pending output: an arming implementation must keep them ahead of what writeBuffer() receives, and hand them to its sink in flush() and in its own destructor While armed, writes served by the window never reach writeBuffer(), so an implementation that counts or inspects bytes there must derive the count from m_wcur instead, or not arm at all
The documentation for this class was generated from the following files:
- src/podofo/auxiliary/OutputStream.h
- src/podofo/auxiliary/OutputStream.cpp