/usr/share/doc/python-kiwi/api/kiwi.model.Model.html is in python-kiwi 1.9.22-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<title>kiwi.model.Model : API documentation</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<link href="apidocs.css" type="text/css" rel="stylesheet" />
</head>
<body>
<h1 class="class">k.m.Model : class documentation</h1>
<p>
<span id="part">Part of <a href="kiwi.html">kiwi</a>.<a href="kiwi.model.html">model</a></span>
<a href="classIndex.html#kiwi.model.Model">View In Hierarchy</a>
</p>
<div>
<p>Known subclasses: <a href="kiwi.model.PickledModel.html">kiwi.model.PickledModel</a></p>
</div>
<div>The Model is a mixin to be used by domain classes when attached to
Proxies. It also provides autonotification of changes to the attached
proxies. Note that if using setters, a specific call to notify_proxies()
may be necessary; see the doc for __setattr__.<table class="fieldTable"></table></div>
<div id="splitTables">
<table class="children sortable" id="id423">
<tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#__init__">__init__</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#ensure_init">ensure_init</a></td>
<td><span>Sets up the variables so the Model's getattr hook and proxy</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#disable_autonotify">disable_autonotify</a></td>
<td><span>disable automatic notification to proxies based on __setattr__.</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#notify_proxies">notify_proxies</a></td>
<td><span>Notify proxies that an attribute value has changed.</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#register_proxy_for_attribute">register_proxy_for_attribute</a></td>
<td><span>Attach a proxy to an attribute. The proxy will be notified of</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#unregister_proxy_for_attribute">unregister_proxy_for_attribute</a></td>
<td><span>Detach a proxy from an attribute.</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#unregister_proxy">unregister_proxy</a></td>
<td><span>Deattach a proxy completely from the model</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#flush_proxies">flush_proxies</a></td>
<td><span>Removes all proxies attached to Model</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#block_proxy">block_proxy</a></td>
<td><span>Temporarily block a proxy from receiving any notification. See</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#unblock_proxy">unblock_proxy</a></td>
<td><span>Re-enable notifications to a proxy</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.model.Model.html#__setattr__">__setattr__</a></td>
<td><span>A special setattr hook that notifies the registered proxies that</span></td>
</tr>
</table>
</div>
<div class="function">
<a name="kiwi.model.Model.__init__">
</a>
<a name="__init__">
</a>
<div class="functionHeader">
def
__init__(self):
</div>
<div class="functionBody">
<div class="interfaceinfo">overridden in <a href="kiwi.model.PickledModel.html">kiwi.model.PickledModel</a></div>
<div class="undocumented">Undocumented</div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.ensure_init">
</a>
<a name="ensure_init">
</a>
<div class="functionHeader">
def
ensure_init(self):
</div>
<div class="functionBody">
<div>Sets up the variables so the Model's getattr hook and proxy notification
work properly.<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.disable_autonotify">
</a>
<a name="disable_autonotify">
</a>
<div class="functionHeader">
def
disable_autonotify(self):
</div>
<div class="functionBody">
<div>disable automatic notification to proxies based on __setattr__. All
changes to the model must be followed by a call to notify_proxies() to
allow the proxies to notice the change.<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.notify_proxies">
</a>
<a name="notify_proxies">
</a>
<div class="functionHeader">
def
notify_proxies(self, attr):
</div>
<div class="functionBody">
<div>Notify proxies that an attribute value has changed.<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.register_proxy_for_attribute">
</a>
<a name="register_proxy_for_attribute">
</a>
<div class="functionHeader">
def
register_proxy_for_attribute(self, attr, proxy):
</div>
<div class="functionBody">
<div>Attach a proxy to an attribute. The proxy will be notified of changes to
that particular attribute (my means of Proxy.notify()).<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.unregister_proxy_for_attribute">
</a>
<a name="unregister_proxy_for_attribute">
</a>
<div class="functionHeader">
def
unregister_proxy_for_attribute(self, attr, proxy):
</div>
<div class="functionBody">
<div>Detach a proxy from an attribute.<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.unregister_proxy">
</a>
<a name="unregister_proxy">
</a>
<div class="functionHeader">
def
unregister_proxy(self, proxy):
</div>
<div class="functionBody">
<div>Deattach a proxy completely from the model<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.flush_proxies">
</a>
<a name="flush_proxies">
</a>
<div class="functionHeader">
def
flush_proxies(self):
</div>
<div class="functionBody">
<div>Removes all proxies attached to Model<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.block_proxy">
</a>
<a name="block_proxy">
</a>
<div class="functionHeader">
def
block_proxy(self, proxy):
</div>
<div class="functionBody">
<div>Temporarily block a proxy from receiving any notification. See
unblock_proxy()<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.unblock_proxy">
</a>
<a name="unblock_proxy">
</a>
<div class="functionHeader">
def
unblock_proxy(self, proxy):
</div>
<div class="functionBody">
<div>Re-enable notifications to a proxy<table class="fieldTable"></table></div>
</div>
</div><div class="function">
<a name="kiwi.model.Model.__setattr__">
</a>
<a name="__setattr__">
</a>
<div class="functionHeader">
def
__setattr__(self, attr, value):
</div>
<div class="functionBody">
<div>A special setattr hook that notifies the registered proxies that the
model has changed. Work around it setting attributes directly to
self.__dict__.</p>
<p>Note that setattr() assumes that the name of the attribute being changed
and the proxy attribute are the same. If this is not the case (as may
happen when using setters) you must call notify_proxies() manually from the
subclass' setter.<table class="fieldTable"></table></div>
</div>
</div>
<address>
<a href="index.html">API Documentation</a> for Kiwi, generated by <a href="http://codespeak.net/~mwh/pydoctor/">pydoctor</a> at 2010-05-20 02:10:57.
</address>
</body>
</html>
|