Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4fccfe23f6486142b4197d1daac0cf21 > files > 69

Falcon-doc-0.9.6.6-2.fc15.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Function set "Message oriented model functions" - Function set "Message oriented model functions"</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./funset.html"><span>Function sets</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./globals.html"><span>Globals</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Function set "Message oriented model functions"</h1>

<p class="faldoc_brief">Functions supporting Message Oriented Programming (MOP) </p>



   <p class="faldoc_brief"><a href="#more">more...</a></p>
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#assert">assert()</a></td><td>Creates a message assertion on a certain message slot. </td></tr>
      
         <tr><td><a href="#broadcast">broadcast()</a></td><td>Sends a message to every callable item subscribed to a message. </td></tr>
      
         <tr><td><a href="#consume">consume()</a></td><td>Consumes currently being broadcasted signal. </td></tr>
      
         <tr><td><a href="#getAssert">getAssert()</a></td><td>Returns the given assertion, if it exists. </td></tr>
      
         <tr><td><a href="#getSlot">getSlot()</a></td><td>Retreives a MOP Message slot. </td></tr>
      
         <tr><td><a href="#retract">retract()</a></td><td>Removes a previous assertion on a message. </td></tr>
      
         <tr><td><a href="#subscribe">subscribe()</a></td><td>Registers a callback to a message slot. </td></tr>
      
         <tr><td><a href="#unsubscribe">unsubscribe()</a></td><td>Unregisters a registered callback from a slot. </td></tr>
      
   
   </table>







<a name="more"><h2 class="faldoc_title">Detailed description</h2></a>


<table class="faldoc_function">


</table>
<br/>
<p class="item_brief">Functions supporting Message Oriented Programming (MOP) </p>
<p class="faldoc_text"> This is the list of functions working together to implement the message oriented model. Other than this functions, it is possible to use the <a href="./class_VMSlot.html">VMSlot</a> class for direct access to reflected virtual machine slots. On this regards, see the <a href="./group_message_model.html">Message oriented model</a> group. </p>




   <h2 class="faldoc_title">Members</h2>
   
      <h3 class="faldoc_funcname"><a name="assert">assert()</a></h3>
      <p class="item_brief">Creates a message assertion on a certain message slot. </p>
      <p class="faldoc_funcdecl">assert( msg, data )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">msg</td><td class="faldoc_paramdesc">The message to be asserted. </td></tr><tr><td class="faldoc_param">data</td><td class="faldoc_paramdesc">The value of the assertion. </td></tr>
         
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If there are already subscribed callbacks for this message a broadcast on them is performed now. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="broadcast">broadcast()</a></h3>
      <p class="item_brief">Sends a message to every callable item subscribed to a message. </p>
      <p class="faldoc_funcdecl">broadcast( msg, [...] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">msg</td><td class="faldoc_paramdesc">A message (string) to be broadcast. </td></tr>
         <tr><td class="faldoc_optparam">...</td><td class="faldoc_optparamdesc">Zero or more data to be broadcaset. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> true if <b>msg</b> is found, false if it doesn't exist. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> Broadcast function implicitly searches for a Virtual Machine Message Slot (<a href="./class_VMSlot.html">VMSlot</a>) with the given <b>msg</b> name, and if it finds it, it emits a broadcast on that. </p>
<p class="faldoc_text">If the message is not found, the broadcast is silently dropped (no error is raised), but the function returns false. </p>
<p class="faldoc_text"> As calling this function requires a scan in the virtual machine message slot table, in case of repeated operations it is preferable to explicitly search for a slot with <a href="./functions.html#getSlot">getSlot</a>, or to create it as an <a href="./class_VMSlot.html">VMSlot</a> instance. On the other hand, if the reference to a VMSlot is not needed, this function allows to broadcast on the slot without adding the overhead required by the creation of the <a href="./class_VMSlot.html">VMSlot</a> wrapper. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="consume">consume()</a></h3>
      <p class="item_brief">Consumes currently being broadcasted signal. </p>
      <p class="faldoc_funcdecl">consume</p>
      
      
   
      <h3 class="faldoc_funcname"><a name="getAssert">getAssert()</a></h3>
      <p class="item_brief">Returns the given assertion, if it exists. </p>
      <p class="faldoc_funcdecl">getAssert( msg, [default] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">msg</td><td class="faldoc_paramdesc">The message slot on which the assertion is to be ckeched. </td></tr>
         <tr><td class="faldoc_optparam">default</td><td class="faldoc_optparamdesc">If given, instead of raising in case the assertion is not found, return this item. </td></tr>
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_MessageError.html">MessageError</a></td><td class="faldoc_raisedesc">if the given message is not asserted. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="getSlot">getSlot()</a></h3>
      <p class="item_brief">Retreives a MOP Message slot. </p>
      <p class="faldoc_funcdecl">getSlot( msg, [make] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">msg</td><td class="faldoc_paramdesc">The message slot that must be taken or created. </td></tr>
         <tr><td class="faldoc_optparam">make</td><td class="faldoc_optparamdesc">If true (default) create the slot if it doesn't exist. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The message slot coresponding with this name. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="retract">retract()</a></h3>
      <p class="item_brief">Removes a previous assertion on a message. </p>
      <p class="faldoc_funcdecl">retract( msg )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">msg</td><td class="faldoc_paramdesc">The message slot to be retracted. </td></tr>
         
         
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="subscribe">subscribe()</a></h3>
      <p class="item_brief">Registers a callback to a message slot. </p>
      <p class="faldoc_funcdecl">subscribe( msg, handler, [prio] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">msg</td><td class="faldoc_paramdesc">A string with the message name on which the item should be registered. </td></tr><tr><td class="faldoc_param">handler</td><td class="faldoc_paramdesc">A callable item or instance providing callback support. </td></tr>
         <tr><td class="faldoc_optparam">prio</td><td class="faldoc_optparamdesc">Set to true to insert this subscription in front of the subscription list. </td></tr>
         
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="unsubscribe">unsubscribe()</a></h3>
      <p class="item_brief">Unregisters a registered callback from a slot. </p>
      <p class="faldoc_funcdecl">unsubscribe( msg, handler )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">msg</td><td class="faldoc_paramdesc">A string with the message name on which the item should be registered. </td></tr><tr><td class="faldoc_param">handler</td><td class="faldoc_paramdesc">A callable item or instance providing callback support. </td></tr>
         
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_CodeError.html">CodeError</a></td><td class="faldoc_raisedesc"> if the <b>handler</b> is not registered with this slot. </td></tr><tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the named message slot doesn't exist. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./funset.html">Function sets</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./globals.html">Globals</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>