Registry containing product generation algorithm information.
More...
|
| __init__ (self, tag=GENREG, encoding=UTF8, filename=None, msg=None) |
| Constructor.
|
|
| register (self, name, module, function, Help="", strings="", ints="", floats="", seqs="") |
| Creates a registry entry for a given algorithm.
|
|
| is_registered (self, algorithm) |
| Checks whether an algorithm is registered.
|
|
| deregister (self, name) |
| De-registers an algorithm from the registry.
|
|
| Help (self, name) |
|
| setencoding (self, encoding) |
| Sets encoding attribute of this instance.
|
|
| tostring (self, doindent=True) |
| Formats the object and its contents to an XML string.
|
|
| fromstring (self, msg) |
| Formats the object from an XML message string.
|
|
| indent (self, elem=None, level=0) |
| Indents self.
|
|
| save (self, filename=None, doindent=True) |
| Writes an XML message to file.
|
|
| read (self, filename=None) |
| Reads a message from XML file.
|
|
| append (self, el) |
|
| find (self, name) |
|
| remove (self, element) |
|
| set (self, key, value) |
|
| subelement (self, key) |
|
| getelement (self) |
|
|
| tag = tag |
|
| encoding = encoding |
|
| filename = filename |
|
| element = BltXMLElement(tag) |
|
str | header = """<?xml version="1.0" encoding="%s"?>""" % encoding |
|
Registry containing product generation algorithm information.
◆ __init__()
Lib.rave_pgf_registry.PGF_Registry.__init__ |
( |
| self, |
|
|
| tag = GENREG, |
|
|
| encoding = UTF8, |
|
|
| filename = None, |
|
|
| msg = None ) |
Constructor.
- Parameters
-
tag | string of the root Element, should always be GENREG |
encoding | string character encoding name, should probably always be UTF-8 |
filename | string, optional file name from which to read registry. |
msg | string, optional XML string containing registry to parse. |
Reimplemented from Lib.BaltradMessageXML.BltXML.
◆ deregister()
Lib.rave_pgf_registry.PGF_Registry.deregister |
( |
| self, |
|
|
| name ) |
De-registers an algorithm from the registry.
- Parameters
-
name | string, name of the item to de-register. |
◆ Help()
Lib.rave_pgf_registry.PGF_Registry.Help |
( |
| self, |
|
|
| name ) |
- Returns
- string a help text comprising the names of each registered algorithm and its descriptive text.
◆ is_registered()
Lib.rave_pgf_registry.PGF_Registry.is_registered |
( |
| self, |
|
|
| algorithm ) |
Checks whether an algorithm is registered.
- Parameters
-
algorithm | string name of the algorithm to check. |
- Returns
- boolean True or False.
◆ register()
Lib.rave_pgf_registry.PGF_Registry.register |
( |
| self, |
|
|
| name, |
|
|
| module, |
|
|
| function, |
|
|
| Help = "", |
|
|
| strings = "", |
|
|
| ints = "", |
|
|
| floats = "", |
|
|
| seqs = "" ) |
Creates a registry entry for a given algorithm.
- Parameters
-
name | string algorithm's name. |
module | string name of the module to import. |
function | string name of the function to run in the module. |
Help | string containing explanatory text for this registry entry. |
strings | string of comma-separated argument names that are strings. |
ints | string of comma-separated argument names that are integers. |
floats | string of comma-separated argument names that are floats. |
seqs | string of comma-separated argument names that are sequences. |
- Returns
- nothing, the Element is appended to the registry.
The documentation for this class was generated from the following file: