Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Genetic Algorithm Library

, 7 Apr 2012
A framework for genetic algorithms
galdemoapps.zip
TSP.exe
GeneticLibrary.dll
TestApp1.exe
TestApp2.exe
GaSchedule.exe
GaSchedule.cfg
GalDemoSource.zip
TestApp1
TestApp1.vcxproj.filters
TestApp2
TestApp2.vcxproj.filters
TSP
res
.svn
entries
prop-base
Toolbar.bmp.svn-base
TSP.ico.svn-base
props
text-base
Toolbar.bmp.svn-base
TSP.ico.svn-base
TSP.rc2.svn-base
tmp
prop-base
props
text-base
Toolbar.bmp
TSP.ico
TSP.vcxproj.filters
GaSchedule
Algorithm
GaSchedule.cfg
GaSchedule.vcxproj.filters
res
GaSchedule.ico
galdocumentation.zip
doxygen.png
Graphic
ab_cp.png
alg_st.png
a_cr.png
c_cp.png
i_cp.png
mp_cr.png
mv_cr.png
r_cp.png
s_cp.png
s_cr.png
galsource.zip
GeneticLibrary
build
release
gcc_bsd
gcc_linux
gcc_macos
gcc_solaris
icc_linux
icc_macos
icc_win
mingw
msvc
scc_solaris
makefiles
gcc_bsd_debug
gcc_bsd_release
gcc_linux_debug
gcc_linux_release
gcc_macos_debug
gcc_macos_release
gcc_solaris_debug
gcc_solaris_release
icc_linux_debug
icc_linux_release
icc_macos_debug
icc_macos_release
scc_solaris_debug
scc_solaris_release
source
vs
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Genetic Algorithm Library: Threading::GaCriticalSection 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.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</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="namespace_threading.html">Threading</a>::<a class="el" href="class_threading_1_1_ga_critical_section.html">GaCriticalSection</a>
  </div>
</div>
<div class="contents">
<h1>Threading::GaCriticalSection Class Reference</h1><!-- doxytag: class="Threading::GaCriticalSection" --><code><a class="el" href="class_threading_1_1_ga_critical_section.html" title="GaCriticalSection class is wrapper class for system synchronization object.">GaCriticalSection</a></code> class is wrapper class for system synchronization object.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;source/Threading.h&gt;</code>
<p>

<p>
<a href="class_threading_1_1_ga_critical_section-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_threading_1_1_ga_critical_section.html#7daa2649efd823014422a74ac9d75635">GaCriticalSection</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor performs system specific initialization of synchronization object if needed.  <a href="#7daa2649efd823014422a74ac9d75635"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_threading_1_1_ga_critical_section.html#6b1c30797be4a1e0dc3c20ef3c601221">~GaCriticalSection</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frees resources used by system synchronization object.  <a href="#6b1c30797be4a1e0dc3c20ef3c601221"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_threading_1_1_ga_critical_section.html#4cc96d7ecd66795f00f4f5022fbe8ff7">Lock</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>Lock</code> method acquires synchronization object and prevents other thread to access protected section simultaneously. If another thread had already acquired synchronization object current thread is put to sleep, and is waked when synchronization object is released.  <a href="#4cc96d7ecd66795f00f4f5022fbe8ff7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void GACALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_threading_1_1_ga_critical_section.html#c517b4515febfe15eeb12eb0132a1002">Unlock</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><code>Unlock</code> method release synchronization object and wakes threads which was put to wait for release of the object.  <a href="#c517b4515febfe15eeb12eb0132a1002"></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="el" href="namespace_threading.html#a83f689982d39ae995a27164fdd8386e">SysSyncObject</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_threading_1_1_ga_critical_section.html#3a5b834a909b38c83dfa792657ea4e4a">_section</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">System specific object used for synchronization of critical section.  <a href="#3a5b834a909b38c83dfa792657ea4e4a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<code><a class="el" href="class_threading_1_1_ga_critical_section.html" title="GaCriticalSection class is wrapper class for system synchronization object.">GaCriticalSection</a></code> class is wrapper class for system synchronization object. 
<p>
This class provides basic synchronization and protection from concurrent access to the objects and resources. Built-in synchronizators used in other classes are instances of <code><a class="el" href="class_threading_1_1_ga_critical_section.html" title="GaCriticalSection class is wrapper class for system synchronization object.">GaCriticalSection</a></code> class. <code>LOCK</code> and <code>UNLOCK</code> macros can operate on instances of this class. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="7daa2649efd823014422a74ac9d75635"></a><!-- doxytag: member="Threading::GaCriticalSection::GaCriticalSection" ref="7daa2649efd823014422a74ac9d75635" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Threading::GaCriticalSection::GaCriticalSection           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor performs system specific initialization of synchronization object if needed. 
<p>

</div>
</div><p>
<a class="anchor" name="6b1c30797be4a1e0dc3c20ef3c601221"></a><!-- doxytag: member="Threading::GaCriticalSection::~GaCriticalSection" ref="6b1c30797be4a1e0dc3c20ef3c601221" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Threading::GaCriticalSection::~GaCriticalSection           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Frees resources used by system synchronization object. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="4cc96d7ecd66795f00f4f5022fbe8ff7"></a><!-- doxytag: member="Threading::GaCriticalSection::Lock" ref="4cc96d7ecd66795f00f4f5022fbe8ff7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GACALL Threading::GaCriticalSection::Lock           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>Lock</code> method acquires synchronization object and prevents other thread to access protected section simultaneously. If another thread had already acquired synchronization object current thread is put to sleep, and is waked when synchronization object is released. 
<p>

</div>
</div><p>
<a class="anchor" name="c517b4515febfe15eeb12eb0132a1002"></a><!-- doxytag: member="Threading::GaCriticalSection::Unlock" ref="c517b4515febfe15eeb12eb0132a1002" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GACALL Threading::GaCriticalSection::Unlock           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<code>Unlock</code> method release synchronization object and wakes threads which was put to wait for release of the object. 
<p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="3a5b834a909b38c83dfa792657ea4e4a"></a><!-- doxytag: member="Threading::GaCriticalSection::_section" ref="3a5b834a909b38c83dfa792657ea4e4a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_threading.html#a83f689982d39ae995a27164fdd8386e">SysSyncObject</a> <a class="el" href="class_threading_1_1_ga_critical_section.html#3a5b834a909b38c83dfa792657ea4e4a">Threading::GaCriticalSection::_section</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
System specific object used for synchronization of critical section. 
<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>source/<a class="el" href="_threading_8h.html">Threading.h</a></ul>
</div>
<br/><a href="http://www.coolsoft-sd.com/ProductVersion.aspx?vid=9">Genetic Algorithm Library</a><br/><a href="http://www.coolsoft-sd.com/">Coolsoft Software Development</a>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Mladen Janković
Software Developer
Serbia Serbia
No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 7 Apr 2012
Article Copyright 2008 by Mladen Janković
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid