Adaptor to create a stream class that proxies another raw_ostream.
Synopsis
Declared in <llvm/Support/raw_ostream_proxy.h>
template<class RawOstreamT = raw_ostream>
class raw_ostream_proxy_adaptor
: public RawOstreamT
Description
Use raw_ostream_proxy_adaptor<> directly to implement an abstract derived class of raw_ostream as a proxy. Otherwise use raw_ostream_proxy.
Most operations are forwarded to the proxied stream.
If the proxied stream is buffered, the buffer is dropped and moved to this stream. This allows flush() to work correctly, flushing immediately from the proxy through to the final stream, and avoids any wasteful double‐buffering.
enable_colors() changes both the proxied stream and the proxy itself. is_displayed() and has_colors() are forwarded to the proxy. changeColor(), resetColor(), and reverseColor() are not forwarded, since they need to call flush() and the buffer lives in the proxy.
Base Classes
Name |
Description |
|
Member Functions
Name |
Description |
|
Destroy the adaptor and stop proxying the underlying stream. |
Enable or disable colors on both this proxy and the proxied stream. |
|
Return the preferred buffer size cached at construction. |
|
Return a reference to the proxied stream. |
|
Return true if this adaptor still has a proxied stream. |
|
Return whether the proxied stream supports colors. |
|
Return whether the proxied stream is connected to a display. |
|
Forward a reserve request to the proxied stream. |
Protected Member Functions
Name |
Description |
|
Construct an adaptor that proxies |
Stop proxying the stream. Flush and set up a crash for future writes. |
Derived Classes
Name |
Description |
Non‐owning proxy for a raw_ostream. Enables passing a stream into an API that takes ownership. |
|
Adaptor for creating a stream that proxies a raw_pwrite_stream. |
Created with MrDocs