lsst.pex.config  18.1.0-3-g6b74884
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
pex.config.registry.RegistryField Class Reference
Inheritance diagram for pex.config.registry.RegistryField:
pex.config.configChoiceField.ConfigChoiceField pex.config.config.Field

Public Member Functions

def __init__ (self, doc, registry, default=None, optional=False, multi=False)
 
def __deepcopy__ (self, memo)
 
def __get__ (self, instance, owner=None)
 
def __get__ (self, instance, owner=None, at=None, label="default")
 
def __set__ (self, instance, value, at=None, label="assignment")
 
def rename (self, instance)
 
def validate (self, instance)
 
def toDict (self, instance)
 
def freeze (self, instance)
 
def save (self, outfile, instance)
 
def __delete__ (self, instance, at=None, label='deletion')
 

Public Attributes

 registry
 
 typemap
 
 multi
 
 dtype
 
 doc
 
 deprecated
 
 default
 
 check
 
 optional
 
 source
 

Static Public Attributes

 instanceDictClass = RegistryInstanceDict
 
 supportedTypes = set((str, bool, float, int, complex))
 

Detailed Description

A configuration field whose options are defined in a `Registry`.

Parameters
----------
doc : `str`
    A description of the field.
registry : `Registry`
    The registry that contains this field.
default : `str`, optional
    The default target key.
optional : `bool`, optional
    When `False`, `lsst.pex.config.Config.validate` fails if the field's
    value is `None`.
multi : `bool`, optional
    If `True`, the field allows multiple selections. The default is
    `False`.

See also
--------
ChoiceField
ConfigChoiceField
ConfigDictField
ConfigField
ConfigurableField
DictField
Field
ListField
RangeField

Definition at line 277 of file registry.py.

Constructor & Destructor Documentation

◆ __init__()

def pex.config.registry.RegistryField.__init__ (   self,
  doc,
  registry,
  default = None,
  optional = False,
  multi = False 
)

Definition at line 312 of file registry.py.

Member Function Documentation

◆ __deepcopy__()

def pex.config.registry.RegistryField.__deepcopy__ (   self,
  memo 
)
Customize deep-copying, want a reference to the original registry.

WARNING: this must be overridden by subclasses if they change the
constructor signature!

Definition at line 317 of file registry.py.

◆ __delete__()

def pex.config.config.Field.__delete__ (   self,
  instance,
  at = None,
  label = 'deletion' 
)
inherited
Delete an attribute from a `lsst.pex.config.Config` instance.

Parameters
----------
instance : `lsst.pex.config.Config`
    The config instance that contains this field.
at : `list` of `lsst.pex.config.callStack.StackFrame`
    The call stack (created by
    `lsst.pex.config.callStack.getCallStack`).
label : `str`, optional
    Event label for the history.

Notes
-----
This is invoked by the owning `~lsst.pex.config.Config` object and
should not be called directly.

Definition at line 563 of file config.py.

◆ __get__() [1/2]

def pex.config.configChoiceField.ConfigChoiceField.__get__ (   self,
  instance,
  owner = None 
)
inherited

Definition at line 430 of file configChoiceField.py.

◆ __get__() [2/2]

def pex.config.config.Field.__get__ (   self,
  instance,
  owner = None,
  at = None,
  label = "default" 
)
inherited
Define how attribute access should occur on the Config instance
This is invoked by the owning config object and should not be called
directly

When the field attribute is accessed on a Config class object, it
returns the field object itself in order to allow inspection of
Config classes.

When the field attribute is access on a config instance, the actual
value described by the field (and held by the Config instance) is
returned.

Definition at line 488 of file config.py.

◆ __set__()

def pex.config.configChoiceField.ConfigChoiceField.__set__ (   self,
  instance,
  value,
  at = None,
  label = "assignment" 
)
inherited

Definition at line 436 of file configChoiceField.py.

◆ freeze()

def pex.config.configChoiceField.ConfigChoiceField.freeze (   self,
  instance 
)
inherited

Definition at line 483 of file configChoiceField.py.

◆ rename()

def pex.config.configChoiceField.ConfigChoiceField.rename (   self,
  instance 
)
inherited

Definition at line 450 of file configChoiceField.py.

◆ save()

def pex.config.configChoiceField.ConfigChoiceField.save (   self,
  outfile,
  instance 
)
inherited

Definition at line 498 of file configChoiceField.py.

◆ toDict()

def pex.config.configChoiceField.ConfigChoiceField.toDict (   self,
  instance 
)
inherited

Definition at line 467 of file configChoiceField.py.

◆ validate()

def pex.config.configChoiceField.ConfigChoiceField.validate (   self,
  instance 
)
inherited

Definition at line 455 of file configChoiceField.py.

Member Data Documentation

◆ check

pex.config.config.Field.check
inherited

Definition at line 305 of file config.py.

◆ default

pex.config.config.Field.default
inherited

Definition at line 301 of file config.py.

◆ deprecated

pex.config.config.Field.deprecated
inherited

Definition at line 292 of file config.py.

◆ doc

pex.config.config.Field.doc
inherited

Definition at line 288 of file config.py.

◆ dtype

pex.config.config.Field.dtype
inherited

Definition at line 281 of file config.py.

◆ instanceDictClass

pex.config.registry.RegistryField.instanceDictClass = RegistryInstanceDict
static

Definition at line 308 of file registry.py.

◆ multi

pex.config.configChoiceField.ConfigChoiceField.multi
inherited

Definition at line 416 of file configChoiceField.py.

◆ optional

pex.config.config.Field.optional
inherited

Definition at line 309 of file config.py.

◆ registry

pex.config.registry.RegistryField.registry

Definition at line 314 of file registry.py.

◆ source

pex.config.config.Field.source
inherited

Definition at line 316 of file config.py.

◆ supportedTypes

pex.config.config.Field.supportedTypes = set((str, bool, float, int, complex))
staticinherited

Definition at line 266 of file config.py.

◆ typemap

pex.config.configChoiceField.ConfigChoiceField.typemap
inherited

Definition at line 415 of file configChoiceField.py.


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