Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1099

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: csThread Class Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.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="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <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>
<h1>csThread Class Reference</h1><!-- doxytag: class="csThread" --><!-- doxytag: inherits="csRefCount" -->Representation of a thread of executation.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="thread_8h-source.html">csutil/thread.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for csThread:</div>
<div class="dynsection">
<p><center><img src="classcsThread__inherit__graph.png" border="0" usemap="#csThread__inherit__map" alt="Inheritance graph"></center>
<map name="csThread__inherit__map">
<area shape="rect" href="classcsRefCount.html" title="This is a class which provides basic reference&#45;counting semantics." alt="" coords="5,7,101,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classcsThread-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">virtual char const *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#af89f594c671284f54fd2ae5cbf1bd57">GetLastError</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the last error description, else 0 if there was none.  <a href="#af89f594c671284f54fd2ae5cbf1bd57"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="thread_8h.html#3d607d7f8fb2cff5e7a70ac8ba03afb3">csThreadPriority</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#ce8a2c1f9445641538c4f50ebc2c5944">GetPriority</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the current execution priority of this thread.  <a href="#ce8a2c1f9445641538c4f50ebc2c5944"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#79338324aa559bd800818ee693c0e2e8">SetPriority</a> (<a class="el" href="thread_8h.html#3d607d7f8fb2cff5e7a70ac8ba03afb3">csThreadPriority</a> Priority)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the current execution priority of this thread.  <a href="#79338324aa559bd800818ee693c0e2e8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#ebaf0314c2f2378445f20b8b6d379407">Start</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start the thread.  <a href="#ebaf0314c2f2378445f20b8b6d379407"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#50d3548b31540db502d2e632299a7ffc">Stop</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unmercifully stop the thread as soon as possible.  <a href="#50d3548b31540db502d2e632299a7ffc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#ea36523b870be22c373d3a7567f8421b">Wait</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wait for the thread to die.  <a href="#ea36523b870be22c373d3a7567f8421b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#0e4848420b6d46dff72553d8de76ba24">Yield</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Yield Thread frees CPU time if nothing to do.  <a href="#0e4848420b6d46dff72553d8de76ba24"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classcsRef.html">csRef</a>&lt; <a class="el" href="classcsThread.html">csThread</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsThread.html#42bc8c166026a1bf1d847e65e731d605">Create</a> (<a class="el" href="classcsRunnable.html">csRunnable</a> *, <a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a> options=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new thread.  <a href="#42bc8c166026a1bf1d847e65e731d605"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Representation of a thread of executation. 
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000074">Deprecated:</a></b></dt><dd><a class="el" href="classcsThread.html" title="Representation of a thread of executation.">csThread</a> is deprecated. Use <a class="el" href="classCS_1_1Threading_1_1Thread.html" title="Object representing a separate execution thread.">CS::Threading::Thread</a> instead. </dd></dl>

<p>Definition at line <a class="el" href="thread_8h-source.html#l00111">111</a> of file <a class="el" href="thread_8h-source.html">thread.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="42bc8c166026a1bf1d847e65e731d605"></a><!-- doxytag: member="csThread::Create" ref="42bc8c166026a1bf1d847e65e731d605" args="(csRunnable *, uint32 options=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcsRef.html">csRef</a>&lt;<a class="el" href="classcsThread.html">csThread</a>&gt; csThread::Create           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsRunnable.html">csRunnable</a> *&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e">uint32</a>&nbsp;</td>
          <td class="paramname"> <em>options</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a new thread. 
<p>
Returns the new thread object. The thread begins running when the <a class="el" href="classcsThread.html#ebaf0314c2f2378445f20b8b6d379407" title="Start the thread.">Start()</a> method is invoked. 
</div>
</div><p>
<a class="anchor" name="af89f594c671284f54fd2ae5cbf1bd57"></a><!-- doxytag: member="csThread::GetLastError" ref="af89f594c671284f54fd2ae5cbf1bd57" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual char const* csThread::GetLastError           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the last error description, else 0 if there was none. 
<p>

</div>
</div><p>
<a class="anchor" name="ce8a2c1f9445641538c4f50ebc2c5944"></a><!-- doxytag: member="csThread::GetPriority" ref="ce8a2c1f9445641538c4f50ebc2c5944" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="thread_8h.html#3d607d7f8fb2cff5e7a70ac8ba03afb3">csThreadPriority</a> csThread::GetPriority           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieve the current execution priority of this thread. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A member of the csThreadPriority enumeration </dd></dl>

</div>
</div><p>
<a class="anchor" name="79338324aa559bd800818ee693c0e2e8"></a><!-- doxytag: member="csThread::SetPriority" ref="79338324aa559bd800818ee693c0e2e8" args="(csThreadPriority Priority)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool csThread::SetPriority           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread_8h.html#3d607d7f8fb2cff5e7a70ac8ba03afb3">csThreadPriority</a>&nbsp;</td>
          <td class="paramname"> <em>Priority</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the current execution priority of this thread. 
<p>
The specifics of when this takes effect and what underlying platform priority each value maps to are properties of the specific platform-based implementation. 
</div>
</div><p>
<a class="anchor" name="ebaf0314c2f2378445f20b8b6d379407"></a><!-- doxytag: member="csThread::Start" ref="ebaf0314c2f2378445f20b8b6d379407" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool csThread::Start           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Start the thread. 
<p>
If something goes awry false is returned. 
</div>
</div><p>
<a class="anchor" name="50d3548b31540db502d2e632299a7ffc"></a><!-- doxytag: member="csThread::Stop" ref="50d3548b31540db502d2e632299a7ffc" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool csThread::Stop           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Unmercifully stop the thread as soon as possible. 
<p>
This method performs a dirty shutdown of the thread. The thread is not given a chance to exit normally. Do not invoke this method unless you have a very good reason for doing so. In general, it is best to implement some sort of communication with threads so that you can ask them to terminate in an orderly fashion. Returns true if the thread was killed. 
</div>
</div><p>
<a class="anchor" name="ea36523b870be22c373d3a7567f8421b"></a><!-- doxytag: member="csThread::Wait" ref="ea36523b870be22c373d3a7567f8421b" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool csThread::Wait           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Wait for the thread to die. 
<p>
Only returns once the thread has terminated. 
</div>
</div><p>
<a class="anchor" name="0e4848420b6d46dff72553d8de76ba24"></a><!-- doxytag: member="csThread::Yield" ref="0e4848420b6d46dff72553d8de76ba24" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void csThread::Yield           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Yield Thread frees CPU time if nothing to do. 
<p>
NOTE: This Yields execution time in the thread in which this function is called. For example, OtherThread-&gt;Yeild() will NOT have the results that would be expected. 
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="thread_8h-source.html">thread.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>