ConfigurableFactory¶
- class scooch.ConfigurableFactory¶
A Factory for constructing scooch configurables for a given configuration.
- construct(cfg_type, cfg)¶
This will construct and return a Scooch configurable of a given cfg_type according to the parameterization specified in the cfg.
- Args:
cfg_type: ConfigCollection, ConfigList or ConfigurableMeta class: This specifies the type to construct each scooch configurable as.
cfg: scooch.Config: The config specifying the Configurable’s parameterization.
- Return:
scooch.Configurable (or list or dictionary thereof): The constructed scooch Configurable.
- get_class(base_class, config)¶
Returns the Configurable class for a given config dictionary or Scooch Config object.
- Args:
base_class: Configurable - The base class for which you want to search for derived classes of.
config: Config - A dictionary with a key specifying a SCOOCH Configurable class name.
- Return:
Configurable.__class__ - The class that can be constructed with the provided config dictionary.