exopy.utils.declarator module¶
Base class for extension declaration relying on a visitor pattern.
-
class
exopy.utils.declarator.Declarator(parent=None, **kwargs)[source]¶ Bases:
enaml.core.declarative.DeclarativeBase class for extension object which uses a visitor pattern.
-
is_registered¶ Flag indicating whether the declarator has been successfully registered
-
get_path()[source]¶ Query from parent the path to use for this declarator.
- Returns
path – Path declared by the parent. This can be None if no path is declared.
- Return type
unicodeorNone
-
register(collector, traceback)[source]¶ Add the contribution of this extension to the plugin.
- Parameters
collector (
DeclaratorCollector) – Collector in charge handling the registering of declarators. Contributions should be added to the contributions member (Dict). If a declarator cannot be registered because another one need to be registered first it should add itself to the _delayed member (List)traceback (
dict) – Dictionary in which any issue occuring during registration should be recorded.
-
-
class
exopy.utils.declarator.GroupDeclarator(parent=None, **kwargs)[source]¶ Bases:
exopy.utils.declarator.DeclaratorDeclarator used to group an ensemble of declarator.
-
path¶ Prefix path to use for all children Declarator. Path should be dot separated.
-
group¶ Id of the group common to all children Declarator. It is the responsability of the children to mention they are part of a group.
-