lsst.pex.config g38189d092c+b66847d792
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.pex.config.configurableActions._configurableActionStructField.ConfigurableActionStruct Class Reference
Inheritance diagram for lsst.pex.config.configurableActions._configurableActionStructField.ConfigurableActionStruct:

Public Member Functions

def __init__ (self, Config config, ConfigurableActionStructField field, Mapping[str, ConfigurableAction] value, Any at, str label)
 
List[tuple] history (self)
 
Iterable[str] fieldNames (self)
 
None __setattr__ (self, str attr, Union[ActionTypeVar, Type[ActionTypeVar]] value, at=None, label="setattr", setHistory=False)
 
Any __getattr__ (self, attr)
 
def __delattr__ (self, name)
 
Iterator[ActionTypeVar] __iter__ (self)
 
Iterable[Tuple[str, ActionTypeVar]] items (self)
 
bool __bool__ (self)
 

Static Public Attributes

 update = ConfigurableActionStructUpdater()
 
 remove = ConfigurableActionStructRemover()
 

Detailed Description

A ConfigurableActionStruct is the storage backend class that supports
the ConfigurableActionStructField. This class should not be created
directly.

This class allows managing a collection of `ConfigurableActions` with a
struct like interface, that is to say in an attribute like notation.

Attributes can be dynamically added or removed as such:

ConfigurableActionStructInstance.variable1 = a_configurable_action
del ConfigurableActionStructInstance.variable1

Each action is then available to be individually configured as a normal
`lsst.pex.config.Config` object.

ConfigurableActionStruct supports two special convenience attributes.

The first is ``update``. You may assign a dict of `ConfigurableActions` or
a `ConfigurableActionStruct` to this attribute which will update the
`ConfigurableActionStruct` on which the attribute is invoked such that it
will be updated to contain the entries specified by the structure on the
right hand side of the equals sign.

The second convenience attribute is named ``remove``. You may assign an
iterable of strings which correspond to attribute names on the
`ConfigurableActionStruct`. All of the corresponding attributes will then
be removed. If any attribute does not exist, an `AttributeError` will be
raised. Any attributes in the Iterable prior to the name which raises will
have been removed from the `ConfigurableActionStruct`

The documentation for this class was generated from the following file: