⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classlog4cpp_1_1categorystream.html

📁 log4cpp 的参考文档, 一个非常好用的C++ log 类库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>log4cpp: log4cpp::CategoryStream Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><div class="nav"><a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a></div><h1>log4cpp::CategoryStream Class Reference</h1>This class enables streaming simple types and objects to a category.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="CategoryStream_8hh-source.html">CategoryStream.hh</a>&gt;</code><p>Collaboration diagram for log4cpp::CategoryStream:<p><center><img src="classlog4cpp_1_1CategoryStream__coll__graph.png" border="0" usemap="#log4cpp_1_1CategoryStream__coll__map" alt="Collaboration graph"></center><map name="log4cpp_1_1CategoryStream__coll__map"><area href="classstd_1_1ostringstream.html" shape="rect" coords="8,9,136,33" alt=""><area href="classlog4cpp_1_1Category.html" shape="rect" coords="160,9,290,33" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><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> &amp;(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#w0">cspf</a> )(<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#w3">Separator</a> { <a class="el" href="classlog4cpp_1_1CategoryStream.html#w3w1">ENDLINE</a> =  0, <a class="el" href="classlog4cpp_1_1CategoryStream.html#w3w2">EOL</a> =  0 }</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enumeration of special 'Separators'.  <a href="classlog4cpp_1_1CategoryStream.html#w3">More...</a><br></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a0">CategoryStream</a> (<a class="el" href="classlog4cpp_1_1Category.html">Category</a> &amp;category, <a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> priority)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> for given <a class="el" href="classlog4cpp_1_1Category.html">Category</a> with given priority.  <a href="#a0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a1">~CategoryStream</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor for <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>.  <a href="#a1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1Category.html">Category</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a2">getCategory</a> () const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the destination <a class="el" href="classlog4cpp_1_1Category.html">Category</a> for this stream.  <a href="#a2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a3">getPriority</a> () const   throw ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the priority for this stream.  <a href="#a3"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a4">operator&lt;&lt;</a> (<a class="el" href="classlog4cpp_1_1CategoryStream.html#w3">Separator</a> separator)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Streams in a Separator.  <a href="#a4"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a5">flush</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flush the contents of the stream buffer to the <a class="el" href="classlog4cpp_1_1Category.html">Category</a> and empties the buffer.  <a href="#a5"></a><br></td></tr><tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr><tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a6">operator&lt;&lt;</a> (const T &amp;t)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stream in arbitrary types and objects.  <a href="#a6"></a><br></td></tr><tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr><tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a7">operator&lt;&lt;</a> (const std::string &amp;t)</td></tr><tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr><tr><td class="memTemplItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a8">operator&lt;&lt;</a> (const std::wstring &amp;t)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">std::streamsize&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a9">width</a> (std::streamsize wide)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the width output on <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>.  <a href="#a9"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#a10">operator&lt;&lt;</a> (<a class="el" href="classlog4cpp_1_1CategoryStream.html#w0">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 <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#n0">eol</a> (<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;os)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">eol manipulator  <a href="#n0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">LOG4CPP_EXPORT <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1CategoryStream.html#n1">left</a> (<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;os)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">left manipulator  <a href="#n1"></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">CategoryStream</a> class. <p><hr><h2>Member Typedef Documentation</h2><a class="anchor" name="w0" doxytag="log4cpp::CategoryStream::cspf"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">typedef <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>&amp;(* <a class="el" href="classlog4cpp_1_1CategoryStream.html#w0">log4cpp::CategoryStream::cspf</a>)(<a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> &amp;)          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr><h2>Member Enumeration Documentation</h2><a class="anchor" name="w3" doxytag="log4cpp::CategoryStream::Separator"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">enum <a class="el" href="classlog4cpp_1_1CategoryStream.html#w3">log4cpp::CategoryStream::Separator</a>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Enumeration of special 'Separators'. <p>Currently only contains the 'ENDLINE' separator, which separates two log messages. <dl compact><dt><b>Enumeration values: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em><a class="anchor" name="w3w1" doxytag="ENDLINE"></a>ENDLINE</em>&nbsp;</td><td></td></tr><tr><td valign="top"><em><a class="anchor" name="w3w2" doxytag="EOL"></a>EOL</em>&nbsp;</td><td></td></tr></table></dl>    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="a0" doxytag="log4cpp::CategoryStream::CategoryStream"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">log4cpp::CategoryStream::CategoryStream           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classlog4cpp_1_1Category.html">Category</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>category</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a>&nbsp;</td>          <td class="mdname" nowrap> <em>priority</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Construct a <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a> for given <a class="el" href="classlog4cpp_1_1Category.html">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>&nbsp;</td><td>The category this stream will send log messages to. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>priority</em>&nbsp;</td><td>The priority the log messages will get or <a class="el" href="classlog4cpp_1_1Priority.html#w11w10">Priority::NOTSET</a> to silently discard any streamed in messages. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a1" doxytag="log4cpp::CategoryStream::~CategoryStream"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">log4cpp::CategoryStream::~CategoryStream           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Destructor for <a class="el" href="classlog4cpp_1_1CategoryStream.html">CategoryStream</a>. <p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a5" doxytag="log4cpp::CategoryStream::flush"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void log4cpp::CategoryStream::flush           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Flush the contents of the stream buffer to the <a class="el" href="classlog4cpp_1_1Category.html">Category</a> and empties the buffer. <p>    </td>  </tr></table><a class="anchor" name="a2" doxytag="log4cpp::CategoryStream::getCategory"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="classlog4cpp_1_1Category.html">Category</a>&amp; log4cpp::CategoryStream::getCategory           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Returns the destination <a class="el" href="classlog4cpp_1_1Category.html">Category</a> for this stream. <p><dl compact><dt><b>Returns:</b></dt><dd>The <a class="el" href="classlog4cpp_1_1Category.html">Category</a>. </dd></dl>    </td>  </tr></table><a class="anchor" name="a3" doxytag="log4cpp::CategoryStream::getPriority"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="classlog4cpp_1_1Priority.html#w0">Priority::Value</a> log4cpp::CategoryStream::getPriority           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const  throw ()<code> [inline]</code></td>        </tr>      </table>    </td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -