Package twisted :: Package coil :: Module coil :: Class IConfigurator
[show private | hide private]
[frames | no frames]

Class IConfigurator

Interface --+
            |
           IConfigurator


A configurator object.

I have an attribute, configurableClass, which is the class of objects I can configure.

I have a dictionary attribute, configTypes, that indicates what sort of objects I will allow to be configured. It is a mapping of variable names to a list of [variable type, prompt, description]. Variable types may be either python type objects, classes, or objects describing a desired 'hint' to the interface (such as 'boolean' or ['choice', 'a', 'b', 'c']). (XXX Still in flux.)
Method Summary
  configDispensers(self)
Indicates what methods on me may be called with no arguments to create an instance of another configurable.
  configure(self, dict)
Configure our instance, given a dict of properties.
  getConfiguration(self)
Return a mapping of attribute to value.
  getInstance(self)
Return instance being configured.
  getType(self, name)
Get the type of a configuration variable.

Method Details

configDispensers(self)

Indicates what methods on me may be called with no arguments to create an instance of another configurable. It returns a list of the form [(method name, interface, descString), ...].

configure(self, dict)

Configure our instance, given a dict of properties.

Will raise a InvalidConfiguration exception on bad input.

getConfiguration(self)

Return a mapping of attribute to value.

The returned key are the attributes mentioned in configTypes.

getInstance(self)

Return instance being configured.

getType(self, name)

Get the type of a configuration variable.

Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:28:01 2003 http://epydoc.sf.net