Package kiwi :: Module model :: Class Model
[frames | no frames]

Class Model

Known Subclasses:
PickledModel

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__.
Method Summary
  block_proxy(self, proxy)
Temporarily block a proxy from receiving any notification.
  disable_autonotify(self)
disable automatic notification to proxies based on __setattr__.
  ensure_init(self)
Sets up the variables so the Model's getattr hook and proxy notification work properly.
  flush_proxies(self)
Removes all proxies attached to Model
  notify_proxies(self, attr)
Notify proxies that an attribute value has changed.
  register_proxy_for_attribute(self, attr, proxy)
Attach a proxy to an attribute.
  unblock_proxy(self, proxy)
Re-enable notifications to a proxy
  unregister_proxy(self, proxy)
Deattach a proxy completely from the model
  unregister_proxy_for_attribute(self, attr, proxy)
Detach a proxy from an attribute.

Method Details

block_proxy(self, proxy)

Temporarily block a proxy from receiving any notification. See unblock_proxy()

disable_autonotify(self)

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.

ensure_init(self)

Sets up the variables so the Model's getattr hook and proxy notification work properly.

flush_proxies(self)

Removes all proxies attached to Model

notify_proxies(self, attr)

Notify proxies that an attribute value has changed.

register_proxy_for_attribute(self, attr, proxy)

Attach a proxy to an attribute. The proxy will be notified of changes to that particular attribute (my means of Proxy.notify()).

unblock_proxy(self, proxy)

Re-enable notifications to a proxy

unregister_proxy(self, proxy)

Deattach a proxy completely from the model

unregister_proxy_for_attribute(self, attr, proxy)

Detach a proxy from an attribute.

Generated by Epydoc 2.1 on Thu Oct 19 03:18:12 2006 http://epydoc.sf.net