lsst.pex.config  16.0+3
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pex.config.configField.ConfigField Class Reference
Inheritance diagram for lsst.pex.config.configField.ConfigField:
lsst.pex.config.config.Field

Public Member Functions

def __init__ (self, doc, dtype, default=None, check=None)
 
def __get__ (self, instance, owner=None)
 
def __set__ (self, instance, value, at=None, label="assignment")
 
def rename (self, instance)
 
def save (self, outfile, instance)
 
def freeze (self, instance)
 
def toDict (self, instance)
 
def validate (self, instance)
 
def __get__ (self, instance, owner=None, at=None, label="default")
 
def __delete__ (self, instance, at=None, label='deletion')
 

Public Attributes

 dtype
 
 doc
 
 default
 
 check
 
 optional
 
 source
 

Static Public Attributes

 supportedTypes = set((str, unicode, basestring, oldStringType, bool, float, int, complex))
 

Detailed Description

Defines a field which is itself a Config.

The behavior of this type of field is much like that of the base Field type.

Note that dtype must be a subclass of Config.

If default=None, the field will default to a default-constructed
instance of dtype.

Additionally, to allow for fewer deep-copies, assigning an instance of
ConfigField to dtype itself, is considered equivalent to assigning a
default-constructed sub-config. This means that the argument default can be
dtype, as well as an instance of dtype.

Assigning to ConfigField will update all of the fields in the config.

Definition at line 31 of file configField.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pex.config.configField.ConfigField.__init__ (   self,
  doc,
  dtype,
  default = None,
  check = None 
)

Definition at line 50 of file configField.py.

Member Function Documentation

◆ __delete__()

def lsst.pex.config.config.Field.__delete__ (   self,
  instance,
  at = None,
  label = 'deletion' 
)
inherited
Describe how attribute deletion should occur on the Config instance.
This is invoked by the owning config object and should not be called
directly

Definition at line 344 of file config.py.

◆ __get__() [1/2]

def lsst.pex.config.configField.ConfigField.__get__ (   self,
  instance,
  owner = None 
)

Definition at line 60 of file configField.py.

◆ __get__() [2/2]

def lsst.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 287 of file config.py.

◆ __set__()

def lsst.pex.config.configField.ConfigField.__set__ (   self,
  instance,
  value,
  at = None,
  label = "assignment" 
)

Definition at line 71 of file configField.py.

◆ freeze()

def lsst.pex.config.configField.ConfigField.freeze (   self,
  instance 
)

Definition at line 107 of file configField.py.

◆ rename()

def lsst.pex.config.configField.ConfigField.rename (   self,
  instance 
)

Definition at line 99 of file configField.py.

◆ save()

def lsst.pex.config.configField.ConfigField.save (   self,
  outfile,
  instance 
)

Definition at line 103 of file configField.py.

◆ toDict()

def lsst.pex.config.configField.ConfigField.toDict (   self,
  instance 
)

Definition at line 111 of file configField.py.

◆ validate()

def lsst.pex.config.configField.ConfigField.validate (   self,
  instance 
)

Definition at line 115 of file configField.py.

Member Data Documentation

◆ check

lsst.pex.config.config.Field.check
inherited

Definition at line 197 of file config.py.

◆ default

lsst.pex.config.config.Field.default
inherited

Definition at line 196 of file config.py.

◆ doc

lsst.pex.config.config.Field.doc
inherited

Definition at line 194 of file config.py.

◆ dtype

lsst.pex.config.config.Field.dtype
inherited

Definition at line 193 of file config.py.

◆ optional

lsst.pex.config.config.Field.optional
inherited

Definition at line 198 of file config.py.

◆ source

lsst.pex.config.config.Field.source
inherited

Definition at line 199 of file config.py.

◆ supportedTypes

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

Definition at line 164 of file config.py.


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