1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SFML - Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="tabs.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="logo">
<img src="./logo.jpg" width="770" height="200" title="SFML home" alt="SFML logo" />
</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.htm"><span>Main Page</span></a></li>
<li><a href="namespaces.htm"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.htm"><span>Classes</span></a></li>
<li><a href="files.htm"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.htm"><span>Class List</span></a></li>
<li><a href="classes.htm"><span>Class Index</span></a></li>
<li><a href="hierarchy.htm"><span>Class Hierarchy</span></a></li>
<li><a href="functions.htm"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><b>sf</b>::<a class="el" href="classsf_1_1Thread.htm">Thread</a>
</div>
</div>
<div class="contents">
<h1>sf::Thread Class Reference</h1><!-- doxytag: class="sf::Thread" --><!-- doxytag: inherits="sf::NonCopyable" --><a class="el" href="classsf_1_1Thread.htm" title="Thread defines an easy way to manipulate a thread.">Thread</a> defines an easy way to manipulate a thread.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="Win32_2Thread_8hpp-source.htm">Thread.hpp</a>></code>
<p>
<div class="dynheader">
Inheritance diagram for sf::Thread:</div>
<div class="dynsection">
<p><center><img src="classsf_1_1Thread.png" usemap="#sf::Thread_map" border="0" alt=""></center>
<map name="sf::Thread_map">
<area href="structsf_1_1NonCopyable.htm" alt="sf::NonCopyable" shape="rect" coords="81,0,233,24">
<area href="classsf_1_1SoundRecorder.htm" alt="sf::SoundRecorder" shape="rect" coords="0,112,152,136">
<area href="classsf_1_1SoundStream.htm" alt="sf::SoundStream" shape="rect" coords="162,112,314,136">
<area href="classsf_1_1SoundBufferRecorder.htm" alt="sf::SoundBufferRecorder" shape="rect" coords="0,168,152,192">
<area href="classsf_1_1Music.htm" alt="sf::Music" shape="rect" coords="162,168,314,192">
</map>
</div>
<p>
<a href="classsf_1_1Thread-members.htm">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ab6e6f11eb38f106cd7c1149763a11b8"></a><!-- doxytag: member="sf::Thread::FuncType" ref="ab6e6f11eb38f106cd7c1149763a11b8" args=")(void *)" -->
typedef void(* </td><td class="memItemRight" valign="bottom"><b>FuncType</b> )(void *)</td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Thread.htm#5a5f6a41323c0983d6c0f4e496f4a173">Thread</a> (FuncType Function, void *UserData=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct the thread from a function pointer. <a href="#5a5f6a41323c0983d6c0f4e496f4a173"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Thread.htm#f77942fc1730af7c31bc4c3a913a9c1d">~Thread</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual destructor. <a href="#f77942fc1730af7c31bc4c3a913a9c1d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Thread.htm#046df871f73d3cf452d1c72bcc143642">Launch</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create and run the thread. <a href="#046df871f73d3cf452d1c72bcc143642"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Thread.htm#67f3c609fdf99688531dbfae461ea4d2">Wait</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait until the thread finishes. <a href="#67f3c609fdf99688531dbfae461ea4d2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Thread.htm#603d9493c6a845188f05c2eca48dc41b">Terminate</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Terminate the thread Terminating a thread with this function is not safe, you should rather try to make the thread function terminate by itself. <a href="#603d9493c6a845188f05c2eca48dc41b"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Thread.htm#d719b83ce7b02b56db919d423a69f1a2">Thread</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#d719b83ce7b02b56db919d423a69f1a2"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classsf_1_1Thread.htm" title="Thread defines an easy way to manipulate a thread.">Thread</a> defines an easy way to manipulate a thread.
<p>
There are two ways to use <a class="el" href="classsf_1_1Thread.htm" title="Thread defines an easy way to manipulate a thread.">Thread</a> :<ul>
<li>Inherit from it and override the Run() virtual function</li><li>Construct a <a class="el" href="classsf_1_1Thread.htm" title="Thread defines an easy way to manipulate a thread.">Thread</a> instance and pass it a function pointer to call </li></ul>
<p>Definition at line <a class="el" href="Win32_2Thread_8hpp-source.htm#l00044">44</a> of file <a class="el" href="Win32_2Thread_8hpp-source.htm">Win32/Thread.hpp</a>.</p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="5a5f6a41323c0983d6c0f4e496f4a173"></a><!-- doxytag: member="sf::Thread::Thread" ref="5a5f6a41323c0983d6c0f4e496f4a173" args="(FuncType Function, void *UserData=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::Thread::Thread </td>
<td>(</td>
<td class="paramtype">Thread::FuncType </td>
<td class="paramname"> <em>Function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>UserData</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct the thread from a function pointer.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Function</em> </td><td>: Entry point of the thread </td></tr>
<tr><td valign="top"></td><td valign="top"><em>UserData</em> </td><td>: Data to pass to the thread function (NULL by default) </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="Thread_8cpp-source.htm#l00050">50</a> of file <a class="el" href="Thread_8cpp-source.htm">Thread.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="f77942fc1730af7c31bc4c3a913a9c1d"></a><!-- doxytag: member="sf::Thread::~Thread" ref="f77942fc1730af7c31bc4c3a913a9c1d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::Thread::~Thread </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Virtual destructor.
<p>
<p>Definition at line <a class="el" href="Thread_8cpp-source.htm#l00062">62</a> of file <a class="el" href="Thread_8cpp-source.htm">Thread.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="d719b83ce7b02b56db919d423a69f1a2"></a><!-- doxytag: member="sf::Thread::Thread" ref="d719b83ce7b02b56db919d423a69f1a2" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::Thread::Thread </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Default constructor.
<p>
<p>Definition at line <a class="el" href="Thread_8cpp-source.htm#l00038">38</a> of file <a class="el" href="Thread_8cpp-source.htm">Thread.cpp</a>.</p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="046df871f73d3cf452d1c72bcc143642"></a><!-- doxytag: member="sf::Thread::Launch" ref="046df871f73d3cf452d1c72bcc143642" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Thread::Launch </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create and run the thread.
<p>
<p>Definition at line <a class="el" href="Thread_8cpp-source.htm#l00072">72</a> of file <a class="el" href="Thread_8cpp-source.htm">Thread.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="603d9493c6a845188f05c2eca48dc41b"></a><!-- doxytag: member="sf::Thread::Terminate" ref="603d9493c6a845188f05c2eca48dc41b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Thread::Terminate </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Terminate the thread Terminating a thread with this function is not safe, you should rather try to make the thread function terminate by itself.
<p>
Terminate the thread Terminating a thread with this function is not safe, you should rather try to make the thread function terminate by itself.
<p>Definition at line <a class="el" href="Thread_8cpp-source.htm#l00109">109</a> of file <a class="el" href="Thread_8cpp-source.htm">Thread.cpp</a>.</p>
</div>
</div><p>
<a class="anchor" name="67f3c609fdf99688531dbfae461ea4d2"></a><!-- doxytag: member="sf::Thread::Wait" ref="67f3c609fdf99688531dbfae461ea4d2" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Thread::Wait </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Wait until the thread finishes.
<p>
<p>Definition at line <a class="el" href="Thread_8cpp-source.htm#l00089">89</a> of file <a class="el" href="Thread_8cpp-source.htm">Thread.cpp</a>.</p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Win32_2Thread_8hpp-source.htm">Win32/Thread.hpp</a><li><a class="el" href="Thread_8cpp-source.htm">Thread.cpp</a></ul>
</div>
<p id="footer">
:: Copyright © 2007-2008 Laurent Gomila, all rights reserved ::
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> ::
</p>
</body>
</html>
|