Package posterity :: Module component :: Class ComponentManager

Class ComponentManager



object --+
         |
        ComponentManager
Known Subclasses:
core.PosterityInstance

The component manager keeps a pool of active components.

Instance Methods
 
__init__(self)
Initialize the component manager.
 
__contains__(self, cls)
Return wether the given class is in the list of active components.
 
__getitem__(self, cls)
Activate the component instance for the given class, or return the existing the instance if the component has already been activated.
 
component_activated(self, component)
Can be overridden by sub-classes so that special initialization for components can be provided.
 
is_component_enabled(self, cls)
Can be overridden by sub-classes to veto the activation of a component.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 
Initialize the component manager.
Overrides: object.__init__

is_component_enabled(self, cls)

 

Can be overridden by sub-classes to veto the activation of a component.

If this method returns False, the component with the given class will not be available.