RAVE
Lib.rave_pgf_registry.PGF_Registry Class Reference

Registry containing product generation algorithm information. More...

Inheritance diagram for Lib.rave_pgf_registry.PGF_Registry:
Lib.BaltradMessageXML.BltXML

Public Member Functions

 __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)
 
- Public Member Functions inherited from Lib.BaltradMessageXML.BltXML
 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)
 

Protected Attributes

 _children
 

Additional Inherited Members

- Public Attributes inherited from Lib.BaltradMessageXML.BltXML
 tag = tag
 
 encoding = encoding
 
 filename = filename
 
 element = BltXMLElement(tag)
 
str header = """<?xml version="1.0" encoding="%s"?>""" % encoding
 

Detailed Description

Registry containing product generation algorithm information.

Constructor & Destructor Documentation

◆ __init__()

Lib.rave_pgf_registry.PGF_Registry.__init__ ( self,
tag = GENREG,
encoding = UTF8,
filename = None,
msg = None )

Constructor.

Parameters
tagstring of the root Element, should always be GENREG
encodingstring character encoding name, should probably always be UTF-8
filenamestring, optional file name from which to read registry.
msgstring, optional XML string containing registry to parse.

Reimplemented from Lib.BaltradMessageXML.BltXML.

Member Function Documentation

◆ deregister()

Lib.rave_pgf_registry.PGF_Registry.deregister ( self,
name )

De-registers an algorithm from the registry.

Parameters
namestring, 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
algorithmstring 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
namestring algorithm's name.
modulestring name of the module to import.
functionstring name of the function to run in the module.
Helpstring containing explanatory text for this registry entry.
stringsstring of comma-separated argument names that are strings.
intsstring of comma-separated argument names that are integers.
floatsstring of comma-separated argument names that are floats.
seqsstring 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: