Sophie

Sophie

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

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: csEventTree 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>csEventTree Class Reference</h1><!-- doxytag: class="csEventTree" --><!-- doxytag: inherits="csTreeNode" -->This class is used to represent the event namespace (tree).  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="cssubscription_8h-source.html">csutil/cssubscription.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for csEventTree:</div>
<div class="dynsection">
<p><center><img src="classcsEventTree__inherit__graph.png" border="0" usemap="#csEventTree__inherit__map" alt="Inheritance graph"></center>
<map name="csEventTree__inherit__map">
<area shape="rect" href="classcsTreeNode.html" title="A generic tree class." alt="" coords="7,7,103,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classcsEventTree-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">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#934653e6616a0277dc72724f884bcbba">Dispatch</a> (<a class="el" href="structiEvent.html">iEvent</a> &amp;e)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send the provided event to all subscribers, using the normal return and Broadcast rules.  <a href="#934653e6616a0277dc72724f884bcbba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsEventTree.html">csEventTree</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#0ca5357e751f53f7e1c1a8f0244d7e59">FindNode</a> (<a class="el" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757">csEventID</a> name, <a class="el" href="classcsEventQueue.html">csEventQueue</a> *q)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find a node with a given name in the event tree owned by q .  <a href="#0ca5357e751f53f7e1c1a8f0244d7e59"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsEventTree_1_1SubscriberIterator.html">SubscriberIterator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#5c4f2048abf471ca761e3e2517792581">GetIterator</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a <a class="el" href="classcsEventTree_1_1SubscriberIterator.html" title="The SubscriberIterator is a wrapper for the messy internals of figuring out which...">csEventTree::SubscriberIterator</a> for all subscribers to this event name (and to its parents).  <a href="#5c4f2048abf471ca761e3e2517792581"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#8a88fe2ec87f564c36addb46e9529ff3">Notify</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Send the provided event to all subscribers, regardless of their return values.  <a href="#8a88fe2ec87f564c36addb46e9529ff3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#04ca4d1748524ab5411de2e882603dad">Subscribe</a> (<a class="el" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a>, <a class="el" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757">csEventID</a>, <a class="el" href="classcsEventQueue.html">csEventQueue</a> *q)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Subscribe a given handler to a given event name subtree via a given event queue.  <a href="#04ca4d1748524ab5411de2e882603dad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#69588cc4abc05a5f8946951b1ff51f8d">Unsubscribe</a> (<a class="el" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a>, <a class="el" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757">csEventID</a>, <a class="el" href="classcsEventQueue.html">csEventQueue</a> *q)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unubscribe a given handler to a given event name subtree via a given event queue.  <a href="#69588cc4abc05a5f8946951b1ff51f8d"></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"><a class="anchor" name="4832611faa7aec972e57ebe36b483d8c"></a><!-- doxytag: member="csEventTree::CreateRootNode" ref="4832611faa7aec972e57ebe36b483d8c" args="(csRef&lt; iEventHandlerRegistry &gt; &amp;reg1, csRef&lt; iEventNameRegistry &gt; &amp;reg2, csEventQueue *q)" -->
static <a class="el" href="classcsEventTree.html">csEventTree</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#4832611faa7aec972e57ebe36b483d8c">CreateRootNode</a> (<a class="el" href="classcsRef.html">csRef</a>&lt; <a class="el" href="structiEventHandlerRegistry.html">iEventHandlerRegistry</a> &gt; &amp;reg1, <a class="el" href="classcsRef.html">csRef</a>&lt; <a class="el" href="structiEventNameRegistry.html">iEventNameRegistry</a> &gt; &amp;reg2, <a class="el" href="classcsEventQueue.html">csEventQueue</a> *q)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b7b5a0f24320fce00d7893438eb0342e"></a><!-- doxytag: member="csEventTree::DeleteRootNode" ref="b7b5a0f24320fce00d7893438eb0342e" args="(csEventTree *node)" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#b7b5a0f24320fce00d7893438eb0342e">DeleteRootNode</a> (<a class="el" href="classcsEventTree.html">csEventTree</a> *node)</td></tr>

<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f404f613d3150d4f80c6da84fa375a24"></a><!-- doxytag: member="csEventTree::csEventQueueTest" ref="f404f613d3150d4f80c6da84fa375a24" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#f404f613d3150d4f80c6da84fa375a24">csEventQueueTest</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7800d352f191e799ea200a6f4006c30a"></a><!-- doxytag: member="csEventTree::SubscriberIterator" ref="7800d352f191e799ea200a6f4006c30a" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree.html#7800d352f191e799ea200a6f4006c30a">SubscriberIterator</a></td></tr>

<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsEventTree_1_1SubscriberIterator.html">SubscriberIterator</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The <a class="el" href="classcsEventTree_1_1SubscriberIterator.html" title="The SubscriberIterator is a wrapper for the messy internals of figuring out which...">SubscriberIterator</a> is a wrapper for the messy internals of figuring out which event handler to call next.  <a href="classcsEventTree_1_1SubscriberIterator.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class is used to represent the event namespace (tree). 
<p>
Each node represents an event name (e.g., "crystalspace.input.mouse") and contains two data structures: a partial order graph representing subscribers to this event (including those who subscribed to parent event names) along with their ordering constraints, and a queue of subscribers representing a valid total order of that graph (used to speed up the common case). 
<p>Definition at line <a class="el" href="cssubscription_8h-source.html#l00041">41</a> of file <a class="el" href="cssubscription_8h-source.html">cssubscription.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="934653e6616a0277dc72724f884bcbba"></a><!-- doxytag: member="csEventTree::Dispatch" ref="934653e6616a0277dc72724f884bcbba" args="(iEvent &amp;e)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csEventTree::Dispatch           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structiEvent.html">iEvent</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>e</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send the provided event to all subscribers, using the normal return and Broadcast rules. 
<p>

</div>
</div><p>
<a class="anchor" name="0ca5357e751f53f7e1c1a8f0244d7e59"></a><!-- doxytag: member="csEventTree::FindNode" ref="0ca5357e751f53f7e1c1a8f0244d7e59" args="(csEventID name, csEventQueue *q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsEventTree.html">csEventTree</a>* csEventTree::FindNode           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757">csEventID</a>&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsEventQueue.html">csEventQueue</a> *&nbsp;</td>
          <td class="paramname"> <em>q</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Find a node with a given name in the event tree owned by q . 
<p>
If no such node yet exists, create it (along with any necessary parent nodes, including the name root). 
</div>
</div><p>
<a class="anchor" name="5c4f2048abf471ca761e3e2517792581"></a><!-- doxytag: member="csEventTree::GetIterator" ref="5c4f2048abf471ca761e3e2517792581" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsEventTree_1_1SubscriberIterator.html">SubscriberIterator</a>* csEventTree::GetIterator           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a <a class="el" href="classcsEventTree_1_1SubscriberIterator.html" title="The SubscriberIterator is a wrapper for the messy internals of figuring out which...">csEventTree::SubscriberIterator</a> for all subscribers to this event name (and to its parents). 
<p>

</div>
</div><p>
<a class="anchor" name="8a88fe2ec87f564c36addb46e9529ff3"></a><!-- doxytag: member="csEventTree::Notify" ref="8a88fe2ec87f564c36addb46e9529ff3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csEventTree::Notify           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Send the provided event to all subscribers, regardless of their return values. 
<p>

</div>
</div><p>
<a class="anchor" name="04ca4d1748524ab5411de2e882603dad"></a><!-- doxytag: member="csEventTree::Subscribe" ref="04ca4d1748524ab5411de2e882603dad" args="(csHandlerID, csEventID, csEventQueue *q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csEventTree::Subscribe           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a>&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757">csEventID</a>&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsEventQueue.html">csEventQueue</a> *&nbsp;</td>
          <td class="paramname"> <em>q</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Subscribe a given handler to a given event name subtree via a given event queue. 
<p>
This is wrapped by <a class="el" href="classcsEventQueue.html#2b1512573c22156a964234968cebf2a1" title="Subscribe a listener to an event subtree.">csEventQueue::Subscribe</a> which may be easier to use in some situations. <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classcsEventQueue.html#2b1512573c22156a964234968cebf2a1" title="Subscribe a listener to an event subtree.">csEventQueue::Subscribe</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="69588cc4abc05a5f8946951b1ff51f8d"></a><!-- doxytag: member="csEventTree::Unsubscribe" ref="69588cc4abc05a5f8946951b1ff51f8d" args="(csHandlerID, csEventID, csEventQueue *q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csEventTree::Unsubscribe           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__event__handling.html#gd62f963e20f1180634a9557b392d987d">csHandlerID</a>&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757">csEventID</a>&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcsEventQueue.html">csEventQueue</a> *&nbsp;</td>
          <td class="paramname"> <em>q</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Unubscribe a given handler to a given event name subtree via a given event queue. 
<p>
This is wrapped by <a class="el" href="classcsEventQueue.html#788e25b7d5948b78fc6eb33054fa2ffa" title="Unsubscribe a listener from an event subtree.">csEventQueue::Unsubscribe</a> which may be easier to use in some situations. Note that unsubscribing is reentrant (an event handler can unsubscribe itself) but NOT thread-safe (only event handlers in the same thread as the event queue can unsubscribe). <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classcsEventQueue.html#788e25b7d5948b78fc6eb33054fa2ffa" title="Unsubscribe a listener from an event subtree.">csEventQueue::Unsubscribe</a> </dd></dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="cssubscription_8h-source.html">cssubscription.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>