Overloaded operator<<
[Pretty-printing related classes and methods]

Collaboration diagram for Overloaded operator<<:

Functions


Function Documentation

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

Use manipulators which are functions over ExprStream&.

Definition at line 173 of file expr_stream.cpp.

ExprStream& CVCL::operator<< ExprStream &  os,
const Expr &  e
 

Print Expr.

Definition at line 179 of file expr_stream.cpp.

References CVCL::ExprStream::addLetHeader(), CVCL::ASSERT, CVCL::AST_LANG, CVCL::ExprStream::collectShared(), CVCL::CONST, CVCL::ExprStream::d_currDepth, CVCL::ExprStream::d_current, CVCL::ExprStream::d_dag, CVCL::ExprStream::d_dagBuilt, CVCL::ExprStream::d_dagMap, CVCL::ExprStream::d_dagPtr, CVCL::ExprStream::d_depth, CVCL::ExprStream::d_em, CVCL::ExprStream::d_indentLast, CVCL::ExprStream::d_indentReg, CVCL::ExprStream::d_indentStack, CVCL::ExprStream::d_lang, CVCL::ExprStream::d_lastDagSize, CVCL::ExprStream::d_nodag, CVCL::ExprStream::d_parent, CVCL::ExprMap< Data >::end(), CVCL::ExprMap< Data >::find(), CVCL::Expr::getKind(), CVCL::ExprManager::getPrinter(), CVCL::PrettyPrinter::print(), CVCL::Expr::printAST(), CVCL::QUERY, CVCL::ExprStream::resetDag(), CVCL::ExprStream::resetIndent(), CVCL::TRANSFORM, and CVCL::TYPE.

ExprStream& CVCL::operator<< ExprStream &  os,
const Type &  t
 

Print Type.

Definition at line 247 of file expr_stream.cpp.

References CVCL::Type::getExpr().

ExprStream& CVCL::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 272 of file expr_stream.cpp.

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

ExprStream& CVCL::operator<< ExprStream &  os,
const char *  s
 

Print char* string.

Definition at line 294 of file expr_stream.cpp.

ExprStream& CVCL::operator<< ExprStream &  os,
const Rational &  r
 

Print Rational.

Definition at line 299 of file expr_stream.cpp.

ExprStream& CVCL::operator<< ExprStream &  os,
int  i
 

Print int.

Definition at line 306 of file expr_stream.cpp.


Generated on Thu Apr 13 16:57:38 2006 for CVC Lite by  doxygen 1.4.4