LLVM API Documentation
#include <circular_raw_ostream.h>
Public Member Functions | |
circular_raw_ostream (raw_ostream &Stream, const char *Header, size_t BuffSize=0, bool Owns=REFERENCE_ONLY) | |
circular_raw_ostream () | |
~circular_raw_ostream () | |
void | setStream (raw_ostream &Stream, bool Owns=REFERENCE_ONLY) |
void | flushBufferWithBanner () |
Static Public Attributes | |
static const bool | TAKE_OWNERSHIP = true |
static const bool | REFERENCE_ONLY = false |
circular_raw_ostream - A raw_ostream which *can* save its data to a circular buffer, or can pass it through directly to an underlying stream if specified with a buffer of zero.
Definition at line 26 of file circular_raw_ostream.h.
llvm::circular_raw_ostream::circular_raw_ostream | ( | raw_ostream & | Stream, |
const char * | Header, | ||
size_t | BuffSize = 0 , |
||
bool | Owns = REFERENCE_ONLY |
||
) | [inline] |
circular_raw_ostream - Construct an optionally circular-buffered stream, handing it an underlying stream to do the "real" output.
As a side effect, if BuffSize is nonzero, the given Stream is set to be Unbuffered. This is because circular_raw_ostream does its own buffering, so it doesn't want another layer of buffering to be happening underneath it.
"Owns" tells the circular_raw_ostream whether it is responsible for managing the held stream, doing memory management of it, etc.
Definition at line 109 of file circular_raw_ostream.h.
References setStream().
llvm::circular_raw_ostream::circular_raw_ostream | ( | ) | [inline, explicit] |
Definition at line 123 of file circular_raw_ostream.h.
llvm::circular_raw_ostream::~circular_raw_ostream | ( | ) | [inline] |
Definition at line 133 of file circular_raw_ostream.h.
References llvm::raw_ostream::flush(), and flushBufferWithBanner().
flushBufferWithBanner - Force output of the buffer along with a small header.
Definition at line 39 of file circular_raw_ostream.cpp.
References llvm::LibFunc::strlen, and llvm::raw_ostream::write().
Referenced by debug_user_sig_handler(), and ~circular_raw_ostream().
void llvm::circular_raw_ostream::setStream | ( | raw_ostream & | Stream, |
bool | Owns = REFERENCE_ONLY |
||
) | [inline] |
setStream - Tell the circular_raw_ostream to output a different stream. "Owns" tells circular_raw_ostream whether it should take responsibility for managing the underlying stream.
Definition at line 145 of file circular_raw_ostream.h.
Referenced by circular_raw_ostream().
const bool llvm::circular_raw_ostream::REFERENCE_ONLY = false [static] |
REFERENCE_ONLY - Tell this stream it should not manage the held stream.
Definition at line 37 of file circular_raw_ostream.h.
const bool llvm::circular_raw_ostream::TAKE_OWNERSHIP = true [static] |
TAKE_OWNERSHIP - Tell this stream that it owns the underlying stream and is responsible for cleanup, memory management issues, etc.
Definition at line 32 of file circular_raw_ostream.h.