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 |
|
Destructor |
Protected Member Functions
Name |
Description |
|
|
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