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
|
Manager
=======
.. module:: circuits.core.manager
The :mod:`~circuits.core` :class:`~Manager`
class is the base class of all components
in circuits. It is what defines the API(s)
of all components and necessary machinery
to run your application smoothly.
.. note:: It is not recommended to actually use
the :class:`~Manager` in your application
code unless you know what you're doing.
.. warning:: A :class:`~Manager` **does not** know
how to register itself to other components!
It is a manager, not a component, however
it does form the basis of every component.
Usage
-----
Using the :class:`~Manager` in your application is
not really recommended except in some special
circumstances where you want to have a top-level
object that you can register things to.
Example:
.. code-block:: python
:linenos:
from circuits import Component, Manager
class App(Component):
"""Your Application"""
manager = Manager()
App().register(manager)
manager.run()
.. note:: If you *think* you need a :class:`~Manager`
chances are you probably don't. Use a
:class:`~circuits.core.components.Component`
instead.
|