Imported core, m, ag and serial for refactoring
This commit is contained in:
parent
6f28ac0382
commit
5baa9b75d0
25 changed files with 918 additions and 4 deletions
20
ag/ag.Module.pyx
Normal file
20
ag/ag.Module.pyx
Normal file
|
@ -0,0 +1,20 @@
|
|||
cdef class Module:
|
||||
def __init__(self, name, provides=set(), requires=set(), common=set()):
|
||||
"""
|
||||
* Modules are identified by their name which has to be unique within the Aggregate's namespace.
|
||||
* The provides sequence contains keywords which are copied into Aggregate's _provided list.
|
||||
Two modules providing the same export can't be linked into the same Aggregate.
|
||||
* The requires sequence contains keywords that have to be already present in the Aggregate's
|
||||
_provided list before linking.
|
||||
* All names in the Module's namespace that don't begin with an underscore will be exported
|
||||
into the Aggregate's namespace.
|
||||
* If you want to call one method on multiple modules, these modules must all export the method name
|
||||
in their "common" set. Otherwise a name collision is raised. Their methods will be called in the
|
||||
same order in which the modules were linked.
|
||||
"""
|
||||
|
||||
self._top = None
|
||||
self._name = name
|
||||
self._provides = set(provides)
|
||||
self._requires = set(requires)
|
||||
self._common = set(common)
|
Loading…
Add table
Add a link
Reference in a new issue