Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 4da0df31c82e4012a4c60f3f1114a1ca > files > 39

cpptest-devel-1.1.1-1.fc14.x86_64.rpm

<html>
<head>
    <title>CppTest - A C++ Unit Testing Framework</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css">
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>

<body bgcolor="#ffffff"> 
    <table width="100%">
    <tr>
        <td width="40%" align="right" valign="center">
            <a href="http://cpptest.sourceforge.net">CppTest home page</a>
        </td>
        <td></td>
        <td width="40%" align="left" valign="center">
            <a href="http://sourceforge.net/projects/cpptest">CppTest project page</a>
        </td>
    </tr>
    </table>
    <hr>

<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&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="navpath"><a class="el" href="namespaceTest.html">Test</a>::<a class="el" href="classTest_1_1Time.html">Time</a>
  </div>
</div>
<div class="contents">
<h1>Test::Time Class Reference</h1><!-- doxytag: class="Test::Time" -->
<p>Time representation.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="cpptest-time_8h_source.html">cpptest-time.h</a>&gt;</code></p>

<p><a href="classTest_1_1Time-members.html">List of all members.</a></p>
<h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="classTest_1_1Time.html#ae5c1089d2eb013c5b908ea95d924b733">Time</a> ()
<li><a class="el" href="classTest_1_1Time.html#afdc9c0556b8d71ecd8d621c2512154a5">Time</a> (unsigned int sec, unsigned int usec)
<li>unsigned int <a class="el" href="classTest_1_1Time.html#a975b1bc3018cb82c5781edcbff7f32ff">seconds</a> () const 
<li>unsigned int <a class="el" href="classTest_1_1Time.html#aee6b32be83b644a59ad89e539775ee54">microseconds</a> () const 
</ul>
<h2>Static Public Member Functions</h2>
<ul>
<li>static <a class="el" href="classTest_1_1Time.html">Time</a> <a class="el" href="classTest_1_1Time.html#abb7a2480a7497c894994793da1a7b111">current</a> ()
</ul>
<h2>Friends</h2>
<ul>
<li><a class="el" href="classTest_1_1Time.html">Time</a> <a class="el" href="classTest_1_1Time.html#ae2e555aa5b5c51e44b576d8baf48a2cd">operator+</a> (const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;t1, const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;t2)
<li><a class="el" href="classTest_1_1Time.html">Time</a> <a class="el" href="classTest_1_1Time.html#a09225563b0b317910b26c550ba74de64">operator-</a> (const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;t1, const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;t2)
<li><a class="anchor" id="a0287b008277738b9882ed96467e8b4f8"></a><!-- doxytag: member="Test::Time::operator&lt;&lt;" ref="a0287b008277738b9882ed96467e8b4f8" args="(std::ostream &amp;os, const Time &amp;t)" -->
std::ostream &amp; <b>operator&lt;&lt;</b> (std::ostream &amp;os, const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;t)
</ul>
<h2>Related Functions</h2>
<p>(Note that these are not member functions.) </p>
<ul>
<li>ostream &amp; <a class="el" href="classTest_1_1Time.html#a5b08e472543c1992d2cadde99da4193b">operator&lt;&lt;</a> (ostream &amp;os, const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;t)
</ul>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Time representation. </p>
<p>Encapsulates a time value with microsecond resolution. It is possible to retrieve the current time, add and subtract time values, and output the time to an output stream. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae5c1089d2eb013c5b908ea95d924b733"></a><!-- doxytag: member="Test::Time::Time" ref="ae5c1089d2eb013c5b908ea95d924b733" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Test::Time::Time </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs a time object with zeroed time. </p>

<p>Referenced by <a class="el" href="time_8cpp_source.html#l00090">current()</a>.</p>

</div>
</div>
<a class="anchor" id="afdc9c0556b8d71ecd8d621c2512154a5"></a><!-- doxytag: member="Test::Time::Time" ref="afdc9c0556b8d71ecd8d621c2512154a5" args="(unsigned int sec, unsigned int usec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Test::Time::Time </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>sec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>usec</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs a time object.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sec</em>&nbsp;</td><td>Seconds. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>usec</em>&nbsp;</td><td>Micro-seconds. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a975b1bc3018cb82c5781edcbff7f32ff"></a><!-- doxytag: member="Test::Time::seconds" ref="a975b1bc3018cb82c5781edcbff7f32ff" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Test::Time::seconds </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>Seconds. </dd></dl>

<p>Referenced by <a class="el" href="time_8cpp_source.html#l00159">operator&lt;&lt;()</a>.</p>

</div>
</div>
<a class="anchor" id="aee6b32be83b644a59ad89e539775ee54"></a><!-- doxytag: member="Test::Time::microseconds" ref="aee6b32be83b644a59ad89e539775ee54" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Test::Time::microseconds </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>Micro-seconds. </dd></dl>

<p>Referenced by <a class="el" href="time_8cpp_source.html#l00159">operator&lt;&lt;()</a>.</p>

</div>
</div>
<a class="anchor" id="abb7a2480a7497c894994793da1a7b111"></a><!-- doxytag: member="Test::Time::current" ref="abb7a2480a7497c894994793da1a7b111" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classTest_1_1Time.html">Time</a> Test::Time::current </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>The current time. </dd></dl>

<p>References <a class="el" href="time_8cpp_source.html#l00056">Time()</a>.</p>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="ae2e555aa5b5c51e44b576d8baf48a2cd"></a><!-- doxytag: member="Test::Time::operator+" ref="ae2e555aa5b5c51e44b576d8baf48a2cd" args="(const Time &amp;t1, const Time &amp;t2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classTest_1_1Time.html">Time</a> operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>t1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>t2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Adds two time values.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>t1</em>&nbsp;</td><td>Left-hand time. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>t2</em>&nbsp;</td><td>Right-hand time.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Computed time value. </dd></dl>

</div>
</div>
<a class="anchor" id="a09225563b0b317910b26c550ba74de64"></a><!-- doxytag: member="Test::Time::operator&#45;" ref="a09225563b0b317910b26c550ba74de64" args="(const Time &amp;t1, const Time &amp;t2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classTest_1_1Time.html">Time</a> operator- </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>t1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>t2</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Computes the time elapsed between two time values.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>t1</em>&nbsp;</td><td>Left-hand time, should be greater than <em>t2</em>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>t2</em>&nbsp;</td><td>Right-hand time, should be less than <em>t1</em>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Computed time value. </dd></dl>

</div>
</div>
<a class="anchor" id="a5b08e472543c1992d2cadde99da4193b"></a><!-- doxytag: member="Test::Time::operator&lt;&lt;" ref="a5b08e472543c1992d2cadde99da4193b" args="(ostream &amp;os, const Time &amp;t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ostream &amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">ostream &amp;&nbsp;</td>
          <td class="paramname"> <em>os</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classTest_1_1Time.html">Time</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>t</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Outputs a time to an output stream.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>os</em>&nbsp;</td><td><a class="el" href="classTest_1_1Output.html" title="Test suite output handler.">Output</a> stream to write to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>t</em>&nbsp;</td><td>Time to output.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to the given output stream. </dd></dl>

<p>References <a class="el" href="time_8cpp_source.html#l00082">microseconds()</a>, and <a class="el" href="time_8cpp_source.html#l00074">seconds()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="cpptest-time_8h_source.html">cpptest-time.h</a></li>
<li>time.cpp</li>
</ul>
</div>
    <hr>
    <div align="center">
        Supported by:
        <br><br>
        <img src="http://sourceforge.net/sflogo.php?group_id=77564"
             width="88" height="31" border="0" alt="SourceForge Logo"></a>
    </div>
</body> 
</html>