<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>PPL: Parma_Polyhedra_Library::IO_Operators Namespace Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="namespaces.html"><span>Namespace List</span></a></li> <li><a href="namespacemembers.html"><span>Namespace Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceParma__Polyhedra__Library.html">Parma_Polyhedra_Library</a>::<a class="el" href="namespaceParma__Polyhedra__Library_1_1IO__Operators.html">IO_Operators</a> </div> </div> <div class="contents"> <h1>Parma_Polyhedra_Library::IO_Operators Namespace Reference<br/> <small> [<a class="el" href="group__PPL__CXX__interface.html">C++ Language Interface</a>]</small> </h1> <p>All input/output operators are confined to this namespace. <a href="#_details">More...</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceParma__Polyhedra__Library_1_1IO__Operators.html#a9ccf426c9d89537e0351aac50a333e95">wrap_string</a> (const std::string &src_string, unsigned indent_depth, unsigned preferred_first_line_length, unsigned preferred_line_length)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Utility function for the wrapping of lines of text. <a href="#a9ccf426c9d89537e0351aac50a333e95"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>All input/output operators are confined to this namespace. </p> <p>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 </p> <div class="fragment"><pre class="fragment"> <span class="keyword">using namespace </span>Parma_Polyhedra_Library::IO_Operators; </pre></div><p> would suffice for most uses. In more complex situations, such as </p> <div class="fragment"><pre class="fragment"> <span class="keyword">const</span> Constraint_System& cs = ...; copy(cs.begin(), cs.end(), ostream_iterator<Constraint>(cout, <span class="stringliteral">"\n"</span>)); </pre></div><p> the <a class="el" href="namespaceParma__Polyhedra__Library.html" title="The entire library is confined to this namespace.">Parma_Polyhedra_Library</a> namespace must be suitably extended. This can be done as follows: </p> <div class="fragment"><pre class="fragment"> <span class="keyword">namespace </span>Parma_Polyhedra_Library { <span class="comment">// Import all the output operators into the main PPL namespace.</span> <span class="keyword">using</span> IO_Operators::operator<<; } </pre></div> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a9ccf426c9d89537e0351aac50a333e95"></a><!-- doxytag: member="Parma_Polyhedra_Library::IO_Operators::wrap_string" ref="a9ccf426c9d89537e0351aac50a333e95" args="(const std::string &src_string, unsigned indent_depth, unsigned preferred_first_line_length, unsigned preferred_line_length)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Parma_Polyhedra_Library::IO_Operators::wrap_string </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>src_string</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>indent_depth</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>preferred_first_line_length</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>preferred_line_length</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Utility function for the wrapping of lines of text. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>src_string</em> </td><td>The source string holding the lines to wrap.</td></tr> <tr><td valign="top"></td><td valign="top"><em>indent_depth</em> </td><td>The indentation depth.</td></tr> <tr><td valign="top"></td><td valign="top"><em>preferred_first_line_length</em> </td><td>The preferred length for the first line of text.</td></tr> <tr><td valign="top"></td><td valign="top"><em>preferred_line_length</em> </td><td>The preferred length for all the lines but the first one.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The wrapped string. </dd></dl> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Sun Feb 27 10:10:58 2011 for PPL by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>