Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
xmlrpc.server.XMLRPCDocGenerator Class Reference
Inheritance diagram for xmlrpc.server.XMLRPCDocGenerator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def set_server_title
def set_server_name
def set_server_documentation
def generate_html_documentation

Public Attributes

 server_name
 server_documentation
 server_title

Detailed Description

Generates documentation for an XML-RPC server.

This class is designed as mix-in and should not
be constructed directly.

Definition at line 808 of file server.py.


Constructor & Destructor Documentation

Reimplemented in xmlrpc.server.DocCGIXMLRPCRequestHandler.

Definition at line 815 of file server.py.

00815 
00816     def __init__(self):
00817         # setup variables used for HTML documentation
00818         self.server_name = 'XML-RPC Server Documentation'
00819         self.server_documentation = \
00820             "This server exports the following methods through the XML-RPC "\
00821             "protocol."
00822         self.server_title = 'XML-RPC Server Documentation'

Here is the caller graph for this function:


Member Function Documentation

generate_html_documentation() => html documentation for the server

Generates HTML documentation for the server using introspection for
installed functions and instances that do not implement the
_dispatch method. Alternatively, instances can choose to implement
the _get_method_argstring(method_name) method to provide the
argument string used in the documentation and the
_methodHelp(method_name) method to provide the help text used
in the documentation.

Definition at line 838 of file server.py.

00838 
00839     def generate_html_documentation(self):
00840         """generate_html_documentation() => html documentation for the server
00841 
00842         Generates HTML documentation for the server using introspection for
00843         installed functions and instances that do not implement the
00844         _dispatch method. Alternatively, instances can choose to implement
00845         the _get_method_argstring(method_name) method to provide the
00846         argument string used in the documentation and the
00847         _methodHelp(method_name) method to provide the help text used
00848         in the documentation."""
00849 
00850         methods = {}
00851 
00852         for method_name in self.system_listMethods():
00853             if method_name in self.funcs:
00854                 method = self.funcs[method_name]
00855             elif self.instance is not None:
00856                 method_info = [None, None] # argspec, documentation
00857                 if hasattr(self.instance, '_get_method_argstring'):
00858                     method_info[0] = self.instance._get_method_argstring(method_name)
00859                 if hasattr(self.instance, '_methodHelp'):
00860                     method_info[1] = self.instance._methodHelp(method_name)
00861 
00862                 method_info = tuple(method_info)
00863                 if method_info != (None, None):
00864                     method = method_info
00865                 elif not hasattr(self.instance, '_dispatch'):
00866                     try:
00867                         method = resolve_dotted_attribute(
00868                                     self.instance,
00869                                     method_name
00870                                     )
00871                     except AttributeError:
00872                         method = method_info
00873                 else:
00874                     method = method_info
00875             else:
00876                 assert 0, "Could not find method in self.functions and no "\
00877                           "instance installed"
00878 
00879             methods[method_name] = method
00880 
00881         documenter = ServerHTMLDoc()
00882         documentation = documenter.docserver(
00883                                 self.server_name,
00884                                 self.server_documentation,
00885                                 methods
00886                             )
00887 
00888         return documenter.page(self.server_title, documentation)

Here is the call graph for this function:

Here is the caller graph for this function:

def xmlrpc.server.XMLRPCDocGenerator.set_server_documentation (   self,
  server_documentation 
)
Set the documentation string for the entire server.

Definition at line 833 of file server.py.

00833 
00834     def set_server_documentation(self, server_documentation):
00835         """Set the documentation string for the entire server."""
00836 
00837         self.server_documentation = server_documentation

def xmlrpc.server.XMLRPCDocGenerator.set_server_name (   self,
  server_name 
)
Set the name of the generated HTML server documentation

Definition at line 828 of file server.py.

00828 
00829     def set_server_name(self, server_name):
00830         """Set the name of the generated HTML server documentation"""
00831 
00832         self.server_name = server_name

def xmlrpc.server.XMLRPCDocGenerator.set_server_title (   self,
  server_title 
)
Set the HTML title of the generated server documentation

Definition at line 823 of file server.py.

00823 
00824     def set_server_title(self, server_title):
00825         """Set the HTML title of the generated server documentation"""
00826 
00827         self.server_title = server_title


Member Data Documentation

Definition at line 818 of file server.py.

Definition at line 817 of file server.py.

Definition at line 821 of file server.py.


The documentation for this class was generated from the following file: