pax_global_header00006660000000000000000000000064125676524700014530gustar00rootroot0000000000000052 comment=a80e74c105be721a2777311dd58a0264f40339f9 breathe-4.1.0/000077500000000000000000000000001256765247000131445ustar00rootroot00000000000000breathe-4.1.0/.gitignore000066400000000000000000000015731256765247000151420ustar00rootroot00000000000000*.pyc /.project /.pydevproject build/ /dist /breathe /breathe.egg-info # Folder for placing stuff to be ignored /ignored # My virtual env folder /python-2.7.4 # Test folder for building simple examples of the documentation /simple # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm ## Directory-based project format .idea/ # if you remove the above rule, at least ignore user-specific stuff: # .idea/workspace.xml # .idea/tasks.xml # and these sensitive or high-churn files: # .idea/dataSources.ids # .idea/dataSources.xml # .idea/sqlDataSources.xml # .idea/dynamic.xml ## File-based project format *.ipr *.iws *.iml ## Additional for IntelliJ out/ # generated by mpeltonen/sbt-idea plugin .idea_modules/ # generated by JIRA plugin atlassian-ide-plugin.xml # generated by Crashlytics plugin (for Android Studio and Intellij) com_crashlytics_export_strings.xml breathe-4.1.0/.travis.yml000066400000000000000000000011501256765247000152520ustar00rootroot00000000000000 language: python env: - SPHINX_VERSION=1.2.3 TRAVIS_CI=True - SPHINX_VERSION=1.3.1 TRAVIS_CI=True python: - "2.6" - "2.7" - "3.3" - "3.4" before_install: - sudo apt-get update -qq - sudo apt-get install -y doxygen texlive-latex-base texlive-latex-extra texlive-fonts-recommended install: - pip install flake8 - pip install nose - pip install Sphinx==$SPHINX_VERSION - pip install . # Builds all examples & html documentation # # Provide definition for DOXYGEN variable to stop it trying # to run `which doxygen` script: - make DOXYGEN=doxygen DEBUG="" - make tests - make flake8 breathe-4.1.0/CONTRIBUTING.rst000066400000000000000000000022701256765247000156060ustar00rootroot00000000000000 Contributing ============ Firstly, thank you for making it this far. We really appreciate anyone who even thinks about reporting an issue or helping out with the code or docs. It is kind of you to take the time. Please Provide an Example ------------------------- If you're having trouble with how the contents of a particular Doxygen comment or a particular set of code is being processed then please provide an example of the in question. Ideally as a pull-request with additions to the `examples/specific` folder but feel free to provide the comment content in your issue instead. It really helps to accelerate development if we have examples to work from. Feel Free to Keep Reminding Me ------------------------------ Honesty time! I am sorry that this is the case but I tend to get distracted and not give Breathe the attention it deserves. Please do keep reminding me about your issue if you would like it fixed. I'll try to be explicit if I really don't have the time to fix it in the immediate future, but if I've made some vague promise to look at it and you've heard nothing for 3 days then feel free to prod me again. It will get fixed faster if you do and I promise not to get upset :) breathe-4.1.0/LICENSE000066400000000000000000000030021256765247000141440ustar00rootroot00000000000000// BSD license, modified to remove the organisation as there isn't one. Copyright (c) 2009, Michael Jones All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. breathe-4.1.0/Makefile000066400000000000000000000011501256765247000146010ustar00rootroot00000000000000 all: html pdf html: data $(MAKE) -C documentation html pdf: data $(MAKE) -C documentation latexpdf data: $(MAKE) -C examples/doxygen all $(MAKE) -C examples/tinyxml all $(MAKE) -C examples/specific all distclean: clean $(MAKE) -C documentation clean clean: $(MAKE) -C examples/doxygen $@ $(MAKE) -C examples/tinyxml $@ $(MAKE) -C examples/specific $@ test: cd tests && nosetests dev-test: cd tests && PYTHONPATH=../:$(PTYONPATH) nosetests flake8: flake8 breathe/*.py \ breathe/renderer/rst/doxygen/compound.py \ breathe/renderer/rst/doxygen/filter.py \ breathe/parser/doxygen/compound.py breathe-4.1.0/README.rst000066400000000000000000000214331256765247000146360ustar00rootroot00000000000000 Breathe ======= .. image:: https://travis-ci.org/michaeljones/breathe.svg?branch=master :target: https://travis-ci.org/michaeljones/breathe This is an extension to reStructuredText and Sphinx to be able to read and render the Doxygen xml output. Download -------- Breathe is available from github and `PyPI, the Python Package Index `_ Documentation ------------- The documentation is available `here `__. Thank you to the people running `Read the Docs `_ for such an excellent service. The source for the documentation is in the ``documentation`` folder if you want to built it and read it locally. Development ----------- Breathe does not always get the attention it deserves but I am keen to keep it moving forward. If you report an issue, please keep reminding me about it until it is fixed. I should be better at this but in silence I tend to move to other things so keep reminding me. Testing ------- Breathe doesn't have a set of tests at the moment. The documentation does a good job of running the different parts of the Breathe functionality but there is nothing to check that the output is appropriate. To build the documentation, run ``make`` in the root of the project. This will run doxygen over the example code and then run the Breathe documentation. View the results at:: documentation/build/html/index.html Requirements ------------ Development is currently done with: - Python 2.7.4 - Docutils 0.11 - Sphinx 1.2.2 - Doxygen 1.8.4 Doxygen 1.5.1 seems to produce xml with repeated sections which causes Breathe some confusion. Not sure when this was resolved but it might be best to go for the latest possible. Mailing List ------------ There is a mailing list available on Google groups: https://groups.google.com/forum/#!forum/sphinx-breathe The previous mailing list was on `librelist.com `__ and the archives are available `here `__. Examples -------- Examples of Breathe used by other projects: - `cppformat `_ [`pdf `_] If you have an example you would like listed here, please make a github issue with the details. Alternatives ------------ Breathe is not the only solution to this problem. These are the alternatives that we know about. We are very happy to list others if you'd like to provide a link in a github issue or get in touch on the mailing list. - `Gasp `_ - `Robin `_ Credits ------- Breathe is maintained by `michaeljones `_ & `vitaut `_ with contributions from: - `nijel `_ - `sebastianschaetz `_ - `mbolivar `_ - `queezythegreat `_ - `abingham `_ - `davidm `_ - `hobu `_ - `magro11 `_ - `scopatz `_ - `vonj `_ - `jmnas `_ - `donkopotamus `_ - `jo3w4rd `_ - `Anthony Truchet `_ - `Daniel Matz `_ - `Andrew Hundt `_ - `sebastinas `_ - `robo9k `_ - `sieben `_ - `rweickelt `_ - `sam-roth `_ - `bnewbold `_ - `serge-sans-paille `_ Thanks to: - Dimitri van Heesch for `Doxygen `_. - Georg Brandl for `Sphinx `_. - David Goodger for `Docutils `_ and reStructuredText. Change Log ---------- Inspired by `Keepachangelog.com `__. - 2015-08-27 - Breathe v4.1.0 - Added - ``breathe_doxygen_config_options`` config variable which allows for adding more config lines to the doxygen file used for the auto-directives. - Fixed - Display of array & array reference parameters for functions. - Handling of links to classes with template arguments. - Handling of unnamed enums in C. - Naming of template parameter section. - Finding functions that are within groups. - Rendering of 'typename' and 'class' keywords for templates. - 2015-04-02 - Breathe v4.0.0 - Significant work on the code base with miminal reStructureText interface changes. To be documented. - 2014-11-09 - Breathe v3.2.0 - Nothing Added, Deprecated or Removed - Fixed - Changed docutils/Sphinx node usage to fix latex/pdf output. - When checking for path separators check for both ``/`` and ``\`` regardless of the platform. - ``KeyError`` when using ``auto`` directives without specifying the ``:project:`` option even though the default project config setting was set. - Use of ``doxygenfunction`` no longer inappropriately triggers the duplicate target check and fails to output link targets. - Support for inline urls in the doxygen comments. - Support for array notation in function parameters. - Reduced intention by changing ``section-defs`` to use ``container`` & ``rubric`` nodes rather than ``desc`` nodes with signatures & content. Now headings like 'Public Functions' appear inline with their subject matter. - 2014-09-07 - Breathe v3.1.0 - Nothing Deprecated or Removed - Added - The ``doxygenclass`` directive can now reference template specialisations by specifying the specialisation in the argument name. - Fixed - Displaying function parameters for Qt slots output. Previously they were missing even though Qt Slots are essentially just functions. - Displaying headings from doxygen comments as emphasized text. - Crash when generating warning about being unable to find a define, variable, enum, typedef or union. - Only output the definition name for a function parameter if the declartion name is not available. Previously, where they were both available we were getting two names next to each other for no good reason. - 2014-08-04 - Breathe v3.0.0 - Improve output of const, volatile, virtual and pure-virtual keywords. - Fix css class output for HTML so that object types rather than names are output as the css classes. eg. 'function' instead of 'myFunction'. - Fix issue with Breathe getting confused over functions appearing in header and implementation files. - Improve matching for overloaded functions when using ``doxygenfunction`` directive. Also, provide a list of potential matches when no match is found. - Improved ``:members:`` implementation to handle inner classes properly. - Updated ``doxygenstruct`` to share the ``doxygenclass`` implementation path which grants it the options from ``doxygenclass`` directive. - Added ``:outline:`` option support to ``doxygengroup`` & ``doxygennamespace`` directives. - Added ``doxygennamespace`` directive. - Added ``:undoc-members:`` option to ``doxygenclass`` & ``doxygengroup`` directives. - **Breaking change**: Removed ``:sections:`` option for ``doxygenclass`` & ``doxygengroup`` directives and replaced it with ``:members:``, ``:protected-members:`` and ``:private-members:``, and changed ``breathe_default_sections`` config variable to ``breathe_default_members``. This is designed to more closely match the Sphinx autodoc functionality and interface. - 2014-06-15 - Breathe v2.0.0 - Add compare script for checking changes to documentation caused by changes in the implementation. - Switched to ``https`` reference for MathJax Javascript. - **Breaking change**: Change ``autodoxygen*`` directives to require explicitly declared source files in the ``conf.py`` rather than attempting to detect them from the directive arguments. - Switch documentation hosting to ReadTheDocs.org. - **Breaking change**: Switch to assuming all relative paths are relative to the directory holding the ``conf.py`` file. Previously, it would assume they were relative to the user's current working directory. This breaks projects which use separate build & source directories. - Add ``doxygenunion`` directive. - Add ``doxygengroup`` directive. - Add support for lists in the output. They were previously ignored. - Updated implementation to use the docutils nodes that Sphinx does where possible. - Breathe v1.2.0 - Change log not recorded. breathe-4.1.0/breathe/000077500000000000000000000000001256765247000145565ustar00rootroot00000000000000breathe-4.1.0/breathe/__init__.py000066400000000000000000000006341256765247000166720ustar00rootroot00000000000000 __version__ = '4.1.0' def setup(app): # We can't do the import at the module scope as setup.py has to be able to # import this file to read __version__ without hitting any syntax errors # from both Python 2 & Python 3. # By the time this function is called, the directives code will have been # converted with 2to3 if appropriate from . import directives directives.setup(app) breathe-4.1.0/breathe/directive/000077500000000000000000000000001256765247000165345ustar00rootroot00000000000000breathe-4.1.0/breathe/directive/__init__.py000066400000000000000000000000001256765247000206330ustar00rootroot00000000000000breathe-4.1.0/breathe/directive/base.py000066400000000000000000000060421256765247000200220ustar00rootroot00000000000000 from ..renderer.rst.doxygen.base import RenderContext from ..renderer.rst.doxygen import format_parser_error from ..parser import ParserError, FileIOError from docutils import nodes from docutils.parsers import rst class WarningHandler(object): def __init__(self, state, context): self.state = state self.context = context def warn(self, raw_text, rendered_nodes=None): raw_text = self.format(raw_text) if rendered_nodes is None: rendered_nodes = [nodes.paragraph("", "", nodes.Text(raw_text))] return [ nodes.warning("", *rendered_nodes), self.state.document.reporter.warning(raw_text, line=self.context['lineno']) ] def format(self, text): return text.format(**self.context) def create_warning(project_info, state, lineno, **kwargs): tail = '' if project_info: tail = 'in doxygen xml output for project "{project}" from directory: {path}'.format( project=project_info.name(), path=project_info.project_path() ) context = dict( lineno=lineno, tail=tail, **kwargs ) return WarningHandler(state, context) class BaseDirective(rst.Directive): def __init__(self, root_data_object, renderer_factory_creator_constructor, finder_factory, project_info_factory, filter_factory, target_handler_factory, parser_factory, *args): rst.Directive.__init__(self, *args) self.directive_args = list(args) # Convert tuple to list to allow modification. self.root_data_object = root_data_object self.renderer_factory_creator_constructor = renderer_factory_creator_constructor self.finder_factory = finder_factory self.project_info_factory = project_info_factory self.filter_factory = filter_factory self.target_handler_factory = target_handler_factory self.parser_factory = parser_factory def render(self, node_stack, project_info, options, filter_, target_handler, mask_factory): "Standard render process used by subclasses" renderer_factory_creator = self.renderer_factory_creator_constructor.create_factory_creator( project_info, self.state.document, options, target_handler ) try: renderer_factory = renderer_factory_creator.create_factory( node_stack, self.state, self.state.document, filter_, target_handler, ) except ParserError as e: return format_parser_error("doxygenclass", e.error, e.filename, self.state, self.lineno, True) except FileIOError as e: return format_parser_error("doxygenclass", e.error, e.filename, self.state, self.lineno) context = RenderContext(node_stack, mask_factory, self.directive_args) object_renderer = renderer_factory.create_renderer(context) return object_renderer.render() breathe-4.1.0/breathe/directive/file.py000066400000000000000000000100761256765247000200310ustar00rootroot00000000000000 from ..renderer.rst.doxygen.base import RenderContext from ..renderer.rst.doxygen.mask import NullMaskFactory from ..directive.base import BaseDirective from ..project import ProjectError from .base import create_warning from docutils.parsers.rst.directives import unchanged_required, flag from docutils.parsers import rst class BaseFileDirective(BaseDirective): """Base class handle the main work when given the appropriate file and project info to work from. """ # We use inheritance here rather than a separate object and composition, because so much # information is present in the Directive class from the docutils framework that we'd have to # pass way too much stuff to a helper object to be reasonable. def handle_contents(self, file_, project_info): finder = self.finder_factory.create_finder(project_info) finder_filter = self.filter_factory.create_file_finder_filter(file_) matches = [] finder.filter_(finder_filter, matches) if len(matches) > 1: warning = create_warning(None, self.state, self.lineno, file=file_, directivename=self.directive_name) return warning.warn('{directivename}: Found multiple matches for file "{file} {tail}') elif not matches: warning = create_warning(None, self.state, self.lineno, file=file_, directivename=self.directive_name) return warning.warn('{directivename}: Cannot find file "{file} {tail}') target_handler = self.target_handler_factory.create_target_handler( self.options, project_info, self.state.document) filter_ = self.filter_factory.create_file_filter(file_, self.options) renderer_factory_creator = self.renderer_factory_creator_constructor.create_factory_creator( project_info, self.state.document, self.options, target_handler ) node_list = [] for node_stack in matches: renderer_factory = renderer_factory_creator.create_factory( node_stack, self.state, self.state.document, filter_, target_handler, ) mask_factory = NullMaskFactory() context = RenderContext(node_stack, mask_factory, self.directive_args) object_renderer = renderer_factory.create_renderer(context) node_list.extend(object_renderer.render()) return node_list class DoxygenFileDirective(BaseFileDirective): directive_name = 'doxygenfile' required_arguments = 0 optional_arguments = 2 option_spec = { "path": unchanged_required, "project": unchanged_required, "outline": flag, "no-link": flag, } has_content = False def run(self): """Get the file from the argument and the project info from the factory.""" file_ = self.arguments[0] try: project_info = self.project_info_factory.create_project_info(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno) return warning.warn('doxygenfile: %s' % e) return self.handle_contents(file_, project_info) class AutoDoxygenFileDirective(BaseFileDirective): directive_name = 'autodoxygenfile' required_arguments = 1 option_spec = { "project": unchanged_required, "outline": flag, "no-link": flag, } has_content = False def run(self): """Get the file from the argument and extract the associated project info for the named project given that it is an auto-project. """ file_ = self.arguments[0] try: project_info = self.project_info_factory.retrieve_project_info_for_auto(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno) return warning.warn('autodoxygenfile: %s' % e) return self.handle_contents(file_, project_info) breathe-4.1.0/breathe/directive/index.py000066400000000000000000000076111256765247000202220ustar00rootroot00000000000000 from ..renderer.rst.doxygen.base import RenderContext from ..renderer.rst.doxygen.mask import NullMaskFactory from ..renderer.rst.doxygen import format_parser_error from ..directive.base import BaseDirective from ..project import ProjectError from ..parser import ParserError, FileIOError from .base import create_warning from docutils.parsers import rst from docutils.parsers.rst.directives import unchanged_required, flag class BaseIndexDirective(BaseDirective): """Base class handle the main work when given the appropriate project info to work from. """ # We use inheritance here rather than a separate object and composition, because so much # information is present in the Directive class from the docutils framework that we'd have to # pass way too much stuff to a helper object to be reasonable. def handle_contents(self, project_info): try: finder = self.finder_factory.create_finder(project_info) except ParserError as e: return format_parser_error(self.name, e.error, e.filename, self.state, self.lineno, True) except FileIOError as e: return format_parser_error(self.name, e.error, e.filename, self.state, self.lineno) data_object = finder.root() target_handler = self.target_handler_factory.create_target_handler( self.options, project_info, self.state.document) filter_ = self.filter_factory.create_index_filter(self.options) renderer_factory_creator = self.renderer_factory_creator_constructor.create_factory_creator( project_info, self.state.document, self.options, target_handler ) renderer_factory = renderer_factory_creator.create_factory( [data_object], self.state, self.state.document, filter_, target_handler, ) mask_factory = NullMaskFactory() context = RenderContext([data_object, self.root_data_object], mask_factory, self.directive_args) object_renderer = renderer_factory.create_renderer(context) try: node_list = object_renderer.render() except ParserError as e: return format_parser_error(self.name, e.error, e.filename, self.state, self.lineno, True) except FileIOError as e: return format_parser_error(self.name, e.error, e.filename, self.state, self.lineno) return node_list class DoxygenIndexDirective(BaseIndexDirective): required_arguments = 0 optional_arguments = 2 option_spec = { "path": unchanged_required, "project": unchanged_required, "outline": flag, "no-link": flag, } has_content = False def run(self): """Extract the project info and pass it to the helper method""" try: project_info = self.project_info_factory.create_project_info(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno) return warning.warn('doxygenindex: %s' % e) return self.handle_contents(project_info) class AutoDoxygenIndexDirective(BaseIndexDirective): required_arguments = 0 final_argument_whitespace = True option_spec = { "project": unchanged_required, "outline": flag, "no-link": flag, } has_content = False def run(self): """Extract the project info from the auto project info store and pass it to the helper method """ try: project_info = self.project_info_factory.retrieve_project_info_for_auto(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno) return warning.warn('autodoxygenindex: %s' % e) return self.handle_contents(project_info) breathe-4.1.0/breathe/directives.py000066400000000000000000001011341256765247000172710ustar00rootroot00000000000000 from .finder.core import FinderFactory from .parser import DoxygenParserFactory, CacheFactory from .renderer.rst.doxygen import DoxygenToRstRendererFactoryCreatorConstructor, \ RstContentCreator, RenderContext from .renderer.rst.doxygen.filter import FilterFactory, GlobFactory from .renderer.rst.doxygen.target import TargetHandlerFactory from .renderer.rst.doxygen.mask import MaskFactory, NullMaskFactory, NoParameterNamesMask from .finder.doxygen.core import DoxygenItemFinderFactoryCreator from .directive.base import BaseDirective, create_warning from .directive.index import DoxygenIndexDirective, AutoDoxygenIndexDirective from .directive.file import DoxygenFileDirective, AutoDoxygenFileDirective from .process import AutoDoxygenProcessHandle from .exception import BreatheError from .project import ProjectInfoFactory, ProjectError from docutils.parsers.rst.directives import unchanged_required, unchanged, flag from docutils.statemachine import ViewList from sphinx.domains import cpp, c, python from sphinx.writers.text import TextWriter from sphinx.builders.text import TextBuilder import docutils.nodes import sphinx.addnodes import sphinx.ext.mathbase import os import fnmatch import re import textwrap import collections import subprocess # Somewhat outrageously, reach in and fix a Sphinx regex cpp._identifier_re = re.compile(r'(~?\b[a-zA-Z_][a-zA-Z0-9_]*)\b') class NoMatchingFunctionError(BreatheError): pass class UnableToResolveFunctionError(BreatheError): def __init__(self, signatures): self.signatures = signatures class NodeNotFoundError(BreatheError): pass class FakeDestination(object): def write(self, output): return output class TextRenderer(object): def __init__(self, app): self.app = app def render(self, nodes, document): new_document = document.copy() new_document.children = nodes writer = TextWriter(TextBuilder(self.app)) output = writer.write(new_document, FakeDestination()) return output.strip() # Directives # ---------- class DoxygenFunctionDirective(BaseDirective): required_arguments = 1 option_spec = { "path": unchanged_required, "project": unchanged_required, "outline": flag, "no-link": flag, } has_content = False final_argument_whitespace = True def __init__(self, node_factory, text_renderer, *args, **kwargs): BaseDirective.__init__(self, *args, **kwargs) self.node_factory = node_factory self.text_renderer = text_renderer def run(self): # Separate possible arguments (delimited by a "(") from the namespace::name match = re.match(r"([^(]*)(.*)", self.arguments[0]) namespaced_function, args = match.group(1), match.group(2) # Split the namespace and the function name try: (namespace, function_name) = namespaced_function.rsplit("::", 1) except ValueError: (namespace, function_name) = "", namespaced_function try: project_info = self.project_info_factory.create_project_info(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno) return warning.warn('doxygenfunction: %s' % e) try: finder = self.finder_factory.create_finder(project_info) except MTimerError as e: warning = create_warning(None, self.state, self.lineno) return warning.warn('doxygenfunction: %s' % e) # Extract arguments from the function name. args = self.parse_args(args) finder_filter = self.filter_factory.create_function_finder_filter(namespace, function_name) matches = [] finder.filter_(finder_filter, matches) # Create it ahead of time as it is cheap and it is ugly to declare it for both exception # clauses below warning = create_warning( project_info, self.state, self.lineno, namespace='%s::' % namespace if namespace else '', function=function_name, args=', '.join(args) ) try: node_stack = self.resolve_function(matches, args, project_info) except NoMatchingFunctionError: return warning.warn('doxygenfunction: Cannot find function "{namespace}{function}" ' '{tail}') except UnableToResolveFunctionError as error: message = 'doxygenfunction: Unable to resolve multiple matches for function ' \ '"{namespace}{function}" with arguments ({args}) {tail}.\n' \ 'Potential matches:\n' # We want to create a raw_text string for the console output and a set of docutils nodes # for rendering into the final output. We handle the final output as a literal string # with a txt based list of the options. raw_text = message literal_text = '' # TODO: We're cheating here with the set() as signatures has repeating entries for some # reason (failures in the matcher_stack code) so we consolidate them by shoving them in # a set to remove duplicates. Should be fixed! for i, entry in enumerate(set(error.signatures)): if i: literal_text += '\n' # Replace new lines with a new line & enough spacing to reach the appropriate # alignment for our simple plain text list literal_text += '- %s' % entry.replace('\n', '\n ') raw_text += ' - %s\n' % entry.replace('\n', '\n ') block = self.node_factory.literal_block('', '', self.node_factory.Text(literal_text)) formatted_message = warning.format(message) warning_nodes = [ self.node_factory.paragraph( "", "", self.node_factory.Text(formatted_message) ), block ] result = warning.warn(raw_text, warning_nodes) return result target_handler = self.target_handler_factory.create_target_handler( self.options, project_info, self.state.document ) filter_ = self.filter_factory.create_outline_filter(self.options) return self.render(node_stack, project_info, self.options, filter_, target_handler, NullMaskFactory()) def parse_args(self, function_description): # Strip off trailing qualifiers pattern = re.compile(r'''(?<= \)) \s* (?: const)? \s* (?: volatile)? \s* (?: = \s* 0)? \s* $ ''', re.VERBOSE) function_description = re.sub(pattern, '', function_description) paren_index = function_description.find('(') if paren_index == -1: return [] # If it is empty parenthesis, then return empty list as we want empty parenthesis coming # from the xml file to match the user's function when the user doesn't provide parenthesis # ie. when there are no args anyway elif function_description == '()': return [] else: # Parse the function name string, eg. f(int, float) to # extract the types so we can use them for matching args = [] num_open_brackets = -1 start = paren_index + 1 for i in range(paren_index, len(function_description)): c = function_description[i] if c == '(' or c == '<': num_open_brackets += 1 elif c == ')' or c == '>': num_open_brackets -= 1 elif c == ',' and num_open_brackets == 0: args.append(function_description[start:i].strip()) start = i + 1 args.append(function_description[start:-1].strip()) return args def resolve_function(self, matches, args, project_info): if not matches: raise NoMatchingFunctionError() if len(matches) == 1: return matches[0] node_stack = None signatures = [] # Iterate over the potential matches for entry in matches: text_options = {'no-link': u'', 'outline': u''} # Render the matches to docutils nodes target_handler = self.target_handler_factory.create_target_handler( {'no-link': u''}, project_info, self.state.document ) filter_ = self.filter_factory.create_outline_filter(text_options) mask_factory = MaskFactory({'param': NoParameterNamesMask}) nodes = self.render(entry, project_info, text_options, filter_, target_handler, mask_factory) # Render the nodes to text signature = self.text_renderer.render(nodes, self.state.document) signatures.append(signature) match = re.match(r"([^(]*)(.*)", signature) match_args = match.group(2) # Parse the text to find the arguments match_args = self.parse_args(match_args) # Match them against the arg spec if args == match_args: node_stack = entry break if not node_stack: raise UnableToResolveFunctionError(signatures) return node_stack class DoxygenClassLikeDirective(BaseDirective): required_arguments = 1 optional_arguments = 0 final_argument_whitespace = True option_spec = { "path": unchanged_required, "project": unchanged_required, "members": unchanged, "protected-members": flag, "private-members": flag, "undoc-members": flag, "show": unchanged_required, "outline": flag, "no-link": flag, } has_content = False def run(self): name = self.arguments[0] try: project_info = self.project_info_factory.create_project_info(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno, kind=self.kind) return warning.warn('doxygen{kind}: %s' % e) try: finder = self.finder_factory.create_finder(project_info) except MTimerError as e: warning = create_warning(None, self.state, self.lineno, kind=self.kind) return warning.warn('doxygen{kind}: %s' % e) finder_filter = self.filter_factory.create_compound_finder_filter(name, self.kind) matches = [] finder.filter_(finder_filter, matches) if len(matches) == 0: warning = create_warning(project_info, self.state, self.lineno, name=name, kind=self.kind) return warning.warn('doxygen{kind}: Cannot find class "{name}" {tail}') target_handler = self.target_handler_factory.create_target_handler( self.options, project_info, self.state.document ) filter_ = self.filter_factory.create_class_filter(name, self.options) mask_factory = NullMaskFactory() return self.render(matches[0], project_info, self.options, filter_, target_handler, mask_factory) class DoxygenClassDirective(DoxygenClassLikeDirective): kind = "class" class DoxygenStructDirective(DoxygenClassLikeDirective): kind = "struct" class DoxygenContentBlockDirective(BaseDirective): """Base class for namespace and group directives which have very similar behaviours""" required_arguments = 1 optional_arguments = 1 option_spec = { "path": unchanged_required, "project": unchanged_required, "content-only": flag, "outline": flag, "members": flag, "protected-members": flag, "private-members": flag, "undoc-members": flag, "no-link": flag } has_content = False def run(self): name = self.arguments[0] try: project_info = self.project_info_factory.create_project_info(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno, kind=self.kind) return warning.warn('doxygen{kind}: %s' % e) try: finder = self.finder_factory.create_finder(project_info) except MTimerError as e: warning = create_warning(None, self.state, self.lineno, kind=self.kind) return warning.warn('doxygen{kind}: %s' % e) finder_filter = self.filter_factory.create_finder_filter(self.kind, name) matches = [] finder.filter_(finder_filter, matches) # It shouldn't be possible to have too many matches as namespaces & groups in their nature # are merged together if there are multiple declarations, so we only check for no matches if not matches: warning = create_warning(project_info, self.state, self.lineno, name=name, kind=self.kind) return warning.warn('doxygen{kind}: Cannot find namespace "{name}" {tail}') if 'content-only' in self.options: # Unpack the single entry in the matches list (node_stack,) = matches filter_ = self.filter_factory.create_content_filter(self.kind, self.options) # Having found the compound node for the namespace or group in the index we want to grab # the contents of it which match the filter contents_finder = self.finder_factory.create_finder_from_root(node_stack[0], project_info) contents = [] contents_finder.filter_(filter_, contents) # Replaces matches with our new starting points matches = contents target_handler = self.target_handler_factory.create_target_handler( self.options, project_info, self.state.document ) filter_ = self.filter_factory.create_render_filter(self.kind, self.options) renderer_factory_creator = self.renderer_factory_creator_constructor.create_factory_creator( project_info, self.state.document, self.options, target_handler ) node_list = [] for node_stack in matches: renderer_factory = renderer_factory_creator.create_factory( node_stack, self.state, self.state.document, filter_, target_handler, ) mask_factory = NullMaskFactory() context = RenderContext(node_stack, mask_factory, self.directive_args) object_renderer = renderer_factory.create_renderer(context) node_list.extend(object_renderer.render()) return node_list class DoxygenNamespaceDirective(DoxygenContentBlockDirective): kind = "namespace" class DoxygenGroupDirective(DoxygenContentBlockDirective): kind = "group" # This class was the same as the DoxygenBaseDirective above, except that it # wraps the output in a definition_list before passing it back. This should be # abstracted in a far nicer way to avoid repeating so much code # # Now we've removed the definition_list wrap so we really need to refactor this! class DoxygenBaseItemDirective(BaseDirective): required_arguments = 1 optional_arguments = 1 option_spec = { "path": unchanged_required, "project": unchanged_required, "outline": flag, "no-link": flag, } has_content = False def create_finder_filter(self, namespace, name): """Creates a filter to find the node corresponding to this item.""" return self.filter_factory.create_member_finder_filter( namespace, name, self.kind) def run(self): try: namespace, name = self.arguments[0].rsplit("::", 1) except ValueError: namespace, name = "", self.arguments[0] try: project_info = self.project_info_factory.create_project_info(self.options) except ProjectError as e: warning = create_warning(None, self.state, self.lineno, kind=self.kind) return warning.warn('doxygen{kind}: %s' % e) try: finder = self.finder_factory.create_finder(project_info) except MTimerError as e: warning = create_warning(None, self.state, self.lineno, kind=self.kind) return warning.warn('doxygen{kind}: %s' % e) finder_filter = self.create_finder_filter(namespace, name) matches = [] finder.filter_(finder_filter, matches) if len(matches) == 0: display_name = "%s::%s" % (namespace, name) if namespace else name warning = create_warning(project_info, self.state, self.lineno, kind=self.kind, display_name=display_name) return warning.warn('doxygen{kind}: Cannot find {kind} "{display_name}" {tail}') target_handler = self.target_handler_factory.create_target_handler( self.options, project_info, self.state.document ) filter_ = self.filter_factory.create_outline_filter(self.options) node_stack = matches[0] mask_factory = NullMaskFactory() return self.render(node_stack, project_info, self.options, filter_, target_handler, mask_factory) class DoxygenVariableDirective(DoxygenBaseItemDirective): kind = "variable" def render(self, node_stack, project_info, options, filter_, target_handler, mask_factory): # Remove 'extern' keyword as Sphinx doesn't support it. definition = node_stack[0].definition extern = 'extern ' if definition.startswith(extern): definition = definition[len(extern):] self.directive_args[1] = [definition] return DoxygenBaseItemDirective.render(self, node_stack, project_info, options, filter_, target_handler, mask_factory) class DoxygenDefineDirective(DoxygenBaseItemDirective): kind = "define" class DoxygenEnumDirective(DoxygenBaseItemDirective): kind = "enum" class DoxygenEnumValueDirective(DoxygenBaseItemDirective): kind = "enumvalue" def create_finder_filter(self, namespace, name): return self.filter_factory.create_enumvalue_finder_filter(name) class DoxygenTypedefDirective(DoxygenBaseItemDirective): kind = "typedef" class DoxygenUnionDirective(DoxygenBaseItemDirective): kind = "union" def create_finder_filter(self, namespace, name): # Unions are stored in the xml file with their fully namespaced name # We're using C++ namespaces here, it might be best to make this file # type dependent # xml_name = "%s::%s" % (namespace, name) if namespace else name return self.filter_factory.create_compound_finder_filter(xml_name, 'union') # Setup Administration # -------------------- class DirectiveContainer(object): def __init__(self, directive, *args): self.directive = directive self.args = args # Required for sphinx to inspect self.required_arguments = directive.required_arguments self.optional_arguments = directive.optional_arguments self.option_spec = directive.option_spec self.has_content = directive.has_content self.final_argument_whitespace = directive.final_argument_whitespace def __call__(self, *args): call_args = [] call_args.extend(self.args) call_args.extend(args) return self.directive(*call_args) class DoxygenDirectiveFactory(object): directives = { "doxygenindex": DoxygenIndexDirective, "autodoxygenindex": AutoDoxygenIndexDirective, "doxygenfunction": DoxygenFunctionDirective, "doxygenstruct": DoxygenStructDirective, "doxygenclass": DoxygenClassDirective, "doxygenvariable": DoxygenVariableDirective, "doxygendefine": DoxygenDefineDirective, "doxygenenum": DoxygenEnumDirective, "doxygenenumvalue": DoxygenEnumValueDirective, "doxygentypedef": DoxygenTypedefDirective, "doxygenunion": DoxygenUnionDirective, "doxygennamespace": DoxygenNamespaceDirective, "doxygengroup": DoxygenGroupDirective, "doxygenfile": DoxygenFileDirective, "autodoxygenfile": AutoDoxygenFileDirective, } def __init__(self, node_factory, text_renderer, root_data_object, renderer_factory_creator_constructor, finder_factory, project_info_factory, filter_factory, target_handler_factory, parser_factory): self.node_factory = node_factory self.text_renderer = text_renderer self.root_data_object = root_data_object self.renderer_factory_creator_constructor = renderer_factory_creator_constructor self.finder_factory = finder_factory self.project_info_factory = project_info_factory self.filter_factory = filter_factory self.target_handler_factory = target_handler_factory self.parser_factory = parser_factory def create_function_directive_container(self): # Pass text_renderer to the function directive return DirectiveContainer( self.directives["doxygenfunction"], self.node_factory, self.text_renderer, self.root_data_object, self.renderer_factory_creator_constructor, self.finder_factory, self.project_info_factory, self.filter_factory, self.target_handler_factory, self.parser_factory ) def create_directive_container(self, type_): return DirectiveContainer( self.directives[type_], self.root_data_object, self.renderer_factory_creator_constructor, self.finder_factory, self.project_info_factory, self.filter_factory, self.target_handler_factory, self.parser_factory ) def get_config_values(self, app): # All DirectiveContainers maintain references to this project info factory # so we can update this to update them self.project_info_factory.update( app.config.breathe_projects, app.config.breathe_default_project, app.config.breathe_domain_by_extension, app.config.breathe_domain_by_file_pattern, app.config.breathe_projects_source, app.config.breathe_build_directory ) class NodeFactory(object): def __init__(self, *args): self.sources = args def __getattr__(self, node_name): for source in self.sources: try: return getattr(source, node_name) except AttributeError: pass raise NodeNotFoundError(node_name) class RootDataObject(object): node_type = "root" class PathHandler(object): def __init__(self, config_directory, sep, basename, join): self.config_directory = config_directory self.sep = sep self.basename = basename self.join = join def includes_directory(self, file_path): # Check for backslash or forward slash as we don't know what platform we're on and sometimes # the doxygen paths will have forward slash even on Windows. return bool(file_path.count('\\')) or bool(file_path.count('/')) def resolve_path(self, directory, filename): """Returns a full path to the filename in the given directory assuming that if the directory path is relative, then it is relative to the conf.py directory. """ # os.path.join does the appropriate handling if _project_path is an absolute path return self.join(self.config_directory, directory, filename) def write_file(directory, filename, content): # Check the directory exists if not os.path.exists(directory): os.makedirs(directory) # Write the file with the provided contents with open(os.path.join(directory, filename), "w") as f: f.write(content) class MTimerError(Exception): pass class MTimer(object): def __init__(self, getmtime): self.getmtime = getmtime def get_mtime(self, filename): try: return self.getmtime(filename) except OSError: raise MTimerError('Cannot find file: %s' % os.path.realpath(filename)) class FileStateCache(object): """ Stores the modified time of the various doxygen xml files against the reStructuredText file that they are referenced from so that we know which reStructuredText files to rebuild if the doxygen xml is modified. We store the information in the environment object so that it is pickled down and stored between builds as Sphinx is designed to do. """ def __init__(self, mtimer, app): self.app = app self.mtimer = mtimer def update(self, source_file): if not hasattr(self.app.env, "breathe_file_state"): self.app.env.breathe_file_state = {} new_mtime = self.mtimer.get_mtime(source_file) mtime, docnames = self.app.env.breathe_file_state.setdefault( source_file, (new_mtime, set()) ) docnames.add(self.app.env.docname) self.app.env.breathe_file_state[source_file] = (new_mtime, docnames) def get_outdated(self, app, env, added, changed, removed): if not hasattr(self.app.env, "breathe_file_state"): return [] stale = [] for filename, info in self.app.env.breathe_file_state.iteritems(): old_mtime, docnames = info if self.mtimer.get_mtime(filename) > old_mtime: stale.extend(docnames) return list(set(stale).difference(removed)) def purge_doc(self, app, env, docname): if not hasattr(self.app.env, "breathe_file_state"): return toremove = [] for filename, info in self.app.env.breathe_file_state.iteritems(): _, docnames = info docnames.discard(docname) if not docnames: toremove.append(filename) for filename in toremove: del self.app.env.breathe_file_state[filename] class DomainDirectiveFactory(object): # A mapping from node kinds to cpp domain classes and directive names. cpp_classes = { 'class': (cpp.CPPClassObject, 'class'), 'struct': (cpp.CPPClassObject, 'class'), 'function': (cpp.CPPFunctionObject, 'function'), 'friend': (cpp.CPPFunctionObject, 'function'), 'slot': (cpp.CPPFunctionObject, 'function'), 'enum': (cpp.CPPTypeObject, 'type'), 'typedef': (cpp.CPPTypeObject, 'type'), 'union': (cpp.CPPTypeObject, 'type'), 'namespace': (cpp.CPPTypeObject, 'type'), # Use CPPClassObject for enum values as the cpp domain doesn't have a directive for # enum values and CPPMemberObject requires a type. 'enumvalue': (cpp.CPPClassObject, 'member'), 'define': (c.CObject, 'macro') } python_classes = { 'function': (python.PyModulelevel, 'function'), 'variable': (python.PyClassmember, 'attribute') } @staticmethod def fix_python_signature(sig): def_ = 'def ' if sig.startswith(def_): sig = sig[len(def_):] # Doxygen uses an invalid separator ('::') in Python signatures. Replace them with '.'. return sig.replace('::', '.') @staticmethod def create(domain, args): if domain == 'c': return c.CObject(*args) if domain == 'py': cls, name = DomainDirectiveFactory.python_classes.get( args[0], (python.PyClasslike, 'class')) args[1] = [DomainDirectiveFactory.fix_python_signature(n) for n in args[1]] else: cls, name = DomainDirectiveFactory.cpp_classes.get( args[0], (cpp.CPPMemberObject, 'member')) # Replace the directive name because domain directives don't know how to handle # Breathe's "doxygen" directives. args = [name] + args[1:] return cls(*args) # Setup # ----- def setup(app): cache_factory = CacheFactory() cache = cache_factory.create_cache() path_handler = PathHandler(app.confdir, os.sep, os.path.basename, os.path.join) mtimer = MTimer(os.path.getmtime) file_state_cache = FileStateCache(mtimer, app) parser_factory = DoxygenParserFactory(cache, path_handler, file_state_cache) glob_factory = GlobFactory(fnmatch.fnmatch) filter_factory = FilterFactory(glob_factory, path_handler) item_finder_factory_creator = DoxygenItemFinderFactoryCreator(parser_factory, filter_factory) index_parser = parser_factory.create_index_parser() finder_factory = FinderFactory(index_parser, item_finder_factory_creator) # Create a math_nodes object with a displaymath member for the displaymath # node so that we can treat it in the same way as the nodes & addnodes # modules in the NodeFactory math_nodes = collections.namedtuple("MathNodes", ["displaymath"]) math_nodes.displaymath = sphinx.ext.mathbase.displaymath node_factory = NodeFactory(docutils.nodes, sphinx.addnodes, math_nodes) rst_content_creator = RstContentCreator(ViewList, textwrap.dedent) renderer_factory_creator_constructor = DoxygenToRstRendererFactoryCreatorConstructor( node_factory, parser_factory, DomainDirectiveFactory, rst_content_creator ) # Assume general build directory is the doctree directory without the last component. We strip # off any trailing slashes so that dirname correctly drops the last part. This can be overriden # with the breathe_build_directory config variable build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep)) project_info_factory = ProjectInfoFactory(app.srcdir, build_dir, app.confdir, fnmatch.fnmatch) target_handler_factory = TargetHandlerFactory(node_factory) root_data_object = RootDataObject() text_renderer = TextRenderer(app) directive_factory = DoxygenDirectiveFactory( node_factory, text_renderer, root_data_object, renderer_factory_creator_constructor, finder_factory, project_info_factory, filter_factory, target_handler_factory, parser_factory ) DoxygenFunctionDirective.app = app def add_directive(name): app.add_directive(name, directive_factory.create_directive_container(name)) add_directive('doxygenindex') add_directive('doxygenstruct') add_directive('doxygenenum') add_directive('doxygenenumvalue') add_directive('doxygentypedef') add_directive('doxygenunion') add_directive('doxygenclass') add_directive('doxygenfile') add_directive('doxygennamespace') add_directive('doxygengroup') add_directive('doxygenvariable') add_directive('doxygendefine') add_directive('autodoxygenindex') add_directive('autodoxygenfile') app.add_directive( "doxygenfunction", directive_factory.create_function_directive_container(), ) app.add_config_value("breathe_projects", {}, True) app.add_config_value("breathe_default_project", "", True) # Provide reasonable defaults for domain_by_extension mapping. Can be overridden by users. app.add_config_value("breathe_domain_by_extension", {'py': 'py'}, True) app.add_config_value("breathe_domain_by_file_pattern", {}, True) app.add_config_value("breathe_projects_source", {}, True) app.add_config_value("breathe_build_directory", '', True) app.add_config_value("breathe_default_members", (), True) app.add_config_value("breathe_implementation_filename_extensions", ['.c', '.cc', '.cpp'], True) app.add_config_value("breathe_doxygen_config_options", {}, True) breathe_css = "breathe.css" if (os.path.exists(os.path.join(app.confdir, "_static", breathe_css))): app.add_stylesheet(breathe_css) doxygen_handle = AutoDoxygenProcessHandle( path_handler, subprocess.check_call, write_file, project_info_factory ) def doxygen_hook(app): doxygen_handle.generate_xml( app.config.breathe_projects_source, app.config.breathe_doxygen_config_options ) app.connect("builder-inited", doxygen_hook) app.connect("builder-inited", directive_factory.get_config_values) app.connect("builder-inited", filter_factory.get_config_values) app.connect("env-get-outdated", file_state_cache.get_outdated) app.connect("env-purge-doc", file_state_cache.purge_doc) breathe-4.1.0/breathe/exception.py000066400000000000000000000000511256765247000171220ustar00rootroot00000000000000 class BreatheError(Exception): pass breathe-4.1.0/breathe/finder/000077500000000000000000000000001256765247000160255ustar00rootroot00000000000000breathe-4.1.0/breathe/finder/__init__.py000066400000000000000000000000001256765247000201240ustar00rootroot00000000000000breathe-4.1.0/breathe/finder/core.py000066400000000000000000000022041256765247000173250ustar00rootroot00000000000000 class FakeParentNode(object): node_type = "fakeparent" class Finder(object): def __init__(self, root, item_finder_factory): self._root = root self.item_finder_factory = item_finder_factory def filter_(self, filter_, matches): """Adds all nodes which match the filter into the matches list""" item_finder = self.item_finder_factory.create_finder(self._root) item_finder.filter_([FakeParentNode()], filter_, matches) def root(self): return self._root class FinderFactory(object): def __init__(self, parser, item_finder_factory_creator): self.parser = parser self.item_finder_factory_creator = item_finder_factory_creator def create_finder(self, project_info): root = self.parser.parse(project_info) item_finder_factory = self.item_finder_factory_creator.create_factory(project_info) return Finder(root, item_finder_factory) def create_finder_from_root(self, root, project_info): item_finder_factory = self.item_finder_factory_creator.create_factory(project_info) return Finder(root, item_finder_factory) breathe-4.1.0/breathe/finder/doxygen/000077500000000000000000000000001256765247000175025ustar00rootroot00000000000000breathe-4.1.0/breathe/finder/doxygen/__init__.py000066400000000000000000000000011256765247000216020ustar00rootroot00000000000000 breathe-4.1.0/breathe/finder/doxygen/base.py000066400000000000000000000007321256765247000207700ustar00rootroot00000000000000 class ItemFinder(object): def __init__(self, project_info, data_object, item_finder_factory): self.data_object = data_object self.item_finder_factory = item_finder_factory self.project_info = project_info def stack(element, list_): """Stack an element on to the start of a list and return as a new list""" # Copy list first so we have a new list to insert into output = list_[:] output.insert(0, element) return output breathe-4.1.0/breathe/finder/doxygen/compound.py000066400000000000000000000045151256765247000217050ustar00rootroot00000000000000 from .base import ItemFinder, stack class DoxygenTypeSubItemFinder(ItemFinder): def filter_(self, ancestors, filter_, matches): """Find nodes which match the filter. Doesn't test this node, only its children""" node_stack = stack(self.data_object, ancestors) compound_finder = self.item_finder_factory.create_finder(self.data_object.compounddef) compound_finder.filter_(node_stack, filter_, matches) class CompoundDefTypeSubItemFinder(ItemFinder): def filter_(self, ancestors, filter_, matches): """Finds nodes which match the filter and continues checks to children""" node_stack = stack(self.data_object, ancestors) if filter_.allow(node_stack): matches.append(node_stack) for sectiondef in self.data_object.sectiondef: finder = self.item_finder_factory.create_finder(sectiondef) finder.filter_(node_stack, filter_, matches) for innerclass in self.data_object.innerclass: finder = self.item_finder_factory.create_finder(innerclass) finder.filter_(node_stack, filter_, matches) class SectionDefTypeSubItemFinder(ItemFinder): def filter_(self, ancestors, filter_, matches): """Find nodes which match the filter. Doesn't test this node, only its children""" node_stack = stack(self.data_object, ancestors) if filter_.allow(node_stack): matches.append(node_stack) for memberdef in self.data_object.memberdef: finder = self.item_finder_factory.create_finder(memberdef) finder.filter_(node_stack, filter_, matches) class MemberDefTypeSubItemFinder(ItemFinder): def filter_(self, ancestors, filter_, matches): data_object = self.data_object node_stack = stack(data_object, ancestors) if filter_.allow(node_stack): matches.append(node_stack) if data_object.kind == 'enum': for value in data_object.enumvalue: value_stack = stack(value, node_stack) if filter_.allow(value_stack): matches.append(value_stack) class RefTypeSubItemFinder(ItemFinder): def filter_(self, ancestors, filter_, matches): node_stack = stack(self.data_object, ancestors) if filter_.allow(node_stack): matches.append(node_stack) breathe-4.1.0/breathe/finder/doxygen/core.py000066400000000000000000000033351256765247000210100ustar00rootroot00000000000000 from . import index as indexfinder from . import compound as compoundfinder class CreateCompoundTypeSubFinder(object): def __init__(self, parser_factory, matcher_factory): self.parser_factory = parser_factory self.matcher_factory = matcher_factory def __call__(self, project_info, *args): compound_parser = self.parser_factory.create_compound_parser(project_info) return indexfinder.CompoundTypeSubItemFinder(self.matcher_factory, compound_parser, project_info, *args) class DoxygenItemFinderFactory(object): def __init__(self, finders, project_info): self.finders = finders self.project_info = project_info def create_finder(self, data_object): return self.finders[data_object.node_type](self.project_info, data_object, self) class DoxygenItemFinderFactoryCreator(object): def __init__(self, parser_factory, filter_factory): self.parser_factory = parser_factory self.filter_factory = filter_factory def create_factory(self, project_info): finders = { "doxygen": indexfinder.DoxygenTypeSubItemFinder, "compound": CreateCompoundTypeSubFinder(self.parser_factory, self.filter_factory), "member": indexfinder.MemberTypeSubItemFinder, "doxygendef": compoundfinder.DoxygenTypeSubItemFinder, "compounddef": compoundfinder.CompoundDefTypeSubItemFinder, "sectiondef": compoundfinder.SectionDefTypeSubItemFinder, "memberdef": compoundfinder.MemberDefTypeSubItemFinder, "ref": compoundfinder.RefTypeSubItemFinder, } return DoxygenItemFinderFactory(finders, project_info) breathe-4.1.0/breathe/finder/doxygen/index.py000066400000000000000000000053161256765247000211700ustar00rootroot00000000000000 from .base import ItemFinder, stack class DoxygenTypeSubItemFinder(ItemFinder): def filter_(self, ancestors, filter_, matches): """Find nodes which match the filter. Doesn't test this node, only its children""" compounds = self.data_object.get_compound() node_stack = stack(self.data_object, ancestors) for compound in compounds: compound_finder = self.item_finder_factory.create_finder(compound) compound_finder.filter_(node_stack, filter_, matches) class CompoundTypeSubItemFinder(ItemFinder): def __init__(self, filter_factory, compound_parser, *args): ItemFinder.__init__(self, *args) self.filter_factory = filter_factory self.compound_parser = compound_parser def filter_(self, ancestors, filter_, matches): """Finds nodes which match the filter and continues checks to children Requires parsing the xml files referenced by the children for which we use the compound parser and continue at the top level of that pretending that this node is the parent of the top level node of the compound file. """ node_stack = stack(self.data_object, ancestors) # Match against compound object if filter_.allow(node_stack): matches.append(node_stack) # Descend to member children members = self.data_object.get_member() member_matches = [] for member in members: member_finder = self.item_finder_factory.create_finder(member) member_finder.filter_(node_stack, filter_, member_matches) results = [] # If there are members in this compound that match the criteria # then load up the file for this compound and get the member data objects if member_matches: file_data = self.compound_parser.parse(self.data_object.refid) finder = self.item_finder_factory.create_finder(file_data) for member_stack in member_matches: ref_filter = self.filter_factory.create_id_filter('memberdef', member_stack[0].refid) finder.filter_(node_stack, ref_filter, matches) else: # Read in the xml file referenced by the compound and descend into that as well file_data = self.compound_parser.parse(self.data_object.refid) finder = self.item_finder_factory.create_finder(file_data) finder.filter_(node_stack, filter_, matches) class MemberTypeSubItemFinder(ItemFinder): def filter_(self, ancestors, filter_, matches): node_stack = stack(self.data_object, ancestors) # Match against member object if filter_.allow(node_stack): matches.append(node_stack) breathe-4.1.0/breathe/parser/000077500000000000000000000000001256765247000160525ustar00rootroot00000000000000breathe-4.1.0/breathe/parser/__init__.py000066400000000000000000000063521256765247000201710ustar00rootroot00000000000000 import breathe.parser.doxygen.index import breathe.parser.doxygen.compound class ParserError(Exception): def __init__(self, error, filename): Exception.__init__(self, error) self.error = error self.filename = filename class FileIOError(Exception): def __init__(self, error, filename): Exception.__init__(self, error) self.error = error self.filename = filename class Parser(object): def __init__(self, cache, path_handler, file_state_cache): self.cache = cache self.path_handler = path_handler self.file_state_cache = file_state_cache class DoxygenIndexParser(Parser): def __init__(self, cache, path_handler, file_state_cache): Parser.__init__(self, cache, path_handler, file_state_cache) def parse(self, project_info): filename = self.path_handler.resolve_path( project_info.project_path(), "index.xml" ) self.file_state_cache.update(filename) try: # Try to get from our cache return self.cache[filename] except KeyError: # If that fails, parse it afresh try: result = breathe.parser.doxygen.index.parse(filename) self.cache[filename] = result return result except breathe.parser.doxygen.index.ParseError as e: raise ParserError(e, filename) except breathe.parser.doxygen.index.FileIOError as e: raise FileIOError(e, filename) class DoxygenCompoundParser(Parser): def __init__(self, cache, path_handler, file_state_cache, project_info): Parser.__init__(self, cache, path_handler, file_state_cache) self.project_info = project_info def parse(self, refid): filename = self.path_handler.resolve_path( self.project_info.project_path(), "%s.xml" % refid ) self.file_state_cache.update(filename) try: # Try to get from our cache return self.cache[filename] except KeyError: # If that fails, parse it afresh try: result = breathe.parser.doxygen.compound.parse(filename) self.cache[filename] = result return result except breathe.parser.doxygen.compound.ParseError as e: raise ParserError(e, filename) except breathe.parser.doxygen.compound.FileIOError as e: raise FileIOError(e, filename) class CacheFactory(object): def create_cache(self): # Return basic dictionary as cache return {} class DoxygenParserFactory(object): def __init__(self, cache, path_handler, file_state_cache): self.cache = cache self.path_handler = path_handler self.file_state_cache = file_state_cache def create_index_parser(self): return DoxygenIndexParser(self.cache, self.path_handler, self.file_state_cache) def create_compound_parser(self, project_info): return DoxygenCompoundParser( self.cache, self.path_handler, self.file_state_cache, project_info ) breathe-4.1.0/breathe/parser/doxygen/000077500000000000000000000000001256765247000175275ustar00rootroot00000000000000breathe-4.1.0/breathe/parser/doxygen/__init__.py000066400000000000000000000000001256765247000216260ustar00rootroot00000000000000breathe-4.1.0/breathe/parser/doxygen/compound.py000066400000000000000000001002241256765247000217240ustar00rootroot00000000000000""" Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ from xml.dom import minidom from xml.dom import Node from xml.parsers.expat import ExpatError from . import compoundsuper as supermod from .compoundsuper import MixedContainer class DoxygenTypeSub(supermod.DoxygenType): node_type = "doxygendef" def __init__(self, version=None, compounddef=None): supermod.DoxygenType.__init__(self, version, compounddef) supermod.DoxygenType.subclass = DoxygenTypeSub # end class DoxygenTypeSub class compounddefTypeSub(supermod.compounddefType): node_type = "compounddef" def __init__(self, kind=None, prot=None, id=None, compoundname='', title='', basecompoundref=None, derivedcompoundref=None, includes=None, includedby=None, incdepgraph=None, invincdepgraph=None, innerdir=None, innerfile=None, innerclass=None, innernamespace=None, innerpage=None, innergroup=None, templateparamlist=None, sectiondef=None, briefdescription=None, detaileddescription=None, inheritancegraph=None, collaborationgraph=None, programlisting=None, location=None, listofallmembers=None): supermod.compounddefType.__init__(self, kind, prot, id, compoundname, title, basecompoundref, derivedcompoundref, includes, includedby, incdepgraph, invincdepgraph, innerdir, innerfile, innerclass, innernamespace, innerpage, innergroup, templateparamlist, sectiondef, briefdescription, detaileddescription, inheritancegraph, collaborationgraph, programlisting, location, listofallmembers) supermod.compounddefType.subclass = compounddefTypeSub # end class compounddefTypeSub class listofallmembersTypeSub(supermod.listofallmembersType): node_type = "listofallmembers" def __init__(self, member=None): supermod.listofallmembersType.__init__(self, member) supermod.listofallmembersType.subclass = listofallmembersTypeSub # end class listofallmembersTypeSub class memberRefTypeSub(supermod.memberRefType): node_type = "memberref" def __init__(self, virt=None, prot=None, refid=None, ambiguityscope=None, scope='', name=''): supermod.memberRefType.__init__(self, virt, prot, refid, ambiguityscope, scope, name) supermod.memberRefType.subclass = memberRefTypeSub # end class memberRefTypeSub class compoundRefTypeSub(supermod.compoundRefType): node_type = "compoundref" def __init__(self, virt=None, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None): supermod.compoundRefType.__init__(self, mixedclass_, content_) supermod.compoundRefType.subclass = compoundRefTypeSub # end class compoundRefTypeSub class reimplementTypeSub(supermod.reimplementType): node_type = "reimplement" def __init__(self, refid=None, valueOf_='', mixedclass_=None, content_=None): supermod.reimplementType.__init__(self, mixedclass_, content_) supermod.reimplementType.subclass = reimplementTypeSub # end class reimplementTypeSub class incTypeSub(supermod.incType): node_type = "inc" def __init__(self, local=None, refid=None, valueOf_='', mixedclass_=None, content_=None): supermod.incType.__init__(self, mixedclass_, content_) supermod.incType.subclass = incTypeSub # end class incTypeSub class refTypeSub(supermod.refType): node_type = "ref" def __init__(self, node_name, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None): supermod.refType.__init__(self, mixedclass_, content_) self.node_name = node_name supermod.refType.subclass = refTypeSub class refTextTypeSub(supermod.refTextType): node_type = "reftex" def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None): supermod.refTextType.__init__(self, mixedclass_, content_) supermod.refTextType.subclass = refTextTypeSub # end class refTextTypeSub class sectiondefTypeSub(supermod.sectiondefType): node_type = "sectiondef" def __init__(self, kind=None, header='', description=None, memberdef=None): supermod.sectiondefType.__init__(self, kind, header, description, memberdef) supermod.sectiondefType.subclass = sectiondefTypeSub # end class sectiondefTypeSub class memberdefTypeSub(supermod.memberdefType): node_type = "memberdef" def __init__(self, initonly=None, kind=None, volatile=None, const=None, raise_=None, virt=None, readable=None, prot=None, explicit=None, new=None, final=None, writable=None, add=None, static=None, remove=None, sealed=None, mutable=None, gettable=None, inline=None, settable=None, id=None, templateparamlist=None, type_=None, definition='', argsstring='', name='', read='', write='', bitfield='', reimplements=None, reimplementedby=None, param=None, enumvalue=None, initializer=None, exceptions=None, briefdescription=None, detaileddescription=None, inbodydescription=None, location=None, references=None, referencedby=None): supermod.memberdefType.__init__(self, initonly, kind, volatile, const, raise_, virt, readable, prot, explicit, new, final, writable, add, static, remove, sealed, mutable, gettable, inline, settable, id, templateparamlist, type_, definition, argsstring, name, read, write, bitfield, reimplements, reimplementedby, param, enumvalue, initializer, exceptions, briefdescription, detaileddescription, inbodydescription, location, references, referencedby) self.parameterlist = supermod.docParamListType.factory() self.parameterlist.kind = "param" def buildChildren(self, child_, nodeName_): supermod.memberdefType.buildChildren(self, child_, nodeName_) if child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'param': # Get latest param param = self.param[-1] # If it doesn't have a description we're done if not param.briefdescription: return # Construct our own param list from the descriptions stored inline # with the parameters paramdescription = param.briefdescription paramname = supermod.docParamName.factory() # Add parameter name obj_ = paramname.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', param.declname) paramname.content_.append(obj_) paramnamelist = supermod.docParamNameList.factory() paramnamelist.parametername.append(paramname) paramlistitem = supermod.docParamListItem.factory() paramlistitem.parameternamelist.append(paramnamelist) # Add parameter description paramlistitem.parameterdescription = paramdescription self.parameterlist.parameteritem.append(paramlistitem) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'detaileddescription': if not self.parameterlist.parameteritem: # No items in our list return # Assume supermod.memberdefType.buildChildren has already built the # description object, we just want to slot our parameterlist in at # a reasonable point if not self.detaileddescription: # Create one if it doesn't exist self.detaileddescription = supermod.descriptionType.factory() detaileddescription = self.detaileddescription para = supermod.docParaType.factory() para.parameterlist.append(self.parameterlist) obj_ = detaileddescription.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', para) index = 0 detaileddescription.content_.insert(index, obj_) supermod.memberdefType.subclass = memberdefTypeSub # end class memberdefTypeSub class descriptionTypeSub(supermod.descriptionType): node_type = "description" def __init__(self, title='', para=None, sect1=None, internal=None, mixedclass_=None, content_=None): supermod.descriptionType.__init__(self, mixedclass_, content_) supermod.descriptionType.subclass = descriptionTypeSub # end class descriptionTypeSub class enumvalueTypeSub(supermod.enumvalueType): node_type = "enumvalue" def __init__(self, prot=None, id=None, name='', initializer=None, briefdescription=None, detaileddescription=None, mixedclass_=None, content_=None): supermod.enumvalueType.__init__(self, mixedclass_, content_) self.initializer = None def buildChildren(self, child_, nodeName_): # Get text from child and put it in self.name if child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'name': value_ = [] for text_ in child_.childNodes: value_.append(text_.nodeValue) valuestr_ = ''.join(value_) self.name = valuestr_ elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'briefdescription': obj_ = supermod.descriptionType.factory() obj_.build(child_) self.set_briefdescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'detaileddescription': obj_ = supermod.descriptionType.factory() obj_.build(child_) self.set_detaileddescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'initializer': childobj_ = supermod.linkedTextType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'initializer', childobj_) self.set_initializer(obj_) self.content_.append(obj_) supermod.enumvalueType.subclass = enumvalueTypeSub # end class enumvalueTypeSub class templateparamlistTypeSub(supermod.templateparamlistType): node_type = "templateparamlist" def __init__(self, param=None): supermod.templateparamlistType.__init__(self, param) supermod.templateparamlistType.subclass = templateparamlistTypeSub # end class templateparamlistTypeSub class paramTypeSub(supermod.paramType): node_type = "param" def __init__(self, type_=None, declname='', defname='', array='', defval=None, briefdescription=None): supermod.paramType.__init__(self, type_, declname, defname, array, defval, briefdescription) supermod.paramType.subclass = paramTypeSub # end class paramTypeSub class linkedTextTypeSub(supermod.linkedTextType): node_type = "linkedtext" def __init__(self, ref=None, mixedclass_=None, content_=None): supermod.linkedTextType.__init__(self, mixedclass_, content_) supermod.linkedTextType.subclass = linkedTextTypeSub # end class linkedTextTypeSub class graphTypeSub(supermod.graphType): node_type = "graph" def __init__(self, node=None): supermod.graphType.__init__(self, node) supermod.graphType.subclass = graphTypeSub # end class graphTypeSub class nodeTypeSub(supermod.nodeType): node_type = "node" def __init__(self, id=None, label='', link=None, childnode=None): supermod.nodeType.__init__(self, id, label, link, childnode) supermod.nodeType.subclass = nodeTypeSub # end class nodeTypeSub class childnodeTypeSub(supermod.childnodeType): node_type = "childnode" def __init__(self, relation=None, refid=None, edgelabel=None): supermod.childnodeType.__init__(self, relation, refid, edgelabel) supermod.childnodeType.subclass = childnodeTypeSub # end class childnodeTypeSub class linkTypeSub(supermod.linkType): node_type = "link" def __init__(self, refid=None, external=None, valueOf_=''): supermod.linkType.__init__(self, refid, external) supermod.linkType.subclass = linkTypeSub # end class linkTypeSub class listingTypeSub(supermod.listingType): node_type = "listing" def __init__(self, codeline=None): supermod.listingType.__init__(self, codeline) supermod.listingType.subclass = listingTypeSub # end class listingTypeSub class codelineTypeSub(supermod.codelineType): node_type = "codeline" def __init__(self, external=None, lineno=None, refkind=None, refid=None, highlight=None): supermod.codelineType.__init__(self, external, lineno, refkind, refid, highlight) supermod.codelineType.subclass = codelineTypeSub # end class codelineTypeSub class highlightTypeSub(supermod.highlightType): node_type = "highlight" def __init__(self, class_=None, sp=None, ref=None, mixedclass_=None, content_=None): supermod.highlightType.__init__(self, mixedclass_, content_) supermod.highlightType.subclass = highlightTypeSub # end class highlightTypeSub class referenceTypeSub(supermod.referenceType): node_type = "reference" def __init__(self, endline=None, startline=None, refid=None, compoundref=None, valueOf_='', mixedclass_=None, content_=None): supermod.referenceType.__init__(self, mixedclass_, content_) supermod.referenceType.subclass = referenceTypeSub # end class referenceTypeSub class locationTypeSub(supermod.locationType): node_type = "location" def __init__(self, bodystart=None, line=None, bodyend=None, bodyfile=None, file=None, valueOf_=''): supermod.locationType.__init__(self, bodystart, line, bodyend, bodyfile, file) supermod.locationType.subclass = locationTypeSub # end class locationTypeSub class docSect1TypeSub(supermod.docSect1Type): node_type = "docsect1" def __init__(self, id=None, title='', para=None, sect2=None, internal=None, mixedclass_=None, content_=None): supermod.docSect1Type.__init__(self, mixedclass_, content_) supermod.docSect1Type.subclass = docSect1TypeSub # end class docSect1TypeSub class docSect2TypeSub(supermod.docSect2Type): node_type = "docsect2" def __init__(self, id=None, title='', para=None, sect3=None, internal=None, mixedclass_=None, content_=None): supermod.docSect2Type.__init__(self, mixedclass_, content_) supermod.docSect2Type.subclass = docSect2TypeSub # end class docSect2TypeSub class docSect3TypeSub(supermod.docSect3Type): node_type = "docsect3" def __init__(self, id=None, title='', para=None, sect4=None, internal=None, mixedclass_=None, content_=None): supermod.docSect3Type.__init__(self, mixedclass_, content_) supermod.docSect3Type.subclass = docSect3TypeSub # end class docSect3TypeSub class docSect4TypeSub(supermod.docSect4Type): node_type = "docsect4" def __init__(self, id=None, title='', para=None, internal=None, mixedclass_=None, content_=None): supermod.docSect4Type.__init__(self, mixedclass_, content_) supermod.docSect4Type.subclass = docSect4TypeSub # end class docSect4TypeSub class docInternalTypeSub(supermod.docInternalType): node_type = "docinternal" def __init__(self, para=None, sect1=None, mixedclass_=None, content_=None): supermod.docInternalType.__init__(self, mixedclass_, content_) supermod.docInternalType.subclass = docInternalTypeSub # end class docInternalTypeSub class docInternalS1TypeSub(supermod.docInternalS1Type): node_type = "docinternals1" def __init__(self, para=None, sect2=None, mixedclass_=None, content_=None): supermod.docInternalS1Type.__init__(self, mixedclass_, content_) supermod.docInternalS1Type.subclass = docInternalS1TypeSub # end class docInternalS1TypeSub class docInternalS2TypeSub(supermod.docInternalS2Type): node_type = "docinternals2" def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None): supermod.docInternalS2Type.__init__(self, mixedclass_, content_) supermod.docInternalS2Type.subclass = docInternalS2TypeSub # end class docInternalS2TypeSub class docInternalS3TypeSub(supermod.docInternalS3Type): node_type = "docinternals3" def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None): supermod.docInternalS3Type.__init__(self, mixedclass_, content_) supermod.docInternalS3Type.subclass = docInternalS3TypeSub # end class docInternalS3TypeSub class docInternalS4TypeSub(supermod.docInternalS4Type): node_type = "docinternals4" def __init__(self, para=None, mixedclass_=None, content_=None): supermod.docInternalS4Type.__init__(self, mixedclass_, content_) supermod.docInternalS4Type.subclass = docInternalS4TypeSub # end class docInternalS4TypeSub class docURLLinkSub(supermod.docURLLink): node_type = "docurllink" def __init__(self, url=None, valueOf_='', mixedclass_=None, content_=None): supermod.docURLLink.__init__(self, mixedclass_, content_) supermod.docURLLink.subclass = docURLLinkSub # end class docURLLinkSub class docAnchorTypeSub(supermod.docAnchorType): node_type = "docanchor" def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): supermod.docAnchorType.__init__(self, mixedclass_, content_) supermod.docAnchorType.subclass = docAnchorTypeSub # end class docAnchorTypeSub class docFormulaTypeSub(supermod.docFormulaType): node_type = "docformula" def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): supermod.docFormulaType.__init__(self, mixedclass_, content_) supermod.docFormulaType.subclass = docFormulaTypeSub # end class docFormulaTypeSub class docIndexEntryTypeSub(supermod.docIndexEntryType): node_type = "docindexentry" def __init__(self, primaryie='', secondaryie=''): supermod.docIndexEntryType.__init__(self, primaryie, secondaryie) supermod.docIndexEntryType.subclass = docIndexEntryTypeSub # end class docIndexEntryTypeSub class docListTypeSub(supermod.docListType): node_type = "doclist" def __init__(self, listitem=None, subtype=""): self.node_subtype = "itemized" if subtype is not "": self.node_subtype = subtype supermod.docListType.__init__(self, listitem) supermod.docListType.subclass = docListTypeSub # end class docListTypeSub class docListItemTypeSub(supermod.docListItemType): node_type = "doclistitem" def __init__(self, para=None): supermod.docListItemType.__init__(self, para) supermod.docListItemType.subclass = docListItemTypeSub # end class docListItemTypeSub class docSimpleSectTypeSub(supermod.docSimpleSectType): node_type = "docsimplesect" def __init__(self, kind=None, title=None, para=None): supermod.docSimpleSectType.__init__(self, kind, title, para) supermod.docSimpleSectType.subclass = docSimpleSectTypeSub # end class docSimpleSectTypeSub class docVarListEntryTypeSub(supermod.docVarListEntryType): node_type = "docvarlistentry" def __init__(self, term=None): supermod.docVarListEntryType.__init__(self, term) supermod.docVarListEntryType.subclass = docVarListEntryTypeSub # end class docVarListEntryTypeSub class docRefTextTypeSub(supermod.docRefTextType): node_type = "docreftext" def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None): supermod.docRefTextType.__init__(self, mixedclass_, content_) self.para = [] def buildChildren(self, child_, nodeName_): supermod.docRefTextType.buildChildren(self, child_, nodeName_) if child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'para': obj_ = supermod.docParaType.factory() obj_.build(child_) self.para.append(obj_) supermod.docRefTextType.subclass = docRefTextTypeSub # end class docRefTextTypeSub class docTableTypeSub(supermod.docTableType): node_type = "doctable" def __init__(self, rows=None, cols=None, row=None, caption=None): supermod.docTableType.__init__(self, rows, cols, row, caption) supermod.docTableType.subclass = docTableTypeSub # end class docTableTypeSub class docRowTypeSub(supermod.docRowType): node_type = "docrow" def __init__(self, entry=None): supermod.docRowType.__init__(self, entry) supermod.docRowType.subclass = docRowTypeSub # end class docRowTypeSub class docEntryTypeSub(supermod.docEntryType): node_type = "docentry" def __init__(self, thead=None, para=None): supermod.docEntryType.__init__(self, thead, para) supermod.docEntryType.subclass = docEntryTypeSub # end class docEntryTypeSub class docHeadingTypeSub(supermod.docHeadingType): node_type = "docheading" def __init__(self, level=None, valueOf_='', mixedclass_=None, content_=None): supermod.docHeadingType.__init__(self, mixedclass_, content_) def buildChildren(self, child_, nodeName_): supermod.docHeadingType.buildChildren(self, child_, nodeName_) # Account for styled content in the heading. This might need to be expanded to include other # nodes as it seems from the xsd that headings can have a lot of different children but we # really don't expect most of them to come up. if child_.nodeType == Node.ELEMENT_NODE and ( nodeName_ == 'bold' or nodeName_ == 'emphasis' or nodeName_ == 'computeroutput' or nodeName_ == 'subscript' or nodeName_ == 'superscript' or nodeName_ == 'center' or nodeName_ == 'small'): obj_ = supermod.docMarkupType.factory() obj_.build(child_) obj_.type_ = nodeName_ self.content_.append(obj_) supermod.docHeadingType.subclass = docHeadingTypeSub # end class docHeadingTypeSub class docImageTypeSub(supermod.docImageType): node_type = "docimage" def __init__(self, width=None, type_=None, name=None, height=None, valueOf_='', mixedclass_=None, content_=None): supermod.docImageType.__init__(self, mixedclass_, content_) supermod.docImageType.subclass = docImageTypeSub # end class docImageTypeSub class docDotFileTypeSub(supermod.docDotFileType): node_type = "docdocfile" def __init__(self, name=None, valueOf_='', mixedclass_=None, content_=None): supermod.docDotFileType.__init__(self, mixedclass_, content_) supermod.docDotFileType.subclass = docDotFileTypeSub # end class docDotFileTypeSub class docTocItemTypeSub(supermod.docTocItemType): node_type = "doctocitem" def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): supermod.docTocItemType.__init__(self, mixedclass_, content_) supermod.docTocItemType.subclass = docTocItemTypeSub # end class docTocItemTypeSub class docTocListTypeSub(supermod.docTocListType): node_type = "doctoclist" def __init__(self, tocitem=None): supermod.docTocListType.__init__(self, tocitem) supermod.docTocListType.subclass = docTocListTypeSub # end class docTocListTypeSub class docLanguageTypeSub(supermod.docLanguageType): node_type = "doclanguage" def __init__(self, langid=None, para=None): supermod.docLanguageType.__init__(self, langid, para) supermod.docLanguageType.subclass = docLanguageTypeSub # end class docLanguageTypeSub class docParamListTypeSub(supermod.docParamListType): node_type = "docparamlist" def __init__(self, kind=None, parameteritem=None): supermod.docParamListType.__init__(self, kind, parameteritem) supermod.docParamListType.subclass = docParamListTypeSub # end class docParamListTypeSub class docParamListItemSub(supermod.docParamListItem): node_type = "docparamlistitem" def __init__(self, parameternamelist=None, parameterdescription=None): supermod.docParamListItem.__init__(self, parameternamelist, parameterdescription) supermod.docParamListItem.subclass = docParamListItemSub # end class docParamListItemSub class docParamNameListSub(supermod.docParamNameList): node_type = "docparamnamelist" def __init__(self, parametername=None): supermod.docParamNameList.__init__(self, parametername) supermod.docParamNameList.subclass = docParamNameListSub # end class docParamNameListSub class docParamNameSub(supermod.docParamName): node_type = "docparamname" def __init__(self, direction=None, ref=None, mixedclass_=None, content_=None): supermod.docParamName.__init__(self, mixedclass_, content_) supermod.docParamName.subclass = docParamNameSub # end class docParamNameSub class docXRefSectTypeSub(supermod.docXRefSectType): node_type = "docxrefsect" def __init__(self, id=None, xreftitle=None, xrefdescription=None): supermod.docXRefSectType.__init__(self, id, xreftitle, xrefdescription) supermod.docXRefSectType.subclass = docXRefSectTypeSub # end class docXRefSectTypeSub class docCopyTypeSub(supermod.docCopyType): node_type = "doccopy" def __init__(self, link=None, para=None, sect1=None, internal=None): supermod.docCopyType.__init__(self, link, para, sect1, internal) supermod.docCopyType.subclass = docCopyTypeSub # end class docCopyTypeSub class docCharTypeSub(supermod.docCharType): node_type = "docchar" def __init__(self, char=None, valueOf_=''): supermod.docCharType.__init__(self, char) supermod.docCharType.subclass = docCharTypeSub # end class docCharTypeSub class verbatimTypeSub(object): """ New node type. Structure is largely pillaged from other nodes in order to match the set. """ node_type = "verbatim" def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.text = "" def factory(*args, **kwargs): return verbatimTypeSub(*args, **kwargs) factory = staticmethod(factory) def buildAttributes(self, attrs): pass def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.text += child_.nodeValue class docParaTypeSub(supermod.docParaType): node_type = "docpara" def __init__(self, char=None, valueOf_=''): supermod.docParaType.__init__(self, char) self.parameterlist = [] self.simplesects = [] self.content = [] self.programlisting = [] self.images = [] def buildChildren(self, child_, nodeName_): supermod.docParaType.buildChildren(self, child_, nodeName_) if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == "ref": obj_ = supermod.docRefTextType.factory() obj_.build(child_) self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'parameterlist': obj_ = supermod.docParamListType.factory() obj_.build(child_) self.parameterlist.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'simplesect': obj_ = supermod.docSimpleSectType.factory() obj_.build(child_) self.simplesects.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'programlisting': obj_ = supermod.listingType.factory() obj_.build(child_) self.programlisting.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'image': obj_ = supermod.docImageType.factory() obj_.build(child_) self.images.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and ( nodeName_ == 'bold' or nodeName_ == 'emphasis' or nodeName_ == 'computeroutput' or nodeName_ == 'subscript' or nodeName_ == 'superscript' or nodeName_ == 'center' or nodeName_ == 'small'): obj_ = supermod.docMarkupType.factory() obj_.build(child_) obj_.type_ = nodeName_ self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'verbatim': childobj_ = verbatimTypeSub.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'verbatim', childobj_) self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'formula': childobj_ = docFormulaTypeSub.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'formula', childobj_) self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == "itemizedlist": obj_ = supermod.docListType.factory(subtype="itemized") obj_.build(child_) self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == "orderedlist": obj_ = supermod.docListType.factory(subtype="ordered") obj_.build(child_) self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'heading': obj_ = supermod.docHeadingType.factory() obj_.build(child_) self.content.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'ulink': obj_ = supermod.docURLLink.factory() obj_.build(child_) self.content.append(obj_) supermod.docParaType.subclass = docParaTypeSub # end class docParaTypeSub class docMarkupTypeSub(supermod.docMarkupType): node_type = "docmarkup" def __init__(self, valueOf_='', mixedclass_=None, content_=None): supermod.docMarkupType.__init__(self, valueOf_, mixedclass_, content_) self.type_ = None def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == 'ref': childobj_ = supermod.docRefTextType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'ref', childobj_) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA[' + child_.nodeValue + ']]' supermod.docMarkupType.subclass = docMarkupTypeSub # end class docMarkupTypeSub class docTitleTypeSub(supermod.docTitleType): node_type = "doctitle" def __init__(self, valueOf_='', mixedclass_=None, content_=None): supermod.docTitleType.__init__(self, valueOf_, mixedclass_, content_) self.type_ = None supermod.docTitleType.subclass = docTitleTypeSub # end class docTitleTypeSub class ParseError(Exception): pass class FileIOError(Exception): pass def parse(inFilename): try: doc = minidom.parse(inFilename) except IOError as e: raise FileIOError(e) except ExpatError as e: raise ParseError(e) rootNode = doc.documentElement rootObj = supermod.DoxygenType.factory() rootObj.build(rootNode) return rootObj breathe-4.1.0/breathe/parser/doxygen/compoundsuper.py000066400000000000000000007202741256765247000230200ustar00rootroot00000000000000# # Generated Thu Jun 11 18:44:25 2009 by generateDS.py. # import sys import getopt from xml.dom import minidom from xml.dom import Node # # User methods # # Calls to the methods in these classes are generated by generateDS.py. # You can replace these methods by re-implementing the following class # in a module named generatedssuper.py. try: from generatedssuper import GeneratedsSuper except ImportError as exp: class GeneratedsSuper: def format_string(self, input_data, input_name=''): return input_data def format_integer(self, input_data, input_name=''): return '%d' % input_data def format_float(self, input_data, input_name=''): return '%f' % input_data def format_double(self, input_data, input_name=''): return '%e' % input_data def format_boolean(self, input_data, input_name=''): return '%s' % input_data # # If you have installed IPython you can uncomment and use the following. # IPython is available from http://ipython.scipy.org/. # ## from IPython.Shell import IPShellEmbed ## args = '' ## ipshell = IPShellEmbed(args, ## banner = 'Dropping into IPython', ## exit_msg = 'Leaving Interpreter, back to program.') # Then use the following line where and when you want to drop into the # IPython shell: # ipshell(' -- Entering ipshell.\nHit Ctrl-D to exit') # # Globals # ExternalEncoding = 'ascii' # # Support/utility functions. # def showIndent(outfile, level): for idx in range(level): outfile.write(' ') def quote_xml(inStr): s1 = (isinstance(inStr, basestring) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') s1 = s1.replace('>', '>') return s1 def quote_attrib(inStr): s1 = (isinstance(inStr, basestring) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') s1 = s1.replace('>', '>') if '"' in s1: if "'" in s1: s1 = '"%s"' % s1.replace('"', """) else: s1 = "'%s'" % s1 else: s1 = '"%s"' % s1 return s1 def quote_python(inStr): s1 = inStr if s1.find("'") == -1: if s1.find('\n') == -1: return "'%s'" % s1 else: return "'''%s'''" % s1 else: if s1.find('"') != -1: s1 = s1.replace('"', '\\"') if s1.find('\n') == -1: return '"%s"' % s1 else: return '"""%s"""' % s1 class MixedContainer: node_type = "mixedcontainer" # Constants for category: CategoryNone = 0 CategoryText = 1 CategorySimple = 2 CategoryComplex = 3 # Constants for content_type: TypeNone = 0 TypeText = 1 TypeString = 2 TypeInteger = 3 TypeFloat = 4 TypeDecimal = 5 TypeDouble = 6 TypeBoolean = 7 def __init__(self, category, content_type, name, value): self.category = category self.content_type = content_type self.name = name self.value = value def getCategory(self): return self.category def getContenttype(self, content_type): return self.content_type def getValue(self): return self.value def getName(self): return self.name class _MemberSpec(object): def __init__(self, name='', data_type='', container=0): self.name = name self.data_type = data_type self.container = container def set_name(self, name): self.name = name def get_name(self): return self.name def set_data_type(self, data_type): self.data_type = data_type def get_data_type(self): return self.data_type def set_container(self, container): self.container = container def get_container(self): return self.container # # Data representation classes. # class DoxygenType(GeneratedsSuper): subclass = None superclass = None def __init__(self, version=None, compounddef=None): self.version = version self.compounddef = compounddef def factory(*args_, **kwargs_): if DoxygenType.subclass: return DoxygenType.subclass(*args_, **kwargs_) else: return DoxygenType(*args_, **kwargs_) factory = staticmethod(factory) def get_compounddef(self): return self.compounddef def set_compounddef(self, compounddef): self.compounddef = compounddef def get_version(self): return self.version def set_version(self, version): self.version = version def hasContent_(self): if ( self.compounddef is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('version'): self.version = attrs.get('version').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'compounddef': obj_ = compounddefType.factory() obj_.build(child_) self.set_compounddef(obj_) # end class DoxygenType class compounddefType(GeneratedsSuper): subclass = None superclass = None def __init__(self, kind=None, prot=None, id=None, compoundname=None, title=None, basecompoundref=None, derivedcompoundref=None, includes=None, includedby=None, incdepgraph=None, invincdepgraph=None, innerdir=None, innerfile=None, innerclass=None, innernamespace=None, innerpage=None, innergroup=None, templateparamlist=None, sectiondef=None, briefdescription=None, detaileddescription=None, inheritancegraph=None, collaborationgraph=None, programlisting=None, location=None, listofallmembers=None): self.kind = kind self.prot = prot self.id = id self.compoundname = compoundname self.title = title if basecompoundref is None: self.basecompoundref = [] else: self.basecompoundref = basecompoundref if derivedcompoundref is None: self.derivedcompoundref = [] else: self.derivedcompoundref = derivedcompoundref if includes is None: self.includes = [] else: self.includes = includes if includedby is None: self.includedby = [] else: self.includedby = includedby self.incdepgraph = incdepgraph self.invincdepgraph = invincdepgraph if innerdir is None: self.innerdir = [] else: self.innerdir = innerdir if innerfile is None: self.innerfile = [] else: self.innerfile = innerfile if innerclass is None: self.innerclass = [] else: self.innerclass = innerclass if innernamespace is None: self.innernamespace = [] else: self.innernamespace = innernamespace if innerpage is None: self.innerpage = [] else: self.innerpage = innerpage if innergroup is None: self.innergroup = [] else: self.innergroup = innergroup self.templateparamlist = templateparamlist if sectiondef is None: self.sectiondef = [] else: self.sectiondef = sectiondef self.briefdescription = briefdescription self.detaileddescription = detaileddescription self.inheritancegraph = inheritancegraph self.collaborationgraph = collaborationgraph self.programlisting = programlisting self.location = location self.listofallmembers = listofallmembers self.namespaces = [] def factory(*args_, **kwargs_): if compounddefType.subclass: return compounddefType.subclass(*args_, **kwargs_) else: return compounddefType(*args_, **kwargs_) factory = staticmethod(factory) def get_compoundname(self): return self.compoundname def set_compoundname(self, compoundname): self.compoundname = compoundname def get_title(self): return self.title def set_title(self, title): self.title = title def get_basecompoundref(self): return self.basecompoundref def set_basecompoundref(self, basecompoundref): self.basecompoundref = basecompoundref def add_basecompoundref(self, value): self.basecompoundref.append(value) def insert_basecompoundref(self, index, value): self.basecompoundref[index] = value def get_derivedcompoundref(self): return self.derivedcompoundref def set_derivedcompoundref(self, derivedcompoundref): self.derivedcompoundref = derivedcompoundref def add_derivedcompoundref(self, value): self.derivedcompoundref.append(value) def insert_derivedcompoundref(self, index, value): self.derivedcompoundref[index] = value def get_includes(self): return self.includes def set_includes(self, includes): self.includes = includes def add_includes(self, value): self.includes.append(value) def insert_includes(self, index, value): self.includes[index] = value def get_includedby(self): return self.includedby def set_includedby(self, includedby): self.includedby = includedby def add_includedby(self, value): self.includedby.append(value) def insert_includedby(self, index, value): self.includedby[index] = value def get_incdepgraph(self): return self.incdepgraph def set_incdepgraph(self, incdepgraph): self.incdepgraph = incdepgraph def get_invincdepgraph(self): return self.invincdepgraph def set_invincdepgraph(self, invincdepgraph): self.invincdepgraph = invincdepgraph def get_innerdir(self): return self.innerdir def set_innerdir(self, innerdir): self.innerdir = innerdir def add_innerdir(self, value): self.innerdir.append(value) def insert_innerdir(self, index, value): self.innerdir[index] = value def get_innerfile(self): return self.innerfile def set_innerfile(self, innerfile): self.innerfile = innerfile def add_innerfile(self, value): self.innerfile.append(value) def insert_innerfile(self, index, value): self.innerfile[index] = value def get_innerclass(self): return self.innerclass def set_innerclass(self, innerclass): self.innerclass = innerclass def add_innerclass(self, value): self.innerclass.append(value) def insert_innerclass(self, index, value): self.innerclass[index] = value def get_innernamespace(self): return self.innernamespace def set_innernamespace(self, innernamespace): self.innernamespace = innernamespace def add_innernamespace(self, value): self.innernamespace.append(value) def insert_innernamespace(self, index, value): self.innernamespace[index] = value def get_innerpage(self): return self.innerpage def set_innerpage(self, innerpage): self.innerpage = innerpage def add_innerpage(self, value): self.innerpage.append(value) def insert_innerpage(self, index, value): self.innerpage[index] = value def get_innergroup(self): return self.innergroup def set_innergroup(self, innergroup): self.innergroup = innergroup def add_innergroup(self, value): self.innergroup.append(value) def insert_innergroup(self, index, value): self.innergroup[index] = value def get_templateparamlist(self): return self.templateparamlist def set_templateparamlist(self, templateparamlist): self.templateparamlist = templateparamlist def get_sectiondef(self): return self.sectiondef def set_sectiondef(self, sectiondef): self.sectiondef = sectiondef def add_sectiondef(self, value): self.sectiondef.append(value) def insert_sectiondef(self, index, value): self.sectiondef[index] = value def get_briefdescription(self): return self.briefdescription def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription def get_detaileddescription(self): return self.detaileddescription def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription def get_inheritancegraph(self): return self.inheritancegraph def set_inheritancegraph(self, inheritancegraph): self.inheritancegraph = inheritancegraph def get_collaborationgraph(self): return self.collaborationgraph def set_collaborationgraph(self, collaborationgraph): self.collaborationgraph = collaborationgraph def get_programlisting(self): return self.programlisting def set_programlisting(self, programlisting): self.programlisting = programlisting def get_location(self): return self.location def set_location(self, location): self.location = location def get_listofallmembers(self): return self.listofallmembers def set_listofallmembers(self, listofallmembers): self.listofallmembers = listofallmembers def get_kind(self): return self.kind def set_kind(self, kind): self.kind = kind def get_prot(self): return self.prot def set_prot(self, prot): self.prot = prot def get_id(self): return self.id def set_id(self, id): self.id = id def hasContent_(self): if ( self.compoundname is not None or self.title is not None or self.basecompoundref is not None or self.derivedcompoundref is not None or self.includes is not None or self.includedby is not None or self.incdepgraph is not None or self.invincdepgraph is not None or self.innerdir is not None or self.innerfile is not None or self.innerclass is not None or self.innernamespace is not None or self.innerpage is not None or self.innergroup is not None or self.templateparamlist is not None or self.sectiondef is not None or self.briefdescription is not None or self.detaileddescription is not None or self.inheritancegraph is not None or self.collaborationgraph is not None or self.programlisting is not None or self.location is not None or self.listofallmembers is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('kind'): self.kind = attrs.get('kind').value if attrs.get('prot'): self.prot = attrs.get('prot').value if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'compoundname': compoundname_ = '' for text__content_ in child_.childNodes: compoundname_ += text__content_.nodeValue self.compoundname = compoundname_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'title': obj_ = docTitleType.factory() obj_.build(child_) self.set_title(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'basecompoundref': obj_ = compoundRefType.factory() obj_.build(child_) self.basecompoundref.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'derivedcompoundref': obj_ = compoundRefType.factory() obj_.build(child_) self.derivedcompoundref.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'includes': obj_ = incType.factory() obj_.build(child_) self.includes.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'includedby': obj_ = incType.factory() obj_.build(child_) self.includedby.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'incdepgraph': obj_ = graphType.factory() obj_.build(child_) self.set_incdepgraph(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'invincdepgraph': obj_ = graphType.factory() obj_.build(child_) self.set_invincdepgraph(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'innerdir': obj_ = refType.factory(nodeName_) obj_.build(child_) self.innerdir.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'innerfile': obj_ = refType.factory(nodeName_) obj_.build(child_) self.innerfile.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'innerclass': obj_ = refType.factory(nodeName_) obj_.build(child_) self.innerclass.append(obj_) self.namespaces.append(obj_.content_[0].getValue()) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'innernamespace': obj_ = refType.factory(nodeName_) obj_.build(child_) self.innernamespace.append(obj_) self.namespaces.append(obj_.content_[0].getValue()) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'innerpage': obj_ = refType.factory(nodeName_) obj_.build(child_) self.innerpage.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'innergroup': obj_ = refType.factory(nodeName_) obj_.build(child_) self.innergroup.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'templateparamlist': obj_ = templateparamlistType.factory() obj_.build(child_) self.set_templateparamlist(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sectiondef': obj_ = sectiondefType.factory() obj_.build(child_) self.sectiondef.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'briefdescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_briefdescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'detaileddescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_detaileddescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'inheritancegraph': obj_ = graphType.factory() obj_.build(child_) self.set_inheritancegraph(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'collaborationgraph': obj_ = graphType.factory() obj_.build(child_) self.set_collaborationgraph(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'programlisting': obj_ = listingType.factory() obj_.build(child_) self.set_programlisting(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'location': obj_ = locationType.factory() obj_.build(child_) self.set_location(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'listofallmembers': obj_ = listofallmembersType.factory() obj_.build(child_) self.set_listofallmembers(obj_) # end class compounddefType class listofallmembersType(GeneratedsSuper): subclass = None superclass = None def __init__(self, member=None): if member is None: self.member = [] else: self.member = member def factory(*args_, **kwargs_): if listofallmembersType.subclass: return listofallmembersType.subclass(*args_, **kwargs_) else: return listofallmembersType(*args_, **kwargs_) factory = staticmethod(factory) def get_member(self): return self.member def set_member(self, member): self.member = member def add_member(self, value): self.member.append(value) def insert_member(self, index, value): self.member[index] = value def hasContent_(self): if ( self.member is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'member': obj_ = memberRefType.factory() obj_.build(child_) self.member.append(obj_) # end class listofallmembersType class memberRefType(GeneratedsSuper): subclass = None superclass = None def __init__(self, virt=None, prot=None, refid=None, ambiguityscope=None, scope=None, name=None): self.virt = virt self.prot = prot self.refid = refid self.ambiguityscope = ambiguityscope self.scope = scope self.name = name def factory(*args_, **kwargs_): if memberRefType.subclass: return memberRefType.subclass(*args_, **kwargs_) else: return memberRefType(*args_, **kwargs_) factory = staticmethod(factory) def get_scope(self): return self.scope def set_scope(self, scope): self.scope = scope def get_name(self): return self.name def set_name(self, name): self.name = name def get_virt(self): return self.virt def set_virt(self, virt): self.virt = virt def get_prot(self): return self.prot def set_prot(self, prot): self.prot = prot def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def get_ambiguityscope(self): return self.ambiguityscope def set_ambiguityscope(self, ambiguityscope): self.ambiguityscope = ambiguityscope def hasContent_(self): if ( self.scope is not None or self.name is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('virt'): self.virt = attrs.get('virt').value if attrs.get('prot'): self.prot = attrs.get('prot').value if attrs.get('refid'): self.refid = attrs.get('refid').value if attrs.get('ambiguityscope'): self.ambiguityscope = attrs.get('ambiguityscope').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'scope': scope_ = '' for text__content_ in child_.childNodes: scope_ += text__content_.nodeValue self.scope = scope_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ # end class memberRefType class scope(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if scope.subclass: return scope.subclass(*args_, **kwargs_) else: return scope(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class scope class name(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if name.subclass: return name.subclass(*args_, **kwargs_) else: return name(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class name class compoundRefType(GeneratedsSuper): subclass = None superclass = None def __init__(self, virt=None, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None): self.virt = virt self.prot = prot self.refid = refid if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if compoundRefType.subclass: return compoundRefType.subclass(*args_, **kwargs_) else: return compoundRefType(*args_, **kwargs_) factory = staticmethod(factory) def get_virt(self): return self.virt def set_virt(self, virt): self.virt = virt def get_prot(self): return self.prot def set_prot(self, prot): self.prot = prot def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('virt'): self.virt = attrs.get('virt').value if attrs.get('prot'): self.prot = attrs.get('prot').value if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class compoundRefType class reimplementType(GeneratedsSuper): subclass = None superclass = None def __init__(self, refid=None, valueOf_='', mixedclass_=None, content_=None): self.refid = refid if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if reimplementType.subclass: return reimplementType.subclass(*args_, **kwargs_) else: return reimplementType(*args_, **kwargs_) factory = staticmethod(factory) def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class reimplementType class incType(GeneratedsSuper): subclass = None superclass = None def __init__(self, local=None, refid=None, valueOf_='', mixedclass_=None, content_=None): self.local = local self.refid = refid if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if incType.subclass: return incType.subclass(*args_, **kwargs_) else: return incType(*args_, **kwargs_) factory = staticmethod(factory) def get_local(self): return self.local def set_local(self, local): self.local = local def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('local'): self.local = attrs.get('local').value if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class incType class refType(GeneratedsSuper): subclass = None superclass = None def __init__(self, prot=None, refid=None, valueOf_='', mixedclass_=None, content_=None): self.prot = prot self.refid = refid if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if refType.subclass: return refType.subclass(*args_, **kwargs_) else: return refType(*args_, **kwargs_) factory = staticmethod(factory) def get_prot(self): return self.prot def set_prot(self, prot): self.prot = prot def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('prot'): self.prot = attrs.get('prot').value if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class refType class refTextType(GeneratedsSuper): subclass = None superclass = None def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None): self.refid = refid self.kindref = kindref self.external = external if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if refTextType.subclass: return refTextType.subclass(*args_, **kwargs_) else: return refTextType(*args_, **kwargs_) factory = staticmethod(factory) def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def get_kindref(self): return self.kindref def set_kindref(self, kindref): self.kindref = kindref def get_external(self): return self.external def set_external(self, external): self.external = external def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('refid'): self.refid = attrs.get('refid').value if attrs.get('kindref'): self.kindref = attrs.get('kindref').value if attrs.get('external'): self.external = attrs.get('external').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class refTextType class sectiondefType(GeneratedsSuper): subclass = None superclass = None def __init__(self, kind=None, header=None, description=None, memberdef=None): self.kind = kind self.header = header self.description = description if memberdef is None: self.memberdef = [] else: self.memberdef = memberdef def factory(*args_, **kwargs_): if sectiondefType.subclass: return sectiondefType.subclass(*args_, **kwargs_) else: return sectiondefType(*args_, **kwargs_) factory = staticmethod(factory) def get_header(self): return self.header def set_header(self, header): self.header = header def get_description(self): return self.description def set_description(self, description): self.description = description def get_memberdef(self): return self.memberdef def set_memberdef(self, memberdef): self.memberdef = memberdef def add_memberdef(self, value): self.memberdef.append(value) def insert_memberdef(self, index, value): self.memberdef[index] = value def get_kind(self): return self.kind def set_kind(self, kind): self.kind = kind def hasContent_(self): if ( self.header is not None or self.description is not None or self.memberdef is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('kind'): self.kind = attrs.get('kind').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'header': header_ = '' for text__content_ in child_.childNodes: header_ += text__content_.nodeValue self.header = header_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'description': obj_ = descriptionType.factory() obj_.build(child_) self.set_description(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'memberdef': obj_ = memberdefType.factory() obj_.build(child_) self.memberdef.append(obj_) # end class sectiondefType class memberdefType(GeneratedsSuper): subclass = None superclass = None def __init__(self, initonly=None, kind=None, volatile=None, const=None, raisexx=None, virt=None, readable=None, prot=None, explicit=None, new=None, final=None, writable=None, add=None, static=None, remove=None, sealed=None, mutable=None, gettable=None, inline=None, settable=None, id=None, templateparamlist=None, type_=None, definition=None, argsstring=None, name=None, read=None, write=None, bitfield=None, reimplements=None, reimplementedby=None, param=None, enumvalue=None, initializer=None, exceptions=None, briefdescription=None, detaileddescription=None, inbodydescription=None, location=None, references=None, referencedby=None): self.initonly = initonly self.kind = kind self.volatile = volatile self.const = const self.raisexx = raisexx self.virt = virt self.readable = readable self.prot = prot self.explicit = explicit self.new = new self.final = final self.writable = writable self.add = add self.static = static self.remove = remove self.sealed = sealed self.mutable = mutable self.gettable = gettable self.inline = inline self.settable = settable self.id = id self.templateparamlist = templateparamlist self.type_ = type_ self.definition = definition self.argsstring = argsstring self.name = name self.read = read self.write = write self.bitfield = bitfield if reimplements is None: self.reimplements = [] else: self.reimplements = reimplements if reimplementedby is None: self.reimplementedby = [] else: self.reimplementedby = reimplementedby if param is None: self.param = [] else: self.param = param if enumvalue is None: self.enumvalue = [] else: self.enumvalue = enumvalue self.initializer = initializer self.exceptions = exceptions self.briefdescription = briefdescription self.detaileddescription = detaileddescription self.inbodydescription = inbodydescription self.location = location if references is None: self.references = [] else: self.references = references if referencedby is None: self.referencedby = [] else: self.referencedby = referencedby def factory(*args_, **kwargs_): if memberdefType.subclass: return memberdefType.subclass(*args_, **kwargs_) else: return memberdefType(*args_, **kwargs_) factory = staticmethod(factory) def get_templateparamlist(self): return self.templateparamlist def set_templateparamlist(self, templateparamlist): self.templateparamlist = templateparamlist def get_type(self): return self.type_ def set_type(self, type_): self.type_ = type_ def get_definition(self): return self.definition def set_definition(self, definition): self.definition = definition def get_argsstring(self): return self.argsstring def set_argsstring(self, argsstring): self.argsstring = argsstring def get_name(self): return self.name def set_name(self, name): self.name = name def get_read(self): return self.read def set_read(self, read): self.read = read def get_write(self): return self.write def set_write(self, write): self.write = write def get_bitfield(self): return self.bitfield def set_bitfield(self, bitfield): self.bitfield = bitfield def get_reimplements(self): return self.reimplements def set_reimplements(self, reimplements): self.reimplements = reimplements def add_reimplements(self, value): self.reimplements.append(value) def insert_reimplements(self, index, value): self.reimplements[index] = value def get_reimplementedby(self): return self.reimplementedby def set_reimplementedby(self, reimplementedby): self.reimplementedby = reimplementedby def add_reimplementedby(self, value): self.reimplementedby.append(value) def insert_reimplementedby(self, index, value): self.reimplementedby[index] = value def get_param(self): return self.param def set_param(self, param): self.param = param def add_param(self, value): self.param.append(value) def insert_param(self, index, value): self.param[index] = value def get_enumvalue(self): return self.enumvalue def set_enumvalue(self, enumvalue): self.enumvalue = enumvalue def add_enumvalue(self, value): self.enumvalue.append(value) def insert_enumvalue(self, index, value): self.enumvalue[index] = value def get_initializer(self): return self.initializer def set_initializer(self, initializer): self.initializer = initializer def get_exceptions(self): return self.exceptions def set_exceptions(self, exceptions): self.exceptions = exceptions def get_briefdescription(self): return self.briefdescription def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription def get_detaileddescription(self): return self.detaileddescription def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription def get_inbodydescription(self): return self.inbodydescription def set_inbodydescription(self, inbodydescription): self.inbodydescription = inbodydescription def get_location(self): return self.location def set_location(self, location): self.location = location def get_references(self): return self.references def set_references(self, references): self.references = references def add_references(self, value): self.references.append(value) def insert_references(self, index, value): self.references[index] = value def get_referencedby(self): return self.referencedby def set_referencedby(self, referencedby): self.referencedby = referencedby def add_referencedby(self, value): self.referencedby.append(value) def insert_referencedby(self, index, value): self.referencedby[index] = value def get_initonly(self): return self.initonly def set_initonly(self, initonly): self.initonly = initonly def get_kind(self): return self.kind def set_kind(self, kind): self.kind = kind def get_volatile(self): return self.volatile def set_volatile(self, volatile): self.volatile = volatile def get_const(self): return self.const def set_const(self, const): self.const = const def get_raise(self): return self.raisexx def set_raise(self, raisexx): self.raisexx = raisexx def get_virt(self): return self.virt def set_virt(self, virt): self.virt = virt def get_readable(self): return self.readable def set_readable(self, readable): self.readable = readable def get_prot(self): return self.prot def set_prot(self, prot): self.prot = prot def get_explicit(self): return self.explicit def set_explicit(self, explicit): self.explicit = explicit def get_new(self): return self.new def set_new(self, new): self.new = new def get_final(self): return self.final def set_final(self, final): self.final = final def get_writable(self): return self.writable def set_writable(self, writable): self.writable = writable def get_add(self): return self.add def set_add(self, add): self.add = add def get_static(self): return self.static def set_static(self, static): self.static = static def get_remove(self): return self.remove def set_remove(self, remove): self.remove = remove def get_sealed(self): return self.sealed def set_sealed(self, sealed): self.sealed = sealed def get_mutable(self): return self.mutable def set_mutable(self, mutable): self.mutable = mutable def get_gettable(self): return self.gettable def set_gettable(self, gettable): self.gettable = gettable def get_inline(self): return self.inline def set_inline(self, inline): self.inline = inline def get_settable(self): return self.settable def set_settable(self, settable): self.settable = settable def get_id(self): return self.id def set_id(self, id): self.id = id def hasContent_(self): if ( self.templateparamlist is not None or self.type_ is not None or self.definition is not None or self.argsstring is not None or self.name is not None or self.read is not None or self.write is not None or self.bitfield is not None or self.reimplements is not None or self.reimplementedby is not None or self.param is not None or self.enumvalue is not None or self.initializer is not None or self.exceptions is not None or self.briefdescription is not None or self.detaileddescription is not None or self.inbodydescription is not None or self.location is not None or self.references is not None or self.referencedby is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('initonly'): self.initonly = attrs.get('initonly').value if attrs.get('kind'): self.kind = attrs.get('kind').value if attrs.get('volatile'): self.volatile = attrs.get('volatile').value if attrs.get('const'): self.const = attrs.get('const').value if attrs.get('raise'): self.raisexx = attrs.get('raise').value if attrs.get('virt'): self.virt = attrs.get('virt').value if attrs.get('readable'): self.readable = attrs.get('readable').value if attrs.get('prot'): self.prot = attrs.get('prot').value if attrs.get('explicit'): self.explicit = attrs.get('explicit').value if attrs.get('new'): self.new = attrs.get('new').value if attrs.get('final'): self.final = attrs.get('final').value if attrs.get('writable'): self.writable = attrs.get('writable').value if attrs.get('add'): self.add = attrs.get('add').value if attrs.get('static'): self.static = attrs.get('static').value if attrs.get('remove'): self.remove = attrs.get('remove').value if attrs.get('sealed'): self.sealed = attrs.get('sealed').value if attrs.get('mutable'): self.mutable = attrs.get('mutable').value if attrs.get('gettable'): self.gettable = attrs.get('gettable').value if attrs.get('inline'): self.inline = attrs.get('inline').value if attrs.get('settable'): self.settable = attrs.get('settable').value if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'templateparamlist': obj_ = templateparamlistType.factory() obj_.build(child_) self.set_templateparamlist(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': obj_ = linkedTextType.factory() obj_.build(child_) self.set_type(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'definition': definition_ = '' for text__content_ in child_.childNodes: definition_ += text__content_.nodeValue self.definition = definition_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'argsstring': argsstring_ = '' for text__content_ in child_.childNodes: argsstring_ += text__content_.nodeValue self.argsstring = argsstring_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'read': read_ = '' for text__content_ in child_.childNodes: read_ += text__content_.nodeValue self.read = read_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'write': write_ = '' for text__content_ in child_.childNodes: write_ += text__content_.nodeValue self.write = write_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'bitfield': bitfield_ = '' for text__content_ in child_.childNodes: bitfield_ += text__content_.nodeValue self.bitfield = bitfield_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reimplements': obj_ = reimplementType.factory() obj_.build(child_) self.reimplements.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'reimplementedby': obj_ = reimplementType.factory() obj_.build(child_) self.reimplementedby.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'param': obj_ = paramType.factory() obj_.build(child_) self.param.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'enumvalue': obj_ = enumvalueType.factory() obj_.build(child_) self.enumvalue.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'initializer': obj_ = linkedTextType.factory() obj_.build(child_) self.set_initializer(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'exceptions': obj_ = linkedTextType.factory() obj_.build(child_) self.set_exceptions(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'briefdescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_briefdescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'detaileddescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_detaileddescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'inbodydescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_inbodydescription(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'location': obj_ = locationType.factory() obj_.build(child_) self.set_location(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'references': obj_ = referenceType.factory() obj_.build(child_) self.references.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'referencedby': obj_ = referenceType.factory() obj_.build(child_) self.referencedby.append(obj_) # end class memberdefType class definition(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if definition.subclass: return definition.subclass(*args_, **kwargs_) else: return definition(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class definition class argsstring(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if argsstring.subclass: return argsstring.subclass(*args_, **kwargs_) else: return argsstring(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='argsstring', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='argsstring') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class argsstring class read(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if read.subclass: return read.subclass(*args_, **kwargs_) else: return read(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class read class write(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if write.subclass: return write.subclass(*args_, **kwargs_) else: return write(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class write class bitfield(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if bitfield.subclass: return bitfield.subclass(*args_, **kwargs_) else: return bitfield(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class bitfield class descriptionType(GeneratedsSuper): subclass = None superclass = None def __init__(self, title=None, para=None, sect1=None, internal=None, mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if descriptionType.subclass: return descriptionType.subclass(*args_, **kwargs_) else: return descriptionType(*args_, **kwargs_) factory = staticmethod(factory) def get_title(self): return self.title def set_title(self, title): self.title = title def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect1(self): return self.sect1 def set_sect1(self, sect1): self.sect1 = sect1 def add_sect1(self, value): self.sect1.append(value) def insert_sect1(self, index, value): self.sect1[index] = value def get_internal(self): return self.internal def set_internal(self, internal): self.internal = internal def hasContent_(self): if ( self.title is not None or self.para is not None or self.sect1 is not None or self.internal is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'title': childobj_ = docTitleType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'title', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect1': childobj_ = docSect1Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect1', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'internal': childobj_ = docInternalType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'internal', childobj_) self.content_.append(obj_) # end class descriptionType class enumvalueType(GeneratedsSuper): subclass = None superclass = None def __init__(self, prot=None, id=None, name=None, initializer=None, briefdescription=None, detaileddescription=None, mixedclass_=None, content_=None): self.prot = prot self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if enumvalueType.subclass: return enumvalueType.subclass(*args_, **kwargs_) else: return enumvalueType(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_initializer(self): return self.initializer def set_initializer(self, initializer): self.initializer = initializer def get_briefdescription(self): return self.briefdescription def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription def get_detaileddescription(self): return self.detaileddescription def set_detaileddescription(self, detaileddescription): self.detaileddescription = detaileddescription def get_prot(self): return self.prot def set_prot(self, prot): self.prot = prot def get_id(self): return self.id def set_id(self, id): self.id = id def hasContent_(self): if ( self.name is not None or self.initializer is not None or self.briefdescription is not None or self.detaileddescription is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('prot'): self.prot = attrs.get('prot').value if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': value_ = [] for text_ in child_.childNodes: value_.append(text_.nodeValue) valuestr_ = ''.join(value_) obj_ = self.mixedclass_(MixedContainer.CategorySimple, MixedContainer.TypeString, 'name', valuestr_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'initializer': childobj_ = linkedTextType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'initializer', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'briefdescription': childobj_ = descriptionType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'briefdescription', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'detaileddescription': childobj_ = descriptionType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'detaileddescription', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class enumvalueType class templateparamlistType(GeneratedsSuper): subclass = None superclass = None def __init__(self, param=None): if param is None: self.param = [] else: self.param = param def factory(*args_, **kwargs_): if templateparamlistType.subclass: return templateparamlistType.subclass(*args_, **kwargs_) else: return templateparamlistType(*args_, **kwargs_) factory = staticmethod(factory) def get_param(self): return self.param def set_param(self, param): self.param = param def add_param(self, value): self.param.append(value) def insert_param(self, index, value): self.param[index] = value def hasContent_(self): if ( self.param is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'param': obj_ = paramType.factory() obj_.build(child_) self.param.append(obj_) # end class templateparamlistType class paramType(GeneratedsSuper): subclass = None superclass = None def __init__(self, type_=None, declname=None, defname=None, array=None, defval=None, briefdescription=None): self.type_ = type_ self.declname = declname self.defname = defname self.array = array self.defval = defval self.briefdescription = briefdescription def factory(*args_, **kwargs_): if paramType.subclass: return paramType.subclass(*args_, **kwargs_) else: return paramType(*args_, **kwargs_) factory = staticmethod(factory) def get_type(self): return self.type_ def set_type(self, type_): self.type_ = type_ def get_declname(self): return self.declname def set_declname(self, declname): self.declname = declname def get_defname(self): return self.defname def set_defname(self, defname): self.defname = defname def get_array(self): return self.array def set_array(self, array): self.array = array def get_defval(self): return self.defval def set_defval(self, defval): self.defval = defval def get_briefdescription(self): return self.briefdescription def set_briefdescription(self, briefdescription): self.briefdescription = briefdescription def hasContent_(self): if ( self.type_ is not None or self.declname is not None or self.defname is not None or self.array is not None or self.defval is not None or self.briefdescription is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'type': obj_ = linkedTextType.factory() obj_.build(child_) self.set_type(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'declname': declname_ = '' for text__content_ in child_.childNodes: declname_ += text__content_.nodeValue self.declname = declname_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'defname': defname_ = '' for text__content_ in child_.childNodes: defname_ += text__content_.nodeValue self.defname = defname_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'array': array_ = '' for text__content_ in child_.childNodes: array_ += text__content_.nodeValue self.array = array_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'defval': obj_ = linkedTextType.factory() obj_.build(child_) self.set_defval(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'briefdescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_briefdescription(obj_) # end class paramType class declname(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if declname.subclass: return declname.subclass(*args_, **kwargs_) else: return declname(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class declname class defname(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if defname.subclass: return defname.subclass(*args_, **kwargs_) else: return defname(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class defname class array(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if array.subclass: return array.subclass(*args_, **kwargs_) else: return array(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class array class linkedTextType(GeneratedsSuper): subclass = None superclass = None def __init__(self, ref=None, mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if linkedTextType.subclass: return linkedTextType.subclass(*args_, **kwargs_) else: return linkedTextType(*args_, **kwargs_) factory = staticmethod(factory) def get_ref(self): return self.ref def set_ref(self, ref): self.ref = ref def add_ref(self, value): self.ref.append(value) def insert_ref(self, index, value): self.ref[index] = value def hasContent_(self): if ( self.ref is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ref': childobj_ = docRefTextType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'ref', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class linkedTextType class graphType(GeneratedsSuper): subclass = None superclass = None def __init__(self, node=None): if node is None: self.node = [] else: self.node = node def factory(*args_, **kwargs_): if graphType.subclass: return graphType.subclass(*args_, **kwargs_) else: return graphType(*args_, **kwargs_) factory = staticmethod(factory) def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def hasContent_(self): if ( self.node is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'node': obj_ = nodeType.factory() obj_.build(child_) self.node.append(obj_) # end class graphType class nodeType(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, label=None, link=None, childnode=None): self.id = id self.label = label self.link = link if childnode is None: self.childnode = [] else: self.childnode = childnode def factory(*args_, **kwargs_): if nodeType.subclass: return nodeType.subclass(*args_, **kwargs_) else: return nodeType(*args_, **kwargs_) factory = staticmethod(factory) def get_label(self): return self.label def set_label(self, label): self.label = label def get_link(self): return self.link def set_link(self, link): self.link = link def get_childnode(self): return self.childnode def set_childnode(self, childnode): self.childnode = childnode def add_childnode(self, value): self.childnode.append(value) def insert_childnode(self, index, value): self.childnode[index] = value def get_id(self): return self.id def set_id(self, id): self.id = id def hasContent_(self): if ( self.label is not None or self.link is not None or self.childnode is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'label': label_ = '' for text__content_ in child_.childNodes: label_ += text__content_.nodeValue self.label = label_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'link': obj_ = linkType.factory() obj_.build(child_) self.set_link(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'childnode': obj_ = childnodeType.factory() obj_.build(child_) self.childnode.append(obj_) # end class nodeType class label(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if label.subclass: return label.subclass(*args_, **kwargs_) else: return label(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class label class childnodeType(GeneratedsSuper): subclass = None superclass = None def __init__(self, relation=None, refid=None, edgelabel=None): self.relation = relation self.refid = refid if edgelabel is None: self.edgelabel = [] else: self.edgelabel = edgelabel def factory(*args_, **kwargs_): if childnodeType.subclass: return childnodeType.subclass(*args_, **kwargs_) else: return childnodeType(*args_, **kwargs_) factory = staticmethod(factory) def get_edgelabel(self): return self.edgelabel def set_edgelabel(self, edgelabel): self.edgelabel = edgelabel def add_edgelabel(self, value): self.edgelabel.append(value) def insert_edgelabel(self, index, value): self.edgelabel[index] = value def get_relation(self): return self.relation def set_relation(self, relation): self.relation = relation def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def export(self, outfile, level, namespace_='', name_='childnodeType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='childnodeType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='childnodeType'): if self.relation is not None: outfile.write(' relation=%s' % (quote_attrib(self.relation), )) if self.refid is not None: outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) def exportChildren(self, outfile, level, namespace_='', name_='childnodeType'): for edgelabel_ in self.edgelabel: showIndent(outfile, level) outfile.write('<%sedgelabel>%s\n' % (namespace_, self.format_string(quote_xml(edgelabel_).encode(ExternalEncoding), input_name='edgelabel'), namespace_)) def hasContent_(self): if ( self.edgelabel is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('relation'): self.relation = attrs.get('relation').value if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'edgelabel': edgelabel_ = '' for text__content_ in child_.childNodes: edgelabel_ += text__content_.nodeValue self.edgelabel.append(edgelabel_) # end class childnodeType class edgelabel(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if edgelabel.subclass: return edgelabel.subclass(*args_, **kwargs_) else: return edgelabel(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='edgelabel', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='edgelabel') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='edgelabel'): pass def exportChildren(self, outfile, level, namespace_='', name_='edgelabel'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class edgelabel class linkType(GeneratedsSuper): subclass = None superclass = None def __init__(self, refid=None, external=None, valueOf_=''): self.refid = refid self.external = external self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if linkType.subclass: return linkType.subclass(*args_, **kwargs_) else: return linkType(*args_, **kwargs_) factory = staticmethod(factory) def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def get_external(self): return self.external def set_external(self, external): self.external = external def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='linkType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='linkType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='linkType'): if self.refid is not None: outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) if self.external is not None: outfile.write(' external=%s' % (self.format_string(quote_attrib(self.external).encode(ExternalEncoding), input_name='external'), )) def exportChildren(self, outfile, level, namespace_='', name_='linkType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('refid'): self.refid = attrs.get('refid').value if attrs.get('external'): self.external = attrs.get('external').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class linkType class listingType(GeneratedsSuper): subclass = None superclass = None def __init__(self, codeline=None): if codeline is None: self.codeline = [] else: self.codeline = codeline def factory(*args_, **kwargs_): if listingType.subclass: return listingType.subclass(*args_, **kwargs_) else: return listingType(*args_, **kwargs_) factory = staticmethod(factory) def get_codeline(self): return self.codeline def set_codeline(self, codeline): self.codeline = codeline def add_codeline(self, value): self.codeline.append(value) def insert_codeline(self, index, value): self.codeline[index] = value def export(self, outfile, level, namespace_='', name_='listingType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='listingType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='listingType'): pass def exportChildren(self, outfile, level, namespace_='', name_='listingType'): for codeline_ in self.codeline: codeline_.export(outfile, level, namespace_, name_='codeline') def hasContent_(self): if ( self.codeline is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'codeline': obj_ = codelineType.factory() obj_.build(child_) self.codeline.append(obj_) # end class listingType class codelineType(GeneratedsSuper): subclass = None superclass = None def __init__(self, external=None, lineno=None, refkind=None, refid=None, highlight=None): self.external = external self.lineno = lineno self.refkind = refkind self.refid = refid if highlight is None: self.highlight = [] else: self.highlight = highlight def factory(*args_, **kwargs_): if codelineType.subclass: return codelineType.subclass(*args_, **kwargs_) else: return codelineType(*args_, **kwargs_) factory = staticmethod(factory) def get_highlight(self): return self.highlight def set_highlight(self, highlight): self.highlight = highlight def add_highlight(self, value): self.highlight.append(value) def insert_highlight(self, index, value): self.highlight[index] = value def get_external(self): return self.external def set_external(self, external): self.external = external def get_lineno(self): return self.lineno def set_lineno(self, lineno): self.lineno = lineno def get_refkind(self): return self.refkind def set_refkind(self, refkind): self.refkind = refkind def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def export(self, outfile, level, namespace_='', name_='codelineType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='codelineType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='codelineType'): if self.external is not None: outfile.write(' external=%s' % (quote_attrib(self.external), )) if self.lineno is not None: outfile.write(' lineno="%s"' % self.format_integer(self.lineno, input_name='lineno')) if self.refkind is not None: outfile.write(' refkind=%s' % (quote_attrib(self.refkind), )) if self.refid is not None: outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) def exportChildren(self, outfile, level, namespace_='', name_='codelineType'): for highlight_ in self.highlight: highlight_.export(outfile, level, namespace_, name_='highlight') def hasContent_(self): if ( self.highlight is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('external'): self.external = attrs.get('external').value if attrs.get('lineno'): try: self.lineno = int(attrs.get('lineno').value) except ValueError as exp: raise ValueError('Bad integer attribute (lineno): %s' % exp) if attrs.get('refkind'): self.refkind = attrs.get('refkind').value if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'highlight': obj_ = highlightType.factory() obj_.build(child_) self.highlight.append(obj_) # end class codelineType class highlightType(GeneratedsSuper): subclass = None superclass = None def __init__(self, classxx=None, sp=None, ref=None, mixedclass_=None, content_=None): self.classxx = classxx if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if highlightType.subclass: return highlightType.subclass(*args_, **kwargs_) else: return highlightType(*args_, **kwargs_) factory = staticmethod(factory) def get_sp(self): return self.sp def set_sp(self, sp): self.sp = sp def add_sp(self, value): self.sp.append(value) def insert_sp(self, index, value): self.sp[index] = value def get_ref(self): return self.ref def set_ref(self, ref): self.ref = ref def add_ref(self, value): self.ref.append(value) def insert_ref(self, index, value): self.ref[index] = value def get_class(self): return self.classxx def set_class(self, classxx): self.classxx = classxx def export(self, outfile, level, namespace_='', name_='highlightType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='highlightType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='highlightType'): if self.classxx is not None: outfile.write(' class=%s' % (quote_attrib(self.classxx), )) def exportChildren(self, outfile, level, namespace_='', name_='highlightType'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.sp is not None or self.ref is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('class'): self.classxx = attrs.get('class').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sp': value_ = [] for text_ in child_.childNodes: value_.append(text_.nodeValue) # We make this unicode so that our unicode renderer catch-all picks it up # otherwise it would go through as 'str' and we'd have to pick it up too valuestr_ = u' ' obj_ = self.mixedclass_(MixedContainer.CategorySimple, MixedContainer.TypeString, 'sp', valuestr_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ref': childobj_ = docRefTextType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'ref', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class highlightType class sp(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if sp.subclass: return sp.subclass(*args_, **kwargs_) else: return sp(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='sp', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='sp') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='sp'): pass def exportChildren(self, outfile, level, namespace_='', name_='sp'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class sp class referenceType(GeneratedsSuper): subclass = None superclass = None def __init__(self, endline=None, startline=None, refid=None, compoundref=None, valueOf_='', mixedclass_=None, content_=None): self.endline = endline self.startline = startline self.refid = refid self.compoundref = compoundref if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if referenceType.subclass: return referenceType.subclass(*args_, **kwargs_) else: return referenceType(*args_, **kwargs_) factory = staticmethod(factory) def get_endline(self): return self.endline def set_endline(self, endline): self.endline = endline def get_startline(self): return self.startline def set_startline(self, startline): self.startline = startline def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def get_compoundref(self): return self.compoundref def set_compoundref(self, compoundref): self.compoundref = compoundref def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='referenceType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='referenceType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='referenceType'): if self.endline is not None: outfile.write(' endline="%s"' % self.format_integer(self.endline, input_name='endline')) if self.startline is not None: outfile.write(' startline="%s"' % self.format_integer(self.startline, input_name='startline')) if self.refid is not None: outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) if self.compoundref is not None: outfile.write(' compoundref=%s' % (self.format_string(quote_attrib(self.compoundref).encode(ExternalEncoding), input_name='compoundref'), )) def exportChildren(self, outfile, level, namespace_='', name_='referenceType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('endline'): try: self.endline = int(attrs.get('endline').value) except ValueError as exp: raise ValueError('Bad integer attribute (endline): %s' % exp) if attrs.get('startline'): try: self.startline = int(attrs.get('startline').value) except ValueError as exp: raise ValueError('Bad integer attribute (startline): %s' % exp) if attrs.get('refid'): self.refid = attrs.get('refid').value if attrs.get('compoundref'): self.compoundref = attrs.get('compoundref').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class referenceType class locationType(GeneratedsSuper): subclass = None superclass = None def __init__(self, bodystart=None, line=None, bodyend=None, bodyfile=None, file=None, valueOf_=''): self.bodystart = bodystart self.line = line self.bodyend = bodyend self.bodyfile = bodyfile self.file = file self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if locationType.subclass: return locationType.subclass(*args_, **kwargs_) else: return locationType(*args_, **kwargs_) factory = staticmethod(factory) def get_bodystart(self): return self.bodystart def set_bodystart(self, bodystart): self.bodystart = bodystart def get_line(self): return self.line def set_line(self, line): self.line = line def get_bodyend(self): return self.bodyend def set_bodyend(self, bodyend): self.bodyend = bodyend def get_bodyfile(self): return self.bodyfile def set_bodyfile(self, bodyfile): self.bodyfile = bodyfile def get_file(self): return self.file def set_file(self, file): self.file = file def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='locationType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='locationType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='locationType'): if self.bodystart is not None: outfile.write(' bodystart="%s"' % self.format_integer(self.bodystart, input_name='bodystart')) if self.line is not None: outfile.write(' line="%s"' % self.format_integer(self.line, input_name='line')) if self.bodyend is not None: outfile.write(' bodyend="%s"' % self.format_integer(self.bodyend, input_name='bodyend')) if self.bodyfile is not None: outfile.write(' bodyfile=%s' % (self.format_string(quote_attrib(self.bodyfile).encode(ExternalEncoding), input_name='bodyfile'), )) if self.file is not None: outfile.write(' file=%s' % (self.format_string(quote_attrib(self.file).encode(ExternalEncoding), input_name='file'), )) def exportChildren(self, outfile, level, namespace_='', name_='locationType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('bodystart'): try: self.bodystart = int(attrs.get('bodystart').value) except ValueError as exp: raise ValueError('Bad integer attribute (bodystart): %s' % exp) if attrs.get('line'): try: self.line = int(attrs.get('line').value) except ValueError as exp: raise ValueError('Bad integer attribute (line): %s' % exp) if attrs.get('bodyend'): try: self.bodyend = int(attrs.get('bodyend').value) except ValueError as exp: raise ValueError('Bad integer attribute (bodyend): %s' % exp) if attrs.get('bodyfile'): self.bodyfile = attrs.get('bodyfile').value if attrs.get('file'): self.file = attrs.get('file').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class locationType class docSect1Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, title=None, para=None, sect2=None, internal=None, mixedclass_=None, content_=None): self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docSect1Type.subclass: return docSect1Type.subclass(*args_, **kwargs_) else: return docSect1Type(*args_, **kwargs_) factory = staticmethod(factory) def get_title(self): return self.title def set_title(self, title): self.title = title def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect2(self): return self.sect2 def set_sect2(self, sect2): self.sect2 = sect2 def add_sect2(self, value): self.sect2.append(value) def insert_sect2(self, index, value): self.sect2[index] = value def get_internal(self): return self.internal def set_internal(self, internal): self.internal = internal def get_id(self): return self.id def set_id(self, id): self.id = id def export(self, outfile, level, namespace_='', name_='docSect1Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docSect1Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docSect1Type'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docSect1Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.title is not None or self.para is not None or self.sect2 is not None or self.internal is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'title': childobj_ = docTitleType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'title', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect2': childobj_ = docSect2Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect2', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'internal': childobj_ = docInternalS1Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'internal', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docSect1Type class docSect2Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, title=None, para=None, sect3=None, internal=None, mixedclass_=None, content_=None): self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docSect2Type.subclass: return docSect2Type.subclass(*args_, **kwargs_) else: return docSect2Type(*args_, **kwargs_) factory = staticmethod(factory) def get_title(self): return self.title def set_title(self, title): self.title = title def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect3(self): return self.sect3 def set_sect3(self, sect3): self.sect3 = sect3 def add_sect3(self, value): self.sect3.append(value) def insert_sect3(self, index, value): self.sect3[index] = value def get_internal(self): return self.internal def set_internal(self, internal): self.internal = internal def get_id(self): return self.id def set_id(self, id): self.id = id def export(self, outfile, level, namespace_='', name_='docSect2Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docSect2Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docSect2Type'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docSect2Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.title is not None or self.para is not None or self.sect3 is not None or self.internal is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'title': childobj_ = docTitleType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'title', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect3': childobj_ = docSect3Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect3', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'internal': childobj_ = docInternalS2Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'internal', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docSect2Type class docSect3Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, title=None, para=None, sect4=None, internal=None, mixedclass_=None, content_=None): self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docSect3Type.subclass: return docSect3Type.subclass(*args_, **kwargs_) else: return docSect3Type(*args_, **kwargs_) factory = staticmethod(factory) def get_title(self): return self.title def set_title(self, title): self.title = title def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect4(self): return self.sect4 def set_sect4(self, sect4): self.sect4 = sect4 def add_sect4(self, value): self.sect4.append(value) def insert_sect4(self, index, value): self.sect4[index] = value def get_internal(self): return self.internal def set_internal(self, internal): self.internal = internal def get_id(self): return self.id def set_id(self, id): self.id = id def export(self, outfile, level, namespace_='', name_='docSect3Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docSect3Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docSect3Type'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docSect3Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.title is not None or self.para is not None or self.sect4 is not None or self.internal is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'title': childobj_ = docTitleType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'title', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect4': childobj_ = docSect4Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect4', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'internal': childobj_ = docInternalS3Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'internal', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docSect3Type class docSect4Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, title=None, para=None, internal=None, mixedclass_=None, content_=None): self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docSect4Type.subclass: return docSect4Type.subclass(*args_, **kwargs_) else: return docSect4Type(*args_, **kwargs_) factory = staticmethod(factory) def get_title(self): return self.title def set_title(self, title): self.title = title def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_internal(self): return self.internal def set_internal(self, internal): self.internal = internal def get_id(self): return self.id def set_id(self, id): self.id = id def export(self, outfile, level, namespace_='', name_='docSect4Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docSect4Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docSect4Type'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docSect4Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.title is not None or self.para is not None or self.internal is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'title': childobj_ = docTitleType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'title', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'internal': childobj_ = docInternalS4Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'internal', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docSect4Type class docInternalType(GeneratedsSuper): subclass = None superclass = None def __init__(self, para=None, sect1=None, mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docInternalType.subclass: return docInternalType.subclass(*args_, **kwargs_) else: return docInternalType(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect1(self): return self.sect1 def set_sect1(self, sect1): self.sect1 = sect1 def add_sect1(self, value): self.sect1.append(value) def insert_sect1(self, index, value): self.sect1[index] = value def export(self, outfile, level, namespace_='', name_='docInternalType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docInternalType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docInternalType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docInternalType'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.para is not None or self.sect1 is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect1': childobj_ = docSect1Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect1', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docInternalType class docInternalS1Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, para=None, sect2=None, mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docInternalS1Type.subclass: return docInternalS1Type.subclass(*args_, **kwargs_) else: return docInternalS1Type(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect2(self): return self.sect2 def set_sect2(self, sect2): self.sect2 = sect2 def add_sect2(self, value): self.sect2.append(value) def insert_sect2(self, index, value): self.sect2[index] = value def export(self, outfile, level, namespace_='', name_='docInternalS1Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docInternalS1Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS1Type'): pass def exportChildren(self, outfile, level, namespace_='', name_='docInternalS1Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.para is not None or self.sect2 is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect2': childobj_ = docSect2Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect2', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docInternalS1Type class docInternalS2Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docInternalS2Type.subclass: return docInternalS2Type.subclass(*args_, **kwargs_) else: return docInternalS2Type(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect3(self): return self.sect3 def set_sect3(self, sect3): self.sect3 = sect3 def add_sect3(self, value): self.sect3.append(value) def insert_sect3(self, index, value): self.sect3[index] = value def export(self, outfile, level, namespace_='', name_='docInternalS2Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docInternalS2Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS2Type'): pass def exportChildren(self, outfile, level, namespace_='', name_='docInternalS2Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.para is not None or self.sect3 is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect3': childobj_ = docSect3Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect3', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docInternalS2Type class docInternalS3Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, para=None, sect3=None, mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docInternalS3Type.subclass: return docInternalS3Type.subclass(*args_, **kwargs_) else: return docInternalS3Type(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect3(self): return self.sect3 def set_sect3(self, sect3): self.sect3 = sect3 def add_sect3(self, value): self.sect3.append(value) def insert_sect3(self, index, value): self.sect3[index] = value def export(self, outfile, level, namespace_='', name_='docInternalS3Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docInternalS3Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS3Type'): pass def exportChildren(self, outfile, level, namespace_='', name_='docInternalS3Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.para is not None or self.sect3 is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect3': childobj_ = docSect4Type.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'sect3', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docInternalS3Type class docInternalS4Type(GeneratedsSuper): subclass = None superclass = None def __init__(self, para=None, mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docInternalS4Type.subclass: return docInternalS4Type.subclass(*args_, **kwargs_) else: return docInternalS4Type(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def export(self, outfile, level, namespace_='', name_='docInternalS4Type', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docInternalS4Type') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docInternalS4Type'): pass def exportChildren(self, outfile, level, namespace_='', name_='docInternalS4Type'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.para is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': childobj_ = docParaType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'para', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docInternalS4Type class docTitleType(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docTitleType.subclass: return docTitleType.subclass(*args_, **kwargs_) else: return docTitleType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docTitleType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docTitleType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docTitleType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docTitleType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docTitleType class docParaType(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docParaType.subclass: return docParaType.subclass(*args_, **kwargs_) else: return docParaType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docParaType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docParaType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docParaType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docParaType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docParaType class docMarkupType(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docMarkupType.subclass: return docMarkupType.subclass(*args_, **kwargs_) else: return docMarkupType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docMarkupType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docMarkupType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docMarkupType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docMarkupType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docMarkupType class docURLLink(GeneratedsSuper): subclass = None superclass = None def __init__(self, url=None, valueOf_='', mixedclass_=None, content_=None): self.url = url if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docURLLink.subclass: return docURLLink.subclass(*args_, **kwargs_) else: return docURLLink(*args_, **kwargs_) factory = staticmethod(factory) def get_url(self): return self.url def set_url(self, url): self.url = url def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docURLLink', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docURLLink') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docURLLink'): if self.url is not None: outfile.write(' url=%s' % (self.format_string(quote_attrib(self.url).encode(ExternalEncoding), input_name='url'), )) def exportChildren(self, outfile, level, namespace_='', name_='docURLLink'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('url'): self.url = attrs.get('url').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docURLLink class docAnchorType(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docAnchorType.subclass: return docAnchorType.subclass(*args_, **kwargs_) else: return docAnchorType(*args_, **kwargs_) factory = staticmethod(factory) def get_id(self): return self.id def set_id(self, id): self.id = id def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docAnchorType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docAnchorType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docAnchorType'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docAnchorType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docAnchorType class docFormulaType(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docFormulaType.subclass: return docFormulaType.subclass(*args_, **kwargs_) else: return docFormulaType(*args_, **kwargs_) factory = staticmethod(factory) def get_id(self): return self.id def set_id(self, id): self.id = id def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docFormulaType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docFormulaType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docFormulaType'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docFormulaType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docFormulaType class docIndexEntryType(GeneratedsSuper): subclass = None superclass = None def __init__(self, primaryie=None, secondaryie=None): self.primaryie = primaryie self.secondaryie = secondaryie def factory(*args_, **kwargs_): if docIndexEntryType.subclass: return docIndexEntryType.subclass(*args_, **kwargs_) else: return docIndexEntryType(*args_, **kwargs_) factory = staticmethod(factory) def get_primaryie(self): return self.primaryie def set_primaryie(self, primaryie): self.primaryie = primaryie def get_secondaryie(self): return self.secondaryie def set_secondaryie(self, secondaryie): self.secondaryie = secondaryie def export(self, outfile, level, namespace_='', name_='docIndexEntryType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docIndexEntryType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docIndexEntryType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docIndexEntryType'): if self.primaryie is not None: showIndent(outfile, level) outfile.write('<%sprimaryie>%s\n' % (namespace_, self.format_string(quote_xml(self.primaryie).encode(ExternalEncoding), input_name='primaryie'), namespace_)) if self.secondaryie is not None: showIndent(outfile, level) outfile.write('<%ssecondaryie>%s\n' % (namespace_, self.format_string(quote_xml(self.secondaryie).encode(ExternalEncoding), input_name='secondaryie'), namespace_)) def hasContent_(self): if ( self.primaryie is not None or self.secondaryie is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'primaryie': primaryie_ = '' for text__content_ in child_.childNodes: primaryie_ += text__content_.nodeValue self.primaryie = primaryie_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'secondaryie': secondaryie_ = '' for text__content_ in child_.childNodes: secondaryie_ += text__content_.nodeValue self.secondaryie = secondaryie_ # end class docIndexEntryType class docListType(GeneratedsSuper): subclass = None superclass = None def __init__(self, listitem=None): if listitem is None: self.listitem = [] else: self.listitem = listitem def factory(*args_, **kwargs_): if docListType.subclass: return docListType.subclass(*args_, **kwargs_) else: return docListType(*args_, **kwargs_) factory = staticmethod(factory) def get_listitem(self): return self.listitem def set_listitem(self, listitem): self.listitem = listitem def add_listitem(self, value): self.listitem.append(value) def insert_listitem(self, index, value): self.listitem[index] = value def export(self, outfile, level, namespace_='', name_='docListType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docListType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docListType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docListType'): for listitem_ in self.listitem: listitem_.export(outfile, level, namespace_, name_='listitem') def hasContent_(self): if ( self.listitem is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'listitem': obj_ = docListItemType.factory() obj_.build(child_) self.listitem.append(obj_) # end class docListType class docListItemType(GeneratedsSuper): subclass = None superclass = None def __init__(self, para=None): if para is None: self.para = [] else: self.para = para def factory(*args_, **kwargs_): if docListItemType.subclass: return docListItemType.subclass(*args_, **kwargs_) else: return docListItemType(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def export(self, outfile, level, namespace_='', name_='docListItemType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docListItemType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docListItemType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docListItemType'): for para_ in self.para: para_.export(outfile, level, namespace_, name_='para') def hasContent_(self): if ( self.para is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': obj_ = docParaType.factory() obj_.build(child_) self.para.append(obj_) # end class docListItemType class docSimpleSectType(GeneratedsSuper): subclass = None superclass = None def __init__(self, kind=None, title=None, para=None): self.kind = kind self.title = title if para is None: self.para = [] else: self.para = para def factory(*args_, **kwargs_): if docSimpleSectType.subclass: return docSimpleSectType.subclass(*args_, **kwargs_) else: return docSimpleSectType(*args_, **kwargs_) factory = staticmethod(factory) def get_title(self): return self.title def set_title(self, title): self.title = title def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_kind(self): return self.kind def set_kind(self, kind): self.kind = kind def export(self, outfile, level, namespace_='', name_='docSimpleSectType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docSimpleSectType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docSimpleSectType'): if self.kind is not None: outfile.write(' kind=%s' % (quote_attrib(self.kind), )) def exportChildren(self, outfile, level, namespace_='', name_='docSimpleSectType'): if self.title: self.title.export(outfile, level, namespace_, name_='title') for para_ in self.para: para_.export(outfile, level, namespace_, name_='para') def hasContent_(self): if ( self.title is not None or self.para is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('kind'): self.kind = attrs.get('kind').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'title': obj_ = docTitleType.factory() obj_.build(child_) self.set_title(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': obj_ = docParaType.factory() obj_.build(child_) self.para.append(obj_) # end class docSimpleSectType class docVarListEntryType(GeneratedsSuper): subclass = None superclass = None def __init__(self, term=None): self.term = term def factory(*args_, **kwargs_): if docVarListEntryType.subclass: return docVarListEntryType.subclass(*args_, **kwargs_) else: return docVarListEntryType(*args_, **kwargs_) factory = staticmethod(factory) def get_term(self): return self.term def set_term(self, term): self.term = term def export(self, outfile, level, namespace_='', name_='docVarListEntryType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docVarListEntryType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docVarListEntryType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docVarListEntryType'): if self.term: self.term.export(outfile, level, namespace_, name_='term', ) def hasContent_(self): if ( self.term is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'term': obj_ = docTitleType.factory() obj_.build(child_) self.set_term(obj_) # end class docVarListEntryType class docVariableListType(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if docVariableListType.subclass: return docVariableListType.subclass(*args_, **kwargs_) else: return docVariableListType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docVariableListType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docVariableListType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docVariableListType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docVariableListType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docVariableListType class docRefTextType(GeneratedsSuper): subclass = None superclass = None def __init__(self, refid=None, kindref=None, external=None, valueOf_='', mixedclass_=None, content_=None): self.refid = refid self.kindref = kindref self.external = external if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docRefTextType.subclass: return docRefTextType.subclass(*args_, **kwargs_) else: return docRefTextType(*args_, **kwargs_) factory = staticmethod(factory) def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def get_kindref(self): return self.kindref def set_kindref(self, kindref): self.kindref = kindref def get_external(self): return self.external def set_external(self, external): self.external = external def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docRefTextType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docRefTextType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docRefTextType'): if self.refid is not None: outfile.write(' refid=%s' % (self.format_string(quote_attrib(self.refid).encode(ExternalEncoding), input_name='refid'), )) if self.kindref is not None: outfile.write(' kindref=%s' % (quote_attrib(self.kindref), )) if self.external is not None: outfile.write(' external=%s' % (self.format_string(quote_attrib(self.external).encode(ExternalEncoding), input_name='external'), )) def exportChildren(self, outfile, level, namespace_='', name_='docRefTextType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('refid'): self.refid = attrs.get('refid').value if attrs.get('kindref'): self.kindref = attrs.get('kindref').value if attrs.get('external'): self.external = attrs.get('external').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docRefTextType class docTableType(GeneratedsSuper): subclass = None superclass = None def __init__(self, rows=None, cols=None, row=None, caption=None): self.rows = rows self.cols = cols if row is None: self.row = [] else: self.row = row self.caption = caption def factory(*args_, **kwargs_): if docTableType.subclass: return docTableType.subclass(*args_, **kwargs_) else: return docTableType(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_caption(self): return self.caption def set_caption(self, caption): self.caption = caption def get_rows(self): return self.rows def set_rows(self, rows): self.rows = rows def get_cols(self): return self.cols def set_cols(self, cols): self.cols = cols def export(self, outfile, level, namespace_='', name_='docTableType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docTableType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docTableType'): if self.rows is not None: outfile.write(' rows="%s"' % self.format_integer(self.rows, input_name='rows')) if self.cols is not None: outfile.write(' cols="%s"' % self.format_integer(self.cols, input_name='cols')) def exportChildren(self, outfile, level, namespace_='', name_='docTableType'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') if self.caption: self.caption.export(outfile, level, namespace_, name_='caption') def hasContent_(self): if ( self.row is not None or self.caption is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('rows'): try: self.rows = int(attrs.get('rows').value) except ValueError as exp: raise ValueError('Bad integer attribute (rows): %s' % exp) if attrs.get('cols'): try: self.cols = int(attrs.get('cols').value) except ValueError as exp: raise ValueError('Bad integer attribute (cols): %s' % exp) def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'row': obj_ = docRowType.factory() obj_.build(child_) self.row.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'caption': obj_ = docCaptionType.factory() obj_.build(child_) self.set_caption(obj_) # end class docTableType class docRowType(GeneratedsSuper): subclass = None superclass = None def __init__(self, entry=None): if entry is None: self.entry = [] else: self.entry = entry def factory(*args_, **kwargs_): if docRowType.subclass: return docRowType.subclass(*args_, **kwargs_) else: return docRowType(*args_, **kwargs_) factory = staticmethod(factory) def get_entry(self): return self.entry def set_entry(self, entry): self.entry = entry def add_entry(self, value): self.entry.append(value) def insert_entry(self, index, value): self.entry[index] = value def export(self, outfile, level, namespace_='', name_='docRowType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docRowType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docRowType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docRowType'): for entry_ in self.entry: entry_.export(outfile, level, namespace_, name_='entry') def hasContent_(self): if ( self.entry is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'entry': obj_ = docEntryType.factory() obj_.build(child_) self.entry.append(obj_) # end class docRowType class docEntryType(GeneratedsSuper): subclass = None superclass = None def __init__(self, thead=None, para=None): self.thead = thead if para is None: self.para = [] else: self.para = para def factory(*args_, **kwargs_): if docEntryType.subclass: return docEntryType.subclass(*args_, **kwargs_) else: return docEntryType(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_thead(self): return self.thead def set_thead(self, thead): self.thead = thead def export(self, outfile, level, namespace_='', name_='docEntryType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docEntryType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docEntryType'): if self.thead is not None: outfile.write(' thead=%s' % (quote_attrib(self.thead), )) def exportChildren(self, outfile, level, namespace_='', name_='docEntryType'): for para_ in self.para: para_.export(outfile, level, namespace_, name_='para') def hasContent_(self): if ( self.para is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('thead'): self.thead = attrs.get('thead').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': obj_ = docParaType.factory() obj_.build(child_) self.para.append(obj_) # end class docEntryType class docCaptionType(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_='', mixedclass_=None, content_=None): if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docCaptionType.subclass: return docCaptionType.subclass(*args_, **kwargs_) else: return docCaptionType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docCaptionType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docCaptionType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docCaptionType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docCaptionType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docCaptionType class docHeadingType(GeneratedsSuper): subclass = None superclass = None def __init__(self, level=None, valueOf_='', mixedclass_=None, content_=None): self.level = level if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docHeadingType.subclass: return docHeadingType.subclass(*args_, **kwargs_) else: return docHeadingType(*args_, **kwargs_) factory = staticmethod(factory) def get_level(self): return self.level def set_level(self, level): self.level = level def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docHeadingType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docHeadingType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docHeadingType'): if self.level is not None: outfile.write(' level="%s"' % self.format_integer(self.level, input_name='level')) def exportChildren(self, outfile, level, namespace_='', name_='docHeadingType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('level'): try: self.level = int(attrs.get('level').value) except ValueError as exp: raise ValueError('Bad integer attribute (level): %s' % exp) def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docHeadingType class docImageType(GeneratedsSuper): subclass = None superclass = None def __init__(self, width=None, type_=None, name=None, height=None, valueOf_='', mixedclass_=None, content_=None): self.width = width self.type_ = type_ self.name = name self.height = height if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docImageType.subclass: return docImageType.subclass(*args_, **kwargs_) else: return docImageType(*args_, **kwargs_) factory = staticmethod(factory) def get_width(self): return self.width def set_width(self, width): self.width = width def get_type(self): return self.type_ def set_type(self, type_): self.type_ = type_ def get_name(self): return self.name def set_name(self, name): self.name = name def get_height(self): return self.height def set_height(self, height): self.height = height def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docImageType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docImageType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docImageType'): if self.width is not None: outfile.write(' width=%s' % (self.format_string(quote_attrib(self.width).encode(ExternalEncoding), input_name='width'), )) if self.type_ is not None: outfile.write(' type=%s' % (quote_attrib(self.type_), )) if self.name is not None: outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), )) if self.height is not None: outfile.write(' height=%s' % (self.format_string(quote_attrib(self.height).encode(ExternalEncoding), input_name='height'), )) def exportChildren(self, outfile, level, namespace_='', name_='docImageType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('width'): self.width = attrs.get('width').value if attrs.get('type'): self.type_ = attrs.get('type').value if attrs.get('name'): self.name = attrs.get('name').value if attrs.get('height'): self.height = attrs.get('height').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docImageType class docDotFileType(GeneratedsSuper): subclass = None superclass = None def __init__(self, name=None, valueOf_='', mixedclass_=None, content_=None): self.name = name if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docDotFileType.subclass: return docDotFileType.subclass(*args_, **kwargs_) else: return docDotFileType(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docDotFileType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docDotFileType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docDotFileType'): if self.name is not None: outfile.write(' name=%s' % (self.format_string(quote_attrib(self.name).encode(ExternalEncoding), input_name='name'), )) def exportChildren(self, outfile, level, namespace_='', name_='docDotFileType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('name'): self.name = attrs.get('name').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docDotFileType class docTocItemType(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, valueOf_='', mixedclass_=None, content_=None): self.id = id if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docTocItemType.subclass: return docTocItemType.subclass(*args_, **kwargs_) else: return docTocItemType(*args_, **kwargs_) factory = staticmethod(factory) def get_id(self): return self.id def set_id(self, id): self.id = id def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docTocItemType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docTocItemType') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docTocItemType'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docTocItemType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docTocItemType class docTocListType(GeneratedsSuper): subclass = None superclass = None def __init__(self, tocitem=None): if tocitem is None: self.tocitem = [] else: self.tocitem = tocitem def factory(*args_, **kwargs_): if docTocListType.subclass: return docTocListType.subclass(*args_, **kwargs_) else: return docTocListType(*args_, **kwargs_) factory = staticmethod(factory) def get_tocitem(self): return self.tocitem def set_tocitem(self, tocitem): self.tocitem = tocitem def add_tocitem(self, value): self.tocitem.append(value) def insert_tocitem(self, index, value): self.tocitem[index] = value def export(self, outfile, level, namespace_='', name_='docTocListType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docTocListType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docTocListType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docTocListType'): for tocitem_ in self.tocitem: tocitem_.export(outfile, level, namespace_, name_='tocitem') def hasContent_(self): if ( self.tocitem is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'tocitem': obj_ = docTocItemType.factory() obj_.build(child_) self.tocitem.append(obj_) # end class docTocListType class docLanguageType(GeneratedsSuper): subclass = None superclass = None def __init__(self, langid=None, para=None): self.langid = langid if para is None: self.para = [] else: self.para = para def factory(*args_, **kwargs_): if docLanguageType.subclass: return docLanguageType.subclass(*args_, **kwargs_) else: return docLanguageType(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_langid(self): return self.langid def set_langid(self, langid): self.langid = langid def export(self, outfile, level, namespace_='', name_='docLanguageType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docLanguageType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docLanguageType'): if self.langid is not None: outfile.write(' langid=%s' % (self.format_string(quote_attrib(self.langid).encode(ExternalEncoding), input_name='langid'), )) def exportChildren(self, outfile, level, namespace_='', name_='docLanguageType'): for para_ in self.para: para_.export(outfile, level, namespace_, name_='para') def hasContent_(self): if ( self.para is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('langid'): self.langid = attrs.get('langid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': obj_ = docParaType.factory() obj_.build(child_) self.para.append(obj_) # end class docLanguageType class docParamListType(GeneratedsSuper): subclass = None superclass = None def __init__(self, kind=None, parameteritem=None): self.kind = kind if parameteritem is None: self.parameteritem = [] else: self.parameteritem = parameteritem def factory(*args_, **kwargs_): if docParamListType.subclass: return docParamListType.subclass(*args_, **kwargs_) else: return docParamListType(*args_, **kwargs_) factory = staticmethod(factory) def get_parameteritem(self): return self.parameteritem def set_parameteritem(self, parameteritem): self.parameteritem = parameteritem def add_parameteritem(self, value): self.parameteritem.append(value) def insert_parameteritem(self, index, value): self.parameteritem[index] = value def get_kind(self): return self.kind def set_kind(self, kind): self.kind = kind def export(self, outfile, level, namespace_='', name_='docParamListType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docParamListType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docParamListType'): if self.kind is not None: outfile.write(' kind=%s' % (quote_attrib(self.kind), )) def exportChildren(self, outfile, level, namespace_='', name_='docParamListType'): for parameteritem_ in self.parameteritem: parameteritem_.export(outfile, level, namespace_, name_='parameteritem') def hasContent_(self): if ( self.parameteritem is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('kind'): self.kind = attrs.get('kind').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parameteritem': obj_ = docParamListItem.factory() obj_.build(child_) self.parameteritem.append(obj_) # end class docParamListType class docParamListItem(GeneratedsSuper): subclass = None superclass = None def __init__(self, parameternamelist=None, parameterdescription=None): if parameternamelist is None: self.parameternamelist = [] else: self.parameternamelist = parameternamelist self.parameterdescription = parameterdescription def factory(*args_, **kwargs_): if docParamListItem.subclass: return docParamListItem.subclass(*args_, **kwargs_) else: return docParamListItem(*args_, **kwargs_) factory = staticmethod(factory) def get_parameternamelist(self): return self.parameternamelist def set_parameternamelist(self, parameternamelist): self.parameternamelist = parameternamelist def add_parameternamelist(self, value): self.parameternamelist.append(value) def insert_parameternamelist(self, index, value): self.parameternamelist[index] = value def get_parameterdescription(self): return self.parameterdescription def set_parameterdescription(self, parameterdescription): self.parameterdescription = parameterdescription def export(self, outfile, level, namespace_='', name_='docParamListItem', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docParamListItem') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docParamListItem'): pass def exportChildren(self, outfile, level, namespace_='', name_='docParamListItem'): for parameternamelist_ in self.parameternamelist: parameternamelist_.export(outfile, level, namespace_, name_='parameternamelist') if self.parameterdescription: self.parameterdescription.export(outfile, level, namespace_, name_='parameterdescription', ) def hasContent_(self): if ( self.parameternamelist is not None or self.parameterdescription is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parameternamelist': obj_ = docParamNameList.factory() obj_.build(child_) self.parameternamelist.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parameterdescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_parameterdescription(obj_) # end class docParamListItem class docParamNameList(GeneratedsSuper): subclass = None superclass = None def __init__(self, parametername=None): if parametername is None: self.parametername = [] else: self.parametername = parametername def factory(*args_, **kwargs_): if docParamNameList.subclass: return docParamNameList.subclass(*args_, **kwargs_) else: return docParamNameList(*args_, **kwargs_) factory = staticmethod(factory) def get_parametername(self): return self.parametername def set_parametername(self, parametername): self.parametername = parametername def add_parametername(self, value): self.parametername.append(value) def insert_parametername(self, index, value): self.parametername[index] = value def export(self, outfile, level, namespace_='', name_='docParamNameList', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docParamNameList') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docParamNameList'): pass def exportChildren(self, outfile, level, namespace_='', name_='docParamNameList'): for parametername_ in self.parametername: parametername_.export(outfile, level, namespace_, name_='parametername') def hasContent_(self): if ( self.parametername is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'parametername': obj_ = docParamName.factory() obj_.build(child_) self.parametername.append(obj_) # end class docParamNameList class docParamName(GeneratedsSuper): subclass = None superclass = None def __init__(self, direction=None, ref=None, mixedclass_=None, content_=None): self.direction = direction if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ def factory(*args_, **kwargs_): if docParamName.subclass: return docParamName.subclass(*args_, **kwargs_) else: return docParamName(*args_, **kwargs_) factory = staticmethod(factory) def get_ref(self): return self.ref def set_ref(self, ref): self.ref = ref def get_direction(self): return self.direction def set_direction(self, direction): self.direction = direction def export(self, outfile, level, namespace_='', name_='docParamName', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docParamName') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, namespace_='', name_='docParamName'): if self.direction is not None: outfile.write(' direction=%s' % (quote_attrib(self.direction), )) def exportChildren(self, outfile, level, namespace_='', name_='docParamName'): for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.ref is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('direction'): self.direction = attrs.get('direction').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'ref': childobj_ = docRefTextType.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'ref', childobj_) self.content_.append(obj_) elif child_.nodeType == Node.TEXT_NODE: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.nodeValue) self.content_.append(obj_) # end class docParamName class docXRefSectType(GeneratedsSuper): subclass = None superclass = None def __init__(self, id=None, xreftitle=None, xrefdescription=None): self.id = id if xreftitle is None: self.xreftitle = [] else: self.xreftitle = xreftitle self.xrefdescription = xrefdescription def factory(*args_, **kwargs_): if docXRefSectType.subclass: return docXRefSectType.subclass(*args_, **kwargs_) else: return docXRefSectType(*args_, **kwargs_) factory = staticmethod(factory) def get_xreftitle(self): return self.xreftitle def set_xreftitle(self, xreftitle): self.xreftitle = xreftitle def add_xreftitle(self, value): self.xreftitle.append(value) def insert_xreftitle(self, index, value): self.xreftitle[index] = value def get_xrefdescription(self): return self.xrefdescription def set_xrefdescription(self, xrefdescription): self.xrefdescription = xrefdescription def get_id(self): return self.id def set_id(self, id): self.id = id def export(self, outfile, level, namespace_='', name_='docXRefSectType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docXRefSectType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docXRefSectType'): if self.id is not None: outfile.write(' id=%s' % (self.format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='docXRefSectType'): for xreftitle_ in self.xreftitle: showIndent(outfile, level) outfile.write('<%sxreftitle>%s\n' % (namespace_, self.format_string(quote_xml(xreftitle_).encode(ExternalEncoding), input_name='xreftitle'), namespace_)) if self.xrefdescription: self.xrefdescription.export(outfile, level, namespace_, name_='xrefdescription', ) def hasContent_(self): if ( self.xreftitle is not None or self.xrefdescription is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('id'): self.id = attrs.get('id').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'xreftitle': xreftitle_ = '' for text__content_ in child_.childNodes: xreftitle_ += text__content_.nodeValue self.xreftitle.append(xreftitle_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'xrefdescription': obj_ = descriptionType.factory() obj_.build(child_) self.set_xrefdescription(obj_) # end class docXRefSectType class docCopyType(GeneratedsSuper): subclass = None superclass = None def __init__(self, link=None, para=None, sect1=None, internal=None): self.link = link if para is None: self.para = [] else: self.para = para if sect1 is None: self.sect1 = [] else: self.sect1 = sect1 self.internal = internal def factory(*args_, **kwargs_): if docCopyType.subclass: return docCopyType.subclass(*args_, **kwargs_) else: return docCopyType(*args_, **kwargs_) factory = staticmethod(factory) def get_para(self): return self.para def set_para(self, para): self.para = para def add_para(self, value): self.para.append(value) def insert_para(self, index, value): self.para[index] = value def get_sect1(self): return self.sect1 def set_sect1(self, sect1): self.sect1 = sect1 def add_sect1(self, value): self.sect1.append(value) def insert_sect1(self, index, value): self.sect1[index] = value def get_internal(self): return self.internal def set_internal(self, internal): self.internal = internal def get_link(self): return self.link def set_link(self, link): self.link = link def export(self, outfile, level, namespace_='', name_='docCopyType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docCopyType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docCopyType'): if self.link is not None: outfile.write(' link=%s' % (self.format_string(quote_attrib(self.link).encode(ExternalEncoding), input_name='link'), )) def exportChildren(self, outfile, level, namespace_='', name_='docCopyType'): for para_ in self.para: para_.export(outfile, level, namespace_, name_='para') for sect1_ in self.sect1: sect1_.export(outfile, level, namespace_, name_='sect1') if self.internal: self.internal.export(outfile, level, namespace_, name_='internal') def hasContent_(self): if ( self.para is not None or self.sect1 is not None or self.internal is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('link'): self.link = attrs.get('link').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'para': obj_ = docParaType.factory() obj_.build(child_) self.para.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'sect1': obj_ = docSect1Type.factory() obj_.build(child_) self.sect1.append(obj_) elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'internal': obj_ = docInternalType.factory() obj_.build(child_) self.set_internal(obj_) # end class docCopyType class docCharType(GeneratedsSuper): subclass = None superclass = None def __init__(self, char=None, valueOf_=''): self.char = char self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if docCharType.subclass: return docCharType.subclass(*args_, **kwargs_) else: return docCharType(*args_, **kwargs_) factory = staticmethod(factory) def get_char(self): return self.char def set_char(self, char): self.char = char def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docCharType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docCharType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docCharType'): if self.char is not None: outfile.write(' char=%s' % (quote_attrib(self.char), )) def exportChildren(self, outfile, level, namespace_='', name_='docCharType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('char'): self.char = attrs.get('char').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docCharType class docEmptyType(GeneratedsSuper): subclass = None superclass = None def __init__(self, valueOf_=''): self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if docEmptyType.subclass: return docEmptyType.subclass(*args_, **kwargs_) else: return docEmptyType(*args_, **kwargs_) factory = staticmethod(factory) def getValueOf_(self): return self.valueOf_ def setValueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='docEmptyType', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s %s' % (namespace_, name_, namespacedef_, )) self.exportAttributes(outfile, level, namespace_, name_='docEmptyType') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('\n' % (namespace_, name_)) else: outfile.write(' />\n') def exportAttributes(self, outfile, level, namespace_='', name_='docEmptyType'): pass def exportChildren(self, outfile, level, namespace_='', name_='docEmptyType'): if self.valueOf_.find('![CDATA')>-1: value=quote_xml('%s' % self.valueOf_) value=value.replace('![CDATA','') outfile.write(value) else: outfile.write(quote_xml('%s' % self.valueOf_)) def hasContent_(self): if ( self.valueOf_ is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) self.valueOf_ = '' for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): pass def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: self.valueOf_ += child_.nodeValue elif child_.nodeType == Node.CDATA_SECTION_NODE: self.valueOf_ += '![CDATA['+child_.nodeValue+']]' # end class docEmptyType USAGE_TEXT = """ Usage: python .py [ -s ] Options: -s Use the SAX parser, not the minidom parser. """ def usage(): print(USAGE_TEXT) sys.exit(1) def parse(inFileName): doc = minidom.parse(inFileName) rootNode = doc.documentElement rootObj = DoxygenType.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('\n') rootObj.export(sys.stdout, 0, name_="doxygen", namespacedef_='') return rootObj def parseString(inString): doc = minidom.parseString(inString) rootNode = doc.documentElement rootObj = DoxygenType.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('\n') rootObj.export(sys.stdout, 0, name_="doxygen", namespacedef_='') return rootObj def parseLiteral(inFileName): doc = minidom.parse(inFileName) rootNode = doc.documentElement rootObj = DoxygenType.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('from compound import *\n\n') sys.stdout.write('rootObj = doxygen(\n') rootObj.exportLiteral(sys.stdout, 0, name_="doxygen") sys.stdout.write(')\n') return rootObj def main(): args = sys.argv[1:] if len(args) == 1: parse(args[0]) else: usage() if __name__ == '__main__': main() #import pdb #pdb.run('main()') breathe-4.1.0/breathe/parser/doxygen/index.py000066400000000000000000000025521256765247000212140ustar00rootroot00000000000000""" Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ from xml.dom import minidom from xml.parsers.expat import ExpatError from . import indexsuper as supermod class DoxygenTypeSub(supermod.DoxygenType): node_type = "doxygen" def __init__(self, version=None, compound=None): supermod.DoxygenType.__init__(self, version, compound) supermod.DoxygenType.subclass = DoxygenTypeSub # end class DoxygenTypeSub class CompoundTypeSub(supermod.CompoundType): node_type = "compound" def __init__(self, kind=None, refid=None, name='', member=None): supermod.CompoundType.__init__(self, kind, refid, name, member) supermod.CompoundType.subclass = CompoundTypeSub # end class CompoundTypeSub class MemberTypeSub(supermod.MemberType): node_type = "member" def __init__(self, kind=None, refid=None, name=''): supermod.MemberType.__init__(self, kind, refid, name) supermod.MemberType.subclass = MemberTypeSub # end class MemberTypeSub class ParseError(Exception): pass class FileIOError(Exception): pass def parse(inFilename): try: doc = minidom.parse(inFilename) except IOError as e: raise FileIOError(e) except ExpatError as e: raise ParseError(e) rootNode = doc.documentElement rootObj = supermod.DoxygenType.factory() rootObj.build(rootNode) return rootObj breathe-4.1.0/breathe/parser/doxygen/indexsuper.py000066400000000000000000000247571256765247000223060ustar00rootroot00000000000000# # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # import sys import getopt from xml.dom import minidom from xml.dom import Node # # User methods # # Calls to the methods in these classes are generated by generateDS.py. # You can replace these methods by re-implementing the following class # in a module named generatedssuper.py. try: from generatedssuper import GeneratedsSuper except ImportError as exp: class GeneratedsSuper: def format_string(self, input_data, input_name=''): return input_data def format_integer(self, input_data, input_name=''): return '%d' % input_data def format_float(self, input_data, input_name=''): return '%f' % input_data def format_double(self, input_data, input_name=''): return '%e' % input_data def format_boolean(self, input_data, input_name=''): return '%s' % input_data # # If you have installed IPython you can uncomment and use the following. # IPython is available from http://ipython.scipy.org/. # ## from IPython.Shell import IPShellEmbed ## args = '' ## ipshell = IPShellEmbed(args, ## banner = 'Dropping into IPython', ## exit_msg = 'Leaving Interpreter, back to program.') # Then use the following line where and when you want to drop into the # IPython shell: # ipshell(' -- Entering ipshell.\nHit Ctrl-D to exit') # # Globals # ExternalEncoding = 'ascii' # # Support/utility functions. # def showIndent(outfile, level): for idx in range(level): outfile.write(' ') def quote_xml(inStr): s1 = (isinstance(inStr, basestring) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') s1 = s1.replace('>', '>') return s1 def quote_attrib(inStr): s1 = (isinstance(inStr, basestring) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') s1 = s1.replace('>', '>') if '"' in s1: if "'" in s1: s1 = '"%s"' % s1.replace('"', """) else: s1 = "'%s'" % s1 else: s1 = '"%s"' % s1 return s1 def quote_python(inStr): s1 = inStr if s1.find("'") == -1: if s1.find('\n') == -1: return "'%s'" % s1 else: return "'''%s'''" % s1 else: if s1.find('"') != -1: s1 = s1.replace('"', '\\"') if s1.find('\n') == -1: return '"%s"' % s1 else: return '"""%s"""' % s1 class MixedContainer: # Constants for category: CategoryNone = 0 CategoryText = 1 CategorySimple = 2 CategoryComplex = 3 # Constants for content_type: TypeNone = 0 TypeText = 1 TypeString = 2 TypeInteger = 3 TypeFloat = 4 TypeDecimal = 5 TypeDouble = 6 TypeBoolean = 7 def __init__(self, category, content_type, name, value): self.category = category self.content_type = content_type self.name = name self.value = value def getCategory(self): return self.category def getContenttype(self, content_type): return self.content_type def getValue(self): return self.value def getName(self): return self.name class _MemberSpec(object): def __init__(self, name='', data_type='', container=0): self.name = name self.data_type = data_type self.container = container def set_name(self, name): self.name = name def get_name(self): return self.name def set_data_type(self, data_type): self.data_type = data_type def get_data_type(self): return self.data_type def set_container(self, container): self.container = container def get_container(self): return self.container # # Data representation classes. # class DoxygenType(GeneratedsSuper): subclass = None superclass = None def __init__(self, version=None, compound=None): self.version = version if compound is None: self.compound = [] else: self.compound = compound def factory(*args_, **kwargs_): if DoxygenType.subclass: return DoxygenType.subclass(*args_, **kwargs_) else: return DoxygenType(*args_, **kwargs_) factory = staticmethod(factory) def get_compound(self): return self.compound def set_compound(self, compound): self.compound = compound def add_compound(self, value): self.compound.append(value) def insert_compound(self, index, value): self.compound[index] = value def get_version(self): return self.version def set_version(self, version): self.version = version def hasContent_(self): if ( self.compound is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('version'): self.version = attrs.get('version').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'compound': obj_ = CompoundType.factory() obj_.build(child_) self.compound.append(obj_) # end class DoxygenType class CompoundType(GeneratedsSuper): subclass = None superclass = None def __init__(self, kind=None, refid=None, name=None, member=None): self.kind = kind self.refid = refid self.name = name if member is None: self.member = [] else: self.member = member def factory(*args_, **kwargs_): if CompoundType.subclass: return CompoundType.subclass(*args_, **kwargs_) else: return CompoundType(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_member(self): return self.member def set_member(self, member): self.member = member def add_member(self, value): self.member.append(value) def insert_member(self, index, value): self.member[index] = value def get_kind(self): return self.kind def set_kind(self, kind): self.kind = kind def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('kind'): self.kind = attrs.get('kind').value if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ elif child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'member': obj_ = MemberType.factory() obj_.build(child_) self.member.append(obj_) # end class CompoundType class MemberType(GeneratedsSuper): subclass = None superclass = None def __init__(self, kind=None, refid=None, name=None): self.kind = kind self.refid = refid self.name = name def factory(*args_, **kwargs_): if MemberType.subclass: return MemberType.subclass(*args_, **kwargs_) else: return MemberType(*args_, **kwargs_) factory = staticmethod(factory) def get_name(self): return self.name def set_name(self, name): self.name = name def get_kind(self): return self.kind def set_kind(self, kind): self.kind = kind def get_refid(self): return self.refid def set_refid(self, refid): self.refid = refid def hasContent_(self): if ( self.name is not None ): return True else: return False def build(self, node_): attrs = node_.attributes self.buildAttributes(attrs) for child_ in node_.childNodes: nodeName_ = child_.nodeName.split(':')[-1] self.buildChildren(child_, nodeName_) def buildAttributes(self, attrs): if attrs.get('kind'): self.kind = attrs.get('kind').value if attrs.get('refid'): self.refid = attrs.get('refid').value def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ nodeName_ == 'name': name_ = '' for text__content_ in child_.childNodes: name_ += text__content_.nodeValue self.name = name_ # end class MemberType USAGE_TEXT = """ Usage: python .py [ -s ] Options: -s Use the SAX parser, not the minidom parser. """ def usage(): print(USAGE_TEXT) sys.exit(1) def parse(inFileName): doc = minidom.parse(inFileName) rootNode = doc.documentElement rootObj = DoxygenType.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('\n') rootObj.export(sys.stdout, 0, name_="doxygenindex", namespacedef_='') return rootObj def parseString(inString): doc = minidom.parseString(inString) rootNode = doc.documentElement rootObj = DoxygenType.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('\n') rootObj.export(sys.stdout, 0, name_="doxygenindex", namespacedef_='') return rootObj def parseLiteral(inFileName): doc = minidom.parse(inFileName) rootNode = doc.documentElement rootObj = DoxygenType.factory() rootObj.build(rootNode) # Enable Python to collect the space used by the DOM. doc = None sys.stdout.write('from index import *\n\n') sys.stdout.write('rootObj = doxygenindex(\n') rootObj.exportLiteral(sys.stdout, 0, name_="doxygenindex") sys.stdout.write(')\n') return rootObj def main(): args = sys.argv[1:] if len(args) == 1: parse(args[0]) else: usage() if __name__ == '__main__': main() #import pdb #pdb.run('main()') breathe-4.1.0/breathe/process.py000066400000000000000000000053321256765247000166110ustar00rootroot00000000000000 AUTOCFG_TEMPLATE = r""" PROJECT_NAME = "{project_name}" OUTPUT_DIRECTORY = {output_dir} GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = {input} ENABLE_PREPROCESSING = YES QUIET = YES JAVADOC_AUTOBRIEF = YES JAVADOC_AUTOBRIEF = NO GENERATE_HTML = NO GENERATE_XML = YES ALIASES = "rst=\verbatim embed:rst" ALIASES += "endrst=\endverbatim" {extra} """.strip() class ProjectData(object): "Simple handler for the files and project_info for each project" def __init__(self, auto_project_info, files): self.auto_project_info = auto_project_info self.files = files class AutoDoxygenProcessHandle(object): def __init__(self, path_handler, run_process, write_file, project_info_factory): self.path_handler = path_handler self.run_process = run_process self.write_file = write_file self.project_info_factory = project_info_factory def generate_xml(self, projects_source, doxygen_options): project_files = {} # First collect together all the files which need to be doxygen processed for each project for project_name, file_structure in projects_source.items(): folder = file_structure[0] contents = file_structure[1] auto_project_info = self.project_info_factory.create_auto_project_info( project_name, folder) project_files[project_name] = ProjectData(auto_project_info, contents) # Iterate over the projects and generate doxygen xml output for the files for each one into # a directory in the Sphinx build area for project_name, data in project_files.items(): project_path = self.process(data.auto_project_info, data.files, doxygen_options) project_info = data.auto_project_info.create_project_info(project_path) self.project_info_factory.store_project_info_for_auto(project_name, project_info) def process(self, auto_project_info, files, doxygen_options): name = auto_project_info.name() cfgfile = "%s.cfg" % name full_paths = map(lambda x: auto_project_info.abs_path_to_source_file(x), files) cfg = AUTOCFG_TEMPLATE.format( project_name=name, output_dir=name, input=" ".join(full_paths), extra='\n'.join("%s=%s" % pair for pair in doxygen_options.items()) ) build_dir = self.path_handler.join( auto_project_info.build_dir(), "breathe", "doxygen" ) self.write_file(build_dir, cfgfile, cfg) self.run_process(['doxygen', cfgfile], cwd=build_dir) return self.path_handler.join(build_dir, name, "xml") breathe-4.1.0/breathe/project.py000066400000000000000000000214061256765247000166010ustar00rootroot00000000000000 from .exception import BreatheError import os class ProjectError(BreatheError): pass class NoDefaultProjectError(ProjectError): pass class AutoProjectInfo(object): """Created as a temporary step in the automatic xml generation process""" def __init__( self, name, source_path, build_dir, reference, source_dir, config_dir, domain_by_extension, domain_by_file_pattern, match ): self._name = name self._source_path = source_path self._build_dir = build_dir self._reference = reference self._source_dir = source_dir self._config_dir = config_dir self._domain_by_extension = domain_by_extension self._domain_by_file_pattern = domain_by_file_pattern self._match = match def name(self): return self._name def build_dir(self): return self._build_dir def abs_path_to_source_file(self, file_): """ Returns full path to the provide file assuming that the provided path is relative to the projects conf.py directory as specified in the breathe_projects_source config variable. """ # os.path.join does the appropriate handling if _source_path is an absolute path return os.path.join(self._config_dir, self._source_path, file_) def create_project_info(self, project_path): """Creates a proper ProjectInfo object based on the information in this AutoProjectInfo""" return ProjectInfo( self._name, project_path, self._source_path, self._reference, self._source_dir, self._config_dir, self._domain_by_extension, self._domain_by_file_pattern, self._match ) class ProjectInfo(object): def __init__( self, name, path, source_path, reference, source_dir, config_dir, domain_by_extension, domain_by_file_pattern, match ): self._name = name self._project_path = path self._source_path = source_path self._reference = reference self._source_dir = source_dir self._config_dir = config_dir self._domain_by_extension = domain_by_extension self._domain_by_file_pattern = domain_by_file_pattern self._match = match def name(self): return self._name def project_path(self): return self._project_path def source_path(self): return self._source_path def relative_path_to_xml_file(self, file_): """ Returns relative path from Sphinx documentation top-level source directory to the specified file assuming that the specified file is a path relative to the doxygen xml output directory. """ # os.path.join does the appropriate handling if _project_path is an absolute path full_xml_project_path = os.path.join(self._config_dir, self._project_path, file_) return os.path.relpath( full_xml_project_path, self._source_dir ) def sphinx_abs_path_to_file(self, file_): """ Prepends os.path.sep to the value returned by relative_path_to_file. This is to match Sphinx's concept of an absolute path which starts from the top-level source directory of the project. """ return os.path.sep + self.relative_path_to_xml_file(file_) def reference(self): return self._reference def domain_for_file(self, file_): domain = "" extension = file_.split(".")[-1] try: domain = self._domain_by_extension[extension] except KeyError: pass for pattern, pattern_domain in self._domain_by_file_pattern.items(): if self._match(file_, pattern): domain = pattern_domain return domain class ProjectInfoFactory(object): def __init__(self, source_dir, build_dir, config_dir, match): self.source_dir = source_dir self.build_dir = build_dir self.config_dir = config_dir self.match = match self.projects = {} self.default_project = None self.domain_by_extension = {} self.domain_by_file_pattern = {} self.project_count = 0 self.project_info_store = {} self.project_info_for_auto_store = {} self.auto_project_info_store = {} def update( self, projects, default_project, domain_by_extension, domain_by_file_pattern, projects_source, build_dir ): self.projects = projects self.default_project = default_project self.domain_by_extension = domain_by_extension self.domain_by_file_pattern = domain_by_file_pattern self.projects_source = projects_source # If the breathe config values has a non-empty value for build_dir then use that otherwise # stick with the default if build_dir: self.build_dir = build_dir def default_path(self): if not self.default_project: raise NoDefaultProjectError( "No breathe_default_project config setting to fall back on " "for directive with no 'project' or 'path' specified." ) try: return self.projects[self.default_project] except KeyError: raise ProjectError( ("breathe_default_project value '%s' does not seem to be a valid key for the " "breathe_projects dictionary") % self.default_project ) def create_project_info(self, options): name = "" if "project" in options: try: path = self.projects[options["project"]] name = options["project"] except KeyError: raise ProjectError("Unable to find project '%s' in breathe_projects dictionary" % options["project"]) elif "path" in options: path = options["path"] else: path = self.default_path() try: return self.project_info_store[path] except KeyError: reference = name if not name: name = "project%s" % self.project_count reference = path self.project_count += 1 project_info = ProjectInfo( name, path, "NoSourcePath", reference, self.source_dir, self.config_dir, self.domain_by_extension, self.domain_by_file_pattern, self.match ) self.project_info_store[path] = project_info return project_info def store_project_info_for_auto(self, name, project_info): """Stores the project info by name for later extraction by the auto directives. Stored separately to the non-auto project info objects as they should never overlap. """ self.project_info_for_auto_store[name] = project_info def retrieve_project_info_for_auto(self, options): """Retrieves the project info by name for later extraction by the auto directives. Looks for the 'project' entry in the options dictionary. This is a less than ideal API but it is designed to match the use of 'create_project_info' above for which it makes much more sense. """ name = options.get('project', self.default_project) if name is None: raise NoDefaultProjectError( "No breathe_default_project config setting to fall back on " "for directive with no 'project' or 'path' specified." ) return self.project_info_for_auto_store[name] def create_auto_project_info(self, name, source_path): key = source_path try: return self.auto_project_info_store[key] except KeyError: reference = name if not name: name = "project%s" % self.project_count reference = source_path self.project_count += 1 auto_project_info = AutoProjectInfo( name, source_path, self.build_dir, reference, self.source_dir, self.config_dir, self.domain_by_extension, self.domain_by_file_pattern, self.match ) self.auto_project_info_store[key] = auto_project_info return auto_project_info breathe-4.1.0/breathe/renderer/000077500000000000000000000000001256765247000163645ustar00rootroot00000000000000breathe-4.1.0/breathe/renderer/__init__.py000066400000000000000000000000001256765247000204630ustar00rootroot00000000000000breathe-4.1.0/breathe/renderer/rst/000077500000000000000000000000001256765247000171745ustar00rootroot00000000000000breathe-4.1.0/breathe/renderer/rst/__init__.py000066400000000000000000000000021256765247000212750ustar00rootroot00000000000000 breathe-4.1.0/breathe/renderer/rst/doxygen/000077500000000000000000000000001256765247000206515ustar00rootroot00000000000000breathe-4.1.0/breathe/renderer/rst/doxygen/__init__.py000066400000000000000000000326541256765247000227740ustar00rootroot00000000000000 from .base import Renderer, RenderContext from . import index as indexrenderer from . import compound as compoundrenderer from docutils import nodes import textwrap class RstContentCreator(object): def __init__(self, list_type, dedent): self.list_type = list_type self.dedent = dedent def __call__(self, text): # Remove the first line which is "embed:rst[:leading-asterisk]" text = "\n".join(text.split(u"\n")[1:]) # Remove starting whitespace text = self.dedent(text) # Inspired by autodoc.py in Sphinx result = self.list_type() for line in text.split("\n"): result.append(line, "") return result class UnicodeRenderer(Renderer): def render(self): # Skip any nodes that are pure whitespace # Probably need a better way to do this as currently we're only doing # it skip whitespace between higher-level nodes, but this will also # skip any pure whitespace entries in actual content nodes # # We counter that second issue slightly by allowing through single white spaces # if self.data_object.strip(): return [self.node_factory.Text(self.data_object)] elif self.data_object == unicode(" "): return [self.node_factory.Text(self.data_object)] else: return [] class NullRenderer(Renderer): def __init__(self): pass def render(self): return [] class DoxygenToRstRendererFactory(object): def __init__( self, node_type, renderers, renderer_factory_creator, node_factory, project_info, state, document, rst_content_creator, filter_, target_handler, domain_directive_factory ): self.node_type = node_type self.node_factory = node_factory self.project_info = project_info self.renderers = renderers self.renderer_factory_creator = renderer_factory_creator self.state = state self.document = document self.rst_content_creator = rst_content_creator self.filter_ = filter_ self.target_handler = target_handler self.domain_directive_factory = domain_directive_factory def create_renderer( self, context ): parent_data_object = context.node_stack[1] data_object = context.node_stack[0] if not self.filter_.allow(context.node_stack): return NullRenderer() child_renderer_factory = self.renderer_factory_creator.create_child_factory( self.project_info, data_object, self ) try: node_type = data_object.node_type except AttributeError as e: # Horrible hack to silence errors on filtering unicode objects # until we fix the parsing if type(data_object) == unicode: node_type = "unicode" else: raise e Renderer = self.renderers[node_type] common_args = [ self.project_info, context, child_renderer_factory, self.node_factory, self.state, self.document, self.target_handler, self.domain_directive_factory ] if node_type == "docmarkup": creator = self.node_factory.inline if data_object.type_ == "emphasis": creator = self.node_factory.emphasis elif data_object.type_ == "computeroutput": creator = self.node_factory.literal elif data_object.type_ == "bold": creator = self.node_factory.strong elif data_object.type_ == "superscript": creator = self.node_factory.superscript elif data_object.type_ == "subscript": creator = self.node_factory.subscript elif data_object.type_ == "center": print("Warning: does not currently handle 'center' text display") elif data_object.type_ == "small": print("Warning: does not currently handle 'small' text display") return Renderer( creator, *common_args ) if node_type == "verbatim": return Renderer( self.rst_content_creator, *common_args ) if node_type == "compound": kind = data_object.kind if kind in ["file", "dir", "page", "example", "group"]: return Renderer(indexrenderer.FileRenderer, *common_args) class_ = indexrenderer.CompoundTypeSubRenderer # For compound node types Renderer is CreateCompoundTypeSubRenderer # as defined below. This could be cleaner return Renderer( class_, *common_args ) if node_type == "memberdef": if data_object.kind in ("function", "slot") or (data_object.kind == 'friend' and data_object.argsstring): Renderer = compoundrenderer.FuncMemberDefTypeSubRenderer elif data_object.kind == "enum": Renderer = compoundrenderer.EnumMemberDefTypeSubRenderer elif data_object.kind == "typedef": Renderer = compoundrenderer.TypedefMemberDefTypeSubRenderer elif data_object.kind == "variable": Renderer = compoundrenderer.VariableMemberDefTypeSubRenderer elif data_object.kind == "define": Renderer = compoundrenderer.DefineMemberDefTypeSubRenderer if node_type == "param": return Renderer( parent_data_object.node_type != "templateparamlist", *common_args ) if node_type == "docsimplesect": if data_object.kind == "par": Renderer = compoundrenderer.ParDocSimpleSectTypeSubRenderer return Renderer( *common_args ) class CreateCompoundTypeSubRenderer(object): def __init__(self, parser_factory): self.parser_factory = parser_factory def __call__(self, class_, project_info, *args): compound_parser = self.parser_factory.create_compound_parser(project_info) return class_(compound_parser, project_info, *args) class CreateRefTypeSubRenderer(object): def __init__(self, parser_factory): self.parser_factory = parser_factory def __call__(self, project_info, *args): compound_parser = self.parser_factory.create_compound_parser(project_info) return compoundrenderer.RefTypeSubRenderer(compound_parser, project_info, *args) class DoxygenToRstRendererFactoryCreator(object): def __init__( self, node_factory, parser_factory, domain_directive_factory, rst_content_creator, project_info ): self.node_factory = node_factory self.parser_factory = parser_factory self.domain_directive_factory = domain_directive_factory self.rst_content_creator = rst_content_creator self.project_info = project_info def create_factory(self, node_stack, state, document, filter_, target_handler): data_object = node_stack[0] renderers = { "doxygen" : indexrenderer.DoxygenTypeSubRenderer, "compound" : CreateCompoundTypeSubRenderer(self.parser_factory), "doxygendef" : compoundrenderer.DoxygenTypeSubRenderer, "compounddef" : compoundrenderer.CompoundDefTypeSubRenderer, "sectiondef" : compoundrenderer.SectionDefTypeSubRenderer, "memberdef" : compoundrenderer.MemberDefTypeSubRenderer, "enumvalue" : compoundrenderer.EnumvalueTypeSubRenderer, "linkedtext" : compoundrenderer.LinkedTextTypeSubRenderer, "description" : compoundrenderer.DescriptionTypeSubRenderer, "param" : compoundrenderer.ParamTypeSubRenderer, "docreftext" : compoundrenderer.DocRefTextTypeSubRenderer, "docheading" : compoundrenderer.DocHeadingTypeSubRenderer, "docpara" : compoundrenderer.DocParaTypeSubRenderer, "docmarkup" : compoundrenderer.DocMarkupTypeSubRenderer, "docparamlist" : compoundrenderer.DocParamListTypeSubRenderer, "docparamlistitem" : compoundrenderer.DocParamListItemSubRenderer, "docparamnamelist" : compoundrenderer.DocParamNameListSubRenderer, "docparamname" : compoundrenderer.DocParamNameSubRenderer, "docsect1" : compoundrenderer.DocSect1TypeSubRenderer, "docsimplesect" : compoundrenderer.DocSimpleSectTypeSubRenderer, "doctitle" : compoundrenderer.DocTitleTypeSubRenderer, "docformula" : compoundrenderer.DocForumlaTypeSubRenderer, "docimage" : compoundrenderer.DocImageTypeSubRenderer, "docurllink" : compoundrenderer.DocURLLinkSubRenderer, "listing" : compoundrenderer.ListingTypeSubRenderer, "codeline" : compoundrenderer.CodeLineTypeSubRenderer, "highlight" : compoundrenderer.HighlightTypeSubRenderer, "templateparamlist" : compoundrenderer.TemplateParamListRenderer, "inc" : compoundrenderer.IncTypeSubRenderer, "ref" : CreateRefTypeSubRenderer(self.parser_factory), "verbatim" : compoundrenderer.VerbatimTypeSubRenderer, "mixedcontainer" : compoundrenderer.MixedContainerRenderer, "unicode" : UnicodeRenderer, "doclist": compoundrenderer.DocListTypeSubRenderer, "doclistitem": compoundrenderer.DocListItemTypeSubRenderer, } try: node_type = data_object.node_type except AttributeError as e: # Horrible hack to silence errors on filtering unicode objects # until we fix the parsing if type(data_object) == unicode: node_type = "unicode" else: raise e return DoxygenToRstRendererFactory( "root", renderers, self, self.node_factory, self.project_info, state, document, self.rst_content_creator, filter_, target_handler, self.domain_directive_factory ) def create_child_factory( self, project_info, data_object, parent_renderer_factory ): try: node_type = data_object.node_type except AttributeError as e: # Horrible hack to silence errors on filtering unicode objects # until we fix the parsing if type(data_object) == unicode: node_type = "unicode" else: raise e return DoxygenToRstRendererFactory( node_type, parent_renderer_factory.renderers, self, self.node_factory, parent_renderer_factory.project_info, parent_renderer_factory.state, parent_renderer_factory.document, self.rst_content_creator, parent_renderer_factory.filter_, parent_renderer_factory.target_handler, parent_renderer_factory.domain_directive_factory ) # FactoryFactoryFactory. Ridiculous but necessary. class DoxygenToRstRendererFactoryCreatorConstructor(object): def __init__( self, node_factory, parser_factory, domain_directive_factory, rst_content_creator ): self.node_factory = node_factory self.parser_factory = parser_factory self.domain_directive_factory = domain_directive_factory self.rst_content_creator = rst_content_creator def create_factory_creator(self, project_info, document, options, target_handler): return DoxygenToRstRendererFactoryCreator( self.node_factory, self.parser_factory, self.domain_directive_factory, self.rst_content_creator, project_info, ) def format_parser_error(name, error, filename, state, lineno, do_unicode_warning): warning = '%s: Unable to parse xml file "%s". ' % (name, filename) explanation = 'Reported error: %s. ' % error unicode_explanation_text = "" unicode_explanation = [] if do_unicode_warning: unicode_explanation_text = textwrap.dedent(""" Parsing errors are often due to unicode errors associated with the encoding of the original source files. Doxygen propagates invalid characters from the input source files to the output xml.""").strip().replace("\n", " ") unicode_explanation = [nodes.paragraph("", "", nodes.Text(unicode_explanation_text))] return [nodes.warning("", nodes.paragraph("", "", nodes.Text(warning)), nodes.paragraph("", "", nodes.Text(explanation)), *unicode_explanation ), state.document.reporter.warning(warning + explanation + unicode_explanation_text, line=lineno) ] breathe-4.1.0/breathe/renderer/rst/doxygen/base.py000066400000000000000000000130151256765247000221350ustar00rootroot00000000000000 class Renderer(object): def __init__(self, project_info, context, renderer_factory, node_factory, state, document, target_handler, domain_directive_factory, ): self.project_info = project_info self.context = context self.data_object = context.node_stack[0] self.renderer_factory = renderer_factory self.node_factory = node_factory self.state = state self.document = document self.target_handler = target_handler self.domain_directive_factory = domain_directive_factory if self.context.domain == '': self.context.domain = self.get_domain() def get_domain(self): """Returns the domain for the current node.""" def get_filename(node): """Returns the name of a file where the declaration represented by node is located.""" try: return node.location.file except AttributeError: return None node_stack = self.context.node_stack node = node_stack[0] # An enumvalue node doesn't have location, so use its parent node for detecting the domain instead. if type(node) == unicode or node.node_type == "enumvalue": node = node_stack[1] filename = get_filename(node) if not filename and node.node_type == "compound": file_data = self.compound_parser.parse(node.refid) filename = get_filename(file_data.compounddef) return self.project_info.domain_for_file(filename) if filename else '' def get_fully_qualified_name(self): names = [] node_stack = self.context.node_stack node = node_stack[0] if node.node_type == 'enumvalue': names.append(node.name) # Skip the name of the containing enum because it is not a part of the fully qualified name. node_stack = node_stack[2:] # If the node is a namespace, use its name because namespaces are skipped in the main loop. if node.node_type == 'compound' and node.kind == 'namespace': names.append(node.name) for node in node_stack: if node.node_type == 'ref' and len(names) == 0: return node.valueOf_ if (node.node_type == 'compound' and node.kind not in ['file', 'namespace']) or \ node.node_type == 'memberdef': # We skip the 'file' entries because the file name doesn't form part of the # qualified name for the identifier. We skip the 'namespace' entries because if we # find an object through the namespace 'compound' entry in the index.xml then we'll # also have the 'compounddef' entry in our node stack and we'll get it from that. We # need the 'compounddef' entry because if we find the object through the 'file' # entry in the index.xml file then we need to get the namespace name from somewhere names.insert(0, node.name) if (node.node_type == 'compounddef' and node.kind == 'namespace'): # Nested namespaces include their parent namespace(s) in compoundname. ie, # compoundname is 'foo::bar' instead of just 'bar' for namespace 'bar' nested in # namespace 'foo'. We need full compoundname because node_stack doesn't necessarily # include parent namespaces and we stop here in case it does. names.insert(0, node.compoundname) break return '::'.join(names) def create_template_node(self, decl): """Creates a node for the ``template <...>`` part of the declaration.""" if not decl.templateparamlist: return None context = self.context.create_child_context(decl.templateparamlist) renderer = self.renderer_factory.create_renderer(context) template = 'template ' nodes = [self.node_factory.desc_annotation(template, template), self.node_factory.Text('<')] nodes.extend(renderer.render()) nodes.append(self.node_factory.Text(">")) signode = self.node_factory.desc_signature() signode.extend(nodes) return signode def run_domain_directive(self, kind, names): domain_directive = self.renderer_factory.domain_directive_factory.create( self.context.domain, [kind, names] + self.context.directive_args[2:]) # Translate Breathe's no-link option into the standard noindex option. if 'no-link' in self.context.directive_args[2]: domain_directive.options['noindex'] = True nodes = domain_directive.run() # Filter out outer class names if we are rendering a member as a part of a class content. signode = nodes[1].children[0] if len(names) > 0 and self.context.child: signode.children = [n for n in signode.children if not n.tagname == 'desc_addname'] return nodes class RenderContext(object): def __init__(self, node_stack, mask_factory, directive_args, domain='', child=False): self.node_stack = node_stack self.mask_factory = mask_factory self.directive_args = directive_args self.domain = domain self.child = child def create_child_context(self, data_object): node_stack = self.node_stack[:] node_stack.insert(0, self.mask_factory.mask(data_object)) return RenderContext(node_stack, self.mask_factory, self.directive_args, self.domain, True) breathe-4.1.0/breathe/renderer/rst/doxygen/compound.py000066400000000000000000001104721256765247000230540ustar00rootroot00000000000000 from .base import Renderer from .index import CompoundRenderer import six class DoxygenTypeSubRenderer(Renderer): def render(self): context = self.context.create_child_context(self.data_object.compounddef) compound_renderer = self.renderer_factory.create_renderer(context) return compound_renderer.render() class CompoundDefTypeSubRenderer(Renderer): # We store both the identified and appropriate title text here as we want to define the order # here and the titles for the SectionDefTypeSubRenderer but we don't want the repetition of # having two lists in case they fall out of sync sections = [ ("user-defined", "User Defined"), ("public-type", "Public Types"), ("public-func", "Public Functions"), ("public-attrib", "Public Members"), ("public-slot", "Public Slots"), ("signal", "Signal"), ("dcop-func", "DCOP Function"), ("property", "Property"), ("event", "Event"), ("public-static-func", "Public Static Functions"), ("public-static-attrib", "Public Static Attributes"), ("protected-type", "Protected Types"), ("protected-func", "Protected Functions"), ("protected-attrib", "Protected Attributes"), ("protected-slot", "Protected Slots"), ("protected-static-func", "Protected Static Functions"), ("protected-static-attrib", "Protected Static Attributes"), ("package-type", "Package Types"), ("package-func", "Package Functions"), ("package-attrib", "Package Attributes"), ("package-static-func", "Package Static Functions"), ("package-static-attrib", "Package Static Attributes"), ("private-type", "Private Types"), ("private-func", "Private Functions"), ("private-attrib", "Private Members"), ("private-slot", "Private Slots"), ("private-static-func", "Private Static Functions"), ("private-static-attrib", "Private Static Attributes"), ("friend", "Friends"), ("related", "Related"), ("define", "Defines"), ("prototype", "Prototypes"), ("typedef", "Typedefs"), ("enum", "Enums"), ("func", "Functions"), ("var", "Variables"), ] def render(self): nodelist = [] if self.data_object.briefdescription: context = self.context.create_child_context(self.data_object.briefdescription) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) if self.data_object.detaileddescription: context = self.context.create_child_context(self.data_object.detaileddescription) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) section_nodelists = {} # Get all sub sections for sectiondef in self.data_object.sectiondef: context = self.context.create_child_context(sectiondef) renderer = self.renderer_factory.create_renderer(context) child_nodes = renderer.render() if not child_nodes: # Skip empty section continue kind = sectiondef.kind node = self.node_factory.container(classes=['breathe-sectiondef']) node.document = self.state.document node['objtype'] = kind node.extend(child_nodes) # We store the nodes as a list against the kind in a dictionary as the kind can be # 'user-edited' and that can repeat so this allows us to collect all the 'user-edited' # entries together nodes = section_nodelists.setdefault(kind, []) nodes += [node] # Order the results in an appropriate manner for kind, _ in self.sections: nodelist.extend(section_nodelists.get(kind, [])) # Take care of innerclasses for innerclass in self.data_object.innerclass: context = self.context.create_child_context(innerclass) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) for innernamespace in self.data_object.innernamespace: context = self.context.create_child_context(innernamespace) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class SectionDefTypeSubRenderer(Renderer): section_titles = dict(CompoundDefTypeSubRenderer.sections) def render(self): node_list = [] if self.data_object.description: context = self.context.create_child_context(self.data_object.description) renderer = self.renderer_factory.create_renderer(context) node_list.extend(renderer.render()) # Get all the memberdef info for memberdef in self.data_object.memberdef: context = self.context.create_child_context(memberdef) renderer = self.renderer_factory.create_renderer(context) node_list.extend(renderer.render()) if node_list: text = self.section_titles[self.data_object.kind] # Override default name for user-defined sections. Use "Unnamed # Group" if the user didn't name the section # This is different to Doxygen which will track the groups and name # them Group1, Group2, Group3, etc. if self.data_object.kind == "user-defined": if self.data_object.header: text = self.data_object.header else: text = "Unnamed Group" # Use rubric for the title because, unlike the docutils element "section", # it doesn't interfere with the document structure. rubric = self.node_factory.rubric(text=text, classes=['breathe-sectiondef-title']) return [rubric] + node_list return [] class MemberDefTypeSubRenderer(Renderer): def create_doxygen_target(self): """Can be overridden to create a target node which uses the doxygen refid information which can be used for creating links between internal doxygen elements. The default implementation should suffice most of the time. """ refid = "%s%s" % (self.project_info.name(), self.data_object.id) return self.target_handler.create_target(refid) def title(self): nodes = [] # Variable type or function return type if self.data_object.type_: context = self.context.create_child_context(self.data_object.type_) renderer = self.renderer_factory.create_renderer(context) nodes.extend(renderer.render()) if nodes: nodes.append(self.node_factory.Text(" ")) nodes.append(self.node_factory.desc_name(text=self.data_object.name)) return nodes def description(self): nodes = [] if self.data_object.briefdescription: context = self.context.create_child_context(self.data_object.briefdescription) renderer = self.renderer_factory.create_renderer(context) nodes.extend(renderer.render()) if self.data_object.detaileddescription: context = self.context.create_child_context(self.data_object.detaileddescription) renderer = self.renderer_factory.create_renderer(context) nodes.extend(renderer.render()) return nodes def objtype(self): """Return the type of the rendered object.""" return self.data_object.kind def declaration(self): """Return the declaration of the rendered object.""" return self.get_fully_qualified_name() def update_signature(self, signode): """Update the signature node if necessary, e.g. add qualifiers.""" prefix = self.objtype() + ' ' annotation = self.node_factory.desc_annotation(prefix, prefix) if signode[0].tagname != 'desc_name': signode[0] = annotation else: signode.insert(0, annotation) def render(self): nodes = self.run_domain_directive(self.objtype(), [self.declaration().replace('\n', ' ')]) node = nodes[1] signode = node[0] contentnode = node[-1] self.update_signature(signode) signode.insert(0, self.create_doxygen_target()) contentnode.extend(self.description()) return nodes def get_param_decl(param): param_type = [] for p in param.type_.content_: value = p.value if not isinstance(value, six.text_type): value = value.valueOf_ param_type.append(value) param_type = ' '.join(param_type) param_name = param.declname if param.declname else param.defname if not param_name: param_decl = param_type elif '(*)' in param_type: param_decl = param_type.replace('(*)', '(*' + param_name + ')') elif '(&)' in param_type: param_decl = param_type.replace('(&)', '(&' + param_name + ')') else: param_decl = param_type + ' ' + param_name if param.array: param_decl += param.array return param_decl def get_definition_without_template_args(data_object): """ Return data_object.definition removing any template arguments from the class name in the member function. Otherwise links to classes defined in the same template are not generated correctly. For example in 'Result A< B >::f' we want to remove the '< B >' part. """ definition = data_object.definition qual_name = '::' + data_object.name if definition.endswith(qual_name): qual_name_start = len(definition) - len(qual_name) pos = qual_name_start - 1 if definition[pos] == '>': bracket_count = 0 # Iterate back through the characters of the definition counting matching braces and # then remove all braces and everything between while pos > 0: if definition[pos] == '>': bracket_count += 1 elif definition[pos] == '<': bracket_count -= 1 if bracket_count == 0: definition = definition[:pos] + definition[qual_name_start:] break pos -= 1 return definition class FuncMemberDefTypeSubRenderer(MemberDefTypeSubRenderer): def update_signature(self, signode): # Note whether a member function is virtual if self.data_object.virt != 'non-virtual': signode.insert(0, self.node_factory.Text('virtual ')) # Add CV-qualifiers if self.data_object.const == 'yes': signode.append(self.node_factory.Text(' const')) # The doxygen xml output doesn't seem to properly register 'volatile' as the xml attribute # 'volatile' so we have to check the argsstring for the moment. Maybe it'll change in # doxygen at some point. Registered as bug: # https://bugzilla.gnome.org/show_bug.cgi?id=733451 if self.data_object.volatile == 'yes' or self.data_object.argsstring.endswith('volatile'): signode.append(self.node_factory.Text(' volatile')) # Add `= 0` for pure virtual members. if self.data_object.virt == 'pure-virtual': signode.append(self.node_factory.Text(' = 0')) def render(self): # Get full function signature for the domain directive. param_list = [] for param in self.data_object.param: param = self.context.mask_factory.mask(param) param_decl = get_param_decl(param) param_list.append(param_decl) signature = '{0}({1})'.format(get_definition_without_template_args(self.data_object), ', '.join(param_list)) # Remove 'virtual' keyword as Sphinx 1.2 doesn't support virtual functions. virtual = 'virtual ' if signature.startswith(virtual): signature = signature[len(virtual):] self.context.directive_args[1] = [signature] nodes = self.run_domain_directive(self.data_object.kind, self.context.directive_args[1]) node = nodes[1] signode, contentnode = node.children signode.insert(0, self.create_doxygen_target()) self.update_signature(signode) contentnode.extend(self.description()) template_node = self.create_template_node(self.data_object) if template_node: node.insert(0, template_node) return nodes class DefineMemberDefTypeSubRenderer(MemberDefTypeSubRenderer): def declaration(self): decl = self.data_object.name if self.data_object.param: decl += "(" for i, parameter in enumerate(self.data_object.param): if i: decl += ", " decl += parameter.defname decl += ")" return decl def update_signature(self, signode): pass def description(self): return MemberDefTypeSubRenderer.description(self) class EnumMemberDefTypeSubRenderer(MemberDefTypeSubRenderer): def declaration(self): # Sphinx requires a name to be a valid identifier, so replace anonymous enum name of the # form @id generated by Doxygen with "anonymous". name = self.get_fully_qualified_name() return name.replace("@", "__anonymous") if self.data_object.name.startswith("@") else name def description(self): description_nodes = MemberDefTypeSubRenderer.description(self) name = self.node_factory.emphasis("", self.node_factory.Text("Values:")) title = self.node_factory.paragraph("", "", name) description_nodes.append(title) enums = [] for item in self.data_object.enumvalue: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) enums.extend(renderer.render()) description_nodes.extend(enums) return description_nodes def update_signature(self, signode): first_node = signode.children[0] if isinstance(first_node, self.node_factory.desc_annotation): # Replace "type" with "enum" in the signature. This is needed because older versions of # Sphinx cpp domain didn't have an enum directive and we use a type directive instead. first_node[0] = self.node_factory.Text("enum ") else: # If there is no "type" annotation, insert "enum". first_node.insert(0, self.node_factory.desc_annotation("enum ", "enum ")) if self.data_object.name.startswith("@"): signode.children[1][0] = self.node_factory.strong(text="[anonymous]") class TypedefMemberDefTypeSubRenderer(MemberDefTypeSubRenderer): def declaration(self): decl = get_definition_without_template_args(self.data_object) typedef = "typedef " if decl.startswith(typedef): decl = decl[len(typedef):] return decl class VariableMemberDefTypeSubRenderer(MemberDefTypeSubRenderer): def declaration(self): decl = get_definition_without_template_args(self.data_object) enum = 'enum ' return decl[len(enum):] if decl.startswith(enum) else decl def update_signature(self, signode): pass class EnumvalueTypeSubRenderer(MemberDefTypeSubRenderer): def objtype(self): return 'enumvalue' def update_signature(self, signode): # Remove "class" from the signature. This is needed because Sphinx cpp domain doesn't have # an enum value directive and we use a class directive instead. signode.children.pop(0) initializer = self.data_object.initializer if initializer: context = self.context.create_child_context(initializer) renderer = self.renderer_factory.create_renderer(context) nodes = renderer.render() separator = ' ' if not nodes[0].startswith('='): separator += '= ' signode.append(self.node_factory.Text(separator)) signode.extend(nodes) class DescriptionTypeSubRenderer(Renderer): def render(self): nodelist = [] # Get description in rst_nodes if possible for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class LinkedTextTypeSubRenderer(Renderer): def render(self): nodelist = [] # Recursively process where possible for i, entry in enumerate(self.data_object.content_): context = self.context.create_child_context(entry) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class ParamTypeSubRenderer(Renderer): def __init__( self, output_defname, *args ): Renderer.__init__(self, *args) self.output_defname = output_defname def render(self): nodelist = [] # Parameter type if self.data_object.type_: context = self.context.create_child_context(self.data_object.type_) renderer = self.renderer_factory.create_renderer(context) type_nodes = renderer.render() # Render keywords as annotations for consistency with the cpp domain. if len(type_nodes) > 0: first_node = type_nodes[0] for keyword in ['typename', 'class']: if first_node.startswith(keyword + ' '): type_nodes[0] = self.node_factory.Text(first_node.replace(keyword, '', 1)) type_nodes.insert(0, self.node_factory.desc_annotation(keyword, keyword)) break nodelist.extend(type_nodes) # Parameter name if self.data_object.declname: if nodelist: nodelist.append(self.node_factory.Text(" ")) nodelist.append(self.node_factory.emphasis(text=self.data_object.declname)) elif self.output_defname and self.data_object.defname: # We only want to output the definition name (from the cpp file) if the declaration name # (from header file) isn't present if nodelist: nodelist.append(self.node_factory.Text(" ")) nodelist.append(self.node_factory.emphasis(text=self.data_object.defname)) # array information if self.data_object.array: nodelist.append(self.node_factory.Text(self.data_object.array)) # Default value if self.data_object.defval: nodelist.append(self.node_factory.Text(" = ")) context = self.context.create_child_context(self.data_object.defval) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class DocRefTextTypeSubRenderer(Renderer): def render(self): nodelist = [] for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) for item in self.data_object.para: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) refid = "%s%s" % (self.project_info.name(), self.data_object.refid) nodelist = [ self.node_factory.pending_xref( "", reftype="ref", refdomain="std", refexplicit=True, refid=refid, reftarget=refid, *nodelist ) ] return nodelist class DocParaTypeSubRenderer(Renderer): """ tags in the Doxygen output tend to contain either text or a single other tag of interest. So whilst it looks like we're combined descriptions and program listings and other things, in the end we generally only deal with one per para tag. Multiple neighbouring instances of these things tend to each be in a separate neighbouring para tag. """ def render(self): nodelist = [] for item in self.data_object.content: # Description context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) for item in self.data_object.programlisting: # Program listings context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) for item in self.data_object.images: # Images context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) definition_nodes = [] for item in self.data_object.simplesects: # Returns, user par's, etc context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) definition_nodes.extend(renderer.render()) for item in self.data_object.parameterlist: # Parameters/Exceptions context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) definition_nodes.extend(renderer.render()) if definition_nodes: definition_list = self.node_factory.definition_list("", *definition_nodes) nodelist.append(definition_list) return [self.node_factory.paragraph("", "", *nodelist)] class DocImageTypeSubRenderer(Renderer): """Output docutils image node using name attribute from xml as the uri""" def render(self): path_to_image = self.project_info.sphinx_abs_path_to_file( self.data_object.name ) options = {"uri": path_to_image} return [self.node_factory.image("", **options)] class DocMarkupTypeSubRenderer(Renderer): def __init__( self, creator, *args ): Renderer.__init__(self, *args) self.creator = creator def render(self): nodelist = [] for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return [self.creator("", "", *nodelist)] class DocParamListTypeSubRenderer(Renderer): """Parameter/Exception documentation""" lookup = { "param": "Parameters", "exception": "Exceptions", "templateparam": "Template Parameters", "retval": "Return Value", } def render(self): nodelist = [] for item in self.data_object.parameteritem: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) # Fild list entry nodelist_list = self.node_factory.bullet_list("", classes=["breatheparameterlist"], *nodelist) term_text = self.lookup[self.data_object.kind] term = self.node_factory.term("", "", self.node_factory.strong("", term_text)) definition = self.node_factory.definition('', nodelist_list) return [self.node_factory.definition_list_item('', term, definition)] class DocParamListItemSubRenderer(Renderer): """ Parameter Description Renderer """ def render(self): nodelist = [] for item in self.data_object.parameternamelist: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) term = self.node_factory.literal("", "", *nodelist) separator = self.node_factory.Text(" - ") nodelist = [] if self.data_object.parameterdescription: context = self.context.create_child_context(self.data_object.parameterdescription) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return [self.node_factory.list_item("", term, separator, *nodelist)] class DocParamNameListSubRenderer(Renderer): """ Parameter Name Renderer """ def render(self): nodelist = [] for item in self.data_object.parametername: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class DocParamNameSubRenderer(Renderer): def render(self): nodelist = [] for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class DocSect1TypeSubRenderer(Renderer): def render(self): return [] class DocSimpleSectTypeSubRenderer(Renderer): """Other Type documentation such as Warning, Note, Returns, etc""" def title(self): text = self.node_factory.Text(self.data_object.kind.capitalize()) return [self.node_factory.strong("", text)] def render(self): nodelist = [] for item in self.data_object.para: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.append(self.node_factory.paragraph("", "", *renderer.render())) term = self.node_factory.term("", "", *self.title()) definition = self.node_factory.definition("", *nodelist) return [self.node_factory.definition_list_item("", term, definition)] class ParDocSimpleSectTypeSubRenderer(DocSimpleSectTypeSubRenderer): def title(self): context = self.context.create_child_context(self.data_object.title) renderer = self.renderer_factory.create_renderer(context) return [self.node_factory.strong("", *renderer.render())] class DocTitleTypeSubRenderer(Renderer): def render(self): nodelist = [] for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class DocForumlaTypeSubRenderer(Renderer): def render(self): nodelist = [] for item in self.data_object.content_: latex = item.getValue() # Somewhat hacky if statements to strip out the doxygen markup that slips through node = None # Either inline if latex.startswith("$") and latex.endswith("$"): latex = latex[1:-1] # If we're inline create a math node like the :math: role node = self.node_factory.math() else: # Else we're multiline node = self.node_factory.displaymath() # Or multiline if latex.startswith("\[") and latex.endswith("\]"): latex = latex[2:-2:] # Here we steal the core of the mathbase "math" directive handling code from: # sphinx.ext.mathbase node["latex"] = latex # Required parameters which we don't have values for node["label"] = None node["nowrap"] = False node["docname"] = self.state.document.settings.env.docname nodelist.append(node) return nodelist class ListingTypeSubRenderer(Renderer): def render(self): nodelist = [] for i, item in enumerate(self.data_object.codeline): # Put new lines between the lines. There must be a more pythonic way of doing this if i: nodelist.append(self.node_factory.Text("\n")) context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) # Add blank string at the start otherwise for some reason it renders # the pending_xref tags around the kind in plain text block = self.node_factory.literal_block( "", "", *nodelist ) return [block] class CodeLineTypeSubRenderer(Renderer): def render(self): nodelist = [] for item in self.data_object.highlight: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class HighlightTypeSubRenderer(Renderer): def render(self): nodelist = [] for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class TemplateParamListRenderer(Renderer): def render(self): nodelist = [] for i, item in enumerate(self.data_object.param): if i: nodelist.append(self.node_factory.Text(", ")) context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class IncTypeSubRenderer(Renderer): def render(self): if self.data_object.local == u"yes": text = '#include "%s"' % self.data_object.content_[0].getValue() else: text = '#include <%s>' % self.data_object.content_[0].getValue() return [self.node_factory.emphasis(text=text)] class RefTypeSubRenderer(CompoundRenderer): def __init__(self, compound_parser, *args): CompoundRenderer.__init__(self, compound_parser, False, *args) def get_node_info(self, file_data): name = self.data_object.content_[0].getValue() name = name.rsplit("::", 1)[-1] return name, file_data.compounddef.kind class VerbatimTypeSubRenderer(Renderer): def __init__(self, content_creator, *args): Renderer.__init__(self, *args) self.content_creator = content_creator def render(self): if not self.data_object.text.strip().startswith("embed:rst"): # Remove trailing new lines. Purely subjective call from viewing results text = self.data_object.text.rstrip() # Handle has a preformatted text return [self.node_factory.literal_block(text, text)] # do we need to strip leading asterisks? # NOTE: We could choose to guess this based on every line starting with '*'. # However This would have a side-effect for any users who have an rst-block # consisting of a simple bullet list. # For now we just look for an extended embed tag if self.data_object.text.strip().startswith("embed:rst:leading-asterisk"): lines = self.data_object.text.splitlines() # Replace the first * on each line with a blank space lines = map(lambda text: text.replace("*", " ", 1), lines) self.data_object.text = "\n".join(lines) # do we need to strip leading ///? elif self.data_object.text.strip().startswith("embed:rst:leading-slashes"): lines = self.data_object.text.splitlines() # Replace the /// on each line with three blank spaces lines = map(lambda text: text.replace("///", " ", 1), lines) self.data_object.text = "\n".join(lines) rst = self.content_creator(self.data_object.text) # Parent node for the generated node subtree node = self.node_factory.paragraph() node.document = self.state.document # Generate node subtree self.state.nested_parse(rst, 0, node) return node class MixedContainerRenderer(Renderer): def render(self): context = self.context.create_child_context(self.data_object.getValue()) renderer = self.renderer_factory.create_renderer(context) return renderer.render() class DocListNestedRenderer(object): """Decorator for the list type renderer. Creates the proper docutils node based on the sub-type of the underlying data object. Takes care of proper numbering for deeply nested enumerated lists. """ numeral_kind = ['arabic', 'loweralpha', 'lowerroman', 'upperalpha', 'upperroman'] def __init__(self, f): self.__render = f self.__nesting_level = 0 def __get__(self, obj, objtype): """ Support instance methods. """ import functools return functools.partial(self.__call__, obj) def __call__(self, rend_self): """ Call the wrapped render function. Update the nesting level for the enumerated lists. """ rend_instance = rend_self if rend_instance.data_object.node_subtype is "itemized": val = self.__render(rend_instance) return DocListNestedRenderer.render_unordered(rend_instance, children=val) elif rend_instance.data_object.node_subtype is "ordered": self.__nesting_level += 1 val = self.__render(rend_instance) self.__nesting_level -= 1 return DocListNestedRenderer.render_enumerated(rend_instance, children=val, nesting_level=self.__nesting_level) return [] @staticmethod def render_unordered(renderer, children): nodelist_list = renderer.node_factory.bullet_list("", *children) return [nodelist_list] @staticmethod def render_enumerated(renderer, children, nesting_level): nodelist_list = renderer.node_factory.enumerated_list("", *children) idx = nesting_level % len(DocListNestedRenderer.numeral_kind) nodelist_list['enumtype'] = DocListNestedRenderer.numeral_kind[idx] nodelist_list['prefix'] = '' nodelist_list['suffix'] = '.' return [nodelist_list] class DocListTypeSubRenderer(Renderer): """List renderer The specifics of the actual list rendering are handled by the decorator around the generic render function. """ @DocListNestedRenderer def render(self): """ Render all the children depth-first. """ nodelist = [] for item in self.data_object.listitem: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return nodelist class DocListItemTypeSubRenderer(Renderer): """List item renderer. """ def render(self): """ Render all the children depth-first. Upon return expand the children node list into a docutils list-item. """ nodelist = [] for item in self.data_object.para: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return [self.node_factory.list_item("", *nodelist)] class DocHeadingTypeSubRenderer(Renderer): """Heading renderer. Renders embedded headlines as emphasized text. Different heading levels are not supported. """ def render(self): nodelist = [] for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return [self.node_factory.emphasis("", "", *nodelist)] class DocURLLinkSubRenderer(Renderer): """Url Link Renderer""" def render(self): nodelist = [] for item in self.data_object.content_: context = self.context.create_child_context(item) renderer = self.renderer_factory.create_renderer(context) nodelist.extend(renderer.render()) return [self.node_factory.reference("", "", refuri=self.data_object.url, *nodelist)] breathe-4.1.0/breathe/renderer/rst/doxygen/filter.py000066400000000000000000001121611256765247000225120ustar00rootroot00000000000000""" Filters ------- Filters are an interesting and somewhat challenging part of the code base. They are used for two different purposes: - To figure out which nodes in the xml hierarchy to start rendering from. These are called 'finder filters' or 'content filters'. This is done before rendering starts. - To figure out which nodes under a selected nodes in the xml hierarchy should be rendered. These are called 'render filters'. This is done during the render process with a test in the DoxygenToRstRendererFactory. General Implementation ~~~~~~~~~~~~~~~~~~~~~~ Filters are essential just tests to see if a node matches certain parameters that are needed to decide whether or not to include it in some output. As these filters are declared once and then used on multiple nodes, we model them as object hierarchies that encapsulate the required test and take a node (with its context) and return True or False. If you wanted a test which figures out if a node has the node_type 'memberdef' you might create the following object hierarchy: node_is_memberdef = InFilter(AttributeAccessor(Node(), 'node_type'), ['memberdef']) This reads from the inside out, as get the node, then get the node_type attribute from it, and see if the value of the attribute is in the list ['memberdef']. The Node() is called a 'Selector'. Parent() is also a selector. It means given the current context, work with the parent of the current node rather than the node itself. This allows you to frame tests in terms of a node's parent as well as the node which helps when we want nodes with particular parents and not others. The AttributeAccessor() is called an 'Accessor'. It wraps up an attempt to access a particular attribute on the selected node. There are quite a few different specific accessors but they can mostly be generalised with the AttributeAccessor. This code has evolved over time and initially the implementation involved specific accessor classes (which are still used in large parts of it.) The InFilter() is unsurprisingly called a 'Filter'. There are lots of different filters. Filters either act on the results of Accessors or on the results of other Filters and they always return True or False. The AndFilter and the OrFilter can be used to combine the outputs of other Filters with logical 'and' and 'or' operations. You can build up some pretty complex expressions with this level of freedom as you might imagine. The complexity is unfortunate but necessary as the nature of filtering the xml is quite complex. Finder Filters ~~~~~~~~~~~~~~ The implementation of the filters can change a little depending on how they are called. Finder filters are called from the breathe.finder.doxygen.index and breathe.finder.doxygen.compound files. They are called like this: # Descend down the hierarchy # ... if filter_.allow(node_stack): matches.append(self.data_object) # Keep on descending # ... This means that the result of the filter does not stop us descending down the hierarchy and testing more nodes. This simplifies the filters as they only have to return true for the exact nodes they are interested in and they don't have to worry about allowing the iteration down the hierarchy to continue for nodes which don't match. An example of a finder filter is: AndFilter( InFilter(NodeTypeAccessor(Node()), ["compound"]), InFilter(KindAccessor(Node()), ["group"]), InFilter(NameAccessor(Node()), ["mygroup"]) ) This says, return True for all the nodes of node_type 'compound' with 'kind' set to 'group' which have the name 'mygroup'. It returns false for everything else, but when a node matching this is found then it is added to the matches list by the code above. It is therefore relatively easy to write finder filters. If you have two separate node filters like the one above and you want to match on both of them then you can do: OrFilter( node_filter_1, node_filter_2 ) To combine them. Content Filters ~~~~~~~~~~~~~~~ Content filters are harder than the finder filters as they are responsible for halting the iteration down the hierarchy if they return false. This means that if you're interested in memberdef nodes with a particular attribute then you have to check for that but also include a clause which allows all other non-memberdef nodes to pass through as you don't want to interrupt them. This means you end up with filters like this: OrFilter( AndFilter( InFilter(NodeTypeAccessor(Node()), ["compound"]), InFilter(KindAccessor(Node()), ["group"]), InFilter(NameAccessor(Node()), ["mygroup"]) ), NotFilter( AndFilter( InFilter(NodeTypeAccessor(Node()), ["compound"]), InFilter(KindAccessor(Node()), ["group"]), ) ) ) Which is to say that we want to let through a compound, with kind group, with name 'mygroup' but we're also happy if the node is **not** a compund with kind group. Really we just don't want to let through any compounds with kind group with name other than 'mygroup'. As such, we can rephrase this as: NotFilter( AndFilter( InFilter(NodeTypeAccessor(Node()), ["compound"]), InFilter(KindAccessor(Node()), ["group"]), NotFilter(InFilter(NameAccessor(Node()), ["mygroup"])) ) ) Using logical manipulation we can rewrite this as: OrFilter( NotFilter(InFilter(NodeTypeAccessor(Node()), ["compound"])), NotFilter(InFilter(KindAccessor(Node()), ["group"])), InFilter(NameAccessor(Node()), ["mygroup"]) ) We reads: allow if it isn't a compound, or if it is a compound but doesn't have a 'kind' of 'group', but if it is a compound and has a 'kind' of 'group then only allow it if it is named 'mygroup'. Helper Syntax ~~~~~~~~~~~~~ Some of these filter declarations get a little awkward to read and write. They are not laid out in manner which reads smoothly. Additional helper methods and operator overloads have been introduced to help with this. AttributeAccessor objects are created in property methods on the Selector classes so: node.kind Where node has been declared as a Node() instance. Results in: AttributeAccessor(Node(), 'kind') The '==' and '!=' operators on the Accessors have been overloaded to return the appropriate filters so that: node.kind == 'group' Results in: InFilter(AttributeAccessor(Node(), 'kind'), ['kind']) We also override the binary 'and' (&), 'or' (|) and 'not' (~) operators in Python to apply AndFilters, OrFilters and NotFilters respectively. We have to override the binary operators as they actual 'and', 'or' and 'not' operators cannot be overridden. So: (node.node_type == 'compound') & (node.name == 'mygroup') Translates to: AndFilter( InFilter(NodeTypeAccessor(Node()), ["compound"])), InFilter(NameAccessor(Node()), ["mygroup"]) ) Where the former is hopefully more readable without sacrificing too much to the abstract magic of operator overloads. Operator Precedences & Extra Parenthesis '''''''''''''''''''''''''''''''''''''''' As the binary operators have a lower operator precedence than '==' and '!=' and some other operators we have to include additional parenthesis in the expressions to group them as we want. So instead of writing: node.node_type == 'compound' & node.name == 'mygroup' We have to write: (node.node_type == 'compound') & (node.name == 'mygroup') """ import six class UnrecognisedKindError(Exception): pass class Selector(object): @property def node_type(self): return NodeTypeAccessor(self) @property def kind(self): return AttributeAccessor(self, 'kind') @property def node_name(self): return AttributeAccessor(self, 'node_name') @property def name(self): return AttributeAccessor(self, 'name') @property def briefdescription(self): return AttributeAccessor(self, 'briefdescription') @property def detaileddescription(self): return AttributeAccessor(self, 'detaileddescription') @property def prot(self): return AttributeAccessor(self, 'prot') @property def valueOf(self): return AttributeAccessor(self, 'valueOf_') @property def id(self): return AttributeAccessor(self, 'id') class Ancestor(Selector): def __init__(self, generations): self.generations = generations def __call__(self, node_stack): return node_stack[self.generations] class Parent(Selector): def __call__(self, node_stack): return node_stack[1] class Node(Selector): def __call__(self, node_stack): return node_stack[0] class Accessor(object): def __init__(self, selector): self.selector = selector def __eq__(self, value): return InFilter(self, [value]) def __ne__(self, value): return NotFilter(InFilter(self, [value])) def is_one_of(self, collection): return InFilter(self, collection) def has_content(self): return HasContentFilter(self) def endswith(self, options): return EndsWithFilter(self, options) class NameAccessor(Accessor): def __call__(self, node_stack): return self.selector(node_stack).name class NodeNameAccessor(Accessor): """Check the .node_name member which is declared on refTypeSub nodes It distinguishes between innerclass, innernamespace, etc. """ def __call__(self, node_stack): return self.selector(node_stack).node_name class NodeTypeAccessor(Accessor): def __call__(self, node_stack): data_object = self.selector(node_stack) try: return data_object.node_type except AttributeError as e: # Horrible hack to silence errors on filtering unicode objects # until we fix the parsing if type(data_object) == six.text_type: return "unicode" else: raise e class KindAccessor(Accessor): def __call__(self, node_stack): return self.selector(node_stack).kind class AttributeAccessor(Accessor): """Returns the value of a particular attribute on the selected node. AttributeAccessor(Node(), 'name') returns the value of ``node.name``. """ def __init__(self, selector, attribute_name): Accessor.__init__(self, selector) self.attribute_name = attribute_name def __call__(self, node_stack): return getattr(self.selector(node_stack), self.attribute_name) class LambdaAccessor(Accessor): def __init__(self, selector, func): Accessor.__init__(self, selector) self.func = func def __call__(self, node_stack): return self.func(self.selector(node_stack)) class NamespaceAccessor(Accessor): def __call__(self, node_stack): return self.selector(node_stack).namespaces class Filter(object): def __and__(self, other): return AndFilter(self, other) def __or__(self, other): return OrFilter(self, other) def __invert__(self): return NotFilter(self) class HasAncestorFilter(Filter): def __init__(self, generations): self.generations = generations def allow(self, node_stack): return len(node_stack) > self.generations class HasContentFilter(Filter): def __init__(self, accessor): self.accessor = accessor def allow(self, node_stack): """Detects if the node in questions has an empty .content_ property. """ return bool(self.accessor(node_stack).content_) class EndsWithFilter(Filter): """Detects if the string result of the accessor ends with any of the strings in the ``options`` iterable parameter. """ def __init__(self, accessor, options): self.accessor = accessor self.options = options def allow(self, node_stack): string = self.accessor(node_stack) for entry in self.options: if string.endswith(entry): return True return False class InFilter(Filter): """Checks if what is returned from the accessor is 'in' in the members""" def __init__(self, accessor, members): self.accessor = accessor self.members = members def allow(self, node_stack): name = self.accessor(node_stack) return name in self.members class GlobFilter(Filter): def __init__(self, accessor, glob): self.accessor = accessor self.glob = glob def allow(self, node_stack): text = self.accessor(node_stack) return self.glob.match(text) class FilePathFilter(Filter): def __init__(self, accessor, target_file, path_handler): self.accessor = accessor self.target_file = target_file self.path_handler = path_handler def allow(self, node_stack): location = self.accessor(node_stack).file if self.path_handler.includes_directory(self.target_file): # If the target_file contains directory separators then # match against the same length at the end of the location # location_match = location[-len(self.target_file):] return location_match == self.target_file else: # If there are no separators, match against the whole filename # at the end of the location # # This is to prevent "Util.cpp" matching "PathUtil.cpp" # location_basename = self.path_handler.basename(location) return location_basename == self.target_file class NamespaceFilter(Filter): def __init__(self, namespace_accessor, name_accessor): self.namespace_accessor = namespace_accessor self.name_accessor = name_accessor def allow(self, node_stack): namespaces = self.namespace_accessor(node_stack) name = self.name_accessor(node_stack) try: namespace, name = name.rsplit("::", 1) except ValueError: namespace, name = "", name return namespace in namespaces class OpenFilter(Filter): def allow(self, node_stack): return True class ClosedFilter(Filter): def allow(self, node_stack): return False class NotFilter(Filter): def __init__(self, child_filter): self.child_filter = child_filter def allow(self, node_stack): return not self.child_filter.allow(node_stack) class AndFilter(Filter): def __init__(self, *filters): self.filters = filters def allow(self, node_stack): # If any filter returns False then return False for filter_ in self.filters: if not filter_.allow(node_stack): return False return True class OrFilter(Filter): """Provides a short-cutted 'or' operation between two filters""" def __init__(self, *filters): self.filters = filters def allow(self, node_stack): # If any filter returns True then return True for filter_ in self.filters: if filter_.allow(node_stack): return True return False class IfFilter(Filter): def __init__(self, condition, if_true, if_false): self.condition = condition self.if_true = if_true self.if_false = if_false def allow(self, node_stack): if self.condition.allow(node_stack): return self.if_true.allow(node_stack) else: return self.if_false.allow(node_stack) class Glob(object): def __init__(self, method, pattern): self.method = method self.pattern = pattern def match(self, name): return self.method(name, self.pattern) class GlobFactory(object): def __init__(self, method): self.method = method def create(self, pattern): return Glob(self.method, pattern) class Gather(object): def __init__(self, accessor, names): self.accessor = accessor self.names = names def allow(self, node_stack): self.names.extend(self.accessor(node_stack)) return False class FilterFactory(object): # C++ style public entries public_kinds = set([ "public-type", "public-func", "public-attrib", "public-slot", "public-static-func", "public-static-attrib", ]) def __init__(self, globber_factory, path_handler): self.globber_factory = globber_factory self.path_handler = path_handler self.default_members = () self.implementation_filename_extensions = () def create_render_filter(self, kind, options): """Render filter for group & namespace blocks""" if kind not in ['group', 'namespace']: raise UnrecognisedKindError(kind) # Generate new dictionary from defaults filter_options = dict((entry, u'') for entry in self.default_members) # Update from the actual options filter_options.update(options) # Convert the doxygengroup members flag (which just stores None as the value) to an empty # string to allow the create_class_member_filter to process it properly if 'members' in filter_options: filter_options['members'] = u'' node = Node() grandparent = Ancestor(2) has_grandparent = HasAncestorFilter(2) non_class_memberdef = \ has_grandparent \ & (grandparent.node_type == 'compounddef') \ & (grandparent.kind != 'class') \ & (grandparent.kind != 'struct') \ & (node.node_type == 'memberdef') return (self.create_class_member_filter(filter_options) | non_class_memberdef) \ & self.create_innerclass_filter(filter_options) \ & self.create_outline_filter(filter_options) def create_class_filter(self, target, options): """Content filter for classes based on various directive options""" # Generate new dictionary from defaults filter_options = dict((entry, u'') for entry in self.default_members) # Update from the actual options filter_options.update(options) return AndFilter( self.create_class_member_filter(filter_options), self.create_innerclass_filter(filter_options, outerclass=target), self.create_outline_filter(filter_options), self.create_show_filter(filter_options), ) def create_innerclass_filter(self, options, outerclass=''): """ :param outerclass: Should be the class/struct being target by the directive calling this code. If it is a group or namespace directive then it should be left blank. It is used when looking for names listed in the :members: option. The name should include any additional namespaces that the target class is in. """ node = Node() node_is_innerclass = (node.node_type == "ref") & (node.node_name == "innerclass") parent = Parent() parent_is_compounddef = parent.node_type == 'compounddef' parent_is_class = parent.kind.is_one_of(['class', 'struct']) allowed = set() all_options = { 'protected-members': 'protected', 'private-members': 'private', } for option, scope in all_options.iteritems(): if option in options: allowed.add(scope) node_is_innerclass_in_class = parent_is_compounddef & parent_is_class & node_is_innerclass public_innerclass_filter = ClosedFilter() if 'members' in options: if options['members'].strip(): text = options["members"] prefix = ('%s::' % outerclass) if outerclass else '' # Matches sphinx-autodoc behaviour of comma separated values members = set(['%s%s' % (prefix, x.strip()) for x in text.split(",")]) node_valueOf_is_in_members = node.valueOf.is_one_of(members) # Accept any nodes which don't have a "sectiondef" as a parent or, if they do, only # accept them if their names are in the members list public_innerclass_filter = ~node_is_innerclass_in_class | node_valueOf_is_in_members else: allowed.add('public') node_is_in_allowed_scope = node.prot.is_one_of(allowed) innerclass = ~ node_is_innerclass_in_class | node_is_in_allowed_scope description = self._create_description_filter(True, 'compounddef', options) # Put parent check last as we only want to check parents of innerclass's otherwise we have # to check the parent's type as well return innerclass | public_innerclass_filter | description def create_show_filter(self, options): """Currently only handles the header-file entry""" try: text = options["show"] except KeyError: # Allow through everything except the header-file includes nodes return OrFilter( NotFilter(InFilter(NodeTypeAccessor(Parent()), ["compounddef"])), NotFilter(InFilter(NodeTypeAccessor(Node()), ["inc"])) ) if text == "header-file": # Allow through everything, including header-file includes return OpenFilter() # Allow through everything except the header-file includes nodes return OrFilter( NotFilter(InFilter(NodeTypeAccessor(Parent()), ["compounddef"])), NotFilter(InFilter(NodeTypeAccessor(Node()), ["inc"])) ) def _create_description_filter(self, allow, level, options): """Whether or not we allow descriptions is determined by the calling function and we just do whatever the 'allow' function parameter tells us. """ node = Node() node_is_description = node.node_type == 'description' parent = Parent() parent_is_level = parent.node_type == level # Nothing with a parent that's a sectiondef description_filter = ~ parent_is_level # Let through any description children of sectiondefs if we output any kind members if allow: description_filter = \ (parent_is_level & node_is_description) | ~ parent_is_level return description_filter def _create_public_members_filter(self, options): node = Node() node_is_memberdef = node.node_type == "memberdef" node_is_public = node.prot == "public" parent = Parent() parent_is_sectiondef = parent.node_type == "sectiondef" # Nothing with a parent that's a sectiondef is_memberdef = parent_is_sectiondef & node_is_memberdef public_members_filter = ~ is_memberdef # If the user has specified the 'members' option with arguments then we only pay attention # to that and not to any other member settings if "members" in options: if options['members'].strip(): text = options["members"] # Matches sphinx-autodoc behaviour of comma separated values members = set([x.strip() for x in text.split(",")]) node_name_is_in_members = node.name.is_one_of(members) # Accept any nodes which don't have a "sectiondef" as a parent or, if they do, only # accept them if their names are in the members list public_members_filter = \ (parent_is_sectiondef & node_name_is_in_members) | ~ parent_is_sectiondef else: # Select anything that doesn't have a parent which is a sectiondef, or, if it does, # only select the public ones public_members_filter = \ (is_memberdef & node_is_public) | ~ is_memberdef return public_members_filter def _create_non_public_members_filter(self, prot, option_name, options): """'prot' is the doxygen xml term for 'public', 'protected' and 'private' categories.""" node = Node() node_is_memberdef = node.node_type == "memberdef" node_is_public = node.prot == prot parent = Parent() parent_is_sectiondef = parent.node_type == "sectiondef" # Nothing with a parent that's a sectiondef is_memberdef = parent_is_sectiondef & node_is_memberdef filter_ = ~ is_memberdef if option_name in options: # Allow anything that isn't a memberdef, or if it is only allow the public ones filter_ = ~ is_memberdef | node_is_public return filter_ def _create_undoc_members_filter(self, options): node = Node() node_is_memberdef = node.node_type == 'memberdef' node_has_description = node.briefdescription.has_content() \ | node.detaileddescription.has_content() # Allow anything that isn't a memberdef, or if it is only allow the ones with a description undoc_members_filter = ~ node_is_memberdef | node_has_description if 'undoc-members' in options: undoc_members_filter = OpenFilter() return undoc_members_filter def create_class_member_filter(self, options): """Content filter based on :members: and :private-members: classes""" # I can't fully explain the filtering of descriptions here. More testing needed to figure # out when it is needed. This approach reflects the old code that was here but it wasn't # commented (my fault.) I wonder if maybe the public and private declarations themselves can # be documented and we need to let them through. Not sure. allow = 'members' in options \ or 'protected-members' in options \ or 'private-members' in options description = self._create_description_filter(allow, 'sectiondef', options) # Create all necessary filters and combine them public_members = self._create_public_members_filter(options) protected_members = self._create_non_public_members_filter( 'protected', 'protected-members', options ) private_members = self._create_non_public_members_filter( 'private', 'private-members', options ) undoc_members = self._create_undoc_members_filter(options) # Allow any public/private members which also fit the undoc filter and all the descriptions allowed_members = (public_members | protected_members | private_members) & undoc_members return allowed_members | description def create_outline_filter(self, options): if 'outline' in options: node = Node() return ~ node.node_type.is_one_of(["description", "inc"]) else: return OpenFilter() def create_file_filter(self, filename, options): valid_names = [] filter_ = AndFilter( NotFilter( # Gather the "namespaces" attribute from the # compounddef for the file we're rendering and # store the information in the "valid_names" list # # Gather always returns false, so, combined with # the NotFilter this chunk always returns true and # so does not affect the result of the filtering AndFilter( InFilter(NodeTypeAccessor(Node()), ["compounddef"]), InFilter(KindAccessor(Node()), ["file"]), FilePathFilter( LambdaAccessor(Node(), lambda x: x.location), filename, self.path_handler ), Gather(LambdaAccessor(Node(), lambda x: x.namespaces), valid_names) ) ), NotFilter( # Take the valid_names and everytime we handle an # innerclass or innernamespace, check that its name # was one of those initial valid names so that we # never end up rendering a namespace or class that # wasn't in the initial file. Notably this is # required as the location attribute for the # namespace in the xml is unreliable. AndFilter( InFilter(NodeTypeAccessor(Parent()), ["compounddef"]), InFilter(NodeTypeAccessor(Node()), ["ref"]), InFilter(NodeNameAccessor(Node()), ["innerclass", "innernamespace"]), NotFilter( InFilter( LambdaAccessor(Node(), lambda x: x.content_[0].getValue()), valid_names ) ) ) ), NotFilter( # Ignore innerclasses and innernamespaces that are inside a # namespace that is going to be rendered as they will be # rendered with that namespace and we don't want them twice AndFilter( InFilter(NodeTypeAccessor(Parent()), ["compounddef"]), InFilter(NodeTypeAccessor(Node()), ["ref"]), InFilter(NodeNameAccessor(Node()), ["innerclass", "innernamespace"]), NamespaceFilter( NamespaceAccessor(Parent()), LambdaAccessor(Node(), lambda x: x.content_[0].getValue()) ) ) ), NotFilter( # Ignore memberdefs from files which are different to # the one we're rendering. This happens when we have to # cross into a namespace xml file which has entries # from multiple files in it AndFilter( InFilter(NodeTypeAccessor(Node()), ["memberdef"]), NotFilter( FilePathFilter(LambdaAccessor(Node(), lambda x: x.location), filename, self.path_handler) ) ) ), NotFilter( # Ignore compounddefs which are from another file # (normally means classes and structs which are in a # namespace that we have other interests in) but only # check it if the compounddef is not a namespace # itself, as for some reason compounddefs for # namespaces are registered with just a single file # location even if they namespace is spread over # multiple files AndFilter( InFilter(NodeTypeAccessor(Node()), ["compounddef"]), NotFilter(InFilter(KindAccessor(Node()), ["namespace"])), NotFilter( FilePathFilter(LambdaAccessor(Node(), lambda x: x.location), filename, self.path_handler) ) ) ) ) return AndFilter( self.create_outline_filter(options), filter_ ) def create_content_filter(self, kind, options): """Returns a filter which matches the contents of the or namespace but not the group or namepace name or description. This allows the groups to be used to structure sections of the documentation rather than to structure and further document groups of documentation As a finder/content filter we only need to match exactly what we're interested in. """ if kind not in ['group', 'namespace']: raise UnrecognisedKindError(kind) node = Node() # Filter for public memberdefs node_is_memberdef = node.node_type == 'memberdef' node_is_public = node.prot == 'public' public_members = node_is_memberdef & node_is_public # Filter for public innerclasses parent = Parent() parent_is_compounddef = parent.node_type == 'compounddef' parent_is_class = parent.kind == kind node_is_innerclass = (node.node_type == "ref") & (node.node_name == "innerclass") node_is_public = node.prot == 'public' public_innerclass = parent_is_compounddef & parent_is_class \ & node_is_innerclass & node_is_public return public_members | public_innerclass def create_index_filter(self, options): filter_ = AndFilter( NotFilter( AndFilter( InFilter(NodeTypeAccessor(Parent()), ["compounddef"]), InFilter(NodeTypeAccessor(Node()), ["ref"]), InFilter(NodeNameAccessor(Node()), ["innerclass", "innernamespace"]) ) ), NotFilter( AndFilter( InFilter(NodeTypeAccessor(Parent()), ["compounddef"]), InFilter(KindAccessor(Parent()), ["group"]), InFilter(NodeTypeAccessor(Node()), ["sectiondef"]), InFilter(KindAccessor(Node()), ["func"]) ) ) ) return AndFilter( self.create_outline_filter(options), filter_ ) def create_open_filter(self): """Returns a completely open filter which matches everything""" return OpenFilter() def create_id_filter(self, node_type, refid): node = Node() return (node.node_type == node_type) & (node.id == refid) def create_file_finder_filter(self, filename): filter_ = AndFilter( InFilter(NodeTypeAccessor(Node()), ["compounddef"]), InFilter(KindAccessor(Node()), ["file"]), FilePathFilter(LambdaAccessor(Node(), lambda x: x.location), filename, self.path_handler) ) return filter_ def create_member_finder_filter(self, namespace, name, kind): """Returns a filter which looks for a member with the specified name and kind.""" node = Node() parent = Parent() node_matches = (node.node_type == 'member') \ & (node.kind == kind) \ & (node.name == name) if namespace: parent_matches = (parent.node_type == 'compound') \ & ((parent.kind == 'namespace') | (parent.kind == 'class')) \ & (parent.name == namespace) return parent_matches & node_matches else: is_implementation_file = parent.name.endswith(self.implementation_filename_extensions) parent_is_compound = parent.node_type == 'compound' parent_is_file = (parent.kind == 'file') & (~ is_implementation_file) parent_is_not_file = parent.kind != 'file' return (parent_is_compound & parent_is_file & node_matches) \ | (parent_is_compound & parent_is_not_file & node_matches) def create_function_finder_filter(self, namespace, name): parent = Parent() parent_is_compound = parent.node_type == 'compound' parent_is_group = parent.kind == 'group' function_filter = self.create_member_finder_filter(namespace, name, 'function') # Get matching functions but only ones where the parent is not a group. We want to skip # function entries in groups as we'll find the same functions in a file's xml output # elsewhere and having more than one match is confusing for our logic later on. return function_filter & ~(parent_is_compound & parent_is_group) def create_enumvalue_finder_filter(self, name): """Returns a filter which looks for an enumvalue with the specified name.""" node = Node() return (node.node_type == 'enumvalue') & (node.name == name) def create_compound_finder_filter(self, name, kind): """Returns a filter which looks for a compound with the specified name and kind.""" node = Node() return (node.node_type == 'compound') & (node.kind == kind) & (node.name == name) def create_finder_filter(self, kind, name): """Returns a filter which looks for the compound node from the index which is a group node (kind=group) and has the appropriate name The compound node should reference the group file which we can parse for the group contents. """ if kind == 'group': filter_ = AndFilter( InFilter(NodeTypeAccessor(Node()), ["compound"]), InFilter(KindAccessor(Node()), ["group"]), InFilter(NameAccessor(Node()), [name]) ) else: # Assume kind == 'namespace' filter_ = AndFilter( InFilter(NodeTypeAccessor(Node()), ["compound"]), InFilter(KindAccessor(Node()), ["namespace"]), InFilter(NameAccessor(Node()), [name]) ) return filter_ def get_config_values(self, app): """Extract the breathe_default_members config value and store it. This method is called on the 'builder-init' event in Sphinx""" self.default_members = app.config.breathe_default_members self.implementation_filename_extensions = \ app.config.breathe_implementation_filename_extensions breathe-4.1.0/breathe/renderer/rst/doxygen/index.py000066400000000000000000000102541256765247000223340ustar00rootroot00000000000000 from .base import Renderer class DoxygenTypeSubRenderer(Renderer): def render(self): nodelist = [] # Process all the compound children for compound in self.data_object.get_compound(): context = self.context.create_child_context(compound) compound_renderer = self.renderer_factory.create_renderer(context) nodelist.extend(compound_renderer.render()) return nodelist class CompoundRenderer(Renderer): """Base class for CompoundTypeSubRenderer and RefTypeSubRenderer.""" def __init__(self, compound_parser, render_empty_node, *args): self.compound_parser = compound_parser self.render_empty_node = render_empty_node Renderer.__init__(self, *args) def create_doxygen_target(self): """Can be overridden to create a target node which uses the doxygen refid information which can be used for creating links between internal doxygen elements. The default implementation should suffice most of the time. """ refid = "%s%s" % (self.project_info.name(), self.data_object.refid) return self.target_handler.create_target(refid) def render_signature(self, file_data, doxygen_target): # Defer to domains specific directive. name, kind = self.get_node_info(file_data) self.context.directive_args[1] = [self.get_fully_qualified_name()] nodes = self.run_domain_directive(kind, self.context.directive_args[1]) node = nodes[1] signode, contentnode = node.children # The cpp domain in Sphinx doesn't support structs at the moment, so change the text from "class " # to the correct kind which can be "class " or "struct ". signode[0] = self.node_factory.desc_annotation(kind + ' ', kind + ' ') # Check if there is template information and format it as desired template_signode = self.create_template_node(file_data.compounddef) if template_signode: node.insert(0, template_signode) node.children[0].insert(0, doxygen_target) return nodes, contentnode def render(self): # Read in the corresponding xml file and process file_data = self.compound_parser.parse(self.data_object.refid) parent_context = self.context.create_child_context(file_data) data_renderer = self.renderer_factory.create_renderer(parent_context) rendered_data = data_renderer.render() if not rendered_data and not self.render_empty_node: return [] file_data = parent_context.node_stack[0] new_context = parent_context.create_child_context(file_data.compounddef) nodes, contentnode = self.render_signature(file_data, self.create_doxygen_target()) if file_data.compounddef.includes: for include in file_data.compounddef.includes: context = new_context.create_child_context(include) renderer = self.renderer_factory.create_renderer(context) contentnode.extend(renderer.render()) contentnode.extend(rendered_data) return nodes class CompoundTypeSubRenderer(CompoundRenderer): def __init__(self, compound_parser, *args): CompoundRenderer.__init__(self, compound_parser, True, *args) def get_node_info(self, file_data): return self.data_object.name, self.data_object.kind class FileRenderer(CompoundTypeSubRenderer): def render_signature(self, file_data, doxygen_target): # Build targets for linking targets = [] targets.extend(doxygen_target) title_signode = self.node_factory.desc_signature() title_signode.extend(targets) # Set up the title name, kind = self.get_node_info(file_data) title_signode.append(self.node_factory.emphasis(text=kind)) title_signode.append(self.node_factory.Text(" ")) title_signode.append(self.node_factory.desc_name(text=name)) contentnode = self.node_factory.desc_content() node = self.node_factory.desc() node.document = self.state.document node['objtype'] = kind node.append(title_signode) node.append(contentnode) return [node], contentnode breathe-4.1.0/breathe/renderer/rst/doxygen/mask.py000066400000000000000000000035651256765247000221670ustar00rootroot00000000000000""" Masks ===== Masks are related to filters. Filters can block the processing of particular parts of the xml hierarchy but they can only work on node level. If the part of the xml hierarchy that you want to filter out is read in as an instance of one of the classes in parser/doxygen/*.py then you can use the filters. However, if you want to filter out an attribute from one of the nodes (and some of the xml child nodes are read in as attributes on their parents) then you can't use a filter. We introduce the Mask's to fulfil this need. The masks are designed to be applied to a particular node type and to limit the access to particular attributes on the node. For example, then NoParameterNamesMask wraps a node a returns all its standard attributes but returns None for the 'declname' and 'defname' attributes. Currently the Mask functionality is only used for the text signature rendering for doing function matching. """ class NoParameterNamesMask(object): def __init__(self, data_object): self.data_object = data_object def __getattr__(self, attr): if attr in ['declname', 'defname', 'defval']: return None return getattr(self.data_object, attr) class MaskFactory(object): def __init__(self, lookup): self.lookup = lookup def mask(self, data_object): try: node_type = data_object.node_type except AttributeError as e: # Horrible hack to silence errors on filtering unicode objects # until we fix the parsing if type(data_object) == unicode: node_type = "unicode" else: raise e if node_type in self.lookup: Mask = self.lookup[node_type] return Mask(data_object) return data_object class NullMaskFactory(object): def mask(self, data_object): return data_object breathe-4.1.0/breathe/renderer/rst/doxygen/target.py000066400000000000000000000021111256765247000225040ustar00rootroot00000000000000 class TargetHandler(object): def __init__(self, project_info, node_factory, document): self.project_info = project_info self.node_factory = node_factory self.document = document def create_target(self, id_): """Creates a target node and registers it with the document and returns it in a list""" target = self.node_factory.target(ids=[id_], names=[id_]) try: self.document.note_explicit_target(target) except Exception: # TODO: We should really return a docutils warning node here print("Warning: Duplicate target detected: %s" % id_) return [target] class NullTargetHandler(object): def create_target(self, refid): return [] class TargetHandlerFactory(object): def __init__(self, node_factory): self.node_factory = node_factory def create_target_handler(self, options, project_info, document): if options.has_key("no-link"): return NullTargetHandler() return TargetHandler(project_info, self.node_factory, document) breathe-4.1.0/documentation/000077500000000000000000000000001256765247000160155ustar00rootroot00000000000000breathe-4.1.0/documentation/.gitignore000066400000000000000000000000311256765247000177770ustar00rootroot00000000000000/build /view /comparison breathe-4.1.0/documentation/Makefile000066400000000000000000000154501256765247000174620ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR ?= build DEBUG ?= -P # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = $(DEBUG) -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/test.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/test.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/test" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/test" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." spelling: $(SPHINXBUILD) -b spelling -N $(ALLSPHINXOPTS) $(BUILDDIR)/spelling @echo @echo "Build finished. The spelling files are in $(BUILDDIR)/spelling." breathe-4.1.0/documentation/compare000077500000000000000000000025531256765247000173760ustar00rootroot00000000000000#!/bin/sh first=$1 second=$2 firstdir=comparison/first seconddir=comparison/second # Remember the branch we're on currentbranch=`git symbolic-ref --short HEAD` # Make sure the output directory exists mkdir -p comparison # Remove any previous builds rm -fr $firstdir rm -fr $seconddir export BREATHE_COMPARE=True # Checkout the first target echo git checkout $1 git checkout $1 # Run doxygen for this state (cd ../examples/specific; make) (cd ../examples/tinyxml; make) (cd ../examples/doxygen; make) # Clean current sphinx build directory make clean # Make sure the BUILDDIR variable can be overridden in the Makfile. Required for older commits sed -i 's/BUILDDIR = build/BUILDDIR ?= build/g' Makefile # Build into our first comparison directory make html BUILDDIR=$firstdir # Reset the Makefile to its state for this commit git checkout Makefile # Checkout the second target and repeat echo git checkout $2 git checkout $2 (cd ../examples/specific; make) (cd ../examples/tinyxml; make) (cd ../examples/doxygen; make) make clean sed -i 's/BUILDDIR = build/BUILDDIR ?= build/g' Makefile make html BUILDDIR=$seconddir git checkout Makefile # Return to our current branch echo git checkout $currentbranch git checkout $currentbranch # Launch meld to compare the two html directories echo meld $firstdir/html $seconddir/html meld $firstdir/html $seconddir/html breathe-4.1.0/documentation/source/000077500000000000000000000000001256765247000173155ustar00rootroot00000000000000breathe-4.1.0/documentation/source/_static/000077500000000000000000000000001256765247000207435ustar00rootroot00000000000000breathe-4.1.0/documentation/source/_static/breathe.css000066400000000000000000000005011256765247000230630ustar00rootroot00000000000000 /* -- breathe specific styles ----------------------------------------------- */ /* So enum value descriptions are displayed inline to the item */ .breatheenumvalues li tt + p { display: inline; } /* So parameter descriptions are displayed inline to the item */ .breatheparameterlist li tt + p { display: inline; } breathe-4.1.0/documentation/source/autofile.rst000066400000000000000000000006711256765247000216630ustar00rootroot00000000000000 .. _autodoxygenfile-example: autodoxygenfile Directive Example ================================= Working Example --------------- This should work:: .. autodoxygenfile:: auto_class.h :source: auto With the following config value:: breathe_projects_source = { "auto" : ( "../examples/specific", ["auto_class.h"] ) } It produces this output: .. autodoxygenfile:: auto_class.h :project: auto :no-link: breathe-4.1.0/documentation/source/autoindex.rst000066400000000000000000000006711256765247000220530ustar00rootroot00000000000000 .. _autodoxygenindex-example: autodoxygenindex Directive Example ================================== Working Example --------------- This should work:: .. autodoxygenindex:: :project: auto With the following config value:: breathe_projects_source = { "auto" : ( "../examples/specific", ["auto_function.h", "auto_class.h"] ) } It produces this output: .. autodoxygenindex:: :project: auto :no-link: breathe-4.1.0/documentation/source/class.rst000066400000000000000000000134061256765247000211600ustar00rootroot00000000000000 .. _class-example: doxygenclass Directive ====================== This directive generates the appropriate output for a single class. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options. ``members`` Designed to behavior in a similar manner to the ``members`` option for the ``autoclass`` directive that comes with the Sphinx ``autodoc`` extension. If you do not specify this option you will not get any information about the class members, just the general class documentation. If you provide it without arguments, then Breathe adds all the public members and their documentation. If you specify it with **comma separated** arguments, then Breathe will treat the arguments as names of members and provide documentation for only those members that have been named. ``protected-members`` If specified, the protected members of the class will be displayed. ``private-members`` If specified, the private members of the class will be displayed. ``undoc-members`` If specified, the undocumented members of the class will be displayed. If you would like to always specify some combination of ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` then you can use the :ref:`breathe_default_members ` configuration variable to set it in the ``conf.py``. .. contents:: Basic Example ------------- This displays the class documentation without any members: .. code-block:: rst .. doxygenclass:: Nutshell :project: nutshell It produces this output: .. doxygenclass:: Nutshell :project: nutshell :no-link: Template Specialisation Example ------------------------------- You can reference class template specialisations by include the specialisation in the name: .. code-block:: rst .. doxygenclass:: TemplateClass< T * > :project: template_specialisation Produces this output: .. doxygenclass:: TemplateClass< T * > :project: template_specialisation :no-link: Where as without the specialisation, the directive references the generic declaration: .. code-block:: rst .. doxygenclass:: TemplateClass :project: template_specialisation Produces this output: .. doxygenclass:: TemplateClass :project: template_specialisation :no-link: Members Example --------------- This directive call will display the class documentation with all the public members: .. code-block:: rst .. doxygenclass:: Nutshell :project: nutshell :members: It produces this output: .. doxygenclass:: Nutshell :project: nutshell :members: :no-link: Specific Members Example ------------------------ This displays the class documentation with only the members listed in the ``:members:`` option: .. code-block:: rst .. doxygenclass:: Nutshell :project: nutshell :members: crack, isCracked It produces this output: .. doxygenclass:: Nutshell :project: nutshell :members: crack, isCracked :no-link: Protected Members ----------------- This displays only the protected members of the class. Normally this is combined with the ``:members:`` option to show the public members as well. .. code-block:: rst .. doxygenclass:: GroupedClassTest :project: group :protected-members: It produces this output: .. doxygenclass:: GroupedClassTest :project: group :protected-members: :no-link: Private Members --------------- This displays only the private members of the class. Normally this is combined with the ``:members:`` option to show the public members as well. .. code-block:: rst .. doxygenclass:: Nutshell :project: nutshell :private-members: It produces this output: .. doxygenclass:: Nutshell :project: nutshell :private-members: :no-link: Undocumented Members -------------------- This displays the undocumented members of the class which are suppressed by default. Undocumented public members are only shown if the ``:members:`` option is also used. The same goes for the undocumented private members and the ``private-members`` option. .. code-block:: rst .. doxygenclass:: ClassTest :project: class :members: :private-members: :undoc-members: It produces this output: .. doxygenclass:: ClassTest :project: classtest :members: :private-members: :undoc-members: :no-link: .. note:: Undocumented classes are still not shown in the output due to an implementation issue. Please post an issue on github if you would like this resolved. Outline Example --------------- This displays only the names of the class members and not their documentation. The ``:members:`` and ``:private-members:`` options determine which members are displayed. .. code-block:: rst .. doxygenclass:: Nutshell :project: nutshell :members: :outline: It produces this output: .. doxygenclass:: Nutshell :project: nutshell :members: :outline: :no-link: Qt Slots Example ---------------- Doxygen is aware of Qt Slots and so Breathe can pick them up and display them in the output. They are displayed in appropriate ``Public Slots``, ``Protected Slots`` and ``Private Slots`` sections. .. code-block:: rst .. doxygenclass:: QtSlotExample :project: qtslots :members: Produces the following output: .. doxygenclass:: QtSlotExample :project: qtslots :members: :no-link: Failing Example --------------- This intentionally fails: .. code-block:: rst .. doxygenclass:: made_up_class :project: class :members: It produces the following warning message: .. warning:: doxygenclass: Cannot find class “made_up_class†in doxygen xml output for project “class†from directory: ../../examples/doxygen/class/xml/ breathe-4.1.0/documentation/source/code/000077500000000000000000000000001256765247000202275ustar00rootroot00000000000000breathe-4.1.0/documentation/source/code/groups.h000066400000000000000000000012521256765247000217170ustar00rootroot00000000000000// Example from Doxygen documentation /** A class. More details about the Test class */ class Test { public: //@{ /** Same documentation for both members. Details */ void func1InGroup1(); void func2InGroup1(); //@} /** Function without group. Details. */ void ungroupedFunction(); void func1InCustomGroup(); protected: void func2InCustomGroup(); }; void Test::func1InGroup1() {} void Test::func2InGroup1() {} /** @name Custom Group * Description of custom group */ //@{ /** Function 2 in custom group. Details. */ void Test::func2InCustomGroup() {} /** Function 1 in custom group. Details. */ void Test::func1InCustomGroup() {} //@} breathe-4.1.0/documentation/source/code/namespaces.h000066400000000000000000000004031256765247000225140ustar00rootroot00000000000000 /*! A namespace for nothing. */ namespace test_namespace { /*! A very important class. */ class Sample1 { public: Sample1() {} }; /*! Even more important class */ class Sample2 { Sample2() {} }; /*! A function in the namespace */ void foo() {} } breathe-4.1.0/documentation/source/code/nested_list_1.h000066400000000000000000000006441256765247000231410ustar00rootroot00000000000000/** * \file nested_list_1.h * Example of nested lists in documentation. */ /** * A list of events: * - mouse events * -# mouse move event * -# mouse click event\n * More info about the click event. * -# mouse double click event * - keyboard events * 1. key down event * 2. key up event * * More text here. */ class NestedLists_1 { }; breathe-4.1.0/documentation/source/code/nested_list_2.h000066400000000000000000000010511256765247000231330ustar00rootroot00000000000000/** * \file nested_list_2.h * Example of nested list in documentation. */ /** * Text before the list * - list item 1 * - sub item 1 * - sub sub item 1 * - sub sub item 2 * . * The dot above ends the sub sub item list. * * More text for the first sub item * . * The dot above ends the first sub item. * * More text for the first list item * - sub item 2 * - sub item 3 * - list item 2 * . * More text in the same paragraph. * * More text in a new paragraph. */ class NestedLists_2 { }; breathe-4.1.0/documentation/source/code/nested_list_3.h000066400000000000000000000007311256765247000231400ustar00rootroot00000000000000/** * \file nested_list_3.h * Example of nested lists in documentation. */ /*! * A list of events: *
    *
  • mouse events *
      *
    1. mouse move event *
    2. mouse click event
      * More info about the click event. *
    3. mouse double click event *
    *
  • keyboard events *
      *
    1. key down event *
    2. key up event *
    *
* More text here. */ class NestedLists_3 { }; breathe-4.1.0/documentation/source/code/nested_list_4.h000066400000000000000000000010751256765247000231430ustar00rootroot00000000000000/** * \file nested_list_4.h * Example of nested lists in documentation. */ /** * A list of events: * 1. mouse events * -# mouse move event * 1. swipe event * 2. circle event * 3. wave event * -# mouse click event\n * More info about the click event. * -# mouse double click event * 2. keyboard events * -# key down event * -# key up event * 3. touch events * -# pinch event * -# swipe event * More text here. */ class NestedLists_4 { }; breathe-4.1.0/documentation/source/code/nested_list_5.h000066400000000000000000000012071256765247000231410ustar00rootroot00000000000000/** * \file nested_list_4.h * Example of nested lists in documentation. */ /** * A deeply nested list of events: * 1. mouse events * -# mouse move event * 1. swipe event * -# swipe left * -# swipe right * 2. circle event * 3. wave event * -# mouse click event\n * More info about the click event. * -# mouse double click event * 2. keyboard events * -# key down event * -# key up event * 3. touch events * -# pinch event * -# swipe event * More text here. */ class NestedLists_5 { }; breathe-4.1.0/documentation/source/code/nutshell.h000066400000000000000000000015031256765247000222350ustar00rootroot00000000000000/** \file nutshell.h An overly extended example of how to use breathe */ /*! With a little bit of a elaboration, should you feel it necessary. */ class Nutshell { public: //! Our tool set /*! The various tools we can opt to use to crack this particular nut */ enum Tool { kHammer = 0, //!< What? It does the job kNutCrackers, //!< Boring kNinjaThrowingStars //!< Stealthy }; //! Nutshell constructor Nutshell(); //! Nutshell destructor ~Nutshell(); /*! Crack that shell with specified tool \param tool - the tool with which to crack the nut */ void crack( Tool tool ); /*! \return Whether or not the nut is cracked */ bool isCracked(); private: //! Our cracked state bool m_isCracked; }; breathe-4.1.0/documentation/source/codeguide.rst000066400000000000000000000250321256765247000220010ustar00rootroot00000000000000 .. _codeguide: How It Works ============ There are three main sections to Breathe: parser, finders and renderers. Briefly: **parser** Responsible for reading the doxygen xml output and creating objects representing the data. Found in ``breathe.parser``. **finders** Responsible for finding reference objects within the output from the parser. Found in ``breathe.finder``. **renderers** Responsible for producing reStructuredText nodes to represent the objects that the finders have found. The renderers generally descend through the object hierarchies rendering the objects, their children, their children's children and so on. Found in ``breathe.renderer``. Parser ------ The parsers job is to parse the doxygen xml output and create a hierarchy of Python objects to represent the xml data. Doxygen XML Output ~~~~~~~~~~~~~~~~~~ The xml output from doxygen comes in multiple files. There is always an ``index.xml`` file which is a central reference point and contains a list of all the other files that have been generated by doxygen and an indication of what they contain. For example, in ``examples/doxygen/func/xml`` directory, the ``index.xml`` file contains:: Test member func.h This suggests there is additional information about a class called **Test** which has a function called **member**. Additionally there is some more information about a file called **func.h**. Now, the ``refid`` attribute on the ``compound`` xml nodes gives an indication of where the additional information can be found. So for the **Test** class, we should look in ``class_test.xml``, which we get by simply appending ``.xml`` to the ``refid`` value, and for the **func.h** file we should look in ``func_8h.xml``. So the ``index.xml`` file is unique in its role and has its own structure which is defined in the ``index.xsd`` file which you will also find in the same directory. All the other files, the ones referenced by the ``index.xml`` file, follow another structure. This is described in ``compound.xsd`` file so we call these other files **compound** files. These are generally longer than the ``index.xml`` file and contain all the specific information you might expect from doxygen, including any documentation you added to your code as doxygen markup. Have a look at ``examples/doxygen/func/xml/class_test.xml`` for a fairly short example. Doing the Parsing ~~~~~~~~~~~~~~~~~ To get things up and running quickly, I have used the `generateDS `_ project to help create classes to parse the doxygen xml output. The script automatically creates the ``compound.py``, ``compoundsuper.py``, ``index.py`` and ``indexsuper.py`` files that you can see inside ``breathe/parser/doxygen``. So what is the difference between ``index.py`` and ``indexsuper.py``, and ``compound.py`` and ``compoundsuper.py``? These files allow us to separate the bulk of the automatically generated code from the code changes we might want to make. There are a large number of classes in the ``...super.py`` files and each one has a basic derived class in the corresponding non-super files. It is designed so that all the hard work done by the generated code is done in the ``...super.py`` files and if we need to make changes we can do them in the derived classes in the non-super files and if we ever need to regenerate the code, we only regenerate the ``...super.py`` files and so we don't lose our changes in the process. The end result is that for the parsing, we have written relatively little code, but have a large amount automatically generated for us. This has only been done once and it seems relatively unlikely that we'll do it again. The entry points to the parsing code is the ``parse`` functions at the bottom of the ``breathe.parser.doxygen.compound`` and ``breathe.parser.doxygen.index``. I have never really examined the details of the parsing but you can see that there is a class for each node type you are likely to find in the xml files. I say "node type" instead of just "node" because different nodes can share the same type and there is one class per type. For example, there are **detaileddescription** nodes and **briefdescription** nodes which are both of type **descriptionType**. If we look in ``breathe.parser.doxygen.compoundsuper`` we see a **descriptionType** class and in ``breathe.parser.doxygen.compound`` we see a **descriptionTypeSub** class which is derived from **descriptionType**. Our Changes ~~~~~~~~~~~ You'll notice there are some classes in the non-super files that have some additional code in them. This tends to be adjusting the ``buildChildren`` member function in the derived class to extend or override the one in the automatically generated base class. We have to do this sometimes as it seems the original code we generated with ``generateDS`` fails to construct the children of some classes. The ``generateDS`` scripts uses the descriptions in the ``.xsd`` files to determine what classes to generate and what nodes can be the children of other nodes. It is possible that the doxygen ``.xsd`` files contain levels of abstraction that the ``generateDS`` project did not cope with at the time I used it. It is possible that newer versions would handle it better but for the moment I'm content updating the derived classes to handle the cases I see missing. Finders ------- The finder classes have a relatively small but important job of finding objects in the hierarchy generated by the parsers. For example, when a user specifies a particular class for the :ref:`doxygenclass directive `, we use the finder classes to go and find the object corresponding to that class. In fact, if you look closely, it is the finders that use the parser entry points to parse the xml and then find the objects. The finders also use ``Filter`` objects to actually figure out if they have found what they are looking for. The finder is given a hierarchy of filter objects which are designed to match at different levels of the XML hierarchy. Filters can also represent logical conditions such as 'and' and 'or'. More Details, Please ~~~~~~~~~~~~~~~~~~~~ So initially, we create a finder to look at the root of the hierarchy: the **doxygenTypeSub** node. That finder, handily called **DoxygenTypeSubItemFinder** (you'll notice a lot of that) looks through all the child compound nodes of the **doxygenTypeSub** node and tries a compound-level match against each of them and if something matches it creates a **CompoundTypeSubItemFinder** to look further. In turn, that checks each of its member child nodes with a member-level match and if it finds one it creates a **MemberTypeSubItemFinder** (see the pattern?) and that does another check. The interesting part is, if that is successful, the **CompoundTypeSubItemFinder** finds the corresponding xml file that has more information in it (remember ``refid + .xml``?) and parses that and creates another finder to start looking in there. This time it is a **DoxygenTypeSubItemFinder** from the ``breathe.finder.doxygen.compound`` module. And the search goes on until we find an object to return for rendering. If the **CompoundTypeSubItemFinder** fails to find any deeper levels to match against then it returns itself as it must be the target we're interested in. As stated, the job of the finder is to find a single node for the renderers to starting rendering to reStructuredText. That is all the finder does. Renderers --------- Finally, the bit that really does something we care about. Rendering is the art of turning whatever object we've found in the hierarchy into reStructuredText nodes. This almost invariably means most of its children as well. Much like with the finder classes, we start off creating a renderer for a particular parser object and then it looks at its children and uses the renderer factory to create appropriate renderers for those objects and tells them to render and they look at their object's children and create appropriate renderers for those and so on and so forth. The node we start at is determined by the finder and ultimately by the user. The whole process is kicked off by the ``Builder`` class, though it doesn't really do much. The aim of the renderers is to return a list of reStructuredText nodes which is passed back to Sphinx to render into whatever you're final output format is. There are two complicated bits here. All the different renderers and all the different reStructuredText nodes. Different Renderers ~~~~~~~~~~~~~~~~~~~ Just like with the parsers, there is one renderer per node type. In fact there is one renderer class per parser class and they are named almost the same and are designed to match up. The renderers look at the data on the instance of the corresponding parser class that they have been given and grab the interesting bits and return reStructuredText nodes. For reference on what there is to render, you can look at the parser class definitions or at the raw xml to see what attributes there are to render. Sometimes if something isn't appearing in the final output, it is because the renderer isn't returning an reStructuredText representation of it so the rendering code needs to be updated, and sometimes it is because the parser classes are not picking it up properly so both the parser and the renderer code needs to be updated. Given a little bit of time, you get used to chasing through the xml nodes, the parser classes and the corresponding renderers to figure out where all the information is ending up. reStructuredText Nodes ~~~~~~~~~~~~~~~~~~~~~~ We use the reStructuredText API as provided by the fabulous docutils project and extended by Sphinx itself. For the most part, they are fairly straight forward and they are certainly well named. Unfortunately there are a lot of nodes and only certain ways of combining them. It is also not always clear what arguments their constructs take. Whilst I'm sure it would be possible to figure it out with time and the appropriate source code, the use of them is not something I've found very well documented and my code largely operates on a basis of trial and error. One day I'm sure I'll be enlightened, until then expect fairly naive code. breathe-4.1.0/documentation/source/conf.py000066400000000000000000000306421256765247000206210ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # BreatheExample documentation build configuration file, created by # sphinx-quickstart on Tue Feb 3 18:20:48 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed automatically). # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os import subprocess import re # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. #sys.path.append(os.path.abspath('.')) # General configuration # --------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'breathe', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig' ] read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' travis_build = os.environ.get('TRAVIS_CI', None) == 'True' # Get a description of the current position. Use Popen for 2.6 compat git_tag = subprocess.Popen(['git', 'describe', '--tags'], stdout=subprocess.PIPE).communicate()[0] # Convert to unicode for python3 git_tag = unicode(git_tag) if travis_build: # Don't attempt to set the path as breathe is installed to virtualenv on travis # Set values with simple strings version = '\'travis\'' release = '\'travis\'' documentation_build = 'travis' elif read_the_docs_build: # On RTD we'll be in the 'source' directory sys.path.append('../../') # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '\'unknown\'' # The full version, including alpha/beta/rc tags. release = '\'unknown\'' # Check if it matches a pure tag number vX.Y.Z, rather than vX.Y.Z-91-g8676988 which is how # non-tagged commits are described (ie. relative to the last tag) if re.match(r'^v\d+\.\d+\.\d+$', git_tag): # git_tag is a pure version number (no subsequent commits) version = git_tag release = git_tag documentation_build = "readthedocs" else: version = '\'latest\'' release = '\'latest\'' documentation_build = "readthedocs_latest" else: # For our usual dev build we'll be in the 'documentation' directory sys.path.append('../') # Check if it matches a pure tag number vX.Y.Z, rather than vX.Y.Z-91-g8676988 which is how # non-tagged commits are described (ie. relative to the last tag) if re.match(r'^v\d+\.\d+\.\d+$', git_tag): # git_tag is a pure version number (no subsequent commits) version = git_tag release = git_tag else: version = '\'latest\'' release = '\'latest\'' documentation_build = "development" # If we're doing a comparison then set the version & release to 'compare' so that they are always # the same otherwise they can come up as changes when we really don't care if they are different. comparison = os.environ.get('BREATHE_COMPARE', None) == 'True' if comparison: version = 'compare' release = 'compare' # Only add spelling extension if it is available. We don't know if it is installed as we don't want # to put it in the setup.py file as a dependency as we don't want Breathe to be dependent on it as # people should be able to use Breathe without 'spelling'. There might be a better way to handle # this. try: import sphinxcontrib.spelling extensions.append('sphinxcontrib.spelling') except ImportError: pass # Configuration for spelling extension spelling_word_list_filename='spelling_wordlist.txt' spelling_lang='en_US' # Configuration for mathjax extension # # Set path for mathjax js to a https URL as sometimes the Breathe docs are displayed under https # and we can't load an http mathjax file from an https view of the docs. So we change to a https # mathjax file which we can load from http or https. We break the url over two lines. mathjax_path = 'https://c328740.ssl.cf1.rackcdn.com/' \ 'mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8' # The master toctree document. master_doc = 'index' # General information about the project. project = u'Breathe' copyright = u'2009-2014, Michael Jones' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = [] # List of directories, relative to source directory, that shouldn't be searched # for source files. exclude_trees = [] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # Options for breathe extension # ----------------------------- breathe_projects = { "class":"../../examples/doxygen/class/xml/", "classtest":"../../examples/specific/class/xml/", "struct":"../../examples/specific/struct/xml/", "decl_impl":"../../examples/specific/decl_impl/xml/", "structcmd":"../../examples/doxygen/structcmd/xml/", "tinyxml":"../../examples/tinyxml/tinyxml/xml/", "restypedef":"../../examples/doxygen/restypedef/xml/", "nutshell":"../../examples/specific/nutshell/xml/", "rst":"../../examples/specific/rst/xml/", "c_file":"../../examples/specific/c_file/xml/", "namespace":"../../examples/specific/namespacefile/xml/", "userdefined":"../../examples/specific/userdefined/xml/", "template_function":"../../examples/specific/template_function/xml/", "template_class":"../../examples/specific/template_class/xml/", "template_class_non_type": "../../examples/specific/template_class_non_type/xml/", "template_specialisation": "../../examples/specific/template_specialisation/xml/", "latexmath":"../../examples/specific/latexmath/xml/", "functionOverload":"../../examples/specific/functionOverload/xml/", "programlisting":"../../examples/specific/programlisting/xml/", "image":"../../examples/specific/image/xml/", "lists":"../../examples/specific/lists/xml/", "group":"../../examples/specific/group/xml/", "union":"../../examples/specific/union/xml/", "qtslots":"../../examples/specific/qtslots/xml/", "array":"../../examples/specific/array/xml/", "c_enum":"../../examples/specific/c_enum/xml/", } breathe_projects_source = { "auto" : ( "../../examples/specific", [ "auto_function.h", "auto_class.h" ] ) } breathe_default_project = "tinyxml" breathe_domain_by_extension = { "h" : "cpp", "py": "py", } breathe_domain_by_file_pattern = { "*/class.h" : "cpp", "*/alias.h" : "c", "*/c_enum.h" : "c", } # Options for HTML output # ----------------------- # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. # html_style = 'default.css' html_theme = "haiku" # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_use_modindex = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, the reST sources are included in the HTML build as _sources/. #html_copy_source = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'BreatheExampledoc' # Options for LaTeX output # ------------------------ # The paper size ('letter' or 'a4'). #latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ ('index', 'BreatheExample.tex', ur'BreatheExample Documentation', ur'Michael Jones', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # Additional stuff for the LaTeX preamble. #latex_preamble = '' # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_use_modindex = True def run_doxygen(folder): """Run the doxygen make command in the designated folder""" try: retcode = subprocess.call("cd %s; make DOXYGEN=doxygen" % folder, shell=True) if retcode < 0: sys.stderr.write("doxygen terminated by signal %s" % (-retcode)) except OSError as e: sys.stderr.write("doxygen execution failed: %s" % e) def generate_doxygen_xml(app): """Run the doxygen make commands if we're on the ReadTheDocs server""" read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' if read_the_docs_build: # Attempt to build the doxygen files on the RTD server. Explicitly override the path/name used # for executing doxygen to simply be 'doxygen' to stop the makefiles looking for the executable. # This is because the `which doxygen` effort seemed to fail when tested on the RTD server. run_doxygen("../../examples/doxygen") run_doxygen("../../examples/specific") run_doxygen("../../examples/tinyxml") def setup(app): # Approach borrowed from the Sphinx docs app.add_object_type( 'confval', 'confval', objname='configuration value', indextemplate='pair: %s; configuration value' ) # Add hook for building doxygen xml when needed app.connect("builder-inited", generate_doxygen_xml) app.add_config_value('documentation_build', 'development', True) breathe-4.1.0/documentation/source/contributing.rst000066400000000000000000000034551256765247000225650ustar00rootroot00000000000000 Contributing to Breathe ======================= There are four main ways you might consider contributing to Breathe. Give It A Go ------------ **...and let me know!** Firstly, the more people using it the better, but more than that, hearing about the project being put to use is a great motivator for the developer, namely me. Report Bugs & Suggest Features ------------------------------ Embarrassingly I don't get to use Breathe that much in my general work, so it doesn't really get pushed beyond the test code we have here in the repository. If you use it and find issues with it, minor or major, please let me know and if possible provide some detail so I can reproduce it. With the help of those who have posted issues on the github issue tracker we've managed to track down and improve some of the less obvious (and some more obvious!) parts of Breathe that weren't working properly. Improve the Documentation ------------------------- I've made an effort to document Breathe so it is usable, but I have a twisted perspective on the whole thing as I made it. I've already had some help with the documentation, which was greatly appreciated, but if you managed to get it working and find that the documentation could have been clearer in parts, let me know or write up a paragraph or two that would have helped you when you were trying it. Fork It! And Improve the Code ----------------------------- If you find a bug, quite like Python and have some time, then grab a copy of the code and have a go at fixing it. Nothing motivates me quite like other people caring enough to put a bit of time into working on it. The contributions we've had this way have been great and much appreciated. If you want to help out, take a look at the :ref:`code guide` to see how it is all structured and works. breathe-4.1.0/documentation/source/credits.rst000066400000000000000000000030021256765247000214770ustar00rootroot00000000000000 Credits ======= Thank you to: - `nijel `_ - `sebastianschaetz `_ - `mbolivar `_ - `queezythegreat `_ - `abingham `_ - `davidm `_ - `hobu `_ - `magro11 `_ - `scopatz `_ - `vitaut `_ - `vonj `_ - `jmnas `_ - `donkopotamus `_ - `jo3w4rd `_ - `Anthony Truchet `_ - `Daniel Matz `_ - `Andrew Hundt `_ - `sebastinas `_ - `robo9k `_ - `sieben `_ - `rweickelt `_ - `sam-roth `_ - `bnewbold `_ - `serge-sans-paille `_ For their contributions; reporting bugs, suggesting features, improving the code and working on the documentation. And thanks to: - Dimitri van Heesch for `Doxygen `_. - Georg Brandl for `Sphinx `_. - David Goodger for `Docutils `_ and reStructuredText. And thank you to whoever made the ``haiku`` theme for Sphinx. breathe-4.1.0/documentation/source/customcss.rst000066400000000000000000000011471256765247000220750ustar00rootroot00000000000000 .. highlight:: css Custom CSS ========== In order to help with the output styling in HTML, Breathe attaches some custom classes to parts of the document. There are three such classes: **breatheparameterlist** Used to keep the description of a parameter displayed inline with the parameter name. The Breathe docs use:: .breatheparameterlist li tt + p { display: inline; } **breatheenumvalues** Used to keep the description of an enum displayed inline with the enum name. The Breathe docs use:: .breatheenumvalues li tt + p { display: inline; } breathe-4.1.0/documentation/source/define.rst000066400000000000000000000011631256765247000213020ustar00rootroot00000000000000 .. _define-example: doxygendefine Directive Example =============================== Working Example --------------- This should work:: .. doxygendefine:: WRITE_TREE_MISSING_OK :project: c_file It produces this output: .. doxygendefine:: WRITE_TREE_MISSING_OK :project: c_file Failing Example --------------- This intentionally fails:: .. doxygendefine:: MADEUPDEFINE :project: define It produces the following warning message: .. warning:: doxygendefine: Cannot find define "MADEUPDEFINE" in doxygen xml output for project "define" in directory: ../../examples/specific/define/xml breathe-4.1.0/documentation/source/differences.rst000066400000000000000000000017631256765247000223330ustar00rootroot00000000000000 Deviations from Doxygen & Autodoc ================================= As Breathe attempts to bridge the gap between Sphinx and Doxygen it is confined by both what Doxygen outputs in its XML and what Sphinx will accept through the Docutils document model. This leads to a few differences between Breathe output and the Doxygen HTML output and the Sphinx Autodoc output. These are incomplete lists but we're keen to expand them as issues are brought to our attention. Doxygen ------- - Doxygen allows both HTML and Markdown syntax for headings in comments. These are rendered as standard HTML headings in the output (h1, h2, h3, etc.) RestructuredText only allows headings at the start of document sections and you cannot put arbitrary sections into the output to gain the appearance of headings so any headings found in the doxygen comments are rendered as emphasized text in the Breathe HTML output. Sphinx Autodoc -------------- - No differences highlighted yet, though they certainly exist. breathe-4.1.0/documentation/source/directives.rst000066400000000000000000000320521256765247000222120ustar00rootroot00000000000000Directives & Config Variables ============================= .. toctree:: :hidden: autoindex function struct class namespace enum enumvalue typedef union define variable file group autofile .. contents:: Table of Contents Directives ---------- The available directives are shown below. In each case the ``project``, ``path``, ``no-link`` and ``outline`` options have the following meaning: ``project`` Specifies which project, as defined in the ``breathe_projects`` config value, should be used for this directive. This overrides the default project if one has been specified. This is not used by the ``autodoxygenindex`` directive. Use ``source`` instead to specify the entry in the ``breathe_projects_source`` config value to use. ``path`` Directly specifies the path to the folder with the doxygen output. This overrides the project and default project if they have been specified. This is not used by the ``autodoxygenindex`` directive. Use ``source-path`` instead to specify the root path to the sources files which are to be processed. ``no-link`` Instructs Breathe to not attempt to generate any document targets for the content generated by this particular directive. This allows you to have your main reference listings somewhere with targets, but then to be able to sneak in repeat directives into other parts of the documentation to illustrate particular points without Sphinx getting confused what should be linked to by other references. ``outline`` Results in Breathe only outputting the raw code definitions without any additional description information. If neither project nor path are provided on the directive then breathe will expect the :ref:`breathe_default_project ` config value to be set. .. _doxygenclass: doxygenclass ~~~~~~~~~~~~ This directive generates the appropriate output for a single class. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options:: .. doxygenclass:: :project: ... :path: ... :members: [...] :protected-members: :private-members: :undoc-members: :outline: :no-link: Checkout the :ref:`doxygenclass documentation ` for more details and to see it in action. doxygendefine ~~~~~~~~~~~~~ This directive generates the appropriate output for a single preprocessor define. It behaves the same as the doxygenstruct directive. :: .. doxygendefine:: :project: ... :path: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygenenum ~~~~~~~~~~~ This directive generates the appropriate output for a single enum. It behaves the same as the doxygenstruct directive. :: .. doxygenenum:: :project: ... :path: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygenenumvalue ~~~~~~~~~~~~~~~~ This directive generates the appropriate output for a single enum value. :: .. doxygenenumvalue:: :project: ... :path: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygenfile ~~~~~~~~~~~ This directive generates the appropriate output for the contents of a source file. :: .. doxygenfile:: :project: ... :path: ... :no-link: Checkout the :ref:`example ` to see it in action. autodoxygenfile ~~~~~~~~~~~~~~~ This directive is this ``auto`` version of the doxygenfile directive above. It handles the doxygen xml generation for you like the other auto directives. :: .. autodoxygenfile:: :project: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygenfunction ~~~~~~~~~~~~~~~ This directive generates the appropriate output for a single function. The function name is required to be unique in the project. :: .. doxygenfunction:: :project: ... :path: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygengroup ~~~~~~~~~~~~ This directive generates the appropriate output for the contents of a doxygen group. A doxygen group can be declared with specific doxygen markup in the source comments as covered in the `doxygen documentation`_. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``content-only``, ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options. :: .. doxygengroup:: :project: ... :path: ... :content-only: :outline: :members: :protected-members: :private-members: :undoc-members: :no-link: Checkout the :ref:`doxygengroup documentation ` for more details and to see it in action. .. _doxygen documentation: http://www.stack.nl/~dimitri/doxygen/manual/grouping.html .. _doxygenindex: doxygenindex ~~~~~~~~~~~~ This directive processes and produces output for everything described by the Doxygen xml output. It reads the ``index.xml`` file and process everything referenced by it. :: .. doxygenindex:: :project: ... :path: ... :outline: :no-link: autodoxygenindex ~~~~~~~~~~~~~~~~ This directive performs a similar role to the ``doxygenindex`` directive except that it handles the doxygen xml generation for you. It uses the ``breathe_projects_source`` configuration dictionary to judge which code source files should have doxygen xml generated for them. The ``project`` directive option associates the directive with a particular project in the ``breathe_projects_source`` dictionary. All the files references by the entry in the ``breathe_projects_source`` will be included in the output. In addition, any options specified in ``breathe_doxygen_config_options`` will be added to the generated Doxygen config file. Thank you to `Scopatz `_ for the idea and initial implementation. :: .. autodoxygenindex:: :project: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygennamespace ~~~~~~~~~~~~~~~~ This directive generates the appropriate output for the contents of a namespace. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``content-only``, ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options. To reference a nested namespace, the full namespaced path must be provided, e.g. ``foo::bar`` for the ``bar`` namespace inside the ``foo`` namespace. :: .. doxygennamespace:: :project: ... :path: ... :content-only: :outline: :members: :protected-members: :private-members: :undoc-members: :no-link: Checkout the :ref:`doxygennamespace documentation ` for more details and to see it in action. doxygenstruct ~~~~~~~~~~~~~ This directive generates the appropriate output for a single struct. The struct name is required to be unique in the project. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options. :: .. doxygenstruct:: :project: ... :path: ... :members: :protected-members: :private-members: :undoc-members: :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygentypedef ~~~~~~~~~~~~~~ This directive generates the appropriate output for a single typedef. It behaves the same as the doxygenstruct directive. :: .. doxygentypedef:: :project: ... :path: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygenunion ~~~~~~~~~~~~ This directive generates the appropriate output for a single union. It behaves the same as the doxygenstruct directive. :: .. doxygenunion:: :project: ... :path: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. doxygenvariable ~~~~~~~~~~~~~~~ This directive generates the appropriate output for a single variable. It behaves the same as the doxygenstruct directive. :: .. doxygenvariable:: :project: ... :path: ... :outline: :no-link: Checkout the :ref:`example ` to see it in action. Config Values ------------- .. confval:: breathe_projects This should be a dictionary in which the keys are project names and the values are paths to the folder containing the doxygen output for that project. .. _default_project: .. confval:: breathe_default_project This should match one of the keys in the :confval:`breathe_projects` dictionary and indicates which project should be used when the project is not specified on the directive. .. confval:: breathe_domain_by_extension Allows you to specify domains for particular files according to their extension. For example:: breathe_domain_by_extension = { "h" : "cpp", } .. confval:: breathe_domain_by_file_pattern Allows you to specify domains for particular files by wildcard syntax. This is checked after :confval:`breathe_domain_by_extension` and so will override it when necessary. For example:: breathe_domain_by_file_pattern = { "\*/alias.h" : "c", } If you wanted all ``.h`` header files to be treated as being in the **cpp** domain you might use the :confval:`breathe_domain_by_extension` example above. But if you had one ``.h`` file that should be treated as being in the **c** domain then you can override as above. .. confval:: breathe_projects_source A dictionary in which the keys are project names and the values are a tuple of the directory and a list of file names of the source code for those projects that you would like to be automatically processed with doxygen. If you have some files in:: /some/long/path/to/myproject/file.c /some/long/path/to/myproject/subfolder/otherfile.c Then you can set:: breathe_projects_source = { "myprojectsource" : ( "/some/long/path/to/myproject", [ "file.c", "subfolder/otherfile.c" ] ) } Then your ``autodoxygenfile`` usage can look like this:: .. autodoxygenfile:: file.c :source: myprojectsource The directory entry in the tuple can be an empty string if the entries in the list are full paths. .. confval:: breathe_build_directory In order to process the ``autodoxygenindex`` Breathe has to run ``doxygen`` to create the xml files for processing. This config value specifies the root directory that these files should be created in. By default, this is set to the parent directory of the ``doctrees`` output folder which is the normal build directory. You can change it with this setting if you have a custom set up. Breathe will take the final value and append ``breathe/doxygen/`` to the path to minimize conflicts. .. _breathe-default-members: .. confval:: breathe_default_members Provides the directive flags that should be applied to all directives which take ``:members:``, ``:private-members:`` and ``:undoc-members:`` options. By default, this is set to an empty list, which means no members are displayed. If you'd like to always display the public and public, undocumented members then you could set it like this:: breathe_default_members = ('members', 'undoc-members') .. _breathe-implementation-filename-extensions: .. confval:: breathe_implementation_filename_extensions Provides a list of the filename extensions which are considered to be implementation files. These files are ignored when the ``doxygenfunction`` directive looks for unnamespaced function names. This is to avoid the issue where the same function name appears in the doxygen XML output for a header file and implementation file because the declaration is in one and the definition is in the other. Doxygen appends the documentation from the definition to the XML for the declaration so we don't miss any documentation information from the implementation files. The default value for this variable is:: breathe_implementation_filename_extensions = ['.c', '.cc', '.cpp'] .. _breathe-doxygen-config-options: .. confval:: breathe_doxygen_config_options A dictionary in which the keys and values are the names and values of config options to be placed in the Doxygen config file generated by ``autodoxygenindex``. For instance, this:: breathe_doxygen_config_options = {'EXCLUDE_SYMBOLS': 'abc123'} would place ``EXCLUDE_SYMBOLS=abc123`` in the config file. The default value is the empty dictionary. breathe-4.1.0/documentation/source/domains.rst000066400000000000000000000105151256765247000215030ustar00rootroot00000000000000 Domains ======= Breathe has some limited support for Sphinx domains. It tries to output targets that the Sphinx domain references expect. This should allow you to use Sphinx domain roles like ``:c:func:`foo``` to link to output from Breathe. The following targets are supported: * C & C++ functions * C++ classes Class Example ------------- Given the following Breathe directives:: .. doxygenclass:: testnamespace::NamespacedClassTest :path: ../../examples/specific/class/xml Which create formatted output like: .. doxygenclass:: testnamespace::NamespacedClassTest :path: ../../examples/specific/class/xml We can refer to **NamespacedClassTest** using:: :cpp:class:`testnamespace::NamespacedClassTest` which renders as :cpp:class:`testnamespace::NamespacedClassTest`, or using:: :cpp:class:`another reference ` which renders as: :cpp:class:`another reference `. Inner Class Example ------------------- Given the following Breathe directive:: .. doxygenclass:: OuterClass :path: ../../examples/specific/class/xml :members: Which create formatted output like: .. doxygenclass:: OuterClass :path: ../../examples/specific/class/xml :members: We can refer to **OuterClass::InnerClass** using:: :cpp:class:`OuterClass::InnerClass` which renders as :cpp:class:`OuterClass::InnerClass`. Function Examples ----------------- Given the following Breathe directives:: .. doxygenfunction:: testnamespace::NamespacedClassTest::function :path: ../../examples/specific/class/xml .. doxygenfunction:: frob_foos :path: ../../examples/specific/alias/xml Which create formatted output like: .. doxygenfunction:: testnamespace::NamespacedClassTest::function :path: ../../examples/specific/class/xml .. doxygenfunction:: frob_foos :path: ../../examples/specific/alias/xml We can refer to **function** using:: :cpp:func:`testnamespace::NamespacedClassTest::function()` which renders as :cpp:func:`testnamespace::NamespacedClassTest::function()`, or using:: :cpp:func:`another reference ` which renders as: :cpp:func:`another reference `. Note the use of the **cpp** domain. And we can refer to **frob_foos** using:: :c:func:`frob_foos()` which renders as: :c:func:`frob_foos()`, or using:: :c:func:`another reference ` which renders as: :c:func:`another reference `. Note the use of the **c** domain. Typedef Examples ---------------- Given the following Breathe directives:: .. doxygentypedef:: TestTypedef :path: ../../examples/specific/typedef/xml .. doxygentypedef:: testnamespace::AnotherTypedef :path: ../../examples/specific/typedef/xml .. doxygenclass:: TestClass :path: ../../examples/specific/typedef/xml :members: which create formatted output like: .. doxygentypedef:: TestTypedef :path: ../../examples/specific/typedef/xml .. doxygentypedef:: testnamespace::AnotherTypedef :path: ../../examples/specific/typedef/xml .. doxygenclass:: TestClass :path: ../../examples/specific/typedef/xml :members: We can refer to **TestTypedef** using:: :cpp:type:`TestTypedef` which renders as :cpp:type:`TestTypedef`, to **testnamespace::AnotherTypedef** using:: :cpp:type:`testnamespace::AnotherTypedef` which renders as :cpp:type:`testnamespace::AnotherTypedef` and to **TestClass::MemberTypedef** using:: :cpp:type:`TestClass::MemberTypedef` which renders as :cpp:type:`TestClass::MemberTypedef`. Enum Value Examples ------------------- Given the following Breathe directives:: .. doxygenenumvalue:: VALUE :path: ../../examples/specific/enum/xml .. doxygenenumvalue:: testnamespace::FIRST :path: ../../examples/specific/enum/xml Which create formatted output like: .. doxygenenumvalue:: VALUE :path: ../../examples/specific/enum/xml .. doxygenenumvalue:: testnamespace::FIRST :path: ../../examples/specific/enum/xml We can refer to **VALUE** using:: :cpp:member:`VALUE` which renders as :cpp:member:`VALUE` and to **testnamespace::FIRST** using :: :cpp:member:`testnamespace::FIRST` which renders as :cpp:member:`testnamespace::FIRST`. breathe-4.1.0/documentation/source/doxygen.rst000066400000000000000000000041261256765247000215270ustar00rootroot00000000000000 Doxygen Test Suite ================== Class ----- .. doxygenindex:: :project: class Define ------ .. doxygenindex:: :path: ../../examples/doxygen/define/xml Enum ---- .. doxygenindex:: :path: ../../examples/doxygen/enum/xml File ----- .. doxygenindex:: :path: ../../examples/doxygen/file/xml Func ---- .. doxygenindex:: :path: ../../examples/doxygen/func/xml Page ---- .. doxygenindex:: :path: ../../examples/doxygen/page/xml Relates ------- .. doxygenindex:: :path: ../../examples/doxygen/relates/xml Author ------ .. doxygenindex:: :path: ../../examples/doxygen/author/xml Par --- .. doxygenindex:: :path: ../../examples/doxygen/par/xml Overload -------- .. doxygenindex:: :path: ../../examples/doxygen/overload/xml Example ------- .. doxygenindex:: :path: ../../examples/doxygen/example/xml Include ------- .. doxygenindex:: :path: ../../examples/doxygen/include/xml QtStyle ------- .. doxygenindex:: :path: ../../examples/doxygen/qtstyle/xml JdStyle ------- .. doxygenindex:: :path: ../../examples/doxygen/jdstyle/xml StructCmd --------- .. doxygenindex:: :path: ../../examples/doxygen/structcmd/xml Autolink -------- .. doxygenindex:: :path: ../../examples/doxygen/autolink/xml ResTypeDef ---------- .. doxygenindex:: :path: ../../examples/doxygen/restypedef/xml AfterDoc -------- .. doxygenindex:: :path: ../../examples/doxygen/afterdoc/xml Template -------- .. doxygenindex:: :path: ../../examples/doxygen/template/xml Tag --- .. doxygenindex:: :path: ../../examples/doxygen/tag/xml Group ----- .. doxygenindex:: :path: ../../examples/doxygen/group/xml Diagrams -------- .. doxygenindex:: :path: ../../examples/doxygen/diagrams/xml Memgrp ------ .. doxygenindex:: :path: ../../examples/doxygen/memgrp/xml Docstring --------- .. doxygenindex:: :path: ../../examples/doxygen/docstring/xml PyExample --------- .. doxygenindex:: :path: ../../examples/doxygen/pyexample/xml Mux --- .. doxygenindex:: :path: ../../examples/doxygen/mux/xml Manual ------ .. doxygenindex:: :path: ../../examples/doxygen/manual/xml breathe-4.1.0/documentation/source/embeddedrst.rst000066400000000000000000000002011256765247000223220ustar00rootroot00000000000000 Embedded ReStructuredText ========================= .. doxygenindex:: :path: ../../examples/specific/rst/xml :no-link: breathe-4.1.0/documentation/source/enum.rst000066400000000000000000000013561256765247000210200ustar00rootroot00000000000000 .. _enum-example: doxygenenum Directive Example =============================== Working Example --------------- This should work:: .. doxygenenum:: NodeType :project: tinyxml It produces this output: .. doxygenenum:: NodeType :project: tinyxml :no-link: Example with Namespace ---------------------- This should work:: .. doxygenenum:: foo::ns::Letters :project: namespace It produces this output: .. doxygenenum:: foo::ns::Letters :project: namespace :no-link: Failing Example --------------- This intentionally fails:: .. doxygenenum:: made_up_enum :project: restypedef It produces the following warning message: .. warning:: doxygenenum: Cannot find enum "made_up_enum" in doxygen xml output breathe-4.1.0/documentation/source/enumvalue.rst000066400000000000000000000014501256765247000220500ustar00rootroot00000000000000 .. _enumvalue-example: doxygenenumvalue Directive Example ================================== Working Example --------------- This should work:: .. doxygenenumvalue:: TIXML_NO_ERROR :project: tinyxml It produces this output: .. doxygenenumvalue:: TIXML_NO_ERROR :project: tinyxml :no-link: Example with Namespace ---------------------- This should work:: .. doxygenenumvalue:: foo::ns::A :project: namespace It produces this output: .. doxygenenumvalue:: foo::ns::A :project: namespace :no-link: Failing Example --------------- This intentionally fails:: .. doxygenenumvalue:: made_up_enumvalue :project: restypedef It produces the following warning message: .. warning:: doxygenenumvalue: Cannot find enumvalue "made_up_enumvalue" in doxygen xml output breathe-4.1.0/documentation/source/file.rst000066400000000000000000000023541256765247000207720ustar00rootroot00000000000000 .. _file-example: doxygenfile Directive Example ============================= Example ------- This should work:: .. doxygenfile:: nutshell.h :project: nutshell It produces this output: ---- .. doxygenfile:: nutshell.h :project: nutshell :no-link: Example with Nested Namespaces ------------------------------ This should work:: .. doxygenfile:: namespacefile.h :project: namespace It produces this output: ---- .. doxygenfile:: namespacefile.h :project: namespace Example for Multiple Files -------------------------- When there are multiple files with the same name in the project, you need to be more specific with the filename you provide. For example, in a project with the following two files:: /some/long/project/path/parser/Util.h /some/long/project/path/finder/Util.h You should specify:: .. doxygenfile:: parser/Util.h .. doxygenfile:: finder/Util.h To uniquely identify them. Failing Example --------------- This intentionally fails:: .. doxygenfile:: made_up_file.h :project: nutshell It produces the following warning message: .. warning:: Cannot find file "made_up_file.h" in doxygen xml output for project "nutshell" from directory: ../../examples/specific/nutshell/xml/ breathe-4.1.0/documentation/source/function.rst000066400000000000000000000027271256765247000217040ustar00rootroot00000000000000 .. _function-example: doxygenfunction Directive Example ================================= This directive generates the appropriate output for a single function. The function name, including namespace, is required to be unique in the project. For functions which have a declaration and definition in separate files, doxygen generates two entries for the function and Breathe can get confused when faced with this. As a result Breathe ignores what it considers to be the implementation files when searching for the XML for the function documentation. In order to do this, it ignores any entries in files which have filename extensions listed in the :ref:`breathe_implementation_filename_extensions ` config variable. Working Example --------------- This should work:: .. doxygenfunction:: open :project: structcmd It produces this output: .. doxygenfunction:: open :project: structcmd :no-link: Separated Declaration & Implementation Example ---------------------------------------------- This should work:: .. doxygenfunction:: open_di :project: decl_impl It produces this output: .. doxygenfunction:: open_di :project: decl_impl :no-link: Failing Example --------------- This intentionally fails:: .. doxygenfunction:: made_up_function :project: structcmd It produces the following warning message: .. warning:: doxygenfunction: Cannot find function "made_up_function" in doxygen xml output breathe-4.1.0/documentation/source/group.rst000066400000000000000000000131561256765247000212110ustar00rootroot00000000000000 .. _group-example: doxygengroup Directive ====================== This directive generates the appropriate output for the contents of a doxygen group. A doxygen group can be declared with specific doxygen markup in the source comments as cover in the `doxygen documentation`_. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``content-only``, ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options. ``content-only`` If this flag is specified, then the directive does not output the name of the group or the group description and instead outputs the contents of the group. This can be useful if the groups are only used for organizational purposes and not to provide additional information. ``members`` If specified, the public members of any classes in the group output will be displayed. Unlike the ``doxygenclass`` ``members`` option, this does not optionally take a list of member names to display as this will be applied across multiple classes within the group. ``protected-members`` If specified, the protected members of any classes in the group output will be displayed. ``private-members`` If specified, the private members of any classes in the group output will be displayed. ``undoc-members`` If specified, the undocumented members of any classes in the group output will be displayed provided the appropriate ``members`` or ``private-members`` options are specified as well. If you would like to always specify some combination of ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` then you can use the :ref:`breathe_default_members ` configuration variable to set it in the ``conf.py``. .. _doxygen documentation: http://www.stack.nl/~dimitri/doxygen/manual/grouping.html .. contents:: Basic Example ------------- The plain ``doxygengroup`` directive will output the group name and description and any top level publicly visible members of the group. .. code-block:: rst .. doxygengroup:: mygroup :project: group It produces this output: .. doxygengroup:: mygroup :project: group :no-link: Content-Only Example -------------------- The ``content-only`` option changes the output to only include the content of the group and not the group name or description. So this: .. code-block:: rst .. doxygengroup:: mygroup :project: group :content-only: Produces this output: .. doxygengroup:: mygroup :project: group :content-only: :no-link: .. note:: As you can see from the output, section headings like 'Functions' are missing from the :content-only: display. This is due to an implementation detail. If post an issue on github if you'd like it addressed. Members Example --------------- The ``members`` option changes the output to include the public members of any classes. The output for any class in the group should be the same as if it had be produced by the :ref:`doxygenclass directive ` with the ``members`` option specified. :: .. doxygengroup:: mygroup :project: group :members: It produces this output: .. doxygengroup:: mygroup :project: group :members: :no-link: Protected Members Example ------------------------- The ``protected-members`` option changes the output to include the protected members of any classes. The output for any class in the group should be the same as if it had be produced by the :ref:`doxygenclass directive ` with the ``protected-members`` option specified. :: .. doxygengroup:: mygroup :project: group :protected-members: It produces this output: .. doxygengroup:: mygroup :project: group :protected-members: :no-link: Private-Members Example ----------------------- The ``private-members`` option changes the output to include the private members of any classes. The output for any class in the group should be the same as if it had be produced by the :ref:`doxygenclass directive ` with the ``private-members`` option specified. .. code-block:: rst .. doxygengroup:: mygroup :project: group :private-members: Produces this output: .. doxygengroup:: mygroup :project: group :private-members: :no-link: Undocumented Members Example ---------------------------- The ``undoc-members`` option changes the output to include any undocumentated members from the sections (public, protected, private) that are being displayed for the classes in the group output. .. code-block:: rst .. doxygengroup:: mygroup :project: group :private-members: :undoc-members: Produces this output: .. doxygengroup:: mygroup :project: group :private-members: :undoc-members: :no-link: .. note:: Undocumented classes are still not shown in the output due to an implementation issue. Please post an issue on github if you would like this resolved. Outline Example --------------- This displays only the names of the members of the group and not their documentation. The other options determine which members are displayed. .. code-block:: rst .. doxygengroup:: mygroup :project: group :members: :outline: It produces this output: .. doxygengroup:: mygroup :project: group :members: :outline: :no-link: Failing Example --------------- This intentionally fails: .. code-block:: rst .. doxygengroup:: madeupgroup :project: group It produces the following warning message: .. warning:: Cannot find file "madeupgroup" in doxygen xml output for project "group" from directory: ../../examples/specific/group/xml/ breathe-4.1.0/documentation/source/groups.rst000066400000000000000000000012571256765247000213730ustar00rootroot00000000000000 Groups ====== Breathe has basic support for the grouping functionality that Doxygen provides. Using the example from the Doxygen docs: .. literalinclude:: code/groups.h :language: cpp If we reference this with a directive, for example:: .. doxygenclass:: Test :project: userdefined :members: :protected-members: It renders as: .. doxygenclass:: Test :project: userdefined :members: :protected-members: .. note:: Any groups which are not named in the original source code will appear as **Unnamed Group** in the final output. This is different to Doxygen which will number the groups and so name them as Group1, Group2, Group3, etc. breathe-4.1.0/documentation/source/index.rst000066400000000000000000000066551256765247000211720ustar00rootroot00000000000000.. BreatheExample documentation master file, created by sphinx-quickstart on Tue Feb 3 18:20:48 2009. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Breathe's documentation ======================= Breathe provides a bridge between the Sphinx and Doxygen documentation systems. It is an easy way to include Doxygen information in a set of documentation generated by Sphinx. The aim is to produce an autodoc like support for people who enjoy using Sphinx but work with languages other than Python. The system relies on the Doxygen's xml output. .. ifconfig:: documentation_build == 'readthedocs_latest' .. warning:: This documentation is built from the latest `Breathe github project `_ code. It does not necessarily reflect a released version of Breathe on PyPI. .. ifconfig:: documentation_build == 'development' .. warning:: This build of the documentation is not from a specific tagged release of Breathe. It reflects a work in progress state of Breathe. Please see the `github repository `_ for a more official source of information. Overview -------- * **Simple setup** - one doxygen config value, one Sphinx config value and one directive and you'll be on your way. * **High and low level directives** - reference the whole project, just a class or just a function with different directives. * **Support for multiple doxygen projects** - set it up to be aware of different projects and reference them by name or path for each directive. * **Allows embedded reStructuredText in doxygen markup** - some extra doxygen aliases allow you to add ``\rst`` - ``\endrst`` blocks to your comments and have the contents interpreted as reStructuredText. * **Basic support for Sphinx domains** - Link to functions in the breathe output with a standard Sphinx domain reference. Setup & Usage ------------- .. toctree:: :maxdepth: 1 quickstart directives differences readthedocs Features -------- .. toctree:: :maxdepth: 1 markups latexmath domains customcss groups lists template Contributing ------------ .. toctree:: :maxdepth: 1 contributing codeguide credits Example/Test Pages ------------------ .. toctree:: :maxdepth: 1 testpages Download -------- Breathe is available from: * `PyPI, the Python Package Index `_ * `Github `_ License ------- Breathe is under the `BSD license `_. In a Nutshell ------------- You write code that looks a little like this: .. literalinclude:: code/nutshell.h :language: cpp Then you run this:: doxygen With a setting that says this:: GENERATE_XML = YES Then in your Sphinx documentation, you add something like this:: .. doxygenclass:: Nutshell :project: nutshell :members: With a ``conf.py`` setting like this:: breathe_projects = { "nutshell":"../../examples/specific/nutshell/xml/", } And Breathe registered as an extension in ``conf.py`` like this:: extensions = [ "breathe" ] You get something like this: ---- .. doxygenclass:: Nutshell :project: nutshell :members: ---- Sound reasonable? To get started, go checkout the :doc:`quickstart guide `. breathe-4.1.0/documentation/source/inline.rst000066400000000000000000000010761256765247000213310ustar00rootroot00000000000000 Inline Parameter Documentation ============================== This is currently flawed as it doesn't know where to sensibly put the parameters in the final description. It currently defaults to the top of the detail description block which means it comes between the brief description text and the detailed description text which is less than ideal, but attempts to programmatically figure out where the detail description text ends have failed. Something for future work. Example ------- .. doxygenindex:: :path: ../../examples/specific/inline/xml :no-link: breathe-4.1.0/documentation/source/latexmath.rst000066400000000000000000000024051256765247000220370ustar00rootroot00000000000000 Latex Math ========== Breathe has basic support for latex math markup in the doxygen comments. A class with a comment like:: /** * @brief A class * * A inline formula: \f$ f(x) = a + b \f$ * * A display style formula: * @f[ * \int_a^b f(x) dx = F(b) - F(a) * @f] */ class MathHelper { public: MathHelper() {} ~MathHelper() {} } Will be renderer as: .. doxygenclass:: MathHelper :project: latexmath :members: :undoc-members: :no-link: Without any additional configuration except for including a math extension in the Sphinx ``conf.py``:: extensions = [ "breathe", "sphinx.ext.mathjax" ] The specific environment formula fails when using ``sphinx.ext.pngmath`` so more work is needed. Implementation -------------- Breathe uses a internal reStructuredText node provided by ``sphinx.ext.mathbase`` which is then picked up and rendered by the extension chosen in the ``conf.py``. It does not pass any additional options through to the node, so settings like ``label`` and ``nowrap`` are currently not supported. Credits ------- Thank you to `dazzlezhang `_ for providing examples and a full run down of necessary details. It made the implementation much easier. breathe-4.1.0/documentation/source/lists.rst000066400000000000000000000040521256765247000212060ustar00rootroot00000000000000Lists ====== Breathe has support for lists in the doxygen documentation. They are output as follows. For unordered lists with list items prefixed with **+** :: .. doxygenclass:: SimpleList_1 :project: lists It renders as: ---- .. doxygenclass:: SimpleList_1 :project: lists ---- Unordered lists with list items prefixed with **-** render as: ---- .. doxygenclass:: SimpleList_2 :project: lists ---- Unordered lists with list items prefixed with **\*** render as: ---- .. doxygenclass:: SimpleList_3 :project: lists ---- Unordered lists defined using HTML tags **
  • ** render as: ---- .. doxygenclass:: SimpleList_6 :project: lists ---- Auto-numbered lists with list items prefixed with **-#** render as: ---- .. doxygenclass:: SimpleList_4 :project: lists ---- Numbered lists with list items prefixed with Arabic numerals **1. 2. ...** render as: ---- .. doxygenclass:: SimpleList_5 :project: lists ---- .. note:: Numbered lists support for the moment only Arabic numerals. Nested lists are supported in all combinations, as long as they are valid doxygen markup. Below are a couple of examples of different nested lists documentation and their corresponding breathe output. Documentation looking like this: .. literalinclude:: code/nested_list_1.h :language: cpp renders as: ---- .. doxygenclass:: NestedLists_1 :project: lists ---- Documentation looking like this: .. literalinclude:: code/nested_list_2.h :language: cpp renders as: ---- .. doxygenclass:: NestedLists_2 :project: lists ---- Documentation looking like this: .. literalinclude:: code/nested_list_3.h :language: cpp renders as: ---- .. doxygenclass:: NestedLists_3 :project: lists ---- Documentation looking like this: .. literalinclude:: code/nested_list_4.h :language: cpp renders as: ---- .. doxygenclass:: NestedLists_4 :project: lists ---- Documentation looking like this: .. literalinclude:: code/nested_list_5.h :language: cpp renders as: ---- .. doxygenclass:: NestedLists_5 :project: lists breathe-4.1.0/documentation/source/markups.rst000066400000000000000000000100451256765247000215310ustar00rootroot00000000000000 Supported Markups ================= All comments in your code must be formatted in a doxygen-compliant way so that doxygen can do its job. Doxygen provides support for formatting your text with tags, such as ``\b`` for adding bold text, this information appears in the xml output and Breathe attempts to reproduce it accurately. In addition to this, is it possible to add reStructuredText into your comments within appropriately demarcated sections. reStructuredText ---------------- Breathe supports reStructuredText within doxygen **verbatim** blocks which begin with the markup **embed:rst**. This means that a comment block like this:: /*! Inserting additional reStructuredText information. \verbatim embed:rst .. note:: This reStructuredText has been handled correctly. \endverbatim */ Will be rendered as: .. doxygenfunction:: TestClass::rawVerbatim :project: rst :no-link: Handling Leading Asterisks ~~~~~~~~~~~~~~~~~~~~~~~~~~ Note that doxygen captures **all** content in a **verbatim** block. This can be rather an annoyance if you use a leading-asterisk style of comment block such as the following:: /*! * Inserting additional reStructuredText information. * * \verbatim embed:rst * Some example code:: * * int example(int x) { * return x * 2; * } * \endverbatim */ As the leading asterisks are captured in the **verbatim** block this will appear to be an incorrectly formatted bullet list. Due to the syntactical problems Sphinx will issue warnings and the block will render as: .. Here we fake the bad output without actually using a bad example otherwise we'll get warnings in the build output. void **rawBadAsteriskVerbatim**\ () Inserting additional reStructuredText information. - Some example code: - int example(int x) { - return x \* 2; - } To prevent this, use an **embed:rst:leading-asterisk** tag:: /*! * Inserting additional reStructuredText information. * * \verbatim embed:rst:leading-asterisk * Some example code:: * * int example(int x) { * return x * 2; * } * \endverbatim */ This will appropriately handle the leading asterisks and render as: ---- .. doxygenfunction:: TestClass::rawLeadingAsteriskVerbatim :project: rst :no-link: ---- Handling Leading Slashes ~~~~~~~~~~~~~~~~~~~~~~~~ Similar troubles can be encountered when using comment blocks that start with a triple forward slash. For example:: /// Some kind of method /// /// @param something a parameter /// @returns the same value provided in something param /// /// @verbatim embed:rst:leading-slashes /// .. code-block:: c /// :linenos: /// /// bool foo(bool something) { /// return something; /// }; /// /// @endverbatim For these kinds of blocks, you can use an **embed:rst:leading-slashes** tag as shown in the above example. This will appropriately handle the leading slashes and render as: ---- .. doxygenfunction:: TestClass::rawLeadingSlashesVerbatim :project: rst :no-link: ---- Aliases ~~~~~~~ To make these blocks appears as more appropriate doxygen-like markup in your comments you can add the following aliases to your doxygen configuration file:: ALIASES = "rst=\verbatim embed:rst" ALIASES += "endrst=\endverbatim" And, if you use leading asterisks then perhaps:: ALIASES += "rststar=\verbatim embed:rst:leading-asterisk" ALIASES += "endrststar=\endverbatim" Which allow you to write comments like:: /*! Inserting additional reStructuredText information. \rst This is some funky non-xml compliant text: <& !>< .. note:: This reStructuredText has been handled correctly. \endrst This is just a standard verbatim block with code: \verbatim child = 0; while( child = parent->IterateChildren( child ) ) \endverbatim */ Which will be rendered as: .. doxygenfunction:: TestClass::function :project: rst :no-link: breathe-4.1.0/documentation/source/members.rst000066400000000000000000000007731256765247000215100ustar00rootroot00000000000000 Members Tests ============= All Members ----------- .. doxygenclass:: testnamespace::NamespacedClassTest :path: ../../examples/specific/members/xml :members: :no-link: Specific Members ---------------- .. doxygenclass:: testnamespace::NamespacedClassTest :path: ../../examples/specific/members/xml :members: functionS, anotherFunction :no-link: No Members ---------- .. doxygenclass:: testnamespace::NamespacedClassTest :path: ../../examples/specific/members/xml :no-link: breathe-4.1.0/documentation/source/namespace.rst000066400000000000000000000136031256765247000220060ustar00rootroot00000000000000 .. _namespace-example: doxygennamespace Directive ========================== This directive generates the appropriate output for the contents of a namespace. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``content-only``, ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options. ``content-only`` If this flag is specified, then the directive does not output the name of the namespace or the namespace description and instead outputs the contents of the namespace. This can be useful for structuring your documentation but leaving out the namespace declaration itself which is often undocumented. ``members`` If specified, the public members of any classes in the namespace output will be displayed. Unlike the ``doxygenclass`` ``members`` option, this does not optionally take a list of member names to display as this will be applied across multiple classes within the namespace. ``protected-members`` If specified, the protected members of any classes in the namespace output will be displayed. ``private-members`` If specified, the private members of any classes in the namespace output will be displayed. ``undoc-members`` If specified, the undocumented members of any classes in the namespace output will be displayed provided the appropriate ``members`` or ``private-members`` options are specified as well. If you would like to always specify some combination of ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` then you can use the :ref:`breathe_default_members ` configuration variable to set it in the ``conf.py``. .. contents:: Basic Example ------------- The plain ``doxygennamespace`` directive will output the namespace name and description and any top level publicly visible members of the namespace. .. code-block:: rst .. doxygennamespace:: foo :project: namespace It produces this output: .. doxygennamespace:: foo :project: namespace :no-link: Content-Only Example -------------------- The ``content-only`` option changes the output to only include the content of the namespace and not the namespace name or description. So this: .. code-block:: rst .. doxygennamespace:: foo :project: namespace :content-only: Produces this output: .. doxygennamespace:: foo :project: namespace :content-only: :no-link: .. note:: As you can see from the output, section headings like 'Functions' are missing from the :content-only: display. This is due to an implementation detail. If post an issue on github if you'd like it addressed. Members Example --------------- The ``members`` option changes the output to include the public members of any classes. The output for any class in the namespace should be the same as if it had be produced by the :ref:`doxygenclass directive ` with the ``members`` option specified. :: .. doxygennamespace:: foo :project: namespace :members: It produces this output: .. doxygennamespace:: foo :project: namespace :members: :no-link: Protected Members Example ------------------------- The ``protected-members`` option changes the output to include the protected members of any classes. The output for any class in the namespace should be the same as if it had be produced by the :ref:`doxygenclass directive ` with the ``protected-members`` option specified. :: .. doxygennamespace:: foo :project: namespace :protected-members: It produces this output: .. doxygennamespace:: foo :project: namespace :protected-members: :no-link: Private-Members Example ----------------------- The ``private-members`` option changes the output to include the private members of any classes. The output for any class in the namespace should be the same as if it had be produced by the :ref:`doxygenclass directive ` with the ``private-members`` option specified. .. code-block:: rst .. doxygennamespace:: foo :project: namespace :private-members: Produces this output: .. doxygennamespace:: foo :project: namespace :private-members: :no-link: Undocumented Members Example ---------------------------- The ``undoc-members`` option changes the output to include any undocumentated members from the sections (public, protected, private) that are being displayed for the classes in the namespace output. .. code-block:: rst .. doxygennamespace:: foo :project: namespace :private-members: :undoc-members: Produces this output: .. doxygennamespace:: foo :project: namespace :private-members: :undoc-members: :no-link: .. note:: Undocumented classes are still not shown in the output due to an implementation issue. Please post an issue on github if you would like this resolved. Outline Example --------------- This displays only the names of the members of the namespace and not their documentation. The other options determine which members are displayed. .. code-block:: rst .. doxygennamespace:: foo :project: namespace :members: :outline: It produces this output: .. doxygennamespace:: foo :project: namespace :members: :outline: :no-link: Nested Example -------------- The referenced namespace can be nested in another namespace. .. code-block:: rst .. doxygennamespace:: foo::ns :project: namespace Produces this output: .. doxygennamespace:: foo::ns :project: namespace :no-link: Failing Example --------------- This intentionally fails: .. code-block:: rst .. doxygennamespace:: madeupnamespace :project: namespace It produces the following warning message: .. warning:: doxygennamespace: Cannot find namespace “madeupnamespace†in doxygen xml output for project “namespace†from directory: ../../examples/specific/namespacefile/xml/ breathe-4.1.0/documentation/source/quickstart.rst000066400000000000000000000033711256765247000222450ustar00rootroot00000000000000Quick Start =========== For this quick start we assume the following prerequisites: * breathe was downloaded and extracted somewhere * doxygen was installed and doxygen output (XML format) was generated for the project that is to be documented (set GENERATE_XML tag to YES) We assume the following paths: * documentation root path: :file:`/home/me/docproj/` * breathe path: :file:`/home/me/docproj/ext/breathe/` * doxygen xml output: :file:`/home/me/docproj/doxyxml/` The documentation path should contain a folder :file:`source` containing the :file:`conf.py` file. The doxygen xml output folder should contain the :file:`index.xml` output file generated by doxygen. The following steps are required to integrate breathe functionality: #. Add the breathe path to your conf.py by adding the following line:: sys.path.append( "/home/me/docproj/ext/breathe/" ) #. Add breathe as an extension the line could look like this:: extensions = ['sphinx.ext.pngmath', 'sphinx.ext.todo', 'breathe' ] #. Tell breathe about the projects:: breathe_projects = { "myproject": "/home/me/docproj/doxyxml/" } #. Specify a default project:: breathe_default_project = "myproject" Once this is done you may use the the following commands:: ..doxygenindex:: ..doxygenfunction:: ..doxygenstruct:: ..doxygenenum:: ..doxygentypedef:: ..doxygenclass:: to include documentation for different constructs. For each of these commands the the following directives may be specified: ``project`` Specifies which project, as defined in the breathe_projects config value, should be used for this directive. This overrides the default. ``path`` Directly specifies the path to the folder with the doxygen output. This overrides the project and default project. breathe-4.1.0/documentation/source/readthedocs.rst000066400000000000000000000067021256765247000223410ustar00rootroot00000000000000 Running on Read the Docs ========================= `Read the Docs`_ is an excellent site for hosting project documentation. It provides hooks into common project hosting sites like Github_ & Bitbucket_ and can rebuild your documentation automatically whenever you push new code. The site is designed for documentation written with Sphinx and supports Sphinx extensions via a correctly configured ``setup.py`` file. As Breathe is a Sphinx extension you can use it on Read the Docs. However, as Breathe requires doxygen XML files, some additional configuration is required. Doxygen Support --------------- Read the Docs do not explicitly support doxygen however they have had requests for it to be supported and it is currently installed on their build servers. Generating Doxygen XML Files ---------------------------- We assume that you are not checking your doxygen XML files into your source control system and so you will need to generate them on the Read the Docs server before Sphinx starts processing your documentation. One simple way of achieving this is to add the following code to your ``conf.py`` file: .. code-block:: python import subprocess, os read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' if read_the_docs_build: subprocess.call('cd ../doxygen; doxygen', shell=True) The first line uses the ``READTHEDOCS`` environment variable to determine whether or not we are building on the Read the Docs servers. Read the Docs set this environment variable `specifically for this purpose`_. Then, if we are in a Read the Docs build, execute a simple shell command to build the doxygen xml for your project. This is a very simple example; the command will be determined by your project set up but something like this works for the Breathe documentation. As this is then executed right at the start of the ``sphinx-build`` process then all your doxygen XML files will be in place for the build. A More Involved Setup --------------------- If you'd rather do something more involved then you can run ``doxygen`` as part of a ``builder-inited`` event hook which you can install from your ``conf.py`` file by adding a ``setup`` function as shown below. This is an approximation of the code that Breathe has in its ``conf.py`` in order to run ``doxygen`` on the Read the Docs server. .. code-block:: python import subprocess, sys def run_doxygen(folder): """Run the doxygen make command in the designated folder""" try: retcode = subprocess.call("cd %s; make" % folder, shell=True) if retcode < 0: sys.stderr.write("doxygen terminated by signal %s" % (-retcode)) except OSError as e: sys.stderr.write("doxygen execution failed: %s" % e) def generate_doxygen_xml(app): """Run the doxygen make commands if we're on the ReadTheDocs server""" read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' if read_the_docs_build: run_doxygen("../../examples/doxygen") run_doxygen("../../examples/specific") run_doxygen("../../examples/tinyxml") def setup(app): # Add hook for building doxygen xml when needed app.connect("builder-inited", generate_doxygen_xml) .. _Read the Docs: https://readthedocs.org/ .. _Github: https://github.com .. _Bitbucket: https://bitbucket.org .. _specifically for this purpose: https://docs.readthedocs.org/en/latest/faq.html#how-do-i-change-behavior-for-read-the-docs breathe-4.1.0/documentation/source/specific.rst000066400000000000000000000043371256765247000216430ustar00rootroot00000000000000 Specific Examples Test Suite ============================ Typedef Examples ---------------- .. doxygenindex:: :path: ../../examples/specific/typedef/xml :no-link: Namespaced Function Examples ---------------------------- .. doxygenfunction:: testnamespace::NamespacedClassTest::function :path: ../../examples/specific/class/xml :no-link: .. doxygenfunction:: testnamespace::ClassTest::function :path: ../../examples/specific/class/xml :no-link: .. doxygenfunction:: testnamespace::ClassTest::anotherFunction :path: ../../examples/specific/class/xml :no-link: .. doxygenfunction:: ClassTest::function :path: ../../examples/specific/class/xml :no-link: .. doxygenfunction:: ClassTest::anotherFunction :path: ../../examples/specific/class/xml :no-link: Alias Example ------------- .. doxygenfunction:: frob_foos :path: ../../examples/specific/alias/xml :no-link: Fixed Width Font ---------------- .. doxygenclass:: Out :path: ../../examples/specific/fixedwidthfont/xml :members: :no-link: Function Overloads ------------------ .. doxygenfunction:: f(int, int) :project: functionOverload :no-link: .. doxygenfunction:: f(double, double) :project: functionOverload :no-link: .. doxygenfunction:: test::g(int,int) :project: functionOverload :no-link: .. doxygenfunction:: test::g(double, double) :project: functionOverload :no-link: .. doxygenfunction:: h(std::string, MyType) :project: functionOverload :no-link: .. doxygenfunction:: h(std::string, MyOtherType) :project: functionOverload :no-link: .. doxygenfunction:: h(std::string, const int) :project: functionOverload :no-link: .. doxygenfunction:: h(std::string, const T, const U) :project: functionOverload :no-link: Program Listing --------------- .. doxygenclass:: Vector :project: programlisting :no-link: .. doxygenfunction:: center :project: programlisting :no-link: Image ----- .. doxygenclass:: ImageClass :project: image :no-link: Array Parameter --------------- .. doxygenfunction:: foo :project: array :no-link: .. doxygenfunction:: bar :project: array :no-link: C Enum ------ .. doxygenenum:: GSM_BackupFormat :project: c_enum :no-link: breathe-4.1.0/documentation/source/spelling_wordlist.txt000066400000000000000000000007631256765247000236300ustar00rootroot00000000000000STL TVal autodoxygenindex cdata cfile config doxygen doxygenenum doxygenfunction doxygenstruct doxygentypedef doxygenfile doxygenunion doxygenvariable doxygengroup doxygendefine doxygenclass doxygenindex bitmasks madeupgroup enum foo foos frob frobs namespace namespaces namespaced reStructuredText tabsize tinyXml tinyxml tinyXML programmatically struct py conf inline License autodoc mux renderers github heesch brandl goodger wildcard wildcards xml Func Memgrp Docstring Autolink GVal attributeB breathe-4.1.0/documentation/source/struct.rst000066400000000000000000000115101256765247000213710ustar00rootroot00000000000000 .. This is more or less the class documentation with s/class/struct/g .. _struct-example: doxygenstruct Directive ======================= This directive generates the appropriate output for a single struct. It takes the standard ``project``, ``path``, ``outline`` and ``no-link`` options and additionally the ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` options. ``members`` Designed to behavior in a similar manner to the ``members`` option for the ``autostruct`` directive that comes with the Sphinx ``autodoc`` extension. If you do not specify this option you will not get any information about the struct members, just the general struct documentation. If you provide it without arguments, then Breathe adds all the public members and their documentation. If you specify it with **comma separated** arguments, then Breathe will treat the arguments as names of members and provide documentation for only those members that have been named. ``protected-members`` If specified, the protected members of the struct will be displayed. ``private-members`` If specified, the private members of the struct will be displayed. ``undoc-members`` If specified, the undocumented members of the struct will be displayed. If you would like to always specify some combination of ``members``, ``protected-members``, ``private-members`` and ``undoc-members`` then you can use the :ref:`breathe_default_members ` configuration variable to set it in the ``conf.py``. .. contents:: Basic Example ------------- This displays the struct documentation without any members: .. code-block:: rst .. doxygenstruct:: StructTest :project: struct It produces this output: .. doxygenstruct:: StructTest :project: struct :no-link: Members Example --------------- This directive call will display the struct documentation with all the public members: .. code-block:: rst .. doxygenstruct:: StructTest :project: struct :members: It produces this output: .. doxygenstruct:: StructTest :project: struct :members: :no-link: Specific Members Example ------------------------ This displays the struct documentation with only the members listed in the ``:members:`` option: .. code-block:: rst .. doxygenstruct:: StructTest :project: struct :members: publicFunction, protectedFunction It produces this output: .. doxygenstruct:: StructTest :project: struct :members: publicFunction, protectedFunction :no-link: Protected Members ----------------- This displays only the protected members of the struct. Normally this is combined with the ``:members:`` option to show the public members as well. .. code-block:: rst .. doxygenstruct:: StructTest :project: struct :protected-members: It produces this output: .. doxygenstruct:: StructTest :project: struct :protected-members: :no-link: Private Members --------------- This displays only the private members of the struct. Normally this is combined with the ``:members:`` option to show the public members as well. .. code-block:: rst .. doxygenstruct:: StructTest :project: struct :private-members: It produces this output: .. doxygenstruct:: StructTest :project: struct :private-members: :no-link: Undocumented Members -------------------- This displays the undocumented members of the struct which are suppressed by default. Undocumented public members are only shown if the ``:members:`` option is also used. The same goes for the undocumented private members and the ``private-members`` option. .. code-block:: rst .. doxygenstruct:: StructTest :project: struct :members: :private-members: :undoc-members: It produces this output: .. doxygenstruct:: StructTest :project: struct :members: :private-members: :undoc-members: :no-link: .. note:: Undocumented internal classes are still not shown in the output due to an implementation issue. Please post an issue on github if you would like this resolved. Outline Example --------------- This displays only the names of the struct members and not their documentation. The ``:members:`` and ``:private-members:`` options determine which members are displayed. .. code-block:: rst .. doxygenstruct:: StructTest :project: struct :members: :outline: It produces this output: .. doxygenstruct:: StructTest :project: struct :members: :outline: :no-link: Failing Example --------------- This intentionally fails: .. code-block:: rst .. doxygenstruct:: made_up_struct :project: struct :members: It produces the following warning message: .. warning:: doxygenstruct: Cannot find struct “made_up_struct†in doxygen xml output for project “struct†from directory: ../../examples/doxygen/struct/xml/ breathe-4.1.0/documentation/source/template.rst000066400000000000000000000013411256765247000216610ustar00rootroot00000000000000Template ======== Breathe has support for class and function templates. They are output as follows. For a class with a single template parameter:: .. doxygenclass:: templateclass :project: template_class :members: It renders as: ---- .. doxygenclass:: templateclass :project: template_class :members: ---- With multiple template parameters it renders as: ---- .. doxygenclass:: anothertemplateclass :project: template_class_non_type :members: ---- A function with single template parameter renders as: ---- .. doxygenfunction:: function1 :project: template_function ---- With multiple template parameters it renders as: ---- .. doxygenfunction:: function2 :project: template_function breathe-4.1.0/documentation/source/testpages.rst000066400000000000000000000001761256765247000220520ustar00rootroot00000000000000 Test Pages ========== .. toctree:: :maxdepth: 1 doxygen tinyxml specific embeddedrst inline members breathe-4.1.0/documentation/source/tinyxml.rst000066400000000000000000000000731256765247000215530ustar00rootroot00000000000000 TinyXML Test Suite ================== .. doxygenindex:: breathe-4.1.0/documentation/source/typedef.rst000066400000000000000000000014141256765247000215070ustar00rootroot00000000000000 .. _typedef-example: doxygentypedef Directive Example ================================ Working Example --------------- This should work:: .. doxygentypedef:: UINT32 :project: structcmd It produces this output: .. doxygentypedef:: UINT32 :project: structcmd :no-link: Example with Namespace ---------------------- This should work:: .. doxygentypedef:: foo::ns::MyInt :project: namespace It produces this output: .. doxygentypedef:: foo::ns::MyInt :project: namespace :no-link: Failing Example --------------- This intentionally fails:: .. doxygentypedef:: made_up_typedef :project: restypedef It produces the following warning message: .. warning:: doxygentypedef: Cannot find typedef "made_up_typedef" in doxygen xml output breathe-4.1.0/documentation/source/union.rst000066400000000000000000000014631256765247000212030ustar00rootroot00000000000000 .. _union-example: doxygenunion Directive Example ============================== Working Example --------------- This should work:: .. doxygenunion:: SeparateUnion :project: union It produces this output: .. doxygenunion:: SeparateUnion :project: union :no-link: Example with Namespace ---------------------- This should work:: .. doxygenunion:: foo::MyUnion :project: union It produces this output: .. doxygenunion:: foo::MyUnion :project: union :no-link: Failing Example --------------- This intentionally fails:: .. doxygenunion:: made_up_union :project: union It produces the following warning message: .. warning:: doxygenunion: Cannot find union "made_up_union" in doxygen XML output for project "union" from directory: ../../examples/specific/union/xml/ breathe-4.1.0/documentation/source/variable.rst000066400000000000000000000012011256765247000216260ustar00rootroot00000000000000 .. _variable-example: doxygenvariable Directive Example ================================= Working Example --------------- This should work:: .. doxygenvariable:: global_cache_tree :project: c_file It produces this output: .. doxygenvariable:: global_cache_tree :project: c_file Failing Example --------------- This intentionally fails:: .. doxygenvariable:: made_up_variable :project: define It produces the following warning message: .. warning:: doxygenvariable: Cannot find variable “made_up_variable†in doxygen XML output for project “tinyxml†from directory: ../../examples/tinyxml/tinyxml/xml/ breathe-4.1.0/examples/000077500000000000000000000000001256765247000147625ustar00rootroot00000000000000breathe-4.1.0/examples/doxygen/000077500000000000000000000000001256765247000164375ustar00rootroot00000000000000breathe-4.1.0/examples/doxygen/.gitignore000066400000000000000000000003061256765247000204260ustar00rootroot00000000000000afterdoc author autolink class define diagrams docstring enum example file func group include jdstyle manual memgrp mux overload page par pyexample qtstyle relates restypedef structcmd tag template breathe-4.1.0/examples/doxygen/Makefile000066400000000000000000000067641256765247000201140ustar00rootroot00000000000000# # This file was generated from Makefile.in on Sat Dec 13 12:17:28 GMT 2008 # DOXYGEN ?= `which doxygen` TMAKEPATH = ENV = env TMAKEPATH=$(TMAKEPATH) TMAKE = MAKE = /usr/bin/make PERL = /usr/bin/perl RM = rm -f CP = cp VERSION = 1.5.7.1 INSTALL = /tmp INSTTOOL = /usr/bin/install DOXYDOCS = .. DOCDIR = $(INSTALL)/share/doc/packages/doxygen QTDIR = HAVE_DOT = /usr/bin/dot all: class/xml/index.xml \ define/xml/index.xml \ enum/xml/index.xml \ file/xml/index.xml \ func/xml/index.xml \ page/xml/index.xml \ relates/xml/index.xml \ author/xml/index.xml \ par/xml/index.xml \ overload/xml/index.xml \ example/xml/index.xml \ include/xml/index.xml \ qtstyle/xml/index.xml \ jdstyle/xml/index.xml \ structcmd/xml/index.xml \ autolink/xml/index.xml \ restypedef/xml/index.xml \ afterdoc/xml/index.xml \ template/xml/index.xml \ tag/xml/index.xml \ group/xml/index.xml \ diagrams/xml/index.xml \ memgrp/xml/index.xml \ docstring/xml/index.xml \ pyexample/xml/index.xml \ mux/xml/index.xml \ manual/xml/index.xml clean: rm -rf class define enum file func page relates author \ par overload example include qtstyle jdstyle structcmd \ autolink tag restypedef afterdoc template tag group diagrams \ memgrp docstring pyexample mux manual class/xml/index.xml: class.h class.cfg $(DOXYGEN) class.cfg define/xml/index.xml: define.h define.cfg $(DOXYGEN) define.cfg enum/xml/index.xml: enum.h enum.cfg $(DOXYGEN) enum.cfg file/xml/index.xml: file.h file.cfg $(DOXYGEN) file.cfg func/xml/index.xml: func.h func.cfg $(DOXYGEN) func.cfg page/xml/index.xml: page.doc page.cfg $(DOXYGEN) page.cfg relates/xml/index.xml: relates.cpp relates.cfg $(DOXYGEN) relates.cfg author/xml/index.xml: author.cpp author.cfg $(DOXYGEN) author.cfg par/xml/index.xml: par.cpp par.cfg $(DOXYGEN) par.cfg overload/xml/index.xml: overload.cpp overload.cfg $(DOXYGEN) overload.cfg example/xml/index.xml: example.cpp example_test.cpp example.cfg $(DOXYGEN) example.cfg include/xml/index.xml: include.cpp example_test.cpp include.cfg $(DOXYGEN) include.cfg qtstyle/xml/index.xml: qtstyle.cpp qtstyle.cfg $(DOXYGEN) qtstyle.cfg jdstyle/xml/index.xml: jdstyle.cpp jdstyle.cfg $(DOXYGEN) jdstyle.cfg structcmd/xml/index.xml: structcmd.h structcmd.cfg $(DOXYGEN) structcmd.cfg autolink/xml/index.xml: autolink.cpp autolink.cfg $(DOXYGEN) autolink.cfg tag/xml/index.xml: tag.cpp tag.cfg example/xml/index.xml $(DOXYGEN) tag.cfg # sed -e "1,1s#perl#$(PERL)#g" tag/xml/installdox >tag/xml/installdox.perl # cd tag/xml ; $(PERL) installdox.perl -lexample.tag@../../example/xml restypedef/xml/index.xml: restypedef.cpp restypedef.cfg $(DOXYGEN) restypedef.cfg afterdoc/xml/index.xml: afterdoc.h afterdoc.cfg $(DOXYGEN) afterdoc.cfg template/xml/index.xml: templ.cpp templ.cfg $(DOXYGEN) templ.cfg group/xml/index.xml: group.cpp group.cfg $(DOXYGEN) group.cfg memgrp/xml/index.xml: memgrp.cpp memgrp.cfg $(DOXYGEN) memgrp.cfg pyexample/xml/index.xml: pyexample.py pyexample.cfg $(DOXYGEN) pyexample.cfg mux/xml/index.xml: mux.vhdl mux.cfg $(DOXYGEN) mux.cfg manual/xml/index.xml: manual.c manual.cfg $(DOXYGEN) manual.cfg docstring/xml/index.xml: docstring.py docstring.cfg $(DOXYGEN) docstring.cfg diagrams/xml/index.xml: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg ifneq ($(HAVE_DOT),) $(DOXYGEN) diagrams.cfg endif breathe-4.1.0/examples/doxygen/afterdoc.cfg000066400000000000000000000004161256765247000207100ustar00rootroot00000000000000PROJECT_NAME = "AfterDocs" OUTPUT_DIRECTORY = afterdoc GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = afterdoc.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/afterdoc.h000066400000000000000000000005561256765247000204050ustar00rootroot00000000000000/*! A test class */ class Test1 { public: /** An enum type. * The documentation block cannot be put after the enum! */ enum EnumType { int EVal1, /**< enum value 1 */ int EVal2 /**< enum value 2 */ }; void member(); //!< a member function. protected: int value; /*!< an integer value */ }; breathe-4.1.0/examples/doxygen/author.cfg000066400000000000000000000004111256765247000204160ustar00rootroot00000000000000PROJECT_NAME = "Author Command" OUTPUT_DIRECTORY = author GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = author.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/author.cpp000066400000000000000000000007751256765247000204560ustar00rootroot00000000000000/*! \class WindowsNT * \brief Windows Nice Try. * \author Bill Gates * \author Several species of small furry animals gathered together * in a cave and grooving with a picture. * \version 4.0 * \date 1996-1998 * \bug It crashes a lot and requires huge amounts of memory. * \bug The class introduces the more bugs, the longer it is used. * \warning This class may explode in your face. * \warning If you inherit anything from this class, you're doomed. */ class WindowsNT {}; breathe-4.1.0/examples/doxygen/autolink.cfg000066400000000000000000000004301256765247000207430ustar00rootroot00000000000000PROJECT_NAME = "Automatic link generation" OUTPUT_DIRECTORY = autolink GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = autolink.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/autolink.cpp000066400000000000000000000046411256765247000207760ustar00rootroot00000000000000/*! \file autolink.cpp Testing automatic link generation. A link to a member of the Test2 class: Test2::member, More specific links to the each of the overloaded members: Test2::member(int) and Test2#member(int,int) A link to a protected member variable of Test2: Test2#var, A link to the global enumeration type #GlobEnum. A link to the define #ABS(x). A link to the destructor of the Test2 class: Test2::~Test2, A link to the typedef ::Test2TypeDef. A link to the enumeration type Test2::EType A link to some enumeration values Test2::Val1 and ::GVal2 */ /*! Since this documentation block belongs to the class Test2 no link to Test2 is generated. Two ways to link to a constructor are: #Test2 and Test2(). Links to the destructor are: #~Test2 and ~Test2(). A link to a member in this class: member(). More specific links to the each of the overloaded members: member(int) and member(int,int). A link to the variable #var. A link to the global typedef ::Test2TypeDef. A link to the global enumeration type #GlobEnum. A link to the define ABS(x). A link to a variable \link #var using another text\endlink as a link. A link to the enumeration type #EType. A link to some enumeration values: \link Test2::Val1 Val1 \endlink and ::GVal1. And last but not least a link to a file: autolink.cpp. \sa Inside a see also section any word is checked, so EType, Val1, GVal1, ~Test2 and member will be replaced by links in HTML. */ class Test2 { public: Test2(); //!< constructor ~Test2(); //!< destructor void member(int); /**< A member function. Details. */ void member(int,int); /**< An overloaded member function. Details */ /** An enum type. More details */ enum EType { Val1, /**< enum value 1 */ Val2 /**< enum value 2 */ }; protected: int var; /**< A member variable */ }; /*! details. */ Test2::Test2() { } /*! details. */ Test2::~Test2() { } /*! A global variable. */ int globVar; /*! A global enum. */ enum GlobEnum { GVal1, /*!< global enum value 1 */ GVal2 /*!< global enum value 2 */ }; /*! * A macro definition. */ #define ABS(x) (((x)>0)?(x):-(x)) typedef Test2 Test2TypeDef; /*! \fn typedef Test2 Test2TypeDef * A type definition. */ breathe-4.1.0/examples/doxygen/class.cfg000066400000000000000000000004041256765247000202230ustar00rootroot00000000000000PROJECT_NAME = "Class Command" OUTPUT_DIRECTORY = class GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = class.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/class.h000066400000000000000000000002321256765247000177120ustar00rootroot00000000000000/* A dummy class */ class Test3 { }; /*! \class Test class.h "inc/class.h" * \brief This is a test class. * * Some details about the Test class */ breathe-4.1.0/examples/doxygen/define.cfg000066400000000000000000000004421256765247000203520ustar00rootroot00000000000000PROJECT_NAME = "Define Command" OUTPUT_DIRECTORY = define GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = define.h ENABLE_PREPROCESSING = YES QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/define.h000066400000000000000000000007101256765247000200400ustar00rootroot00000000000000/*! \file define.h \brief testing defines This is to test the documentation of defines. */ /*! \def MAX(x,y) Computes the maximum of \a x and \a y. */ /*! Computes the absolute value of its argument \a x. */ #define ABS(x) (((x)>0)?(x):-(x)) #define MAX(x,y) ((x)>(y)?(x):(y)) #define MIN(x,y) ((x)>(y)?(y):(x)) /*!< Computes the minimum of \a x and \a y. */ #define NOARGS (void*) /*!< Define with no arguments */ breathe-4.1.0/examples/doxygen/diagrams.cfg000066400000000000000000000005771256765247000207200ustar00rootroot00000000000000PROJECT_NAME = "Diagrams" OUTPUT_DIRECTORY = diagrams HAVE_DOT = YES EXTRACT_ALL = YES GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO ENABLE_PREPROCESSING = YES INPUT = . FILE_PATTERNS = diagrams_*.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/diagrams_a.h000066400000000000000000000001231256765247000206730ustar00rootroot00000000000000#ifndef _DIAGRAMS_A_H #define _DIAGRAMS_A_H class A { public: A *m_self; }; #endif breathe-4.1.0/examples/doxygen/diagrams_b.h000066400000000000000000000001311256765247000206730ustar00rootroot00000000000000#ifndef _DIAGRAMS_B_H #define _DIAGRAMS_B_H class A; class B { public: A *m_a; }; #endif breathe-4.1.0/examples/doxygen/diagrams_c.h000066400000000000000000000001741256765247000207030ustar00rootroot00000000000000#ifndef _DIAGRAMS_C_H #define _DIAGRAMS_C_H #include "diagrams_c.h" class D; class C : public A { public: D *m_d; }; #endif breathe-4.1.0/examples/doxygen/diagrams_d.h000066400000000000000000000002501256765247000206770ustar00rootroot00000000000000#ifndef _DIAGRAM_D_H #define _DIAGRAM_D_H #include "diagrams_a.h" #include "diagrams_b.h" class C; class D : virtual protected A, private B { public: C m_c; }; #endif breathe-4.1.0/examples/doxygen/diagrams_e.h000066400000000000000000000001401256765247000206760ustar00rootroot00000000000000#ifndef _DIAGRAM_E_H #define _DIAGRAM_E_H #include "diagrams_d.h" class E : public D {}; #endif breathe-4.1.0/examples/doxygen/docstring.cfg000066400000000000000000000004421256765247000211140ustar00rootroot00000000000000PROJECT_NAME = "Python" OUTPUT_DIRECTORY = docstring EXTRACT_ALL = YES GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO OPTIMIZE_OUTPUT_JAVA = YES INPUT = docstring.py QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/docstring.py000066400000000000000000000006311256765247000210050ustar00rootroot00000000000000"""@package docstring Documentation for this module. More details. """ def func(): """Documentation for a function. More details. """ pass class PyClass: """Documentation for a class. More details. """ def __init__(self): """The constructor.""" self._memVar = 0; def PyMethod(self): """Documentation for a method.""" pass breathe-4.1.0/examples/doxygen/enum.cfg000066400000000000000000000004011256765247000200570ustar00rootroot00000000000000PROJECT_NAME = "Enum Command" OUTPUT_DIRECTORY = enum GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = enum.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/enum.h000066400000000000000000000005771256765247000175650ustar00rootroot00000000000000class Test4 { public: enum TEnum { Val1, Val2 }; /*! Another enum, with inline docs */ enum AnotherEnum { V1, /*!< value 1 */ V2 /*!< value 2 */ }; }; /*! \class Test4 * The class description. */ /*! \enum Test4::TEnum * A description of the enum type. */ /*! \var Test4::TEnum Test4::Val1 * The description of the first enum value. */ breathe-4.1.0/examples/doxygen/example.cfg000066400000000000000000000005311256765247000205520ustar00rootroot00000000000000PROJECT_NAME = "Example Command" OUTPUT_DIRECTORY = example GENERATE_TAGFILE = example.tag GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = example.cpp EXAMPLE_PATH = example_test.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/example.cpp000066400000000000000000000005261256765247000206010ustar00rootroot00000000000000/** A Test5 class. * More details about this class. */ class Test5 { public: /** An example member function. * More details about this function. */ void example(); }; void Test5::example() {} /** \example example_test.cpp * This is an example of how to use the Test5 class. * More details about this example. */ breathe-4.1.0/examples/doxygen/example.tag000066400000000000000000000006321256765247000205700ustar00rootroot00000000000000 Test5 class_test5.html void example class_test5.html abf3ec2f0f7f2e0d18a212625caa090b7 () breathe-4.1.0/examples/doxygen/example_test.cpp000066400000000000000000000000521256765247000216320ustar00rootroot00000000000000void main() { Test7 t; t.example(); } breathe-4.1.0/examples/doxygen/file.cfg000066400000000000000000000004011256765247000200320ustar00rootroot00000000000000PROJECT_NAME = "File Command" OUTPUT_DIRECTORY = file GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = file.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/file.h000066400000000000000000000002671256765247000175340ustar00rootroot00000000000000/** \file file.h * A brief file description. * A more elaborated file description. */ /** * A global integer value. * More details about this value. */ extern int globalValue; breathe-4.1.0/examples/doxygen/func.cfg000066400000000000000000000003771256765247000200620ustar00rootroot00000000000000PROJECT_NAME = "Fn Command" OUTPUT_DIRECTORY = func GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = func.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/func.h000066400000000000000000000007061256765247000175460ustar00rootroot00000000000000class Test6 { public: const char *member(char,int) throw(std::out_of_range); }; const char *Test6::member(char c,int n) throw(std::out_of_range) {} /*! \class Test6 * \brief Test6 class. * * Details about Test6. */ /*! \fn const char *Test6::member(char c,int n) * \brief A member function. * \param c a character. * \param n an integer. * \exception std::out_of_range parameter is out of range. * \return a character pointer. */ breathe-4.1.0/examples/doxygen/group.cfg000066400000000000000000000004011256765247000202470ustar00rootroot00000000000000PROJECT_NAME = "Grouping" OUTPUT_DIRECTORY = group GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = group.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/group.cpp000066400000000000000000000027241256765247000203040ustar00rootroot00000000000000/** @defgroup group1 The First Group * This is the first group * @{ */ /** @brief class C1 in group 1 */ class C1 {}; /** @brief class C2 in group 1 */ class C2 {}; /** function in group 1 */ void func1() {} /** @} */ // end of group1 /** * @defgroup group2 The Second Group * This is the second group */ /** @defgroup group3 The Third Group * This is the third group */ /** @defgroup group4 The Fourth Group * @ingroup group3 * Group 4 is a subgroup of group 3 */ /** * @ingroup group2 * @brief class C3 in group 2 */ class C3 {}; /** @ingroup group2 * @brief class C4 in group 2 */ class C4 {}; /** @ingroup group3 * @brief class C5 in @link group3 the third group@endlink. */ class C5 {}; /** @ingroup group1 group2 group3 group4 * namespace N1 is in four groups * @sa @link group1 The first group@endlink, group2, group3, group4 * * Also see @ref mypage2 */ namespace N1 {}; /** @file * @ingroup group3 * @brief this file in group 3 */ /** @defgroup group5 The Fifth Group * This is the fifth group * @{ */ /** @page mypage1 This is a section in group 5 * Text of the first section */ /** @page mypage2 This is another section in group 5 * Text of the second section */ /** @} */ // end of group5 /** @addtogroup group1 * * More documentation for the first group. * @{ */ /** another function in group 1 */ void func2() {} /** yet another function in group 1 */ void func3() {} /** @} */ // end of group1 breathe-4.1.0/examples/doxygen/include.cfg000066400000000000000000000004601256765247000205430ustar00rootroot00000000000000PROJECT_NAME = "Include Command" OUTPUT_DIRECTORY = include GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = include.cpp EXAMPLE_PATH = example_test.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/include.cpp000066400000000000000000000006401256765247000205660ustar00rootroot00000000000000 /*! A test class. */ class Test7 { public: /// a member function void example(); }; /*! \page example * \dontinclude example_test.cpp * Our main function starts like this: * \skip main * \until { * First we create a object \c t of the Test7 class. * \skipline Test7 * Then we call the example member function * \line example * After that our little test routine ends. * \line } */ breathe-4.1.0/examples/doxygen/jdstyle.cfg000066400000000000000000000004221256765247000205740ustar00rootroot00000000000000PROJECT_NAME = "JavaDoc Style" OUTPUT_DIRECTORY = jdstyle GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = jdstyle.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/jdstyle.cpp000066400000000000000000000026501256765247000206240ustar00rootroot00000000000000/** * A test class. A more elaborate class description. */ class Test8 { public: /** * An enum. * More detailed enum description. */ enum TEnum { TVal1, /**< enum value TVal1. */ TVal2, /**< enum value TVal2. */ TVal3 /**< enum value TVal3. */ } *enumPtr, /**< enum pointer. Details. */ enumVar; /**< enum variable. Details. */ /** * A constructor. * A more elaborate description of the constructor. */ Test8(); /** * A destructor. * A more elaborate description of the destructor. */ ~Test8(); /** * a normal member taking two arguments and returning an integer value. * @param a an integer argument. * @param s a constant character pointer. * @see Test8() * @see ~Test8() * @see testMeToo() * @see publicVar() * @return The test results */ int testMe(int a,const char *s); /** * A pure virtual member. * @see testMe() * @param c1 the first argument. * @param c2 the second argument. */ virtual void testMeToo(char c1,char c2) = 0; /** * a public variable. * Details. */ int publicVar; /** * a function variable. * Details. */ int (*handler)(int a,int b); }; breathe-4.1.0/examples/doxygen/manual.c000066400000000000000000000022741256765247000200650ustar00rootroot00000000000000/** * \file manual.c */ typedef struct Object Object; //!< Object type typedef struct Vehicle Vehicle; //!< Vehicle type typedef struct Car Car; //!< Car type typedef struct Truck Truck; //!< Truck type /*! * Base object class. */ struct Object { int ref; //!< \private Reference count. }; /*! * Increments object reference count by one. * \public \memberof Object */ static Object * objRef(Object *obj); /*! * Decrements object reference count by one. * \public \memberof Object */ static Object * objUnref(Object *obj); /*! * Vehicle class. * \extends Object */ struct Vehicle { Object base; //!< \protected Base class. }; /*! * Starts the vehicle. * \public \memberof Vehicle */ void vehicleStart(Vehicle *obj); /*! * Stops the vehicle. * \public \memberof Vehicle */ void vehicleStop(Vehicle *obj); /*! * Car class. * \extends Vehicle */ struct Car { Vehicle base; //!< \protected Base class. }; /*! * Truck class. * \extends Vehicle */ struct Truck { Vehicle base; //!< \protected Base class. }; /*! * Main function. * * Ref vehicleStart(), objRef(), objUnref(). */ int main(void) { Car c; vehicleStart((Vehicle*) &c); } breathe-4.1.0/examples/doxygen/manual.cfg000066400000000000000000000007751256765247000204060ustar00rootroot00000000000000PROJECT_NAME = "Manual inheritance and membership" OUTPUT_DIRECTORY = manual GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = manual.c QUIET = YES JAVADOC_AUTOBRIEF = YES EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES TYPEDEF_HIDES_STRUCT = YES INLINE_SOURCES = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/memgrp.cfg000066400000000000000000000005051256765247000204070ustar00rootroot00000000000000PROJECT_NAME = "Member Grouping" OUTPUT_DIRECTORY = memgrp GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = memgrp.cpp QUIET = YES DISTRIBUTE_GROUP_DOC = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/memgrp.cpp000066400000000000000000000014211256765247000204300ustar00rootroot00000000000000/** A class. Details */ class Test9 { public: //@{ /** Same documentation for both members. Details */ void func1InGroup1(); void func2InGroup1(); //@} /** Function without group. Details. */ void ungroupedFunction(); void func1InGroup2(); protected: void func2InGroup2(); }; void Test9::func1InGroup1() {} void Test9::func2InGroup1() {} /** @name Group2 * Description of group 2. */ //@{ /** Function 2 in group 2. Details. */ void Test9::func2InGroup2() {} /** Function 1 in group 2. Details. */ void Test9::func1InGroup2() {} //@} /*! \file * docs for this file */ //@{ //! one description for all members of this group //! (because DISTRIBUTE_GROUP_DOC is YES in the config file) #define A 1 #define B 2 void glob_func(); //@} breathe-4.1.0/examples/doxygen/mux.cfg000066400000000000000000000006051256765247000177320ustar00rootroot00000000000000PROJECT_NAME = Mux OUTPUT_DIRECTORY = mux GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = mux.vhdl OPTIMIZE_OUTPUT_VHDL = YES QUIET = YES INHERIT_DOCS = YES EXTRACT_PRIVATE = YES HIDE_SCOPE_NAMES = YES INHERIT_DOCS = NO GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/mux.vhdl000066400000000000000000000015341256765247000201320ustar00rootroot00000000000000------------------------------------------------------- --! @file --! @brief 2:1 Mux using with-select ------------------------------------------------------- --! Use standard library library ieee; --! Use logic elements use ieee.std_logic_1164.all; --! Mux entity brief description --! Detailed description of this --! mux design element. entity mux_using_with is port ( din_0 : in std_logic; --! Mux first input din_1 : in std_logic; --! Mux Second input sel : in std_logic; --! Select input mux_out : out std_logic --! Mux output ); end entity; --! @brief Architecture definition of the MUX --! @details More details about this mux element. architecture behavior of mux_using_with is begin with (sel) select mux_out <= din_0 when '0', din_1 when others; end architecture; breathe-4.1.0/examples/doxygen/overload.cfg000066400000000000000000000004471256765247000207400ustar00rootroot00000000000000PROJECT_NAME = "Overloaded Command" OUTPUT_DIRECTORY = overload GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO SORT_MEMBER_DOCS = NO INPUT = overload.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/overload.cpp000066400000000000000000000007601256765247000207610ustar00rootroot00000000000000class Test10 { public: void drawRect(int,int,int,int); void drawRect(const Rect &r); }; void Test10::drawRect(int x,int y,int w,int h) {} void Test10::drawRect(const Rect &r) {} /*! \class Test10 * \brief A short description. * * More text. */ /*! \fn void Test10::drawRect(int x,int y,int w,int h) * This command draws a rectangle with a left upper corner at ( \a x , \a y ), * width \a w and height \a h. */ /*! * \overload void Test10::drawRect(const Rect &r) */ breathe-4.1.0/examples/doxygen/page.cfg000066400000000000000000000004031256765247000200310ustar00rootroot00000000000000PROJECT_NAME = "Page Command" OUTPUT_DIRECTORY = page GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = page.doc QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/page.doc000066400000000000000000000005621256765247000200450ustar00rootroot00000000000000/*! \page page1 A documentation page Leading text. \section sec An example section This page contains the subsections \ref subsection1 and \ref subsection2. For more info see page \ref page2. \subsection subsection1 The first subsection Text. \subsection subsection2 The second subsection More text. */ /*! \page page2 Another page Even more info. */ breathe-4.1.0/examples/doxygen/par.cfg000066400000000000000000000004001256765247000176740ustar00rootroot00000000000000PROJECT_NAME = "Par Command" OUTPUT_DIRECTORY = par GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = par.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/par.cpp000066400000000000000000000005151256765247000177260ustar00rootroot00000000000000/*! \class Test11 * Normal text. * * \par User defined paragraph: * Contents of the paragraph. * * \par * New paragraph under the same heading. * * \note * This note consists of two paragraphs. * This is the first paragraph. * * \par * And this is the second paragraph. * * More normal text. */ class Test11 {}; breathe-4.1.0/examples/doxygen/pyexample.cfg000066400000000000000000000004131256765247000211220ustar00rootroot00000000000000PROJECT_NAME = "Python" OUTPUT_DIRECTORY = pyexample GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO OPTIMIZE_OUTPUT_JAVA = YES INPUT = pyexample.py QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/pyexample.py000066400000000000000000000007661256765247000210260ustar00rootroot00000000000000## @package pyexample # Documentation for this module. # # More details. ## Documentation for a function. # # More details. def func(): pass ## Documentation for a class. # # More details. class PyClass: ## The constructor. def __init__(self): self._memVar = 0; ## Documentation for a method. # @param self The object pointer. def PyMethod(self): pass ## A class variable. classVar = 0; ## @var _memVar # a member variable breathe-4.1.0/examples/doxygen/qtstyle.cfg000066400000000000000000000004051256765247000206240ustar00rootroot00000000000000PROJECT_NAME = "Qt Style" OUTPUT_DIRECTORY = qtstyle GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = qtstyle.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/qtstyle.cpp000066400000000000000000000025571256765247000206610ustar00rootroot00000000000000//! A test class. /*! A more elaborate class description. */ class Test12 { public: //! An enum. /*! More detailed enum description. */ enum TEnum { TVal1, /*!< Enum value TVal1. */ TVal2, /*!< Enum value TVal2. */ TVal3 /*!< Enum value TVal3. */ } //! Enum pointer. /*! Details. */ *enumPtr, //! Enum variable. /*! Details. */ enumVar; //! A constructor. /*! A more elaborate description of the constructor. */ Test12(); //! A destructor. /*! A more elaborate description of the destructor. */ ~Test12(); //! A normal member taking two arguments and returning an integer value. /*! \param a an integer argument. \param s a constant character pointer. \return The test results \sa Test12(), ~Test12(), testMeToo() and publicVar() */ int testMe(int a,const char *s); //! A pure virtual member. /*! \sa testMe() \param c1 the first argument. \param c2 the second argument. */ virtual void testMeToo(char c1,char c2) = 0; //! A public variable. /*! Details. */ int publicVar; //! A function variable. /*! Details. */ int (*handler)(int a,int b); }; breathe-4.1.0/examples/doxygen/relates.cfg000066400000000000000000000004141256765247000205560ustar00rootroot00000000000000PROJECT_NAME = "Relates Command" OUTPUT_DIRECTORY = relates GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = relates.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/relates.cpp000066400000000000000000000004101256765247000205750ustar00rootroot00000000000000/*! * A String class. */ class String { friend int strcmp(const String &,const String &); }; /*! * Compares two strings. */ int strcmp(const String &s1,const String &s2) { } /*! \relates String * A string debug function. */ void stringDebug() { } breathe-4.1.0/examples/doxygen/restypedef.cfg000066400000000000000000000004251256765247000212730ustar00rootroot00000000000000PROJECT_NAME = "Resolving Typedefs" OUTPUT_DIRECTORY = restypedef GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = restypedef.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/restypedef.cpp000066400000000000000000000006421256765247000213170ustar00rootroot00000000000000/*! \file restypedef.cpp * An example of resolving typedefs. */ /*! \struct CoordStruct * A coordinate pair. */ struct CoordStruct { /*! The x coordinate */ float x; /*! The y coordinate */ float y; }; /*! Creates a type name for CoordStruct */ typedef CoordStruct Coord; /*! * This function returns the addition of \a c1 and \a c2, i.e: * (c1.x+c2.x,c1.y+c2.y) */ Coord add(Coord c1,Coord c2) { } breathe-4.1.0/examples/doxygen/structcmd.cfg000066400000000000000000000004221256765247000211260ustar00rootroot00000000000000PROJECT_NAME = "Structural commands" OUTPUT_DIRECTORY = structcmd GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = structcmd.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/structcmd.h000066400000000000000000000025261256765247000206250ustar00rootroot00000000000000/*! \file structcmd.h \brief A Documented file. Details. */ /*! \def MAX(a,b) \brief A macro that returns the maximum of \a a and \a b. Details. */ /*! \var typedef unsigned int UINT32 \brief A type definition for a . Details. */ /*! \var int errno \brief Contains the last error code. \warning Not thread safe! */ /*! \fn int open(const char *pathname,int flags) \brief Opens a file descriptor. Detailed description. \param pathname The name of the descriptor. \param flags Opening flags. */ /*! \fn int close(int fd) \brief Closes the file descriptor \a fd. \param fd The descriptor to close. */ /*! \fn size_t write(int fd,const char *buf, size_t count) \brief Writes \a count bytes from \a buf to the file descriptor \a fd. \param fd The descriptor to write to. \param buf The data buffer to write. \param count The number of bytes to write. */ /*! \fn int read(int fd,char *buf,size_t count) \brief Read bytes from a file descriptor. \param fd The descriptor to read from. \param buf The buffer to read into. \param count The number of bytes to read. */ #define MAX(a,b) (((a)>(b))?(a):(b)) typedef unsigned int UINT32; int errno; int open(const char *,int); int close(int); size_t write(int,const char *, size_t); int read(int,char *,size_t); breathe-4.1.0/examples/doxygen/tag.cfg000066400000000000000000000005101256765247000176670ustar00rootroot00000000000000PROJECT_NAME = "Tag Files" OUTPUT_DIRECTORY = tag GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = tag.cpp TAGFILES = example.tag=../../example/html PERL_PATH = perl QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/tag.cpp000066400000000000000000000002401256765247000177120ustar00rootroot00000000000000/*! A class that is inherited from the external class Test13. */ class Tag : public Test13 { public: /*! an overloaded member. */ void example(); }; breathe-4.1.0/examples/doxygen/templ.cfg000066400000000000000000000004111256765247000202350ustar00rootroot00000000000000PROJECT_NAME = "Template Test" OUTPUT_DIRECTORY = template GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = templ.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/doxygen/templ.cpp000066400000000000000000000013311256765247000202620ustar00rootroot00000000000000 /*! A template class */ template class Test14 { public: Test14(); Test14(const Test14 &); }; /*! complete specialization */ template<> class Test14 { public: Test14(); }; /*! A partial template specialization */ template class Test14 : public Test14 { public: Test14(); }; /*! The constructor of the template class*/ template Test14::Test14() {} /*! The copy constructor */ template Test14::Test14(const Test14 &t) {} /*! The constructor of the partial specialization */ template Test14::Test14() {} /*! The constructor of the specialization */ template<> Test14::Test14() {} breathe-4.1.0/examples/specific/000077500000000000000000000000001256765247000165475ustar00rootroot00000000000000breathe-4.1.0/examples/specific/.gitignore000066400000000000000000000002201256765247000205310ustar00rootroot00000000000000/functypedef /alias /class /inline /nutshell /rst /typedef /members /image /decl_impl */doxygen_sqlite3.db */xml/*.xml */xml/*.xsd */xml/*.xslt breathe-4.1.0/examples/specific/Makefile000066400000000000000000000032261256765247000202120ustar00rootroot00000000000000# # This file was generated from Makefile.in on Sat Dec 13 12:17:28 GMT 2008 # DOXYGEN ?= `which doxygen` TMAKEPATH = ENV = env TMAKEPATH=$(TMAKEPATH) TMAKE = MAKE = /usr/bin/make PERL = /usr/bin/perl RM = rm -f CP = cp VERSION = 1.5.7.1 INSTALL = /tmp INSTTOOL = /usr/bin/install DOXYDOCS = .. DOCDIR = $(INSTALL)/share/doc/packages/doxygen QTDIR = HAVE_DOT = /usr/bin/dot projects = nutshell alias rst inline namespacefile c_file array c_enum \ members userdefined fixedwidthfont latexmath functionOverload \ image name union group struct qtslots lists headings links parameters \ template_class template_class_non_type template_function template_specialisation enum special = programlisting decl_impl multifilexml auto class typedef xmls := $(foreach project, $(projects), $(project)/xml/index.xml) special_xmls = $(foreach project, $(special), $(project)/xml/index.xml) all: $(xmls) $(special_xmls) clean: rm -rf $(projects) $(special) # General pattern # --------------- $(xmls): %/xml/index.xml: %.cfg %.h $(DOXYGEN) $< # Special Cases # ------------- programlisting/xml/index.xml: programlisting.h programlisting.cfg programlistinginclude.txt $(DOXYGEN) programlisting.cfg decl_impl/xml/index.xml: decl_impl.h decl_impl.c decl_impl.cfg $(DOXYGEN) decl_impl.cfg multifilexml/xml/index.xml: multifile/one/Util.h multifile/two/Util.h multifile.cfg $(DOXYGEN) multifile.cfg auto/xml/index.xml: auto_class.h auto_function.h auto.cfg $(DOXYGEN) auto.cfg class/xml/index.xml: class.h class.cpp class.cfg $(DOXYGEN) class.cfg typedef/xml/index.xml: typedef.h typedef.cfg $(DOXYGEN) typedef.cfg breathe-4.1.0/examples/specific/alias.cfg000066400000000000000000000004771256765247000203310ustar00rootroot00000000000000PROJECT_NAME = "ALIAS Example" OUTPUT_DIRECTORY = alias GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = alias.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES ALIASES = "sideeffect=\par Side Effects\n" breathe-4.1.0/examples/specific/alias.h000066400000000000000000000004061256765247000200110ustar00rootroot00000000000000 /*! @file */ /** * Foo frob routine. * \par bob this something else * @sideeffect Frobs any foos. * @return Frobs any foos. * * \par bob this something else * * @sideeffect Frobs any foos. * * @param Frobs any foos. */ void frob_foos(void* Frobs); breathe-4.1.0/examples/specific/array.cfg000066400000000000000000000004051256765247000203450ustar00rootroot00000000000000PROJECT_NAME = "Array Command" OUTPUT_DIRECTORY = array GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = array.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/array.h000066400000000000000000000001431256765247000200340ustar00rootroot00000000000000 /** My function */ int foo(int a[5]); /** My other function */ int bar(int n, int a[static n]); breathe-4.1.0/examples/specific/auto.cfg000066400000000000000000000004171256765247000202020ustar00rootroot00000000000000PROJECT_NAME = "Auto" OUTPUT_DIRECTORY = auto GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = auto_class.h auto_function.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/auto_class.h000066400000000000000000000003271256765247000210570ustar00rootroot00000000000000 //! \brief class outside of namespace class AutoClassTest { //! \brief non-namespaced class function void member() {}; //! \brief non-namespaced class other function void anotherMember() {}; }; breathe-4.1.0/examples/specific/auto_function.h000066400000000000000000000002211256765247000215700ustar00rootroot00000000000000 //! \brief non-namespaced class function void autoFunction() {}; //! \brief non-namespaced class other function void anotherAutoFunction() {}; breathe-4.1.0/examples/specific/c_enum.cfg000066400000000000000000000003771256765247000205050ustar00rootroot00000000000000PROJECT_NAME = "C Enum" OUTPUT_DIRECTORY = c_enum GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = c_enum.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/c_enum.h000066400000000000000000000026651256765247000201770ustar00rootroot00000000000000 // Example of a enum in C which has different syntax and different support in Sphinx to the C++ enum /** * Backup data. * * \ingroup Backup */ typedef enum { /** * Compatibility with old gboolean used instead of format. * * File type is guessed for extension, non unicode format used * for Gammu backup. */ GSM_Backup_Auto = 0, /** * Compatibility with old gboolean used instead of format. * * File type is guessed for extension, unicode format used * for Gammu backup. */ GSM_Backup_AutoUnicode = 1, /** * LMB format, compatible with Logo manager, can store * phonebooks and logos. */ GSM_Backup_LMB, /** * vCalendar standard, can store todo and calendar entries. */ GSM_Backup_VCalendar, /** * vCard standard, can store phone phonebook entries. */ GSM_Backup_VCard, /** * LDIF (LDAP Data Interchange Format), can store phone * phonebook entries. */ GSM_Backup_LDIF, /** * iCalendar standard, can store todo and calendar entries. */ GSM_Backup_ICS, /** * Gammu own format can store almost anything from phone. * * This is ASCII version of the format, Unicode strings are HEX * encoded. Use GSM_Backup_GammuUCS2 instead if possible. */ GSM_Backup_Gammu, /** * Gammu own format can store almost anything from phone. * * This is UCS2-BE version of the format. */ GSM_Backup_GammuUCS2, /** * vNote standard, can store phone notes. */ GSM_Backup_VNote, } GSM_BackupFormat; breathe-4.1.0/examples/specific/c_file.cfg000066400000000000000000000004071256765247000204520ustar00rootroot00000000000000PROJECT_NAME = "C File Example" OUTPUT_DIRECTORY = c_file GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = c_file.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/c_file.h000066400000000000000000000030071256765247000201410ustar00rootroot00000000000000/* Borrowed from git "cache-tree.h" as an example of C code */ #ifndef CACHE_TREE_H #define CACHE_TREE_H #include "tree.h" #include "tree-walk.h" struct cache_tree; struct cache_tree_sub { struct cache_tree *cache_tree; int namelen; int used; char name[FLEX_ARRAY]; }; struct cache_tree { int entry_count; /* negative means "invalid" */ unsigned char sha1[20]; int subtree_nr; int subtree_alloc; struct cache_tree_sub **down; }; /** Shared cache tree instance. */ extern struct cache_tree global_cache_tree; struct cache_tree *cache_tree(void); void cache_tree_free(struct cache_tree **); void cache_tree_invalidate_path(struct cache_tree *, const char *); struct cache_tree_sub *cache_tree_sub(struct cache_tree *, const char *); void cache_tree_write(struct strbuf *, struct cache_tree *root); struct cache_tree *cache_tree_read(const char *buffer, unsigned long size); int cache_tree_fully_valid(struct cache_tree *); int cache_tree_update(struct cache_tree *, struct cache_entry **, int, int, int); /** bitmasks to write_cache_as_tree flags */ #define WRITE_TREE_MISSING_OK 1 #define WRITE_TREE_IGNORE_CACHE_TREE 2 /** error return codes */ #define WRITE_TREE_UNREADABLE_INDEX (-1) #define WRITE_TREE_UNMERGED_INDEX (-2) #define WRITE_TREE_PREFIX_ERROR (-3) int write_cache_as_tree(unsigned char *sha1, int flags, const char *prefix); void prime_cache_tree(struct cache_tree **, struct tree *); extern int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info); #endif breathe-4.1.0/examples/specific/class.cfg000066400000000000000000000004161256765247000203360ustar00rootroot00000000000000PROJECT_NAME = "Class Command" OUTPUT_DIRECTORY = class GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = class.h class.cpp QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/class.cpp000066400000000000000000000003031256765247000203540ustar00rootroot00000000000000#include "class.h" /*! More documentation in the impl file */ void ClassTest::function(int myIntParameter) { } /*! More documentation in the impl file */ void ClassTest::anotherFunction() { } breathe-4.1.0/examples/specific/class.h000066400000000000000000000036471256765247000200370ustar00rootroot00000000000000 namespace testnamespace { //! \brief first class inside of namespace class NamespacedClassTest { public: //! \brief namespaced class function virtual void function() const = 0; static void functionS(); explicit NamespacedClassTest() {} //! \brief namespaced class other function void anotherFunction() {} }; //! \brief second class inside of namespace class ClassTest { public: //! \brief second namespaced class function void function() {} //! \brief second namespaced class other function void anotherFunction() {} }; } //! \brief class outside of namespace class OuterClass { public: //! \brief inner class class InnerClass {}; }; //! \brief class outside of namespace class ClassTest { public: /*! \brief non-namespaced class function More details in the header file. */ void function(int myParameter); //! \brief non-namespaced class other function void anotherFunction(); //! \brief namespaced class function virtual void publicFunction() const = 0; virtual void undocumentedPublicFunction() const = 0; //! A public class class PublicClass {}; class UndocumentedPublicClass {}; //! A public struct struct PublicStruct {}; struct UndocumentedPublicStruct {}; protected: //! A protected function void protectedFunction() {} void undocumentedProtectedFunction() {} //! A protected class class ProtectedClass {}; class UndocumentedProtectedClass {}; //! A protected struct struct ProtectedStruct {}; struct UndocumentedProtectedStruct {}; private: //! This is a private function void privateFunction() const = 0; void undocumentedPrivateFunction() const = 0; //! A private class class PrivateClass {}; class UndocumentedPrivateClass {}; //! A private struct struct PrivateStruct {}; struct UndocumentedPrivateStruct {}; }; breathe-4.1.0/examples/specific/decl_impl.c000066400000000000000000000003411256765247000206410ustar00rootroot00000000000000/*! More detailed description Yeah and some more. */ int open_di(const char * a, int b) { return 0; } namespace testnamespace { /*! Even more documentation. */ int another_open_di(const char *,int) { return 0; } } breathe-4.1.0/examples/specific/decl_impl.cfg000066400000000000000000000004451256765247000211630ustar00rootroot00000000000000PROJECT_NAME = "Declaration/Implementation" OUTPUT_DIRECTORY = decl_impl GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = decl_impl.h decl_impl.c QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/decl_impl.h000066400000000000000000000005611256765247000206520ustar00rootroot00000000000000/*! \fn int open_di(const char *pathname,int flags) \brief Opens a file descriptor. Detailed description. \param pathname The name of the descriptor. \param flags Opening flags. */ int open_di(const char *,int); namespace testnamespace { /*! \brief Some documentation. More documentation. */ int another_open_di(const char *,int); } breathe-4.1.0/examples/specific/enum.cfg000066400000000000000000000004011256765247000201670ustar00rootroot00000000000000PROJECT_NAME = "Enum Command" OUTPUT_DIRECTORY = enum GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = enum.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/enum.h000066400000000000000000000003721256765247000176660ustar00rootroot00000000000000 namespace testnamespace { //! \brief enum inside of namespace enum NamespacedEnumTest { //! \brief namespaced enum value FIRST, SECOND }; } //! \brief enum outside of namespace enum EnumTest { //! \brief enum value VALUE }; breathe-4.1.0/examples/specific/fixedwidthfont.cfg000066400000000000000000000004511256765247000222560ustar00rootroot00000000000000PROJECT_NAME = "Fixed width font markup doc test" OUTPUT_DIRECTORY = fixedwidthfont GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = fixedwidthfont.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/fixedwidthfont.h000066400000000000000000000002101256765247000217370ustar00rootroot00000000000000 class Out { public: //! \b Constructor \a for Out object Out() {} //! \a Destructor \b for Out object ~Out() {} }; breathe-4.1.0/examples/specific/functionOverload.cfg000066400000000000000000000004361256765247000225540ustar00rootroot00000000000000PROJECT_NAME = "Function Overload" OUTPUT_DIRECTORY = functionOverload GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = functionOverload.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/functionOverload.h000066400000000000000000000022061256765247000222410ustar00rootroot00000000000000 //! Non overloaded function void simplefunc(); //! Function which takes two int arguments void f(int, int); //! Function which takes two double arguments void f(double, double); namespace test { //! Another function which takes two int arguments void g(int, int); //! Another function which takes two double arguments void g(double, double); } class MyType {}; class MyOtherType {}; //! Another function which takes a custom type void h(std::string, MyType); //! Another function which takes another custom type void h(std::string, MyOtherType o); //! Another function which takes a basic type void h(std::string, float myfloat); //! Another function which takes a const custom type void h(std::string, const MyType& mytype); //! Another function which takes a const basic type void h(std::string, const int myint); //! Another function which takes a const basic type template void h(std::string, const T myType); //! Another function which takes a const basic type template void h(std::string, const T m, const U n); /** * Test function 1. */ void j(int); /** * Test function 2. */ void j(char); breathe-4.1.0/examples/specific/group.cfg000066400000000000000000000004771256765247000203740ustar00rootroot00000000000000# For a case where Breathe was failing on the doxygen output PROJECT_NAME = "Group Test" OUTPUT_DIRECTORY = group GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = group.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/group.h000066400000000000000000000023221256765247000200530ustar00rootroot00000000000000 /** @defgroup mygroup My Group * This is the first group * @{ */ //! \brief first class inside of namespace class GroupedClassTest { public: //! \brief namespaced class function virtual void publicFunction() const = 0; virtual void undocumentedPublicFunction() const = 0; //! A protected class class PublicClass {}; class UndocumentedPublicClass {}; protected: //! A protected function void protectedFunction() {}; void undocumentedProtectedFunction() {}; //! A protected class class ProtectedClass {}; class UndocumentedProtectedClass {}; private: //! This is a private function void privateFunction() const = 0; void undocumentedPrivateFunction() const = 0; //! A private class class PrivateClass {}; class UndocumentedPrivateClass {}; }; //! This function is in MyGroup void groupedFunction(); /** @} */ // end of mygroup //! \brief second class inside of namespace class UngroupedClassTest { public: //! \brief second namespaced class function void function() {}; private: //! A private function void ungroupedPrivateFunction() {}; class PrivateClass {}; }; //! Ungrouped function void ungroupedFunction(); breathe-4.1.0/examples/specific/headings.cfg000066400000000000000000000004051256765247000210110ustar00rootroot00000000000000PROJECT_NAME = "Headings" OUTPUT_DIRECTORY = headings GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = headings.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/headings.h000066400000000000000000000003031256765247000204760ustar00rootroot00000000000000/*! \brief This is a documentation This is more documentation.

    Header

    Text

    Header Bold Header Text

    Text Header --------- Text ### Header ### Text */ class Test {}; breathe-4.1.0/examples/specific/image.cfg000066400000000000000000000004201256765247000203060ustar00rootroot00000000000000PROJECT_NAME = "Image Test" OUTPUT_DIRECTORY = image GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = image.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES IMAGE_PATH = . breathe-4.1.0/examples/specific/image.h000066400000000000000000000004421256765247000200020ustar00rootroot00000000000000/** * This is a class with an image in the description. It renders like this: * * \image HTML imageExample.png * * Breathe & Sphinx should automatically copy the image from the doxygen output directory into the * _images folder of the Sphinx output. */ class ImageClass : public Image {} breathe-4.1.0/examples/specific/imageExample.png000066400000000000000000000411541256765247000216600ustar00rootroot00000000000000‰PNG  IHDRddpâ•TbKGDÿÿÿ ½§“ pHYs  šœtIMEÝ åÖqÕ IDATxÚ´½wœ]Wyïý}ÖÚå”é3iF]²$˲ä^ÁØÜâI ÒnÚ›@€„ä&„r3@››äB›@pä. ¡Ù›â&WÙ²eIVŸ‘¦·Ó÷Þk½¬½ÏœŸÉ÷óyÇŸ±fΜ²÷*Où=¿ç·ä‰$± ƒ - ± X •c±ø`HP‚{ ZˆÅ³‚ JÜ{Š÷³k-J)V~Yk‘æ¿Ùc@ó÷•Ïmý½ÝóÚ=ßó‚Ïi}1fÙkÛ]ëÅ®­õß•¯_yížB°Ö ¤ " ±k-žRnp±¨æ›¸o±`±(q3–½½±à©t0±nð¡9­ JvS+'b倯5Yí&¢Ýg­6ˆ+xµëi÷Ü•¯¶¨Ú½ÆeP*]¹‰Ï‚Å‹Û °,XA#xÖ=."èl€Ò`1X$Ýw Ðéĸ 7Ö‚¸U¨QˆHsÅf+éRz­k7É« ÆÊ׬|Îj±Ög¿˜ÛÜ…å¹ bmjv,Zp;Ç`l‚Á€5ø¢ Û5¢–oI‹›˜ÔÔaAY7qA:)JÜÀÛì¿ÔdeÙÎ$(å>'ûn·ò²oý{ëÏ«=§õo­æ){ok-Ƙìâ‹™ÂÕvuëßW»VýÜØ¹‘Á "§=´¬ ÁÁÐb- -© e@¥kÓç‚3aé$e¾†làEaI/2ýÛÊÁnõ/k­ªÖn}~»°ò±v¾cåûµNNëó² l÷žÆ”RÍ¿š‰[9q"‚>sè©‘ûîù:³‹óìØ»îÎ7XÖ °x^‹ó¶éëÅZÀ¢Ä™)NN'Cp““ýÜ:!"âl`›ŸÛ™†•´š_ë÷v±š\Íɯv}«ùlbXeÁµû õþÿ}|ê}¯¼î5|á¾{0¾Òˆ(”·Ú•`RSæYç7<_TÓÙ+œ?º òDRó•톒íœU.rµÁh7˜k9ÊVÓÚÎǬ4#«MÖZ»õº²Ç´Ö«¾çJ3ÙÜ!þô¿Œ¼ì5?ÂbóôÝßâ+Ÿº‹)Se÷þtå è4NÊBbúZ¢¥ìo¤œý¤Hý–m©¦¨Ý@¯åT/6˜í&w­øb¢ªK1©kË®ýc,å8æî/ÿ'ŸúÓpôÁG9ðŠ—ó¶÷¼›—ÝzžF[ÓŒ¦¬dþBP”8ÓÖÌ_Ò¿+\° QKñðEBÒVÚδ\Jnr±<áR^×î5í&òb÷q±ëzÁ„6‰­!P‹pòÜ)>ûñóoý_h?Çkßôëüö[›½½X,& oEÀ•†ÄÆ™' "¶™{hëÌ‹Øl[çøb/8³Ë«™žKYÝk öÿíuµûùÅÞ³µyÊ$6ÆC5·mT¯óàÃóg¿ÿ{{äqö¿ôe¼õ¼ŸWßx+…ØkçKà‘E]YB˜¸ÇE§¦N–mŽì"³d5r±ºX¾±š³^+Û^mg^,_íÚ.–ô¶"M3þˆ‰l^eݾ$.KG1¹0Ç_}àý|îÃ#ìêåÿyï»ùÅŸÿ9¶ºš;BYÀ&(­1ÖbÅ⥉ 1QÊ9ú‹dÎ+¿Ö /5ƒo½Ñ‹eâ/Æ”µNìÅË¥ä)Ë>û°I¬gÿUꈱ( ¡(jÀ=wüÑûxö¡‡xÙ½–ßüÝßáå7ßB§öÐĈUΆYÁŠA,xé{®f»[oìR2î‹™¡K™¤K5a+wïÊðõÿÏë’笱X—W¨ÌüˆC8”X«Ð'ÇFù—øÿ‹!Zñs¿ýVÞü[¿Åå½ý.Ä3£šžuùÊm€•+m-îÅä+ÍÎjþf5´Ò´]j€q©ÁÅj˜€KbKŠð*„†Š r¡-&…B¾ qÄãO=Á_þ÷÷rÿ~™=7ÞÂüÙŸðã·¿œ<.±&söKŽÅ‹(YÕ™¶ËVÈ¥:àÕ “vfêRVþÊëZÍ·¼˜]ØêGW(Ê $Jˆ¬úØ!‰"¶ –¼ö¸éšëø›Ï}–·üÙŸ3vâ¿òïâ7ÿ™™£A 4Jâv‡kŒCWIŽ’$¹è ®ågV&WkMD»A^-¯h÷Þ—r]«½öb9Vó±gãªEûXL—´FR(Ä…¾uØ“M3u?Á·y¿|×{yèÞ{ÙvÕ~ÞôÎwðú—ÿ[»»Á÷¤4#o—‡\lǬµ’/5DmW¹Xf©æ¨]Ððb¾V~†µy6ªZ£TŠ=9ǬRüÊÕHÒÉIF†äŠ@ Âùò"Ÿûìçø‡?ÿ Î<ͯz?û+¿ÌþÐ+öýô“˜emúBk—MÒZÛ|-ûR¾K ‹/V‹Y+ŠZ99ó[«–ŽÆ ç~•ˆàÙ„86hÏC§N>ËÊ”X|+x)n¥D¨ˉÑs|æŸîâc#ï"Èw±ÿ¶—ò«¿ýÞøƒwÒ‰ M ¦h\¶/VÀ€U¶­IXéKVF?/63_ ëZ-ðXíºZMàZ×µròZ'®‘³ÖZ…Á À’`ƒ8³“]Œ(¬œBœÃ'…J´ ‚A¸÷ñǹëcãÛŸÿ<å¹Ev½ä&~ýwÞÆë^q'C…¾£¾UquzQ%Ø;!—–®ŒøÖZÍ/¶Œ»Ú„´õ+ç­±b Îìk‹«7)Ü6D6}L±Ÿ¬ˆåª!¸ŒÝX‹M ù׿û_¹›Ñ§èݹ×üÜxͼ’«wíbÃà iÚ,ì÷ZIâÿMM}5g¾V!ª²Ög­v]{¾œ·‰•tˆ­ 1iy5(++Šˆm’bYŠÄH¦lbC ³/•a±. É5ãÊékI°$Ö’¤5'K†ü ^.Kš©Kú„ùJ‰±±ó|÷Þ{ùô§?ÉáûB9†vlá†ÛîàgÞø^ùÒÛèYº0îLóýVú—D*iγ A³–«¸”°.•…Ü#/¤lõk]×j~¦Ý“glb-}Å"¡R`b¥]QÊyŠæ=Y ±”#c0b1-·ê±TÖÕX|ÑÍš½JwYdáÈ©|æsŸå+Ÿù7Nyc ý{wðK¿ö¼ñ'^Ç®õ =g]æo2fËEì·I÷X‚[0‘±X•Þ‡u;G‰£)yʲÄÃÒʼ²|)þ©]°p1´Zv½ü9^ÿ_žŸzÕ«YßY$`É?8³eS–HúFJ¡ÒŠÅ6–Áý-+ñ*+èæEe\ÙW‹så³Àýâ?>ÿyøÖ½=|˜º¯ùÁ×þoüéŸä¥×ßÀ–Á øËo•Œ(–åކ$ÄÖP³–²M˜*•©ÆV)%”K` ù|u=½th!L_GÊÓä6«tª‹ ¹/„\ ÃZf*3öð#¿ðÞò[oâ†Ëö¸Os‡Öœ3£þ˜ô´ÒŽ”ñ¯š…*—Ç8go0)V&iéWKV‰¤i^ÎÍÎñÐ#ñÝûîå?ÿýK<ä{o¾…üÑ;yÝ«_ÍK®8à’Ò Êp…zG/Bˆ,̈a6ŽhĆFµL$–ﻟoþÇpâøQ¢(¢g ŸW_ÍÿðsÝ 7÷B ÚZ¢”¨¡¬¡ ^š$ãl‘ú²tm,™Ai–¬/Á^æwb­ï!*À}®¸åFþè=ïãΛnB[ÓôGA¥NÓð¸Ü‹±O{)Îà¥3ž` ÈZ÷­¥šæ=»Ýz’0>=Á}ä>úwÜûµ»éêëä–;_Á›ÞöÛüèu7»×¤+%ËùJ…É8¦šâFƒz©ÌÂôŸýì]|ýŸ?Kyjk—–– Cvlã¥?þZ^ùÊ;9på>ú;;Éùq‘$ak¢Z|QxVˆJÙ›ÎÂeÌ͕ĥÔCVN’¦£k„ „Î.Pš‰±ÓÜÿø“ì¼êj¶»Tú!†ÌRHêSl« 1I3¸iÖß› •ÚwQŠD,FÜÚÖF53wc,žº‹\µk?ý†7ðŠ×þ(çÎqï¿•Ïüý'¹÷‰GY¿c ÃCÈRŒšˆŠA>OúäóyŒÀç¿ø¾öé¡<5 ’ÒF3 “I(MOqä±G¹ï;ßfçžËé[?D5‰@¹ÈÑ Rª¥I" aáô…ó|éÛ÷pðé'™©WQ9Ÿ ðD³rc´£$­VÀrÏÙ¸É29ä» bI°uïx9üó?eÿæmÆb”ƒ;2¼ËÁåÎê%:µërœ¦—MŠPëV6Ö¸0‹ˆv I(ÛRвÍåf€û?ÈG>øa¾ýõ¯QÜ0ÄÇ?ÿØ¿k' k1PI·Œ%jD”fg9yäžxø!Μxžéóç)/,P¯V‰ëu”†÷ìá×ÿÛï±ë²=DQŒEà ¾F¾RJ¼?ö(ŸüøßR^˜¡§¯ŸBG'=Ù¶ó2®Ù³Ÿ-ÖÓßÑI¨ÙðH˶Y‹2 zËk'.8§½n#âY¤^G´åõ?ÿ³¼ïÝïaC¡ ϦÄétVFàI NªŒ8‡`Ó QLÒò*C–ã¸,¿iƒ[ê2*M%¤ù^iÁì¡û¯ÔÙÄžGd Q£A”ÄDqìX“€§]-Ç&1V)â8ÂD1qT§Q«Ñ¨Uñ´¢§¿Ÿþþ$²TkŒ(L\#®GD6ÁóÂBßüÆ7øÇ|ˆxvŠbGÅBžþ~ößpÃÛwR^làù{÷\ζ­[Ù±~yQ/ȉÖä#¾Å‡Î˯aðòË9}üY”Mˆu|ñö?ø=~÷kóäE'}iY¨T7X–E,ƺ÷7X8Èߤ>F)E ‚JQ‚D,XÅ‚µea±ìê.Ú£7$F§1öµVøAˆ±Ï÷ñ=O+—§(Ç@‚ò5~zíH­ C,šÅJ?~ï{xàkߢV­â=HöïÝËO¿îuTMÂæ-ÛÚ¸‰zÜ ³ØÅÑc'èééfçå{¸|Ã&ºV+£ƒl‚ôå?þ³#/ù…_à­ïÿcÖ mãÉǨ•ª “À“Ï>ÃöÝ—±wË6‡`Y—xaÜÊMÒ£ÆÕØã4®7Ö¤YÖŽ°Â¡¥ä»ŒxmYª¿4+4Äí #Bb¡¢„ïzŒ'NѨ”¨UÊØ¸AT«bâ“ʸ5BbŒ‹¾¬CèL#â²sƒÅ&1žJñ;ãÀN´F ø)š`8yfŒ?þƒwòݯþ'I­Š b=½ÝÜü’[xÙÿÛ¶me~fš›‡) <öà<÷øcŒNMñü¹ ŒÎNQèê¤;_t)¨Øf³²ø¥ßq×F®¸ö&.\à+_þÓÓ3Ø$q€¡êå2gOàªë¯f wÀå)–•9HcŒë+fŽ"Y,ŸqyÛá>i`д±Bó7ƒ%CÃbeID8}á<<ö˜ Äõ£¨”W¬•ã×{¾&òxž‡ï{h­Ýõy‚XcðEÅ1Z *£Ž)çø«wõüÑ›ßÊчDŒA ¶Ñ`ÏÕx×ÞÇžË/G‹G.W`rnŽc'Nò?ÿä½|ùKÿÎââµj…$i093ÍèÄ$ó$ø¹AÞ…ÐÖ¤lÎ%â >5>5òýÇãÑfrzšD æIâß÷I&''¨–Ë\ݵÃÚºÉ2¤,ø4‹T ]è €Ìlè2ÌÉ9õ%òµ,9ï”'l•ciؘKb z’ÙR‰\®@¾˜' DAjŽ|ßGiAk/ð´"‚ @kG‹ÕZ¡DzžöОF‰A«t‘™„™ÉI>ñ—åoþäÏX˜¸à®Ï¸Ô74À­?ðrn½ãº{»éíìanvŠÿ÷ýïçßþñÓŒ£'LÎ.0=3I}q‘¨#‰ejv– ³³”â˜|±HG69Ï™“×Ó§ŽDùNÐ!âx±ïa0ä‚FdHâ˜sgÏ2ÐÛÃWî%Ä#!Ae›u^Y¬˜|^IÍ\ (3]&e9f¦ 0âÌHb2Ž‘XC©VcôÜy굘޾^Â0$—ÏQ,ñ<0ƒ±†¹\ˆÖÏ÷ÑZ£<…‡Æó<´ç*Tà9pTiŒö8ñÜ1>ðöwp÷ç¿@R«¸À#- ÝüªÛù‹qãÍ7ÒÛÕÅôØ$ûÈÇøÜ?~’“‡b*uw/LQkÌ-–(Í–¨UQQÄB­ÎØÔ$g§&ˆƒ€ÞÞ^‚4™6X´3bUoh¹,$Vá{ŠÄ$ã2ÕÄÄ9ü4{®ØÃe›¶ <«ðd‰¦¢ZàtÝ d;ˆåDë´4#0q¦+5‹Q’PObÆÆÆˆj Ö­[G¾˜Gy¹ „aHÏäraHBøZ“óDižÖø†.šRŠ|˜# |Ï#çûèÀGD“K ƒå{ÌÏÍq×ßþïyó[¨ÍÍ¥ˆÂòtû•{éêí¤¯·ŸáÍéZ×Ï]ÿtÇ=“Í)vÍKI,ʤ¿7"ê:s¥Jµ Q¹B½$Ñ¡ó'&fb|ŠÒÜ7^w€Ž\¬‚¡RÌKaQJ·ŒsJ»Ú´ôœ,K8Å!¶Hâ„(jPZXࡃïêDûA.¤æ‰êu‚ ¤æ! B<Ï'ðÜD)¥ð´FkÀóðEã+ïù?sŠÿñ®÷ð/ý_$¨éØ[³:¥cÇOðÀ}ßáØ‘cä:;xà›ßáËÿü¿]•À.'lk3“¨Zk°‰¡^oP-W©U+ÌÏ-PZ,155ÍØÔ±§ÑV]®àmÆ/)|Œò¹“Äó3ØÅò[¶ˆ5ˆÊ &&'(r\½o¡xŽ a—n$3H­&le¼µ—¤¯1Ö¸ð3mmˆë抌¡5ð•Çc?ÂÃ2°®Ÿ$ŽñD‘ sXÑ$&ÁC´çáZ\†…M ŠÐ*r9¥¸ïáø_úU¾ûHl@¥ÐG› &¦qáì9ž|ø Ï>~Åiæò6¸•5y÷z‰ÅŠG"P#*qDl-ÕFƒ…ùÎÏL¢µè‹Å˜˜xlšò3Ï`KÿP…ÕS'Q]¨\×IQLḬ̂ó²ílÙ0ìœRUe¡V—Wö^,#7·b?Ê‹â.I°DÖR­×‰âˆÄX>ýÉäÔñã¬èw +¹ÅbÏK#ª¬EÁM à[×¢g0Üõï_àm?ÿKL;•¢Ù€¶'gMKb-6J°‰ j¸„†R×ëJä’6½Z,xšZT§n"´U,–Jh:zFÄ‚xtwábâö=xG±§—F£LctoÝ qlP^ž Ÿ§Z«qæÜi®¹öë;ºRô³¥A‡åœínréFTË ¹ÂR’f(nr zƒÈŒ§8{î,ïù‡"QÏ©'1ZA¦–‡§¥IËR××äÂ,ùèÇøãw¾‡êâ"6'àûnW&&í­ak\ê*ÓÒ2ˆÖÍ„{­¹Ö{WYiÂZÄ’8ÂZW}%R¥‚–«nÑ==èÁa»Éõ÷8T[,A. ì¤>3E’ÅÁT®@Ò¨c033M­Râš«¯¥Ó÷Yª Êݲ­]·ÒR2qìIRìË(0âr“$Tëuâjƒº1ž(fg™ž™E‰!I`rb’=—ïfCOsî+>h-a³;׸(ËÂ28Æ ,Qшêh,…"3Ó3œ<ú¬:''L剃±°0O­Vâžû"£GžÃ6ÎLx‚i[‘VX#&A4ª`²€±=ë}­E¶Zsi+±¡iºL¼Ä¦Q ÉåÐú²+G‚Bí{öÒß¿S«qôð3ŒÑÙÕ(íQžŸfúÙ')>ÃìÜ,Õ©il£AÐÙZ3;3ÃÔü ®:@_˜wQKÖR½FÿÊulFRkÅd<-$‰ÑJ‘ BúÖ prl”™Ñó©C& ÁÛˆ;~’c‡35vžlšIbˆ"TêC¬I Ž]ôÕÝÏiß$+ZWm²i¬¥­ÒäUbÜ/6ð°a€¾úÇ~näú›nf~~–³O?ÁÔøyâr‰ò⥅yæFÏ1ýôS\xà~æŸ}ŠÅÑ3$ el¥‚-—Qù¹®L’pøégˆª%n¼é&òj¹co7«1ÿ$ ›››&\Y"Ž#”V:ºÞ²‰3“˜9{1i“†¼‚7Î|Z¥Ót:F„­GéäXˆ@Å L’,«%­Õ*ÑNî£]Ïú 'Ïõ܈¥µcUxâyè?ò#÷~å?˜8s1 •ñ“ÔN':s’ÊÙç)?”ú¹³$•Dk(vB±è”’ˆ¤²H¾¯—$fÆyæéC今\µ?A+_"“=3O­%\‹qh/£â;ZxåkúzzÙ¼y3Ó ‹LŽOb£Øí†4NmMÒ–LcºZ­ÁFQºC"ù¤ çv¬ÄV]–Õ¢©öa½¬xíW‡Ehžç€Î“‘QÆà›¥cG0gÎ • Ò¨A£qâVV¾ýÐÙBamâ2ÚZƒÚâubTÜ Z®pøÈ³lÞ¸™½;v:ðqåuæö‰´T¥™„™´¤ë2âœÒ×ÝÃÎ;ñ !£ãcÔjuˆ!ËEÛuØ.çf˜4!\þüÌ¡_¬ÉóŶD¼`<,àyX­Ñ…+¯iœ=FíÙ§azŒE*@Öó‘þuÈà ’Ë»¿'‰5³®ÁÓÖêHbœòRR.•xîùclÛ¹•]›·¦º(« À,Ó&Æ/`¢Œiª™ˆr[ΘñA‰fvbœGž|’koºáu©LÓ Vúj?gjϸYÈÊ"…Ö®ãÊá®ðäùšþž^¶lÙÌÐÐ0öX\\¤ÕE«èE¯XDèÖ¡èð¬¥!Î$¥ÁšU|ÀêpÐjÏiGEÍÄi²„X´¶žŒ`[?4û…êì@¼}—àwßù.Â0Ç3O>îJ°&Nù?i¸©"žsŒ¾ïþM s39öWìßÇÐÀ ’:ÔV;²Z{rÁd>CR,H§D=% O»¼Â)Ó ¢…bБ/Ð78ÈЦMt÷tWêD‹eLáC'Ð)–°N`³…M(Öi¡Š¡ž²û/EZie4u1 ¨V“ÖÊmSA­­i¥>*ÄuÍ&1¶VÇ:Ø}󭜟ä+_ú"µÒI#¢•ò¯B”uä8¯Ø‰h’(F”ǹ³gyþôóìÛ¿ŸMƒËk ®!þÒ´®ÒèGZÚ 2í…Li> Áó4¦L! IDATa±@_o/CCØ0"å*I¹‚¶Ð0†D`§@¯…^íX¶ ñf€H©&mgµIX)í´Z;õª»Jpâ xhQ2² ¿—úra£˜ó³³=~„¨ZJ£I‡/Yãí9ŠP PÅN÷]Ae~S^üަæJ=y’+ìg¨§7åøºèIäôS:j“ \#Ãüµv&LR§=xäƒb±@g?C@kÔ#òZã7ê°ôHÀ.± Zè¡ ˆE˜1–(+-¬¡y©»h¥“oVE9“Œ´ï½vP¢S¯"žÂjk=ë(‹Ôj5ÄÏa•íá÷v£6Q~âi’éYT>À(…õC”pôÄqž<|ˆ½®d¨°).°–0Yó†Vp™M*3«SÖ‹c+º6¼Ðw¥h ¥…0GOWƒlز] •P(×ÉU$ò:¡_yt[M`ÜÂ[а` ‘‹wâ® · ¹—&Ë6-"#íìã])l®ˆ$†¨Ve™œ˜äøóÏ3¼y˜Í†]„”©”®BfÑW¶6å³ Mw›jQAÕJ#¾çt|?Pèê ÐÝźM »ºh4 ÑüºÑ N4›àá $iûOM`Kb[Zç.A*¶Y^¸¨–Kú?qlú‘•“±¬ß:Ëju¬ï³ýÀULŒOóø#ß§VOŠ]lØ´™úÄ,3|SžK£( •2âkT1ÄVkˆQ$ œ¿0Æ£‡ž¢«·‹+víB§ÑšJWÂjp„m!lgx“ó#ª9!0” PJ£Äsä8¥<|.OG±“Þ¾Aº·mFuwQmT©/TH .(Kƒˆ¥`]Skb-‰rÜâ¦8aKÞ´2ÏhgÊVfûË{ÖŽ DFVë _¶­ƒ­7˜­•9}vŒFµFØÙÉÐÆmL=~ˆÒSÔ«Ë>T›S­8ÌÈ÷ ¢Ä')׸0~¼ÑÂÕ×\K¨´ ýVéTjÕl̾Ü$8£jéFSJ!VТ×ÉSxJ¡±)O+ÌåÈótõôÐ=¸®í[±¡Ïù‰)jÕ0Ì`ТÑ6¡W  ]CO!VnGzÖ%¬—ª<×®>ÒZ9Õ¢¼°«'.ÍbÑqL\ª!=Ýôo ¯£3÷|•êÙc);}y‘ऩ7T¢ƒ€¸Rc(—y䡇X¬–¹òêƒ\[_Ò®‰²éWŒmQ¡h’ˆÒ~I©¡‚Æà9o—ák0Éåò…Žuä†7PܶɅ9ææ™³Â”M\W•z ô[È)El ®ÀdÍ2ˆ¥]¦±>øìõZ”Œ`ÒVƒÒIËf9…*lT' ø^ȹoÝ]œF‰JK—¿‡c2¦Ú¨C½AR¯90M,¢Q’ðøSOpæìY.»|7ëzû[²õµ«u$k³S-H±ëv)˜Šàá!^€Ò¾»%hO‘ ó :ººéY·Ž¾í;˜‰cNOÏ1]‹(õTí>'BWJÈŽ€jVûÓö:uJCj‡·ëѪ³0b£ˆ4…h +¥PV¥Å#C23CéÌ TÒåø¸ívY+Ëá5‰cÇÝ 5E)‰¨ ÔJ|ºDáa© ÄHSü³]žÒ.i½èâú¡‘¨ìºS3ˆb娺ip ‹¤Âý)Õ½ÙêÊÒÒT´^ÙyšeÄ&GØFìžæyÍ–…±± |ç»ßa¡\bÿÕ×Єk&ŠíÂea‰5Ù*þ,1PIï‚ö|´ï¡•Biõa>OWWë6m`ÓŽ˜Àçôè(•Fƒ’µ,’F]8LL TŒ¤]×¶-ðbRYÆ®ã|0»éݼF¥ŒÄ ŒrÊ Îwh4Æ!®¸m¾´ÅœíS¾æÊ—ßÁ¿ô_9òÈA¨×H™1ÿd©Ý×â¸I~±‹­7ßÊÜÄ”ëáðÄz”ç¦8øý9rü9v_uë{ú—á_­ •¶ý²ST‹8™ÊDV ÌQ…ï;*j†‹ô ô±ã²ôoäì¹1fçæ)[CIU ‘‚ÇH‹&Ð^,ºÅ©[/yó‡þŠ—¾þ'‰::9wäYhÄéF·h±¨Þ­(k0qã…š=;¶sÇÿ4|í+LŸ<• –Ùf×nÖf RÛ¡‹E¶Üz;åʇŸt¶³ƒ\~€Asäðaîÿî7 zŠlÚ²Õ9üf»µ´•ÚX-ñBZZ#ZúÏ›P~ÚѪµv‘“ç9–¼ï…b‘ Û·°kß^J•*ç.ŒS4´¥"Ð0`D¥¤^À\\ %^Î4~ndý•W1³¸Àý×013ÉÔñ =$, û†±IÝU Ûh‚Xk¨-.òÄ÷¿Åì¹³à)¶]{-WÝvSã4ËÍÈÃKÐ7@ß ·075Áì3O!õD1VkðC!¨„‰s£Ü}|=Ëà¦a6­jjÉ·ûZMPSRð,K”d‡,Ø”RhQ$é¹L´J9Ĺ"ë7mb×¾}töö2:6ÊâÌœÛ]™RËi¤«ñÑ–/ å©¯–8=w†¡Ý»X?¼'¿w?óFñÖo¢sÏjΣæÆÓLº=~£GÁ×~€ ¼ú—·ÿ÷÷ÒÙ?ÀÉ3'¨ŒOb°ø}ôßr3 GS>ú Ô+©2ÎÁÇ¢ˆFB<ŸØÏ=Î}÷ÝK-ª±ûò½t„¹¦6‰ iP±z 2-¬–fò–2,31%¸Â›Z‚÷×àã{>žRø~@gWÛ÷ìfÛå{X\Xäì‰Kb­^7£Õ¶DXíNo`Ù«-ÖŽ$s³<ÿôaúþƒÌž¥ÿ²+èØ¾ƒ¹‡†…éeÜ×¶7‹»“ÄCµ^gxÇV^óc¯gj~ž'|ŽáÍ®9ÀìwÄLŒº01UBáºt1$&3‘Íïè`aažû¸Ÿ‡Œ¾õëvÌv×N-k‹Æ´OÄ–’Íl‚l ÙZÒì^+GB¹¶¸Ž®6 oäúo בçèÑ£4ªµ%}aÛ¦]NÒN!ŲÀ`*5ÂM;Ø|õ5ÔJ‹L}ç;Øú\êšÕíö%ËuI¦ÏžáÙ§Ÿâ¹óc=x˜Z¾@ßÖ-LïaLy–D§Ïõ=Äó›-Ï"1ÆMJ 6ŽÐÆõ­I¬åÔ©Ó|ýž»9~êƒëééí%çû«ò¦ÚÉY¼`Ò;T²|µf §•ù|üÀq†ϧ³»‡}pùþ+™žŸgjf†¸^_Öd×PYccÚH« ùlB\hèç Ì>÷å£Çð‹yl£‘âL¶)°dºd™ÜQ³ª'ÏZæÎóÜ“‡ 6o"©ÇŒ?r¤<ë:xI9­a.-—‚Õ’Ò@]™V‰“`êu’R‰ÂºA¬h::òØ8áɧñïÜÇÙñ1¼BžþuëÈi¯YmòpU{r[;ŠN· í(–æÉY«‡‡"P®?Q€\>Ϧm[¸ùöÛèÚ@µÞ`bbÜUU³ FZÂÌv‹:Å S™+q‹ÅÍMa*åÔ¬G(“¤tð¬‹ë]H¬šúS+[ DIùO*‰¨ÏOS9qÓpýzø9ò›†Ù{ûm½},”æóPYPÚQ8ã4· k#z6nåÎ_ÎŽRs´ å±X®pôÈq¼ÿ~{ }6oÚL°À[«Î½ÃR+IuíÓ‚²ƒD7ꪅ ñ\ßbGW»÷^Áõ/y ÃÛ·raü<³&h*jÕÅ Ò£?lÚ#ßÜ!Ë0"eÄaSá†!®½ã•”¬¡27ë" ëštVÖ‡W&>Ö@R®1X-H>Gnÿöïàº[oaßþœ;?Áìĸ£ùX\?9ñV4^¡Àõ¯ÿ)z7l£45ÉøÁGI5¼B•ö Î7ªL^˜à[ßø&ß{ä ‰ç³np=ù0Hëø²L¸¬]’Ö´K2!ÊZüT¯%3c’ªE(%ø¾O.éîéb÷¾}ÜzÇí ¬[Ç™Ñs,ÎÍ/sðíΠ%xž¿|B²hÃ1Ð5;n¿ßÿÄ'èf÷m7sâð!êÓ31˸K™ªÏ †BÊ͵±(/Ävtпu+7¾äVrA@#jðü™“LŽ_Àó|§ìhÐʵtèÝu€™™9ž¸ïÛ,D Ô'ÆÑõÉü"q©LT*Õ]÷ë\­Â¹3£|÷áûùö÷¾Ç…ÅYTèZ¦ƒ ÀKMÛ]aÛ¬à– **uü6Sr$O’ì‹hÏ÷é,éëîáê¯ãÖ;^Fæ™%J ŒIٮ愈ˆØe«%=üшe×-/áõWì]Ï\eøÃß§tfÔ)W›¬ ˜Ä‰›9ÍÄ–`®õÆ•€ :;Øzå>ÖoÝÎìÌ cÇžcÛ»¹æº[øòç?ÇÔè˜ãÙêaÿvzŽú…³®77Ìa“m\ÏHØÓžO}r*}ÿ<ÝY`ÇÞ«ð½„Bè±yãFn¸î®9p€=Û/cÓà ^«ŽU‹ð ©f}fÆWUµÙñ)A<“·Nº*×ù•XC©Ræ¹'yæÙg9ôøœ9}šòbÉñØ‚Bg'ý}} nvòÂð‹&¨°u+¯{Ó[èèåßÿG§QQ}yZ±¨Î^’Å9G¡Ibédü#ÁjéêÆïï¥#Ò74Äî½Wðð÷3uæa®‹\G/åS§H§\d“žˆöèÞsC›·’+tðÜýß§zaÂíR ;®½ž÷þíßñ•ÿý¯|ý‹ÿ†K˜ËÑ×Ýͺ¾víØÁM×_Ï ×^ÇöÍ›éôƒe2$­ô׋‰/=w…VVº°‘¥<)±–JQ®×‰¢†Ó1V‚ïyä}¼ç/Ÿ¦d«$Õ*ôŒFuæéÝ2ÄÌ…qâªZÅÁÊišdïõ­GŠÝDgŽ£R%SÈDfT.·âŽA²J#=Er½}èÀ§5ÈûÈåsL?y[+5…0Ý®tQV)öþÐ$‘¥œÄL>ýÑä(!ìîå½ó×üÊO¾Ž'NŸã ¯} 'ŸÇëîÄ/ê«5ÐÝÝÆÁuÜtÍ>®¿ñF칂mCCý0Ó,¸$}^cÝýIª£Ú°03>%²L¬Íå=KºÍ`l¥Ck 6ŠrÔ|­‘|Ε¡¬`ëµ´Ý×:Ñ–þ à$çG[wGYÕ±¢i…mª^j³Þˆ|ž\o?Û·3õÈCØjµ‰&7t”‡QŠÎ¡õxÃë™=3ŠLÏ»ëK…l~ô7~•}ðChk˜±ð7ûþþm¿áÅ¡aÈå\Ka˜#1B`xÚ)HlÚ0̮͛¹êªë8pÅ>vmÝÌ`ÿ…"…Ðwýè™p[SÈmí“{V*¡® }W~y+›JVv e,rI Têú ƒZì[w"‰¢~ú9\3•¨± Vw!¹~ˆªÏ€màä0M“<­H0å•r™Êèt&¸]&žÆŠÆjEǦ!ößr ãSÌ?“æ. Ö(nÿ™ŸæwßÿÊÀ\ÝpúÜ8ÎBùD ”rZŠ …$1~’óQª®}æÌYÆÇÇyà‰Cä<Íú¾>6nÞÌÎÝ—±g÷öîØÉž­Ûìì^³<Û¶1É®-¢Üš¤Ú•úê+ºå¤. ¡ säûÖ Q=Grá 2ÉLkôìFo¾ãuBuʳØÉ#P; µ¦±-é’J(Aˆä‹˜\Ž £Èî«°u×.ÆÇ.ðă,”OcÃMwÞÉ»ÿôô 0¿Øàøñ“|îãÍÁÏ|‚x±Ýؾn<­ˆ­MEj<Phí£LÖÕà,ùŽ.ú»ºØ³y /¿ý6^}ç«(t4…VK4/¦~ݦ**öb[®@½êî'\¿ê™sP›s~Çj× £BÔð­pÕK1‰Àì,R®`­B'™Ÿ"™xIÆk#H»eÉ„*-¨îN¼þ’b7C[¶²ß•xžæàc™ÇÆLƒ^v;o{ç;éì`zz–ÃÏ>÷?sýë?# 6×}ýàëô¬,ƒV µ B$ª;’àa¥1ž&ôß ÑÖø¾§PIÙ‰1®ém¼óÄõ;.sç ù]C¦üR1¥”m9´™åÖƒ‚%;°%Õ¸RV»v]Dv¾ö¿”„Têèùìü,¶RsÑWwbÌØ3È£ب ¢éj¹ c-( òØ|HØßOÐÝM¾«¥brûKnãßò&<•ãüè8‡â{_üWýâ¿b5¬òP]=P,`SQå;ª¨§Æ HLƒï{4’‚B!b?O V:C‰sg\KF>dÝÐfþð­¿Ëë^ùCt…á2Hi5öÉj ÇfM=c.¶6j®Ì`_€á+FK¥9W’ï"¼ò•ìùÍ713·€Y,9h>j€i€‰Q¾‡UëÈºíØŽíHTFj“Î_´n}1בj…dfŠúøyªÎS9?† :øýß=q–ÃOæ+Ÿþ{žúê—°µª[µùN$ŸÃzÊßà¥(¡”&¥¹3´ߣžj·hß# <×m…%Žj”&/ЈêØ0ç ³zä1fçز{}ÅâRÜ&ù\‰>·=œXDF\z®›!ÀÅb–𛸂í@ú¯¦ãŽW°e÷V7m`rì<”«1ˆNÛÑ$+%X_qÓoü"7üøk9yèYìì¹µÓå™´È@GØzƒF©Ä¶—ý ¶ÞàðSÏp÷]ϱo~iÔ\nä{Ï!…¼3‰iï„è¬g1lÀ…Ô¾ïÔ‡ÓôcÆÄˆ*s“$õ|ˆò=ÂÄ]S}±Ì3GŸáðÑçØtÙn¶¬[·\È?“ìÀ®Ù2Ý„ DdD‹ugê(%¶-¨m4‘–j•̓Þ¶z˜ž›#Š ‹•2Öó°¡ÆÚÅèÀ#IbP>Wýؼý7_ßÑÉŸ¢òü°ñª=}/PjÔ¨†ˆòøÞg>ÁÑoËA÷VùN ¢‚Ð!Ì"(ßwc±‰Á÷ƒ4lvgoÕã”Y‹xjs Tket.Äø®Æ"HࣽÅœ;õ<ßùþwñúúØ»k~ëá˪=Ã$+ ´Þ“FоSé4ñ2ñ• 4\<§”F©£»Qº)U0cãDs%Ê¥2ø&²aÓ ½ëº°QD½RC>×ÞyoûO°°Pá_>ö9Né? 6޵ñªDeìÊTv¶<3Ç™G8yÿ·]ãfÆ!ó$ŸÏO»®$%4¤rR¤B™¾Gbbcí(§‰µä”‡µ Õr‰¨Qw¾2ðÈÅÁ`”E[MU /—c®Zã{?ÌÌâ";w_Fw¡ØL½.…ÊäxYÅ®ïÄF5×BkǪjršTK“ÍÒÄh”Í»èÊTÀT°y˜ž…ÉYl½„!ƒ7°é²a¶íÙÅÉsS¼ôµwðö7ÿu ùÔ?ÅÃÿóݘÒɦzB“3ÔÝZ@sÇï™TeÁRŸ›§tö$bh¶Bãùà{®Îb—H(ˆ“Äå@Já…aSnëDk y5¨-–RY€§E›¶;hM¨|G‘JbLX ®óôsGxþôq†6ma˺õË$žVc,ù=¸m$™›@¢úÒ™Ê``³ÿZÅæ—K`¹¤LbD¬i R[…Æ"ÌÍ"çg™=uéS㜟-ñŠŸz%¿ü3·1³hùê=sÏÞóçÓPÒ\Ù4–æÄ8–»KÅ:Bô’U' Bg²”B¡]K·¤g*ŠJIUS:ILBlíÔó=ˆb* ÓX­ J£5ˆˆ=íh?IŒG‚5/Ð$âPƒS§žçƒQ\¾{ÓAZqÉ0P¬µhS]QI}™~{JrîÛꔳ’‹j1ÎAÛ•é«Û!¤‚®–°334Ƨˆ»úxͯÿ$µ¹ ûÁâÑþw’±çÒª¤vŠmçd‰1ÒTh@¡{zé»ö&j“S7–~ˆhhÏM ÒX³Ô^±nrìÒ >Ê:öŒUÚi'Æõ…E Få×Úf F¬ˆ#[[§©•‡J•N•ïÑÐ!¡'LOŒóðSO1³0Çþ+¯"é!7˲Ö2³öpC£T*òë&C¼AèØ‹ø[°ºËíã” iž¼£Óè̤ÒL)ÇUY— a¼L±Á[¿“®m|íï?͉O}dê$"};/c×ÜA¾»Ò쬃¥±Eâ(I?ÎÁVû/Û¿kÕ °‹óÍ2mZá‚$A™G)“ĸ¸Ð×팥=Rj™SÝ<› j5ÇAË:´Ò~ð< hk(ärD&8Ó µˆÐÏ¡”Ð(×xüÉC;ÃÞ={èê~‹¿Õ±k‹Q¢]™;=ÎN.Go„Î^¨×ÑÊÇ] {ñÝMÛ†w¤¥%­·gÇñ`Ò‰qþ-œ{úQf¿öY¤1î\C®ÈŽë¯',(ö÷Ò·{Ó‹ è|È­?ùz’Ȱ09žÂö Å+TΞŖçеòŠR€COm;jQ£•R«¢ª»?_ÀÔ*.6uŒµ“Ò‘jUâZ ŒruIĘ tZu ÎXK#IP6FcU@db‡•ÅK?ÈQ‹J]ã&ˆJe¨Ö JC[kœžpSO%SeH‰H»‰3ok-7½ñWùÃ÷ý¢C~õËÔǧ°ÈÝO­îî9ðÁ÷§êª®|«Ÿ$I0âTîD§Ý¹ÖD ü€Dù$QŒ2â2~Â\Qš¸n¨x õÒ"Gžz†££§Ù³ƒÅ®eÙ¼ňUy(î'·ï:$ï/N;ì_hÔÒÖ¤Ód­Clçžö1ÕÉ4Æ×iù3+š¥¬ž;ÇfŠ=­çôd§²ÖëP­"‹e¢…Žh>o•÷¾v€ Á {_RNBÆðã 8ýÌ)®]_å_¿Ê?û õÚZDøÂø0@Ìž“úSs¢7µŒ© óvDlÊ Ô¹ÆhcÙ!é­2…‹¨7Â.fÐ:#eaörqD_PU‰8ÖbÐëã}àÔÂÓ8ç|S”ÐÜÂ1޶§aæaŸ€Áév¡î㵤ž?ÊäGÙøÓ»¸•¿B£ÑÚéݾoœø\©{ ö{Õâ£*N‡jΗó°$ôðÂI~õç‹”ï¾õ&¿üá‹t?^Þ±i·Éí²R *‚/:°îC'Šfg´€8ÛŒÁ]Ĉ’(8Ï—'Ö=sáIDATÔbrØ »­š…5Šæ„UUÑiÛ5£µMŽOàãœ5B¨»‡T›Èzº}$eÔPt`þœÏô.þ·~R· ®ÌÞü£Ê>Öq„cõÿ™pöŠô-CN#:h\w½nÇN²|õ*¯½üSn}øÁ·2 ­Òl8ÔÈ´N[]²öHvœU‘&Ä‚v”FUUx‰ÎSdA$ØeÄCÝÚCU¶Iu†`ðKÝï£Ò¨sv2†ÛÖƒ–(-DÆQŽÅO”¤•ËHï:Ùm 6©É"q[N‘õp£vûý¦ÖQOÍýr.Ænó' “ÇÐþ=Ö—? ŸUœ¹µÚ -¥Të.ú1I­Šå¸¬C/¥zƒ\œ*Ú qJ®„P¶I(¥H5— 1)•G¤­H®͉e[—µû&Šá?‘Én-&pé>Ýn´~™¬ àçã?JÕërïãë#Ã…wªZFù&F:÷ºYw¥MŒªÕV,—×e¬¤¯!ŠŠˆŒµÑX4%CI ">ÛÖÈŸŒÏ0œ mžêàIÉLF>¶³›ì+­ûø¢¤(ZTT/6ëx±.– c­Èf]õÓjٜ㭦öŒOýï‘› IEND®B`‚breathe-4.1.0/examples/specific/inline.cfg000066400000000000000000000004221256765247000205040ustar00rootroot00000000000000PROJECT_NAME = "Inline Parameter Doc Test" OUTPUT_DIRECTORY = inline GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = inline.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/inline.h000066400000000000000000000004741256765247000202030ustar00rootroot00000000000000 class Test { public: /** A member function. * * Details about member function * * \exception std::out_of_range parameter is out of range. * @return a character pointer. */ const char *member(char c, ///< c a character. int n) ///< n an integer. throw(std::out_of_range); }; breathe-4.1.0/examples/specific/latexmath.cfg000066400000000000000000000004201256765247000212130ustar00rootroot00000000000000PROJECT_NAME = "Latex Math Option" OUTPUT_DIRECTORY = latexmath GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = latexmath.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/latexmath.h000066400000000000000000000003321256765247000207050ustar00rootroot00000000000000 /** * @brief A class * * A inline formula: \f$ f(x) = a + b \f$ * * A display style formula: * @f[ * \int_a^b f(x) dx = F(b) - F(a) * @f] */ class MathHelper { public: MathHelper() {} ~MathHelper() {} } breathe-4.1.0/examples/specific/links.cfg000066400000000000000000000004041256765247000203460ustar00rootroot00000000000000PROJECT_NAME = "Links Command" OUTPUT_DIRECTORY = links GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = links.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/links.h000066400000000000000000000003261256765247000200410ustar00rootroot00000000000000 /*! \brief first struct inside of namespace This is a longer description with a link to a webpage in the text http://www.github.com in order to test out Breathe's handling of links. */ class Test {}; breathe-4.1.0/examples/specific/lists.cfg000066400000000000000000000004031256765247000203630ustar00rootroot00000000000000PROJECT_NAME = "Lists Option" OUTPUT_DIRECTORY = lists GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = lists.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/lists.h000066400000000000000000000070531256765247000200630ustar00rootroot00000000000000/** * \brief This is a list example. * * Following is a list using '+' for bullets: * + One item. * + Two items. * + Three items. * + Four. * * And this is some more text. */ class SimpleList_1 { }; /** * \brief This is a list example. * * Following is a list using '-' for bullets: * - One item. * - Two items. * - Three items. * - Four. * * And this is some more text. */ class SimpleList_2 { }; /** * \brief This is a list example. * * Following is a list using '*' for bullets: * * One item. * * Two items. * * Three items. * * Four. * * And this is some more text. */ class SimpleList_3 { }; /** * \brief This is a list example. * * Following is an auto-numbered list: * -# One item. * -# Two items. * -# Three items. * -# Four. * * And this is some more text. */ class SimpleList_4 { }; /** * \brief This is a list example. * * Following is a numbered list: * 1. One item. * 2. Two items. * 3. Three items. * 4. Four. * * And this is some more text. */ class SimpleList_5 { }; /** * \brief This is a list example. * * Following is an unordered list using 'HTML' tags: *
    • One item. *
    • Two items. *
    • Three items. *
    • Four. *
    * * And this is some more text. */ class SimpleList_6 { }; /** * A list of events: * - mouse events * -# mouse move event * -# mouse click event\n * More info about the click event. * -# mouse double click event * - keyboard events * 1. key down event * 2. key up event * * More text here. */ class NestedLists_1 { }; /** * Text before the list * - list item 1 * - sub item 1 * - sub sub item 1 * - sub sub item 2 * . * The dot above ends the sub sub item list. * * More text for the first sub item * . * The dot above ends the first sub item. * * More text for the first list item * - sub item 2 * - sub item 3 * - list item 2 * . * More text in the same paragraph. * * More text in a new paragraph. */ class NestedLists_2 { }; /*! * A list of events: *
      *
    • mouse events *
        *
      1. mouse move event *
      2. mouse click event
        * More info about the click event. *
      3. mouse double click event *
      *
    • keyboard events *
        *
      1. key down event *
      2. key up event *
      *
    * More text here. */ class NestedLists_3 { }; /** * A list of events: * 1. mouse events * -# mouse move event * 1. swipe event * 2. circle event * 3. wave event * -# mouse click event\n * More info about the click event. * -# mouse double click event * 2. keyboard events * -# key down event * -# key up event * 3. touch events * -# pinch event * -# swipe event * More text here. */ class NestedLists_4 { }; /** * A deeply nested list of events: * 1. mouse events * -# mouse move event * 1. swipe event * -# swipe left * -# swipe right * 2. circle event * 3. wave event * -# mouse click event\n * More info about the click event. * -# mouse double click event * 2. keyboard events * -# key down event * -# key up event * 3. touch events * -# pinch event * -# swipe event * More text here. */ class NestedLists_5 { }; breathe-4.1.0/examples/specific/members.cfg000066400000000000000000000004111256765247000206560ustar00rootroot00000000000000PROJECT_NAME = "Members Option" OUTPUT_DIRECTORY = members GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = members.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/members.h000066400000000000000000000006161256765247000203550ustar00rootroot00000000000000 namespace testnamespace { //! \brief first class inside of namespace class NamespacedClassTest { public: //! \brief namespaced class function virtual void function() const = 0; explicit NamespacedClassTest() {}; protected: //! Some kind of function static void functionS(); private: //! \brief namespaced class other function void anotherFunction() {}; }; } breathe-4.1.0/examples/specific/multifile.cfg000066400000000000000000000004401256765247000212200ustar00rootroot00000000000000PROJECT_NAME = "Multifile" OUTPUT_DIRECTORY = multifilexml GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = multifile RECURSIVE = YES QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/multifile/000077500000000000000000000000001256765247000205415ustar00rootroot00000000000000breathe-4.1.0/examples/specific/multifile/one/000077500000000000000000000000001256765247000213225ustar00rootroot00000000000000breathe-4.1.0/examples/specific/multifile/one/Util.h000066400000000000000000000001041256765247000224030ustar00rootroot00000000000000 namespace test { typedef float MyFloat; void TestFunc() {}; } breathe-4.1.0/examples/specific/multifile/two/000077500000000000000000000000001256765247000213525ustar00rootroot00000000000000breathe-4.1.0/examples/specific/multifile/two/Util.h000066400000000000000000000001011256765247000224300ustar00rootroot00000000000000 namespace test { typedef int MyInt; struct TestStruct {}; } breathe-4.1.0/examples/specific/name.cfg000066400000000000000000000004741256765247000201550ustar00rootroot00000000000000# For a case where Breathe was failing on the doxygen output PROJECT_NAME = "Name Test" OUTPUT_DIRECTORY = name GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = name.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/name.h000066400000000000000000000004701256765247000176410ustar00rootroot00000000000000 /*! \brief A failing class * \class Failing */ class Failing { public: /** * @name Some section . * THIS IS CAUSING THE ERROR, must have an empty star line above * * @{ */ int getSomething() const; ///< some docs bool isSomething() const; ///< some more docs //@} }; breathe-4.1.0/examples/specific/namespacefile.cfg000066400000000000000000000004301256765247000220210ustar00rootroot00000000000000PROJECT_NAME = "Namespace in file" OUTPUT_DIRECTORY = namespacefile GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = namespacefile.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/namespacefile.h000066400000000000000000000026571256765247000215260ustar00rootroot00000000000000 namespace foo { /** This appears in the documentation */ class Bar { public: //! \brief namespaced class function virtual void publicFunction() const = 0; virtual void undocumentedPublicFunction() const = 0; //! A protected class class PublicClass {}; class UndocumentedPublicClass {}; protected: //! A protected function void protectedFunction() {}; void undocumentedProtectedFunction() {}; //! A protected class class ProtectedClass {}; class UndocumentedProtectedClass {}; private: //! This is a private function void privateFunction() const = 0; void undocumentedPrivateFunction() const = 0; //! A private class class PrivateClass {}; class UndocumentedPrivateClass {}; }; /** This also appears */ int baz(); /** More examples in a nested namespace */ namespace ns { typedef int MyInt; enum Letters { A, /**< A documented enumeration constant */ B, C }; /** Documentation here */ struct FooStruct {}; class FooClass { class InnerFoo {}; }; } } /** This is outside the namespace */ class OuterBar { /** This appears as a sub class */ class InnerBar {}; }; /** Function outside of the namespace */ void outerFunction() {}; breathe-4.1.0/examples/specific/nutshell.cfg000066400000000000000000000004321256765247000210650ustar00rootroot00000000000000PROJECT_NAME = "Breathe in a nutshell example" OUTPUT_DIRECTORY = nutshell GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = nutshell.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/nutshell.h000066400000000000000000000015031256765247000205550ustar00rootroot00000000000000/** \file nutshell.h An overly extended example of how to use breathe */ /*! With a little bit of a elaboration, should you feel it necessary. */ class Nutshell { public: //! Our tool set /*! The various tools we can opt to use to crack this particular nut */ enum Tool { kHammer = 0, //!< What? It does the job kNutCrackers, //!< Boring kNinjaThrowingStars //!< Stealthy }; //! Nutshell constructor Nutshell(); //! Nutshell destructor ~Nutshell(); /*! Crack that shell with specified tool \param tool - the tool with which to crack the nut */ void crack( Tool tool ); /*! \return Whether or not the nut is cracked */ bool isCracked(); private: //! Our cracked state bool m_isCracked; }; breathe-4.1.0/examples/specific/parameters.cfg000066400000000000000000000005161256765247000213750ustar00rootroot00000000000000# For a case where Breathe was failing on the doxygen output PROJECT_NAME = "Parameters Test" OUTPUT_DIRECTORY = parameters GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = parameters.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/parameters.h000066400000000000000000000001631256765247000210630ustar00rootroot00000000000000 /*! My function */ int f(int a, float b, int* c, int (*p)[3]); class MyClass {}; int g(MyClass a, MyClass* b); breathe-4.1.0/examples/specific/programlisting.cfg000066400000000000000000000006541256765247000222760ustar00rootroot00000000000000PROJECT_NAME = "Program Listing Test" OUTPUT_DIRECTORY = programlisting GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = programlisting.h EXAMPLE_PATH = . QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES EXTRACT_ALL = YES ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES PREDEFINED = LEAP_EXPORT="" breathe-4.1.0/examples/specific/programlisting.h000066400000000000000000000005131256765247000217600ustar00rootroot00000000000000 /*! Vector class */ class Vector {}; /*! * The center of the InteractionBox in device coordinates (millimeters). This point * is equidistant from all sides of the box. * * \include programlistinginclude.txt * * @returns The InteractionBox center in device coordinates. * @since 1.0 */ LEAP_EXPORT Vector center() const; breathe-4.1.0/examples/specific/programlistinginclude.txt000066400000000000000000000001561256765247000237170ustar00rootroot00000000000000Vector boxCenter = interactionBox.center(); Vector max = interactionBox.max(); Vector diff = max - boxCenter; breathe-4.1.0/examples/specific/qtslots.cfg000066400000000000000000000004031256765247000207360ustar00rootroot00000000000000PROJECT_NAME = "Qt Slots" OUTPUT_DIRECTORY = qtslots GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = qtslots.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/qtslots.h000066400000000000000000000006541256765247000204360ustar00rootroot00000000000000#ifndef QT_OBJECT_H #define QT_OBJECT_H #include class QtSlotExample: public QObject { Q_OBJECT public: /*! *\param iShownParameter This is shown in declaration */ void workingFunction( int iShownParameter ) { Q_UNUSED( iShownParameter ; ) } public slots: /*! *\param iShown This is in function declaration */ void workingSlot( int iShown ) { iShown; } }; #endif breathe-4.1.0/examples/specific/rst.cfg000066400000000000000000000005011256765247000200340ustar00rootroot00000000000000PROJECT_NAME = "Rst Test" OUTPUT_DIRECTORY = rst GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = rst.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES ALIASES = "rst=\verbatim embed:rst" ALIASES += "endrst=\endverbatim" breathe-4.1.0/examples/specific/rst.h000066400000000000000000000032271256765247000175340ustar00rootroot00000000000000 //! \brief first class inside of namespace class TestClass { public: /*! Inserting additional reStructuredText information. \rst This is some funky non-XML compliant text: <& !>< .. note:: This reStructuredText has been handled correctly. \endrst This is just a standard verbatim block with code: \verbatim child = 0; while( child = parent->IterateChildren( child ) ) \endverbatim */ virtual void function() const = 0; /*! Inserting additional reStructuredText information. \verbatim embed:rst .. note:: This reStructuredText has been handled correctly. \endverbatim */ virtual void rawVerbatim() const = 0; /*! * Inserting additional reStructuredText information. * * \verbatim embed:rst:leading-asterisk * Some example code:: * * int example(int x) { * return x * 2; * } * \endverbatim */ virtual void rawLeadingAsteriskVerbatim() const = 0; ////////////////////////////////////////////////////////////// /// Some kind of method /// /// @param something a parameter /// @returns the same value provided in something param /// /// @verbatim embed:rst:leading-slashes /// .. code-block:: c /// :linenos: /// /// bool foo(bool something) { /// return something; /// }; /// /// @endverbatim ////////////////////////////////////////////////////////////// virtual void rawLeadingSlashesVerbatim(int something) const = 0; //! Brief description virtual void testFunction() const {}; }; breathe-4.1.0/examples/specific/struct.cfg000066400000000000000000000004071256765247000205550ustar00rootroot00000000000000PROJECT_NAME = "Struct Command" OUTPUT_DIRECTORY = struct GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = struct.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/struct.h000066400000000000000000000026021256765247000202440ustar00rootroot00000000000000 namespace testnamespace { //! \brief first struct inside of namespace struct NamespacedStructTest { //! \brief namespaced struct function virtual void function() const = 0; static void functionS(); explicit NamespacedStructTest() {}; //! \brief namespaced struct other function void anotherFunction() {}; }; //! \brief second struct inside of namespace struct StructTest { //! \brief second namespaced struct function void function() {}; //! \brief second namespaced struct other function void anotherFunction() {}; //! A public class class PublicClass {}; class UndocumentedPublicClass {}; }; }; //! \brief struct outside of namespace struct StructTest { //! \brief namespaced class function virtual void publicFunction() const = 0; virtual void undocumentedPublicFunction() const = 0; //! A public class class PublicClass {}; class UndocumentedPublicClass {}; protected: //! A protected function void protectedFunction() {}; void undocumentedProtectedFunction() {}; //! A protected class class ProtectedClass {}; class UndocumentedProtectedClass {}; private: //! This is a private function void privateFunction() const = 0; void undocumentedPrivateFunction() const = 0; //! A private class class PrivateClass {}; class UndocumentedPrivateClass {}; }; breathe-4.1.0/examples/specific/template_class.cfg000066400000000000000000000003631256765247000222320ustar00rootroot00000000000000PROJECT_NAME = "Template Class" OUTPUT_DIRECTORY = template_class GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = template_class.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/template_class.h000066400000000000000000000011251256765247000217170ustar00rootroot00000000000000/** * @brief a class with a template parameter * * @tparam T this is the template parameter */ template class templateclass { public: /// default constructor templateclass() {} /** * @brief constructor with template argument * * @param m the argument */ templateclass(T const & m) : member(m) {} /** * @brief member accepting template argument and returning template argument * * @param t argument of type T * @return returns value of type T */ T method(T const & t); private: /// a member with templated type T member; }; breathe-4.1.0/examples/specific/template_class_non_type.cfg000066400000000000000000000004161256765247000241440ustar00rootroot00000000000000PROJECT_NAME = "Template Class Non Type" OUTPUT_DIRECTORY = template_class_non_type GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = template_class_non_type.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/template_class_non_type.h000066400000000000000000000016131256765247000236340ustar00rootroot00000000000000/** * @brief a class with three template parameters * * @tparam T this is the first template parameter * @tparam U this is the second template parameter * @tparam N this is the third template parameter, it is a non-type parameter */ template class anothertemplateclass { public: /// default constructor anothertemplateclass() {} /** * @brief constructor with two template argument * * @param m1 first argument * @param m2 second argument */ anothertemplateclass(T const & m1, U const & m2) : member1(m1), member2(m2) {} /** * @brief member accepting template argument and returning template argument * * @param t argument * @return returns value of type U */ U method(T const & t); private: /// a member with templated type T member1; /// another member with templated type U member2; }; breathe-4.1.0/examples/specific/template_function.cfg000066400000000000000000000003741256765247000227540ustar00rootroot00000000000000PROJECT_NAME = "Template Function" OUTPUT_DIRECTORY = template_function GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = template_function.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/template_function.h000066400000000000000000000012311256765247000224350ustar00rootroot00000000000000/** * @brief a function with one template arguments * * @tparam T this is the template parameter * * @param arg1 argument of type T * * @return return value of type T */ template T function1(T arg1) {} /** * @brief a function with three template arguments * * @tparam T this is the first template parameter * @tparam U this is the second template parameter * @tparam N this is the third template parameter, it is a non-type parameter * * @param arg1 first argument of type T * @param arg2 second argument of type U * * @return return value of type T */ template T function2(T arg1, U arg2) {} breathe-4.1.0/examples/specific/template_specialisation.cfg000066400000000000000000000004621256765247000241340ustar00rootroot00000000000000PROJECT_NAME = "Template Specialisation" OUTPUT_DIRECTORY = template_specialisation GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = template_specialisation.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/template_specialisation.h000066400000000000000000000003111256765247000236150ustar00rootroot00000000000000 /*! A generic template class. */ template class TemplateClass { }; /*! A partial specialization of TemplateClass for pointer types. */ template class TemplateClass { }; breathe-4.1.0/examples/specific/typedef.cfg000066400000000000000000000004241256765247000206700ustar00rootroot00000000000000PROJECT_NAME = "Function Type Def Command" OUTPUT_DIRECTORY = typedef GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = typedef.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/typedef.h000066400000000000000000000006451256765247000203650ustar00rootroot00000000000000 class TypeDefTest { }; /* A dummy typedef */ typedef TypeDefTest (*TypeDefTestFuncPtr)(void); typedef void* (*voidFuncPtr)(float, int); typedef void* voidPointer; typedef float* floatPointer; typedef float floatingPointNumber; typedef int TestTypedef; namespace testnamespace { typedef char *AnotherTypedef; } class TestClass { public: /** A typedef defined in a class. */ typedef void *MemberTypedef; }; breathe-4.1.0/examples/specific/union.cfg000066400000000000000000000003741256765247000203640ustar00rootroot00000000000000PROJECT_NAME = "Union" OUTPUT_DIRECTORY = union GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = union.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/specific/union.h000066400000000000000000000011611256765247000200470ustar00rootroot00000000000000 /// A union of two values union SeparateUnion { int size; ///< The size of the thing float depth; ///< How deep it is }; namespace foo { /// A union of two values union MyUnion { int someInt; ///< The int of it all float someFloat; ///< The float side of things }; } /// A class with a union class ClassWithUnion { /// A union with two values union UnionInClass { int intvalue; ///< An int value float floatvalue; ///< A float value }; /// Documented class class ExtraClass { int a_member; float another_member; } }; breathe-4.1.0/examples/specific/userdefined.cfg000066400000000000000000000004631256765247000215300ustar00rootroot00000000000000PROJECT_NAME = "User Defined Example" OUTPUT_DIRECTORY = userdefined GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = userdefined.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES DISTRIBUTE_GROUP_DOC = YES breathe-4.1.0/examples/specific/userdefined.h000066400000000000000000000012521256765247000212150ustar00rootroot00000000000000// Example from Doxygen documentation /** A class. More details about the Test class */ class Test { public: //@{ /** Same documentation for both members. Details */ void func1InGroup1(); void func2InGroup1(); //@} /** Function without group. Details. */ void ungroupedFunction(); void func1InCustomGroup(); protected: void func2InCustomGroup(); }; void Test::func1InGroup1() {} void Test::func2InGroup1() {} /** @name Custom Group * Description of custom group */ //@{ /** Function 2 in custom group. Details. */ void Test::func2InCustomGroup() {} /** Function 1 in custom group. Details. */ void Test::func1InCustomGroup() {} //@} breathe-4.1.0/examples/tinyxml/000077500000000000000000000000001256765247000164665ustar00rootroot00000000000000breathe-4.1.0/examples/tinyxml/.gitignore000066400000000000000000000000111256765247000204460ustar00rootroot00000000000000tinyxml/ breathe-4.1.0/examples/tinyxml/Makefile000066400000000000000000000010471256765247000201300ustar00rootroot00000000000000# # This file was generated from Makefile.in on Sat Dec 13 12:17:28 GMT 2008 # DOXYGEN ?= `which doxygen` TMAKEPATH = ENV = env TMAKEPATH=$(TMAKEPATH) TMAKE = MAKE = /usr/bin/make PERL = /usr/bin/perl RM = rm -f CP = cp VERSION = 1.5.7.1 INSTALL = /tmp INSTTOOL = /usr/bin/install DOXYDOCS = .. DOCDIR = $(INSTALL)/share/doc/packages/doxygen QTDIR = HAVE_DOT = /usr/bin/dot all: tinyxml/xml/index.xml clean: rm -rf tinyxml tinyxml/xml/index.xml: tinyxml.h tinyxml.cfg $(DOXYGEN) tinyxml.cfg breathe-4.1.0/examples/tinyxml/tinyxml.cfg000066400000000000000000000004121256765247000206500ustar00rootroot00000000000000PROJECT_NAME = "TinyXML classes" OUTPUT_DIRECTORY = tinyxml GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO INPUT = tinyxml.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO GENERATE_XML = YES breathe-4.1.0/examples/tinyxml/tinyxml.h000066400000000000000000001743031256765247000203530ustar00rootroot00000000000000/* www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #ifndef TINYXML_INCLUDED #define TINYXML_INCLUDED // DNEG: jons - Defined for the library build #define TIXML_USE_STL #ifdef _MSC_VER #pragma warning( push ) #pragma warning( disable : 4530 ) #pragma warning( disable : 4786 ) #endif #include #include #include #include #include // Help out windows: #if defined( _DEBUG ) && !defined( DEBUG ) #define DEBUG #endif #ifdef TIXML_USE_STL #include #include #include #define TIXML_STRING std::string #else #include "tinystr.h" #define TIXML_STRING TiXmlString #endif // Deprecated library function hell. Compilers want to use the // new safe versions. This probably doesn't fully address the problem, // but it gets closer. There are too many compilers for me to fully // test. If you get compilation troubles, undefine TIXML_SAFE #define TIXML_SAFE #ifdef TIXML_SAFE #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) // Microsoft visual studio, version 2005 and higher. #define TIXML_SNPRINTF _snprintf_s #define TIXML_SNSCANF _snscanf_s #elif defined(_MSC_VER) && (_MSC_VER >= 1200 ) // Microsoft visual studio, version 6 and higher. //#pragma message( "Using _sn* functions." ) #define TIXML_SNPRINTF _snprintf #define TIXML_SNSCANF _snscanf #elif defined(__GNUC__) && (__GNUC__ >= 3 ) // GCC version 3 and higher.s //#warning( "Using sn* functions." ) #define TIXML_SNPRINTF snprintf #define TIXML_SNSCANF snscanf #endif #endif class TiXmlDocument; class TiXmlElement; class TiXmlComment; class TiXmlUnknown; class TiXmlAttribute; class TiXmlText; class TiXmlDeclaration; class TiXmlParsingData; const int TIXML_MAJOR_VERSION = 2; const int TIXML_MINOR_VERSION = 5; const int TIXML_PATCH_VERSION = 2; /* Internal structure for tracking location of items in the XML file. */ struct TiXmlCursor { TiXmlCursor() { Clear(); } void Clear() { row = col = -1; } int row; // 0 based. int col; // 0 based. }; /** If you call the Accept() method, it requires being passed a TiXmlVisitor class to handle callbacks. For nodes that contain other nodes (Document, Element) you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves are simple called with Visit(). If you return 'true' from a Visit method, recursive parsing will continue. If you return false, no children of this node or its sibilings will be Visited. All flavors of Visit methods have a default implementation that returns 'true' (continue visiting). You need to only override methods that are interesting to you. Generally Accept() is called on the TiXmlDocument, although all nodes support Visiting. You should never change the document from a callback. @sa TiXmlNode::Accept() */ class TiXmlVisitor { public: virtual ~TiXmlVisitor() {} /// Visit a document. virtual bool VisitEnter( const TiXmlDocument& ) { return true; } /// Visit a document. virtual bool VisitExit( const TiXmlDocument& ) { return true; } /// Visit an element. virtual bool VisitEnter( const TiXmlElement& , const TiXmlAttribute* ) { return true; } /// Visit an element. virtual bool VisitExit( const TiXmlElement& ) { return true; } /// Visit a declaration virtual bool Visit( const TiXmlDeclaration& ) { return true; } /// Visit a text node virtual bool Visit( const TiXmlText& ) { return true; } /// Visit a comment node virtual bool Visit( const TiXmlComment& ) { return true; } /// Visit an unknown node virtual bool Visit( const TiXmlUnknown& ) { return true; } }; // Only used by Attribute::Query functions enum { TIXML_SUCCESS, TIXML_NO_ATTRIBUTE, TIXML_WRONG_TYPE }; // Used by the parsing routines. enum TiXmlEncoding { TIXML_ENCODING_UNKNOWN, TIXML_ENCODING_UTF8, TIXML_ENCODING_LEGACY }; const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN; /** TiXmlBase is a base class for every class in TinyXml. It does little except to establish that TinyXml classes can be printed and provide some utility functions. In XML, the document and elements can contain other elements and other types of nodes. @verbatim A Document can contain: Element (container or leaf) Comment (leaf) Unknown (leaf) Declaration( leaf ) An Element can contain: Element (container or leaf) Text (leaf) Attributes (not on tree) Comment (leaf) Unknown (leaf) A Decleration contains: Attributes (not on tree) @endverbatim */ class TiXmlBase { friend class TiXmlNode; friend class TiXmlElement; friend class TiXmlDocument; public: TiXmlBase() : userData(0) {} virtual ~TiXmlBase() {} /** All TinyXml classes can print themselves to a file stream or the string class (TiXmlString in non-STL mode, std::string in STL mode.) Either or both cfile and str can be null. This is a formatted print, and will insert tabs and newlines. (For an unformatted stream, use the << operator.) */ virtual void Print( FILE* cfile, int depth ) const = 0; /** The world does not agree on whether white space should be kept or not. In order to make everyone happy, these global, static functions are provided to set whether or not TinyXml will condense all white space into a single space or not. The default is to condense. Note changing this value is not thread safe. */ static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; } /// Return the current white space setting. static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; } /** Return the position, in the original source file, of this node or attribute. The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value. Generally, the row and column value will be set when the TiXmlDocument::Load(), TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator>>. The values reflect the initial load. Once the DOM is modified programmatically (by adding or changing nodes and attributes) the new values will NOT update to reflect changes in the document. There is a minor performance cost to computing the row and column. Computation can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value. @sa TiXmlDocument::SetTabSize() */ int Row() const { return location.row + 1; } int Column() const { return location.col + 1; } ///< See Row() void SetUserData( void* user ) { userData = user; } ///< Set a pointer to arbitrary user data. void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. // Table that returs, for a given lead byte, the total number of bytes // in the UTF-8 sequence. static const int utf8ByteTable[256]; virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0; enum { TIXML_NO_ERROR = 0, TIXML_ERROR, TIXML_ERROR_OPENING_FILE, TIXML_ERROR_OUT_OF_MEMORY, TIXML_ERROR_PARSING_ELEMENT, TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, TIXML_ERROR_READING_ELEMENT_VALUE, TIXML_ERROR_READING_ATTRIBUTES, TIXML_ERROR_PARSING_EMPTY, TIXML_ERROR_READING_END_TAG, TIXML_ERROR_PARSING_UNKNOWN, TIXML_ERROR_PARSING_COMMENT, TIXML_ERROR_PARSING_DECLARATION, TIXML_ERROR_DOCUMENT_EMPTY, TIXML_ERROR_EMBEDDED_NULL, TIXML_ERROR_PARSING_CDATA, TIXML_ERROR_DOCUMENT_TOP_ONLY, TIXML_ERROR_STRING_COUNT }; protected: static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding ); inline static bool IsWhiteSpace( char c ) { return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' ); } inline static bool IsWhiteSpace( int c ) { if ( c < 256 ) return IsWhiteSpace( (char) c ); return false; // Again, only truly correct for English/Latin...but usually works. } #ifdef TIXML_USE_STL static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ); static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag ); #endif /* Reads an XML name into the string provided. Returns a pointer just past the last character of the name, or 0 if the function has an error. */ static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding ); /* Reads text. Returns a pointer past the given end tag. Wickedly complex options, but it keeps the (sensitive) code in one place. */ static const char* ReadText( const char* in, // where to start TIXML_STRING* text, // the string read bool ignoreWhiteSpace, // whether to keep the white space const char* endTag, // what ends this text bool ignoreCase, // whether to ignore case in the end tag TiXmlEncoding encoding ); // the current encoding // If an entity has been found, transform it into a character. static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding ); // Get a character, while interpreting entities. // The length can be from 0 to 4 bytes. inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding ) { assert( p ); if ( encoding == TIXML_ENCODING_UTF8 ) { *length = utf8ByteTable[ *((const unsigned char*)p) ]; assert( *length >= 0 && *length < 5 ); } else { *length = 1; } if ( *length == 1 ) { if ( *p == '&' ) return GetEntity( p, _value, length, encoding ); *_value = *p; return p+1; } else if ( *length ) { //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe), // and the null terminator isn't needed for( int i=0; p[i] && i<*length; ++i ) { _value[i] = p[i]; } return p + (*length); } else { // Not valid text. return 0; } } // Puts a string to a stream, expanding entities as it goes. // Note this should not contian the '<', '>', etc, or they will be transformed into entities! static void PutString( const TIXML_STRING& str, TIXML_STRING* out ); // Return true if the next characters in the stream are any of the endTag sequences. // Ignore case only works for English, and should only be relied on when comparing // to English words: StringEqual( p, "version", true ) is fine. static bool StringEqual( const char* p, const char* endTag, bool ignoreCase, TiXmlEncoding encoding ); static const char* errorString[ TIXML_ERROR_STRING_COUNT ]; TiXmlCursor location; /// Field containing a generic user pointer void* userData; // None of these methods are reliable for any language except English. // Good for approximation, not great for accuracy. static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding ); static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding ); inline static int ToLower( int v, TiXmlEncoding encoding ) { if ( encoding == TIXML_ENCODING_UTF8 ) { if ( v < 128 ) return tolower( v ); return v; } else { return tolower( v ); } } static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ); private: TiXmlBase( const TiXmlBase& ); // not implemented. void operator=( const TiXmlBase& base ); // not allowed. struct Entity { const char* str; unsigned int strLength; char chr; }; enum { NUM_ENTITY = 5, MAX_ENTITY_LENGTH = 6 }; static Entity entity[ NUM_ENTITY ]; static bool condenseWhiteSpace; }; /** The parent class for everything in the Document Object Model. (Except for attributes). Nodes have siblings, a parent, and children. A node can be in a document, or stand on its own. The type of a TiXmlNode can be queried, and it can be cast to its more defined type. */ class TiXmlNode : public TiXmlBase { friend class TiXmlDocument; friend class TiXmlElement; public: #ifdef TIXML_USE_STL /** An input stream operator, for every class. Tolerant of newlines and formatting, but doesn't expect them. */ friend std::istream& operator >> (std::istream& in, TiXmlNode& base); /** An output stream operator, for every class. Note that this outputs without any newlines or formatting, as opposed to Print(), which includes tabs and new lines. The operator<< and operator>> are not completely symmetric. Writing a node to a stream is very well defined. You'll get a nice stream of output, without any extra whitespace or newlines. But reading is not as well defined. (As it always is.) If you create a TiXmlElement (for example) and read that from an input stream, the text needs to define an element or junk will result. This is true of all input streams, but it's worth keeping in mind. A TiXmlDocument will read nodes until it reads a root element, and all the children of that root element. */ friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base); /// Appends the XML node or attribute to a std::string. friend std::string& operator<< (std::string& out, const TiXmlNode& base ); #endif /** The types of XML nodes supported by TinyXml. (All the unsupported types are picked up by UNKNOWN.) */ enum NodeType { DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, DECLARATION, TYPECOUNT }; virtual ~TiXmlNode(); /** The meaning of 'value' changes for the specific type of TiXmlNode. @verbatim Document: filename of the xml file Element: name of the element Comment: the comment text Unknown: the tag contents Text: the text string @endverbatim The subclasses will wrap this function. */ const char *Value() const { return value.c_str (); } #ifdef TIXML_USE_STL /** Return Value() as a std::string. If you only use STL, this is more efficient than calling Value(). Only available in STL mode. */ const std::string& ValueStr() const { return value; } #endif /** Changes the value of the node. Defined as: @verbatim Document: filename of the xml file Element: name of the element Comment: the comment text Unknown: the tag contents Text: the text string @endverbatim */ void SetValue(const char * _value) { value = _value;} #ifdef TIXML_USE_STL /// STL std::string form. void SetValue( const std::string& _value ) { value = _value; } #endif /// Delete all the children of this node. Does not affect 'this'. void Clear(); /// One step up the DOM. TiXmlNode* Parent() { return parent; } const TiXmlNode* Parent() const { return parent; } const TiXmlNode* FirstChild() const { return firstChild; } ///< The first child of this node. Will be null if there are no children. TiXmlNode* FirstChild() { return firstChild; } const TiXmlNode* FirstChild( const char * value ) const; ///< The first child of this node with the matching 'value'. Will be null if none found. /// The first child of this node with the matching 'value'. Will be null if none found. TiXmlNode* FirstChild( const char * _value ) { // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe) // call the method, cast the return back to non-const. return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value )); } const TiXmlNode* LastChild() const { return lastChild; } /// The last child of this node. Will be null if there are no children. TiXmlNode* LastChild() { return lastChild; } const TiXmlNode* LastChild( const char * value ) const; /// The last child of this node matching 'value'. Will be null if there are no children. TiXmlNode* LastChild( const char * _value ) { return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value )); } #ifdef TIXML_USE_STL const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::string form. TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); } ///< STL std::string form. const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::string form. TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); } ///< STL std::string form. #endif /** An alternate way to walk the children of a node. One way to iterate over nodes is: @verbatim for( child = parent->FirstChild(); child; child = child->NextSibling() ) @endverbatim IterateChildren does the same thing with the syntax: @verbatim child = 0; while( child = parent->IterateChildren( child ) ) @endverbatim IterateChildren takes the previous child as input and finds the next one. If the previous child is null, it returns the first. IterateChildren will return null when done. */ const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const; TiXmlNode* IterateChildren( const TiXmlNode* previous ) { return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) ); } /// This flavor of IterateChildren searches for children with a particular 'value' const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const; TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) { return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) ); } #ifdef TIXML_USE_STL const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. #endif /** Add a new node related to this. Adds a child past the LastChild. Returns a pointer to the new object or NULL if an error occurred. */ TiXmlNode* InsertEndChild( const TiXmlNode& addThis ); /** Add a new node related to this. Adds a child past the LastChild. NOTE: the node to be added is passed by pointer, and will be henceforth owned (and deleted) by tinyXml. This method is efficient and avoids an extra copy, but should be used with care as it uses a different memory model than the other insert functions. @sa InsertEndChild */ TiXmlNode* LinkEndChild( TiXmlNode* addThis ); /** Add a new node related to this. Adds a child before the specified child. Returns a pointer to the new object or NULL if an error occurred. */ TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ); /** Add a new node related to this. Adds a child after the specified child. Returns a pointer to the new object or NULL if an error occurred. */ TiXmlNode* InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ); /** Replace a child of this node. Returns a pointer to the new object or NULL if an error occurred. */ TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ); /// Delete a child of this node. bool RemoveChild( TiXmlNode* removeThis ); /// Navigate to a sibling node. const TiXmlNode* PreviousSibling() const { return prev; } TiXmlNode* PreviousSibling() { return prev; } /// Navigate to a sibling node. const TiXmlNode* PreviousSibling( const char * ) const; TiXmlNode* PreviousSibling( const char *_prev ) { return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) ); } #ifdef TIXML_USE_STL const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::string form. TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); } ///< STL std::string form. #endif /// Navigate to a sibling node. const TiXmlNode* NextSibling() const { return next; } TiXmlNode* NextSibling() { return next; } /// Navigate to a sibling node with the given 'value'. const TiXmlNode* NextSibling( const char * ) const; TiXmlNode* NextSibling( const char* _next ) { return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) ); } /** Convenience function to get through elements. Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. */ const TiXmlElement* NextSiblingElement() const; TiXmlElement* NextSiblingElement() { return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() ); } /** Convenience function to get through elements. Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. */ const TiXmlElement* NextSiblingElement( const char * ) const; TiXmlElement* NextSiblingElement( const char *_next ) { return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) ); } #ifdef TIXML_USE_STL const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. #endif /// Convenience function to get through elements. const TiXmlElement* FirstChildElement() const; TiXmlElement* FirstChildElement() { return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() ); } /// Convenience function to get through elements. const TiXmlElement* FirstChildElement( const char * _value ) const; TiXmlElement* FirstChildElement( const char * _value ) { return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) ); } #ifdef TIXML_USE_STL const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. #endif /** Query the type (as an enumerated value, above) of this node. The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION. */ int Type() const { return type; } /** Return a pointer to the Document this node lives in. Returns null if not in a document. */ const TiXmlDocument* GetDocument() const; TiXmlDocument* GetDocument() { return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() ); } /// Returns true if this node has no children. bool NoChildren() const { return !firstChild; } virtual const TiXmlDocument* ToDocument() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlElement* ToElement() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlComment* ToComment() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlUnknown* ToUnknown() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlText* ToText() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlDocument* ToDocument() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlElement* ToElement() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlComment* ToComment() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlUnknown* ToUnknown() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlText* ToText() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. virtual TiXmlDeclaration* ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. /** Create an exact duplicate of this node and return it. The memory must be deleted by the caller. */ virtual TiXmlNode* Clone() const = 0; /** Accept a hierarchical visit the nodes in the TinyXML DOM. Every node in the XML tree will be conditionally visited and the host will be called back via the TiXmlVisitor interface. This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse the XML for the callbacks, so the performance of TinyXML is unchanged by using this interface versus any other.) The interface has been based on ideas from: - http://www.saxproject.org/ - http://c2.com/cgi/wiki?HierarchicalVisitorPattern Which are both good references for "visiting". An example of using Accept(): @verbatim TiXmlPrinter printer; tinyxmlDoc.Accept( &printer ); const char* xmlcstr = printer.CStr(); @endverbatim */ virtual bool Accept( TiXmlVisitor* visitor ) const = 0; protected: TiXmlNode( NodeType _type ); // Copy to the allocated object. Shared functionality between Clone, Copy constructor, // and the assignment operator. void CopyTo( TiXmlNode* target ) const; #ifdef TIXML_USE_STL // The real work of the input operator. virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0; #endif // Figure out what is at *p, and parse it. Returns null if it is not an xml node. TiXmlNode* Identify( const char* start, TiXmlEncoding encoding ); TiXmlNode* parent; NodeType type; TiXmlNode* firstChild; TiXmlNode* lastChild; TIXML_STRING value; TiXmlNode* prev; TiXmlNode* next; private: TiXmlNode( const TiXmlNode& ); // not implemented. void operator=( const TiXmlNode& base ); // not allowed. }; /** An attribute is a name-value pair. Elements have an arbitrary number of attributes, each with a unique name. @note The attributes are not TiXmlNodes, since they are not part of the tinyXML document object model. There are other suggested ways to look at this problem. */ class TiXmlAttribute : public TiXmlBase { friend class TiXmlAttributeSet; public: /// Construct an empty attribute. TiXmlAttribute() : TiXmlBase() { document = 0; prev = next = 0; } #ifdef TIXML_USE_STL /// std::string constructor. TiXmlAttribute( const std::string& _name, const std::string& _value ) { name = _name; value = _value; document = 0; prev = next = 0; } #endif /// Construct an attribute with a name and value. TiXmlAttribute( const char * _name, const char * _value ) { name = _name; value = _value; document = 0; prev = next = 0; } const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. #ifdef TIXML_USE_STL const std::string& ValueStr() const { return value; } ///< Return the value of this attribute. #endif int IntValue() const; ///< Return the value of this attribute, converted to an integer. double DoubleValue() const; ///< Return the value of this attribute, converted to a double. // Get the tinyxml string representation const TIXML_STRING& NameTStr() const { return name; } /** QueryIntValue examines the value string. It is an alternative to the IntValue() method with richer error checking. If the value is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE. A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other TinyXml calls. */ int QueryIntValue( int* _value ) const; /// QueryDoubleValue examines the value string. See QueryIntValue(). int QueryDoubleValue( double* _value ) const; void SetName( const char* _name ) { name = _name; } ///< Set the name of this attribute. void SetValue( const char* _value ) { value = _value; } ///< Set the value. void SetIntValue( int _value ); ///< Set the value from an integer. void SetDoubleValue( double _value ); ///< Set the value from a double. #ifdef TIXML_USE_STL /// STL std::string form. void SetName( const std::string& _name ) { name = _name; } /// STL std::string form. void SetValue( const std::string& _value ) { value = _value; } #endif /// Get the next sibling attribute in the DOM. Returns null at end. const TiXmlAttribute* Next() const; TiXmlAttribute* Next() { return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() ); } /// Get the previous sibling attribute in the DOM. Returns null at beginning. const TiXmlAttribute* Previous() const; TiXmlAttribute* Previous() { return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() ); } bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; } bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; } bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; } /* Attribute parsing starts: first letter of the name returns: the next char after the value end quote */ virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); // Prints this Attribute to a FILE stream. virtual void Print( FILE* cfile, int depth ) const { Print( cfile, depth, 0 ); } void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; // [internal use] // Set the document pointer so the attribute can report errors. void SetDocument( TiXmlDocument* doc ) { document = doc; } private: TiXmlAttribute( const TiXmlAttribute& ); // not implemented. void operator=( const TiXmlAttribute& base ); // not allowed. TiXmlDocument* document; // A pointer back to a document, for error reporting. TIXML_STRING name; TIXML_STRING value; TiXmlAttribute* prev; TiXmlAttribute* next; }; /* A class used to manage a group of attributes. It is only used internally, both by the ELEMENT and the DECLARATION. The set can be changed transparent to the Element and Declaration classes that use it, but NOT transparent to the Attribute which has to implement a next() and previous() method. Which makes it a bit problematic and prevents the use of STL. This version is implemented with circular lists because: - I like circular lists - it demonstrates some independence from the (typical) doubly linked list. */ class TiXmlAttributeSet { public: TiXmlAttributeSet(); ~TiXmlAttributeSet(); void Add( TiXmlAttribute* attribute ); void Remove( TiXmlAttribute* attribute ); const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } const TiXmlAttribute* Find( const char* _name ) const; TiXmlAttribute* Find( const char* _name ) { return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) ); } #ifdef TIXML_USE_STL const TiXmlAttribute* Find( const std::string& _name ) const; TiXmlAttribute* Find( const std::string& _name ) { return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) ); } #endif private: //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), //*ME: this class must be also use a hidden/disabled copy-constructor !!! TiXmlAttributeSet( const TiXmlAttributeSet& ); // not allowed void operator=( const TiXmlAttributeSet& ); // not allowed (as TiXmlAttribute) TiXmlAttribute sentinel; }; /** The element is a container class. It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes. */ class TiXmlElement : public TiXmlNode { public: /// Construct an element. TiXmlElement (const char * in_value); #ifdef TIXML_USE_STL /// std::string constructor. TiXmlElement( const std::string& _value ); #endif TiXmlElement( const TiXmlElement& ); void operator=( const TiXmlElement& base ); virtual ~TiXmlElement(); /** Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. */ const char* Attribute( const char* name ) const; /** Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. If the attribute exists and can be converted to an integer, the integer value will be put in the return 'i', if 'i' is non-null. */ const char* Attribute( const char* name, int* i ) const; /** Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. If the attribute exists and can be converted to an double, the double value will be put in the return 'd', if 'd' is non-null. */ const char* Attribute( const char* name, double* d ) const; /** QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer error checking. If the attribute is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE. If the attribute does not exist, then TIXML_NO_ATTRIBUTE is returned. */ int QueryIntAttribute( const char* name, int* _value ) const; /// QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). int QueryDoubleAttribute( const char* name, double* _value ) const; /// QueryFloatAttribute examines the attribute - see QueryIntAttribute(). int QueryFloatAttribute( const char* name, float* _value ) const { double d; int result = QueryDoubleAttribute( name, &d ); if ( result == TIXML_SUCCESS ) { *_value = (float)d; } return result; } #ifdef TIXML_USE_STL /** Template form of the attribute query which will try to read the attribute into the specified type. Very easy, very powerful, but be careful to make sure to call this with the correct type. @return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE */ template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const { const TiXmlAttribute* node = attributeSet.Find( name ); if ( !node ) return TIXML_NO_ATTRIBUTE; std::stringstream sstream( node->ValueStr() ); sstream >> *outValue; if ( !sstream.fail() ) return TIXML_SUCCESS; return TIXML_WRONG_TYPE; } #endif /** Sets an attribute of name to a given value. The attribute will be created if it does not exist, or changed if it does. */ void SetAttribute( const char* name, const char * _value ); #ifdef TIXML_USE_STL const std::string* Attribute( const std::string& name ) const; const std::string* Attribute( const std::string& name, int* i ) const; const std::string* Attribute( const std::string& name, double* d ) const; int QueryIntAttribute( const std::string& name, int* _value ) const; int QueryDoubleAttribute( const std::string& name, double* _value ) const; /// STL std::string form. void SetAttribute( const std::string& name, const std::string& _value ); ///< STL std::string form. void SetAttribute( const std::string& name, int _value ); #endif /** Sets an attribute of name to a given value. The attribute will be created if it does not exist, or changed if it does. */ void SetAttribute( const char * name, int value ); /** Sets an attribute of name to a given value. The attribute will be created if it does not exist, or changed if it does. */ void SetDoubleAttribute( const char * name, double value ); /** Deletes an attribute with the given name. */ void RemoveAttribute( const char * name ); #ifdef TIXML_USE_STL void RemoveAttribute( const std::string& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::string form. #endif const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } ///< Access the first attribute in this element. TiXmlAttribute* FirstAttribute() { return attributeSet.First(); } const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); } ///< Access the last attribute in this element. TiXmlAttribute* LastAttribute() { return attributeSet.Last(); } /** Convenience function for easy access to the text inside an element. Although easy and concise, GetText() is limited compared to getting the TiXmlText child and accessing it directly. If the first child of 'this' is a TiXmlText, the GetText() returns the character string of the Text node, else null is returned. This is a convenient method for getting the text of simple contained text: @verbatim This is text const char* str = fooElement->GetText(); @endverbatim 'str' will be a pointer to "This is text". Note that this function can be misleading. If the element foo was created from this XML: @verbatim This is text @endverbatim then the value of str would be null. The first child node isn't a text node, it is another element. From this XML: @verbatim This is text @endverbatim GetText() will return "This is ". WARNING: GetText() accesses a child node - don't become confused with the similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are safe type casts on the referenced node. */ const char* GetText() const; /// Creates a new Element and returns it - the returned element is a copy. virtual TiXmlNode* Clone() const; // Print the Element to a FILE stream. virtual void Print( FILE* cfile, int depth ) const; /* Attribtue parsing starts: next char past '<' returns: next char past '>' */ virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); virtual const TiXmlElement* ToElement() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlElement* ToElement() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept( TiXmlVisitor* visitor ) const; protected: void CopyTo( TiXmlElement* target ) const; void ClearThis(); // like clear, but initializes 'this' object as well // Used to be public [internal use] #ifdef TIXML_USE_STL virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); #endif /* [internal use] Reads the "value" of the element -- another element, or text. This should terminate with the current end tag. */ const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); private: TiXmlAttributeSet attributeSet; }; /** An XML comment. */ class TiXmlComment : public TiXmlNode { public: /// Constructs an empty comment. TiXmlComment() : TiXmlNode( TiXmlNode::COMMENT ) {} /// Construct a comment from text. TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::COMMENT ) { SetValue( _value ); } TiXmlComment( const TiXmlComment& ); void operator=( const TiXmlComment& base ); virtual ~TiXmlComment() {} /// Returns a copy of this Comment. virtual TiXmlNode* Clone() const; // Write this Comment to a FILE stream. virtual void Print( FILE* cfile, int depth ) const; /* Attribtue parsing starts: at the ! of the !-- returns: next char past '>' */ virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept( TiXmlVisitor* visitor ) const; protected: void CopyTo( TiXmlComment* target ) const; // used to be public #ifdef TIXML_USE_STL virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); #endif // virtual void StreamOut( TIXML_OSTREAM * out ) const; private: }; /** XML text. A text node can have 2 ways to output the next. "normal" output and CDATA. It will default to the mode it was parsed from the XML file and you generally want to leave it alone, but you can change the output mode with SetCDATA() and query it with CDATA(). */ class TiXmlText : public TiXmlNode { friend class TiXmlElement; public: /** Constructor for text element. By default, it is treated as normal, encoded text. If you want it be output as a CDATA text element, set the parameter _cdata to 'true' */ TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TEXT) { SetValue( initValue ); cdata = false; } virtual ~TiXmlText() {} #ifdef TIXML_USE_STL /// Constructor. TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TEXT) { SetValue( initValue ); cdata = false; } #endif TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TEXT ) { copy.CopyTo( this ); } void operator=( const TiXmlText& base ) { base.CopyTo( this ); } // Write this text object to a FILE stream. virtual void Print( FILE* cfile, int depth ) const; /// Queries whether this represents text using a CDATA section. bool CDATA() const { return cdata; } /// Turns on or off a CDATA representation of text. void SetCDATA( bool _cdata ) { cdata = _cdata; } virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlText* ToText() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept( TiXmlVisitor* content ) const; protected : /// [internal use] Creates a new Element and returns it. virtual TiXmlNode* Clone() const; void CopyTo( TiXmlText* target ) const; bool Blank() const; // returns true if all white space and new lines // [internal use] #ifdef TIXML_USE_STL virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); #endif private: bool cdata; // true if this should be input and output as a CDATA style text element }; /** In correct XML the declaration is the first entry in the file. @verbatim @endverbatim TinyXml will happily read or write files without a declaration, however. There are 3 possible attributes to the declaration: version, encoding, and standalone. Note: In this version of the code, the attributes are handled as special cases, not generic attributes, simply because there can only be at most 3 and they are always the same. */ class TiXmlDeclaration : public TiXmlNode { public: /// Construct an empty declaration. TiXmlDeclaration() : TiXmlNode( TiXmlNode::DECLARATION ) {} #ifdef TIXML_USE_STL /// Constructor. TiXmlDeclaration( const std::string& _version, const std::string& _encoding, const std::string& _standalone ); #endif /// Construct. TiXmlDeclaration( const char* _version, const char* _encoding, const char* _standalone ); TiXmlDeclaration( const TiXmlDeclaration& copy ); void operator=( const TiXmlDeclaration& copy ); virtual ~TiXmlDeclaration() {} /// Version. Will return an empty string if none was found. const char *Version() const { return version.c_str (); } /// Encoding. Will return an empty string if none was found. const char *Encoding() const { return encoding.c_str (); } /// Is this a standalone document? const char *Standalone() const { return standalone.c_str (); } /// Creates a copy of this Declaration and returns it. virtual TiXmlNode* Clone() const; // Print this declaration to a FILE stream. virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; virtual void Print( FILE* cfile, int depth ) const { Print( cfile, depth, 0 ); } virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlDeclaration* ToDeclaration() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept( TiXmlVisitor* visitor ) const; protected: void CopyTo( TiXmlDeclaration* target ) const; // used to be public #ifdef TIXML_USE_STL virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); #endif private: TIXML_STRING version; TIXML_STRING encoding; TIXML_STRING standalone; }; /** Any tag that tinyXml doesn't recognize is saved as an unknown. It is a tag of text, but should not be modified. It will be written back to the XML, unchanged, when the file is saved. DTD tags get thrown into TiXmlUnknowns. */ class TiXmlUnknown : public TiXmlNode { public: TiXmlUnknown() : TiXmlNode( TiXmlNode::UNKNOWN ) {} virtual ~TiXmlUnknown() {} TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::UNKNOWN ) { copy.CopyTo( this ); } void operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); } /// Creates a copy of this Unknown and returns it. virtual TiXmlNode* Clone() const; // Print this Unknown to a FILE stream. virtual void Print( FILE* cfile, int depth ) const; virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept( TiXmlVisitor* content ) const; protected: void CopyTo( TiXmlUnknown* target ) const; #ifdef TIXML_USE_STL virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); #endif private: }; /** Always the top level node. A document binds together all the XML pieces. It can be saved, loaded, and printed to the screen. The 'value' of a document node is the xml file name. */ class TiXmlDocument : public TiXmlNode { public: /// Create an empty document, that has no name. TiXmlDocument(); /// Create a document with a name. The name of the document is also the filename of the xml. TiXmlDocument( const char * documentName ); #ifdef TIXML_USE_STL /// Constructor. TiXmlDocument( const std::string& documentName ); #endif TiXmlDocument( const TiXmlDocument& copy ); void operator=( const TiXmlDocument& copy ); virtual ~TiXmlDocument() {} /** Load a file using the current document value. Returns true if successful. Will delete any existing document data before loading. */ bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); /// Save a file using the current document value. Returns true if successful. bool SaveFile() const; /// Load a file using the given filename. Returns true if successful. bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); /// Save a file using the given filename. Returns true if successful. bool SaveFile( const char * filename ) const; /** Load a file using the given FILE*. Returns true if successful. Note that this method doesn't stream - the entire object pointed at by the FILE* will be interpreted as an XML file. TinyXML doesn't stream in XML from the current file location. Streaming may be added in the future. */ bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); /// Save a file using the given FILE*. Returns true if successful. bool SaveFile( FILE* ) const; #ifdef TIXML_USE_STL bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) ///< STL std::string version. { // StringToBuffer f( filename ); // return ( f.buffer && LoadFile( f.buffer, encoding )); return LoadFile( filename.c_str(), encoding ); } bool SaveFile( const std::string& filename ) const ///< STL std::string version. { // StringToBuffer f( filename ); // return ( f.buffer && SaveFile( f.buffer )); return SaveFile( filename.c_str() ); } #endif /** Parse the given null terminated block of xml data. Passing in an encoding to this method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml to use that encoding, regardless of what TinyXml might otherwise try to detect. */ virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); /** Get the root element -- the only top level element -- of the document. In well formed XML, there should only be one. TinyXml is tolerant of multiple elements at the document level. */ const TiXmlElement* RootElement() const { return FirstChildElement(); } TiXmlElement* RootElement() { return FirstChildElement(); } /** If an error occurs, Error will be set to true. Also, - The ErrorId() will contain the integer identifier of the error (not generally useful) - The ErrorDesc() method will return the name of the error. (very useful) - The ErrorRow() and ErrorCol() will return the location of the error (if known) */ bool Error() const { return error; } /// Contains a textual (English) description of the error if one occurs. const char * ErrorDesc() const { return errorDesc.c_str (); } /** Generally, you probably want the error string ( ErrorDesc() ). But if you prefer the ErrorId, this function will fetch it. */ int ErrorId() const { return errorId; } /** Returns the location (if known) of the error. The first column is column 1, and the first row is row 1. A value of 0 means the row and column wasn't applicable (memory errors, for example, have no row/column) or the parser lost the error. (An error in the error reporting, in that case.) @sa SetTabSize, Row, Column */ int ErrorRow() const { return errorLocation.row+1; } int ErrorCol() const { return errorLocation.col+1; } ///< The column where the error occurred. See ErrorRow() /** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) to report the correct values for row and column. It does not change the output or input in any way. By calling this method, with a tab size greater than 0, the row and column of each node and attribute is stored when the file is loaded. Very useful for tracking the DOM back in to the source file. The tab size is required for calculating the location of nodes. If not set, the default of 4 is used. The tabsize is set per document. Setting the tabsize to 0 disables row/column tracking. Note that row and column tracking is not supported when using operator>>. The tab size needs to be enabled before the parse or load. Correct usage: @verbatim TiXmlDocument doc; doc.SetTabSize( 8 ); doc.Load( "myfile.xml" ); @endverbatim @sa Row, Column */ void SetTabSize( int _tabsize ) { tabsize = _tabsize; } int TabSize() const { return tabsize; } /** If you have handled the error, it can be reset with this call. The error state is automatically cleared if you Parse a new XML block. */ void ClearError() { error = false; errorId = 0; errorDesc = ""; errorLocation.row = errorLocation.col = 0; //errorLocation.last = 0; } /** Write the document to standard out using formatted printing ("pretty print"). */ void Print() const { Print( stdout, 0 ); } /* Write the document to a string using formatted printing ("pretty print"). This will allocate a character array (new char[]) and return it as a pointer. The calling code pust call delete[] on the return char* to avoid a memory leak. */ //char* PrintToMemory() const; /// Print this Document to a FILE stream. virtual void Print( FILE* cfile, int depth = 0 ) const; // [internal use] void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); virtual const TiXmlDocument* ToDocument() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. virtual TiXmlDocument* ToDocument() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. /** Walk the XML tree visiting this node and all of its children. */ virtual bool Accept( TiXmlVisitor* content ) const; protected : // [internal use] virtual TiXmlNode* Clone() const; #ifdef TIXML_USE_STL virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); #endif private: void CopyTo( TiXmlDocument* target ) const; bool error; int errorId; TIXML_STRING errorDesc; int tabsize; TiXmlCursor errorLocation; bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. }; /** A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml DOM structure. It is a separate utility class. Take an example: @verbatim @endverbatim Assuming you want the value of "attributeB" in the second "Child" element, it's very easy to write a *lot* of code that looks like: @verbatim TiXmlElement* root = document.FirstChildElement( "Document" ); if ( root ) { TiXmlElement* element = root->FirstChildElement( "Element" ); if ( element ) { TiXmlElement* child = element->FirstChildElement( "Child" ); if ( child ) { TiXmlElement* child2 = child->NextSiblingElement( "Child" ); if ( child2 ) { // Finally do something useful. @endverbatim And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity of such code. A TiXmlHandle checks for null pointers so it is perfectly safe and correct to use: @verbatim TiXmlHandle docHandle( &document ); TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); if ( child2 ) { // do something useful @endverbatim Which is MUCH more concise and useful. It is also safe to copy handles - internally they are nothing more than node pointers. @verbatim TiXmlHandle handleCopy = handle; @endverbatim What they should not be used for is iteration: @verbatim int i=0; while ( true ) { TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement(); if ( !child ) break; // do something ++i; } @endverbatim It seems reasonable, but it is in fact two embedded while loops. The Child method is a linear walk to find the element, so this code would iterate much more than it needs to. Instead, prefer: @verbatim TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement(); for( child; child; child=child->NextSiblingElement() ) { // do something } @endverbatim */ class TiXmlHandle { public: /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. TiXmlHandle( TiXmlNode* _node ) { this->node = _node; } /// Copy constructor TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; } TiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; } /// Return a handle to the first child node. TiXmlHandle FirstChild() const; /// Return a handle to the first child node with the given name. TiXmlHandle FirstChild( const char * value ) const; /// Return a handle to the first child element. TiXmlHandle FirstChildElement() const; /// Return a handle to the first child element with the given name. TiXmlHandle FirstChildElement( const char * value ) const; /** Return a handle to the "index" child with the given name. The first child is 0, the second 1, etc. */ TiXmlHandle Child( const char* value, int index ) const; /** Return a handle to the "index" child. The first child is 0, the second 1, etc. */ TiXmlHandle Child( int index ) const; /** Return a handle to the "index" child element with the given name. The first child element is 0, the second 1, etc. Note that only TiXmlElements are indexed: other types are not counted. */ TiXmlHandle ChildElement( const char* value, int index ) const; /** Return a handle to the "index" child element. The first child element is 0, the second 1, etc. Note that only TiXmlElements are indexed: other types are not counted. */ TiXmlHandle ChildElement( int index ) const; #ifdef TIXML_USE_STL TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); } TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); } TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); } TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); } #endif /** Return the handle as a TiXmlNode. This may return null. */ TiXmlNode* ToNode() const { return node; } /** Return the handle as a TiXmlElement. This may return null. */ TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } /** Return the handle as a TiXmlText. This may return null. */ TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); } /** Return the handle as a TiXmlUnknown. This may return null. */ TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } /** @deprecated use ToNode. Return the handle as a TiXmlNode. This may return null. */ TiXmlNode* Node() const { return ToNode(); } /** @deprecated use ToElement. Return the handle as a TiXmlElement. This may return null. */ TiXmlElement* Element() const { return ToElement(); } /** @deprecated use ToText() Return the handle as a TiXmlText. This may return null. */ TiXmlText* Text() const { return ToText(); } /** @deprecated use ToUnknown() Return the handle as a TiXmlUnknown. This may return null. */ TiXmlUnknown* Unknown() const { return ToUnknown(); } private: TiXmlNode* node; }; /** Print to memory functionality. The TiXmlPrinter is useful when you need to: -# Print to memory (especially in non-STL mode) -# Control formatting (line endings, etc.) When constructed, the TiXmlPrinter is in its default "pretty printing" mode. Before calling Accept() you can call methods to control the printing of the XML document. After TiXmlNode::Accept() is called, the printed document can be accessed via the CStr(), Str(), and Size() methods. TiXmlPrinter uses the Visitor API. @verbatim TiXmlPrinter printer; printer.SetIndent( "\t" ); doc.Accept( &printer ); fprintf( stdout, "%s", printer.CStr() ); @endverbatim */ class TiXmlPrinter : public TiXmlVisitor { public: TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ), buffer(), indent( " " ), lineBreak( "\n" ) {} virtual bool VisitEnter( const TiXmlDocument& doc ); virtual bool VisitExit( const TiXmlDocument& doc ); virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ); virtual bool VisitExit( const TiXmlElement& element ); virtual bool Visit( const TiXmlDeclaration& declaration ); virtual bool Visit( const TiXmlText& text ); virtual bool Visit( const TiXmlComment& comment ); virtual bool Visit( const TiXmlUnknown& unknown ); /** Set the indent characters for printing. By default 4 spaces but tab (\t) is also useful, or null/empty string for no indentation. */ void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; } /// Query the indention string. const char* Indent() { return indent.c_str(); } /** Set the line breaking string. By default set to newline (\n). Some operating systems prefer other characters, or can be set to the null/empty string for no indentation. */ void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; } /// Query the current line breaking string. const char* LineBreak() { return lineBreak.c_str(); } /** Switch over to "stream printing" which is the most dense formatting without line breaks. Common when the XML is needed for network transmission. */ void SetStreamPrinting() { indent = ""; lineBreak = ""; } /// Return the result. const char* CStr() { return buffer.c_str(); } /// Return the length of the result string. size_t Size() { return buffer.size(); } #ifdef TIXML_USE_STL /// Return the result. const std::string& Str() { return buffer; } #endif private: void DoIndent() { for( int i=0; i`__ xml output. ''' requires = ['Sphinx>=1.0.7', 'docutils>=0.5', 'six>=1.4'] if sys.version_info < (2, 4): print('ERROR: Sphinx requires at least Python 2.4 to run.') sys.exit(1) if sys.version_info < (2, 5): # Python 2.4's distutils doesn't automatically install an egg-info, # so an existing docutils install won't be detected -- in that case, # remove the dependency from setup.py try: import docutils if int(docutils.__version__[2]) < 4: raise ValueError('docutils not recent enough') except: pass else: del requires[-1] # The uuid module is new in the stdlib in 2.5 requires.append('uuid>=1.30') setup( name='breathe', version=breathe.__version__, url='https://github.com/michaeljones/breathe', download_url='https://github.com/michaeljones/breathe', license='BSD', author='Michael Jones', author_email='m.pricejones@gmail.com', description='Sphinx Doxygen renderer', long_description=long_desc, zip_safe=False, classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Topic :: Documentation', 'Topic :: Text Processing', 'Topic :: Utilities', ], platforms='any', packages=find_packages(), include_package_data=True, install_requires=requires, use_2to3=True, ) breathe-4.1.0/tests/000077500000000000000000000000001256765247000143065ustar00rootroot00000000000000breathe-4.1.0/tests/runtests.sh000077500000000000000000000000541256765247000165330ustar00rootroot00000000000000#!/bin/sh export PYTHONPATH=../ nosetests breathe-4.1.0/tests/test_utils.py000066400000000000000000000060351256765247000170630ustar00rootroot00000000000000 from unittest import TestCase from xml.dom import minidom from breathe.renderer.rst.doxygen.compound import get_param_decl, get_definition_without_template_args from breathe.parser.doxygen.compoundsuper import memberdefType from breathe.directives import PathHandler class TestUtils(TestCase): def test_param_decl(self): # From xml from: examples/specific/parameters.h xml = """ int a float b int * c int(*) p [3] MyClass a MyClass * b int(&) r [3] """ doc = minidom.parseString(xml) memberdef = memberdefType.factory() for child in doc.documentElement.childNodes: memberdef.buildChildren(child, 'param') self.assertEqual(get_param_decl(memberdef.param[0]), 'int a') self.assertEqual(get_param_decl(memberdef.param[1]), 'float b') self.assertEqual(get_param_decl(memberdef.param[2]), 'int * c') self.assertEqual(get_param_decl(memberdef.param[3]), 'int(*p)[3]') self.assertEqual(get_param_decl(memberdef.param[4]), 'MyClass a') self.assertEqual(get_param_decl(memberdef.param[5]), 'MyClass * b') self.assertEqual(get_param_decl(memberdef.param[6]), 'int(&r)[3]') def test_definition_without_template_args(self): def get_definition(definition, name): class MockDataObject: def __init__(self, definition, name): self.definition = definition self.name = name return get_definition_without_template_args(MockDataObject(definition, name)) self.assertEqual('void A::foo', get_definition('void A::foo', 'foo')) # Template arguments in the return type should be preserved: self.assertEqual('Result A::f', get_definition('Result A::f', 'f')) # Nested template arguments: self.assertEqual('Result A::f', get_definition('Result A< B >::f', 'f')) class TestPathHandler(TestCase): def test_path_handler(self): path_handler = PathHandler(None, None, None, None) self.assertEqual(path_handler.includes_directory('directory/file.h'), True) self.assertEqual(path_handler.includes_directory('directory\\file.h'), True) self.assertEqual(path_handler.includes_directory('file.h'), False) breathe-4.1.0/tests/warnings/000077500000000000000000000000001256765247000161365ustar00rootroot00000000000000breathe-4.1.0/tests/warnings/Makefile000066400000000000000000000152471256765247000176070ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TestBreatheWarnings.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TestBreatheWarnings.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/TestBreatheWarnings" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TestBreatheWarnings" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." breathe-4.1.0/tests/warnings/make.bat000066400000000000000000000151201256765247000175420ustar00rootroot00000000000000@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source set I18NSPHINXOPTS=%SPHINXOPTS% source if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. xml to make Docutils-native XML files echo. pseudoxml to make pseudoxml-XML files for display purposes echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) %SPHINXBUILD% 2> nul if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\TestBreatheWarnings.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\TestBreatheWarnings.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdf" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdfja" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf-ja cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) if "%1" == "xml" ( %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml if errorlevel 1 exit /b 1 echo. echo.Build finished. The XML files are in %BUILDDIR%/xml. goto end ) if "%1" == "pseudoxml" ( %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml if errorlevel 1 exit /b 1 echo. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. goto end ) :end breathe-4.1.0/tests/warnings/source/000077500000000000000000000000001256765247000174365ustar00rootroot00000000000000breathe-4.1.0/tests/warnings/source/class.rst000066400000000000000000000004561256765247000213020ustar00rootroot00000000000000 Class Warnings ============== Test 'cannot find project' warning. .. doxygenclass:: MyClass :project: nonexistent Test 'cannot find xml' warning: .. doxygenclass:: MyClass :project: invalidproject Test 'cannot find class' warning: .. doxygenclass:: NonExistentClass :project: class breathe-4.1.0/tests/warnings/source/conf.py000066400000000000000000000206061256765247000207410ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # Test Breathe Warnings documentation build configuration file, created by # sphinx-quickstart on Thu Jun 5 18:57:21 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' sys.path.append('../../') # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['breathe'] # Breathe configuration parameters breathe_projects = { "class" : "../../../examples/doxygen/class/xml/", "function" : "../../../examples/specific/functionOverload/xml/", "group" : "../../../examples/specific/group/xml/", "invalidproject" : "invalid/path/", } # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'Test Breathe Warnings' copyright = u'2014, Michael Jones' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '1.0' # The full version, including alpha/beta/rc tags. release = '1.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. #keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'TestBreatheWarningsdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'TestBreatheWarnings.tex', u'Test Breathe Warnings Documentation', u'Michael Jones', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'testbreathewarnings', u'Test Breathe Warnings Documentation', [u'Michael Jones'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'TestBreatheWarnings', u'Test Breathe Warnings Documentation', u'Michael Jones', 'TestBreatheWarnings', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False breathe-4.1.0/tests/warnings/source/define.rst000066400000000000000000000003231256765247000214200ustar00rootroot00000000000000 Define Warnings =============== Test 'cannot find project' warning. .. doxygendefine:: MY_DEFINE :project: nonexistent Test 'cannot find define' warning. .. doxygendefine:: MY_DEFINE :project: class breathe-4.1.0/tests/warnings/source/function.rst000066400000000000000000000006331256765247000220170ustar00rootroot00000000000000 Function Warnings ================= Test 'cannot find project' warning. .. doxygenfunction:: MyFunction :project: nonexistent Test 'cannot find xml' warning: .. doxygenfunction:: MyFunction :project: invalidproject Test 'cannot find function' warning. .. doxygenfunction:: NonExistentFunction :project: function Test 'too many matches' warning. .. doxygenfunction:: f :project: function breathe-4.1.0/tests/warnings/source/group.rst000066400000000000000000000004721256765247000213270ustar00rootroot00000000000000 Function Warnings ================= Test 'cannot find project' warning. .. doxygengroup:: MyFunction :project: nonexistent Test 'cannot find xml' warning: .. doxygengroup:: MyGroup :project: invalidproject Test 'cannot find function' warning. .. doxygengroup:: NonExistentGroup :project: group breathe-4.1.0/tests/warnings/source/index.rst000066400000000000000000000004231256765247000212760ustar00rootroot00000000000000 Test Breathe Warnings ===================== This Sphinx instance is designed to call Breathe in every single incorrect way in order to test that the warnings work without crashing the build process. .. toctree:: :maxdepth: 2 class function group define