LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Classes | Functions | Variables
lsst.pex.config.registry Namespace Reference

Classes

class  ConfigurableWrapper
 
class  Registry
 
class  RegistryAdaptor
 
class  RegistryInstanceDict
 
class  RegistryField
 

Functions

def makeRegistry
 
def registerConfigurable
 
def registerConfig
 

Variables

tuple __all__ = ("Registry", "makeRegistry", "RegistryField", "registerConfig", "registerConfigurable")
 

Function Documentation

def lsst.pex.config.registry.makeRegistry (   doc,
  configBaseType = Config 
)
A convenience function to create a new registry.

The returned value is an instance of a trivial subclass of Registry whose only purpose is to
customize its doc string and set attrList.

Definition at line 192 of file registry.py.

193 def makeRegistry(doc, configBaseType=Config):
194  """A convenience function to create a new registry.
195 
196  The returned value is an instance of a trivial subclass of Registry whose only purpose is to
197  customize its doc string and set attrList.
198  """
199  cls = type("Registry", (Registry,), {"__doc__": doc})
200  return cls(configBaseType=configBaseType)
def lsst.pex.config.registry.registerConfig (   name,
  registry,
  target 
)
A decorator that adds a class as a ConfigClass in a Registry, and associates it with the given
configurable.

Definition at line 211 of file registry.py.

212 def registerConfig(name, registry, target):
213  """A decorator that adds a class as a ConfigClass in a Registry, and associates it with the given
214  configurable.
215  """
216  def decorate(cls):
217  registry.register(name, target=target, ConfigClass=cls)
218  return cls
219  return decorate
def lsst.pex.config.registry.registerConfigurable (   name,
  registry,
  ConfigClass = None 
)
A decorator that adds a class as a configurable in a Registry.

If the 'ConfigClass' argument is None, the class's ConfigClass attribute will be used.

Definition at line 201 of file registry.py.

202 def registerConfigurable(name, registry, ConfigClass=None):
203  """A decorator that adds a class as a configurable in a Registry.
204 
205  If the 'ConfigClass' argument is None, the class's ConfigClass attribute will be used.
206  """
207  def decorate(cls):
208  registry.register(name, target=cls, ConfigClass=ConfigClass)
209  return cls
210  return decorate

Variable Documentation

tuple lsst.pex.config.registry.__all__ = ("Registry", "makeRegistry", "RegistryField", "registerConfig", "registerConfigurable")

Definition at line 28 of file registry.py.