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
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module Monitored</title>
</head><body bgcolor="#ffffff">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#fcbb58">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Monitored</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/david/Projects/Jokosher/trunk/Jokosher/Monitored.py">/home/david/Projects/Jokosher/trunk/Jokosher/Monitored.py</a></font></td></tr></table>
<p><tt># THIS FILE IS PART OF THE JOKOSHER PROJECT AND LICENSED UNDER THE GPL. SEE<br>
# THE 'COPYING' FILE FOR DETAILS<br>
#<br>
# <a href="#Monitored">Monitored</a>.py<br>
# <br>
# Offers an abstract class for reporting changes to other objects<br>
#<br>
#-------------------------------------------------------------------------------</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#3465a4">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#3465a4"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="Monitored.html#Monitored">Monitored</a>
</font></dt></dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#729fcf">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Monitored">class <strong>Monitored</strong></a></font></td></tr>
<tr bgcolor="#729fcf"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>This class defines a set of functions to allow derived classes to<br>
have attached monitor objects, which should be signaled if the <br>
monitored objects state changes.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Monitored-AddListener"><strong>AddListener</strong></a>(self, obj)</dt><dd><tt>Adds an object to report changes to.<br>
<br>
Parameters:<br>
obj -- an object to inform when StateChanged is called.</tt></dd></dl>
<dl><dt><a name="Monitored-ClearListeners"><strong>ClearListeners</strong></a>(self)</dt><dd><tt>Remove all listeners to allow them to be destroyed.</tt></dd></dl>
<dl><dt><a name="Monitored-RemoveListener"><strong>RemoveListener</strong></a>(self, obj)</dt><dd><tt>Stop reporting changes to the specified object.<br>
<br>
Parameters:<br>
obj -- the object which should no longer receive change updates.</tt></dd></dl>
<dl><dt><a name="Monitored-StateChanged"><strong>StateChanged</strong></a>(self, change<font color="#909090">=None</font>, *extra)</dt><dd><tt>This method should be called when we want a change to be reported<br>
to all objects previously added by AddListener. <br>
<br>
Parameters:<br>
change -- the change which has occured.<br>
extra -- any extra parameters that should be passed.</tt></dd></dl>
<dl><dt><a name="Monitored-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>Creates a new instance of <a href="#Monitored">Monitored</a>.</tt></dd></dl>
</td></tr></table></td></tr></table>
</body></html>
|