Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e6f1a3debfddb2a6cccaab627266a0ea > files > 4818

mrpt-doc-0.9.0-0.5.fc14.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>The MRPT project: mrpt::synch::CCriticalSection Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<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>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</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="namespacemrpt.html">mrpt</a>::<a class="el" href="namespacemrpt_1_1synch.html">synch</a>::<a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html">CCriticalSection</a>
  </div>
</div>
<div class="contents">
<h1>mrpt::synch::CCriticalSection Class Reference</h1><!-- doxytag: class="mrpt::synch::CCriticalSection" -->
<p>This class provides simple critical sections functionality.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_c_critical_section_8h_source.html">mrpt/synch/CCriticalSection.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for mrpt::synch::CCriticalSection:</div>
<div class="dynsection">
<div class="center"><img src="classmrpt_1_1synch_1_1_c_critical_section__coll__graph.png" border="0" usemap="#mrpt_1_1synch_1_1_c_critical_section_coll__map" alt="Collaboration graph"/></div>
<map name="mrpt_1_1synch_1_1_c_critical_section_coll__map" id="mrpt_1_1synch_1_1_c_critical_section_coll__map">
<area shape="rect" id="node2" href="classmrpt_1_1utils_1_1_c_stream.html" title="This base class is used to provide a unified interface to files,memory buffers,...." alt="" coords="5,533,144,563"/><area shape="rect" id="node4" title="STL class." alt="" coords="168,533,248,563"/><area shape="rect" id="node6" title="STL class." alt="" coords="116,453,281,483"/><area shape="rect" id="node8" href="classmrpt_1_1utils_1_1_c_referenced_mem_block.html" title="Represents a memory block (via &quot;void*&quot;) that can be shared between several..." alt="" coords="276,533,503,563"/><area shape="rect" id="node10" href="classstlplus_1_1smart__ptr.html" title="stlplus::smart_ptr\&lt; vector_byte \&gt;" alt="" coords="305,453,519,483"/><area shape="rect" id="node12" href="classstlplus_1_1smart__ptr__base.html" title="stlplus::smart_ptr_base\&lt; vector_byte, constructor_copy\&lt; vector_byte \&gt; \&gt;" alt="" coords="187,373,637,403"/><area shape="rect" id="node14" href="classstlplus_1_1smart__ptr__holder.html" title="stlplus::smart_ptr_holder\&lt; vector_byte \&gt;" alt="" coords="284,277,540,307"/><area shape="rect" id="node16" href="structmrpt_1_1mrpt__base__vector.html" title="Numeric vectors compatible with mrpt/math/ops_containers.h:." alt="" coords="123,181,349,211"/><area shape="rect" id="node18" title="STL class." alt="" coords="161,101,311,131"/><area shape="rect" id="node22" href="classmrpt_1_1synch_1_1_c_atomic_counter.html" title="This class acts exactly as an int (or long) variable, but with atomic increment and..." alt="" coords="373,181,568,211"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classmrpt_1_1synch_1_1_c_critical_section-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a7707a085d099af8c744dbc199ad7a329">CCriticalSection</a> (const char *name=NULL)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#a7707a085d099af8c744dbc199ad7a329"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a746eb59b31a2a00f04f66ee36d2207a5">~CCriticalSection</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#a746eb59b31a2a00f04f66ee36d2207a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a10c531e3bd482d9b54ddb83d8a95566c">enter</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enter.  <a href="#a10c531e3bd482d9b54ddb83d8a95566c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a933e6e22808e8e311cd980837547ef68">leave</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Leave </p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>If</em>&nbsp;</td><td>the calling thread is not the current owener of the critical section. </td></tr>
  </table>
  </dd>
</dl>
 <a href="#a933e6e22808e8e311cd980837547ef68"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#aa53d710a5437a061a64427a4bb8f54b9">getName</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the name used in the constructor.  <a href="#aa53d710a5437a061a64427a4bb8f54b9"></a><br/></td></tr>
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmrpt_1_1utils_1_1_c_stream.html">utils::CStream</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#ad9b7e77f9b0f54091956555da67d1e17">m_debugOut</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If set to a non-NULL value, debug messages regarding the calling threads IDs will be output.  <a href="#ad9b7e77f9b0f54091956555da67d1e17"></a><br/></td></tr>
<tr><td colspan="2"><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmrpt_1_1utils_1_1_c_referenced_mem_block.html">utils::CReferencedMemBlock</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a8b446364cac14c330ba611d948f134e8">m_data</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The OS-dependent descriptors.  <a href="#a8b446364cac14c330ba611d948f134e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a5d5ff1942bbc7a5218081dca3c96e7a6">m_name</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class provides simple critical sections functionality. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section_locker.html" title="A class acquiring a CCriticalSection at its constructor, and releasing it at destructor...">CCriticalSectionLocker</a> </dd></dl>

<p>Definition at line <a class="el" href="_c_critical_section_8h_source.html#l00047">47</a> of file <a class="el" href="_c_critical_section_8h_source.html">CCriticalSection.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7707a085d099af8c744dbc199ad7a329"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::CCriticalSection" ref="a7707a085d099af8c744dbc199ad7a329" args="(const char *name=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mrpt::synch::CCriticalSection::CCriticalSection </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em> = <code>NULL</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>

</div>
</div>
<a class="anchor" id="a746eb59b31a2a00f04f66ee36d2207a5"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::~CCriticalSection" ref="a746eb59b31a2a00f04f66ee36d2207a5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mrpt::synch::CCriticalSection::~CCriticalSection </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a10c531e3bd482d9b54ddb83d8a95566c"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::enter" ref="a10c531e3bd482d9b54ddb83d8a95566c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::synch::CCriticalSection::enter </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enter. </p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>If</em>&nbsp;</td><td>the calling thread already possesses this critical section (it would be a dead-lock). </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="_m_t__buffer_8h_source.html#l00068">mrpt::synch::MT_buffer::appendData()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00052">mrpt::synch::MT_buffer::clear()</a>, <a class="el" href="_c_console_redirector_8h_source.html#l00113">mrpt::utils::CConsoleRedirector::overflow()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00083">mrpt::synch::MT_buffer::read()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00075">mrpt::synch::MT_buffer::readAndClear()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00059">mrpt::synch::MT_buffer::size()</a>, and <a class="el" href="_c_console_redirector_8h_source.html#l00134">mrpt::utils::CConsoleRedirector::sync()</a>.</p>

</div>
</div>
<a class="anchor" id="aa53d710a5437a061a64427a4bb8f54b9"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::getName" ref="aa53d710a5437a061a64427a4bb8f54b9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string mrpt::synch::CCriticalSection::getName </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the name used in the constructor. </p>

<p>Definition at line <a class="el" href="_c_critical_section_8h_source.html#l00073">73</a> of file <a class="el" href="_c_critical_section_8h_source.html">CCriticalSection.h</a>.</p>

</div>
</div>
<a class="anchor" id="a933e6e22808e8e311cd980837547ef68"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::leave" ref="a933e6e22808e8e311cd980837547ef68" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::synch::CCriticalSection::leave </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Leave </p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>If</em>&nbsp;</td><td>the calling thread is not the current owener of the critical section. </td></tr>
  </table>
  </dd>
</dl>
</p>

<p>Referenced by <a class="el" href="_m_t__buffer_8h_source.html#l00068">mrpt::synch::MT_buffer::appendData()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00052">mrpt::synch::MT_buffer::clear()</a>, <a class="el" href="_c_console_redirector_8h_source.html#l00113">mrpt::utils::CConsoleRedirector::overflow()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00083">mrpt::synch::MT_buffer::read()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00075">mrpt::synch::MT_buffer::readAndClear()</a>, <a class="el" href="_m_t__buffer_8h_source.html#l00059">mrpt::synch::MT_buffer::size()</a>, and <a class="el" href="_c_console_redirector_8h_source.html#l00134">mrpt::utils::CConsoleRedirector::sync()</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a8b446364cac14c330ba611d948f134e8"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::m_data" ref="a8b446364cac14c330ba611d948f134e8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classmrpt_1_1utils_1_1_c_referenced_mem_block.html">utils::CReferencedMemBlock</a> <a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a8b446364cac14c330ba611d948f134e8">mrpt::synch::CCriticalSection::m_data</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The OS-dependent descriptors. </p>

<p>Definition at line <a class="el" href="_c_critical_section_8h_source.html#l00050">50</a> of file <a class="el" href="_c_critical_section_8h_source.html">CCriticalSection.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad9b7e77f9b0f54091956555da67d1e17"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::m_debugOut" ref="ad9b7e77f9b0f54091956555da67d1e17" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classmrpt_1_1utils_1_1_c_stream.html">utils::CStream</a>* <a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#ad9b7e77f9b0f54091956555da67d1e17">mrpt::synch::CCriticalSection::m_debugOut</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>If set to a non-NULL value, debug messages regarding the calling threads IDs will be output. </p>

<p>Definition at line <a class="el" href="_c_critical_section_8h_source.html#l00077">77</a> of file <a class="el" href="_c_critical_section_8h_source.html">CCriticalSection.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5d5ff1942bbc7a5218081dca3c96e7a6"></a><!-- doxytag: member="mrpt::synch::CCriticalSection::m_name" ref="a5d5ff1942bbc7a5218081dca3c96e7a6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html#a5d5ff1942bbc7a5218081dca3c96e7a6">mrpt::synch::CCriticalSection::m_name</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_critical_section_8h_source.html#l00052">52</a> of file <a class="el" href="_c_critical_section_8h_source.html">CCriticalSection.h</a>.</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.6.2-20100208</a> for MRPT 0.9.0 SVN: at Wed Jul 14 12:48:09 UTC 2010</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table> </body></html>