<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>log4cpp: log4cpp::CategoryStream Class 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.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> </div> </div> <div class="contents"> <h1>log4cpp::CategoryStream Class Reference</h1><!-- doxytag: class="log4cpp::CategoryStream" -->This class enables streaming simple types and objects to a category. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="CategoryStream_8hh_source.html">CategoryStream.hh</a>></code> <p> <p> <a href="classlog4cpp_1_1CategoryStream-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &(* </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#7f916b3d34c0c20d0238efc70b8bd4fe">cspf</a> )(<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &)</td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#0f098bca471909b68d481c42eb925191">CategoryStream</a> (<a class="el" href="classlog4cpp_1_1Category.html">Category</a> &category, <a class="el" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72">Priority::Value</a> priority)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a <a class="el" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> for given <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> with given priority. <a href="#0f098bca471909b68d481c42eb925191"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#56fdacabeb88fd88e710d71d7515f2c4">~CategoryStream</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for <a class="el" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a>. <a href="#56fdacabeb88fd88e710d71d7515f2c4"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1Category.html">Category</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#8f6a60a93b3d359bc13fd3427a832be8">getCategory</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the destination <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> for this stream. <a href="#8f6a60a93b3d359bc13fd3427a832be8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72">Priority::Value</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#7ef550ca8278a00b7d10f88886445613">getPriority</a> () const throw ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the priority for this stream. <a href="#7ef550ca8278a00b7d10f88886445613"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#72075a7901477d973b22e4d9c3deae40">flush</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Flush the contents of the stream buffer to the <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> and empties the buffer. <a href="#72075a7901477d973b22e4d9c3deae40"></a><br></td></tr> <tr><td class="memTemplParams" nowrap colspan="2">template<typename T > </td></tr> <tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#19a62e6ea2e093a36eca048b7ff1ccdb">operator<<</a> (const T &t)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stream in arbitrary types and objects. <a href="#19a62e6ea2e093a36eca048b7ff1ccdb"></a><br></td></tr> <tr><td class="memTemplParams" nowrap colspan="2">template<typename T > </td></tr> <tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#e71d59232d13a30fa971a48eb17c3d6b">operator<<</a> (const std::string &t)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::streamsize </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#95f658aae4002f292b0c6b568a5a338e">width</a> (std::streamsize wide)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the <a class="el" href="classlog4cpp_1_1width.html">width</a> output on <a class="el" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a>. <a href="#95f658aae4002f292b0c6b568a5a338e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#1092cc8ba55ef54b8599d926708d7371">operator<<</a> (<a class="el" href="classlog4cpp_1_1CategoryStream.html#7f916b3d34c0c20d0238efc70b8bd4fe">cspf</a>)</td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">LOG4CPP_EXPORT friend <br class="typebreak"> <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#98e1bcf9c2e5a0ebd2bbc4110808962c">eol</a> (<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &os)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">eol manipulator <a href="#98e1bcf9c2e5a0ebd2bbc4110808962c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">LOG4CPP_EXPORT friend <br class="typebreak"> <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#2ae54e9301e735a12e5ccbc1bddb99eb">left</a> (<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &os)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">left manipulator <a href="#2ae54e9301e735a12e5ccbc1bddb99eb"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This class enables streaming simple types and objects to a category. <p> Use category.errorStream(), etc. to obtain a <a class="el" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> class. <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="7f916b3d34c0c20d0238efc70b8bd4fe"></a><!-- doxytag: member="log4cpp::CategoryStream::cspf" ref="7f916b3d34c0c20d0238efc70b8bd4fe" args=")(CategoryStream &)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>&(* <a class="el" href="classlog4cpp_1_1CategoryStream.html#7f916b3d34c0c20d0238efc70b8bd4fe">log4cpp::CategoryStream::cspf</a>)(<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &) </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="0f098bca471909b68d481c42eb925191"></a><!-- doxytag: member="log4cpp::CategoryStream::CategoryStream" ref="0f098bca471909b68d481c42eb925191" args="(Category &category, Priority::Value priority)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">log4cpp::CategoryStream::CategoryStream </td> <td>(</td> <td class="paramtype"><a class="el" href="classlog4cpp_1_1Category.html">Category</a> & </td> <td class="paramname"> <em>category</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72">Priority::Value</a> </td> <td class="paramname"> <em>priority</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Construct a <a class="el" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a> for given <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> with given priority. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>category</em> </td><td>The category this stream will send log messages to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>priority</em> </td><td>The priority the log messages will get or <a class="el" href="classlog4cpp_1_1Priority.html#e1b1901a7b2bea8190b286684eecc1afebdf006bbefb65f1d654594992ac4e4f">Priority::NOTSET</a> to silently discard any streamed in messages. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="56fdacabeb88fd88e710d71d7515f2c4"></a><!-- doxytag: member="log4cpp::CategoryStream::~CategoryStream" ref="56fdacabeb88fd88e710d71d7515f2c4" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">log4cpp::CategoryStream::~CategoryStream </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Destructor for <a class="el" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a>. <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="72075a7901477d973b22e4d9c3deae40"></a><!-- doxytag: member="log4cpp::CategoryStream::flush" ref="72075a7901477d973b22e4d9c3deae40" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void log4cpp::CategoryStream::flush </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Flush the contents of the stream buffer to the <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> and empties the buffer. <p> </div> </div><p> <a class="anchor" name="8f6a60a93b3d359bc13fd3427a832be8"></a><!-- doxytag: member="log4cpp::CategoryStream::getCategory" ref="8f6a60a93b3d359bc13fd3427a832be8" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classlog4cpp_1_1Category.html">Category</a>& log4cpp::CategoryStream::getCategory </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the destination <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a> for this stream. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The <a class="el" href="classlog4cpp_1_1Category.html" title="This is the central class in the log4j package.">Category</a>. </dd></dl> </div> </div><p> <a class="anchor" name="7ef550ca8278a00b7d10f88886445613"></a><!-- doxytag: member="log4cpp::CategoryStream::getPriority" ref="7ef550ca8278a00b7d10f88886445613" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classlog4cpp_1_1Priority.html#19c2e47a94a531d3028f7c545671ff72">Priority::Value</a> log4cpp::CategoryStream::getPriority </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const throw ()<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the priority for this stream. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The priority. </dd></dl> </div> </div><p> <a class="anchor" name="1092cc8ba55ef54b8599d926708d7371"></a><!-- doxytag: member="log4cpp::CategoryStream::operator<<" ref="1092cc8ba55ef54b8599d926708d7371" args="(cspf)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & log4cpp::CategoryStream::operator<< </td> <td>(</td> <td class="paramtype"><a class="el" href="classlog4cpp_1_1CategoryStream.html#7f916b3d34c0c20d0238efc70b8bd4fe">cspf</a> </td> <td class="paramname"> <em>pf</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="e71d59232d13a30fa971a48eb17c3d6b"></a><!-- doxytag: member="log4cpp::CategoryStream::operator<<" ref="e71d59232d13a30fa971a48eb17c3d6b" args="(const std::string &t)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename T > </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>& log4cpp::CategoryStream::operator<< </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>t</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <a class="anchor" name="19a62e6ea2e093a36eca048b7ff1ccdb"></a><!-- doxytag: member="log4cpp::CategoryStream::operator<<" ref="19a62e6ea2e093a36eca048b7ff1ccdb" args="(const T &t)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename T > </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>& log4cpp::CategoryStream::operator<< </td> <td>(</td> <td class="paramtype">const T & </td> <td class="paramname"> <em>t</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Stream in arbitrary types and objects. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>t</em> </td><td>The value or object to stream in. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A reference to itself. </dd></dl> </div> </div><p> <a class="anchor" name="95f658aae4002f292b0c6b568a5a338e"></a><!-- doxytag: member="log4cpp::CategoryStream::width" ref="95f658aae4002f292b0c6b568a5a338e" args="(std::streamsize wide)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::streamsize log4cpp::CategoryStream::width </td> <td>(</td> <td class="paramtype">std::streamsize </td> <td class="paramname"> <em>wide</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Set the <a class="el" href="classlog4cpp_1_1width.html">width</a> output on <a class="el" href="classlog4cpp_1_1CategoryStream.html" title="This class enables streaming simple types and objects to a category.">CategoryStream</a>. <p> </div> </div><p> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="98e1bcf9c2e5a0ebd2bbc4110808962c"></a><!-- doxytag: member="log4cpp::CategoryStream::eol" ref="98e1bcf9c2e5a0ebd2bbc4110808962c" args="(CategoryStream &os)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">LOG4CPP_EXPORT friend <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>& eol </td> <td>(</td> <td class="paramtype"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & </td> <td class="paramname"> <em>os</em> </td> <td> ) </td> <td><code> [friend]</code></td> </tr> </table> </div> <div class="memdoc"> <p> eol manipulator <p> </div> </div><p> <a class="anchor" name="2ae54e9301e735a12e5ccbc1bddb99eb"></a><!-- doxytag: member="log4cpp::CategoryStream::left" ref="2ae54e9301e735a12e5ccbc1bddb99eb" args="(CategoryStream &os)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">LOG4CPP_EXPORT friend <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>& left </td> <td>(</td> <td class="paramtype"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> & </td> <td class="paramname"> <em>os</em> </td> <td> ) </td> <td><code> [friend]</code></td> </tr> </table> </div> <div class="memdoc"> <p> left manipulator <p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="1015703b021c3e5114d46242d2adfa68"></a><!-- doxytag: member="log4cpp::CategoryStream::_buffer" ref="1015703b021c3e5114d46242d2adfa68" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1ostringstream.html">std::ostringstream</a>* <a class="el" href="classlog4cpp_1_1CategoryStream.html#1015703b021c3e5114d46242d2adfa68">log4cpp::CategoryStream::_buffer</a> </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="CategoryStream_8hh_source.html">CategoryStream.hh</a><li><a class="el" href="CategoryStream_8cpp.html">CategoryStream.cpp</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 26 19:34:33 2009 for log4cpp by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>