cvc4-1.4
|
IOStream manipulator to set the maximum depth of Exprs when pretty-printing. More...
#include <expr.h>
Data Structures | |
class | Scope |
Set the expression depth on the output stream for the current stack scope. More... | |
Public Member Functions | |
ExprSetDepth (long depth) | |
Construct a ExprSetDepth with the given depth. | |
void | applyDepth (std::ostream &out) |
Static Public Member Functions | |
static long | getDepth (std::ostream &out) |
static void | setDepth (std::ostream &out, long depth) |
IOStream manipulator to set the maximum depth of Exprs when pretty-printing.
-1 means print to any depth. E.g.:
// let a, b, c, and d be VARIABLEs Expr e = em->mkExpr(OR, a, b, em->mkExpr(AND, c, em->mkExpr(NOT, d))) out << setdepth(3) << e;
gives "(OR a b (AND c (NOT d)))", but
out << setdepth(1) << [same expr as above]
gives "(OR a b (...))".
The implementation of this class serves two purposes; it holds information about the depth setting (such as the index of the allocated word in ios_base), and serves also as the manipulator itself (as above).
|
inline |
Construct a ExprSetDepth with the given depth.
|
inline |
Definition at line 705 of file expr.h.
Referenced by CVC4::expr::operator<<().
|
inlinestatic |
|
inlinestatic |