paradiseo/trunk/paradiseo-eo/doc/html/classeo_procedure_counter.html
legrand c3aec878e5 Paradiseo-eo sources added
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
2006-12-12 14:49:08 +00:00

93 lines
6.1 KiB
HTML

<!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>EO: eoProcedureCounter&lt; Procedure &gt; Class Template Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"> <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</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="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>eoProcedureCounter&lt; Procedure &gt; Class Template Reference</h1>Generic counter class that counts the number of times a procedure is used.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="eo_counter_8h-source.html">eoCounter.h</a>&gt;</code>
<p>
<p>Inheritance diagram for eoProcedureCounter&lt; Procedure &gt;:
<p><center><img src="classeo_procedure_counter.png" usemap="#eoProcedureCounter< Procedure >_map" border="0" alt=""></center>
<map name="eoProcedureCounter< Procedure >_map">
<area href="classeo_value_param.html" alt="eoValueParam< unsigned long >" shape="rect" coords="0,56,215,80">
<area href="classeo_param.html" alt="eoParam" shape="rect" coords="0,0,215,24">
</map>
<a href="classeo_procedure_counter-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="a0" doxytag="eoProcedureCounter::eoProcedureCounter"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><b>eoProcedureCounter</b> (Procedure &amp;_proc, std::string _name="proc_counter")</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">Procedure::result_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_procedure_counter.html#a1">operator()</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calls the embedded function and increments the counter. <a href="#a1"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="r0" doxytag="eoProcedureCounter::proc"></a>
Procedure &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>proc</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class Procedure&gt;<br>
class eoProcedureCounter&lt; Procedure &gt;</h3>
Generic counter class that counts the number of times a procedure is used.
<p>
Add a procedure through its ctor and use this class instead of it.<p>
It is derived from <a class="el" href="classeo_value_param.html">eoValueParam</a> so you can add it to a monitor.
<p>
<p>
Definition at line <a class="el" href="eo_counter_8h-source.html#l00041">41</a> of file <a class="el" href="eo_counter_8h-source.html">eoCounter.h</a>.<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a1" doxytag="eoProcedureCounter::operator()"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class Procedure&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top">Procedure::result_type <a class="el" href="classeo_procedure_counter.html">eoProcedureCounter</a>&lt; Procedure &gt;::operator() </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">void&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Calls the embedded function and increments the counter.
<p>
Note for MSVC users, if this code does not compile, you are quite likely trying to count a function that has a non-void return type. Don't look at us, look at the MSVC builders. Code like "return void;" is perfectly legal according to the ANSI standard, but the guys at Microsoft didn't get to implementing it yet.<p>
We had two choices: assuming (and compiling ) code that returns void or code that returns non-void. Given that in <a class="el" href="class_e_o.html">EO</a> most functors return void, it was chosen to support void.<p>
But also please let me know if you have a compiler that defines _MSC_VER (lot's of windows compilers do), but is quite capable of compiling return void; type of code. We'll try to change the signature then.<p>
You happy GNU (and other compiler) users will not have a problem with this..
<p>
Definition at line <a class="el" href="eo_counter_8h-source.html#l00064">64</a> of file <a class="el" href="eo_counter_8h-source.html">eoCounter.h</a>.
<p>
References <a class="el" href="eo_param_8h-source.html#l00166">eoValueParam&lt; unsigned long &gt;::value()</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="eo_counter_8h-source.html">eoCounter.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 19 05:06:53 2006 for EO by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
</body>
</html>