Class p.c.p.Plugin(object):

Part of pida.core.plugins View In Hierarchy

A possible implementation of a Plugin. A plugin holds an object. When the 'get_instance' method is called, by suplying a registry, the held object is returned. If you extend Plugin you can change this by suplying one instance for an appropriate registry, or generating an instance every time the method is called.

You can create a plugin's instance by issuing an instance or a factory function. The factory function receives an argument, the context registry and returns the object this plugin holds. If you use the factory it is called only once, to set the holded object, when the get_instance method is called.

Line # Kind Name Docs
251 Method __init__ Undocumented
260 Method get_instance Returns the object associated with the Plugin.
268 Method reset When this plugin contains a factory makes it regen the instance.
273 Method unplug This method is called when the service is removed from the registry
def __init__(self, instance=None, factory=None):
Undocumented
def get_instance(self, registry):
Returns the object associated with the Plugin.
def reset(self):
When this plugin contains a factory makes it regen the instance.
def unplug(self, registry):
This method is called when the service is removed from the registry
API Documentation for PIDA, generated by pydoctor.