CVC3
Functions

Overloaded operator<<

Pretty-printing related classes and methods
Collaboration diagram for Overloaded operator<<:

Functions


Function Documentation

ExprStream& CVC3::operator<< ( ExprStream &  os,
ExprStream &(*)(ExprStream &)  manip 
)

Use manipulators which are functions over ExprStream&.

Definition at line 156 of file expr_stream.cpp.

ExprStream& CVC3::operator<< ( ExprStream &  os,
const Expr &  e 
)
ExprStream& CVC3::operator<< ( ExprStream &  os,
const Type &  t 
)

Print Type.

Definition at line 226 of file expr_stream.cpp.

References CVC3::Type::getExpr().

ExprStream& CVC3::operator<< ( ExprStream &  os,
const string &  s 
)

Print string.

This is where all the indentation is happening.

The algorithm for determining whether to go to the next line is the following:

  • If the new d_col does not exceed d_lineWidth/2 or current indentation, don't bother.
  • If the difference between the new d_col and the current indentation is less than d_lineWidth/4, don't bother either, so that we don't get lots of very short lines clumped to the right side.
  • Similarly, if the difference between the old d_col and the current indentation is less than d_lineWidth/6, keep the same line. Otherwise, for long atomic strings, we may get useless line breaks.
  • Otherwise, go to the next line.

Definition at line 251 of file expr_stream.cpp.

References CVC3::ExprStream::d_beginningOfLine, CVC3::ExprStream::d_col, CVC3::ExprStream::d_indent, CVC3::ExprStream::d_indentStack, CVC3::ExprStream::d_lineWidth, CVC3::ExprStream::d_os, and std::endl().

ExprStream& CVC3::operator<< ( ExprStream &  os,
const char *  s 
)

Print char* string.

Definition at line 273 of file expr_stream.cpp.

ExprStream& CVC3::operator<< ( ExprStream &  os,
const Rational &  r 
)

Print Rational.

Definition at line 278 of file expr_stream.cpp.

ExprStream& CVC3::operator<< ( ExprStream &  os,
int  i 
)

Print int.

Definition at line 285 of file expr_stream.cpp.