aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02215.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a02215.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a02215.html')
-rw-r--r--docs/doxygen/nel/a02215.html1279
1 files changed, 1279 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02215.html b/docs/doxygen/nel/a02215.html
new file mode 100644
index 00000000..9be4d4b4
--- /dev/null
+++ b/docs/doxygen/nel/a02215.html
@@ -0,0 +1,1279 @@
+<!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>NeL: NLMISC::CAsyncFileManager class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLMISC::CAsyncFileManager Class Reference</h1><code>#include &lt;<a class="el" href="a05456.html">async_file_manager.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLMISC::CAsyncFileManager:
+<p><center><img src="a02215.png" usemap="#NLMISC::CAsyncFileManager_map" border="0" alt=""></center>
+<map name="NLMISC::CAsyncFileManager_map">
+<area href="a02216.html" alt="NLMISC::CTaskManager" shape="rect" coords="0,56,182,80">
+<area href="a02187.html" alt="NLMISC::IRunnable" shape="rect" coords="0,0,182,24">
+</map>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<a class="el" href="a02215.html">CAsyncFileManager</a> is a class that manage file loading in a seperate thread <dl compact><dt><b>Author:</b></dt><dd>Matthieu Besson <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05456.html#l00041">41</a> of file <a class="el" href="a05456.html">async_file_manager.h</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>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagera0">addLoadTask</a> (<a class="el" href="a02187.html">IRunnable</a> *ploadTask)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a load task in the <a class="el" href="a02215.html">CAsyncFileManager</a> task list. <a href="#NLMISC_1_1CAsyncFileManagera0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera0">addTask</a> (<a class="el" href="a02187.html">IRunnable</a> *, float priority=0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a task to TaskManager and its priority. <a href="#NLMISC_1_1CTaskManagera0"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagera2">cancelLoadTask</a> (const <a class="el" href="a02226.html">ICancelCallback</a> &amp;cancelCallBack)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagera3">cancelSignal</a> (bool *pSgn)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera2">deleteTask</a> (<a class="el" href="a02187.html">IRunnable</a> *<a class="el" href="a04223.html#a628">r</a>)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a task, only if task is not running, return true if found and deleted. <a href="#NLMISC_1_1CTaskManagera2"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera3">dump</a> (std::vector&lt; std::string &gt; &amp;result)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dump task list. <a href="#NLMISC_1_1CTaskManagera3"></a><br><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="a02187.html#NLMISC_1_1IRunnablePosa0">getName</a> (std::string &amp;result) const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera5">getNumWaitingTasks</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get number of waiting task. <a href="#NLMISC_1_1CTaskManagera5"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera6">isTaskRunning</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is there a current task ? <a href="#NLMISC_1_1CTaskManagera6"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera7">isThreadRunning</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return false if exit() is required. task added with <a class="el" href="a02216.html#NLMISC_1_1CTaskManagera0">addTask()</a> should test this flag. <a href="#NLMISC_1_1CTaskManagera7"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagera10">loadFile</a> (const std::string &amp;fileName, <a class="el" href="a04558.html#a7">uint8</a> **pPtr)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagera11">loadFiles</a> (const std::vector&lt; std::string &gt; &amp;vFileNames, const std::vector&lt; <a class="el" href="a04558.html#a7">uint8</a> ** &gt; &amp;vPtrs)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera8">registerTaskPriorityCallback</a> (IChangeTaskPriority *callback)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Register task priority callback. <a href="#NLMISC_1_1CTaskManagera8"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera9">run</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Manage TaskQueue. <a href="#NLMISC_1_1CTaskManagera9"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagera14">signal</a> (bool *pSgn)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera10">sleepTask</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sleep a Task. <a href="#NLMISC_1_1CTaskManagera10"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagera11">taskListSize</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Task list size. <a href="#NLMISC_1_1CTaskManagera11"></a><br><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><a class="el" href="a02215.html">CAsyncFileManager</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagere0">getInstance</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagere1">terminate</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagerb0">waitCurrentTaskToComplete</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>CSynchronized&lt; std::list&lt;<br>
+ std::string &gt; &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp0">_DoneTaskQueue</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>CSynchronized&lt; std::string &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp1">_RunningTask</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">queue of tasks, using list container instead of queue for DeleteTask methode <a href="#NLMISC_1_1CTaskManagerp1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>CSynchronized&lt; std::list&lt;<br>
+ CWaitingTask &gt; &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp2">_TaskQueue</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03880.html">IThread</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp3">_Thread</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">thread pointer <a href="#NLMISC_1_1CTaskManagerp3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>volatile bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp4">_ThreadRunning</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">flag indicate thread loop, if false cause thread exit <a href="#NLMISC_1_1CTaskManagerp4"></a><br><br></td></tr>
+<tr><td colspan=2><br><h2>Private 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="a02215.html#NLMISC_1_1CAsyncFileManagerd0">CAsyncFileManager</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02215.html">CAsyncFileManager</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagerv0">_Singleton</a> = NULL</td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagerd0" doxytag="NLMISC::CAsyncFileManager::CAsyncFileManager" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLMISC::CAsyncFileManager::CAsyncFileManager </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [private]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00040">40</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05455.html#l00046">getInstance()</a>.
+<p>
+<div class="fragment"><pre>00041 {
+00042 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagera0" doxytag="NLMISC::CAsyncFileManager::addLoadTask" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CAsyncFileManager::addLoadTask </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02187.html">IRunnable</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>ploadTask</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Add a load task in the <a class="el" href="a02215.html">CAsyncFileManager</a> task list.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00067">67</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a06485.html#l00126">NLMISC::CTaskManager::addTask()</a>.
+<p>
+<div class="fragment"><pre>00068 {
+00069 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagera0">addTask</a>(ploadTask);
+00070 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera0" doxytag="NLMISC::CAsyncFileManager::addTask" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CTaskManager::addTask </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02187.html">IRunnable</a> *&nbsp;</td>
+ <td class="mdname" nowrap>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>float&nbsp;</td>
+ <td class="mdname" nowrap> <em>priority</em> = 0</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Add a task to TaskManager and its priority.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06485.html#l00126">126</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00147">NLMISC::CTaskManager::_TaskQueue</a>, and <a class="el" href="a05646.html#l00993">r</a>.
+<p>
+Referenced by <a class="el" href="a05455.html#l00067">addLoadTask()</a>, <a class="el" href="a06770.html#l00080">NL3D::CZoneManager::checkZonesAround()</a>, <a class="el" href="a05455.html#l00149">loadFile()</a>, <a class="el" href="a05455.html#l00156">loadFiles()</a>, and <a class="el" href="a05455.html#l00163">signal()</a>.
+<p>
+<div class="fragment"><pre>00127 {
+00128 CSynchronized&lt;std::list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00129 acces.value().push_back(CWaitingTask(r, priority));
+00130 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagera2" doxytag="NLMISC::CAsyncFileManager::cancelLoadTask" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> bool NLMISC::CAsyncFileManager::cancelLoadTask </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02226.html">ICancelCallback</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>cancelCallBack</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Call this method to cancel a programmed load. <dl compact><dt><b>Returns:</b></dt><dd>False if the task either already ended or running.</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00072">72</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a02226.html#NL3D_1_1CLoadTextureCancela0">NLMISC::CAsyncFileManager::ICancelCallback::callback()</a>, and <a class="el" href="a06485.html#l00155">NLMISC::CTaskManager::waitCurrentTaskToComplete()</a>.
+<p>
+<div class="fragment"><pre>00073 {
+00074 CSynchronized&lt;list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00075 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a> &amp;rTaskQueue = acces.value ();
+00076 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a>::iterator it = rTaskQueue.begin();
+00077
+00078 <span class="keywordflow">while</span> (it != rTaskQueue.end())
+00079 {
+00080 IRunnable *pR = it-&gt;Task;
+00081
+00082 <span class="comment">// check the task with the cancel callback.</span>
+00083 <span class="keywordflow">if</span> (callback.callback(pR))
+00084 {
+00085 <span class="comment">// Delete the load task</span>
+00086 <span class="keyword">delete</span> pR;
+00087 rTaskQueue.erase (it);
+00088 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00089 }
+00090 ++it;
+00091 }
+00092
+00093 <span class="comment">// If not found, the current running task may be the one we want to cancel. Must wait it.</span>
+00094 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagerb0">waitCurrentTaskToComplete</a> ();
+00095
+00096 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00097 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagera3" doxytag="NLMISC::CAsyncFileManager::cancelSignal" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CAsyncFileManager::cancelSignal </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pSgn</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00170">170</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a05456.html#l00113">NLMISC::CAsyncFileManager::CSignal::Sgn</a>.
+<p>
+<div class="fragment"><pre>00171 {
+00172 CSynchronized&lt;list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00173 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a> &amp;rTaskQueue = acces.value ();
+00174 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a>::iterator it = rTaskQueue.begin();
+00175
+00176 <span class="keywordflow">while</span> (it != rTaskQueue.end())
+00177 {
+00178 IRunnable *pR = it-&gt;Task;
+00179 CSignal *pS = dynamic_cast&lt;CSignal*&gt;(pR);
+00180 <span class="keywordflow">if</span> (pS != NULL)
+00181 {
+00182 <span class="keywordflow">if</span> (pS-&gt;Sgn == pSgn)
+00183 {
+00184 <span class="comment">// Delete signal task</span>
+00185 <span class="keyword">delete</span> pS;
+00186 rTaskQueue.erase (it);
+00187 <span class="keywordflow">return</span>;
+00188 }
+00189 }
+00190 ++it;
+00191 }
+00192 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera2" doxytag="NLMISC::CAsyncFileManager::deleteTask" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> bool NLMISC::CTaskManager::deleteTask </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02187.html">IRunnable</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>r</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Delete a task, only if task is not running, return true if found and deleted.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06485.html#l00133">133</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00147">NLMISC::CTaskManager::_TaskQueue</a>, and <a class="el" href="a05646.html#l00993">r</a>.
+<p>
+<div class="fragment"><pre>00134 {
+00135 CSynchronized&lt;list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00136 <span class="keywordflow">for</span>(<a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a>::iterator it = acces.value().begin(); it != acces.value().end(); it++)
+00137 {
+00138 <span class="keywordflow">if</span>(it-&gt;Task == <a class="code" href="a04223.html#a628">r</a>)
+00139 {
+00140 acces.value().erase(it);
+00141 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00142 }
+00143 }
+00144 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00145 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera3" doxytag="NLMISC::CAsyncFileManager::dump" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CTaskManager::dump </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::vector&lt; std::string &gt; &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>result</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Dump task list.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06485.html#l00163">163</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00148">NLMISC::CTaskManager::_DoneTaskQueue</a>, <a class="el" href="a06486.html#l00146">NLMISC::CTaskManager::_RunningTask</a>, <a class="el" href="a06486.html#l00147">NLMISC::CTaskManager::_TaskQueue</a>, and <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>.
+<p>
+<div class="fragment"><pre>00164 {
+00165 CSynchronized&lt;string&gt;::CAccessor accesCurrent(&amp;_RunningTask);
+00166 CSynchronized&lt;list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00167 CSynchronized&lt;list&lt;string&gt; &gt;::CAccessor accesDone(&amp;_DoneTaskQueue);
+00168
+00169 <span class="keyword">const</span> <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a> &amp;taskList = acces.value();
+00170 <span class="keyword">const</span> <a class="code" href="a03889.html">list&lt;string&gt;</a> &amp;taskDone = accesDone.value();
+00171 <span class="keyword">const</span> string &amp;taskCurrent = accesCurrent.value();
+00172
+00173 <span class="comment">// Resize the destination array</span>
+00174 result.clear ();
+00175 result.reserve (taskList.size () + taskDone.size () + 1);
+00176
+00177 <span class="comment">// Add the waiting strings</span>
+00178 <a class="code" href="a03889.html">list&lt;string&gt;</a>::const_reverse_iterator iteDone = taskDone.rbegin ();
+00179 <span class="keywordflow">while</span> (iteDone != taskDone.rend ())
+00180 {
+00181 result.push_back (<span class="stringliteral">"Done : "</span> + *iteDone);
+00182
+00183 <span class="comment">// Next task</span>
+00184 iteDone++;
+00185 }
+00186
+00187 <span class="comment">// Add the current string</span>
+00188 <span class="keywordflow">if</span> (!taskCurrent.empty())
+00189 {
+00190 result.push_back (<span class="stringliteral">"Current : "</span> + taskCurrent);
+00191 }
+00192
+00193 <span class="comment">// Add the waiting strings</span>
+00194 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a>::const_iterator ite = taskList.begin ();
+00195 <span class="keywordflow">while</span> (ite != taskList.end ())
+00196 {
+00197 string name;
+00198 ite-&gt;Task-&gt;getName (name);
+00199 result.push_back (<span class="stringliteral">"Waiting : "</span> + name + <span class="stringliteral">" "</span> + <a class="code" href="a05378.html#a244">toString</a>(ite-&gt;Priority));
+00200
+00201 <span class="comment">// Next task</span>
+00202 ite++;
+00203 }
+00204 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagere0" doxytag="NLMISC::CAsyncFileManager::getInstance" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a02215.html">CAsyncFileManager</a> &amp; NLMISC::CAsyncFileManager::getInstance </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00046">46</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a05455.html#l00040">CAsyncFileManager()</a>.
+<p>
+Referenced by <a class="el" href="a05455.html#l00057">terminate()</a>.
+<p>
+<div class="fragment"><pre>00047 {
+00048 <span class="keywordflow">if</span> (<a class="code" href="a02215.html#NLMISC_1_1CAsyncFileManagerv0">_Singleton</a> == NULL)
+00049 {
+00050 <a class="code" href="a02215.html#NLMISC_1_1CAsyncFileManagerv0">_Singleton</a> = <span class="keyword">new</span> <a class="code" href="a02215.html#NLMISC_1_1CAsyncFileManagerd0">CAsyncFileManager</a>();
+00051 }
+00052 <span class="keywordflow">return</span> *<a class="code" href="a02215.html#NLMISC_1_1CAsyncFileManagerv0">_Singleton</a>;
+00053 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IRunnablePosa0" doxytag="NLMISC::CAsyncFileManager::getName" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> virtual void NLMISC::IRunnable::getName </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>result</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Reimplemented in <a class="el" href="a02220.html#NL3D_1_1CAsyncFileManager3D_1_1CMeshLoada1">NL3D::CAsyncFileManager3D::CMeshLoad</a>, <a class="el" href="a02218.html#NL3D_1_1CAsyncFileManager3D_1_1CIGLoada1">NL3D::CAsyncFileManager3D::CIGLoad</a>, <a class="el" href="a02219.html#NL3D_1_1CAsyncFileManager3D_1_1CIGLoadUsera1">NL3D::CAsyncFileManager3D::CIGLoadUser</a>, <a class="el" href="a02222.html#NL3D_1_1CAsyncFileManager3D_1_1CTextureLoada1">NL3D::CAsyncFileManager3D::CTextureLoad</a>, <a class="el" href="a03752.html#NL3D_1_1CZoneLoadingTaska1">NL3D::CZoneLoadingTask</a>, <a class="el" href="a02593.html#NLPACS_1_1CGlobalRetriever_1_1CLrLoadera1">NLPACS::CGlobalRetriever::CLrLoader</a>, <a class="el" href="a02223.html#NLMISC_1_1CAsyncFileManager_1_1CFileLoada1">NLMISC::CAsyncFileManager::CFileLoad</a>, <a class="el" href="a02224.html#NLMISC_1_1CAsyncFileManager_1_1CMultipleFileLoada1">NLMISC::CAsyncFileManager::CMultipleFileLoad</a>, and <a class="el" href="a02225.html#NLMISC_1_1CAsyncFileManager_1_1CSignala1">NLMISC::CAsyncFileManager::CSignal</a>.
+<p>
+Definition at line <a class="el" href="a06535.html#l00074">74</a> of file <a class="el" href="a06535.html">thread.h</a>.
+<p>
+Referenced by <a class="el" href="a06485.html#l00061">NLMISC::CTaskManager::run()</a>.
+<p>
+<div class="fragment"><pre>00075 {
+00076 result = <span class="stringliteral">"NoName"</span>;
+00077 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera5" doxytag="NLMISC::CAsyncFileManager::getNumWaitingTasks" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NLMISC::CTaskManager::getNumWaitingTasks </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get number of waiting task.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06485.html#l00208">208</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00147">NLMISC::CTaskManager::_TaskQueue</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00209 {
+00210 CSynchronized&lt;list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00211 <span class="keywordflow">return</span> acces.value().size();
+00212 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera6" doxytag="NLMISC::CAsyncFileManager::isTaskRunning" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> bool NLMISC::CTaskManager::isTaskRunning </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Is there a current task ?
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00090">90</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+References <a class="el" href="a06486.html#l00158">NLMISC::CTaskManager::_IsTaskRunning</a>.
+<p>
+<div class="fragment"><pre>00090 {<span class="keywordflow">return</span> _IsTaskRunning;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera7" doxytag="NLMISC::CAsyncFileManager::isThreadRunning" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> bool NLMISC::CTaskManager::isThreadRunning </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+return false if exit() is required. task added with <a class="el" href="a02216.html#NLMISC_1_1CTaskManagera0">addTask()</a> should test this flag.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00081">81</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+References <a class="el" href="a06486.html#l00154">NLMISC::CTaskManager::_ThreadRunning</a>.
+<p>
+<div class="fragment"><pre>00081 {<span class="keywordflow">return</span> <a class="code" href="a02216.html#NLMISC_1_1CTaskManagerp4">_ThreadRunning</a>;}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagera10" doxytag="NLMISC::CAsyncFileManager::loadFile" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CAsyncFileManager::loadFile </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>fileName</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> **&nbsp;</td>
+ <td class="mdname" nowrap> <em>pPtr</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00149">149</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a06485.html#l00126">NLMISC::CTaskManager::addTask()</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
+<p>
+<div class="fragment"><pre>00150 {
+00151 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagera0">addTask</a> (<span class="keyword">new</span> CFileLoad (sFileName, ppFile));
+00152 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagera11" doxytag="NLMISC::CAsyncFileManager::loadFiles" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CAsyncFileManager::loadFiles </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::vector&lt; std::string &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vFileNames</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const std::vector&lt; <a class="el" href="a04558.html#a7">uint8</a> ** &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>vPtrs</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00156">156</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a06485.html#l00126">NLMISC::CTaskManager::addTask()</a>.
+<p>
+<div class="fragment"><pre>00157 {
+00158 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagera0">addTask</a> (<span class="keyword">new</span> CMultipleFileLoad (vFileNames, vPtrs));
+00159 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera8" doxytag="NLMISC::CAsyncFileManager::registerTaskPriorityCallback" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CTaskManager::registerTaskPriorityCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a03470.html">IChangeTaskPriority</a> *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>callback</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Register task priority callback.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06485.html#l00237">237</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00108">NLMISC::CTaskManager::_ChangePriorityCallback</a>.
+<p>
+<div class="fragment"><pre>00238 {
+00239 _ChangePriorityCallback = callback;
+00240 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera9" doxytag="NLMISC::CAsyncFileManager::run" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CTaskManager::run </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [virtual, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Manage TaskQueue.
+<p>
+
+<p>
+Implements <a class="el" href="a02187.html#NLMISC_1_1IRunnablePosa1">NLMISC::IRunnable</a>.
+<p>
+Definition at line <a class="el" href="a06485.html#l00061">61</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00148">NLMISC::CTaskManager::_DoneTaskQueue</a>, <a class="el" href="a06486.html#l00158">NLMISC::CTaskManager::_IsTaskRunning</a>, <a class="el" href="a06486.html#l00146">NLMISC::CTaskManager::_RunningTask</a>, <a class="el" href="a06486.html#l00147">NLMISC::CTaskManager::_TaskQueue</a>, <a class="el" href="a06486.html#l00154">NLMISC::CTaskManager::_ThreadRunning</a>, <a class="el" href="a06485.html#l00216">NLMISC::CTaskManager::changeTaskPriority()</a>, <a class="el" href="a06535.html#l00074">NLMISC::IRunnable::getName()</a>, <a class="el" href="a06485.html#l00032">NLMISC_DONE_TASK_SIZE</a>, <a class="el" href="a02187.html#NLMISC_1_1IRunnablePosa1">NLMISC::IRunnable::run()</a>, <a class="el" href="a06486.html#l00075">NLMISC::CTaskManager::sleepTask()</a>, and <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>.
+<p>
+<div class="fragment"><pre>00062 {
+00063 IRunnable *runnableTask;
+00064 <span class="keywordtype">float</span> priorityTask;
+00065 <span class="keywordflow">while</span>(<a class="code" href="a02216.html#NLMISC_1_1CTaskManagerp4">_ThreadRunning</a>)
+00066 {
+00067 {
+00068 CSynchronized&lt;list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00069 <span class="keywordflow">if</span>(acces.value().empty())
+00070 {
+00071 runnableTask = NULL;
+00072 }
+00073 <span class="keywordflow">else</span>
+00074 {
+00075 <span class="comment">// Update task priorities</span>
+00076 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagerd0">changeTaskPriority</a> ();
+00077
+00078 <span class="comment">// Get the best task</span>
+00079 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a> &amp;taskList = acces.value();
+00080 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a>::iterator ite = taskList.begin();
+00081 <a class="code" href="a03889.html">list&lt;CWaitingTask&gt;</a>::iterator bestIte = ite;
+00082 <span class="keywordflow">while</span> (ite != taskList.end())
+00083 {
+00084 <span class="keywordflow">if</span> (ite-&gt;Priority &lt; bestIte-&gt;Priority)
+00085 bestIte = ite;
+00086
+00087 <span class="comment">// Next task;</span>
+00088 ite++;
+00089 }
+00090
+00091 _IsTaskRunning = <span class="keyword">true</span>;
+00092 runnableTask = bestIte-&gt;Task;
+00093 priorityTask = bestIte-&gt;Priority;
+00094 taskList.erase (bestIte);
+00095 }
+00096 }
+00097 <span class="keywordflow">if</span>(runnableTask)
+00098 {
+00099 {
+00100 CSynchronized&lt;string&gt;::CAccessor currentTask(&amp;_RunningTask);
+00101 string temp;
+00102 runnableTask-&gt;getName(temp);
+00103 currentTask.value () = temp + <span class="stringliteral">" "</span> + <a class="code" href="a05378.html#a244">toString</a> (priorityTask);
+00104 }
+00105 runnableTask-&gt;run();
+00106 {
+00107 CSynchronized&lt;string&gt;::CAccessor currentTask(&amp;_RunningTask);
+00108 CSynchronized&lt;list&lt;string&gt; &gt;::CAccessor doneTask(&amp;_DoneTaskQueue);
+00109 doneTask.value().push_front (currentTask.value ());
+00110 currentTask.value () = <span class="stringliteral">""</span>;
+00111 <span class="keywordflow">if</span> (doneTask.value().size () &gt; <a class="code" href="a05062.html#a0">NLMISC_DONE_TASK_SIZE</a>)
+00112 doneTask.value().resize (NLMISC_DONE_TASK_SIZE);
+00113 }
+00114
+00115 _IsTaskRunning = <span class="keyword">false</span>;
+00116 }
+00117 <span class="keywordflow">else</span>
+00118 {
+00119 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagera10">sleepTask</a>();
+00120 }
+00121 }
+00122 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagerp4">_ThreadRunning</a> = <span class="keyword">true</span>;
+00123 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagera14" doxytag="NLMISC::CAsyncFileManager::signal" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CAsyncFileManager::signal </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>pSgn</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00163">163</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a06485.html#l00126">NLMISC::CTaskManager::addTask()</a>.
+<p>
+<div class="fragment"><pre>00164 {
+00165 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagera0">addTask</a> (<span class="keyword">new</span> CSignal (pSgn));
+00166 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera10" doxytag="NLMISC::CAsyncFileManager::sleepTask" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CTaskManager::sleepTask </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sleep a Task.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00075">75</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+References <a class="el" href="a05586.html#l00073">NLMISC::nlSleep()</a>.
+<p>
+Referenced by <a class="el" href="a06485.html#l00061">NLMISC::CTaskManager::run()</a>, and <a class="el" href="a06485.html#l00155">NLMISC::CTaskManager::waitCurrentTaskToComplete()</a>.
+<p>
+<div class="fragment"><pre>00075 { <a class="code" href="a05378.html#a256">nlSleep</a>(10); }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagera11" doxytag="NLMISC::CAsyncFileManager::taskListSize" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NLMISC::CTaskManager::taskListSize </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Task list size.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06485.html#l00148">148</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00147">NLMISC::CTaskManager::_TaskQueue</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00149 {
+00150 CSynchronized&lt;list&lt;CWaitingTask&gt; &gt;::CAccessor acces(&amp;_TaskQueue);
+00151 <span class="keywordflow">return</span> acces.value().size();
+00152 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagere1" doxytag="NLMISC::CAsyncFileManager::terminate" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CAsyncFileManager::terminate </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [static]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00057">57</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>.
+<p>
+References <a class="el" href="a05455.html#l00046">getInstance()</a>.
+<p>
+<div class="fragment"><pre>00058 {
+00059 <span class="keywordflow">if</span> (<a class="code" href="a02215.html#NLMISC_1_1CAsyncFileManagerv0">_Singleton</a> != NULL)
+00060 {
+00061 <span class="keyword">delete</span> &amp;<a class="code" href="a02215.html#NLMISC_1_1CAsyncFileManagere0">getInstance</a>();
+00062 <a class="code" href="a02215.html#NLMISC_1_1CAsyncFileManagerv0">_Singleton</a> = NULL;
+00063 }
+00064 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagerb0" doxytag="NLMISC::CAsyncFileManager::waitCurrentTaskToComplete" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CTaskManager::waitCurrentTaskToComplete </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [protected, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+If any, wait the current running task to complete this function MUST be called in a 'accessor to the _TaskQueue' statement because a mutex is required eg: { CSynchronized&lt;list&lt;IRunnable *&gt; &gt;::CAccessor acces(&amp;_TaskQueue); <a class="el" href="a02216.html#NLMISC_1_1CTaskManagerb0">waitCurrentTaskToComplete()</a>; }
+<p>
+Definition at line <a class="el" href="a06485.html#l00155">155</a> of file <a class="el" href="a06485.html">task_manager.cpp</a>.
+<p>
+References <a class="el" href="a06486.html#l00158">NLMISC::CTaskManager::_IsTaskRunning</a>, and <a class="el" href="a06486.html#l00075">NLMISC::CTaskManager::sleepTask()</a>.
+<p>
+Referenced by <a class="el" href="a05455.html#l00072">cancelLoadTask()</a>.
+<p>
+<div class="fragment"><pre>00156 {
+00157 <span class="keywordflow">while</span> (_IsTaskRunning)
+00158 <a class="code" href="a02216.html#NLMISC_1_1CTaskManagera10">sleepTask</a>();
+00159 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CTaskManagerp0" doxytag="NLMISC::CAsyncFileManager::_DoneTaskQueue" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> CSynchronized&lt;std::list&lt;std::string&gt; &gt; <a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp0">NLMISC::CTaskManager::_DoneTaskQueue</a><code> [protected, inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00148">148</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06485.html#l00163">NLMISC::CTaskManager::dump()</a>, and <a class="el" href="a06485.html#l00061">NLMISC::CTaskManager::run()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagerp1" doxytag="NLMISC::CAsyncFileManager::_RunningTask" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> CSynchronized&lt;std::string&gt; <a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp1">NLMISC::CTaskManager::_RunningTask</a><code> [protected, inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+queue of tasks, using list container instead of queue for DeleteTask methode
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00146">146</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06485.html#l00039">NLMISC::CTaskManager::CTaskManager()</a>, <a class="el" href="a06485.html#l00163">NLMISC::CTaskManager::dump()</a>, and <a class="el" href="a06485.html#l00061">NLMISC::CTaskManager::run()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CAsyncFileManagerv0" doxytag="NLMISC::CAsyncFileManager::_Singleton" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a02215.html">CAsyncFileManager</a> * <a class="el" href="a02215.html#NLMISC_1_1CAsyncFileManagerv0">NLMISC::CAsyncFileManager::_Singleton</a> = NULL<code> [static, private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05455.html#l00036">36</a> of file <a class="el" href="a05455.html">async_file_manager.cpp</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagerp2" doxytag="NLMISC::CAsyncFileManager::_TaskQueue" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> CSynchronized&lt;std::list&lt;CWaitingTask&gt; &gt; <a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp2">NLMISC::CTaskManager::_TaskQueue</a><code> [protected, inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00147">147</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06485.html#l00126">NLMISC::CTaskManager::addTask()</a>, <a class="el" href="a06485.html#l00216">NLMISC::CTaskManager::changeTaskPriority()</a>, <a class="el" href="a06485.html#l00133">NLMISC::CTaskManager::deleteTask()</a>, <a class="el" href="a06485.html#l00163">NLMISC::CTaskManager::dump()</a>, <a class="el" href="a06485.html#l00208">NLMISC::CTaskManager::getNumWaitingTasks()</a>, <a class="el" href="a06485.html#l00061">NLMISC::CTaskManager::run()</a>, and <a class="el" href="a06485.html#l00148">NLMISC::CTaskManager::taskListSize()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagerp3" doxytag="NLMISC::CAsyncFileManager::_Thread" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03880.html">IThread</a>* <a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp3">NLMISC::CTaskManager::_Thread</a><code> [protected, inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+thread pointer
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00151">151</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06485.html#l00039">NLMISC::CTaskManager::CTaskManager()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CTaskManagerp4" doxytag="NLMISC::CAsyncFileManager::_ThreadRunning" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> volatile bool <a class="el" href="a02216.html#NLMISC_1_1CTaskManagerp4">NLMISC::CTaskManager::_ThreadRunning</a><code> [protected, inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+flag indicate thread loop, if false cause thread exit
+<p>
+
+<p>
+Definition at line <a class="el" href="a06486.html#l00154">154</a> of file <a class="el" href="a06486.html">task_manager.h</a>.
+<p>
+Referenced by <a class="el" href="a06485.html#l00039">NLMISC::CTaskManager::CTaskManager()</a>, <a class="el" href="a06486.html#l00081">NLMISC::CTaskManager::isThreadRunning()</a>, <a class="el" href="a06485.html#l00061">NLMISC::CTaskManager::run()</a>, and <a class="el" href="a06485.html#l00053">NLMISC::CTaskManager::~CTaskManager()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05456.html">async_file_manager.h</a><li><a class="el" href="a05455.html">async_file_manager.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:01:40 2004 for NeL by
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
+</a>1.3.6 </small></address>
+</body>
+</html>