Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
doxy2swig.Doxy2SWIG Class Reference

Public Member Functions

 __init__ (self, src, with_function_signature=False, with_type_info=False, with_constructor_list=False, with_attribute_list=False, with_overloaded_functions=False, textwidth=80, quiet=False)
 generate (self)
 write (self, fname)
 parse (self, node)
 parse_Document (self, node)
 parse_Text (self, node)
 parse_Comment (self, node)
 parse_Element (self, node)
 subnode_parse (self, node, pieces=None, indent=0, ignore=[], restrict=None)
 surround_parse (self, node, pre_char, post_char)
 get_specific_subnodes (self, node, name, recursive=0)
 get_specific_nodes (self, node, names)
 add_text (self, value)
 start_new_paragraph (self)
 add_line_with_subsequent_indent (self, line, indent=4)
 extract_text (self, node)
 get_function_signature (self, node)
 make_constructor_list (self, constructor_nodes, classname)
 make_attribute_list (self, node)
 get_memberdef_nodes_and_signatures (self, node, kind)
 handle_typical_memberdefs_no_overload (self, signature, memberdef_nodes)
 handle_typical_memberdefs (self, signature, memberdef_nodes)
 do_linebreak (self, node)
 do_ndash (self, node)
 do_mdash (self, node)
 do_emphasis (self, node)
 do_bold (self, node)
 do_computeroutput (self, node)
 do_heading (self, node)
 do_verbatim (self, node)
 do_blockquote (self, node)
 do_hruler (self, node)
 do_includes (self, node)
 do_para (self, node)
 do_itemizedlist (self, node)
 do_orderedlist (self, node)
 do_listitem (self, node)
 do_parameterlist (self, node)
 do_parameteritem (self, node)
 do_parameternamelist (self, node)
 do_parametername (self, node)
 do_parameterdescription (self, node)
 do_simplesect (self, node)
 do_compounddef (self, node)
 do_memberdef (self, node)
 do_sectiondef (self, node)
 do_header (self, node)
 do_member (self, node)
 do_doxygenindex (self, node)

Public Attributes

 with_function_signature = with_function_signature
 with_type_info = with_type_info
 with_constructor_list = with_constructor_list
 with_attribute_list = with_attribute_list
 with_overloaded_functions = with_overloaded_functions
 textwidth = textwidth
 quiet = quiet
int indent = 0
str listitem = ''
list pieces = []
 my_dir = os.path.dirname(f.name)
 xmldoc = minidom.parse(f).documentElement
 space_re = re.compile(r'\s+')
 lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)')
int multi = 0
list ignores

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

doxy2swig.Doxy2SWIG.__init__ ( self,
src,
with_function_signature = False,
with_type_info = False,
with_constructor_list = False,
with_attribute_list = False,
with_overloaded_functions = False,
textwidth = 80,
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]).

Member Function Documentation

◆ add_line_with_subsequent_indent()

doxy2swig.Doxy2SWIG.add_line_with_subsequent_indent ( self,
line,
indent = 4 )
Add line of text and wrap such that subsequent lines are indented
by `indent` spaces.
Here is the caller graph for this function:

◆ add_text()

doxy2swig.Doxy2SWIG.add_text ( self,
value )
Adds text corresponding to `value` into `self.pieces`.
Here is the caller graph for this function:

◆ do_blockquote()

doxy2swig.Doxy2SWIG.do_blockquote ( self,
node )
Here is the call graph for this function:

◆ do_bold()

doxy2swig.Doxy2SWIG.do_bold ( self,
node )
Here is the call graph for this function:

◆ do_compounddef()

doxy2swig.Doxy2SWIG.do_compounddef ( self,
node )
This produces %feature("docstring") entries for classes, and handles
class, namespace and file memberdef entries specially to allow for 
overloaded functions. For other cases, passes parsing on to standard
handlers (which may produce unexpected results).
Here is the call graph for this function:

◆ do_computeroutput()

doxy2swig.Doxy2SWIG.do_computeroutput ( self,
node )
Here is the call graph for this function:

◆ do_doxygenindex()

doxy2swig.Doxy2SWIG.do_doxygenindex ( self,
node )

◆ do_emphasis()

doxy2swig.Doxy2SWIG.do_emphasis ( self,
node )
Here is the call graph for this function:

◆ do_header()

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.
Here is the call graph for this function:

◆ do_heading()

doxy2swig.Doxy2SWIG.do_heading ( self,
node )
Here is the call graph for this function:

◆ do_hruler()

doxy2swig.Doxy2SWIG.do_hruler ( self,
node )
Here is the call graph for this function:

◆ do_includes()

doxy2swig.Doxy2SWIG.do_includes ( self,
node )
Here is the call graph for this function:

◆ do_itemizedlist()

doxy2swig.Doxy2SWIG.do_itemizedlist ( self,
node )
Here is the call graph for this function:

◆ do_linebreak()

doxy2swig.Doxy2SWIG.do_linebreak ( self,
node )
Here is the call graph for this function:

◆ do_listitem()

doxy2swig.Doxy2SWIG.do_listitem ( self,
node )
Here is the call graph for this function:

◆ do_mdash()

doxy2swig.Doxy2SWIG.do_mdash ( self,
node )
Here is the call graph for this function:

◆ do_member()

doxy2swig.Doxy2SWIG.do_member ( self,
node )
Here is the call graph for this function:

◆ do_memberdef()

doxy2swig.Doxy2SWIG.do_memberdef ( self,
node )
Handle cases outside of class, struct, file or namespace. These are
now dealt with by `handle_overloaded_memberfunction`.
Do these even exist???
Here is the call graph for this function:

◆ do_ndash()

doxy2swig.Doxy2SWIG.do_ndash ( self,
node )
Here is the call graph for this function:

◆ do_orderedlist()

doxy2swig.Doxy2SWIG.do_orderedlist ( self,
node )
Here is the call graph for this function:

◆ do_para()

doxy2swig.Doxy2SWIG.do_para ( self,
node )
This is the only place where text wrapping is automatically performed.
Generally, this function parses the node (locally), wraps the text, and
then adds the result to self.pieces. However, it may be convenient to
allow the previous content of self.pieces to be included in the text
wrapping. For this, use the following *convention*:
If self.pieces ends with '', treat the _previous_ entry as part of the
current paragraph. Else, insert new-line and start a new paragraph
and "wrapping context".
Paragraphs always end with '  \n', but if the parsed content ends with
the special symbol '', this is passed on.
Here is the call graph for this function:

◆ do_parameterdescription()

doxy2swig.Doxy2SWIG.do_parameterdescription ( self,
node )
Here is the call graph for this function:

◆ do_parameteritem()

doxy2swig.Doxy2SWIG.do_parameteritem ( self,
node )
Here is the call graph for this function:

◆ do_parameterlist()

doxy2swig.Doxy2SWIG.do_parameterlist ( self,
node )
Here is the call graph for this function:

◆ do_parametername()

doxy2swig.Doxy2SWIG.do_parametername ( self,
node )
Here is the call graph for this function:

◆ do_parameternamelist()

doxy2swig.Doxy2SWIG.do_parameternamelist ( self,
node )
Here is the call graph for this function:

◆ do_sectiondef()

doxy2swig.Doxy2SWIG.do_sectiondef ( self,
node )
Here is the call graph for this function:

◆ do_simplesect()

doxy2swig.Doxy2SWIG.do_simplesect ( self,
node )
Here is the call graph for this function:

◆ do_verbatim()

doxy2swig.Doxy2SWIG.do_verbatim ( self,
node )
Here is the call graph for this function:

◆ extract_text()

doxy2swig.Doxy2SWIG.extract_text ( self,
node )
Return the string representation of the node or list of nodes by parsing the
subnodes, but returning the result as a string instead of adding it to `self.pieces`.
Note that this allows extracting text even if the node is in the ignore list.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate()

doxy2swig.Doxy2SWIG.generate ( self)
Parses the file set in the initialization.  The resulting
data is stored in `self.pieces`.
Here is the call graph for this function:

◆ get_function_signature()

doxy2swig.Doxy2SWIG.get_function_signature ( self,
node )
Returns the function signature string for memberdef nodes.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_memberdef_nodes_and_signatures()

doxy2swig.Doxy2SWIG.get_memberdef_nodes_and_signatures ( self,
node,
kind )
Collects the memberdef nodes and corresponding signatures that
correspond to public function entries that are at most depth 2 deeper
than the current (compounddef) node. Returns a dictionary with 
function signatures (what swig expects after the %feature directive)
as keys, and a list of corresponding memberdef nodes as values.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_specific_nodes()

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.
Here is the caller graph for this function:

◆ get_specific_subnodes()

doxy2swig.Doxy2SWIG.get_specific_subnodes ( self,
node,
name,
recursive = 0 )
Given a node and a name, return a list of child `ELEMENT_NODEs`, that
have a `tagName` matching the `name`. Search recursively for `recursive`
levels.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_typical_memberdefs()

doxy2swig.Doxy2SWIG.handle_typical_memberdefs ( self,
signature,
memberdef_nodes )
Produces docstring entries containing an "Overloaded function"
section with the documentation for each overload, if the function is
overloaded and self.with_overloaded_functions is set. Else, produce
normal documentation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_typical_memberdefs_no_overload()

doxy2swig.Doxy2SWIG.handle_typical_memberdefs_no_overload ( self,
signature,
memberdef_nodes )
Produce standard documentation for memberdef_nodes.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_attribute_list()

doxy2swig.Doxy2SWIG.make_attribute_list ( self,
node )
Produces the "Attributes" section in class docstrings for public
member variables (attributes).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_constructor_list()

doxy2swig.Doxy2SWIG.make_constructor_list ( self,
constructor_nodes,
classname )
Produces the "Constructors" section and the constructor signatures
(since swig does not do so for classes) for class docstrings.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse()

doxy2swig.Doxy2SWIG.parse ( self,
node )
Parse a given node.  This function in turn calls the
`parse_<nodeType>` functions which handle the respective
nodes.
Here is the caller graph for this function:

◆ parse_Comment()

doxy2swig.Doxy2SWIG.parse_Comment ( self,
node )
Parse a `COMMENT_NODE`.  This does nothing for now.

◆ parse_Document()

doxy2swig.Doxy2SWIG.parse_Document ( self,
node )
Here is the call graph for this function:

◆ parse_Element()

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 `subnode_parse` method is called.  All
tagNames specified in `self.ignores` are simply ignored.

◆ parse_Text()

doxy2swig.Doxy2SWIG.parse_Text ( self,
node )
Here is the call graph for this function:

◆ start_new_paragraph()

doxy2swig.Doxy2SWIG.start_new_paragraph ( self)
Make sure to create an empty line. This is overridden, if the previous
text ends with the special marker ''. In that case, nothing is done.
Here is the caller graph for this function:

◆ subnode_parse()

doxy2swig.Doxy2SWIG.subnode_parse ( self,
node,
pieces = None,
indent = 0,
ignore = [],
restrict = None )
Parse the subnodes of a given node. Subnodes with tags in the
`ignore` list are ignored. If pieces is given, use this as target for
the parse results instead of self.pieces. Indent all lines by the amount
given in `indent`. Note that the initial content in `pieces` is not
indented. The final result is in any case added to self.pieces.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ surround_parse()

doxy2swig.Doxy2SWIG.surround_parse ( self,
node,
pre_char,
post_char )
Parse the subnodes of a given node. Subnodes with tags in the
`ignore` list are ignored. Prepend `pre_char` and append `post_char` to
the output in self.pieces.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

doxy2swig.Doxy2SWIG.write ( self,
fname )
Here is the call graph for this function:

Member Data Documentation

◆ ignores

list doxy2swig.Doxy2SWIG.ignores
Initial value:
= ['inheritancegraph', 'param', 'listofallmembers',
'innerclass', 'name', 'declname', 'incdepgraph',
'invincdepgraph', 'programlisting', 'type',
'references', 'referencedby', 'location',
'collaborationgraph', 'reimplements',
'reimplementedby', 'derivedcompoundref',
'basecompoundref',
'argsstring', 'definition', 'exceptions']

◆ indent

int doxy2swig.Doxy2SWIG.indent = 0

◆ lead_spc

doxy2swig.Doxy2SWIG.lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)')

◆ listitem

str doxy2swig.Doxy2SWIG.listitem = ''

◆ multi

int doxy2swig.Doxy2SWIG.multi = 0

◆ my_dir

doxy2swig.Doxy2SWIG.my_dir = os.path.dirname(f.name)

◆ pieces

doxy2swig.Doxy2SWIG.pieces = []

◆ quiet

doxy2swig.Doxy2SWIG.quiet = quiet

◆ space_re

doxy2swig.Doxy2SWIG.space_re = re.compile(r'\s+')

◆ textwidth

doxy2swig.Doxy2SWIG.textwidth = textwidth

◆ with_attribute_list

doxy2swig.Doxy2SWIG.with_attribute_list = with_attribute_list

◆ with_constructor_list

doxy2swig.Doxy2SWIG.with_constructor_list = with_constructor_list

◆ with_function_signature

doxy2swig.Doxy2SWIG.with_function_signature = with_function_signature

◆ with_overloaded_functions

doxy2swig.Doxy2SWIG.with_overloaded_functions = with_overloaded_functions

◆ with_type_info

doxy2swig.Doxy2SWIG.with_type_info = with_type_info

◆ xmldoc

doxy2swig.Doxy2SWIG.xmldoc = minidom.parse(f).documentElement

The documentation for this class was generated from the following file:
  • /data2/LM_zls_github/Lattice-Microbes/src/doc/doxy2swig.py