Home | Trees | Indices | Help |
---|
|
|
|||
Extension A class derived from 'Extension' is a QM extension. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
|
Return the arguments associated with 'extension_class'. 'extension_class' -- A class derived from 'Extension'. returns -- A list of 'Field' objects containing all of the arguments in the class hierarchy. |
Return the arguments associated with 'extension_class'. 'extension_class' -- A class derived from 'Extension'. returns -- A dictionary mapping argument names to 'Field' objects. The dictionary contains all of the arguments in the class hierarchy. |
Return a brief description of the extension class 'extension_class'. 'extension_class' -- A class derived from 'Extension'. 'brief' -- If true, return a brief (one-line) description of the extension class. returns -- A structured text description of 'extension_class'. |
Return the name of 'extension_class'. 'extension_class' -- A class derived from 'Extension'. returns -- The name of 'extension_class'. This is the name that is used when users refer to the class. |
Validate the 'arguments' to the 'extension_class'. 'extension_class' -- A class derived from 'Extension'. 'arguments' -- A dictionary mapping argument names (strings) to values (strings). returns -- A dictionary mapping 'Field's to values. Check that each of the 'arguments' is a valid argument to 'extension_class'. If so, the argumets are converted as required by the 'Field', and the dictionary returned contains the converted values. Otherwise, an exception is raised. |
Create a DOM node for an instance of 'extension_class'. 'extension_class' -- A class derived from 'Extension'. 'arguments' -- The arguments to the extension class. 'document' -- The DOM document that will contain the new element. 'element' -- If not 'None' the extension element to which items will be added. Otherwise, a new element will be created by this function. returns -- A new DOM element corresponding to an instance of the extension class. The caller is responsible for attaching it to the 'document'. |
Create a DOM document for an instance of 'extension_class'. 'extension_class' -- A class derived from 'Extension'. 'arguments' -- The arguments to the extension class. returns -- A new DOM document corresponding to an instance of the extension class. |
Write an XML description of an extension to 'file'. 'extension_class' -- A class derived from 'Extension'. 'arguments' -- A dictionary mapping argument names to values. 'file' -- A file object to which the data should be written. |
Parse a DOM node representing an instance of 'Extension'. 'element' -- A DOM node, of the format created by 'make_dom_element'. 'class_loader' -- A callable. The callable will be passed the name of the extension class and must return the actual class object. 'attachment_store' -- The 'AttachmentStore' in which attachments can be found. returns -- A pair ('extension_class', 'arguments') containing the extension class (a class derived from 'Extension') and the arguments (a dictionary mapping names to values) stored in the 'element'. |
Parse a file describing an extension instance. 'file' -- A file-like object from which the extension instance will be read. 'class_loader' -- A callable. The callable will be passed the name of the extension class and must return the actual class object. 'attachment_store' -- The 'AttachmentStore' in which attachments can be found. returns -- A pair ('extension_class', 'arguments') containing the extension class (a class derived from 'Extension') and the arguments (a dictionary mapping names to values) stored in the 'element'. |
Parse a descriptor representing an instance of 'Extension'. 'descriptor' -- A string representing an instance of 'Extension'. The 'descriptor' has the form 'class(arg1 = "val1", arg2 = "val2", ...)'. The arguments and the parentheses are optional. 'class_loader' -- A callable that, when passed the name of the extension class, will return the actual Python class object. 'extension_loader' -- A callable that loads an existing extension given the name of that extension and returns a tuple '(class, arguments)' where 'class' is a class derived from 'Extension'. If 'extension_loader' is 'None', or if the 'class' returned is 'None', then if a file exists named 'class', the extension is read from 'class' as XML. Any arguments returned by the extension loader or read from the file system are overridden by the arguments explicitly provided in the descriptor. returns -- A pair ('extension_class', 'arguments') containing the extension class (a class derived from 'Extension') and the arguments (a dictionary mapping names to values) stored in the 'element'. The 'arguments' will have already been processed by 'validate_arguments' by the time they are returned. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:39 2011 | http://epydoc.sourceforge.net |