75 lines
5.0 KiB
HTML
75 lines
5.0 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module geosolver.notify</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="geosolver.html"><font color="#ffffff">geosolver</font></a>.notify</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/rick/Programming/Python/GeoSolver/geosolver/notify.py">/home/rick/Programming/Python/GeoSolver/geosolver/notify.py</a></font></td></tr></table>
|
|
<p><tt>This module implements a simple listen/notify schema</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="weakref.html">weakref</a><br>
|
|
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.notify.html#Listener">Listener</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="geosolver.notify.html#Notifier">Notifier</a>
|
|
</font></dt></dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Listener">class <strong>Listener</strong></a></font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A listener is notified by one or more Notifiers.<br>
|
|
<br>
|
|
instance attributes:<br>
|
|
notifiers - a list of <a href="#Notifier">Notifier</a> objects<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="Listener-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Listener-add_notifier"><strong>add_notifier</strong></a>(self, notifier)</dt><dd><tt>add a notifier to the list (and self to notifiers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Listener-receive_notify"><strong>receive_notify</strong></a>(self, source, message)</dt><dd><tt>receive a message from a notifier. Implementing classes should override this.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Listener-rem_notifier"><strong>rem_notifier</strong></a>(self, notifier)</dt><dd><tt>remove a notifier from the list (and self from notifiers' list)</tt></dd></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Notifier">class <strong>Notifier</strong></a></font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A notifier keeps a list of <a href="#Listener">Listener</a> instances that are to be informed of certain events.<br>
|
|
<br>
|
|
instance attributes:<br>
|
|
listeners - a list of <a href="#Listener">Listener</a> instances<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="Notifier-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Notifier-add_listener"><strong>add_listener</strong></a>(self, listener)</dt><dd><tt>add a listener to the list (and self to listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Notifier-rem_listener"><strong>rem_listener</strong></a>(self, listener)</dt><dd><tt>remove a listener from the list (and self from listers' list)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Notifier-send_notify"><strong>send_notify</strong></a>(self, message)</dt><dd><tt>send a message to all listeners</tt></dd></dl>
|
|
|
|
</td></tr></table></td></tr></table>
|
|
</body></html> |