Class v.c.g.m.Model(object):

Part of vmc.contrib.gtkmvc.model View In Hierarchy

Known subclasses: vmc.contrib.gtkmvc.model.ListStoreModel, vmc.contrib.gtkmvc.model.TextBufferModel, vmc.contrib.gtkmvc.model.TreeStoreModel, vmc.contrib.gtkmvc.model_mt.ModelMT

This class is the application model base class. It handles a set
of observable properties which you are interested in showing by
one ore more view - via one or more observers of course. The
mechanism is the following:

1. You are interested in showing a set of model property, that
   you can declare in the __properties__ member map.

2. You define one or more observers that observe one or more
   properties you registered. When someone changes a property
   value the model notifies the changing to each observer.

The property-observer[s] association is given by the implicit
rule in observers method names: if you want the model notified
the changing event of the value of the property 'p' you have to
define the method called 'property_p_value_change' in each
listening observer class.

Notice that tipically 'controllers' implement the observer
pattern. The notification method gets the emitting model, the
old value for the property and the new one.  Properties
functionalities are automatically provided by the
ObservablePropertyMeta meta-class.
Method __init__ Undocumented
Method register_property Registers an existing property to be monitored, and sets
Method has_property Returns true if given property name refers an observable
Method register_observer Undocumented
Method unregister_observer Undocumented
Method __notify_observer__ This can be overridden by derived class in order to call
Method notify_property_value_change Undocumented
Method notify_method_before_change Undocumented
Method notify_method_after_change Undocumented
Method notify_signal_emit Undocumented
def __init__(self):
Undocumented
def register_property(self, name):
Registers an existing property to be monitored, and sets up notifiers for notifications
def has_property(self, name):
Returns true if given property name refers an observable property inside self or inside derived classes
def register_observer(self, observer):
Undocumented
def unregister_observer(self, observer):
Undocumented
def _reset_property_notification(self, prop_name):
Called when it has be done an assignment that changes the type of a property or the instance of the property has been changed to a different instance. In this case it must be unregistered and registered again
def __add_observer_notification(self, observer, prop_name):
Searches in the observer for any possible listener, and stores the notification methods to be called later
def __remove_observer_notification(self, observer, prop_name):
Undocumented
def __notify_observer__(self, observer, method, *args, **kwargs):
This can be overridden by derived class in order to call the method in a different manner (for example, in multithreading, or a rpc, etc.) This implementation simply calls the given method with the given arguments
def notify_property_value_change(self, prop_name, old, new):
Undocumented
def notify_method_before_change(self, prop_name, instance, meth_name, args, kwargs):
Undocumented
def notify_method_after_change(self, prop_name, instance, meth_name, res, args, kwargs):
Undocumented
def notify_signal_emit(self, prop_name, args, kwargs):
Undocumented
API Documentation for vodafone-mobile-connect-card-driver-for-linux, generated by pydoctor at 2008-01-10 13:06:31.