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 153 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 222 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 247 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 269 of file expr_stream.cpp.

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

Print Rational.

Definition at line 274 of file expr_stream.cpp.

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

Print int.

Definition at line 281 of file expr_stream.cpp.


Generated on Thu Oct 15 22:17:15 2009 for CVC3 by  doxygen 1.5.8