|
Gaia
|
Public Member Functions | |
| def | __init__ (self, src, include_function_definition=True, quiet=False) |
| def | generate (self) |
| def | parse (self, node) |
| def | parse_Document (self, node) |
| def | parse_Text (self, node) |
| def | parse_Element (self, node) |
| def | parse_Comment (self, node) |
| def | add_text (self, value) |
| def | get_specific_nodes (self, node, names) |
| def | generic_parse (self, node, pad=0) |
| def | space_parse (self, node) |
| def | do_compoundname (self, node) |
| def | do_compounddef (self, node) |
| def | do_includes (self, node) |
| def | do_parameterlist (self, node) |
| def | do_para (self, node) |
| def | do_parametername (self, node) |
| def | do_parameterdefinition (self, node) |
| def | do_detaileddescription (self, node) |
| def | do_briefdescription (self, node) |
| def | do_memberdef (self, node) |
| def | do_definition (self, node) |
| def | do_sectiondef (self, node) |
| def | do_header (self, node) |
| def | do_simplesect (self, node) |
| def | do_argsstring (self, node) |
| def | do_member (self, node) |
| def | do_doxygenindex (self, node) |
| def | write (self, fname) |
| def | clean_pieces (self, pieces) |
Public Attributes | |
| my_dir | |
| xmldoc | |
| pieces | |
| space_re | |
| lead_spc | |
| multi | |
| ignores | |
| include_function_definition | |
| quiet | |
Static Public Attributes | |
| do_ref = space_parse | |
| do_emphasis = space_parse | |
| do_bold = space_parse | |
| do_computeroutput = space_parse | |
| do_formula = space_parse | |
Converts Doxygen generated XML files into a file containing
docstrings that can be used by SWIG-1.3.x that have support for
feature("docstring"). Once the data is parsed it is stored in
self.pieces. | def doxy2swig.Doxy2SWIG.__init__ | ( | self, | |
| src, | |||
include_function_definition = True, |
|||
quiet = False |
|||
| ) |
Initialize the instance given a source object. `src` can
be a file or filename. If you do not want to include function
definitions from doxygen then set
`include_function_definition` to `False`. This is handy since
this allows you to use the swig generated function definition
using %feature("autodoc", [0,1]).
References doxy2swig.Doxy2SWIG.ignores, doxy2swig.Doxy2SWIG.include_function_definition, doxy2swig.Doxy2SWIG.lead_spc, doxy2swig.Doxy2SWIG.multi, doxy2swig.Doxy2SWIG.my_dir, doxy2swig.Doxy2SWIG.pieces, doxy2swig.Doxy2SWIG.quiet, doxy2swig.Doxy2SWIG.space_re, and doxy2swig.Doxy2SWIG.xmldoc.
| def doxy2swig.Doxy2SWIG.add_text | ( | self, | |
| value | |||
| ) |
Adds text corresponding to `value` into `self.pieces`.
Referenced by doxy2swig.Doxy2SWIG.do_header(), doxy2swig.Doxy2SWIG.generic_parse(), and doxy2swig.Doxy2SWIG.parse().
| def doxy2swig.Doxy2SWIG.clean_pieces | ( | self, | |
| pieces | |||
| ) |
Cleans the list of strings given as `pieces`. It replaces multiple newlines by a maximum of 2 and returns a new list. It also wraps the paragraphs nicely.
Referenced by doxy2swig.Doxy2SWIG.do_header().
| def doxy2swig.Doxy2SWIG.do_header | ( | self, | |
| node | |||
| ) |
For a user defined section def a header field is present which should not be printed as such, so we comment it in the output.
References doxy2swig.Doxy2SWIG.add_text(), doxy2swig.Doxy2SWIG.clean_pieces(), doxy2swig.Doxy2SWIG.generic_parse(), doxy2swig.Doxy2SWIG.include_function_definition, doxy2swig.Doxy2SWIG.multi, doxy2swig.Doxy2SWIG.my_dir, doxy2swig.Doxy2SWIG.pieces, and doxy2swig.Doxy2SWIG.quiet.
| def doxy2swig.Doxy2SWIG.generate | ( | self | ) |
Parses the file set in the initialization. The resulting data is stored in `self.pieces`.
References doxy2swig.Doxy2SWIG.parse(), and doxy2swig.Doxy2SWIG.xmldoc.
| def doxy2swig.Doxy2SWIG.generic_parse | ( | self, | |
| node, | |||
pad = 0 |
|||
| ) |
A Generic parser for arbitrary tags in a node. Parameters: - node: A node in the DOM. - pad: `int` (default: 0) If 0 the node data is not padded with newlines. If 1 it appends a newline after parsing the childNodes. If 2 it pads before and after the nodes are processed. Defaults to 0.
References doxy2swig.Doxy2SWIG.add_text(), doxy2swig.Doxy2SWIG.generic_parse(), doxy2swig.Doxy2SWIG.get_specific_nodes(), doxy2swig.Doxy2SWIG.include_function_definition, doxy2swig.Doxy2SWIG.parse(), and doxy2swig.Doxy2SWIG.pieces.
Referenced by doxy2swig.Doxy2SWIG.do_header(), doxy2swig.Doxy2SWIG.generic_parse(), and doxy2swig.Doxy2SWIG.parse_Element().
| def doxy2swig.Doxy2SWIG.get_specific_nodes | ( | self, | |
| node, | |||
| names | |||
| ) |
Given a node and a sequence of strings in `names`, return a dictionary containing the names as keys and child `ELEMENT_NODEs`, that have a `tagName` equal to the name.
Referenced by doxy2swig.Doxy2SWIG.generic_parse().
| def doxy2swig.Doxy2SWIG.parse | ( | self, | |
| node | |||
| ) |
Parse a given node. This function in turn calls the `parse_<nodeType>` functions which handle the respective nodes.
References doxy2swig.Doxy2SWIG.add_text(), and doxy2swig.Doxy2SWIG.parse().
Referenced by doxy2swig.Doxy2SWIG.generate(), doxy2swig.Doxy2SWIG.generic_parse(), and doxy2swig.Doxy2SWIG.parse().
| def doxy2swig.Doxy2SWIG.parse_Comment | ( | self, | |
| node | |||
| ) |
Parse a `COMMENT_NODE`. This does nothing for now.
| def doxy2swig.Doxy2SWIG.parse_Element | ( | self, | |
| node | |||
| ) |
Parse an `ELEMENT_NODE`. This calls specific `do_<tagName>` handers for different elements. If no handler is available the `generic_parse` method is called. All tagNames specified in `self.ignores` are simply ignored.
References doxy2swig.Doxy2SWIG.generic_parse(), and doxy2swig.Doxy2SWIG.ignores.