Parma_Polyhedra_Library::IO_Operators Namespace Reference
[C++ Language Interface]

All input/output operators are confined to this namespace. More...


Detailed Description

All input/output operators are confined to this namespace.

This is done so that the library's input/output operators do not interfere with those the user might want to define. In fact, it is highly unlikely that any predefined I/O operator will suit the needs of a client application. On the other hand, those applications for which the PPL I/O operator are enough can easily obtain access to them. For example, a directive like

    using namespace Parma_Polyhedra_Library::IO_Operators;

would suffice for most uses. In more complex situations, such as

    const Constraint_System& cs = ...;
    copy(cs.begin(), cs.end(),
         ostream_iterator<Constraint>(cout, "\n"));

the Parma_Polyhedra_Library namespace must be suitably extended. This can be done as follows:

    namespace Parma_Polyhedra_Library {
      // Import all the output operators into the main PPL namespace.
      using IO_Operators::operator<<;
    }

Function Documentation

std::ostream& Parma_Polyhedra_Library::IO_Operators::operator<< ( std::ostream &  os,
const PIP_Tree_Node::Artificial_Parameter &  x 
) [related]

Definition at line 347 of file PIP_Tree.cc.

References Parma_Polyhedra_Library::PIP_Tree_Node::Artificial_Parameter::denominator().

00347                                                                        {
00348   const Linear_Expression& expr = static_cast<const Linear_Expression&>(x);
00349   os << "(" << expr << ") div " << x.denominator();
00350   return os;
00351 }

std::ostream& Parma_Polyhedra_Library::IO_Operators::operator<< ( std::ostream &  os,
const PIP_Tree_Node &  x 
) [related]

Definition at line 341 of file PIP_Tree.cc.

References Parma_Polyhedra_Library::PIP_Tree_Node::print().

00341                                                    {
00342   x.print(os);
00343   return os;
00344 }

Generated on Sun Feb 27 16:20:33 2011 for PPL by  doxygen 1.6.3