LLVM API Documentation

Public Member Functions | Static Public Attributes
llvm::circular_raw_ostream Class Reference

#include <circular_raw_ostream.h>

Inheritance diagram for llvm::circular_raw_ostream:
Inheritance graph
[legend]
Collaboration diagram for llvm::circular_raw_ostream:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

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().

Definition at line 123 of file circular_raw_ostream.h.

Definition at line 133 of file circular_raw_ostream.h.

References llvm::raw_ostream::flush(), and flushBufferWithBanner().


Member Function Documentation

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().


Member Data Documentation

REFERENCE_ONLY - Tell this stream it should not manage the held stream.

Definition at line 37 of file circular_raw_ostream.h.

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.


The documentation for this class was generated from the following files: