FAQ What can a pyre factory do?
From DANSE
A pyre factory constructs a component to be bound to a facility. The factory gets to control basically anything you could up to and including execution of the __init__() method. Factories are able to
- choose the class of the component
- use custom creation & initialization schemes, such as the Singleton pattern.
In a typical application, factories are not able to use the component's initialized inventory. (Typical application means one that inherits from the Application class in pyre.applications.Application.
A factory could use its power to manipulate the default state of the component's inventory, but this is STRONGLY DISCOURAGED. Use .pml files instead. Too many cooks make an unrecongnizable mess.
