vregistry.py
branchtls-sprint
changeset 719 2a610efe21ce
parent 718 f7011679437a
child 721 f76e89b52553
equal deleted inserted replaced
718:f7011679437a 719:2a610efe21ce
    90       name of the registry for this object (string like 'views',
    90       name of the registry for this object (string like 'views',
    91       'templates'...)
    91       'templates'...)
    92     :id:
    92     :id:
    93       object's identifier in the registry (string like 'main',
    93       object's identifier in the registry (string like 'main',
    94       'primary', 'folder_box')
    94       'primary', 'folder_box')
    95     :__registerer__:
       
    96       registration helper class
       
    97     :__select__:
    95     :__select__:
    98       selection helper function
    96       class'selector
    99     :__selectors__:
    97     :__selectors__:
   100       tuple of selectors to be chained
    98       tuple of selectors to be chained
   101       (__select__ and __selectors__ are mutually exclusive)
    99       (__select__ and __selectors__ are mutually exclusive)
   102       
   100       
   103     Moreover, the `__abstract__` attribute may be set to True to indicate
   101     Moreover, the `__abstract__` attribute may be set to True to indicate
   104     that a vobject is abstract and should not be registered
   102     that a vobject is abstract and should not be registered
   105     """
   103     """
   106     # necessary attributes to interact with the registry
   104     # necessary attributes to interact with the registry
   107     id = None
   105     id = None
   108     __registry__ = None
   106     __registry__ = None
   109     __registerer__ = None
   107     __registerer__ = yes_registerer
   110     __select__ = None
   108     __select__ = None
   111 
   109 
   112     @classmethod
   110     @classmethod
   113     def registered(cls, registry):
   111     def registered(cls, registry):
   114         """called by the registry when the vobject has been registered.
   112         """called by the registry when the vobject has been registered.