Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > abaab48f26603db3a2bcf7befcb26cf3 > files > 51

lib64rlog-devel-1.4-9.mga6.x86_64.rpm

<!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>rlog: rlog::RLogPublisher Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.0 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<b>rlog</b>::<a class="el" href="classrlog_1_1RLogPublisher.html">RLogPublisher</a></div>
<h1>rlog::RLogPublisher Class Reference</h1><!-- doxytag: class="rlog::RLogPublisher" --><!-- doxytag: inherits="rlog::RLogNode" -->RLog publisher used by rLog macros.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="RLogPublisher_8h-source.html">rlog/RLogPublisher.h</a>&gt;</code>
<p>
<p>Inheritance diagram for rlog::RLogPublisher:
<p><center><img src="classrlog_1_1RLogPublisher.png" usemap="#rlog::RLogPublisher_map" border="0" alt=""></center>
<map name="rlog::RLogPublisher_map">
<area href="classrlog_1_1RLogNode.html" alt="rlog::RLogNode" shape="rect" coords="0,0,122,24">
</map>
<a href="classrlog_1_1RLogPublisher-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 Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="be407b7fbe4b5b900fe04a5abc4f9557"></a><!-- doxytag: member="rlog::RLogPublisher::RLogPublisher" ref="be407b7fbe4b5b900fe04a5abc4f9557" args="(PublishLoc *src)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>RLogPublisher</b> (<a class="el" href="structrlog_1_1PublishLoc.html">PublishLoc</a> *src)</td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="009244ef46f98f3f09a08e3eb3c8d7ee"></a><!-- doxytag: member="rlog::RLogPublisher::Publish" ref="009244ef46f98f3f09a08e3eb3c8d7ee" args="(PublishLoc *, RLogChannel *, const char *format,...)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><b>Publish</b> (<a class="el" href="structrlog_1_1PublishLoc.html">PublishLoc</a> *, <a class="el" href="classrlog_1_1RLogChannel.html">RLogChannel</a> *, const char *format,...)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="be63b2176ef309c09e2d3f05a91aea4b"></a><!-- doxytag: member="rlog::RLogPublisher::PublishVA" ref="be63b2176ef309c09e2d3f05a91aea4b" args="(PublishLoc *, RLogChannel *, const char *format, va_list args)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><b>PublishVA</b> (<a class="el" href="structrlog_1_1PublishLoc.html">PublishLoc</a> *, <a class="el" href="classrlog_1_1RLogChannel.html">RLogChannel</a> *, const char *format, va_list args)</td></tr>

<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="82e59ee4e7bdc7383d003bf5261ab4cc"></a><!-- doxytag: member="rlog::RLogPublisher::src" ref="82e59ee4e7bdc7383d003bf5261ab4cc" args="" -->
<a class="el" href="structrlog_1_1PublishLoc.html">PublishLoc</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>src</b></td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classrlog_1_1RLogPublisher.html#9df30b60c4c8e4ca76e961c3c7470d2d">setEnabled</a> (bool newState)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">For derived classes to get notified of activation status change.  <a href="#9df30b60c4c8e4ca76e961c3c7470d2d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="47d83509f4622881dcf143aec7b6521e"></a><!-- doxytag: member="rlog::RLogPublisher::RLogPublisher" ref="47d83509f4622881dcf143aec7b6521e" args="(const RLogPublisher &amp;)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>RLogPublisher</b> (const <a class="el" href="classrlog_1_1RLogPublisher.html">RLogPublisher</a> &amp;)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6601f91a9552dfd8e8c000dc71f2ddb4"></a><!-- doxytag: member="rlog::RLogPublisher::operator=" ref="6601f91a9552dfd8e8c000dc71f2ddb4" args="(const RLogPublisher &amp;)" -->
<a class="el" href="classrlog_1_1RLogPublisher.html">RLogPublisher</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classrlog_1_1RLogPublisher.html">RLogPublisher</a> &amp;)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
RLog publisher used by rLog macros. 
<p>
This derives from <a class="el" href="classrlog_1_1RLogNode.html">RLogNode</a> and interfaces to the static <a class="el" href="structrlog_1_1PublishLoc.html">PublishLoc</a> logging data allowing them to be enabled or disabled depending on subscriber status.<p>
An instance of this class is created for every error message location. Normally this class is not used directly.<p>
For example, this <div class="fragment"><pre class="fragment">     <a class="code" href="group__RLogMacros.html#ge8be8a2d2e9da76cb70e2f29e0801f73">rDebug</a>( <span class="stringliteral">"hello world"</span> );
</pre></div><p>
is turned approximatly into this: <div class="fragment"><pre class="fragment">     <span class="keyword">static</span> PublishLoc _rl = {
         <a class="code" href="classrlog_1_1RLogNode.html#798da2f13a0d98a48c8ba454ca460b88">publish</a>:  &amp; rlog::RLog_Register ,
         pub: 0,
         component: <span class="stringliteral">"component"</span>,
         fileName: <span class="stringliteral">"myfile.cpp"</span>,
         functionName: <span class="stringliteral">"functionName()"</span>,
         lineNum: __LINE__,
         channel: 0
     };
     <span class="keywordflow">if</span>(_rL.publish != 0)
         (*_rl.publish)( &amp;_rL, _RLDebugChannel, <span class="stringliteral">"hello world"</span> );
</pre></div><p>
The <a class="el" href="classrlog_1_1RLogPublisher.html">RLogPublisher</a> instance manages the contents of the static structure _rL. When someone subscribes to it's message, then _rL.publish is set to point to the publishing function, and when there are no subscribers then it is set to 0.<p>
The code produced contains one if statement, and with optimization comes out to about 3 instructions on an x86 computer (not including the function call). If there are no subscribers to this message then that is all the overhead, plus the memory usage for the structures involved and the initial registration when the statement is first encountered..<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classrlog_1_1RLogChannel.html">RLogChannel</a> </dd></dl>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Valient Gough </dd></dl>

<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="9df30b60c4c8e4ca76e961c3c7470d2d"></a><!-- doxytag: member="rlog::RLogPublisher::setEnabled" ref="9df30b60c4c8e4ca76e961c3c7470d2d" args="(bool newState)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RLogPublisher::setEnabled           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>newState</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
For derived classes to get notified of activation status change. 
<p>
This is called by <a class="el" href="classrlog_1_1RLogNode.html#0666eb2417ed152d59fb8144c1990793">isInterested()</a> when our state changes. If <em>true</em> is passed, then this node has become active. If <em>false</em> is passed, then this node has just become dormant. 
<p>
Reimplemented from <a class="el" href="classrlog_1_1RLogNode.html#356356b9eb9f668a5d7326cc10518f55">rlog::RLogNode</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="RLogPublisher_8h-source.html">RLogPublisher.h</a><li>RLogPublisher.cpp</ul>
<hr size="1"><address style="align: right;"><small>Generated on Mon Nov 20 22:57:45 2006 for rlog by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>
</body>
</html>