class formatted_raw_ostream
Declaration
class formatted_raw_ostream : public raw_ostream { /* full declaration omitted */ };
Description
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column position, allowing padding out to specific column boundaries and querying the number of lines written to the stream.
Declared at: llvm/include/llvm/Support/FormattedStream.h:26
Inherits from: raw_ostream
Member Variables
Inherited from raw_ostream:
- public static BLACK = Colors::BLACK
- public static RED = Colors::RED
- public static GREEN = Colors::GREEN
- public static YELLOW = Colors::YELLOW
- public static BLUE = Colors::BLUE
- public static MAGENTA = Colors::MAGENTA
- public static CYAN = Colors::CYAN
- public static WHITE = Colors::WHITE
- public static SAVEDCOLOR = Colors::SAVEDCOLOR
- public static RESET = Colors::RESET
Method Overview
- public llvm::formatted_raw_ostream & PadToColumn(unsigned int NewCol)
- public llvm::raw_ostream & changeColor(enum Colors Color, bool Bold, bool BG)
- public formatted_raw_ostream(llvm::raw_ostream & Stream)
- public formatted_raw_ostream()
- public unsigned int getColumn()
- public unsigned int getLine()
- public bool is_displayed() const
- public llvm::raw_ostream & resetColor()
- public llvm::raw_ostream & reverseColor()
- public ~formatted_raw_ostream()
Inherited from raw_ostream:
- public GetBufferSize
- public GetNumBytesInBuffer
- protected SetBuffer
- public SetBufferSize
- public SetBuffered
- public SetUnbuffered
- public changeColor
- public enable_colors
- public flush
- protected getBufferStart
- public has_colors
- public indent
- public is_displayed
- protected preferred_buffer_size
- public resetColor
- public reverseColor
- public tell
- public write
- public write
- public write_escaped
- public write_hex
- public write_uuid
- public write_zeros
Methods
¶llvm::formatted_raw_ostream& PadToColumn(
unsigned int NewCol)
llvm::formatted_raw_ostream& PadToColumn(
unsigned int NewCol)
Description
PadToColumn - Align the output to some column number. If the current column is already equal to or more than NewCol, PadToColumn inserts one space.
Declared at: llvm/include/llvm/Support/FormattedStream.h:106
Parameters
- unsigned int NewCol
- - The column to move to.
¶llvm::raw_ostream& changeColor(enum Colors Color,
bool Bold,
bool BG)
llvm::raw_ostream& changeColor(enum Colors Color,
bool Bold,
bool BG)
Description
Changes the foreground color of text that will be output from this point forward.
Declared at: llvm/include/llvm/Support/FormattedStream.h:124
Parameters
- enum Colors Color
- ANSI color to use, the special SAVEDCOLOR can be used to change only the bold attribute, and keep colors untouched
- bool Bold
- bold/brighter text, default false
- bool BG
- if true change the background, default: change foreground
Returns
itself so it can be used within < < invocations
¶formatted_raw_ostream(llvm::raw_ostream& Stream)
formatted_raw_ostream(llvm::raw_ostream& Stream)
Description
formatted_raw_ostream - Open the specified file for writing. If an error occurs, information about the error is put into ErrorInfo, and the stream should be immediately destroyed; the string will be empty if no error occurred. As a side effect, the given Stream is set to be Unbuffered. This is because formatted_raw_ostream does its own buffering, so it doesn't want another layer of buffering to be happening underneath it.
Declared at: llvm/include/llvm/Support/FormattedStream.h:88
Parameters
- llvm::raw_ostream& Stream
¶formatted_raw_ostream()
formatted_raw_ostream()
Declared at: llvm/include/llvm/Support/FormattedStream.h:92
¶unsigned int getColumn()
unsigned int getColumn()
Description
getColumn - Return the column number
Declared at: llvm/include/llvm/Support/FormattedStream.h:109
¶unsigned int getLine()
unsigned int getLine()
Description
getLine - Return the line number
Declared at: llvm/include/llvm/Support/FormattedStream.h:112
¶bool is_displayed() const
bool is_displayed() const
Description
This function determines if this stream is connected to a "tty" or "console" window. That is, the output would be displayed to the user rather than being put on a pipe or stored in a file.
Declared at: llvm/include/llvm/Support/FormattedStream.h:129
¶llvm::raw_ostream& resetColor()
llvm::raw_ostream& resetColor()
Description
Resets the colors to terminal defaults. Call this when you are done outputting colored text, or before program exit.
Declared at: llvm/include/llvm/Support/FormattedStream.h:114
¶llvm::raw_ostream& reverseColor()
llvm::raw_ostream& reverseColor()
Description
Reverses the foreground and background colors.
Declared at: llvm/include/llvm/Support/FormattedStream.h:119
¶~formatted_raw_ostream()
~formatted_raw_ostream()
Declared at: llvm/include/llvm/Support/FormattedStream.h:96