klee
|
#include <PrintContext.h>
Public Member Functions | |
PrintContext (llvm::raw_ostream &_os) | |
void | setNewline (const std::string &_newline) |
void | breakLine (unsigned indent=0) |
PrintContext & | breakLineI () |
PrintContext & | pushIndent () |
PrintContext & | popIndent () |
void | write (const std::string &s) |
template<typename T > | |
PrintContext & | operator<< (T elt) |
Public Attributes | |
unsigned | pos |
Number of characters on the current line. More... | |
Private Attributes | |
llvm::raw_ostream & | os |
std::string | newline |
std::stack< unsigned int > | indentStack |
PrintContext - Helper class for pretty printing. It provides a basic wrapper around llvm::raw_ostream that keeps track of how many characters have been used on the current line.
It also provides an optional way keeping track of the various levels of indentation by using a stack.
Definition at line 28 of file PrintContext.h.
|
inline |
Definition at line 43 of file PrintContext.h.
References indentStack, and pos.
|
inline |
Definition at line 52 of file PrintContext.h.
References newline, os, and pos.
Referenced by breakLineI(), klee::ExprSMTLIBPrinter::printCastToSort(), klee::ExprPPrinter::printOne(), klee::ExprPPrinter::printQuery(), PPrinter::printSeparator(), and PPrinter::printUpdateList().
|
inline |
Break line using the indent on the top of the indent stack
Definition at line 61 of file PrintContext.h.
References breakLine(), and indentStack.
Referenced by klee::ExprSMTLIBPrinter::printArrayDeclarations(), klee::ExprSMTLIBPrinter::printAssert(), klee::ExprSMTLIBPrinter::printCastToSort(), and klee::ExprSMTLIBPrinter::printSeperator().
|
inline |
Definition at line 91 of file PrintContext.h.
References write().
|
inline |
Pop the top off the indent stack
Definition at line 77 of file PrintContext.h.
References indentStack.
Referenced by klee::ExprSMTLIBPrinter::printArrayDeclarations(), klee::ExprSMTLIBPrinter::printAShrExpr(), klee::ExprSMTLIBPrinter::printAssert(), klee::ExprSMTLIBPrinter::printCastExpr(), klee::ExprSMTLIBPrinter::printCastToSort(), klee::ExprSMTLIBPrinter::printExtractExpr(), klee::ExprSMTLIBPrinter::printLogicalOrBitVectorExpr(), klee::ExprSMTLIBPrinter::printReadExpr(), klee::ExprSMTLIBPrinter::printSelectExpr(), klee::ExprSMTLIBPrinter::printSortArgsExpr(), and klee::ExprSMTLIBPrinter::printUpdatesAndArray().
|
inline |
Add the current position on the line to the top of the indent stack
Definition at line 69 of file PrintContext.h.
References indentStack, and pos.
Referenced by klee::ExprSMTLIBPrinter::printArrayDeclarations(), klee::ExprSMTLIBPrinter::printAShrExpr(), klee::ExprSMTLIBPrinter::printAssert(), klee::ExprSMTLIBPrinter::printCastExpr(), klee::ExprSMTLIBPrinter::printCastToSort(), klee::ExprSMTLIBPrinter::printExtractExpr(), klee::ExprSMTLIBPrinter::printLogicalOrBitVectorExpr(), klee::ExprSMTLIBPrinter::printReadExpr(), klee::ExprSMTLIBPrinter::printSelectExpr(), klee::ExprSMTLIBPrinter::printSortArgsExpr(), and klee::ExprSMTLIBPrinter::printUpdatesAndArray().
|
inline |
Definition at line 48 of file PrintContext.h.
References newline.
|
inline |
write - Output a string to the stream and update the position. The stream should not have any newlines.
Definition at line 85 of file PrintContext.h.
Referenced by operator<<(), and klee::ExprSMTLIBPrinter::printSeperator().
|
private |
This is used to keep track of the stack of indentations used by
Definition at line 37 of file PrintContext.h.
Referenced by breakLineI(), popIndent(), PrintContext(), and pushIndent().
|
private |
Definition at line 31 of file PrintContext.h.
Referenced by breakLine(), and setNewline().
|
private |
Definition at line 30 of file PrintContext.h.
Referenced by breakLine(), and write().
unsigned PrintContext::pos |
Number of characters on the current line.
Definition at line 41 of file PrintContext.h.
Referenced by breakLine(), PPrinter::print(), PrintContext(), klee::ExprPPrinter::printQuery(), PPrinter::printUpdateList(), pushIndent(), and write().