Function | dependentsOf | Undocumented |
Function | dependsOn | This function behaves like axiom.attributes.reference
but with
|
Function | classDependsOn | Undocumented |
Function | installOn | Install this object on the target, tracking that the object now |
Function | uninstallFrom | Remove this object from the target, as well as any dependencies |
Function | installedOn | If this item is installed on another item, return the install |
Function | installedDependents | Return an iterable of things installed on the target that |
Function | installedUniqueRequirements | Return an iterable of things installed on the target that this item |
Function | installedRequirements | Return an iterable of things installed on the target that this |
Function | onlyInstallPowerups | Only power up the target with this object's powerups, without interacting |
This function behaves like axiom.attributes.reference
but with an extra behaviour: when this item is installed (via axiom.dependency.installOn
on a target item, the type named here will be instantiated and installed on
the target as well.
class Foo(Item): counter = integer() thingIDependOn = dependsOn(Baz, lambda baz: baz.setup())
Parameters | itemType | The Item class to instantiate and install. |
itemCustomizer | A callable that accepts the item installed as a dependency as its first argument. It will be called only if an item is created to satisfy this dependency. | |
Returns | An axiom.attributes.reference
instance.
|
Install this object on the target, tracking that the object now depends on the target, and the object was explicitly installed and therefore should not be uninstalled by subsequent uninstallation operations unless it is explicitly removed.
If the type of the object being installed has a "powerupInterfaces" attribute (containing either a sequence of interfaces, or a sequence of (interface, priority) tuples), the target will be powered up with this object on those interfaces.
If this object has a "__getPowerupInterfaces__" method, it will be called with an iterable of (interface, priority) tuples. The iterable of (interface, priority) tuples it returns will then be installed.Remove this object from the target, as well as any dependencies that it automatically installed which were not explicitly "pinned" by calling "install", and raising an exception if anything still depends on this.
If the type of the object being installed has a "powerupInterfaces" attribute (containing either a sequence of interfaces, or a sequence of (interface, priority) tuples), the target will be powered down with this object on those interfaces.
If this object has a "__getPowerupInterfaces__" method, it will be called with an iterable of (interface, priority) tuples. The iterable of (interface, priority) tuples it returns will then be uninstalled.