lsst.pex.config gba4ed39666+d28a087814
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lsst.pex.config.configChoiceField.SelectionSet Class Reference
Inheritance diagram for lsst.pex.config.configChoiceField.SelectionSet:

Public Member Functions

 __init__ (self, dict_, value, at=None, label="assignment", setHistory=True)
 
 add (self, value, at=None)
 
 discard (self, value, at=None)
 
 __len__ (self)
 
 __iter__ (self)
 
 __contains__ (self, value)
 
 __repr__ (self)
 
 __str__ (self)
 
 __reduce__ (self)
 

Protected Member Functions

Config _config (self)
 

Protected Attributes

 _dict
 
 _field
 
 _config_
 
 _config
 
 _set
 

Detailed Description

A mutable set class that tracks the selection of multi-select
`~lsst.pex.config.ConfigChoiceField` objects.

Parameters
----------
dict_ : `ConfigInstanceDict`
    The dictionary of instantiated configs.
value : `~typing.Any`
    The selected key.
at : `list` of `~lsst.pex.config.callStack.StackFrame` or `None`, optional
    The call stack when the selection was made.
label : `str`, optional
    Label for history tracking.
setHistory : `bool`, optional
    Add this even to the history, if `True`.

Notes
-----
This class allows a user of a multi-select
`~lsst.pex.config.ConfigChoiceField` to add or discard items from the set
of active configs. Each change to the selection is tracked in the field's
history.

Member Function Documentation

◆ add()

lsst.pex.config.configChoiceField.SelectionSet.add ( self,
value,
at = None )
Add a value to the selected set.

Parameters
----------
value : `~typing.Any`
    The selected key.
at : `list` of `~lsst.pex.config.callStack.StackFrame` or `None`,\
        optional
    Stack frames for history recording.

◆ discard()

lsst.pex.config.configChoiceField.SelectionSet.discard ( self,
value,
at = None )
Discard a value from the selected set.

Parameters
----------
value : `~typing.Any`
    The selected key.
at : `list` of `~lsst.pex.config.callStack.StackFrame` or `None`,\
        optional
    Stack frames for history recording.

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