terrapower.physics.neutronics.dragon.dragonFactory module
Factory for building DRAGON related objects and their subclasses.
This is an attempt at using an Abstract Factory pattern to allow
applications to configure the dragon plugin as they see necessary.
Choosing which writer subclasses to use has to be done at some level.
This factory allows an app to configure its choices in a global
instance of this abstract factory. At some later date it may
make sense for ARMI to provide a common way for plugins
to self-configure. .
-
class
terrapower.physics.neutronics.dragon.dragonFactory.
DragonFactory
[source]
Bases: object
Build objects based on registration.
Enables easy customization of the chain of objects needed without excessive subclassing
-
setKey
(key)[source]
Apply a key to this factory to choose classes with.
-
copyEntriesToKey
(newKey)[source]
Copy current registrations into a new key.
-
registerRunner
(key, cls)[source]
-
registerWriter
(key, cls)[source]
-
registerExecuter
(key, cls)[source]
-
makeRunner
(objsToRun)[source]
-
makeExecuter
(opts, obj)[source]
Return a new Executer instance.
-
makeWriter
(objs, options)[source]
Return a new writer instance