summaryrefslogtreecommitdiffstats
path: root/addon/doxmlparser
diff options
context:
space:
mode:
Diffstat (limited to 'addon/doxmlparser')
-rw-r--r--addon/doxmlparser/CMakeLists.txt24
-rw-r--r--addon/doxmlparser/Doxyfile334
-rw-r--r--addon/doxmlparser/Doxyfile.impl334
-rw-r--r--addon/doxmlparser/LICENSE339
-rw-r--r--addon/doxmlparser/README.md10
-rw-r--r--addon/doxmlparser/doxmlparser/__init__.py2
-rw-r--r--addon/doxmlparser/doxmlparser/compound.py22358
-rw-r--r--addon/doxmlparser/doxmlparser/index.py1621
-rw-r--r--addon/doxmlparser/examples/CMakeLists.txt2
-rw-r--r--addon/doxmlparser/examples/dump/dump.py31
-rw-r--r--addon/doxmlparser/examples/metrics/CMakeLists.txt18
-rw-r--r--addon/doxmlparser/examples/metrics/main.cpp271
-rw-r--r--addon/doxmlparser/examples/metrics/metrics.py225
-rw-r--r--addon/doxmlparser/include/doxmlintf.h1141
-rw-r--r--addon/doxmlparser/requirements.txt2
-rw-r--r--addon/doxmlparser/setup.py19
-rw-r--r--addon/doxmlparser/src/CMakeLists.txt18
-rw-r--r--addon/doxmlparser/src/basehandler.cpp3
-rw-r--r--addon/doxmlparser/src/basehandler.h325
-rw-r--r--addon/doxmlparser/src/baseiterator.h50
-rw-r--r--addon/doxmlparser/src/compoundhandler.cpp655
-rw-r--r--addon/doxmlparser/src/compoundhandler.h237
-rw-r--r--addon/doxmlparser/src/debug.cpp24
-rw-r--r--addon/doxmlparser/src/debug.h7
-rw-r--r--addon/doxmlparser/src/dochandler.cpp2240
-rw-r--r--addon/doxmlparser/src/dochandler.h1352
-rw-r--r--addon/doxmlparser/src/graphhandler.cpp216
-rw-r--r--addon/doxmlparser/src/graphhandler.h154
-rw-r--r--addon/doxmlparser/src/linkedtexthandler.cpp133
-rw-r--r--addon/doxmlparser/src/linkedtexthandler.h54
-rw-r--r--addon/doxmlparser/src/loamhandler.cpp77
-rw-r--r--addon/doxmlparser/src/loamhandler.h52
-rw-r--r--addon/doxmlparser/src/mainhandler.cpp301
-rw-r--r--addon/doxmlparser/src/mainhandler.h82
-rw-r--r--addon/doxmlparser/src/memberhandler.cpp600
-rw-r--r--addon/doxmlparser/src/memberhandler.h252
-rw-r--r--addon/doxmlparser/src/paramhandler.cpp158
-rw-r--r--addon/doxmlparser/src/paramhandler.h103
-rw-r--r--addon/doxmlparser/src/sectionhandler.cpp170
-rw-r--r--addon/doxmlparser/src/sectionhandler.h102
-rw-r--r--addon/doxmlparser/src/stringimpl.h38
-rw-r--r--addon/doxmlparser/test/CMakeLists.txt18
-rw-r--r--addon/doxmlparser/test/main.cpp776
43 files changed, 24628 insertions, 10300 deletions
diff --git a/addon/doxmlparser/CMakeLists.txt b/addon/doxmlparser/CMakeLists.txt
index 8456d2a..6ef5568 100644
--- a/addon/doxmlparser/CMakeLists.txt
+++ b/addon/doxmlparser/CMakeLists.txt
@@ -1,4 +1,22 @@
+find_package(generateDS)
+if (GENERATEDS_FOUND)
+ add_custom_command(
+ COMMENT "Updating index.py from index.xsd..."
+ COMMAND ${GENERATEDS_EXECUTABLE} --no-dates --no-versions -f -o ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py ${PROJECT_SOURCE_DIR}/templates/xml/index.xsd
+ DEPENDS ${PROJECT_SOURCE_DIR}/templates/xml/index.xsd
+ OUTPUT ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py
+ )
+ add_custom_command(
+ COMMENT "Updating compound.py from compound.xsd..."
+ COMMAND ${GENERATEDS_EXECUTABLE} --no-dates --no-versions -f -o ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py ${PROJECT_SOURCE_DIR}/templates/xml/compound.xsd
+ DEPENDS ${PROJECT_SOURCE_DIR}/templates/xml/compound.xsd
+ OUTPUT ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py
+ )
+ add_custom_target(
+ update_doxmlparser_files ALL
+ DEPENDS ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/index.py
+ DEPENDS ${PROJECT_SOURCE_DIR}/addon/doxmlparser/doxmlparser/compound.py
+ COMMENT "Updating doxmlparser module..."
+ )
+endif()
-add_subdirectory(src)
-add_subdirectory(examples)
-add_subdirectory(test)
diff --git a/addon/doxmlparser/Doxyfile b/addon/doxmlparser/Doxyfile
deleted file mode 100644
index 18359a0..0000000
--- a/addon/doxmlparser/Doxyfile
+++ /dev/null
@@ -1,334 +0,0 @@
-# Doxyfile 1.8.17
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = doxmlparser
-PROJECT_NUMBER =
-PROJECT_BRIEF =
-PROJECT_LOGO =
-OUTPUT_DIRECTORY = doc
-CREATE_SUBDIRS = NO
-ALLOW_UNICODE_NAMES = NO
-OUTPUT_LANGUAGE = English
-OUTPUT_TEXT_DIRECTION = None
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-JAVADOC_BANNER = NO
-QT_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-OPTIMIZE_FOR_FORTRAN = NO
-OPTIMIZE_OUTPUT_VHDL = NO
-OPTIMIZE_OUTPUT_SLICE = NO
-EXTENSION_MAPPING =
-MARKDOWN_SUPPORT = YES
-TOC_INCLUDE_HEADINGS = 5
-AUTOLINK_SUPPORT = YES
-BUILTIN_STL_SUPPORT = NO
-CPP_CLI_SUPPORT = NO
-SIP_SUPPORT = NO
-IDL_PROPERTY_SUPPORT = YES
-DISTRIBUTE_GROUP_DOC = NO
-GROUP_NESTED_COMPOUNDS = NO
-SUBGROUPING = YES
-INLINE_GROUPED_CLASSES = NO
-INLINE_SIMPLE_STRUCTS = NO
-TYPEDEF_HIDES_STRUCT = NO
-LOOKUP_CACHE_SIZE = 0
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_PRIV_VIRTUAL = NO
-EXTRACT_PACKAGE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-EXTRACT_ANON_NSPACES = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-HIDE_COMPOUND_REFERENCE= NO
-SHOW_INCLUDE_FILES = YES
-SHOW_GROUPED_MEMB_INC = NO
-FORCE_LOCAL_INCLUDES = NO
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_MEMBERS_CTORS_1ST = NO
-SORT_GROUP_NAMES = NO
-SORT_BY_SCOPE_NAME = NO
-STRICT_PROTO_MATCHING = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_FILES = YES
-SHOW_NAMESPACES = YES
-FILE_VERSION_FILTER =
-LAYOUT_FILE =
-CITE_BIB_FILES =
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_AS_ERROR = NO
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = include
-INPUT_ENCODING = UTF-8
-FILE_PATTERNS = *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-FILTER_SOURCE_PATTERNS =
-USE_MDFILE_AS_MAINPAGE =
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-REFERENCES_LINK_SOURCE = YES
-SOURCE_TOOLTIPS = YES
-USE_HTAGS = NO
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT =
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_EXTRA_STYLESHEET =
-HTML_EXTRA_FILES =
-HTML_COLORSTYLE_HUE = 220
-HTML_COLORSTYLE_SAT = 100
-HTML_COLORSTYLE_GAMMA = 80
-HTML_TIMESTAMP = NO
-HTML_DYNAMIC_MENUS = YES
-HTML_DYNAMIC_SECTIONS = NO
-HTML_INDEX_NUM_ENTRIES = 100
-GENERATE_DOCSET = NO
-DOCSET_FEEDNAME = "Doxygen generated docs"
-DOCSET_BUNDLE_ID = org.doxygen.Project
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-DOCSET_PUBLISHER_NAME = Publisher
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-CHM_INDEX_ENCODING =
-BINARY_TOC = NO
-TOC_EXPAND = NO
-GENERATE_QHP = NO
-QCH_FILE =
-QHP_NAMESPACE = org.doxygen.Project
-QHP_VIRTUAL_FOLDER = doc
-QHP_CUST_FILTER_NAME =
-QHP_CUST_FILTER_ATTRS =
-QHP_SECT_FILTER_ATTRS =
-QHG_LOCATION =
-GENERATE_ECLIPSEHELP = NO
-ECLIPSE_DOC_ID = org.doxygen.Project
-DISABLE_INDEX = NO
-GENERATE_TREEVIEW = NO
-ENUM_VALUES_PER_LINE = 4
-TREEVIEW_WIDTH = 250
-EXT_LINKS_IN_WINDOW = NO
-FORMULA_FONTSIZE = 10
-FORMULA_TRANSPARENT = YES
-USE_MATHJAX = NO
-MATHJAX_FORMAT = HTML-CSS
-MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/
-MATHJAX_EXTENSIONS =
-MATHJAX_CODEFILE =
-SEARCHENGINE = NO
-SERVER_BASED_SEARCH = NO
-EXTERNAL_SEARCH = NO
-SEARCHENGINE_URL =
-SEARCHDATA_FILE = searchdata.xml
-EXTERNAL_SEARCH_ID =
-EXTRA_SEARCH_MAPPINGS =
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-LATEX_CMD_NAME =
-MAKEINDEX_CMD_NAME = makeindex
-LATEX_MAKEINDEX_CMD = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-LATEX_FOOTER =
-LATEX_EXTRA_STYLESHEET =
-LATEX_EXTRA_FILES =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-LATEX_SOURCE_CODE = NO
-LATEX_BIB_STYLE = plain
-LATEX_TIMESTAMP = NO
-LATEX_EMOJI_DIRECTORY =
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-RTF_SOURCE_CODE = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_SUBDIR =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = YES
-XML_OUTPUT = xml
-XML_PROGRAMLISTING = YES
-XML_NS_MEMB_FILE_SCOPE = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-GENERATE_DOCBOOK = NO
-DOCBOOK_OUTPUT = docbook
-DOCBOOK_PROGRAMLISTING = NO
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-TAGFILES = ../../qtools_docs/qtools.tag=../../../../qtools_docs/html
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-EXTERNAL_PAGES = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-DIA_PATH =
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-DOT_NUM_THREADS = 0
-DOT_FONTNAME = Helvetica
-DOT_FONTSIZE = 10
-DOT_FONTPATH =
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-UML_LIMIT_NUM_FIELDS = 10
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-CALLER_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-INTERACTIVE_SVG = NO
-DOT_PATH =
-DOTFILE_DIRS =
-MSCFILE_DIRS =
-DIAFILE_DIRS =
-PLANTUML_JAR_PATH =
-PLANTUML_CFG_FILE =
-PLANTUML_INCLUDE_PATH =
-DOT_GRAPH_MAX_NODES = 50
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
diff --git a/addon/doxmlparser/Doxyfile.impl b/addon/doxmlparser/Doxyfile.impl
deleted file mode 100644
index 9bfc85e..0000000
--- a/addon/doxmlparser/Doxyfile.impl
+++ /dev/null
@@ -1,334 +0,0 @@
-# Doxyfile 1.8.17
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = doxmlparser
-PROJECT_NUMBER =
-PROJECT_BRIEF =
-PROJECT_LOGO =
-OUTPUT_DIRECTORY = doc_impl
-CREATE_SUBDIRS = NO
-ALLOW_UNICODE_NAMES = NO
-OUTPUT_LANGUAGE = English
-OUTPUT_TEXT_DIRECTION = None
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-JAVADOC_BANNER = NO
-QT_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-OPTIMIZE_FOR_FORTRAN = NO
-OPTIMIZE_OUTPUT_VHDL = NO
-OPTIMIZE_OUTPUT_SLICE = NO
-EXTENSION_MAPPING =
-MARKDOWN_SUPPORT = YES
-TOC_INCLUDE_HEADINGS = 5
-AUTOLINK_SUPPORT = YES
-BUILTIN_STL_SUPPORT = NO
-CPP_CLI_SUPPORT = NO
-SIP_SUPPORT = NO
-IDL_PROPERTY_SUPPORT = YES
-DISTRIBUTE_GROUP_DOC = NO
-GROUP_NESTED_COMPOUNDS = NO
-SUBGROUPING = YES
-INLINE_GROUPED_CLASSES = NO
-INLINE_SIMPLE_STRUCTS = NO
-TYPEDEF_HIDES_STRUCT = NO
-LOOKUP_CACHE_SIZE = 0
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_PRIV_VIRTUAL = NO
-EXTRACT_PACKAGE = NO
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-EXTRACT_ANON_NSPACES = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-HIDE_COMPOUND_REFERENCE= NO
-SHOW_INCLUDE_FILES = YES
-SHOW_GROUPED_MEMB_INC = NO
-FORCE_LOCAL_INCLUDES = NO
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_MEMBERS_CTORS_1ST = NO
-SORT_GROUP_NAMES = NO
-SORT_BY_SCOPE_NAME = NO
-STRICT_PROTO_MATCHING = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_FILES = YES
-SHOW_NAMESPACES = YES
-FILE_VERSION_FILTER =
-LAYOUT_FILE =
-CITE_BIB_FILES =
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_AS_ERROR = NO
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = src
-INPUT_ENCODING = UTF-8
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-FILTER_SOURCE_PATTERNS =
-USE_MDFILE_AS_MAINPAGE =
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-REFERENCES_LINK_SOURCE = YES
-SOURCE_TOOLTIPS = YES
-USE_HTAGS = NO
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT =
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_EXTRA_STYLESHEET =
-HTML_EXTRA_FILES =
-HTML_COLORSTYLE_HUE = 220
-HTML_COLORSTYLE_SAT = 100
-HTML_COLORSTYLE_GAMMA = 80
-HTML_TIMESTAMP = NO
-HTML_DYNAMIC_MENUS = YES
-HTML_DYNAMIC_SECTIONS = NO
-HTML_INDEX_NUM_ENTRIES = 100
-GENERATE_DOCSET = NO
-DOCSET_FEEDNAME = "Doxygen generated docs"
-DOCSET_BUNDLE_ID = org.doxygen.Project
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-DOCSET_PUBLISHER_NAME = Publisher
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-CHM_INDEX_ENCODING =
-BINARY_TOC = NO
-TOC_EXPAND = NO
-GENERATE_QHP = NO
-QCH_FILE =
-QHP_NAMESPACE = org.doxygen.Project
-QHP_VIRTUAL_FOLDER = doc
-QHP_CUST_FILTER_NAME =
-QHP_CUST_FILTER_ATTRS =
-QHP_SECT_FILTER_ATTRS =
-QHG_LOCATION =
-GENERATE_ECLIPSEHELP = NO
-ECLIPSE_DOC_ID = org.doxygen.Project
-DISABLE_INDEX = NO
-GENERATE_TREEVIEW = NO
-ENUM_VALUES_PER_LINE = 4
-TREEVIEW_WIDTH = 250
-EXT_LINKS_IN_WINDOW = NO
-FORMULA_FONTSIZE = 10
-FORMULA_TRANSPARENT = YES
-USE_MATHJAX = NO
-MATHJAX_FORMAT = HTML-CSS
-MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/
-MATHJAX_EXTENSIONS =
-MATHJAX_CODEFILE =
-SEARCHENGINE = NO
-SERVER_BASED_SEARCH = NO
-EXTERNAL_SEARCH = NO
-SEARCHENGINE_URL =
-SEARCHDATA_FILE = searchdata.xml
-EXTERNAL_SEARCH_ID =
-EXTRA_SEARCH_MAPPINGS =
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-LATEX_CMD_NAME =
-MAKEINDEX_CMD_NAME = makeindex
-LATEX_MAKEINDEX_CMD = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-LATEX_FOOTER =
-LATEX_EXTRA_STYLESHEET =
-LATEX_EXTRA_FILES =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-LATEX_SOURCE_CODE = NO
-LATEX_BIB_STYLE = plain
-LATEX_TIMESTAMP = NO
-LATEX_EMOJI_DIRECTORY =
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-RTF_SOURCE_CODE = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_SUBDIR =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = YES
-XML_OUTPUT = xml
-XML_PROGRAMLISTING = YES
-XML_NS_MEMB_FILE_SCOPE = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-GENERATE_DOCBOOK = NO
-DOCBOOK_OUTPUT = docbook
-DOCBOOK_PROGRAMLISTING = NO
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = YES
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED = DEFINE_CLS_IMPL
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-TAGFILES = ../../qtools_docs/qtools.tag=../../../../qtools_docs/html
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-EXTERNAL_PAGES = YES
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-DIA_PATH =
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = YES
-DOT_NUM_THREADS = 0
-DOT_FONTNAME = Helvetica
-DOT_FONTSIZE = 10
-DOT_FONTPATH =
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-UML_LIMIT_NUM_FIELDS = 10
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-CALLER_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-INTERACTIVE_SVG = NO
-DOT_PATH =
-DOTFILE_DIRS =
-MSCFILE_DIRS =
-DIAFILE_DIRS =
-PLANTUML_JAR_PATH =
-PLANTUML_CFG_FILE =
-PLANTUML_INCLUDE_PATH =
-DOT_GRAPH_MAX_NODES = 50
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
diff --git a/addon/doxmlparser/LICENSE b/addon/doxmlparser/LICENSE
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/addon/doxmlparser/LICENSE
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/addon/doxmlparser/README.md b/addon/doxmlparser/README.md
new file mode 100644
index 0000000..ced4018
--- /dev/null
+++ b/addon/doxmlparser/README.md
@@ -0,0 +1,10 @@
+Doxmlparser
+===========
+
+This is a python package to make it easier to parse the XML output produced by doxygen.
+
+The API is generated from the index.xsd and compound.xsd XML schema files using
+Dave Kuhlman's generateDS https://www.davekuhlman.org/generateDS.html
+
+See the examples directory to get an idea how to use the python module
+
diff --git a/addon/doxmlparser/doxmlparser/__init__.py b/addon/doxmlparser/doxmlparser/__init__.py
new file mode 100644
index 0000000..31a275f
--- /dev/null
+++ b/addon/doxmlparser/doxmlparser/__init__.py
@@ -0,0 +1,2 @@
+from .index import *
+from .compound import *
diff --git a/addon/doxmlparser/doxmlparser/compound.py b/addon/doxmlparser/doxmlparser/compound.py
new file mode 100644
index 0000000..d15e04e
--- /dev/null
+++ b/addon/doxmlparser/doxmlparser/compound.py
@@ -0,0 +1,22358 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#
+# Generated by generateDS.py.
+# Python 3.9.0 (default, Oct 27 2020, 14:15:17) [Clang 12.0.0 (clang-1200.0.32.21)]
+#
+# Command line options:
+# ('--no-dates', '')
+# ('--no-versions', '')
+# ('-f', '')
+# ('-o', '/Users/dimitri/doxygen.git/addon/doxmlparser/doxmlparser/compound.py')
+#
+# Command line arguments:
+# /Users/dimitri/doxygen.git/templates/xml/compound.xsd
+#
+# Command line:
+# /usr/local/bin/generateDS --no-dates --no-versions -f -o "/Users/dimitri/doxygen.git/addon/doxmlparser/doxmlparser/compound.py" /Users/dimitri/doxygen.git/templates/xml/compound.xsd
+#
+# Current working directory (os.getcwd()):
+# doxmlparser
+#
+
+import sys
+try:
+ ModulenotfoundExp_ = ModuleNotFoundError
+except NameError:
+ ModulenotfoundExp_ = ImportError
+from six.moves import zip_longest
+import os
+import re as re_
+import base64
+import datetime as datetime_
+import decimal as decimal_
+try:
+ from lxml import etree as etree_
+except ModulenotfoundExp_ :
+ from xml.etree import ElementTree as etree_
+
+
+Validate_simpletypes_ = True
+SaveElementTreeNode = True
+if sys.version_info.major == 2:
+ BaseStrType_ = basestring
+else:
+ BaseStrType_ = str
+
+
+def parsexml_(infile, parser=None, **kwargs):
+ if parser is None:
+ # Use the lxml ElementTree compatible parser so that, e.g.,
+ # we ignore comments.
+ try:
+ parser = etree_.ETCompatXMLParser()
+ except AttributeError:
+ # fallback to xml.etree
+ parser = etree_.XMLParser()
+ try:
+ if isinstance(infile, os.PathLike):
+ infile = os.path.join(infile)
+ except AttributeError:
+ pass
+ doc = etree_.parse(infile, parser=parser, **kwargs)
+ return doc
+
+def parsexmlstring_(instring, parser=None, **kwargs):
+ if parser is None:
+ # Use the lxml ElementTree compatible parser so that, e.g.,
+ # we ignore comments.
+ try:
+ parser = etree_.ETCompatXMLParser()
+ except AttributeError:
+ # fallback to xml.etree
+ parser = etree_.XMLParser()
+ element = etree_.fromstring(instring, parser=parser, **kwargs)
+ return element
+
+#
+# Namespace prefix definition table (and other attributes, too)
+#
+# The module generatedsnamespaces, if it is importable, must contain
+# a dictionary named GeneratedsNamespaceDefs. This Python dictionary
+# should map element type names (strings) to XML schema namespace prefix
+# definitions. The export method for any class for which there is
+# a namespace prefix definition, will export that definition in the
+# XML representation of that element. See the export method of
+# any generated element type class for an example of the use of this
+# table.
+# A sample table is:
+#
+# # File: generatedsnamespaces.py
+#
+# GenerateDSNamespaceDefs = {
+# "ElementtypeA": "http://www.xxx.com/namespaceA",
+# "ElementtypeB": "http://www.xxx.com/namespaceB",
+# }
+#
+# Additionally, the generatedsnamespaces module can contain a python
+# dictionary named GenerateDSNamespaceTypePrefixes that associates element
+# types with the namespace prefixes that are to be added to the
+# "xsi:type" attribute value. See the exportAttributes method of
+# any generated element type and the generation of "xsi:type" for an
+# example of the use of this table.
+# An example table:
+#
+# # File: generatedsnamespaces.py
+#
+# GenerateDSNamespaceTypePrefixes = {
+# "ElementtypeC": "aaa:",
+# "ElementtypeD": "bbb:",
+# }
+#
+
+try:
+ from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
+except ModulenotfoundExp_ :
+ GenerateDSNamespaceDefs_ = {}
+try:
+ from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
+except ModulenotfoundExp_ :
+ GenerateDSNamespaceTypePrefixes_ = {}
+
+#
+# You can replace the following class definition by defining an
+# importable module named "generatedscollector" containing a class
+# named "GdsCollector". See the default class definition below for
+# clues about the possible content of that class.
+#
+try:
+ from generatedscollector import GdsCollector as GdsCollector_
+except ModulenotfoundExp_ :
+
+ class GdsCollector_(object):
+
+ def __init__(self, messages=None):
+ if messages is None:
+ self.messages = []
+ else:
+ self.messages = messages
+
+ def add_message(self, msg):
+ self.messages.append(msg)
+
+ def get_messages(self):
+ return self.messages
+
+ def clear_messages(self):
+ self.messages = []
+
+ def print_messages(self):
+ for msg in self.messages:
+ print("Warning: {}".format(msg))
+
+ def write_messages(self, outstream):
+ for msg in self.messages:
+ outstream.write("Warning: {}\n".format(msg))
+
+
+#
+# The super-class for enum types
+#
+
+try:
+ from enum import Enum
+except ModulenotfoundExp_ :
+ Enum = object
+
+#
+# The root super-class for element type classes
+#
+# 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 ModulenotfoundExp_ as exp:
+
+ class GeneratedsSuper(object):
+ __hash__ = object.__hash__
+ tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
+ class _FixedOffsetTZ(datetime_.tzinfo):
+ def __init__(self, offset, name):
+ self.__offset = datetime_.timedelta(minutes=offset)
+ self.__name = name
+ def utcoffset(self, dt):
+ return self.__offset
+ def tzname(self, dt):
+ return self.__name
+ def dst(self, dt):
+ return None
+ def gds_format_string(self, input_data, input_name=''):
+ return input_data
+ def gds_parse_string(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_validate_string(self, input_data, node=None, input_name=''):
+ if not input_data:
+ return ''
+ else:
+ return input_data
+ def gds_format_base64(self, input_data, input_name=''):
+ return base64.b64encode(input_data)
+ def gds_validate_base64(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_integer(self, input_data, input_name=''):
+ return '%d' % input_data
+ def gds_parse_integer(self, input_data, node=None, input_name=''):
+ try:
+ ival = int(input_data)
+ except (TypeError, ValueError) as exp:
+ raise_parse_error(node, 'Requires integer value: %s' % exp)
+ return ival
+ def gds_validate_integer(self, input_data, node=None, input_name=''):
+ try:
+ value = int(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires integer value')
+ return value
+ def gds_format_integer_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_integer_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ int(value)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires sequence of integer values')
+ return values
+ def gds_format_float(self, input_data, input_name=''):
+ return ('%.15f' % input_data).rstrip('0')
+ def gds_parse_float(self, input_data, node=None, input_name=''):
+ try:
+ fval_ = float(input_data)
+ except (TypeError, ValueError) as exp:
+ raise_parse_error(node, 'Requires float or double value: %s' % exp)
+ return fval_
+ def gds_validate_float(self, input_data, node=None, input_name=''):
+ try:
+ value = float(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires float value')
+ return value
+ def gds_format_float_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_float_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ float(value)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires sequence of float values')
+ return values
+ def gds_format_decimal(self, input_data, input_name=''):
+ return_value = '%s' % input_data
+ if '.' in return_value:
+ return_value = return_value.rstrip('0')
+ if return_value.endswith('.'):
+ return_value = return_value.rstrip('.')
+ return return_value
+ def gds_parse_decimal(self, input_data, node=None, input_name=''):
+ try:
+ decimal_value = decimal_.Decimal(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires decimal value')
+ return decimal_value
+ def gds_validate_decimal(self, input_data, node=None, input_name=''):
+ try:
+ value = decimal_.Decimal(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires decimal value')
+ return value
+ def gds_format_decimal_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return ' '.join([self.gds_format_decimal(item) for item in input_data])
+ def gds_validate_decimal_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ decimal_.Decimal(value)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires sequence of decimal values')
+ return values
+ def gds_format_double(self, input_data, input_name=''):
+ return '%s' % input_data
+ def gds_parse_double(self, input_data, node=None, input_name=''):
+ try:
+ fval_ = float(input_data)
+ except (TypeError, ValueError) as exp:
+ raise_parse_error(node, 'Requires double or float value: %s' % exp)
+ return fval_
+ def gds_validate_double(self, input_data, node=None, input_name=''):
+ try:
+ value = float(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires double or float value')
+ return value
+ def gds_format_double_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_double_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ float(value)
+ except (TypeError, ValueError):
+ raise_parse_error(
+ node, 'Requires sequence of double or float values')
+ return values
+ def gds_format_boolean(self, input_data, input_name=''):
+ return ('%s' % input_data).lower()
+ def gds_parse_boolean(self, input_data, node=None, input_name=''):
+ if input_data in ('true', '1'):
+ bval = True
+ elif input_data in ('false', '0'):
+ bval = False
+ else:
+ raise_parse_error(node, 'Requires boolean value')
+ return bval
+ def gds_validate_boolean(self, input_data, node=None, input_name=''):
+ if input_data not in (True, 1, False, 0, ):
+ raise_parse_error(
+ node,
+ 'Requires boolean value '
+ '(one of True, 1, False, 0)')
+ return input_data
+ def gds_format_boolean_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_boolean_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ if value not in (True, 1, False, 0, ):
+ raise_parse_error(
+ node,
+ 'Requires sequence of boolean values '
+ '(one of True, 1, False, 0)')
+ return values
+ def gds_validate_datetime(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_datetime(self, input_data, input_name=''):
+ if input_data.microsecond == 0:
+ _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
+ input_data.year,
+ input_data.month,
+ input_data.day,
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ )
+ else:
+ _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
+ input_data.year,
+ input_data.month,
+ input_data.day,
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ ('%f' % (float(input_data.microsecond) / 1000000))[2:],
+ )
+ if input_data.tzinfo is not None:
+ tzoff = input_data.tzinfo.utcoffset(input_data)
+ if tzoff is not None:
+ total_seconds = tzoff.seconds + (86400 * tzoff.days)
+ if total_seconds == 0:
+ _svalue += 'Z'
+ else:
+ if total_seconds < 0:
+ _svalue += '-'
+ total_seconds *= -1
+ else:
+ _svalue += '+'
+ hours = total_seconds // 3600
+ minutes = (total_seconds - (hours * 3600)) // 60
+ _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
+ return _svalue
+ @classmethod
+ def gds_parse_datetime(cls, input_data):
+ tz = None
+ if input_data[-1] == 'Z':
+ tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+ input_data = input_data[:-1]
+ else:
+ results = GeneratedsSuper.tzoff_pattern.search(input_data)
+ if results is not None:
+ tzoff_parts = results.group(2).split(':')
+ tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+ if results.group(1) == '-':
+ tzoff *= -1
+ tz = GeneratedsSuper._FixedOffsetTZ(
+ tzoff, results.group(0))
+ input_data = input_data[:-6]
+ time_parts = input_data.split('.')
+ if len(time_parts) > 1:
+ micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
+ input_data = '%s.%s' % (
+ time_parts[0], "{}".format(micro_seconds).rjust(6, "0"), )
+ dt = datetime_.datetime.strptime(
+ input_data, '%Y-%m-%dT%H:%M:%S.%f')
+ else:
+ dt = datetime_.datetime.strptime(
+ input_data, '%Y-%m-%dT%H:%M:%S')
+ dt = dt.replace(tzinfo=tz)
+ return dt
+ def gds_validate_date(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_date(self, input_data, input_name=''):
+ _svalue = '%04d-%02d-%02d' % (
+ input_data.year,
+ input_data.month,
+ input_data.day,
+ )
+ try:
+ if input_data.tzinfo is not None:
+ tzoff = input_data.tzinfo.utcoffset(input_data)
+ if tzoff is not None:
+ total_seconds = tzoff.seconds + (86400 * tzoff.days)
+ if total_seconds == 0:
+ _svalue += 'Z'
+ else:
+ if total_seconds < 0:
+ _svalue += '-'
+ total_seconds *= -1
+ else:
+ _svalue += '+'
+ hours = total_seconds // 3600
+ minutes = (total_seconds - (hours * 3600)) // 60
+ _svalue += '{0:02d}:{1:02d}'.format(
+ hours, minutes)
+ except AttributeError:
+ pass
+ return _svalue
+ @classmethod
+ def gds_parse_date(cls, input_data):
+ tz = None
+ if input_data[-1] == 'Z':
+ tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+ input_data = input_data[:-1]
+ else:
+ results = GeneratedsSuper.tzoff_pattern.search(input_data)
+ if results is not None:
+ tzoff_parts = results.group(2).split(':')
+ tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+ if results.group(1) == '-':
+ tzoff *= -1
+ tz = GeneratedsSuper._FixedOffsetTZ(
+ tzoff, results.group(0))
+ input_data = input_data[:-6]
+ dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
+ dt = dt.replace(tzinfo=tz)
+ return dt.date()
+ def gds_validate_time(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_time(self, input_data, input_name=''):
+ if input_data.microsecond == 0:
+ _svalue = '%02d:%02d:%02d' % (
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ )
+ else:
+ _svalue = '%02d:%02d:%02d.%s' % (
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ ('%f' % (float(input_data.microsecond) / 1000000))[2:],
+ )
+ if input_data.tzinfo is not None:
+ tzoff = input_data.tzinfo.utcoffset(input_data)
+ if tzoff is not None:
+ total_seconds = tzoff.seconds + (86400 * tzoff.days)
+ if total_seconds == 0:
+ _svalue += 'Z'
+ else:
+ if total_seconds < 0:
+ _svalue += '-'
+ total_seconds *= -1
+ else:
+ _svalue += '+'
+ hours = total_seconds // 3600
+ minutes = (total_seconds - (hours * 3600)) // 60
+ _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
+ return _svalue
+ def gds_validate_simple_patterns(self, patterns, target):
+ # pat is a list of lists of strings/patterns.
+ # The target value must match at least one of the patterns
+ # in order for the test to succeed.
+ found1 = True
+ for patterns1 in patterns:
+ found2 = False
+ for patterns2 in patterns1:
+ mo = re_.search(patterns2, target)
+ if mo is not None and len(mo.group(0)) == len(target):
+ found2 = True
+ break
+ if not found2:
+ found1 = False
+ break
+ return found1
+ @classmethod
+ def gds_parse_time(cls, input_data):
+ tz = None
+ if input_data[-1] == 'Z':
+ tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+ input_data = input_data[:-1]
+ else:
+ results = GeneratedsSuper.tzoff_pattern.search(input_data)
+ if results is not None:
+ tzoff_parts = results.group(2).split(':')
+ tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+ if results.group(1) == '-':
+ tzoff *= -1
+ tz = GeneratedsSuper._FixedOffsetTZ(
+ tzoff, results.group(0))
+ input_data = input_data[:-6]
+ if len(input_data.split('.')) > 1:
+ dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
+ else:
+ dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
+ dt = dt.replace(tzinfo=tz)
+ return dt.time()
+ def gds_check_cardinality_(
+ self, value, input_name,
+ min_occurs=0, max_occurs=1, required=None):
+ if value is None:
+ length = 0
+ elif isinstance(value, list):
+ length = len(value)
+ else:
+ length = 1
+ if required is not None :
+ if required and length < 1:
+ self.gds_collector_.add_message(
+ "Required value {}{} is missing".format(
+ input_name, self.gds_get_node_lineno_()))
+ if length < min_occurs:
+ self.gds_collector_.add_message(
+ "Number of values for {}{} is below "
+ "the minimum allowed, "
+ "expected at least {}, found {}".format(
+ input_name, self.gds_get_node_lineno_(),
+ min_occurs, length))
+ elif length > max_occurs:
+ self.gds_collector_.add_message(
+ "Number of values for {}{} is above "
+ "the maximum allowed, "
+ "expected at most {}, found {}".format(
+ input_name, self.gds_get_node_lineno_(),
+ max_occurs, length))
+ def gds_validate_builtin_ST_(
+ self, validator, value, input_name,
+ min_occurs=None, max_occurs=None, required=None):
+ if value is not None:
+ try:
+ validator(value, input_name=input_name)
+ except GDSParseError as parse_error:
+ self.gds_collector_.add_message(str(parse_error))
+ def gds_validate_defined_ST_(
+ self, validator, value, input_name,
+ min_occurs=None, max_occurs=None, required=None):
+ if value is not None:
+ try:
+ validator(value)
+ except GDSParseError as parse_error:
+ self.gds_collector_.add_message(str(parse_error))
+ def gds_str_lower(self, instring):
+ return instring.lower()
+ def get_path_(self, node):
+ path_list = []
+ self.get_path_list_(node, path_list)
+ path_list.reverse()
+ path = '/'.join(path_list)
+ return path
+ Tag_strip_pattern_ = re_.compile(r'\{.*\}')
+ def get_path_list_(self, node, path_list):
+ if node is None:
+ return
+ tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
+ if tag:
+ path_list.append(tag)
+ self.get_path_list_(node.getparent(), path_list)
+ def get_class_obj_(self, node, default_class=None):
+ class_obj1 = default_class
+ if 'xsi' in node.nsmap:
+ classname = node.get('{%s}type' % node.nsmap['xsi'])
+ if classname is not None:
+ names = classname.split(':')
+ if len(names) == 2:
+ classname = names[1]
+ class_obj2 = globals().get(classname)
+ if class_obj2 is not None:
+ class_obj1 = class_obj2
+ return class_obj1
+ def gds_build_any(self, node, type_name=None):
+ # provide default value in case option --disable-xml is used.
+ content = ""
+ content = etree_.tostring(node, encoding="unicode")
+ return content
+ @classmethod
+ def gds_reverse_node_mapping(cls, mapping):
+ return dict(((v, k) for k, v in mapping.items()))
+ @staticmethod
+ def gds_encode(instring):
+ if sys.version_info.major == 2:
+ if ExternalEncoding:
+ encoding = ExternalEncoding
+ else:
+ encoding = 'utf-8'
+ return instring.encode(encoding)
+ else:
+ return instring
+ @staticmethod
+ def convert_unicode(instring):
+ if isinstance(instring, str):
+ result = quote_xml(instring)
+ elif sys.version_info.major == 2 and isinstance(instring, unicode):
+ result = quote_xml(instring).encode('utf8')
+ else:
+ result = GeneratedsSuper.gds_encode(str(instring))
+ return result
+ def __eq__(self, other):
+ def excl_select_objs_(obj):
+ return (obj[0] != 'parent_object_' and
+ obj[0] != 'gds_collector_')
+ if type(self) != type(other):
+ return False
+ return all(x == y for x, y in zip_longest(
+ filter(excl_select_objs_, self.__dict__.items()),
+ filter(excl_select_objs_, other.__dict__.items())))
+ def __ne__(self, other):
+ return not self.__eq__(other)
+ # Django ETL transform hooks.
+ def gds_djo_etl_transform(self):
+ pass
+ def gds_djo_etl_transform_db_obj(self, dbobj):
+ pass
+ # SQLAlchemy ETL transform hooks.
+ def gds_sqa_etl_transform(self):
+ return 0, None
+ def gds_sqa_etl_transform_db_obj(self, dbobj):
+ pass
+ def gds_get_node_lineno_(self):
+ if (hasattr(self, "gds_elementtree_node_") and
+ self.gds_elementtree_node_ is not None):
+ return ' near line {}'.format(
+ self.gds_elementtree_node_.sourceline)
+ else:
+ return ""
+
+
+ def getSubclassFromModule_(module, class_):
+ '''Get the subclass of a class from a specific module.'''
+ name = class_.__name__ + 'Sub'
+ if hasattr(module, name):
+ return getattr(module, name)
+ else:
+ return None
+
+
+#
+# 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('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
+
+#
+# Globals
+#
+
+ExternalEncoding = ''
+# Set this to false in order to deactivate during export, the use of
+# name space prefixes captured from the input document.
+UseCapturedNS_ = True
+CapturedNsmap_ = {}
+Tag_pattern_ = re_.compile(r'({.*})?(.*)')
+String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
+Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')
+CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)
+
+# Change this to redirect the generated superclass module to use a
+# specific subclass module.
+CurrentSubclassModule_ = None
+
+#
+# Support/utility functions.
+#
+
+
+def showIndent(outfile, level, pretty_print=True):
+ if pretty_print:
+ for idx in range(level):
+ outfile.write(' ')
+
+
+def quote_xml(inStr):
+ "Escape markup chars, but do not modify CDATA sections."
+ if not inStr:
+ return ''
+ s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
+ s2 = ''
+ pos = 0
+ matchobjects = CDATA_pattern_.finditer(s1)
+ for mo in matchobjects:
+ s3 = s1[pos:mo.start()]
+ s2 += quote_xml_aux(s3)
+ s2 += s1[mo.start():mo.end()]
+ pos = mo.end()
+ s3 = s1[pos:]
+ s2 += quote_xml_aux(s3)
+ return s2
+
+
+def quote_xml_aux(inStr):
+ s1 = inStr.replace('&', '&amp;')
+ s1 = s1.replace('<', '&lt;')
+ s1 = s1.replace('>', '&gt;')
+ return s1
+
+
+def quote_attrib(inStr):
+ s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
+ s1 = s1.replace('&', '&amp;')
+ s1 = s1.replace('<', '&lt;')
+ s1 = s1.replace('>', '&gt;')
+ if '"' in s1:
+ if "'" in s1:
+ s1 = '"%s"' % s1.replace('"', "&quot;")
+ 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
+
+
+def get_all_text_(node):
+ if node.text is not None:
+ text = node.text
+ else:
+ text = ''
+ for child in node:
+ if child.tail is not None:
+ text += child.tail
+ return text
+
+
+def find_attr_value_(attr_name, node):
+ attrs = node.attrib
+ attr_parts = attr_name.split(':')
+ value = None
+ if len(attr_parts) == 1:
+ value = attrs.get(attr_name)
+ elif len(attr_parts) == 2:
+ prefix, name = attr_parts
+ if prefix == 'xml':
+ namespace = 'http://www.w3.org/XML/1998/namespace'
+ else:
+ namespace = node.nsmap.get(prefix)
+ if namespace is not None:
+ value = attrs.get('{%s}%s' % (namespace, name, ))
+ return value
+
+
+def encode_str_2_3(instr):
+ return instr
+
+
+class GDSParseError(Exception):
+ pass
+
+
+def raise_parse_error(node, msg):
+ if node is not None:
+ msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
+ raise GDSParseError(msg)
+
+
+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
+ TypeBase64 = 8
+ 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
+ def export(self, outfile, level, name, namespace,
+ pretty_print=True):
+ if self.category == MixedContainer.CategoryText:
+ # Prevent exporting empty content as empty lines.
+ if self.value.strip():
+ outfile.write(self.value)
+ elif self.category == MixedContainer.CategorySimple:
+ self.exportSimple(outfile, level, name)
+ else: # category == MixedContainer.CategoryComplex
+ self.value.export(
+ outfile, level, namespace, name_=name,
+ pretty_print=pretty_print)
+ def exportSimple(self, outfile, level, name):
+ if self.content_type == MixedContainer.TypeString:
+ outfile.write('<%s>%s</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeInteger or \
+ self.content_type == MixedContainer.TypeBoolean:
+ outfile.write('<%s>%d</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeFloat or \
+ self.content_type == MixedContainer.TypeDecimal:
+ outfile.write('<%s>%f</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeDouble:
+ outfile.write('<%s>%g</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeBase64:
+ outfile.write('<%s>%s</%s>' % (
+ self.name,
+ base64.b64encode(self.value),
+ self.name))
+ def to_etree(self, element, mapping_=None, nsmap_=None):
+ if self.category == MixedContainer.CategoryText:
+ # Prevent exporting empty content as empty lines.
+ if self.value.strip():
+ if len(element) > 0:
+ if element[-1].tail is None:
+ element[-1].tail = self.value
+ else:
+ element[-1].tail += self.value
+ else:
+ if element.text is None:
+ element.text = self.value
+ else:
+ element.text += self.value
+ elif self.category == MixedContainer.CategorySimple:
+ subelement = etree_.SubElement(
+ element, '%s' % self.name)
+ subelement.text = self.to_etree_simple()
+ else: # category == MixedContainer.CategoryComplex
+ self.value.to_etree(element)
+ def to_etree_simple(self, mapping_=None, nsmap_=None):
+ if self.content_type == MixedContainer.TypeString:
+ text = self.value
+ elif (self.content_type == MixedContainer.TypeInteger or
+ self.content_type == MixedContainer.TypeBoolean):
+ text = '%d' % self.value
+ elif (self.content_type == MixedContainer.TypeFloat or
+ self.content_type == MixedContainer.TypeDecimal):
+ text = '%f' % self.value
+ elif self.content_type == MixedContainer.TypeDouble:
+ text = '%g' % self.value
+ elif self.content_type == MixedContainer.TypeBase64:
+ text = '%s' % base64.b64encode(self.value)
+ return text
+ def exportLiteral(self, outfile, level, name):
+ if self.category == MixedContainer.CategoryText:
+ showIndent(outfile, level)
+ outfile.write(
+ 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
+ self.category, self.content_type,
+ self.name, self.value))
+ elif self.category == MixedContainer.CategorySimple:
+ showIndent(outfile, level)
+ outfile.write(
+ 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
+ self.category, self.content_type,
+ self.name, self.value))
+ else: # category == MixedContainer.CategoryComplex
+ showIndent(outfile, level)
+ outfile.write(
+ 'model_.MixedContainer(%d, %d, "%s",\n' % (
+ self.category, self.content_type, self.name,))
+ self.value.exportLiteral(outfile, level + 1)
+ showIndent(outfile, level)
+ outfile.write(')\n')
+
+
+class MemberSpec_(object):
+ def __init__(self, name='', data_type='', container=0,
+ optional=0, child_attrs=None, choice=None):
+ self.name = name
+ self.data_type = data_type
+ self.container = container
+ self.child_attrs = child_attrs
+ self.choice = choice
+ self.optional = optional
+ 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_chain(self): return self.data_type
+ def get_data_type(self):
+ if isinstance(self.data_type, list):
+ if len(self.data_type) > 0:
+ return self.data_type[-1]
+ else:
+ return 'xs:string'
+ else:
+ return self.data_type
+ def set_container(self, container): self.container = container
+ def get_container(self): return self.container
+ def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs
+ def get_child_attrs(self): return self.child_attrs
+ def set_choice(self, choice): self.choice = choice
+ def get_choice(self): return self.choice
+ def set_optional(self, optional): self.optional = optional
+ def get_optional(self): return self.optional
+
+
+def _cast(typ, value):
+ if typ is None or value is None:
+ return value
+ return typ(value)
+
+#
+# Data representation classes.
+#
+
+
+class DoxAccessor(str, Enum):
+ RETAIN='retain'
+ COPY='copy'
+ ASSIGN='assign'
+ WEAK='weak'
+ STRONG='strong'
+ UNRETAINED='unretained'
+
+
+class DoxAlign(str, Enum):
+ LEFT='left'
+ RIGHT='right'
+ CENTER='center'
+
+
+class DoxBool(str, Enum):
+ YES='yes'
+ NO='no'
+
+
+class DoxCompoundKind(str, Enum):
+ CLASS='class'
+ STRUCT='struct'
+ UNION='union'
+ INTERFACE='interface'
+ PROTOCOL='protocol'
+ CATEGORY='category'
+ EXCEPTION='exception'
+ SERVICE='service'
+ SINGLETON='singleton'
+ MODULE='module'
+ TYPE='type'
+ FILE='file'
+ NAMESPACE='namespace'
+ GROUP='group'
+ PAGE='page'
+ EXAMPLE='example'
+ DIR='dir'
+
+
+class DoxGraphRelation(str, Enum):
+ INCLUDE='include'
+ USAGE='usage'
+ TEMPLATEINSTANCE='template-instance'
+ PUBLICINHERITANCE='public-inheritance'
+ PROTECTEDINHERITANCE='protected-inheritance'
+ PRIVATEINHERITANCE='private-inheritance'
+ TYPECONSTRAINT='type-constraint'
+
+
+class DoxHighlightClass(str, Enum):
+ COMMENT='comment'
+ NORMAL='normal'
+ PREPROCESSOR='preprocessor'
+ KEYWORD='keyword'
+ KEYWORDTYPE='keywordtype'
+ KEYWORDFLOW='keywordflow'
+ STRINGLITERAL='stringliteral'
+ CHARLITERAL='charliteral'
+ VHDLKEYWORD='vhdlkeyword'
+ VHDLLOGIC='vhdllogic'
+ VHDLCHAR='vhdlchar'
+ VHDLDIGIT='vhdldigit'
+
+
+class DoxImageKind(str, Enum):
+ HTML='html'
+ LATEX='latex'
+ DOCBOOK='docbook'
+ RTF='rtf'
+
+
+class DoxLanguage(str, Enum):
+ UNKNOWN='Unknown'
+ IDL='IDL'
+ JAVA='Java'
+ C='C#'
+ D='D'
+ PHP='PHP'
+ OBJECTIVEC='Objective-C'
+ C_1='C++'
+ JAVA_SCRIPT='JavaScript'
+ PYTHON='Python'
+ FORTRAN='Fortran'
+ VHDL='VHDL'
+ XML='XML'
+ SQL='SQL'
+ MARKDOWN='Markdown'
+
+
+class DoxMemberKind(str, Enum):
+ DEFINE='define'
+ PROPERTY='property'
+ EVENT='event'
+ VARIABLE='variable'
+ TYPEDEF='typedef'
+ ENUM='enum'
+ FUNCTION='function'
+ SIGNAL='signal'
+ PROTOTYPE='prototype'
+ FRIEND='friend'
+ DCOP='dcop'
+ SLOT='slot'
+ INTERFACE='interface'
+ SERVICE='service'
+
+
+class DoxParamDir(str, Enum):
+ IN='in'
+ OUT='out'
+ INOUT='inout'
+
+
+class DoxParamListKind(str, Enum):
+ PARAM='param'
+ RETVAL='retval'
+ EXCEPTION='exception'
+ TEMPLATEPARAM='templateparam'
+
+
+class DoxProtectionKind(str, Enum):
+ PUBLIC='public'
+ PROTECTED='protected'
+ PRIVATE='private'
+ PACKAGE='package'
+
+
+class DoxRefKind(str, Enum):
+ COMPOUND='compound'
+ MEMBER='member'
+
+
+class DoxRefQualifierKind(str, Enum):
+ LVALUE='lvalue'
+ RVALUE='rvalue'
+
+
+class DoxSectionKind(str, Enum):
+ USERDEFINED='user-defined'
+ PUBLICTYPE='public-type'
+ PUBLICFUNC='public-func'
+ PUBLICATTRIB='public-attrib'
+ PUBLICSLOT='public-slot'
+ SIGNAL='signal'
+ DCOPFUNC='dcop-func'
+ PROPERTY='property'
+ EVENT='event'
+ PUBLICSTATICFUNC='public-static-func'
+ PUBLICSTATICATTRIB='public-static-attrib'
+ PROTECTEDTYPE='protected-type'
+ PROTECTEDFUNC='protected-func'
+ PROTECTEDATTRIB='protected-attrib'
+ PROTECTEDSLOT='protected-slot'
+ PROTECTEDSTATICFUNC='protected-static-func'
+ PROTECTEDSTATICATTRIB='protected-static-attrib'
+ PACKAGETYPE='package-type'
+ PACKAGEFUNC='package-func'
+ PACKAGEATTRIB='package-attrib'
+ PACKAGESTATICFUNC='package-static-func'
+ PACKAGESTATICATTRIB='package-static-attrib'
+ PRIVATETYPE='private-type'
+ PRIVATEFUNC='private-func'
+ PRIVATEATTRIB='private-attrib'
+ PRIVATESLOT='private-slot'
+ PRIVATESTATICFUNC='private-static-func'
+ PRIVATESTATICATTRIB='private-static-attrib'
+ FRIEND='friend'
+ RELATED='related'
+ DEFINE='define'
+ PROTOTYPE='prototype'
+ TYPEDEF='typedef'
+ ENUM='enum'
+ FUNC='func'
+ VAR='var'
+
+
+class DoxSimpleSectKind(str, Enum):
+ SEE='see'
+ RETURN='return'
+ AUTHOR='author'
+ AUTHORS='authors'
+ VERSION='version'
+ SINCE='since'
+ DATE='date'
+ NOTE='note'
+ WARNING='warning'
+ PRE='pre'
+ POST='post'
+ COPYRIGHT='copyright'
+ INVARIANT='invariant'
+ REMARK='remark'
+ ATTENTION='attention'
+ PAR='par'
+ RCS='rcs'
+
+
+class DoxVerticalAlign(str, Enum):
+ BOTTOM='bottom'
+ TOP='top'
+ MIDDLE='middle'
+
+
+class DoxVirtualKind(str, Enum):
+ NONVIRTUAL='non-virtual'
+ VIRTUAL='virtual'
+ PUREVIRTUAL='pure-virtual'
+
+
+class DoxygenType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, version=None, lang=None, compounddef=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.version = _cast(None, version)
+ self.version_nsprefix_ = None
+ self.lang = _cast(None, lang)
+ self.lang_nsprefix_ = None
+ if compounddef is None:
+ self.compounddef = []
+ else:
+ self.compounddef = compounddef
+ self.compounddef_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, DoxygenType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if DoxygenType.subclass:
+ return DoxygenType.subclass(*args_, **kwargs_)
+ else:
+ return DoxygenType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_compounddef(self):
+ return self.compounddef
+ def set_compounddef(self, compounddef):
+ self.compounddef = compounddef
+ def add_compounddef(self, value):
+ self.compounddef.append(value)
+ def insert_compounddef_at(self, index, value):
+ self.compounddef.insert(index, value)
+ def replace_compounddef_at(self, index, value):
+ self.compounddef[index] = value
+ def get_version(self):
+ return self.version
+ def set_version(self, version):
+ self.version = version
+ def get_lang(self):
+ return self.lang
+ def set_lang(self, lang):
+ self.lang = lang
+ def validate_DoxVersionNumber(self, value):
+ # Validate type DoxVersionNumber, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ if not self.gds_validate_simple_patterns(
+ self.validate_DoxVersionNumber_patterns_, value):
+ self.gds_collector_.add_message('Value "%s" does not match xsd pattern restrictions: %s' % (encode_str_2_3(value), self.validate_DoxVersionNumber_patterns_, ))
+ validate_DoxVersionNumber_patterns_ = [['^(\\d+\\.\\d+.*)$']]
+ def hasContent_(self):
+ if (
+ self.compounddef
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('DoxygenType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'DoxygenType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DoxygenType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DoxygenType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DoxygenType'):
+ if self.version is not None and 'version' not in already_processed:
+ already_processed.add('version')
+ outfile.write(' version=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.version), input_name='version')), ))
+ if self.lang is not None and 'lang' not in already_processed:
+ already_processed.add('lang')
+ outfile.write(' xml:lang=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.lang), input_name='lang')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for compounddef_ in self.compounddef:
+ namespaceprefix_ = self.compounddef_nsprefix_ + ':' if (UseCapturedNS_ and self.compounddef_nsprefix_) else ''
+ compounddef_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compounddef', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('version', node)
+ if value is not None and 'version' not in already_processed:
+ already_processed.add('version')
+ self.version = value
+ self.validate_DoxVersionNumber(self.version) # validate type DoxVersionNumber
+ value = find_attr_value_('lang', node)
+ if value is not None and 'lang' not in already_processed:
+ already_processed.add('lang')
+ self.lang = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'compounddef':
+ obj_ = compounddefType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.compounddef.append(obj_)
+ obj_.original_tagname_ = 'compounddef'
+# end class DoxygenType
+
+
+class compounddefType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, kind=None, language=None, prot=None, final=None, inline=None, sealed=None, abstract=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, tableofcontents=None, briefdescription=None, detaileddescription=None, inheritancegraph=None, collaborationgraph=None, programlisting=None, location=None, listofallmembers=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.kind = _cast(None, kind)
+ self.kind_nsprefix_ = None
+ self.language = _cast(None, language)
+ self.language_nsprefix_ = None
+ self.prot = _cast(None, prot)
+ self.prot_nsprefix_ = None
+ self.final = _cast(None, final)
+ self.final_nsprefix_ = None
+ self.inline = _cast(None, inline)
+ self.inline_nsprefix_ = None
+ self.sealed = _cast(None, sealed)
+ self.sealed_nsprefix_ = None
+ self.abstract = _cast(None, abstract)
+ self.abstract_nsprefix_ = None
+ self.compoundname = compoundname
+ self.compoundname_nsprefix_ = None
+ self.title = title
+ self.title_nsprefix_ = None
+ if basecompoundref is None:
+ self.basecompoundref = []
+ else:
+ self.basecompoundref = basecompoundref
+ self.basecompoundref_nsprefix_ = None
+ if derivedcompoundref is None:
+ self.derivedcompoundref = []
+ else:
+ self.derivedcompoundref = derivedcompoundref
+ self.derivedcompoundref_nsprefix_ = None
+ if includes is None:
+ self.includes = []
+ else:
+ self.includes = includes
+ self.includes_nsprefix_ = None
+ if includedby is None:
+ self.includedby = []
+ else:
+ self.includedby = includedby
+ self.includedby_nsprefix_ = None
+ self.incdepgraph = incdepgraph
+ self.incdepgraph_nsprefix_ = None
+ self.invincdepgraph = invincdepgraph
+ self.invincdepgraph_nsprefix_ = None
+ if innerdir is None:
+ self.innerdir = []
+ else:
+ self.innerdir = innerdir
+ self.innerdir_nsprefix_ = None
+ if innerfile is None:
+ self.innerfile = []
+ else:
+ self.innerfile = innerfile
+ self.innerfile_nsprefix_ = None
+ if innerclass is None:
+ self.innerclass = []
+ else:
+ self.innerclass = innerclass
+ self.innerclass_nsprefix_ = None
+ if innernamespace is None:
+ self.innernamespace = []
+ else:
+ self.innernamespace = innernamespace
+ self.innernamespace_nsprefix_ = None
+ if innerpage is None:
+ self.innerpage = []
+ else:
+ self.innerpage = innerpage
+ self.innerpage_nsprefix_ = None
+ if innergroup is None:
+ self.innergroup = []
+ else:
+ self.innergroup = innergroup
+ self.innergroup_nsprefix_ = None
+ self.templateparamlist = templateparamlist
+ self.templateparamlist_nsprefix_ = None
+ if sectiondef is None:
+ self.sectiondef = []
+ else:
+ self.sectiondef = sectiondef
+ self.sectiondef_nsprefix_ = None
+ self.tableofcontents = tableofcontents
+ self.tableofcontents_nsprefix_ = None
+ self.briefdescription = briefdescription
+ self.briefdescription_nsprefix_ = None
+ self.detaileddescription = detaileddescription
+ self.detaileddescription_nsprefix_ = None
+ self.inheritancegraph = inheritancegraph
+ self.inheritancegraph_nsprefix_ = None
+ self.collaborationgraph = collaborationgraph
+ self.collaborationgraph_nsprefix_ = None
+ self.programlisting = programlisting
+ self.programlisting_nsprefix_ = None
+ self.location = location
+ self.location_nsprefix_ = None
+ self.listofallmembers = listofallmembers
+ self.listofallmembers_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, compounddefType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if compounddefType.subclass:
+ return compounddefType.subclass(*args_, **kwargs_)
+ else:
+ return compounddefType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.basecompoundref.insert(index, value)
+ def replace_basecompoundref_at(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_at(self, index, value):
+ self.derivedcompoundref.insert(index, value)
+ def replace_derivedcompoundref_at(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_at(self, index, value):
+ self.includes.insert(index, value)
+ def replace_includes_at(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_at(self, index, value):
+ self.includedby.insert(index, value)
+ def replace_includedby_at(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_at(self, index, value):
+ self.innerdir.insert(index, value)
+ def replace_innerdir_at(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_at(self, index, value):
+ self.innerfile.insert(index, value)
+ def replace_innerfile_at(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_at(self, index, value):
+ self.innerclass.insert(index, value)
+ def replace_innerclass_at(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_at(self, index, value):
+ self.innernamespace.insert(index, value)
+ def replace_innernamespace_at(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_at(self, index, value):
+ self.innerpage.insert(index, value)
+ def replace_innerpage_at(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_at(self, index, value):
+ self.innergroup.insert(index, value)
+ def replace_innergroup_at(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_at(self, index, value):
+ self.sectiondef.insert(index, value)
+ def replace_sectiondef_at(self, index, value):
+ self.sectiondef[index] = value
+ def get_tableofcontents(self):
+ return self.tableofcontents
+ def set_tableofcontents(self, tableofcontents):
+ self.tableofcontents = tableofcontents
+ 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_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_kind(self):
+ return self.kind
+ def set_kind(self, kind):
+ self.kind = kind
+ def get_language(self):
+ return self.language
+ def set_language(self, language):
+ self.language = language
+ def get_prot(self):
+ return self.prot
+ def set_prot(self, prot):
+ self.prot = prot
+ def get_final(self):
+ return self.final
+ def set_final(self, final):
+ self.final = final
+ def get_inline(self):
+ return self.inline
+ def set_inline(self, inline):
+ self.inline = inline
+ def get_sealed(self):
+ return self.sealed
+ def set_sealed(self, sealed):
+ self.sealed = sealed
+ def get_abstract(self):
+ return self.abstract
+ def set_abstract(self, abstract):
+ self.abstract = abstract
+ def validate_DoxCompoundKind(self, value):
+ # Validate type DoxCompoundKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['class', 'struct', 'union', 'interface', 'protocol', 'category', 'exception', 'service', 'singleton', 'module', 'type', 'file', 'namespace', 'group', 'page', 'example', 'dir']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxCompoundKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxLanguage(self, value):
+ # Validate type DoxLanguage, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['Unknown', 'IDL', 'Java', 'C#', 'D', 'PHP', 'Objective-C', 'C++', 'JavaScript', 'Python', 'Fortran', 'VHDL', 'XML', 'SQL', 'Markdown']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxLanguage' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxProtectionKind(self, value):
+ # Validate type DoxProtectionKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['public', 'protected', 'private', 'package']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxProtectionKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxBool(self, value):
+ # Validate type DoxBool, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['yes', 'no']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxBool' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.compoundname is not None or
+ self.title is not None or
+ self.basecompoundref or
+ self.derivedcompoundref or
+ self.includes or
+ self.includedby or
+ self.incdepgraph is not None or
+ self.invincdepgraph is not None or
+ self.innerdir or
+ self.innerfile or
+ self.innerclass or
+ self.innernamespace or
+ self.innerpage or
+ self.innergroup or
+ self.templateparamlist is not None or
+ self.sectiondef or
+ self.tableofcontents 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 export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='compounddefType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('compounddefType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'compounddefType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='compounddefType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='compounddefType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='compounddefType'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ if self.kind is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ outfile.write(' kind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kind), input_name='kind')), ))
+ if self.language is not None and 'language' not in already_processed:
+ already_processed.add('language')
+ outfile.write(' language=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.language), input_name='language')), ))
+ if self.prot is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ outfile.write(' prot=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.prot), input_name='prot')), ))
+ if self.final is not None and 'final' not in already_processed:
+ already_processed.add('final')
+ outfile.write(' final=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.final), input_name='final')), ))
+ if self.inline is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ outfile.write(' inline=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inline), input_name='inline')), ))
+ if self.sealed is not None and 'sealed' not in already_processed:
+ already_processed.add('sealed')
+ outfile.write(' sealed=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.sealed), input_name='sealed')), ))
+ if self.abstract is not None and 'abstract' not in already_processed:
+ already_processed.add('abstract')
+ outfile.write(' abstract=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.abstract), input_name='abstract')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='compounddefType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.compoundname is not None:
+ namespaceprefix_ = self.compoundname_nsprefix_ + ':' if (UseCapturedNS_ and self.compoundname_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%scompoundname>%s</%scompoundname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.compoundname), input_name='compoundname')), namespaceprefix_ , eol_))
+ if self.title is not None:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%stitle>%s</%stitle>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.title), input_name='title')), namespaceprefix_ , eol_))
+ for basecompoundref_ in self.basecompoundref:
+ namespaceprefix_ = self.basecompoundref_nsprefix_ + ':' if (UseCapturedNS_ and self.basecompoundref_nsprefix_) else ''
+ basecompoundref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='basecompoundref', pretty_print=pretty_print)
+ for derivedcompoundref_ in self.derivedcompoundref:
+ namespaceprefix_ = self.derivedcompoundref_nsprefix_ + ':' if (UseCapturedNS_ and self.derivedcompoundref_nsprefix_) else ''
+ derivedcompoundref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='derivedcompoundref', pretty_print=pretty_print)
+ for includes_ in self.includes:
+ namespaceprefix_ = self.includes_nsprefix_ + ':' if (UseCapturedNS_ and self.includes_nsprefix_) else ''
+ includes_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='includes', pretty_print=pretty_print)
+ for includedby_ in self.includedby:
+ namespaceprefix_ = self.includedby_nsprefix_ + ':' if (UseCapturedNS_ and self.includedby_nsprefix_) else ''
+ includedby_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='includedby', pretty_print=pretty_print)
+ if self.incdepgraph is not None:
+ namespaceprefix_ = self.incdepgraph_nsprefix_ + ':' if (UseCapturedNS_ and self.incdepgraph_nsprefix_) else ''
+ self.incdepgraph.export(outfile, level, namespaceprefix_, namespacedef_='', name_='incdepgraph', pretty_print=pretty_print)
+ if self.invincdepgraph is not None:
+ namespaceprefix_ = self.invincdepgraph_nsprefix_ + ':' if (UseCapturedNS_ and self.invincdepgraph_nsprefix_) else ''
+ self.invincdepgraph.export(outfile, level, namespaceprefix_, namespacedef_='', name_='invincdepgraph', pretty_print=pretty_print)
+ for innerdir_ in self.innerdir:
+ namespaceprefix_ = self.innerdir_nsprefix_ + ':' if (UseCapturedNS_ and self.innerdir_nsprefix_) else ''
+ innerdir_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='innerdir', pretty_print=pretty_print)
+ for innerfile_ in self.innerfile:
+ namespaceprefix_ = self.innerfile_nsprefix_ + ':' if (UseCapturedNS_ and self.innerfile_nsprefix_) else ''
+ innerfile_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='innerfile', pretty_print=pretty_print)
+ for innerclass_ in self.innerclass:
+ namespaceprefix_ = self.innerclass_nsprefix_ + ':' if (UseCapturedNS_ and self.innerclass_nsprefix_) else ''
+ innerclass_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='innerclass', pretty_print=pretty_print)
+ for innernamespace_ in self.innernamespace:
+ namespaceprefix_ = self.innernamespace_nsprefix_ + ':' if (UseCapturedNS_ and self.innernamespace_nsprefix_) else ''
+ innernamespace_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='innernamespace', pretty_print=pretty_print)
+ for innerpage_ in self.innerpage:
+ namespaceprefix_ = self.innerpage_nsprefix_ + ':' if (UseCapturedNS_ and self.innerpage_nsprefix_) else ''
+ innerpage_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='innerpage', pretty_print=pretty_print)
+ for innergroup_ in self.innergroup:
+ namespaceprefix_ = self.innergroup_nsprefix_ + ':' if (UseCapturedNS_ and self.innergroup_nsprefix_) else ''
+ innergroup_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='innergroup', pretty_print=pretty_print)
+ if self.templateparamlist is not None:
+ namespaceprefix_ = self.templateparamlist_nsprefix_ + ':' if (UseCapturedNS_ and self.templateparamlist_nsprefix_) else ''
+ self.templateparamlist.export(outfile, level, namespaceprefix_, namespacedef_='', name_='templateparamlist', pretty_print=pretty_print)
+ for sectiondef_ in self.sectiondef:
+ namespaceprefix_ = self.sectiondef_nsprefix_ + ':' if (UseCapturedNS_ and self.sectiondef_nsprefix_) else ''
+ sectiondef_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sectiondef', pretty_print=pretty_print)
+ if self.tableofcontents is not None:
+ namespaceprefix_ = self.tableofcontents_nsprefix_ + ':' if (UseCapturedNS_ and self.tableofcontents_nsprefix_) else ''
+ self.tableofcontents.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tableofcontents', pretty_print=pretty_print)
+ if self.briefdescription is not None:
+ namespaceprefix_ = self.briefdescription_nsprefix_ + ':' if (UseCapturedNS_ and self.briefdescription_nsprefix_) else ''
+ self.briefdescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='briefdescription', pretty_print=pretty_print)
+ if self.detaileddescription is not None:
+ namespaceprefix_ = self.detaileddescription_nsprefix_ + ':' if (UseCapturedNS_ and self.detaileddescription_nsprefix_) else ''
+ self.detaileddescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='detaileddescription', pretty_print=pretty_print)
+ if self.inheritancegraph is not None:
+ namespaceprefix_ = self.inheritancegraph_nsprefix_ + ':' if (UseCapturedNS_ and self.inheritancegraph_nsprefix_) else ''
+ self.inheritancegraph.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inheritancegraph', pretty_print=pretty_print)
+ if self.collaborationgraph is not None:
+ namespaceprefix_ = self.collaborationgraph_nsprefix_ + ':' if (UseCapturedNS_ and self.collaborationgraph_nsprefix_) else ''
+ self.collaborationgraph.export(outfile, level, namespaceprefix_, namespacedef_='', name_='collaborationgraph', pretty_print=pretty_print)
+ if self.programlisting is not None:
+ namespaceprefix_ = self.programlisting_nsprefix_ + ':' if (UseCapturedNS_ and self.programlisting_nsprefix_) else ''
+ self.programlisting.export(outfile, level, namespaceprefix_, namespacedef_='', name_='programlisting', pretty_print=pretty_print)
+ if self.location is not None:
+ namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
+ self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
+ if self.listofallmembers is not None:
+ namespaceprefix_ = self.listofallmembers_nsprefix_ + ':' if (UseCapturedNS_ and self.listofallmembers_nsprefix_) else ''
+ self.listofallmembers.export(outfile, level, namespaceprefix_, namespacedef_='', name_='listofallmembers', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ value = find_attr_value_('kind', node)
+ if value is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ self.kind = value
+ self.validate_DoxCompoundKind(self.kind) # validate type DoxCompoundKind
+ value = find_attr_value_('language', node)
+ if value is not None and 'language' not in already_processed:
+ already_processed.add('language')
+ self.language = value
+ self.validate_DoxLanguage(self.language) # validate type DoxLanguage
+ value = find_attr_value_('prot', node)
+ if value is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ self.prot = value
+ self.validate_DoxProtectionKind(self.prot) # validate type DoxProtectionKind
+ value = find_attr_value_('final', node)
+ if value is not None and 'final' not in already_processed:
+ already_processed.add('final')
+ self.final = value
+ self.validate_DoxBool(self.final) # validate type DoxBool
+ value = find_attr_value_('inline', node)
+ if value is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ self.inline = value
+ self.validate_DoxBool(self.inline) # validate type DoxBool
+ value = find_attr_value_('sealed', node)
+ if value is not None and 'sealed' not in already_processed:
+ already_processed.add('sealed')
+ self.sealed = value
+ self.validate_DoxBool(self.sealed) # validate type DoxBool
+ value = find_attr_value_('abstract', node)
+ if value is not None and 'abstract' not in already_processed:
+ already_processed.add('abstract')
+ self.abstract = value
+ self.validate_DoxBool(self.abstract) # validate type DoxBool
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'compoundname':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'compoundname')
+ value_ = self.gds_validate_string(value_, node, 'compoundname')
+ self.compoundname = value_
+ self.compoundname_nsprefix_ = child_.prefix
+ elif nodeName_ == 'title':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'title')
+ value_ = self.gds_validate_string(value_, node, 'title')
+ self.title = value_
+ self.title_nsprefix_ = child_.prefix
+ elif nodeName_ == 'basecompoundref':
+ obj_ = compoundRefType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.basecompoundref.append(obj_)
+ obj_.original_tagname_ = 'basecompoundref'
+ elif nodeName_ == 'derivedcompoundref':
+ obj_ = compoundRefType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.derivedcompoundref.append(obj_)
+ obj_.original_tagname_ = 'derivedcompoundref'
+ elif nodeName_ == 'includes':
+ obj_ = incType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.includes.append(obj_)
+ obj_.original_tagname_ = 'includes'
+ elif nodeName_ == 'includedby':
+ obj_ = incType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.includedby.append(obj_)
+ obj_.original_tagname_ = 'includedby'
+ elif nodeName_ == 'incdepgraph':
+ obj_ = graphType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.incdepgraph = obj_
+ obj_.original_tagname_ = 'incdepgraph'
+ elif nodeName_ == 'invincdepgraph':
+ obj_ = graphType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.invincdepgraph = obj_
+ obj_.original_tagname_ = 'invincdepgraph'
+ elif nodeName_ == 'innerdir':
+ obj_ = refType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.innerdir.append(obj_)
+ obj_.original_tagname_ = 'innerdir'
+ elif nodeName_ == 'innerfile':
+ obj_ = refType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.innerfile.append(obj_)
+ obj_.original_tagname_ = 'innerfile'
+ elif nodeName_ == 'innerclass':
+ obj_ = refType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.innerclass.append(obj_)
+ obj_.original_tagname_ = 'innerclass'
+ elif nodeName_ == 'innernamespace':
+ obj_ = refType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.innernamespace.append(obj_)
+ obj_.original_tagname_ = 'innernamespace'
+ elif nodeName_ == 'innerpage':
+ obj_ = refType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.innerpage.append(obj_)
+ obj_.original_tagname_ = 'innerpage'
+ elif nodeName_ == 'innergroup':
+ obj_ = refType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.innergroup.append(obj_)
+ obj_.original_tagname_ = 'innergroup'
+ elif nodeName_ == 'templateparamlist':
+ obj_ = templateparamlistType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.templateparamlist = obj_
+ obj_.original_tagname_ = 'templateparamlist'
+ elif nodeName_ == 'sectiondef':
+ obj_ = sectiondefType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.sectiondef.append(obj_)
+ obj_.original_tagname_ = 'sectiondef'
+ elif nodeName_ == 'tableofcontents':
+ obj_ = tableofcontentsType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.tableofcontents = obj_
+ obj_.original_tagname_ = 'tableofcontents'
+ elif nodeName_ == 'briefdescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.briefdescription = obj_
+ obj_.original_tagname_ = 'briefdescription'
+ elif nodeName_ == 'detaileddescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.detaileddescription = obj_
+ obj_.original_tagname_ = 'detaileddescription'
+ elif nodeName_ == 'inheritancegraph':
+ obj_ = graphType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.inheritancegraph = obj_
+ obj_.original_tagname_ = 'inheritancegraph'
+ elif nodeName_ == 'collaborationgraph':
+ obj_ = graphType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.collaborationgraph = obj_
+ obj_.original_tagname_ = 'collaborationgraph'
+ elif nodeName_ == 'programlisting':
+ obj_ = listingType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.programlisting = obj_
+ obj_.original_tagname_ = 'programlisting'
+ elif nodeName_ == 'location':
+ obj_ = locationType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.location = obj_
+ obj_.original_tagname_ = 'location'
+ elif nodeName_ == 'listofallmembers':
+ obj_ = listofallmembersType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.listofallmembers = obj_
+ obj_.original_tagname_ = 'listofallmembers'
+# end class compounddefType
+
+
+class listofallmembersType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, member=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if member is None:
+ self.member = []
+ else:
+ self.member = member
+ self.member_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, listofallmembersType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if listofallmembersType.subclass:
+ return listofallmembersType.subclass(*args_, **kwargs_)
+ else:
+ return listofallmembersType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.member.insert(index, value)
+ def replace_member_at(self, index, value):
+ self.member[index] = value
+ def hasContent_(self):
+ if (
+ self.member
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='listofallmembersType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('listofallmembersType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'listofallmembersType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='listofallmembersType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='listofallmembersType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='listofallmembersType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='listofallmembersType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for member_ in self.member:
+ namespaceprefix_ = self.member_nsprefix_ + ':' if (UseCapturedNS_ and self.member_nsprefix_) else ''
+ member_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='member', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'member':
+ obj_ = memberRefType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.member.append(obj_)
+ obj_.original_tagname_ = 'member'
+# end class listofallmembersType
+
+
+class memberRefType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, prot=None, virt=None, ambiguityscope=None, scope=None, name=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.prot = _cast(None, prot)
+ self.prot_nsprefix_ = None
+ self.virt = _cast(None, virt)
+ self.virt_nsprefix_ = None
+ self.ambiguityscope = _cast(None, ambiguityscope)
+ self.ambiguityscope_nsprefix_ = None
+ self.scope = scope
+ self.scope_nsprefix_ = None
+ self.name = name
+ self.name_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, memberRefType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if memberRefType.subclass:
+ return memberRefType.subclass(*args_, **kwargs_)
+ else:
+ return memberRefType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_prot(self):
+ return self.prot
+ def set_prot(self, prot):
+ self.prot = prot
+ def get_virt(self):
+ return self.virt
+ def set_virt(self, virt):
+ self.virt = virt
+ def get_ambiguityscope(self):
+ return self.ambiguityscope
+ def set_ambiguityscope(self, ambiguityscope):
+ self.ambiguityscope = ambiguityscope
+ def validate_DoxProtectionKind(self, value):
+ # Validate type DoxProtectionKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['public', 'protected', 'private', 'package']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxProtectionKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxVirtualKind(self, value):
+ # Validate type DoxVirtualKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['non-virtual', 'virtual', 'pure-virtual']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxVirtualKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.scope is not None or
+ self.name is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='memberRefType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('memberRefType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'memberRefType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='memberRefType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='memberRefType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='memberRefType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.prot is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ outfile.write(' prot=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.prot), input_name='prot')), ))
+ if self.virt is not None and 'virt' not in already_processed:
+ already_processed.add('virt')
+ outfile.write(' virt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.virt), input_name='virt')), ))
+ if self.ambiguityscope is not None and 'ambiguityscope' not in already_processed:
+ already_processed.add('ambiguityscope')
+ outfile.write(' ambiguityscope=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.ambiguityscope), input_name='ambiguityscope')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='memberRefType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.scope is not None:
+ namespaceprefix_ = self.scope_nsprefix_ + ':' if (UseCapturedNS_ and self.scope_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sscope>%s</%sscope>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.scope), input_name='scope')), namespaceprefix_ , eol_))
+ if self.name is not None:
+ namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('prot', node)
+ if value is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ self.prot = value
+ self.validate_DoxProtectionKind(self.prot) # validate type DoxProtectionKind
+ value = find_attr_value_('virt', node)
+ if value is not None and 'virt' not in already_processed:
+ already_processed.add('virt')
+ self.virt = value
+ self.validate_DoxVirtualKind(self.virt) # validate type DoxVirtualKind
+ value = find_attr_value_('ambiguityscope', node)
+ if value is not None and 'ambiguityscope' not in already_processed:
+ already_processed.add('ambiguityscope')
+ self.ambiguityscope = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'scope':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'scope')
+ value_ = self.gds_validate_string(value_, node, 'scope')
+ self.scope = value_
+ self.scope_nsprefix_ = child_.prefix
+ elif nodeName_ == 'name':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'name')
+ value_ = self.gds_validate_string(value_, node, 'name')
+ self.name = value_
+ self.name_nsprefix_ = child_.prefix
+# end class memberRefType
+
+
+class scope(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, scope)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if scope.subclass:
+ return scope.subclass(*args_, **kwargs_)
+ else:
+ return scope(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='scope', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('scope')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'scope':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='scope')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='scope', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='scope'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='scope', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class scope
+
+
+class name(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, name)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if name.subclass:
+ return name.subclass(*args_, **kwargs_)
+ else:
+ return name(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='name', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('name')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'name':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='name')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='name', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='name'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='name', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class name
+
+
+class docHtmlOnlyType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, block=None, valueOf_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.block = _cast(None, block)
+ self.block_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docHtmlOnlyType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docHtmlOnlyType.subclass:
+ return docHtmlOnlyType.subclass(*args_, **kwargs_)
+ else:
+ return docHtmlOnlyType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_block(self):
+ return self.block
+ def set_block(self, block):
+ self.block = block
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_)
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docHtmlOnlyType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docHtmlOnlyType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docHtmlOnlyType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docHtmlOnlyType')
+ if self.hasContent_():
+ outfile.write('>')
+ outfile.write(self.convert_unicode(self.valueOf_))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docHtmlOnlyType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docHtmlOnlyType'):
+ if self.block is not None and 'block' not in already_processed:
+ already_processed.add('block')
+ outfile.write(' block=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.block), input_name='block')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docHtmlOnlyType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('block', node)
+ if value is not None and 'block' not in already_processed:
+ already_processed.add('block')
+ self.block = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class docHtmlOnlyType
+
+
+class compoundRefType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, prot=None, virt=None, valueOf_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.prot = _cast(None, prot)
+ self.prot_nsprefix_ = None
+ self.virt = _cast(None, virt)
+ self.virt_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, compoundRefType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if compoundRefType.subclass:
+ return compoundRefType.subclass(*args_, **kwargs_)
+ else:
+ return compoundRefType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_prot(self):
+ return self.prot
+ def set_prot(self, prot):
+ self.prot = prot
+ def get_virt(self):
+ return self.virt
+ def set_virt(self, virt):
+ self.virt = virt
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxProtectionKind(self, value):
+ # Validate type DoxProtectionKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['public', 'protected', 'private', 'package']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxProtectionKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxVirtualKind(self, value):
+ # Validate type DoxVirtualKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['non-virtual', 'virtual', 'pure-virtual']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxVirtualKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_)
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='compoundRefType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('compoundRefType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'compoundRefType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='compoundRefType')
+ if self.hasContent_():
+ outfile.write('>')
+ outfile.write(self.convert_unicode(self.valueOf_))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='compoundRefType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='compoundRefType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.prot is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ outfile.write(' prot=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.prot), input_name='prot')), ))
+ if self.virt is not None and 'virt' not in already_processed:
+ already_processed.add('virt')
+ outfile.write(' virt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.virt), input_name='virt')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='compoundRefType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('prot', node)
+ if value is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ self.prot = value
+ self.validate_DoxProtectionKind(self.prot) # validate type DoxProtectionKind
+ value = find_attr_value_('virt', node)
+ if value is not None and 'virt' not in already_processed:
+ already_processed.add('virt')
+ self.virt = value
+ self.validate_DoxVirtualKind(self.virt) # validate type DoxVirtualKind
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class compoundRefType
+
+
+class reimplementType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, valueOf_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, reimplementType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if reimplementType.subclass:
+ return reimplementType.subclass(*args_, **kwargs_)
+ else:
+ return reimplementType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_)
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='reimplementType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('reimplementType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'reimplementType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='reimplementType')
+ if self.hasContent_():
+ outfile.write('>')
+ outfile.write(self.convert_unicode(self.valueOf_))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='reimplementType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='reimplementType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='reimplementType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class reimplementType
+
+
+class incType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, local=None, valueOf_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.local = _cast(None, local)
+ self.local_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, incType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if incType.subclass:
+ return incType.subclass(*args_, **kwargs_)
+ else:
+ return incType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_local(self):
+ return self.local
+ def set_local(self, local):
+ self.local = local
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxBool(self, value):
+ # Validate type DoxBool, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['yes', 'no']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxBool' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_)
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='incType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('incType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'incType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='incType')
+ if self.hasContent_():
+ outfile.write('>')
+ outfile.write(self.convert_unicode(self.valueOf_))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='incType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='incType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.local is not None and 'local' not in already_processed:
+ already_processed.add('local')
+ outfile.write(' local=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.local), input_name='local')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='incType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('local', node)
+ if value is not None and 'local' not in already_processed:
+ already_processed.add('local')
+ self.local = value
+ self.validate_DoxBool(self.local) # validate type DoxBool
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class incType
+
+
+class refType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, prot=None, inline=None, valueOf_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.prot = _cast(None, prot)
+ self.prot_nsprefix_ = None
+ self.inline = _cast(None, inline)
+ self.inline_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, refType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if refType.subclass:
+ return refType.subclass(*args_, **kwargs_)
+ else:
+ return refType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_prot(self):
+ return self.prot
+ def set_prot(self, prot):
+ self.prot = prot
+ def get_inline(self):
+ return self.inline
+ def set_inline(self, inline):
+ self.inline = inline
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxProtectionKind(self, value):
+ # Validate type DoxProtectionKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['public', 'protected', 'private', 'package']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxProtectionKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxBool(self, value):
+ # Validate type DoxBool, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['yes', 'no']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxBool' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_)
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='refType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('refType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'refType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='refType')
+ if self.hasContent_():
+ outfile.write('>')
+ outfile.write(self.convert_unicode(self.valueOf_))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='refType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='refType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.prot is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ outfile.write(' prot=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.prot), input_name='prot')), ))
+ if self.inline is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ outfile.write(' inline=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inline), input_name='inline')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='refType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('prot', node)
+ if value is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ self.prot = value
+ self.validate_DoxProtectionKind(self.prot) # validate type DoxProtectionKind
+ value = find_attr_value_('inline', node)
+ if value is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ self.inline = value
+ self.validate_DoxBool(self.inline) # validate type DoxBool
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class refType
+
+
+class refTextType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, kindref=None, external=None, tooltip=None, valueOf_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.kindref = _cast(None, kindref)
+ self.kindref_nsprefix_ = None
+ self.external = _cast(None, external)
+ self.external_nsprefix_ = None
+ self.tooltip = _cast(None, tooltip)
+ self.tooltip_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, refTextType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if refTextType.subclass:
+ return refTextType.subclass(*args_, **kwargs_)
+ else:
+ return refTextType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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 get_tooltip(self):
+ return self.tooltip
+ def set_tooltip(self, tooltip):
+ self.tooltip = tooltip
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxRefKind(self, value):
+ # Validate type DoxRefKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['compound', 'member']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxRefKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_)
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='refTextType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('refTextType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'refTextType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='refTextType')
+ if self.hasContent_():
+ outfile.write('>')
+ outfile.write(self.convert_unicode(self.valueOf_))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='refTextType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='refTextType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.kindref is not None and 'kindref' not in already_processed:
+ already_processed.add('kindref')
+ outfile.write(' kindref=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kindref), input_name='kindref')), ))
+ if self.external is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ outfile.write(' external=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.external), input_name='external')), ))
+ if self.tooltip is not None and 'tooltip' not in already_processed:
+ already_processed.add('tooltip')
+ outfile.write(' tooltip=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.tooltip), input_name='tooltip')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='refTextType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('kindref', node)
+ if value is not None and 'kindref' not in already_processed:
+ already_processed.add('kindref')
+ self.kindref = value
+ self.validate_DoxRefKind(self.kindref) # validate type DoxRefKind
+ value = find_attr_value_('external', node)
+ if value is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ self.external = value
+ value = find_attr_value_('tooltip', node)
+ if value is not None and 'tooltip' not in already_processed:
+ already_processed.add('tooltip')
+ self.tooltip = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class refTextType
+
+
+class sectiondefType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, kind=None, header=None, description=None, memberdef=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.kind = _cast(None, kind)
+ self.kind_nsprefix_ = None
+ self.header = header
+ self.header_nsprefix_ = None
+ self.description = description
+ self.description_nsprefix_ = None
+ if memberdef is None:
+ self.memberdef = []
+ else:
+ self.memberdef = memberdef
+ self.memberdef_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, sectiondefType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if sectiondefType.subclass:
+ return sectiondefType.subclass(*args_, **kwargs_)
+ else:
+ return sectiondefType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.memberdef.insert(index, value)
+ def replace_memberdef_at(self, index, value):
+ self.memberdef[index] = value
+ def get_kind(self):
+ return self.kind
+ def set_kind(self, kind):
+ self.kind = kind
+ def validate_DoxSectionKind(self, value):
+ # Validate type DoxSectionKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['user-defined', 'public-type', 'public-func', 'public-attrib', 'public-slot', 'signal', 'dcop-func', 'property', 'event', 'public-static-func', 'public-static-attrib', 'protected-type', 'protected-func', 'protected-attrib', 'protected-slot', 'protected-static-func', 'protected-static-attrib', 'package-type', 'package-func', 'package-attrib', 'package-static-func', 'package-static-attrib', 'private-type', 'private-func', 'private-attrib', 'private-slot', 'private-static-func', 'private-static-attrib', 'friend', 'related', 'define', 'prototype', 'typedef', 'enum', 'func', 'var']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxSectionKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.header is not None or
+ self.description is not None or
+ self.memberdef
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='sectiondefType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('sectiondefType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'sectiondefType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='sectiondefType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='sectiondefType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='sectiondefType'):
+ if self.kind is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ outfile.write(' kind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kind), input_name='kind')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='sectiondefType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.header is not None:
+ namespaceprefix_ = self.header_nsprefix_ + ':' if (UseCapturedNS_ and self.header_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sheader>%s</%sheader>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.header), input_name='header')), namespaceprefix_ , eol_))
+ if self.description is not None:
+ namespaceprefix_ = self.description_nsprefix_ + ':' if (UseCapturedNS_ and self.description_nsprefix_) else ''
+ self.description.export(outfile, level, namespaceprefix_, namespacedef_='', name_='description', pretty_print=pretty_print)
+ for memberdef_ in self.memberdef:
+ namespaceprefix_ = self.memberdef_nsprefix_ + ':' if (UseCapturedNS_ and self.memberdef_nsprefix_) else ''
+ memberdef_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='memberdef', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('kind', node)
+ if value is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ self.kind = value
+ self.validate_DoxSectionKind(self.kind) # validate type DoxSectionKind
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'header':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'header')
+ value_ = self.gds_validate_string(value_, node, 'header')
+ self.header = value_
+ self.header_nsprefix_ = child_.prefix
+ elif nodeName_ == 'description':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.description = obj_
+ obj_.original_tagname_ = 'description'
+ elif nodeName_ == 'memberdef':
+ obj_ = memberdefType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.memberdef.append(obj_)
+ obj_.original_tagname_ = 'memberdef'
+# end class sectiondefType
+
+
+class memberdefType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, kind=None, id=None, prot=None, static=None, strong=None, const=None, explicit=None, inline=None, refqual=None, virt=None, volatile=None, mutable=None, noexcept=None, constexpr=None, readable=None, writable=None, initonly=None, settable=None, privatesettable=None, protectedsettable=None, gettable=None, privategettable=None, protectedgettable=None, final=None, sealed=None, new=None, add=None, remove=None, raise_=None, optional=None, required=None, accessor=None, attribute=None, property=None, readonly=None, bound=None, removable=None, constrained=None, transient=None, maybevoid=None, maybedefault=None, maybeambiguous=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, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.kind = _cast(None, kind)
+ self.kind_nsprefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.prot = _cast(None, prot)
+ self.prot_nsprefix_ = None
+ self.static = _cast(None, static)
+ self.static_nsprefix_ = None
+ self.strong = _cast(None, strong)
+ self.strong_nsprefix_ = None
+ self.const = _cast(None, const)
+ self.const_nsprefix_ = None
+ self.explicit = _cast(None, explicit)
+ self.explicit_nsprefix_ = None
+ self.inline = _cast(None, inline)
+ self.inline_nsprefix_ = None
+ self.refqual = _cast(None, refqual)
+ self.refqual_nsprefix_ = None
+ self.virt = _cast(None, virt)
+ self.virt_nsprefix_ = None
+ self.volatile = _cast(None, volatile)
+ self.volatile_nsprefix_ = None
+ self.mutable = _cast(None, mutable)
+ self.mutable_nsprefix_ = None
+ self.noexcept = _cast(None, noexcept)
+ self.noexcept_nsprefix_ = None
+ self.constexpr = _cast(None, constexpr)
+ self.constexpr_nsprefix_ = None
+ self.readable = _cast(None, readable)
+ self.readable_nsprefix_ = None
+ self.writable = _cast(None, writable)
+ self.writable_nsprefix_ = None
+ self.initonly = _cast(None, initonly)
+ self.initonly_nsprefix_ = None
+ self.settable = _cast(None, settable)
+ self.settable_nsprefix_ = None
+ self.privatesettable = _cast(None, privatesettable)
+ self.privatesettable_nsprefix_ = None
+ self.protectedsettable = _cast(None, protectedsettable)
+ self.protectedsettable_nsprefix_ = None
+ self.gettable = _cast(None, gettable)
+ self.gettable_nsprefix_ = None
+ self.privategettable = _cast(None, privategettable)
+ self.privategettable_nsprefix_ = None
+ self.protectedgettable = _cast(None, protectedgettable)
+ self.protectedgettable_nsprefix_ = None
+ self.final = _cast(None, final)
+ self.final_nsprefix_ = None
+ self.sealed = _cast(None, sealed)
+ self.sealed_nsprefix_ = None
+ self.new = _cast(None, new)
+ self.new_nsprefix_ = None
+ self.add = _cast(None, add)
+ self.add_nsprefix_ = None
+ self.remove = _cast(None, remove)
+ self.remove_nsprefix_ = None
+ self.raise_ = _cast(None, raise_)
+ self.raise__nsprefix_ = None
+ self.optional = _cast(None, optional)
+ self.optional_nsprefix_ = None
+ self.required = _cast(None, required)
+ self.required_nsprefix_ = None
+ self.accessor = _cast(None, accessor)
+ self.accessor_nsprefix_ = None
+ self.attribute = _cast(None, attribute)
+ self.attribute_nsprefix_ = None
+ self.property = _cast(None, property)
+ self.property_nsprefix_ = None
+ self.readonly = _cast(None, readonly)
+ self.readonly_nsprefix_ = None
+ self.bound = _cast(None, bound)
+ self.bound_nsprefix_ = None
+ self.removable = _cast(None, removable)
+ self.removable_nsprefix_ = None
+ self.constrained = _cast(None, constrained)
+ self.constrained_nsprefix_ = None
+ self.transient = _cast(None, transient)
+ self.transient_nsprefix_ = None
+ self.maybevoid = _cast(None, maybevoid)
+ self.maybevoid_nsprefix_ = None
+ self.maybedefault = _cast(None, maybedefault)
+ self.maybedefault_nsprefix_ = None
+ self.maybeambiguous = _cast(None, maybeambiguous)
+ self.maybeambiguous_nsprefix_ = None
+ self.templateparamlist = templateparamlist
+ self.templateparamlist_nsprefix_ = None
+ self.type_ = type_
+ self.type__nsprefix_ = None
+ self.definition = definition
+ self.definition_nsprefix_ = None
+ self.argsstring = argsstring
+ self.argsstring_nsprefix_ = None
+ self.name = name
+ self.name_nsprefix_ = None
+ self.read = read
+ self.read_nsprefix_ = None
+ self.write = write
+ self.write_nsprefix_ = None
+ self.bitfield = bitfield
+ self.bitfield_nsprefix_ = None
+ if reimplements is None:
+ self.reimplements = []
+ else:
+ self.reimplements = reimplements
+ self.reimplements_nsprefix_ = None
+ if reimplementedby is None:
+ self.reimplementedby = []
+ else:
+ self.reimplementedby = reimplementedby
+ self.reimplementedby_nsprefix_ = None
+ if param is None:
+ self.param = []
+ else:
+ self.param = param
+ self.param_nsprefix_ = None
+ if enumvalue is None:
+ self.enumvalue = []
+ else:
+ self.enumvalue = enumvalue
+ self.enumvalue_nsprefix_ = None
+ self.initializer = initializer
+ self.initializer_nsprefix_ = None
+ self.exceptions = exceptions
+ self.exceptions_nsprefix_ = None
+ self.briefdescription = briefdescription
+ self.briefdescription_nsprefix_ = None
+ self.detaileddescription = detaileddescription
+ self.detaileddescription_nsprefix_ = None
+ self.inbodydescription = inbodydescription
+ self.inbodydescription_nsprefix_ = None
+ self.location = location
+ self.location_nsprefix_ = None
+ if references is None:
+ self.references = []
+ else:
+ self.references = references
+ self.references_nsprefix_ = None
+ if referencedby is None:
+ self.referencedby = []
+ else:
+ self.referencedby = referencedby
+ self.referencedby_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, memberdefType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if memberdefType.subclass:
+ return memberdefType.subclass(*args_, **kwargs_)
+ else:
+ return memberdefType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.reimplements.insert(index, value)
+ def replace_reimplements_at(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_at(self, index, value):
+ self.reimplementedby.insert(index, value)
+ def replace_reimplementedby_at(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_at(self, index, value):
+ self.param.insert(index, value)
+ def replace_param_at(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_at(self, index, value):
+ self.enumvalue.insert(index, value)
+ def replace_enumvalue_at(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_at(self, index, value):
+ self.references.insert(index, value)
+ def replace_references_at(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_at(self, index, value):
+ self.referencedby.insert(index, value)
+ def replace_referencedby_at(self, index, value):
+ self.referencedby[index] = value
+ def get_kind(self):
+ return self.kind
+ def set_kind(self, kind):
+ self.kind = kind
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_prot(self):
+ return self.prot
+ def set_prot(self, prot):
+ self.prot = prot
+ def get_static(self):
+ return self.static
+ def set_static(self, static):
+ self.static = static
+ def get_strong(self):
+ return self.strong
+ def set_strong(self, strong):
+ self.strong = strong
+ def get_const(self):
+ return self.const
+ def set_const(self, const):
+ self.const = const
+ def get_explicit(self):
+ return self.explicit
+ def set_explicit(self, explicit):
+ self.explicit = explicit
+ def get_inline(self):
+ return self.inline
+ def set_inline(self, inline):
+ self.inline = inline
+ def get_refqual(self):
+ return self.refqual
+ def set_refqual(self, refqual):
+ self.refqual = refqual
+ def get_virt(self):
+ return self.virt
+ def set_virt(self, virt):
+ self.virt = virt
+ def get_volatile(self):
+ return self.volatile
+ def set_volatile(self, volatile):
+ self.volatile = volatile
+ def get_mutable(self):
+ return self.mutable
+ def set_mutable(self, mutable):
+ self.mutable = mutable
+ def get_noexcept(self):
+ return self.noexcept
+ def set_noexcept(self, noexcept):
+ self.noexcept = noexcept
+ def get_constexpr(self):
+ return self.constexpr
+ def set_constexpr(self, constexpr):
+ self.constexpr = constexpr
+ def get_readable(self):
+ return self.readable
+ def set_readable(self, readable):
+ self.readable = readable
+ def get_writable(self):
+ return self.writable
+ def set_writable(self, writable):
+ self.writable = writable
+ def get_initonly(self):
+ return self.initonly
+ def set_initonly(self, initonly):
+ self.initonly = initonly
+ def get_settable(self):
+ return self.settable
+ def set_settable(self, settable):
+ self.settable = settable
+ def get_privatesettable(self):
+ return self.privatesettable
+ def set_privatesettable(self, privatesettable):
+ self.privatesettable = privatesettable
+ def get_protectedsettable(self):
+ return self.protectedsettable
+ def set_protectedsettable(self, protectedsettable):
+ self.protectedsettable = protectedsettable
+ def get_gettable(self):
+ return self.gettable
+ def set_gettable(self, gettable):
+ self.gettable = gettable
+ def get_privategettable(self):
+ return self.privategettable
+ def set_privategettable(self, privategettable):
+ self.privategettable = privategettable
+ def get_protectedgettable(self):
+ return self.protectedgettable
+ def set_protectedgettable(self, protectedgettable):
+ self.protectedgettable = protectedgettable
+ def get_final(self):
+ return self.final
+ def set_final(self, final):
+ self.final = final
+ def get_sealed(self):
+ return self.sealed
+ def set_sealed(self, sealed):
+ self.sealed = sealed
+ def get_new(self):
+ return self.new
+ def set_new(self, new):
+ self.new = new
+ def get_add(self):
+ return self.add
+ def set_add(self, add):
+ self.add = add
+ def get_remove(self):
+ return self.remove
+ def set_remove(self, remove):
+ self.remove = remove
+ def get_raise(self):
+ return self.raise_
+ def set_raise(self, raise_):
+ self.raise_ = raise_
+ def get_optional(self):
+ return self.optional
+ def set_optional(self, optional):
+ self.optional = optional
+ def get_required(self):
+ return self.required
+ def set_required(self, required):
+ self.required = required
+ def get_accessor(self):
+ return self.accessor
+ def set_accessor(self, accessor):
+ self.accessor = accessor
+ def get_attribute(self):
+ return self.attribute
+ def set_attribute(self, attribute):
+ self.attribute = attribute
+ def get_property(self):
+ return self.property
+ def set_property(self, property):
+ self.property = property
+ def get_readonly(self):
+ return self.readonly
+ def set_readonly(self, readonly):
+ self.readonly = readonly
+ def get_bound(self):
+ return self.bound
+ def set_bound(self, bound):
+ self.bound = bound
+ def get_removable(self):
+ return self.removable
+ def set_removable(self, removable):
+ self.removable = removable
+ def get_constrained(self):
+ return self.constrained
+ def set_constrained(self, constrained):
+ self.constrained = constrained
+ def get_transient(self):
+ return self.transient
+ def set_transient(self, transient):
+ self.transient = transient
+ def get_maybevoid(self):
+ return self.maybevoid
+ def set_maybevoid(self, maybevoid):
+ self.maybevoid = maybevoid
+ def get_maybedefault(self):
+ return self.maybedefault
+ def set_maybedefault(self, maybedefault):
+ self.maybedefault = maybedefault
+ def get_maybeambiguous(self):
+ return self.maybeambiguous
+ def set_maybeambiguous(self, maybeambiguous):
+ self.maybeambiguous = maybeambiguous
+ def validate_DoxMemberKind(self, value):
+ # Validate type DoxMemberKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['define', 'property', 'event', 'variable', 'typedef', 'enum', 'function', 'signal', 'prototype', 'friend', 'dcop', 'slot', 'interface', 'service']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxMemberKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxProtectionKind(self, value):
+ # Validate type DoxProtectionKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['public', 'protected', 'private', 'package']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxProtectionKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxBool(self, value):
+ # Validate type DoxBool, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['yes', 'no']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxBool' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxRefQualifierKind(self, value):
+ # Validate type DoxRefQualifierKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['lvalue', 'rvalue']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxRefQualifierKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxVirtualKind(self, value):
+ # Validate type DoxVirtualKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['non-virtual', 'virtual', 'pure-virtual']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxVirtualKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxAccessor(self, value):
+ # Validate type DoxAccessor, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['retain', 'copy', 'assign', 'weak', 'strong', 'unretained']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxAccessor' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ 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 or
+ self.reimplementedby or
+ self.param or
+ self.enumvalue 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 or
+ self.referencedby
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='memberdefType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('memberdefType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'memberdefType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='memberdefType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='memberdefType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='memberdefType'):
+ if self.kind is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ outfile.write(' kind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kind), input_name='kind')), ))
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ if self.prot is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ outfile.write(' prot=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.prot), input_name='prot')), ))
+ if self.static is not None and 'static' not in already_processed:
+ already_processed.add('static')
+ outfile.write(' static=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.static), input_name='static')), ))
+ if self.strong is not None and 'strong' not in already_processed:
+ already_processed.add('strong')
+ outfile.write(' strong=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.strong), input_name='strong')), ))
+ if self.const is not None and 'const' not in already_processed:
+ already_processed.add('const')
+ outfile.write(' const=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.const), input_name='const')), ))
+ if self.explicit is not None and 'explicit' not in already_processed:
+ already_processed.add('explicit')
+ outfile.write(' explicit=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.explicit), input_name='explicit')), ))
+ if self.inline is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ outfile.write(' inline=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inline), input_name='inline')), ))
+ if self.refqual is not None and 'refqual' not in already_processed:
+ already_processed.add('refqual')
+ outfile.write(' refqual=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refqual), input_name='refqual')), ))
+ if self.virt is not None and 'virt' not in already_processed:
+ already_processed.add('virt')
+ outfile.write(' virt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.virt), input_name='virt')), ))
+ if self.volatile is not None and 'volatile' not in already_processed:
+ already_processed.add('volatile')
+ outfile.write(' volatile=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.volatile), input_name='volatile')), ))
+ if self.mutable is not None and 'mutable' not in already_processed:
+ already_processed.add('mutable')
+ outfile.write(' mutable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.mutable), input_name='mutable')), ))
+ if self.noexcept is not None and 'noexcept' not in already_processed:
+ already_processed.add('noexcept')
+ outfile.write(' noexcept=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.noexcept), input_name='noexcept')), ))
+ if self.constexpr is not None and 'constexpr' not in already_processed:
+ already_processed.add('constexpr')
+ outfile.write(' constexpr=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.constexpr), input_name='constexpr')), ))
+ if self.readable is not None and 'readable' not in already_processed:
+ already_processed.add('readable')
+ outfile.write(' readable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.readable), input_name='readable')), ))
+ if self.writable is not None and 'writable' not in already_processed:
+ already_processed.add('writable')
+ outfile.write(' writable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.writable), input_name='writable')), ))
+ if self.initonly is not None and 'initonly' not in already_processed:
+ already_processed.add('initonly')
+ outfile.write(' initonly=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.initonly), input_name='initonly')), ))
+ if self.settable is not None and 'settable' not in already_processed:
+ already_processed.add('settable')
+ outfile.write(' settable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.settable), input_name='settable')), ))
+ if self.privatesettable is not None and 'privatesettable' not in already_processed:
+ already_processed.add('privatesettable')
+ outfile.write(' privatesettable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.privatesettable), input_name='privatesettable')), ))
+ if self.protectedsettable is not None and 'protectedsettable' not in already_processed:
+ already_processed.add('protectedsettable')
+ outfile.write(' protectedsettable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.protectedsettable), input_name='protectedsettable')), ))
+ if self.gettable is not None and 'gettable' not in already_processed:
+ already_processed.add('gettable')
+ outfile.write(' gettable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.gettable), input_name='gettable')), ))
+ if self.privategettable is not None and 'privategettable' not in already_processed:
+ already_processed.add('privategettable')
+ outfile.write(' privategettable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.privategettable), input_name='privategettable')), ))
+ if self.protectedgettable is not None and 'protectedgettable' not in already_processed:
+ already_processed.add('protectedgettable')
+ outfile.write(' protectedgettable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.protectedgettable), input_name='protectedgettable')), ))
+ if self.final is not None and 'final' not in already_processed:
+ already_processed.add('final')
+ outfile.write(' final=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.final), input_name='final')), ))
+ if self.sealed is not None and 'sealed' not in already_processed:
+ already_processed.add('sealed')
+ outfile.write(' sealed=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.sealed), input_name='sealed')), ))
+ if self.new is not None and 'new' not in already_processed:
+ already_processed.add('new')
+ outfile.write(' new=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.new), input_name='new')), ))
+ if self.add is not None and 'add' not in already_processed:
+ already_processed.add('add')
+ outfile.write(' add=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.add), input_name='add')), ))
+ if self.remove is not None and 'remove' not in already_processed:
+ already_processed.add('remove')
+ outfile.write(' remove=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.remove), input_name='remove')), ))
+ if self.raise_ is not None and 'raise_' not in already_processed:
+ already_processed.add('raise_')
+ outfile.write(' raise=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.raise_), input_name='raise')), ))
+ if self.optional is not None and 'optional' not in already_processed:
+ already_processed.add('optional')
+ outfile.write(' optional=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.optional), input_name='optional')), ))
+ if self.required is not None and 'required' not in already_processed:
+ already_processed.add('required')
+ outfile.write(' required=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.required), input_name='required')), ))
+ if self.accessor is not None and 'accessor' not in already_processed:
+ already_processed.add('accessor')
+ outfile.write(' accessor=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.accessor), input_name='accessor')), ))
+ if self.attribute is not None and 'attribute' not in already_processed:
+ already_processed.add('attribute')
+ outfile.write(' attribute=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.attribute), input_name='attribute')), ))
+ if self.property is not None and 'property' not in already_processed:
+ already_processed.add('property')
+ outfile.write(' property=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.property), input_name='property')), ))
+ if self.readonly is not None and 'readonly' not in already_processed:
+ already_processed.add('readonly')
+ outfile.write(' readonly=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.readonly), input_name='readonly')), ))
+ if self.bound is not None and 'bound' not in already_processed:
+ already_processed.add('bound')
+ outfile.write(' bound=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.bound), input_name='bound')), ))
+ if self.removable is not None and 'removable' not in already_processed:
+ already_processed.add('removable')
+ outfile.write(' removable=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.removable), input_name='removable')), ))
+ if self.constrained is not None and 'constrained' not in already_processed:
+ already_processed.add('constrained')
+ outfile.write(' constrained=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.constrained), input_name='constrained')), ))
+ if self.transient is not None and 'transient' not in already_processed:
+ already_processed.add('transient')
+ outfile.write(' transient=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.transient), input_name='transient')), ))
+ if self.maybevoid is not None and 'maybevoid' not in already_processed:
+ already_processed.add('maybevoid')
+ outfile.write(' maybevoid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.maybevoid), input_name='maybevoid')), ))
+ if self.maybedefault is not None and 'maybedefault' not in already_processed:
+ already_processed.add('maybedefault')
+ outfile.write(' maybedefault=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.maybedefault), input_name='maybedefault')), ))
+ if self.maybeambiguous is not None and 'maybeambiguous' not in already_processed:
+ already_processed.add('maybeambiguous')
+ outfile.write(' maybeambiguous=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.maybeambiguous), input_name='maybeambiguous')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='memberdefType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.templateparamlist is not None:
+ namespaceprefix_ = self.templateparamlist_nsprefix_ + ':' if (UseCapturedNS_ and self.templateparamlist_nsprefix_) else ''
+ self.templateparamlist.export(outfile, level, namespaceprefix_, namespacedef_='', name_='templateparamlist', pretty_print=pretty_print)
+ if self.type_ is not None:
+ namespaceprefix_ = self.type__nsprefix_ + ':' if (UseCapturedNS_ and self.type__nsprefix_) else ''
+ self.type_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='type', pretty_print=pretty_print)
+ if self.definition is not None:
+ namespaceprefix_ = self.definition_nsprefix_ + ':' if (UseCapturedNS_ and self.definition_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdefinition>%s</%sdefinition>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.definition), input_name='definition')), namespaceprefix_ , eol_))
+ if self.argsstring is not None:
+ namespaceprefix_ = self.argsstring_nsprefix_ + ':' if (UseCapturedNS_ and self.argsstring_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sargsstring>%s</%sargsstring>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.argsstring), input_name='argsstring')), namespaceprefix_ , eol_))
+ if self.name is not None:
+ namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
+ if self.read is not None:
+ namespaceprefix_ = self.read_nsprefix_ + ':' if (UseCapturedNS_ and self.read_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sread>%s</%sread>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.read), input_name='read')), namespaceprefix_ , eol_))
+ if self.write is not None:
+ namespaceprefix_ = self.write_nsprefix_ + ':' if (UseCapturedNS_ and self.write_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%swrite>%s</%swrite>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.write), input_name='write')), namespaceprefix_ , eol_))
+ if self.bitfield is not None:
+ namespaceprefix_ = self.bitfield_nsprefix_ + ':' if (UseCapturedNS_ and self.bitfield_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sbitfield>%s</%sbitfield>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.bitfield), input_name='bitfield')), namespaceprefix_ , eol_))
+ for reimplements_ in self.reimplements:
+ namespaceprefix_ = self.reimplements_nsprefix_ + ':' if (UseCapturedNS_ and self.reimplements_nsprefix_) else ''
+ reimplements_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reimplements', pretty_print=pretty_print)
+ for reimplementedby_ in self.reimplementedby:
+ namespaceprefix_ = self.reimplementedby_nsprefix_ + ':' if (UseCapturedNS_ and self.reimplementedby_nsprefix_) else ''
+ reimplementedby_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='reimplementedby', pretty_print=pretty_print)
+ for param_ in self.param:
+ namespaceprefix_ = self.param_nsprefix_ + ':' if (UseCapturedNS_ and self.param_nsprefix_) else ''
+ param_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='param', pretty_print=pretty_print)
+ for enumvalue_ in self.enumvalue:
+ namespaceprefix_ = self.enumvalue_nsprefix_ + ':' if (UseCapturedNS_ and self.enumvalue_nsprefix_) else ''
+ enumvalue_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='enumvalue', pretty_print=pretty_print)
+ if self.initializer is not None:
+ namespaceprefix_ = self.initializer_nsprefix_ + ':' if (UseCapturedNS_ and self.initializer_nsprefix_) else ''
+ self.initializer.export(outfile, level, namespaceprefix_, namespacedef_='', name_='initializer', pretty_print=pretty_print)
+ if self.exceptions is not None:
+ namespaceprefix_ = self.exceptions_nsprefix_ + ':' if (UseCapturedNS_ and self.exceptions_nsprefix_) else ''
+ self.exceptions.export(outfile, level, namespaceprefix_, namespacedef_='', name_='exceptions', pretty_print=pretty_print)
+ if self.briefdescription is not None:
+ namespaceprefix_ = self.briefdescription_nsprefix_ + ':' if (UseCapturedNS_ and self.briefdescription_nsprefix_) else ''
+ self.briefdescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='briefdescription', pretty_print=pretty_print)
+ if self.detaileddescription is not None:
+ namespaceprefix_ = self.detaileddescription_nsprefix_ + ':' if (UseCapturedNS_ and self.detaileddescription_nsprefix_) else ''
+ self.detaileddescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='detaileddescription', pretty_print=pretty_print)
+ if self.inbodydescription is not None:
+ namespaceprefix_ = self.inbodydescription_nsprefix_ + ':' if (UseCapturedNS_ and self.inbodydescription_nsprefix_) else ''
+ self.inbodydescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='inbodydescription', pretty_print=pretty_print)
+ if self.location is not None:
+ namespaceprefix_ = self.location_nsprefix_ + ':' if (UseCapturedNS_ and self.location_nsprefix_) else ''
+ self.location.export(outfile, level, namespaceprefix_, namespacedef_='', name_='location', pretty_print=pretty_print)
+ for references_ in self.references:
+ namespaceprefix_ = self.references_nsprefix_ + ':' if (UseCapturedNS_ and self.references_nsprefix_) else ''
+ references_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='references', pretty_print=pretty_print)
+ for referencedby_ in self.referencedby:
+ namespaceprefix_ = self.referencedby_nsprefix_ + ':' if (UseCapturedNS_ and self.referencedby_nsprefix_) else ''
+ referencedby_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='referencedby', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('kind', node)
+ if value is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ self.kind = value
+ self.validate_DoxMemberKind(self.kind) # validate type DoxMemberKind
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ value = find_attr_value_('prot', node)
+ if value is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ self.prot = value
+ self.validate_DoxProtectionKind(self.prot) # validate type DoxProtectionKind
+ value = find_attr_value_('static', node)
+ if value is not None and 'static' not in already_processed:
+ already_processed.add('static')
+ self.static = value
+ self.validate_DoxBool(self.static) # validate type DoxBool
+ value = find_attr_value_('strong', node)
+ if value is not None and 'strong' not in already_processed:
+ already_processed.add('strong')
+ self.strong = value
+ self.validate_DoxBool(self.strong) # validate type DoxBool
+ value = find_attr_value_('const', node)
+ if value is not None and 'const' not in already_processed:
+ already_processed.add('const')
+ self.const = value
+ self.validate_DoxBool(self.const) # validate type DoxBool
+ value = find_attr_value_('explicit', node)
+ if value is not None and 'explicit' not in already_processed:
+ already_processed.add('explicit')
+ self.explicit = value
+ self.validate_DoxBool(self.explicit) # validate type DoxBool
+ value = find_attr_value_('inline', node)
+ if value is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ self.inline = value
+ self.validate_DoxBool(self.inline) # validate type DoxBool
+ value = find_attr_value_('refqual', node)
+ if value is not None and 'refqual' not in already_processed:
+ already_processed.add('refqual')
+ self.refqual = value
+ self.validate_DoxRefQualifierKind(self.refqual) # validate type DoxRefQualifierKind
+ value = find_attr_value_('virt', node)
+ if value is not None and 'virt' not in already_processed:
+ already_processed.add('virt')
+ self.virt = value
+ self.validate_DoxVirtualKind(self.virt) # validate type DoxVirtualKind
+ value = find_attr_value_('volatile', node)
+ if value is not None and 'volatile' not in already_processed:
+ already_processed.add('volatile')
+ self.volatile = value
+ self.validate_DoxBool(self.volatile) # validate type DoxBool
+ value = find_attr_value_('mutable', node)
+ if value is not None and 'mutable' not in already_processed:
+ already_processed.add('mutable')
+ self.mutable = value
+ self.validate_DoxBool(self.mutable) # validate type DoxBool
+ value = find_attr_value_('noexcept', node)
+ if value is not None and 'noexcept' not in already_processed:
+ already_processed.add('noexcept')
+ self.noexcept = value
+ self.validate_DoxBool(self.noexcept) # validate type DoxBool
+ value = find_attr_value_('constexpr', node)
+ if value is not None and 'constexpr' not in already_processed:
+ already_processed.add('constexpr')
+ self.constexpr = value
+ self.validate_DoxBool(self.constexpr) # validate type DoxBool
+ value = find_attr_value_('readable', node)
+ if value is not None and 'readable' not in already_processed:
+ already_processed.add('readable')
+ self.readable = value
+ self.validate_DoxBool(self.readable) # validate type DoxBool
+ value = find_attr_value_('writable', node)
+ if value is not None and 'writable' not in already_processed:
+ already_processed.add('writable')
+ self.writable = value
+ self.validate_DoxBool(self.writable) # validate type DoxBool
+ value = find_attr_value_('initonly', node)
+ if value is not None and 'initonly' not in already_processed:
+ already_processed.add('initonly')
+ self.initonly = value
+ self.validate_DoxBool(self.initonly) # validate type DoxBool
+ value = find_attr_value_('settable', node)
+ if value is not None and 'settable' not in already_processed:
+ already_processed.add('settable')
+ self.settable = value
+ self.validate_DoxBool(self.settable) # validate type DoxBool
+ value = find_attr_value_('privatesettable', node)
+ if value is not None and 'privatesettable' not in already_processed:
+ already_processed.add('privatesettable')
+ self.privatesettable = value
+ self.validate_DoxBool(self.privatesettable) # validate type DoxBool
+ value = find_attr_value_('protectedsettable', node)
+ if value is not None and 'protectedsettable' not in already_processed:
+ already_processed.add('protectedsettable')
+ self.protectedsettable = value
+ self.validate_DoxBool(self.protectedsettable) # validate type DoxBool
+ value = find_attr_value_('gettable', node)
+ if value is not None and 'gettable' not in already_processed:
+ already_processed.add('gettable')
+ self.gettable = value
+ self.validate_DoxBool(self.gettable) # validate type DoxBool
+ value = find_attr_value_('privategettable', node)
+ if value is not None and 'privategettable' not in already_processed:
+ already_processed.add('privategettable')
+ self.privategettable = value
+ self.validate_DoxBool(self.privategettable) # validate type DoxBool
+ value = find_attr_value_('protectedgettable', node)
+ if value is not None and 'protectedgettable' not in already_processed:
+ already_processed.add('protectedgettable')
+ self.protectedgettable = value
+ self.validate_DoxBool(self.protectedgettable) # validate type DoxBool
+ value = find_attr_value_('final', node)
+ if value is not None and 'final' not in already_processed:
+ already_processed.add('final')
+ self.final = value
+ self.validate_DoxBool(self.final) # validate type DoxBool
+ value = find_attr_value_('sealed', node)
+ if value is not None and 'sealed' not in already_processed:
+ already_processed.add('sealed')
+ self.sealed = value
+ self.validate_DoxBool(self.sealed) # validate type DoxBool
+ value = find_attr_value_('new', node)
+ if value is not None and 'new' not in already_processed:
+ already_processed.add('new')
+ self.new = value
+ self.validate_DoxBool(self.new) # validate type DoxBool
+ value = find_attr_value_('add', node)
+ if value is not None and 'add' not in already_processed:
+ already_processed.add('add')
+ self.add = value
+ self.validate_DoxBool(self.add) # validate type DoxBool
+ value = find_attr_value_('remove', node)
+ if value is not None and 'remove' not in already_processed:
+ already_processed.add('remove')
+ self.remove = value
+ self.validate_DoxBool(self.remove) # validate type DoxBool
+ value = find_attr_value_('raise', node)
+ if value is not None and 'raise' not in already_processed:
+ already_processed.add('raise')
+ self.raise_ = value
+ self.validate_DoxBool(self.raise_) # validate type DoxBool
+ value = find_attr_value_('optional', node)
+ if value is not None and 'optional' not in already_processed:
+ already_processed.add('optional')
+ self.optional = value
+ self.validate_DoxBool(self.optional) # validate type DoxBool
+ value = find_attr_value_('required', node)
+ if value is not None and 'required' not in already_processed:
+ already_processed.add('required')
+ self.required = value
+ self.validate_DoxBool(self.required) # validate type DoxBool
+ value = find_attr_value_('accessor', node)
+ if value is not None and 'accessor' not in already_processed:
+ already_processed.add('accessor')
+ self.accessor = value
+ self.validate_DoxAccessor(self.accessor) # validate type DoxAccessor
+ value = find_attr_value_('attribute', node)
+ if value is not None and 'attribute' not in already_processed:
+ already_processed.add('attribute')
+ self.attribute = value
+ self.validate_DoxBool(self.attribute) # validate type DoxBool
+ value = find_attr_value_('property', node)
+ if value is not None and 'property' not in already_processed:
+ already_processed.add('property')
+ self.property = value
+ self.validate_DoxBool(self.property) # validate type DoxBool
+ value = find_attr_value_('readonly', node)
+ if value is not None and 'readonly' not in already_processed:
+ already_processed.add('readonly')
+ self.readonly = value
+ self.validate_DoxBool(self.readonly) # validate type DoxBool
+ value = find_attr_value_('bound', node)
+ if value is not None and 'bound' not in already_processed:
+ already_processed.add('bound')
+ self.bound = value
+ self.validate_DoxBool(self.bound) # validate type DoxBool
+ value = find_attr_value_('removable', node)
+ if value is not None and 'removable' not in already_processed:
+ already_processed.add('removable')
+ self.removable = value
+ self.validate_DoxBool(self.removable) # validate type DoxBool
+ value = find_attr_value_('constrained', node)
+ if value is not None and 'constrained' not in already_processed:
+ already_processed.add('constrained')
+ self.constrained = value
+ self.validate_DoxBool(self.constrained) # validate type DoxBool
+ value = find_attr_value_('transient', node)
+ if value is not None and 'transient' not in already_processed:
+ already_processed.add('transient')
+ self.transient = value
+ self.validate_DoxBool(self.transient) # validate type DoxBool
+ value = find_attr_value_('maybevoid', node)
+ if value is not None and 'maybevoid' not in already_processed:
+ already_processed.add('maybevoid')
+ self.maybevoid = value
+ self.validate_DoxBool(self.maybevoid) # validate type DoxBool
+ value = find_attr_value_('maybedefault', node)
+ if value is not None and 'maybedefault' not in already_processed:
+ already_processed.add('maybedefault')
+ self.maybedefault = value
+ self.validate_DoxBool(self.maybedefault) # validate type DoxBool
+ value = find_attr_value_('maybeambiguous', node)
+ if value is not None and 'maybeambiguous' not in already_processed:
+ already_processed.add('maybeambiguous')
+ self.maybeambiguous = value
+ self.validate_DoxBool(self.maybeambiguous) # validate type DoxBool
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'templateparamlist':
+ obj_ = templateparamlistType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.templateparamlist = obj_
+ obj_.original_tagname_ = 'templateparamlist'
+ elif nodeName_ == 'type':
+ obj_ = linkedTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.type_ = obj_
+ obj_.original_tagname_ = 'type'
+ elif nodeName_ == 'definition':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'definition')
+ value_ = self.gds_validate_string(value_, node, 'definition')
+ self.definition = value_
+ self.definition_nsprefix_ = child_.prefix
+ elif nodeName_ == 'argsstring':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'argsstring')
+ value_ = self.gds_validate_string(value_, node, 'argsstring')
+ self.argsstring = value_
+ self.argsstring_nsprefix_ = child_.prefix
+ elif nodeName_ == 'name':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'name')
+ value_ = self.gds_validate_string(value_, node, 'name')
+ self.name = value_
+ self.name_nsprefix_ = child_.prefix
+ elif nodeName_ == 'read':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'read')
+ value_ = self.gds_validate_string(value_, node, 'read')
+ self.read = value_
+ self.read_nsprefix_ = child_.prefix
+ elif nodeName_ == 'write':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'write')
+ value_ = self.gds_validate_string(value_, node, 'write')
+ self.write = value_
+ self.write_nsprefix_ = child_.prefix
+ elif nodeName_ == 'bitfield':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'bitfield')
+ value_ = self.gds_validate_string(value_, node, 'bitfield')
+ self.bitfield = value_
+ self.bitfield_nsprefix_ = child_.prefix
+ elif nodeName_ == 'reimplements':
+ obj_ = reimplementType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.reimplements.append(obj_)
+ obj_.original_tagname_ = 'reimplements'
+ elif nodeName_ == 'reimplementedby':
+ obj_ = reimplementType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.reimplementedby.append(obj_)
+ obj_.original_tagname_ = 'reimplementedby'
+ elif nodeName_ == 'param':
+ obj_ = paramType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.param.append(obj_)
+ obj_.original_tagname_ = 'param'
+ elif nodeName_ == 'enumvalue':
+ obj_ = enumvalueType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.enumvalue.append(obj_)
+ obj_.original_tagname_ = 'enumvalue'
+ elif nodeName_ == 'initializer':
+ obj_ = linkedTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.initializer = obj_
+ obj_.original_tagname_ = 'initializer'
+ elif nodeName_ == 'exceptions':
+ obj_ = linkedTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.exceptions = obj_
+ obj_.original_tagname_ = 'exceptions'
+ elif nodeName_ == 'briefdescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.briefdescription = obj_
+ obj_.original_tagname_ = 'briefdescription'
+ elif nodeName_ == 'detaileddescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.detaileddescription = obj_
+ obj_.original_tagname_ = 'detaileddescription'
+ elif nodeName_ == 'inbodydescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.inbodydescription = obj_
+ obj_.original_tagname_ = 'inbodydescription'
+ elif nodeName_ == 'location':
+ obj_ = locationType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.location = obj_
+ obj_.original_tagname_ = 'location'
+ elif nodeName_ == 'references':
+ obj_ = referenceType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.references.append(obj_)
+ obj_.original_tagname_ = 'references'
+ elif nodeName_ == 'referencedby':
+ obj_ = referenceType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.referencedby.append(obj_)
+ obj_.original_tagname_ = 'referencedby'
+# end class memberdefType
+
+
+class definition(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, definition)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if definition.subclass:
+ return definition.subclass(*args_, **kwargs_)
+ else:
+ return definition(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='definition', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('definition')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'definition':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='definition')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='definition', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='definition'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='definition', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class definition
+
+
+class argsstring(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, argsstring)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if argsstring.subclass:
+ return argsstring.subclass(*args_, **kwargs_)
+ else:
+ return argsstring(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='argsstring', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('argsstring')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'argsstring':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='argsstring')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='argsstring', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='argsstring'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='argsstring', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class argsstring
+
+
+class read(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, read)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if read.subclass:
+ return read.subclass(*args_, **kwargs_)
+ else:
+ return read(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='read', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('read')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'read':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='read')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='read', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='read'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='read', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class read
+
+
+class write(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, write)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if write.subclass:
+ return write.subclass(*args_, **kwargs_)
+ else:
+ return write(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='write', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('write')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'write':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='write')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='write', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='write'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='write', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class write
+
+
+class bitfield(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, bitfield)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if bitfield.subclass:
+ return bitfield.subclass(*args_, **kwargs_)
+ else:
+ return bitfield(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='bitfield', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('bitfield')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'bitfield':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='bitfield')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='bitfield', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='bitfield'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='bitfield', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class bitfield
+
+
+class descriptionType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, title=None, para=None, internal=None, sect1=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.title = title
+ self.title_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if internal is None:
+ self.internal = []
+ else:
+ self.internal = internal
+ self.internal_nsprefix_ = None
+ if sect1 is None:
+ self.sect1 = []
+ else:
+ self.sect1 = sect1
+ self.sect1_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, descriptionType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if descriptionType.subclass:
+ return descriptionType.subclass(*args_, **kwargs_)
+ else:
+ return descriptionType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def get_internal(self):
+ return self.internal
+ def set_internal(self, internal):
+ self.internal = internal
+ def add_internal(self, value):
+ self.internal.append(value)
+ def insert_internal_at(self, index, value):
+ self.internal.insert(index, value)
+ def replace_internal_at(self, index, value):
+ self.internal[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_at(self, index, value):
+ self.sect1.insert(index, value)
+ def replace_sect1_at(self, index, value):
+ self.sect1[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.title is not None or
+ self.para or
+ self.internal or
+ self.sect1 or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='descriptionType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('descriptionType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'descriptionType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='descriptionType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='descriptionType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='descriptionType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='descriptionType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.title is not None:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%stitle>%s</%stitle>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.title), input_name='title')), namespaceprefix_ , eol_))
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for internal_ in self.internal:
+ namespaceprefix_ = self.internal_nsprefix_ + ':' if (UseCapturedNS_ and self.internal_nsprefix_) else ''
+ internal_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='internal', pretty_print=pretty_print)
+ for sect1_ in self.sect1:
+ namespaceprefix_ = self.sect1_nsprefix_ + ':' if (UseCapturedNS_ and self.sect1_nsprefix_) else ''
+ sect1_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect1', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'title' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'title')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'title')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'title', valuestr_)
+ self.content_.append(obj_)
+ self.title_nsprefix_ = child_.prefix
+ elif nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'internal':
+ obj_ = docInternalType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'internal', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_internal'):
+ self.add_internal(obj_.value)
+ elif hasattr(self, 'set_internal'):
+ self.set_internal(obj_.value)
+ elif nodeName_ == 'sect1':
+ obj_ = docSect1Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect1', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect1'):
+ self.add_sect1(obj_.value)
+ elif hasattr(self, 'set_sect1'):
+ self.set_sect1(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class descriptionType
+
+
+class enumvalueType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, prot=None, name=None, initializer=None, briefdescription=None, detaileddescription=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.prot = _cast(None, prot)
+ self.prot_nsprefix_ = None
+ self.name = name
+ self.name_nsprefix_ = None
+ self.initializer = initializer
+ self.initializer_nsprefix_ = None
+ self.briefdescription = briefdescription
+ self.briefdescription_nsprefix_ = None
+ self.detaileddescription = detaileddescription
+ self.detaileddescription_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, enumvalueType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if enumvalueType.subclass:
+ return enumvalueType.subclass(*args_, **kwargs_)
+ else:
+ return enumvalueType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_prot(self):
+ return self.prot
+ def set_prot(self, prot):
+ self.prot = prot
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxProtectionKind(self, value):
+ # Validate type DoxProtectionKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['public', 'protected', 'private', 'package']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxProtectionKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ 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 or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='enumvalueType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('enumvalueType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'enumvalueType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='enumvalueType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='enumvalueType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='enumvalueType'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ if self.prot is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ outfile.write(' prot=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.prot), input_name='prot')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='enumvalueType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.name is not None:
+ namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
+ if self.initializer is not None:
+ namespaceprefix_ = self.initializer_nsprefix_ + ':' if (UseCapturedNS_ and self.initializer_nsprefix_) else ''
+ self.initializer.export(outfile, level, namespaceprefix_, namespacedef_='', name_='initializer', pretty_print=pretty_print)
+ if self.briefdescription is not None:
+ namespaceprefix_ = self.briefdescription_nsprefix_ + ':' if (UseCapturedNS_ and self.briefdescription_nsprefix_) else ''
+ self.briefdescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='briefdescription', pretty_print=pretty_print)
+ if self.detaileddescription is not None:
+ namespaceprefix_ = self.detaileddescription_nsprefix_ + ':' if (UseCapturedNS_ and self.detaileddescription_nsprefix_) else ''
+ self.detaileddescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='detaileddescription', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ value = find_attr_value_('prot', node)
+ if value is not None and 'prot' not in already_processed:
+ already_processed.add('prot')
+ self.prot = value
+ self.validate_DoxProtectionKind(self.prot) # validate type DoxProtectionKind
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'name' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'name')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'name')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'name', valuestr_)
+ self.content_.append(obj_)
+ self.name_nsprefix_ = child_.prefix
+ elif nodeName_ == 'initializer':
+ obj_ = linkedTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'initializer', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_initializer'):
+ self.add_initializer(obj_.value)
+ elif hasattr(self, 'set_initializer'):
+ self.set_initializer(obj_.value)
+ elif nodeName_ == 'briefdescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'briefdescription', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_briefdescription'):
+ self.add_briefdescription(obj_.value)
+ elif hasattr(self, 'set_briefdescription'):
+ self.set_briefdescription(obj_.value)
+ elif nodeName_ == 'detaileddescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'detaileddescription', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_detaileddescription'):
+ self.add_detaileddescription(obj_.value)
+ elif hasattr(self, 'set_detaileddescription'):
+ self.set_detaileddescription(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class enumvalueType
+
+
+class templateparamlistType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, param=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if param is None:
+ self.param = []
+ else:
+ self.param = param
+ self.param_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, templateparamlistType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if templateparamlistType.subclass:
+ return templateparamlistType.subclass(*args_, **kwargs_)
+ else:
+ return templateparamlistType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.param.insert(index, value)
+ def replace_param_at(self, index, value):
+ self.param[index] = value
+ def hasContent_(self):
+ if (
+ self.param
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='templateparamlistType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('templateparamlistType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'templateparamlistType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='templateparamlistType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='templateparamlistType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='templateparamlistType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='templateparamlistType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for param_ in self.param:
+ namespaceprefix_ = self.param_nsprefix_ + ':' if (UseCapturedNS_ and self.param_nsprefix_) else ''
+ param_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='param', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'param':
+ obj_ = paramType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.param.append(obj_)
+ obj_.original_tagname_ = 'param'
+# end class templateparamlistType
+
+
+class paramType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, attributes=None, type_=None, declname=None, defname=None, array=None, defval=None, typeconstraint=None, briefdescription=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.attributes = attributes
+ self.attributes_nsprefix_ = None
+ self.type_ = type_
+ self.type__nsprefix_ = None
+ self.declname = declname
+ self.declname_nsprefix_ = None
+ self.defname = defname
+ self.defname_nsprefix_ = None
+ self.array = array
+ self.array_nsprefix_ = None
+ self.defval = defval
+ self.defval_nsprefix_ = None
+ self.typeconstraint = typeconstraint
+ self.typeconstraint_nsprefix_ = None
+ self.briefdescription = briefdescription
+ self.briefdescription_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, paramType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if paramType.subclass:
+ return paramType.subclass(*args_, **kwargs_)
+ else:
+ return paramType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_attributes(self):
+ return self.attributes
+ def set_attributes(self, attributes):
+ self.attributes = attributes
+ 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_typeconstraint(self):
+ return self.typeconstraint
+ def set_typeconstraint(self, typeconstraint):
+ self.typeconstraint = typeconstraint
+ def get_briefdescription(self):
+ return self.briefdescription
+ def set_briefdescription(self, briefdescription):
+ self.briefdescription = briefdescription
+ def hasContent_(self):
+ if (
+ self.attributes is not None or
+ 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.typeconstraint is not None or
+ self.briefdescription is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='paramType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('paramType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'paramType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='paramType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='paramType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='paramType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='paramType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.attributes is not None:
+ namespaceprefix_ = self.attributes_nsprefix_ + ':' if (UseCapturedNS_ and self.attributes_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sattributes>%s</%sattributes>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.attributes), input_name='attributes')), namespaceprefix_ , eol_))
+ if self.type_ is not None:
+ namespaceprefix_ = self.type__nsprefix_ + ':' if (UseCapturedNS_ and self.type__nsprefix_) else ''
+ self.type_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='type', pretty_print=pretty_print)
+ if self.declname is not None:
+ namespaceprefix_ = self.declname_nsprefix_ + ':' if (UseCapturedNS_ and self.declname_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdeclname>%s</%sdeclname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.declname), input_name='declname')), namespaceprefix_ , eol_))
+ if self.defname is not None:
+ namespaceprefix_ = self.defname_nsprefix_ + ':' if (UseCapturedNS_ and self.defname_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdefname>%s</%sdefname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.defname), input_name='defname')), namespaceprefix_ , eol_))
+ if self.array is not None:
+ namespaceprefix_ = self.array_nsprefix_ + ':' if (UseCapturedNS_ and self.array_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sarray>%s</%sarray>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.array), input_name='array')), namespaceprefix_ , eol_))
+ if self.defval is not None:
+ namespaceprefix_ = self.defval_nsprefix_ + ':' if (UseCapturedNS_ and self.defval_nsprefix_) else ''
+ self.defval.export(outfile, level, namespaceprefix_, namespacedef_='', name_='defval', pretty_print=pretty_print)
+ if self.typeconstraint is not None:
+ namespaceprefix_ = self.typeconstraint_nsprefix_ + ':' if (UseCapturedNS_ and self.typeconstraint_nsprefix_) else ''
+ self.typeconstraint.export(outfile, level, namespaceprefix_, namespacedef_='', name_='typeconstraint', pretty_print=pretty_print)
+ if self.briefdescription is not None:
+ namespaceprefix_ = self.briefdescription_nsprefix_ + ':' if (UseCapturedNS_ and self.briefdescription_nsprefix_) else ''
+ self.briefdescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='briefdescription', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'attributes':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'attributes')
+ value_ = self.gds_validate_string(value_, node, 'attributes')
+ self.attributes = value_
+ self.attributes_nsprefix_ = child_.prefix
+ elif nodeName_ == 'type':
+ obj_ = linkedTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.type_ = obj_
+ obj_.original_tagname_ = 'type'
+ elif nodeName_ == 'declname':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'declname')
+ value_ = self.gds_validate_string(value_, node, 'declname')
+ self.declname = value_
+ self.declname_nsprefix_ = child_.prefix
+ elif nodeName_ == 'defname':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'defname')
+ value_ = self.gds_validate_string(value_, node, 'defname')
+ self.defname = value_
+ self.defname_nsprefix_ = child_.prefix
+ elif nodeName_ == 'array':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'array')
+ value_ = self.gds_validate_string(value_, node, 'array')
+ self.array = value_
+ self.array_nsprefix_ = child_.prefix
+ elif nodeName_ == 'defval':
+ obj_ = linkedTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.defval = obj_
+ obj_.original_tagname_ = 'defval'
+ elif nodeName_ == 'typeconstraint':
+ obj_ = linkedTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.typeconstraint = obj_
+ obj_.original_tagname_ = 'typeconstraint'
+ elif nodeName_ == 'briefdescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.briefdescription = obj_
+ obj_.original_tagname_ = 'briefdescription'
+# end class paramType
+
+
+class attributes(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, attributes)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if attributes.subclass:
+ return attributes.subclass(*args_, **kwargs_)
+ else:
+ return attributes(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='attributes', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('attributes')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'attributes':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='attributes')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='attributes', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='attributes'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='attributes', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class attributes
+
+
+class declname(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, declname)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if declname.subclass:
+ return declname.subclass(*args_, **kwargs_)
+ else:
+ return declname(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='declname', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('declname')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'declname':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='declname')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='declname', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='declname'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='declname', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class declname
+
+
+class defname(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, defname)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if defname.subclass:
+ return defname.subclass(*args_, **kwargs_)
+ else:
+ return defname(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='defname', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('defname')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'defname':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='defname')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='defname', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='defname'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='defname', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class defname
+
+
+class array(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, array)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if array.subclass:
+ return array.subclass(*args_, **kwargs_)
+ else:
+ return array(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='array', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('array')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'array':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='array')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='array', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='array'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='array', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class array
+
+
+class linkedTextType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, ref=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, linkedTextType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if linkedTextType.subclass:
+ return linkedTextType.subclass(*args_, **kwargs_)
+ else:
+ return linkedTextType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ref or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='linkedTextType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('linkedTextType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'linkedTextType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='linkedTextType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='linkedTextType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='linkedTextType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='linkedTextType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ref':
+ obj_ = refTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class linkedTextType
+
+
+class graphType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, node=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if node is None:
+ self.node = []
+ else:
+ self.node = node
+ self.node_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, graphType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if graphType.subclass:
+ return graphType.subclass(*args_, **kwargs_)
+ else:
+ return graphType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.node.insert(index, value)
+ def replace_node_at(self, index, value):
+ self.node[index] = value
+ def hasContent_(self):
+ if (
+ self.node
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='graphType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('graphType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'graphType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='graphType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='graphType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='graphType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='graphType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for node_ in self.node:
+ namespaceprefix_ = self.node_nsprefix_ + ':' if (UseCapturedNS_ and self.node_nsprefix_) else ''
+ node_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='node', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'node':
+ obj_ = nodeType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.node.append(obj_)
+ obj_.original_tagname_ = 'node'
+# end class graphType
+
+
+class nodeType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, label=None, link=None, childnode=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.label = label
+ self.label_nsprefix_ = None
+ self.link = link
+ self.link_nsprefix_ = None
+ if childnode is None:
+ self.childnode = []
+ else:
+ self.childnode = childnode
+ self.childnode_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, nodeType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if nodeType.subclass:
+ return nodeType.subclass(*args_, **kwargs_)
+ else:
+ return nodeType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.childnode.insert(index, value)
+ def replace_childnode_at(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
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='nodeType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('nodeType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'nodeType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='nodeType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='nodeType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='nodeType'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='nodeType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.label is not None:
+ namespaceprefix_ = self.label_nsprefix_ + ':' if (UseCapturedNS_ and self.label_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slabel>%s</%slabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.label), input_name='label')), namespaceprefix_ , eol_))
+ if self.link is not None:
+ namespaceprefix_ = self.link_nsprefix_ + ':' if (UseCapturedNS_ and self.link_nsprefix_) else ''
+ self.link.export(outfile, level, namespaceprefix_, namespacedef_='', name_='link', pretty_print=pretty_print)
+ for childnode_ in self.childnode:
+ namespaceprefix_ = self.childnode_nsprefix_ + ':' if (UseCapturedNS_ and self.childnode_nsprefix_) else ''
+ childnode_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='childnode', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'label':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'label')
+ value_ = self.gds_validate_string(value_, node, 'label')
+ self.label = value_
+ self.label_nsprefix_ = child_.prefix
+ elif nodeName_ == 'link':
+ obj_ = linkType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.link = obj_
+ obj_.original_tagname_ = 'link'
+ elif nodeName_ == 'childnode':
+ obj_ = childnodeType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.childnode.append(obj_)
+ obj_.original_tagname_ = 'childnode'
+# end class nodeType
+
+
+class label(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, label)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if label.subclass:
+ return label.subclass(*args_, **kwargs_)
+ else:
+ return label(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='label', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('label')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'label':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='label')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='label', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='label'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='label', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class label
+
+
+class childnodeType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, relation=None, edgelabel=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.relation = _cast(None, relation)
+ self.relation_nsprefix_ = None
+ if edgelabel is None:
+ self.edgelabel = []
+ else:
+ self.edgelabel = edgelabel
+ self.edgelabel_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, childnodeType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if childnodeType.subclass:
+ return childnodeType.subclass(*args_, **kwargs_)
+ else:
+ return childnodeType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.edgelabel.insert(index, value)
+ def replace_edgelabel_at(self, index, value):
+ self.edgelabel[index] = value
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_relation(self):
+ return self.relation
+ def set_relation(self, relation):
+ self.relation = relation
+ def validate_DoxGraphRelation(self, value):
+ # Validate type DoxGraphRelation, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['include', 'usage', 'template-instance', 'public-inheritance', 'protected-inheritance', 'private-inheritance', 'type-constraint']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxGraphRelation' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.edgelabel
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='childnodeType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('childnodeType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'childnodeType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='childnodeType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='childnodeType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='childnodeType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.relation is not None and 'relation' not in already_processed:
+ already_processed.add('relation')
+ outfile.write(' relation=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.relation), input_name='relation')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='childnodeType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for edgelabel_ in self.edgelabel:
+ namespaceprefix_ = self.edgelabel_nsprefix_ + ':' if (UseCapturedNS_ and self.edgelabel_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sedgelabel>%s</%sedgelabel>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(edgelabel_), input_name='edgelabel')), namespaceprefix_ , eol_))
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('relation', node)
+ if value is not None and 'relation' not in already_processed:
+ already_processed.add('relation')
+ self.relation = value
+ self.validate_DoxGraphRelation(self.relation) # validate type DoxGraphRelation
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'edgelabel':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'edgelabel')
+ value_ = self.gds_validate_string(value_, node, 'edgelabel')
+ self.edgelabel.append(value_)
+ self.edgelabel_nsprefix_ = child_.prefix
+# end class childnodeType
+
+
+class edgelabel(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, edgelabel)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if edgelabel.subclass:
+ return edgelabel.subclass(*args_, **kwargs_)
+ else:
+ return edgelabel(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='edgelabel', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('edgelabel')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'edgelabel':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='edgelabel')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='edgelabel', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='edgelabel'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='edgelabel', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class edgelabel
+
+
+class linkType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, external=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.external = _cast(None, external)
+ self.external_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, linkType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if linkType.subclass:
+ return linkType.subclass(*args_, **kwargs_)
+ else:
+ return linkType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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 hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='linkType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('linkType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'linkType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='linkType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='linkType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='linkType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.external is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ outfile.write(' external=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.external), input_name='external')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='linkType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('external', node)
+ if value is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ self.external = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class linkType
+
+
+class listingType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, filename=None, codeline=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.filename = _cast(None, filename)
+ self.filename_nsprefix_ = None
+ if codeline is None:
+ self.codeline = []
+ else:
+ self.codeline = codeline
+ self.codeline_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, listingType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if listingType.subclass:
+ return listingType.subclass(*args_, **kwargs_)
+ else:
+ return listingType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.codeline.insert(index, value)
+ def replace_codeline_at(self, index, value):
+ self.codeline[index] = value
+ def get_filename(self):
+ return self.filename
+ def set_filename(self, filename):
+ self.filename = filename
+ def hasContent_(self):
+ if (
+ self.codeline
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='listingType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('listingType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'listingType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='listingType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='listingType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='listingType'):
+ if self.filename is not None and 'filename' not in already_processed:
+ already_processed.add('filename')
+ outfile.write(' filename=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.filename), input_name='filename')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='listingType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for codeline_ in self.codeline:
+ namespaceprefix_ = self.codeline_nsprefix_ + ':' if (UseCapturedNS_ and self.codeline_nsprefix_) else ''
+ codeline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='codeline', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('filename', node)
+ if value is not None and 'filename' not in already_processed:
+ already_processed.add('filename')
+ self.filename = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'codeline':
+ obj_ = codelineType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.codeline.append(obj_)
+ obj_.original_tagname_ = 'codeline'
+# end class listingType
+
+
+class codelineType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, lineno=None, refid=None, refkind=None, external=None, highlight=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.lineno = _cast(int, lineno)
+ self.lineno_nsprefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.refkind = _cast(None, refkind)
+ self.refkind_nsprefix_ = None
+ self.external = _cast(None, external)
+ self.external_nsprefix_ = None
+ if highlight is None:
+ self.highlight = []
+ else:
+ self.highlight = highlight
+ self.highlight_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, codelineType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if codelineType.subclass:
+ return codelineType.subclass(*args_, **kwargs_)
+ else:
+ return codelineType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.highlight.insert(index, value)
+ def replace_highlight_at(self, index, value):
+ self.highlight[index] = value
+ def get_lineno(self):
+ return self.lineno
+ def set_lineno(self, lineno):
+ self.lineno = lineno
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_refkind(self):
+ return self.refkind
+ def set_refkind(self, refkind):
+ self.refkind = refkind
+ def get_external(self):
+ return self.external
+ def set_external(self, external):
+ self.external = external
+ def validate_DoxRefKind(self, value):
+ # Validate type DoxRefKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['compound', 'member']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxRefKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxBool(self, value):
+ # Validate type DoxBool, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['yes', 'no']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxBool' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.highlight
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='codelineType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('codelineType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'codelineType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='codelineType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='codelineType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='codelineType'):
+ if self.lineno is not None and 'lineno' not in already_processed:
+ already_processed.add('lineno')
+ outfile.write(' lineno="%s"' % self.gds_format_integer(self.lineno, input_name='lineno'))
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.refkind is not None and 'refkind' not in already_processed:
+ already_processed.add('refkind')
+ outfile.write(' refkind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refkind), input_name='refkind')), ))
+ if self.external is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ outfile.write(' external=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.external), input_name='external')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='codelineType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for highlight_ in self.highlight:
+ namespaceprefix_ = self.highlight_nsprefix_ + ':' if (UseCapturedNS_ and self.highlight_nsprefix_) else ''
+ highlight_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='highlight', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('lineno', node)
+ if value is not None and 'lineno' not in already_processed:
+ already_processed.add('lineno')
+ self.lineno = self.gds_parse_integer(value, node, 'lineno')
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('refkind', node)
+ if value is not None and 'refkind' not in already_processed:
+ already_processed.add('refkind')
+ self.refkind = value
+ self.validate_DoxRefKind(self.refkind) # validate type DoxRefKind
+ value = find_attr_value_('external', node)
+ if value is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ self.external = value
+ self.validate_DoxBool(self.external) # validate type DoxBool
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'highlight':
+ obj_ = highlightType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.highlight.append(obj_)
+ obj_.original_tagname_ = 'highlight'
+# end class codelineType
+
+
+class highlightType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, class_=None, sp=None, ref=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.class_ = _cast(None, class_)
+ self.class__nsprefix_ = None
+ if sp is None:
+ self.sp = []
+ else:
+ self.sp = sp
+ self.sp_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, highlightType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if highlightType.subclass:
+ return highlightType.subclass(*args_, **kwargs_)
+ else:
+ return highlightType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.sp.insert(index, value)
+ def replace_sp_at(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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_class(self):
+ return self.class_
+ def set_class(self, class_):
+ self.class_ = class_
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxHighlightClass(self, value):
+ # Validate type DoxHighlightClass, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['comment', 'normal', 'preprocessor', 'keyword', 'keywordtype', 'keywordflow', 'stringliteral', 'charliteral', 'vhdlkeyword', 'vhdllogic', 'vhdlchar', 'vhdldigit']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxHighlightClass' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.sp or
+ self.ref or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='highlightType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('highlightType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'highlightType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='highlightType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='highlightType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='highlightType'):
+ if self.class_ is not None and 'class_' not in already_processed:
+ already_processed.add('class_')
+ outfile.write(' class=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.class_), input_name='class')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='highlightType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for sp_ in self.sp:
+ namespaceprefix_ = self.sp_nsprefix_ + ':' if (UseCapturedNS_ and self.sp_nsprefix_) else ''
+ sp_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sp', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('class', node)
+ if value is not None and 'class' not in already_processed:
+ already_processed.add('class')
+ self.class_ = value
+ self.validate_DoxHighlightClass(self.class_) # validate type DoxHighlightClass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'sp':
+ obj_ = spType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sp', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sp'):
+ self.add_sp(obj_.value)
+ elif hasattr(self, 'set_sp'):
+ self.set_sp(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = refTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class highlightType
+
+
+class spType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, value=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.value = _cast(int, value)
+ self.value_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, spType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if spType.subclass:
+ return spType.subclass(*args_, **kwargs_)
+ else:
+ return spType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_value(self):
+ return self.value
+ def set_value(self, value):
+ self.value = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='spType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('spType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'spType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='spType')
+ outfile.write('>')
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_, pretty_print=pretty_print)
+ outfile.write(self.convert_unicode(self.valueOf_))
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='spType'):
+ if self.value is not None and 'value' not in already_processed:
+ already_processed.add('value')
+ outfile.write(' value="%s"' % self.gds_format_integer(self.value, input_name='value'))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='spType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('value', node)
+ if value is not None and 'value' not in already_processed:
+ already_processed.add('value')
+ self.value = self.gds_parse_integer(value, node, 'value')
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+ pass
+# end class spType
+
+
+class referenceType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, compoundref=None, startline=None, endline=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.compoundref = _cast(None, compoundref)
+ self.compoundref_nsprefix_ = None
+ self.startline = _cast(int, startline)
+ self.startline_nsprefix_ = None
+ self.endline = _cast(int, endline)
+ self.endline_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, referenceType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if referenceType.subclass:
+ return referenceType.subclass(*args_, **kwargs_)
+ else:
+ return referenceType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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 get_startline(self):
+ return self.startline
+ def set_startline(self, startline):
+ self.startline = startline
+ def get_endline(self):
+ return self.endline
+ def set_endline(self, endline):
+ self.endline = endline
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='referenceType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('referenceType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'referenceType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='referenceType')
+ outfile.write('>')
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_, pretty_print=pretty_print)
+ outfile.write(self.convert_unicode(self.valueOf_))
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='referenceType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.compoundref is not None and 'compoundref' not in already_processed:
+ already_processed.add('compoundref')
+ outfile.write(' compoundref=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.compoundref), input_name='compoundref')), ))
+ if self.startline is not None and 'startline' not in already_processed:
+ already_processed.add('startline')
+ outfile.write(' startline="%s"' % self.gds_format_integer(self.startline, input_name='startline'))
+ if self.endline is not None and 'endline' not in already_processed:
+ already_processed.add('endline')
+ outfile.write(' endline="%s"' % self.gds_format_integer(self.endline, input_name='endline'))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='referenceType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('compoundref', node)
+ if value is not None and 'compoundref' not in already_processed:
+ already_processed.add('compoundref')
+ self.compoundref = value
+ value = find_attr_value_('startline', node)
+ if value is not None and 'startline' not in already_processed:
+ already_processed.add('startline')
+ self.startline = self.gds_parse_integer(value, node, 'startline')
+ value = find_attr_value_('endline', node)
+ if value is not None and 'endline' not in already_processed:
+ already_processed.add('endline')
+ self.endline = self.gds_parse_integer(value, node, 'endline')
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+ pass
+# end class referenceType
+
+
+class locationType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, file=None, line=None, column=None, declfile=None, declline=None, declcolumn=None, bodyfile=None, bodystart=None, bodyend=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.file = _cast(None, file)
+ self.file_nsprefix_ = None
+ self.line = _cast(int, line)
+ self.line_nsprefix_ = None
+ self.column = _cast(int, column)
+ self.column_nsprefix_ = None
+ self.declfile = _cast(None, declfile)
+ self.declfile_nsprefix_ = None
+ self.declline = _cast(int, declline)
+ self.declline_nsprefix_ = None
+ self.declcolumn = _cast(int, declcolumn)
+ self.declcolumn_nsprefix_ = None
+ self.bodyfile = _cast(None, bodyfile)
+ self.bodyfile_nsprefix_ = None
+ self.bodystart = _cast(int, bodystart)
+ self.bodystart_nsprefix_ = None
+ self.bodyend = _cast(int, bodyend)
+ self.bodyend_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, locationType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if locationType.subclass:
+ return locationType.subclass(*args_, **kwargs_)
+ else:
+ return locationType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_file(self):
+ return self.file
+ def set_file(self, file):
+ self.file = file
+ def get_line(self):
+ return self.line
+ def set_line(self, line):
+ self.line = line
+ def get_column(self):
+ return self.column
+ def set_column(self, column):
+ self.column = column
+ def get_declfile(self):
+ return self.declfile
+ def set_declfile(self, declfile):
+ self.declfile = declfile
+ def get_declline(self):
+ return self.declline
+ def set_declline(self, declline):
+ self.declline = declline
+ def get_declcolumn(self):
+ return self.declcolumn
+ def set_declcolumn(self, declcolumn):
+ self.declcolumn = declcolumn
+ def get_bodyfile(self):
+ return self.bodyfile
+ def set_bodyfile(self, bodyfile):
+ self.bodyfile = bodyfile
+ def get_bodystart(self):
+ return self.bodystart
+ def set_bodystart(self, bodystart):
+ self.bodystart = bodystart
+ def get_bodyend(self):
+ return self.bodyend
+ def set_bodyend(self, bodyend):
+ self.bodyend = bodyend
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='locationType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('locationType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'locationType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='locationType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='locationType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='locationType'):
+ if self.file is not None and 'file' not in already_processed:
+ already_processed.add('file')
+ outfile.write(' file=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.file), input_name='file')), ))
+ if self.line is not None and 'line' not in already_processed:
+ already_processed.add('line')
+ outfile.write(' line="%s"' % self.gds_format_integer(self.line, input_name='line'))
+ if self.column is not None and 'column' not in already_processed:
+ already_processed.add('column')
+ outfile.write(' column="%s"' % self.gds_format_integer(self.column, input_name='column'))
+ if self.declfile is not None and 'declfile' not in already_processed:
+ already_processed.add('declfile')
+ outfile.write(' declfile=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.declfile), input_name='declfile')), ))
+ if self.declline is not None and 'declline' not in already_processed:
+ already_processed.add('declline')
+ outfile.write(' declline="%s"' % self.gds_format_integer(self.declline, input_name='declline'))
+ if self.declcolumn is not None and 'declcolumn' not in already_processed:
+ already_processed.add('declcolumn')
+ outfile.write(' declcolumn="%s"' % self.gds_format_integer(self.declcolumn, input_name='declcolumn'))
+ if self.bodyfile is not None and 'bodyfile' not in already_processed:
+ already_processed.add('bodyfile')
+ outfile.write(' bodyfile=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.bodyfile), input_name='bodyfile')), ))
+ if self.bodystart is not None and 'bodystart' not in already_processed:
+ already_processed.add('bodystart')
+ outfile.write(' bodystart="%s"' % self.gds_format_integer(self.bodystart, input_name='bodystart'))
+ if self.bodyend is not None and 'bodyend' not in already_processed:
+ already_processed.add('bodyend')
+ outfile.write(' bodyend="%s"' % self.gds_format_integer(self.bodyend, input_name='bodyend'))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='locationType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('file', node)
+ if value is not None and 'file' not in already_processed:
+ already_processed.add('file')
+ self.file = value
+ value = find_attr_value_('line', node)
+ if value is not None and 'line' not in already_processed:
+ already_processed.add('line')
+ self.line = self.gds_parse_integer(value, node, 'line')
+ value = find_attr_value_('column', node)
+ if value is not None and 'column' not in already_processed:
+ already_processed.add('column')
+ self.column = self.gds_parse_integer(value, node, 'column')
+ value = find_attr_value_('declfile', node)
+ if value is not None and 'declfile' not in already_processed:
+ already_processed.add('declfile')
+ self.declfile = value
+ value = find_attr_value_('declline', node)
+ if value is not None and 'declline' not in already_processed:
+ already_processed.add('declline')
+ self.declline = self.gds_parse_integer(value, node, 'declline')
+ value = find_attr_value_('declcolumn', node)
+ if value is not None and 'declcolumn' not in already_processed:
+ already_processed.add('declcolumn')
+ self.declcolumn = self.gds_parse_integer(value, node, 'declcolumn')
+ value = find_attr_value_('bodyfile', node)
+ if value is not None and 'bodyfile' not in already_processed:
+ already_processed.add('bodyfile')
+ self.bodyfile = value
+ value = find_attr_value_('bodystart', node)
+ if value is not None and 'bodystart' not in already_processed:
+ already_processed.add('bodystart')
+ self.bodystart = self.gds_parse_integer(value, node, 'bodystart')
+ value = find_attr_value_('bodyend', node)
+ if value is not None and 'bodyend' not in already_processed:
+ already_processed.add('bodyend')
+ self.bodyend = self.gds_parse_integer(value, node, 'bodyend')
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class locationType
+
+
+class docSect1Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, title=None, para=None, internal=None, sect2=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.title = title
+ self.title_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if internal is None:
+ self.internal = []
+ else:
+ self.internal = internal
+ self.internal_nsprefix_ = None
+ if sect2 is None:
+ self.sect2 = []
+ else:
+ self.sect2 = sect2
+ self.sect2_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docSect1Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docSect1Type.subclass:
+ return docSect1Type.subclass(*args_, **kwargs_)
+ else:
+ return docSect1Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def get_internal(self):
+ return self.internal
+ def set_internal(self, internal):
+ self.internal = internal
+ def add_internal(self, value):
+ self.internal.append(value)
+ def insert_internal_at(self, index, value):
+ self.internal.insert(index, value)
+ def replace_internal_at(self, index, value):
+ self.internal[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_at(self, index, value):
+ self.sect2.insert(index, value)
+ def replace_sect2_at(self, index, value):
+ self.sect2[index] = value
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.title is not None or
+ self.para or
+ self.internal or
+ self.sect2 or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect1Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docSect1Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docSect1Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docSect1Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docSect1Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docSect1Type'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect1Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.title is not None:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%stitle>%s</%stitle>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.title), input_name='title')), namespaceprefix_ , eol_))
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for internal_ in self.internal:
+ namespaceprefix_ = self.internal_nsprefix_ + ':' if (UseCapturedNS_ and self.internal_nsprefix_) else ''
+ internal_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='internal', pretty_print=pretty_print)
+ for sect2_ in self.sect2:
+ namespaceprefix_ = self.sect2_nsprefix_ + ':' if (UseCapturedNS_ and self.sect2_nsprefix_) else ''
+ sect2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect2', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'title' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'title')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'title')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'title', valuestr_)
+ self.content_.append(obj_)
+ self.title_nsprefix_ = child_.prefix
+ elif nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'internal':
+ obj_ = docInternalS1Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'internal', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_internal'):
+ self.add_internal(obj_.value)
+ elif hasattr(self, 'set_internal'):
+ self.set_internal(obj_.value)
+ elif nodeName_ == 'sect2':
+ obj_ = docSect2Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect2', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect2'):
+ self.add_sect2(obj_.value)
+ elif hasattr(self, 'set_sect2'):
+ self.set_sect2(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docSect1Type
+
+
+class docSect2Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, title=None, para=None, sect3=None, internal=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.title = title
+ self.title_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if sect3 is None:
+ self.sect3 = []
+ else:
+ self.sect3 = sect3
+ self.sect3_nsprefix_ = None
+ if internal is None:
+ self.internal = []
+ else:
+ self.internal = internal
+ self.internal_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docSect2Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docSect2Type.subclass:
+ return docSect2Type.subclass(*args_, **kwargs_)
+ else:
+ return docSect2Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(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_at(self, index, value):
+ self.sect3.insert(index, value)
+ def replace_sect3_at(self, index, value):
+ self.sect3[index] = value
+ def get_internal(self):
+ return self.internal
+ def set_internal(self, internal):
+ self.internal = internal
+ def add_internal(self, value):
+ self.internal.append(value)
+ def insert_internal_at(self, index, value):
+ self.internal.insert(index, value)
+ def replace_internal_at(self, index, value):
+ self.internal[index] = value
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.title is not None or
+ self.para or
+ self.sect3 or
+ self.internal or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect2Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docSect2Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docSect2Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docSect2Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docSect2Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docSect2Type'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect2Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.title is not None:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%stitle>%s</%stitle>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.title), input_name='title')), namespaceprefix_ , eol_))
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for sect3_ in self.sect3:
+ namespaceprefix_ = self.sect3_nsprefix_ + ':' if (UseCapturedNS_ and self.sect3_nsprefix_) else ''
+ sect3_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect3', pretty_print=pretty_print)
+ for internal_ in self.internal:
+ namespaceprefix_ = self.internal_nsprefix_ + ':' if (UseCapturedNS_ and self.internal_nsprefix_) else ''
+ internal_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='internal', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'title' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'title')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'title')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'title', valuestr_)
+ self.content_.append(obj_)
+ self.title_nsprefix_ = child_.prefix
+ elif nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'sect3':
+ obj_ = docSect3Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect3', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect3'):
+ self.add_sect3(obj_.value)
+ elif hasattr(self, 'set_sect3'):
+ self.set_sect3(obj_.value)
+ elif nodeName_ == 'internal':
+ obj_ = docInternalS2Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'internal', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_internal'):
+ self.add_internal(obj_.value)
+ elif hasattr(self, 'set_internal'):
+ self.set_internal(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docSect2Type
+
+
+class docSect3Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, title=None, para=None, sect4=None, internal=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.title = title
+ self.title_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if sect4 is None:
+ self.sect4 = []
+ else:
+ self.sect4 = sect4
+ self.sect4_nsprefix_ = None
+ if internal is None:
+ self.internal = []
+ else:
+ self.internal = internal
+ self.internal_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docSect3Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docSect3Type.subclass:
+ return docSect3Type.subclass(*args_, **kwargs_)
+ else:
+ return docSect3Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(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_at(self, index, value):
+ self.sect4.insert(index, value)
+ def replace_sect4_at(self, index, value):
+ self.sect4[index] = value
+ def get_internal(self):
+ return self.internal
+ def set_internal(self, internal):
+ self.internal = internal
+ def add_internal(self, value):
+ self.internal.append(value)
+ def insert_internal_at(self, index, value):
+ self.internal.insert(index, value)
+ def replace_internal_at(self, index, value):
+ self.internal[index] = value
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.title is not None or
+ self.para or
+ self.sect4 or
+ self.internal or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect3Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docSect3Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docSect3Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docSect3Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docSect3Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docSect3Type'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect3Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.title is not None:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%stitle>%s</%stitle>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.title), input_name='title')), namespaceprefix_ , eol_))
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for sect4_ in self.sect4:
+ namespaceprefix_ = self.sect4_nsprefix_ + ':' if (UseCapturedNS_ and self.sect4_nsprefix_) else ''
+ sect4_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect4', pretty_print=pretty_print)
+ for internal_ in self.internal:
+ namespaceprefix_ = self.internal_nsprefix_ + ':' if (UseCapturedNS_ and self.internal_nsprefix_) else ''
+ internal_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='internal', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'title' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'title')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'title')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'title', valuestr_)
+ self.content_.append(obj_)
+ self.title_nsprefix_ = child_.prefix
+ elif nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'sect4':
+ obj_ = docSect4Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect4', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect4'):
+ self.add_sect4(obj_.value)
+ elif hasattr(self, 'set_sect4'):
+ self.set_sect4(obj_.value)
+ elif nodeName_ == 'internal':
+ obj_ = docInternalS3Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'internal', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_internal'):
+ self.add_internal(obj_.value)
+ elif hasattr(self, 'set_internal'):
+ self.set_internal(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docSect3Type
+
+
+class docSect4Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, title=None, para=None, internal=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.title = title
+ self.title_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if internal is None:
+ self.internal = []
+ else:
+ self.internal = internal
+ self.internal_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docSect4Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docSect4Type.subclass:
+ return docSect4Type.subclass(*args_, **kwargs_)
+ else:
+ return docSect4Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def get_internal(self):
+ return self.internal
+ def set_internal(self, internal):
+ self.internal = internal
+ def add_internal(self, value):
+ self.internal.append(value)
+ def insert_internal_at(self, index, value):
+ self.internal.insert(index, value)
+ def replace_internal_at(self, index, value):
+ self.internal[index] = value
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.title is not None or
+ self.para or
+ self.internal or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect4Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docSect4Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docSect4Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docSect4Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docSect4Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docSect4Type'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSect4Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.title is not None:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%stitle>%s</%stitle>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.title), input_name='title')), namespaceprefix_ , eol_))
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for internal_ in self.internal:
+ namespaceprefix_ = self.internal_nsprefix_ + ':' if (UseCapturedNS_ and self.internal_nsprefix_) else ''
+ internal_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='internal', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'title' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'title')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'title')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'title', valuestr_)
+ self.content_.append(obj_)
+ self.title_nsprefix_ = child_.prefix
+ elif nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'internal':
+ obj_ = docInternalS4Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'internal', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_internal'):
+ self.add_internal(obj_.value)
+ elif hasattr(self, 'set_internal'):
+ self.set_internal(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docSect4Type
+
+
+class docInternalType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, sect1=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if sect1 is None:
+ self.sect1 = []
+ else:
+ self.sect1 = sect1
+ self.sect1_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docInternalType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docInternalType.subclass:
+ return docInternalType.subclass(*args_, **kwargs_)
+ else:
+ return docInternalType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(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_at(self, index, value):
+ self.sect1.insert(index, value)
+ def replace_sect1_at(self, index, value):
+ self.sect1[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.para or
+ self.sect1 or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docInternalType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docInternalType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docInternalType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docInternalType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docInternalType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for sect1_ in self.sect1:
+ namespaceprefix_ = self.sect1_nsprefix_ + ':' if (UseCapturedNS_ and self.sect1_nsprefix_) else ''
+ sect1_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect1', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'sect1':
+ obj_ = docSect1Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect1', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect1'):
+ self.add_sect1(obj_.value)
+ elif hasattr(self, 'set_sect1'):
+ self.set_sect1(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docInternalType
+
+
+class docInternalS1Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, sect2=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if sect2 is None:
+ self.sect2 = []
+ else:
+ self.sect2 = sect2
+ self.sect2_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docInternalS1Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docInternalS1Type.subclass:
+ return docInternalS1Type.subclass(*args_, **kwargs_)
+ else:
+ return docInternalS1Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(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_at(self, index, value):
+ self.sect2.insert(index, value)
+ def replace_sect2_at(self, index, value):
+ self.sect2[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.para or
+ self.sect2 or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS1Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docInternalS1Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docInternalS1Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docInternalS1Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docInternalS1Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docInternalS1Type'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS1Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for sect2_ in self.sect2:
+ namespaceprefix_ = self.sect2_nsprefix_ + ':' if (UseCapturedNS_ and self.sect2_nsprefix_) else ''
+ sect2_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect2', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'sect2':
+ obj_ = docSect2Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect2', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect2'):
+ self.add_sect2(obj_.value)
+ elif hasattr(self, 'set_sect2'):
+ self.set_sect2(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docInternalS1Type
+
+
+class docInternalS2Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, sect3=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if sect3 is None:
+ self.sect3 = []
+ else:
+ self.sect3 = sect3
+ self.sect3_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docInternalS2Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docInternalS2Type.subclass:
+ return docInternalS2Type.subclass(*args_, **kwargs_)
+ else:
+ return docInternalS2Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(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_at(self, index, value):
+ self.sect3.insert(index, value)
+ def replace_sect3_at(self, index, value):
+ self.sect3[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.para or
+ self.sect3 or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS2Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docInternalS2Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docInternalS2Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docInternalS2Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docInternalS2Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docInternalS2Type'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS2Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for sect3_ in self.sect3:
+ namespaceprefix_ = self.sect3_nsprefix_ + ':' if (UseCapturedNS_ and self.sect3_nsprefix_) else ''
+ sect3_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect3', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'sect3':
+ obj_ = docSect3Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect3', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect3'):
+ self.add_sect3(obj_.value)
+ elif hasattr(self, 'set_sect3'):
+ self.set_sect3(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docInternalS2Type
+
+
+class docInternalS3Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, sect3=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if sect3 is None:
+ self.sect3 = []
+ else:
+ self.sect3 = sect3
+ self.sect3_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docInternalS3Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docInternalS3Type.subclass:
+ return docInternalS3Type.subclass(*args_, **kwargs_)
+ else:
+ return docInternalS3Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(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_at(self, index, value):
+ self.sect3.insert(index, value)
+ def replace_sect3_at(self, index, value):
+ self.sect3[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.para or
+ self.sect3 or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS3Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docInternalS3Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docInternalS3Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docInternalS3Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docInternalS3Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docInternalS3Type'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS3Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for sect3_ in self.sect3:
+ namespaceprefix_ = self.sect3_nsprefix_ + ':' if (UseCapturedNS_ and self.sect3_nsprefix_) else ''
+ sect3_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect3', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ elif nodeName_ == 'sect3':
+ obj_ = docSect4Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'sect3', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_sect3'):
+ self.add_sect3(obj_.value)
+ elif hasattr(self, 'set_sect3'):
+ self.set_sect3(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docInternalS3Type
+
+
+class docInternalS4Type(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docInternalS4Type)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docInternalS4Type.subclass:
+ return docInternalS4Type.subclass(*args_, **kwargs_)
+ else:
+ return docInternalS4Type(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.para or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS4Type', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docInternalS4Type')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docInternalS4Type':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docInternalS4Type')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docInternalS4Type', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docInternalS4Type'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docInternalS4Type', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'para', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_para'):
+ self.add_para(obj_.value)
+ elif hasattr(self, 'set_para'):
+ self.set_para(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docInternalS4Type
+
+
+class docTitleType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docTitleType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docTitleType.subclass:
+ return docTitleType.subclass(*args_, **kwargs_)
+ else:
+ return docTitleType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTitleType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docTitleType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docTitleType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docTitleType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docTitleType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docTitleType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTitleType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docTitleType
+
+
+class docParaType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, hruler=None, preformatted=None, programlisting=None, verbatim=None, indexentry=None, orderedlist=None, itemizedlist=None, simplesect=None, title=None, variablelist=None, table=None, heading=None, dotfile=None, mscfile=None, diafile=None, toclist=None, language=None, parameterlist=None, xrefsect=None, copydoc=None, blockquote=None, parblock=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ if hruler is None:
+ self.hruler = []
+ else:
+ self.hruler = hruler
+ self.hruler_nsprefix_ = None
+ if preformatted is None:
+ self.preformatted = []
+ else:
+ self.preformatted = preformatted
+ self.preformatted_nsprefix_ = None
+ if programlisting is None:
+ self.programlisting = []
+ else:
+ self.programlisting = programlisting
+ self.programlisting_nsprefix_ = None
+ if verbatim is None:
+ self.verbatim = []
+ else:
+ self.verbatim = verbatim
+ self.verbatim_nsprefix_ = None
+ if indexentry is None:
+ self.indexentry = []
+ else:
+ self.indexentry = indexentry
+ self.indexentry_nsprefix_ = None
+ if orderedlist is None:
+ self.orderedlist = []
+ else:
+ self.orderedlist = orderedlist
+ self.orderedlist_nsprefix_ = None
+ if itemizedlist is None:
+ self.itemizedlist = []
+ else:
+ self.itemizedlist = itemizedlist
+ self.itemizedlist_nsprefix_ = None
+ if simplesect is None:
+ self.simplesect = []
+ else:
+ self.simplesect = simplesect
+ self.simplesect_nsprefix_ = None
+ if title is None:
+ self.title = []
+ else:
+ self.title = title
+ self.title_nsprefix_ = None
+ if variablelist is None:
+ self.variablelist = []
+ else:
+ self.variablelist = variablelist
+ self.variablelist_nsprefix_ = None
+ if table is None:
+ self.table = []
+ else:
+ self.table = table
+ self.table_nsprefix_ = None
+ if heading is None:
+ self.heading = []
+ else:
+ self.heading = heading
+ self.heading_nsprefix_ = None
+ if dotfile is None:
+ self.dotfile = []
+ else:
+ self.dotfile = dotfile
+ self.dotfile_nsprefix_ = None
+ if mscfile is None:
+ self.mscfile = []
+ else:
+ self.mscfile = mscfile
+ self.mscfile_nsprefix_ = None
+ if diafile is None:
+ self.diafile = []
+ else:
+ self.diafile = diafile
+ self.diafile_nsprefix_ = None
+ if toclist is None:
+ self.toclist = []
+ else:
+ self.toclist = toclist
+ self.toclist_nsprefix_ = None
+ if language is None:
+ self.language = []
+ else:
+ self.language = language
+ self.language_nsprefix_ = None
+ if parameterlist is None:
+ self.parameterlist = []
+ else:
+ self.parameterlist = parameterlist
+ self.parameterlist_nsprefix_ = None
+ if xrefsect is None:
+ self.xrefsect = []
+ else:
+ self.xrefsect = xrefsect
+ self.xrefsect_nsprefix_ = None
+ if copydoc is None:
+ self.copydoc = []
+ else:
+ self.copydoc = copydoc
+ self.copydoc_nsprefix_ = None
+ if blockquote is None:
+ self.blockquote = []
+ else:
+ self.blockquote = blockquote
+ self.blockquote_nsprefix_ = None
+ if parblock is None:
+ self.parblock = []
+ else:
+ self.parblock = parblock
+ self.parblock_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docParaType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docParaType.subclass:
+ return docParaType.subclass(*args_, **kwargs_)
+ else:
+ return docParaType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ def get_hruler(self):
+ return self.hruler
+ def set_hruler(self, hruler):
+ self.hruler = hruler
+ def add_hruler(self, value):
+ self.hruler.append(value)
+ def insert_hruler_at(self, index, value):
+ self.hruler.insert(index, value)
+ def replace_hruler_at(self, index, value):
+ self.hruler[index] = value
+ def get_preformatted(self):
+ return self.preformatted
+ def set_preformatted(self, preformatted):
+ self.preformatted = preformatted
+ def add_preformatted(self, value):
+ self.preformatted.append(value)
+ def insert_preformatted_at(self, index, value):
+ self.preformatted.insert(index, value)
+ def replace_preformatted_at(self, index, value):
+ self.preformatted[index] = value
+ def get_programlisting(self):
+ return self.programlisting
+ def set_programlisting(self, programlisting):
+ self.programlisting = programlisting
+ def add_programlisting(self, value):
+ self.programlisting.append(value)
+ def insert_programlisting_at(self, index, value):
+ self.programlisting.insert(index, value)
+ def replace_programlisting_at(self, index, value):
+ self.programlisting[index] = value
+ def get_verbatim(self):
+ return self.verbatim
+ def set_verbatim(self, verbatim):
+ self.verbatim = verbatim
+ def add_verbatim(self, value):
+ self.verbatim.append(value)
+ def insert_verbatim_at(self, index, value):
+ self.verbatim.insert(index, value)
+ def replace_verbatim_at(self, index, value):
+ self.verbatim[index] = value
+ def get_indexentry(self):
+ return self.indexentry
+ def set_indexentry(self, indexentry):
+ self.indexentry = indexentry
+ def add_indexentry(self, value):
+ self.indexentry.append(value)
+ def insert_indexentry_at(self, index, value):
+ self.indexentry.insert(index, value)
+ def replace_indexentry_at(self, index, value):
+ self.indexentry[index] = value
+ def get_orderedlist(self):
+ return self.orderedlist
+ def set_orderedlist(self, orderedlist):
+ self.orderedlist = orderedlist
+ def add_orderedlist(self, value):
+ self.orderedlist.append(value)
+ def insert_orderedlist_at(self, index, value):
+ self.orderedlist.insert(index, value)
+ def replace_orderedlist_at(self, index, value):
+ self.orderedlist[index] = value
+ def get_itemizedlist(self):
+ return self.itemizedlist
+ def set_itemizedlist(self, itemizedlist):
+ self.itemizedlist = itemizedlist
+ def add_itemizedlist(self, value):
+ self.itemizedlist.append(value)
+ def insert_itemizedlist_at(self, index, value):
+ self.itemizedlist.insert(index, value)
+ def replace_itemizedlist_at(self, index, value):
+ self.itemizedlist[index] = value
+ def get_simplesect(self):
+ return self.simplesect
+ def set_simplesect(self, simplesect):
+ self.simplesect = simplesect
+ def add_simplesect(self, value):
+ self.simplesect.append(value)
+ def insert_simplesect_at(self, index, value):
+ self.simplesect.insert(index, value)
+ def replace_simplesect_at(self, index, value):
+ self.simplesect[index] = value
+ def get_title(self):
+ return self.title
+ def set_title(self, title):
+ self.title = title
+ def add_title(self, value):
+ self.title.append(value)
+ def insert_title_at(self, index, value):
+ self.title.insert(index, value)
+ def replace_title_at(self, index, value):
+ self.title[index] = value
+ def get_variablelist(self):
+ return self.variablelist
+ def set_variablelist(self, variablelist):
+ self.variablelist = variablelist
+ def add_variablelist(self, value):
+ self.variablelist.append(value)
+ def insert_variablelist_at(self, index, value):
+ self.variablelist.insert(index, value)
+ def replace_variablelist_at(self, index, value):
+ self.variablelist[index] = value
+ def get_table(self):
+ return self.table
+ def set_table(self, table):
+ self.table = table
+ def add_table(self, value):
+ self.table.append(value)
+ def insert_table_at(self, index, value):
+ self.table.insert(index, value)
+ def replace_table_at(self, index, value):
+ self.table[index] = value
+ def get_heading(self):
+ return self.heading
+ def set_heading(self, heading):
+ self.heading = heading
+ def add_heading(self, value):
+ self.heading.append(value)
+ def insert_heading_at(self, index, value):
+ self.heading.insert(index, value)
+ def replace_heading_at(self, index, value):
+ self.heading[index] = value
+ def get_dotfile(self):
+ return self.dotfile
+ def set_dotfile(self, dotfile):
+ self.dotfile = dotfile
+ def add_dotfile(self, value):
+ self.dotfile.append(value)
+ def insert_dotfile_at(self, index, value):
+ self.dotfile.insert(index, value)
+ def replace_dotfile_at(self, index, value):
+ self.dotfile[index] = value
+ def get_mscfile(self):
+ return self.mscfile
+ def set_mscfile(self, mscfile):
+ self.mscfile = mscfile
+ def add_mscfile(self, value):
+ self.mscfile.append(value)
+ def insert_mscfile_at(self, index, value):
+ self.mscfile.insert(index, value)
+ def replace_mscfile_at(self, index, value):
+ self.mscfile[index] = value
+ def get_diafile(self):
+ return self.diafile
+ def set_diafile(self, diafile):
+ self.diafile = diafile
+ def add_diafile(self, value):
+ self.diafile.append(value)
+ def insert_diafile_at(self, index, value):
+ self.diafile.insert(index, value)
+ def replace_diafile_at(self, index, value):
+ self.diafile[index] = value
+ def get_toclist(self):
+ return self.toclist
+ def set_toclist(self, toclist):
+ self.toclist = toclist
+ def add_toclist(self, value):
+ self.toclist.append(value)
+ def insert_toclist_at(self, index, value):
+ self.toclist.insert(index, value)
+ def replace_toclist_at(self, index, value):
+ self.toclist[index] = value
+ def get_language(self):
+ return self.language
+ def set_language(self, language):
+ self.language = language
+ def add_language(self, value):
+ self.language.append(value)
+ def insert_language_at(self, index, value):
+ self.language.insert(index, value)
+ def replace_language_at(self, index, value):
+ self.language[index] = value
+ def get_parameterlist(self):
+ return self.parameterlist
+ def set_parameterlist(self, parameterlist):
+ self.parameterlist = parameterlist
+ def add_parameterlist(self, value):
+ self.parameterlist.append(value)
+ def insert_parameterlist_at(self, index, value):
+ self.parameterlist.insert(index, value)
+ def replace_parameterlist_at(self, index, value):
+ self.parameterlist[index] = value
+ def get_xrefsect(self):
+ return self.xrefsect
+ def set_xrefsect(self, xrefsect):
+ self.xrefsect = xrefsect
+ def add_xrefsect(self, value):
+ self.xrefsect.append(value)
+ def insert_xrefsect_at(self, index, value):
+ self.xrefsect.insert(index, value)
+ def replace_xrefsect_at(self, index, value):
+ self.xrefsect[index] = value
+ def get_copydoc(self):
+ return self.copydoc
+ def set_copydoc(self, copydoc):
+ self.copydoc = copydoc
+ def add_copydoc(self, value):
+ self.copydoc.append(value)
+ def insert_copydoc_at(self, index, value):
+ self.copydoc.insert(index, value)
+ def replace_copydoc_at(self, index, value):
+ self.copydoc[index] = value
+ def get_blockquote(self):
+ return self.blockquote
+ def set_blockquote(self, blockquote):
+ self.blockquote = blockquote
+ def add_blockquote(self, value):
+ self.blockquote.append(value)
+ def insert_blockquote_at(self, index, value):
+ self.blockquote.insert(index, value)
+ def replace_blockquote_at(self, index, value):
+ self.blockquote[index] = value
+ def get_parblock(self):
+ return self.parblock
+ def set_parblock(self, parblock):
+ self.parblock = parblock
+ def add_parblock(self, value):
+ self.parblock.append(value)
+ def insert_parblock_at(self, index, value):
+ self.parblock.insert(index, value)
+ def replace_parblock_at(self, index, value):
+ self.parblock[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ self.hruler or
+ self.preformatted or
+ self.programlisting or
+ self.verbatim or
+ self.indexentry or
+ self.orderedlist or
+ self.itemizedlist or
+ self.simplesect or
+ self.title or
+ self.variablelist or
+ self.table or
+ self.heading or
+ self.dotfile or
+ self.mscfile or
+ self.diafile or
+ self.toclist or
+ self.language or
+ self.parameterlist or
+ self.xrefsect or
+ self.copydoc or
+ self.blockquote or
+ self.parblock or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParaType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docParaType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docParaType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docParaType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docParaType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docParaType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParaType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ for hruler_ in self.hruler:
+ namespaceprefix_ = self.hruler_nsprefix_ + ':' if (UseCapturedNS_ and self.hruler_nsprefix_) else ''
+ hruler_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='hruler', pretty_print=pretty_print)
+ for preformatted_ in self.preformatted:
+ namespaceprefix_ = self.preformatted_nsprefix_ + ':' if (UseCapturedNS_ and self.preformatted_nsprefix_) else ''
+ preformatted_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='preformatted', pretty_print=pretty_print)
+ for programlisting_ in self.programlisting:
+ namespaceprefix_ = self.programlisting_nsprefix_ + ':' if (UseCapturedNS_ and self.programlisting_nsprefix_) else ''
+ programlisting_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='programlisting', pretty_print=pretty_print)
+ for verbatim_ in self.verbatim:
+ namespaceprefix_ = self.verbatim_nsprefix_ + ':' if (UseCapturedNS_ and self.verbatim_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sverbatim>%s</%sverbatim>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(verbatim_), input_name='verbatim')), namespaceprefix_ , eol_))
+ for indexentry_ in self.indexentry:
+ namespaceprefix_ = self.indexentry_nsprefix_ + ':' if (UseCapturedNS_ and self.indexentry_nsprefix_) else ''
+ indexentry_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='indexentry', pretty_print=pretty_print)
+ for orderedlist_ in self.orderedlist:
+ namespaceprefix_ = self.orderedlist_nsprefix_ + ':' if (UseCapturedNS_ and self.orderedlist_nsprefix_) else ''
+ orderedlist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='orderedlist', pretty_print=pretty_print)
+ for itemizedlist_ in self.itemizedlist:
+ namespaceprefix_ = self.itemizedlist_nsprefix_ + ':' if (UseCapturedNS_ and self.itemizedlist_nsprefix_) else ''
+ itemizedlist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='itemizedlist', pretty_print=pretty_print)
+ for simplesect_ in self.simplesect:
+ namespaceprefix_ = self.simplesect_nsprefix_ + ':' if (UseCapturedNS_ and self.simplesect_nsprefix_) else ''
+ simplesect_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='simplesect', pretty_print=pretty_print)
+ for title_ in self.title:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ title_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='title', pretty_print=pretty_print)
+ for variablelist_ in self.variablelist:
+ namespaceprefix_ = self.variablelist_nsprefix_ + ':' if (UseCapturedNS_ and self.variablelist_nsprefix_) else ''
+ variablelist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variablelist', pretty_print=pretty_print)
+ for table_ in self.table:
+ namespaceprefix_ = self.table_nsprefix_ + ':' if (UseCapturedNS_ and self.table_nsprefix_) else ''
+ table_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='table', pretty_print=pretty_print)
+ for heading_ in self.heading:
+ namespaceprefix_ = self.heading_nsprefix_ + ':' if (UseCapturedNS_ and self.heading_nsprefix_) else ''
+ heading_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='heading', pretty_print=pretty_print)
+ for dotfile_ in self.dotfile:
+ namespaceprefix_ = self.dotfile_nsprefix_ + ':' if (UseCapturedNS_ and self.dotfile_nsprefix_) else ''
+ dotfile_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dotfile', pretty_print=pretty_print)
+ for mscfile_ in self.mscfile:
+ namespaceprefix_ = self.mscfile_nsprefix_ + ':' if (UseCapturedNS_ and self.mscfile_nsprefix_) else ''
+ mscfile_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='mscfile', pretty_print=pretty_print)
+ for diafile_ in self.diafile:
+ namespaceprefix_ = self.diafile_nsprefix_ + ':' if (UseCapturedNS_ and self.diafile_nsprefix_) else ''
+ diafile_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='diafile', pretty_print=pretty_print)
+ for toclist_ in self.toclist:
+ namespaceprefix_ = self.toclist_nsprefix_ + ':' if (UseCapturedNS_ and self.toclist_nsprefix_) else ''
+ toclist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='toclist', pretty_print=pretty_print)
+ for language_ in self.language:
+ namespaceprefix_ = self.language_nsprefix_ + ':' if (UseCapturedNS_ and self.language_nsprefix_) else ''
+ language_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='language', pretty_print=pretty_print)
+ for parameterlist_ in self.parameterlist:
+ namespaceprefix_ = self.parameterlist_nsprefix_ + ':' if (UseCapturedNS_ and self.parameterlist_nsprefix_) else ''
+ parameterlist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parameterlist', pretty_print=pretty_print)
+ for xrefsect_ in self.xrefsect:
+ namespaceprefix_ = self.xrefsect_nsprefix_ + ':' if (UseCapturedNS_ and self.xrefsect_nsprefix_) else ''
+ xrefsect_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='xrefsect', pretty_print=pretty_print)
+ for copydoc_ in self.copydoc:
+ namespaceprefix_ = self.copydoc_nsprefix_ + ':' if (UseCapturedNS_ and self.copydoc_nsprefix_) else ''
+ copydoc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='copydoc', pretty_print=pretty_print)
+ for blockquote_ in self.blockquote:
+ namespaceprefix_ = self.blockquote_nsprefix_ + ':' if (UseCapturedNS_ and self.blockquote_nsprefix_) else ''
+ blockquote_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockquote', pretty_print=pretty_print)
+ for parblock_ in self.parblock:
+ namespaceprefix_ = self.parblock_nsprefix_ + ':' if (UseCapturedNS_ and self.parblock_nsprefix_) else ''
+ parblock_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parblock', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ elif nodeName_ == 'hruler':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'hruler', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_hruler'):
+ self.add_hruler(obj_.value)
+ elif hasattr(self, 'set_hruler'):
+ self.set_hruler(obj_.value)
+ elif nodeName_ == 'preformatted':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'preformatted', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_preformatted'):
+ self.add_preformatted(obj_.value)
+ elif hasattr(self, 'set_preformatted'):
+ self.set_preformatted(obj_.value)
+ elif nodeName_ == 'programlisting':
+ obj_ = listingType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'programlisting', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_programlisting'):
+ self.add_programlisting(obj_.value)
+ elif hasattr(self, 'set_programlisting'):
+ self.set_programlisting(obj_.value)
+ elif nodeName_ == 'verbatim' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'verbatim')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'verbatim')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'verbatim', valuestr_)
+ self.content_.append(obj_)
+ self.verbatim_nsprefix_ = child_.prefix
+ elif nodeName_ == 'indexentry':
+ obj_ = docIndexEntryType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'indexentry', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_indexentry'):
+ self.add_indexentry(obj_.value)
+ elif hasattr(self, 'set_indexentry'):
+ self.set_indexentry(obj_.value)
+ elif nodeName_ == 'orderedlist':
+ obj_ = docListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'orderedlist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_orderedlist'):
+ self.add_orderedlist(obj_.value)
+ elif hasattr(self, 'set_orderedlist'):
+ self.set_orderedlist(obj_.value)
+ elif nodeName_ == 'itemizedlist':
+ obj_ = docListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'itemizedlist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_itemizedlist'):
+ self.add_itemizedlist(obj_.value)
+ elif hasattr(self, 'set_itemizedlist'):
+ self.set_itemizedlist(obj_.value)
+ elif nodeName_ == 'simplesect':
+ obj_ = docSimpleSectType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'simplesect', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_simplesect'):
+ self.add_simplesect(obj_.value)
+ elif hasattr(self, 'set_simplesect'):
+ self.set_simplesect(obj_.value)
+ elif nodeName_ == 'title':
+ obj_ = docTitleType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'title', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_title'):
+ self.add_title(obj_.value)
+ elif hasattr(self, 'set_title'):
+ self.set_title(obj_.value)
+ elif nodeName_ == 'variablelist':
+ obj_ = docVariableListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'variablelist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_variablelist'):
+ self.add_variablelist(obj_.value)
+ elif hasattr(self, 'set_variablelist'):
+ self.set_variablelist(obj_.value)
+ elif nodeName_ == 'table':
+ obj_ = docTableType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'table', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_table'):
+ self.add_table(obj_.value)
+ elif hasattr(self, 'set_table'):
+ self.set_table(obj_.value)
+ elif nodeName_ == 'heading':
+ obj_ = docHeadingType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'heading', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_heading'):
+ self.add_heading(obj_.value)
+ elif hasattr(self, 'set_heading'):
+ self.set_heading(obj_.value)
+ elif nodeName_ == 'dotfile':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dotfile', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dotfile'):
+ self.add_dotfile(obj_.value)
+ elif hasattr(self, 'set_dotfile'):
+ self.set_dotfile(obj_.value)
+ elif nodeName_ == 'mscfile':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'mscfile', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_mscfile'):
+ self.add_mscfile(obj_.value)
+ elif hasattr(self, 'set_mscfile'):
+ self.set_mscfile(obj_.value)
+ elif nodeName_ == 'diafile':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'diafile', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_diafile'):
+ self.add_diafile(obj_.value)
+ elif hasattr(self, 'set_diafile'):
+ self.set_diafile(obj_.value)
+ elif nodeName_ == 'toclist':
+ obj_ = docTocListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'toclist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_toclist'):
+ self.add_toclist(obj_.value)
+ elif hasattr(self, 'set_toclist'):
+ self.set_toclist(obj_.value)
+ elif nodeName_ == 'language':
+ obj_ = docLanguageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'language', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_language'):
+ self.add_language(obj_.value)
+ elif hasattr(self, 'set_language'):
+ self.set_language(obj_.value)
+ elif nodeName_ == 'parameterlist':
+ obj_ = docParamListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'parameterlist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_parameterlist'):
+ self.add_parameterlist(obj_.value)
+ elif hasattr(self, 'set_parameterlist'):
+ self.set_parameterlist(obj_.value)
+ elif nodeName_ == 'xrefsect':
+ obj_ = docXRefSectType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'xrefsect', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_xrefsect'):
+ self.add_xrefsect(obj_.value)
+ elif hasattr(self, 'set_xrefsect'):
+ self.set_xrefsect(obj_.value)
+ elif nodeName_ == 'copydoc':
+ obj_ = docCopyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'copydoc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_copydoc'):
+ self.add_copydoc(obj_.value)
+ elif hasattr(self, 'set_copydoc'):
+ self.set_copydoc(obj_.value)
+ elif nodeName_ == 'blockquote':
+ obj_ = docBlockQuoteType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'blockquote', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_blockquote'):
+ self.add_blockquote(obj_.value)
+ elif hasattr(self, 'set_blockquote'):
+ self.set_blockquote(obj_.value)
+ elif nodeName_ == 'parblock':
+ obj_ = docParBlockType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'parblock', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_parblock'):
+ self.add_parblock(obj_.value)
+ elif hasattr(self, 'set_parblock'):
+ self.set_parblock(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docParaType
+
+
+class docMarkupType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, hruler=None, preformatted=None, programlisting=None, verbatim=None, indexentry=None, orderedlist=None, itemizedlist=None, simplesect=None, title=None, variablelist=None, table=None, heading=None, dotfile=None, mscfile=None, diafile=None, toclist=None, language=None, parameterlist=None, xrefsect=None, copydoc=None, blockquote=None, parblock=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ if hruler is None:
+ self.hruler = []
+ else:
+ self.hruler = hruler
+ self.hruler_nsprefix_ = None
+ if preformatted is None:
+ self.preformatted = []
+ else:
+ self.preformatted = preformatted
+ self.preformatted_nsprefix_ = None
+ if programlisting is None:
+ self.programlisting = []
+ else:
+ self.programlisting = programlisting
+ self.programlisting_nsprefix_ = None
+ if verbatim is None:
+ self.verbatim = []
+ else:
+ self.verbatim = verbatim
+ self.verbatim_nsprefix_ = None
+ if indexentry is None:
+ self.indexentry = []
+ else:
+ self.indexentry = indexentry
+ self.indexentry_nsprefix_ = None
+ if orderedlist is None:
+ self.orderedlist = []
+ else:
+ self.orderedlist = orderedlist
+ self.orderedlist_nsprefix_ = None
+ if itemizedlist is None:
+ self.itemizedlist = []
+ else:
+ self.itemizedlist = itemizedlist
+ self.itemizedlist_nsprefix_ = None
+ if simplesect is None:
+ self.simplesect = []
+ else:
+ self.simplesect = simplesect
+ self.simplesect_nsprefix_ = None
+ if title is None:
+ self.title = []
+ else:
+ self.title = title
+ self.title_nsprefix_ = None
+ if variablelist is None:
+ self.variablelist = []
+ else:
+ self.variablelist = variablelist
+ self.variablelist_nsprefix_ = None
+ if table is None:
+ self.table = []
+ else:
+ self.table = table
+ self.table_nsprefix_ = None
+ if heading is None:
+ self.heading = []
+ else:
+ self.heading = heading
+ self.heading_nsprefix_ = None
+ if dotfile is None:
+ self.dotfile = []
+ else:
+ self.dotfile = dotfile
+ self.dotfile_nsprefix_ = None
+ if mscfile is None:
+ self.mscfile = []
+ else:
+ self.mscfile = mscfile
+ self.mscfile_nsprefix_ = None
+ if diafile is None:
+ self.diafile = []
+ else:
+ self.diafile = diafile
+ self.diafile_nsprefix_ = None
+ if toclist is None:
+ self.toclist = []
+ else:
+ self.toclist = toclist
+ self.toclist_nsprefix_ = None
+ if language is None:
+ self.language = []
+ else:
+ self.language = language
+ self.language_nsprefix_ = None
+ if parameterlist is None:
+ self.parameterlist = []
+ else:
+ self.parameterlist = parameterlist
+ self.parameterlist_nsprefix_ = None
+ if xrefsect is None:
+ self.xrefsect = []
+ else:
+ self.xrefsect = xrefsect
+ self.xrefsect_nsprefix_ = None
+ if copydoc is None:
+ self.copydoc = []
+ else:
+ self.copydoc = copydoc
+ self.copydoc_nsprefix_ = None
+ if blockquote is None:
+ self.blockquote = []
+ else:
+ self.blockquote = blockquote
+ self.blockquote_nsprefix_ = None
+ if parblock is None:
+ self.parblock = []
+ else:
+ self.parblock = parblock
+ self.parblock_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docMarkupType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docMarkupType.subclass:
+ return docMarkupType.subclass(*args_, **kwargs_)
+ else:
+ return docMarkupType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ def get_hruler(self):
+ return self.hruler
+ def set_hruler(self, hruler):
+ self.hruler = hruler
+ def add_hruler(self, value):
+ self.hruler.append(value)
+ def insert_hruler_at(self, index, value):
+ self.hruler.insert(index, value)
+ def replace_hruler_at(self, index, value):
+ self.hruler[index] = value
+ def get_preformatted(self):
+ return self.preformatted
+ def set_preformatted(self, preformatted):
+ self.preformatted = preformatted
+ def add_preformatted(self, value):
+ self.preformatted.append(value)
+ def insert_preformatted_at(self, index, value):
+ self.preformatted.insert(index, value)
+ def replace_preformatted_at(self, index, value):
+ self.preformatted[index] = value
+ def get_programlisting(self):
+ return self.programlisting
+ def set_programlisting(self, programlisting):
+ self.programlisting = programlisting
+ def add_programlisting(self, value):
+ self.programlisting.append(value)
+ def insert_programlisting_at(self, index, value):
+ self.programlisting.insert(index, value)
+ def replace_programlisting_at(self, index, value):
+ self.programlisting[index] = value
+ def get_verbatim(self):
+ return self.verbatim
+ def set_verbatim(self, verbatim):
+ self.verbatim = verbatim
+ def add_verbatim(self, value):
+ self.verbatim.append(value)
+ def insert_verbatim_at(self, index, value):
+ self.verbatim.insert(index, value)
+ def replace_verbatim_at(self, index, value):
+ self.verbatim[index] = value
+ def get_indexentry(self):
+ return self.indexentry
+ def set_indexentry(self, indexentry):
+ self.indexentry = indexentry
+ def add_indexentry(self, value):
+ self.indexentry.append(value)
+ def insert_indexentry_at(self, index, value):
+ self.indexentry.insert(index, value)
+ def replace_indexentry_at(self, index, value):
+ self.indexentry[index] = value
+ def get_orderedlist(self):
+ return self.orderedlist
+ def set_orderedlist(self, orderedlist):
+ self.orderedlist = orderedlist
+ def add_orderedlist(self, value):
+ self.orderedlist.append(value)
+ def insert_orderedlist_at(self, index, value):
+ self.orderedlist.insert(index, value)
+ def replace_orderedlist_at(self, index, value):
+ self.orderedlist[index] = value
+ def get_itemizedlist(self):
+ return self.itemizedlist
+ def set_itemizedlist(self, itemizedlist):
+ self.itemizedlist = itemizedlist
+ def add_itemizedlist(self, value):
+ self.itemizedlist.append(value)
+ def insert_itemizedlist_at(self, index, value):
+ self.itemizedlist.insert(index, value)
+ def replace_itemizedlist_at(self, index, value):
+ self.itemizedlist[index] = value
+ def get_simplesect(self):
+ return self.simplesect
+ def set_simplesect(self, simplesect):
+ self.simplesect = simplesect
+ def add_simplesect(self, value):
+ self.simplesect.append(value)
+ def insert_simplesect_at(self, index, value):
+ self.simplesect.insert(index, value)
+ def replace_simplesect_at(self, index, value):
+ self.simplesect[index] = value
+ def get_title(self):
+ return self.title
+ def set_title(self, title):
+ self.title = title
+ def add_title(self, value):
+ self.title.append(value)
+ def insert_title_at(self, index, value):
+ self.title.insert(index, value)
+ def replace_title_at(self, index, value):
+ self.title[index] = value
+ def get_variablelist(self):
+ return self.variablelist
+ def set_variablelist(self, variablelist):
+ self.variablelist = variablelist
+ def add_variablelist(self, value):
+ self.variablelist.append(value)
+ def insert_variablelist_at(self, index, value):
+ self.variablelist.insert(index, value)
+ def replace_variablelist_at(self, index, value):
+ self.variablelist[index] = value
+ def get_table(self):
+ return self.table
+ def set_table(self, table):
+ self.table = table
+ def add_table(self, value):
+ self.table.append(value)
+ def insert_table_at(self, index, value):
+ self.table.insert(index, value)
+ def replace_table_at(self, index, value):
+ self.table[index] = value
+ def get_heading(self):
+ return self.heading
+ def set_heading(self, heading):
+ self.heading = heading
+ def add_heading(self, value):
+ self.heading.append(value)
+ def insert_heading_at(self, index, value):
+ self.heading.insert(index, value)
+ def replace_heading_at(self, index, value):
+ self.heading[index] = value
+ def get_dotfile(self):
+ return self.dotfile
+ def set_dotfile(self, dotfile):
+ self.dotfile = dotfile
+ def add_dotfile(self, value):
+ self.dotfile.append(value)
+ def insert_dotfile_at(self, index, value):
+ self.dotfile.insert(index, value)
+ def replace_dotfile_at(self, index, value):
+ self.dotfile[index] = value
+ def get_mscfile(self):
+ return self.mscfile
+ def set_mscfile(self, mscfile):
+ self.mscfile = mscfile
+ def add_mscfile(self, value):
+ self.mscfile.append(value)
+ def insert_mscfile_at(self, index, value):
+ self.mscfile.insert(index, value)
+ def replace_mscfile_at(self, index, value):
+ self.mscfile[index] = value
+ def get_diafile(self):
+ return self.diafile
+ def set_diafile(self, diafile):
+ self.diafile = diafile
+ def add_diafile(self, value):
+ self.diafile.append(value)
+ def insert_diafile_at(self, index, value):
+ self.diafile.insert(index, value)
+ def replace_diafile_at(self, index, value):
+ self.diafile[index] = value
+ def get_toclist(self):
+ return self.toclist
+ def set_toclist(self, toclist):
+ self.toclist = toclist
+ def add_toclist(self, value):
+ self.toclist.append(value)
+ def insert_toclist_at(self, index, value):
+ self.toclist.insert(index, value)
+ def replace_toclist_at(self, index, value):
+ self.toclist[index] = value
+ def get_language(self):
+ return self.language
+ def set_language(self, language):
+ self.language = language
+ def add_language(self, value):
+ self.language.append(value)
+ def insert_language_at(self, index, value):
+ self.language.insert(index, value)
+ def replace_language_at(self, index, value):
+ self.language[index] = value
+ def get_parameterlist(self):
+ return self.parameterlist
+ def set_parameterlist(self, parameterlist):
+ self.parameterlist = parameterlist
+ def add_parameterlist(self, value):
+ self.parameterlist.append(value)
+ def insert_parameterlist_at(self, index, value):
+ self.parameterlist.insert(index, value)
+ def replace_parameterlist_at(self, index, value):
+ self.parameterlist[index] = value
+ def get_xrefsect(self):
+ return self.xrefsect
+ def set_xrefsect(self, xrefsect):
+ self.xrefsect = xrefsect
+ def add_xrefsect(self, value):
+ self.xrefsect.append(value)
+ def insert_xrefsect_at(self, index, value):
+ self.xrefsect.insert(index, value)
+ def replace_xrefsect_at(self, index, value):
+ self.xrefsect[index] = value
+ def get_copydoc(self):
+ return self.copydoc
+ def set_copydoc(self, copydoc):
+ self.copydoc = copydoc
+ def add_copydoc(self, value):
+ self.copydoc.append(value)
+ def insert_copydoc_at(self, index, value):
+ self.copydoc.insert(index, value)
+ def replace_copydoc_at(self, index, value):
+ self.copydoc[index] = value
+ def get_blockquote(self):
+ return self.blockquote
+ def set_blockquote(self, blockquote):
+ self.blockquote = blockquote
+ def add_blockquote(self, value):
+ self.blockquote.append(value)
+ def insert_blockquote_at(self, index, value):
+ self.blockquote.insert(index, value)
+ def replace_blockquote_at(self, index, value):
+ self.blockquote[index] = value
+ def get_parblock(self):
+ return self.parblock
+ def set_parblock(self, parblock):
+ self.parblock = parblock
+ def add_parblock(self, value):
+ self.parblock.append(value)
+ def insert_parblock_at(self, index, value):
+ self.parblock.insert(index, value)
+ def replace_parblock_at(self, index, value):
+ self.parblock[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ self.hruler or
+ self.preformatted or
+ self.programlisting or
+ self.verbatim or
+ self.indexentry or
+ self.orderedlist or
+ self.itemizedlist or
+ self.simplesect or
+ self.title or
+ self.variablelist or
+ self.table or
+ self.heading or
+ self.dotfile or
+ self.mscfile or
+ self.diafile or
+ self.toclist or
+ self.language or
+ self.parameterlist or
+ self.xrefsect or
+ self.copydoc or
+ self.blockquote or
+ self.parblock or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docMarkupType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docMarkupType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docMarkupType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docMarkupType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docMarkupType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docMarkupType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docMarkupType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ for hruler_ in self.hruler:
+ namespaceprefix_ = self.hruler_nsprefix_ + ':' if (UseCapturedNS_ and self.hruler_nsprefix_) else ''
+ hruler_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='hruler', pretty_print=pretty_print)
+ for preformatted_ in self.preformatted:
+ namespaceprefix_ = self.preformatted_nsprefix_ + ':' if (UseCapturedNS_ and self.preformatted_nsprefix_) else ''
+ preformatted_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='preformatted', pretty_print=pretty_print)
+ for programlisting_ in self.programlisting:
+ namespaceprefix_ = self.programlisting_nsprefix_ + ':' if (UseCapturedNS_ and self.programlisting_nsprefix_) else ''
+ programlisting_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='programlisting', pretty_print=pretty_print)
+ for verbatim_ in self.verbatim:
+ namespaceprefix_ = self.verbatim_nsprefix_ + ':' if (UseCapturedNS_ and self.verbatim_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sverbatim>%s</%sverbatim>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(verbatim_), input_name='verbatim')), namespaceprefix_ , eol_))
+ for indexentry_ in self.indexentry:
+ namespaceprefix_ = self.indexentry_nsprefix_ + ':' if (UseCapturedNS_ and self.indexentry_nsprefix_) else ''
+ indexentry_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='indexentry', pretty_print=pretty_print)
+ for orderedlist_ in self.orderedlist:
+ namespaceprefix_ = self.orderedlist_nsprefix_ + ':' if (UseCapturedNS_ and self.orderedlist_nsprefix_) else ''
+ orderedlist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='orderedlist', pretty_print=pretty_print)
+ for itemizedlist_ in self.itemizedlist:
+ namespaceprefix_ = self.itemizedlist_nsprefix_ + ':' if (UseCapturedNS_ and self.itemizedlist_nsprefix_) else ''
+ itemizedlist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='itemizedlist', pretty_print=pretty_print)
+ for simplesect_ in self.simplesect:
+ namespaceprefix_ = self.simplesect_nsprefix_ + ':' if (UseCapturedNS_ and self.simplesect_nsprefix_) else ''
+ simplesect_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='simplesect', pretty_print=pretty_print)
+ for title_ in self.title:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ title_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='title', pretty_print=pretty_print)
+ for variablelist_ in self.variablelist:
+ namespaceprefix_ = self.variablelist_nsprefix_ + ':' if (UseCapturedNS_ and self.variablelist_nsprefix_) else ''
+ variablelist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='variablelist', pretty_print=pretty_print)
+ for table_ in self.table:
+ namespaceprefix_ = self.table_nsprefix_ + ':' if (UseCapturedNS_ and self.table_nsprefix_) else ''
+ table_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='table', pretty_print=pretty_print)
+ for heading_ in self.heading:
+ namespaceprefix_ = self.heading_nsprefix_ + ':' if (UseCapturedNS_ and self.heading_nsprefix_) else ''
+ heading_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='heading', pretty_print=pretty_print)
+ for dotfile_ in self.dotfile:
+ namespaceprefix_ = self.dotfile_nsprefix_ + ':' if (UseCapturedNS_ and self.dotfile_nsprefix_) else ''
+ dotfile_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dotfile', pretty_print=pretty_print)
+ for mscfile_ in self.mscfile:
+ namespaceprefix_ = self.mscfile_nsprefix_ + ':' if (UseCapturedNS_ and self.mscfile_nsprefix_) else ''
+ mscfile_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='mscfile', pretty_print=pretty_print)
+ for diafile_ in self.diafile:
+ namespaceprefix_ = self.diafile_nsprefix_ + ':' if (UseCapturedNS_ and self.diafile_nsprefix_) else ''
+ diafile_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='diafile', pretty_print=pretty_print)
+ for toclist_ in self.toclist:
+ namespaceprefix_ = self.toclist_nsprefix_ + ':' if (UseCapturedNS_ and self.toclist_nsprefix_) else ''
+ toclist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='toclist', pretty_print=pretty_print)
+ for language_ in self.language:
+ namespaceprefix_ = self.language_nsprefix_ + ':' if (UseCapturedNS_ and self.language_nsprefix_) else ''
+ language_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='language', pretty_print=pretty_print)
+ for parameterlist_ in self.parameterlist:
+ namespaceprefix_ = self.parameterlist_nsprefix_ + ':' if (UseCapturedNS_ and self.parameterlist_nsprefix_) else ''
+ parameterlist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parameterlist', pretty_print=pretty_print)
+ for xrefsect_ in self.xrefsect:
+ namespaceprefix_ = self.xrefsect_nsprefix_ + ':' if (UseCapturedNS_ and self.xrefsect_nsprefix_) else ''
+ xrefsect_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='xrefsect', pretty_print=pretty_print)
+ for copydoc_ in self.copydoc:
+ namespaceprefix_ = self.copydoc_nsprefix_ + ':' if (UseCapturedNS_ and self.copydoc_nsprefix_) else ''
+ copydoc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='copydoc', pretty_print=pretty_print)
+ for blockquote_ in self.blockquote:
+ namespaceprefix_ = self.blockquote_nsprefix_ + ':' if (UseCapturedNS_ and self.blockquote_nsprefix_) else ''
+ blockquote_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='blockquote', pretty_print=pretty_print)
+ for parblock_ in self.parblock:
+ namespaceprefix_ = self.parblock_nsprefix_ + ':' if (UseCapturedNS_ and self.parblock_nsprefix_) else ''
+ parblock_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parblock', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ elif nodeName_ == 'hruler':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'hruler', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_hruler'):
+ self.add_hruler(obj_.value)
+ elif hasattr(self, 'set_hruler'):
+ self.set_hruler(obj_.value)
+ elif nodeName_ == 'preformatted':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'preformatted', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_preformatted'):
+ self.add_preformatted(obj_.value)
+ elif hasattr(self, 'set_preformatted'):
+ self.set_preformatted(obj_.value)
+ elif nodeName_ == 'programlisting':
+ obj_ = listingType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'programlisting', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_programlisting'):
+ self.add_programlisting(obj_.value)
+ elif hasattr(self, 'set_programlisting'):
+ self.set_programlisting(obj_.value)
+ elif nodeName_ == 'verbatim' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'verbatim')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'verbatim')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'verbatim', valuestr_)
+ self.content_.append(obj_)
+ self.verbatim_nsprefix_ = child_.prefix
+ elif nodeName_ == 'indexentry':
+ obj_ = docIndexEntryType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'indexentry', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_indexentry'):
+ self.add_indexentry(obj_.value)
+ elif hasattr(self, 'set_indexentry'):
+ self.set_indexentry(obj_.value)
+ elif nodeName_ == 'orderedlist':
+ obj_ = docListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'orderedlist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_orderedlist'):
+ self.add_orderedlist(obj_.value)
+ elif hasattr(self, 'set_orderedlist'):
+ self.set_orderedlist(obj_.value)
+ elif nodeName_ == 'itemizedlist':
+ obj_ = docListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'itemizedlist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_itemizedlist'):
+ self.add_itemizedlist(obj_.value)
+ elif hasattr(self, 'set_itemizedlist'):
+ self.set_itemizedlist(obj_.value)
+ elif nodeName_ == 'simplesect':
+ obj_ = docSimpleSectType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'simplesect', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_simplesect'):
+ self.add_simplesect(obj_.value)
+ elif hasattr(self, 'set_simplesect'):
+ self.set_simplesect(obj_.value)
+ elif nodeName_ == 'title':
+ obj_ = docTitleType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'title', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_title'):
+ self.add_title(obj_.value)
+ elif hasattr(self, 'set_title'):
+ self.set_title(obj_.value)
+ elif nodeName_ == 'variablelist':
+ obj_ = docVariableListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'variablelist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_variablelist'):
+ self.add_variablelist(obj_.value)
+ elif hasattr(self, 'set_variablelist'):
+ self.set_variablelist(obj_.value)
+ elif nodeName_ == 'table':
+ obj_ = docTableType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'table', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_table'):
+ self.add_table(obj_.value)
+ elif hasattr(self, 'set_table'):
+ self.set_table(obj_.value)
+ elif nodeName_ == 'heading':
+ obj_ = docHeadingType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'heading', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_heading'):
+ self.add_heading(obj_.value)
+ elif hasattr(self, 'set_heading'):
+ self.set_heading(obj_.value)
+ elif nodeName_ == 'dotfile':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dotfile', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dotfile'):
+ self.add_dotfile(obj_.value)
+ elif hasattr(self, 'set_dotfile'):
+ self.set_dotfile(obj_.value)
+ elif nodeName_ == 'mscfile':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'mscfile', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_mscfile'):
+ self.add_mscfile(obj_.value)
+ elif hasattr(self, 'set_mscfile'):
+ self.set_mscfile(obj_.value)
+ elif nodeName_ == 'diafile':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'diafile', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_diafile'):
+ self.add_diafile(obj_.value)
+ elif hasattr(self, 'set_diafile'):
+ self.set_diafile(obj_.value)
+ elif nodeName_ == 'toclist':
+ obj_ = docTocListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'toclist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_toclist'):
+ self.add_toclist(obj_.value)
+ elif hasattr(self, 'set_toclist'):
+ self.set_toclist(obj_.value)
+ elif nodeName_ == 'language':
+ obj_ = docLanguageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'language', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_language'):
+ self.add_language(obj_.value)
+ elif hasattr(self, 'set_language'):
+ self.set_language(obj_.value)
+ elif nodeName_ == 'parameterlist':
+ obj_ = docParamListType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'parameterlist', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_parameterlist'):
+ self.add_parameterlist(obj_.value)
+ elif hasattr(self, 'set_parameterlist'):
+ self.set_parameterlist(obj_.value)
+ elif nodeName_ == 'xrefsect':
+ obj_ = docXRefSectType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'xrefsect', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_xrefsect'):
+ self.add_xrefsect(obj_.value)
+ elif hasattr(self, 'set_xrefsect'):
+ self.set_xrefsect(obj_.value)
+ elif nodeName_ == 'copydoc':
+ obj_ = docCopyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'copydoc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_copydoc'):
+ self.add_copydoc(obj_.value)
+ elif hasattr(self, 'set_copydoc'):
+ self.set_copydoc(obj_.value)
+ elif nodeName_ == 'blockquote':
+ obj_ = docBlockQuoteType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'blockquote', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_blockquote'):
+ self.add_blockquote(obj_.value)
+ elif hasattr(self, 'set_blockquote'):
+ self.set_blockquote(obj_.value)
+ elif nodeName_ == 'parblock':
+ obj_ = docParBlockType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'parblock', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_parblock'):
+ self.add_parblock(obj_.value)
+ elif hasattr(self, 'set_parblock'):
+ self.set_parblock(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docMarkupType
+
+
+class docURLLink(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, url=None, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.url = _cast(None, url)
+ self.url_nsprefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docURLLink)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docURLLink.subclass:
+ return docURLLink.subclass(*args_, **kwargs_)
+ else:
+ return docURLLink(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ def get_url(self):
+ return self.url
+ def set_url(self, url):
+ self.url = url
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docURLLink', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docURLLink')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docURLLink':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docURLLink')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docURLLink', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docURLLink'):
+ if self.url is not None and 'url' not in already_processed:
+ already_processed.add('url')
+ outfile.write(' url=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.url), input_name='url')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docURLLink', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('url', node)
+ if value is not None and 'url' not in already_processed:
+ already_processed.add('url')
+ self.url = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docURLLink
+
+
+class docAnchorType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docAnchorType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docAnchorType.subclass:
+ return docAnchorType.subclass(*args_, **kwargs_)
+ else:
+ return docAnchorType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docAnchorType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docAnchorType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docAnchorType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docAnchorType')
+ outfile.write('>')
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_, pretty_print=pretty_print)
+ outfile.write(self.convert_unicode(self.valueOf_))
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docAnchorType'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docAnchorType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+ pass
+# end class docAnchorType
+
+
+class docFormulaType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docFormulaType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docFormulaType.subclass:
+ return docFormulaType.subclass(*args_, **kwargs_)
+ else:
+ return docFormulaType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docFormulaType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docFormulaType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docFormulaType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docFormulaType')
+ outfile.write('>')
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_, pretty_print=pretty_print)
+ outfile.write(self.convert_unicode(self.valueOf_))
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docFormulaType'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docFormulaType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+ pass
+# end class docFormulaType
+
+
+class docIndexEntryType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, primaryie=None, secondaryie=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.primaryie = primaryie
+ self.primaryie_nsprefix_ = None
+ self.secondaryie = secondaryie
+ self.secondaryie_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docIndexEntryType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docIndexEntryType.subclass:
+ return docIndexEntryType.subclass(*args_, **kwargs_)
+ else:
+ return docIndexEntryType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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 hasContent_(self):
+ if (
+ self.primaryie is not None or
+ self.secondaryie is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docIndexEntryType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docIndexEntryType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docIndexEntryType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docIndexEntryType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docIndexEntryType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docIndexEntryType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docIndexEntryType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.primaryie is not None:
+ namespaceprefix_ = self.primaryie_nsprefix_ + ':' if (UseCapturedNS_ and self.primaryie_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sprimaryie>%s</%sprimaryie>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.primaryie), input_name='primaryie')), namespaceprefix_ , eol_))
+ if self.secondaryie is not None:
+ namespaceprefix_ = self.secondaryie_nsprefix_ + ':' if (UseCapturedNS_ and self.secondaryie_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%ssecondaryie>%s</%ssecondaryie>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.secondaryie), input_name='secondaryie')), namespaceprefix_ , eol_))
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'primaryie':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'primaryie')
+ value_ = self.gds_validate_string(value_, node, 'primaryie')
+ self.primaryie = value_
+ self.primaryie_nsprefix_ = child_.prefix
+ elif nodeName_ == 'secondaryie':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'secondaryie')
+ value_ = self.gds_validate_string(value_, node, 'secondaryie')
+ self.secondaryie = value_
+ self.secondaryie_nsprefix_ = child_.prefix
+# end class docIndexEntryType
+
+
+class docListType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, listitem=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if listitem is None:
+ self.listitem = []
+ else:
+ self.listitem = listitem
+ self.listitem_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docListType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docListType.subclass:
+ return docListType.subclass(*args_, **kwargs_)
+ else:
+ return docListType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.listitem.insert(index, value)
+ def replace_listitem_at(self, index, value):
+ self.listitem[index] = value
+ def hasContent_(self):
+ if (
+ self.listitem
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docListType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docListType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docListType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docListType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docListType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docListType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docListType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for listitem_ in self.listitem:
+ namespaceprefix_ = self.listitem_nsprefix_ + ':' if (UseCapturedNS_ and self.listitem_nsprefix_) else ''
+ listitem_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='listitem', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'listitem':
+ obj_ = docListItemType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.listitem.append(obj_)
+ obj_.original_tagname_ = 'listitem'
+# end class docListType
+
+
+class docListItemType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docListItemType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docListItemType.subclass:
+ return docListItemType.subclass(*args_, **kwargs_)
+ else:
+ return docListItemType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def hasContent_(self):
+ if (
+ self.para
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docListItemType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docListItemType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docListItemType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docListItemType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docListItemType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docListItemType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docListItemType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.para.append(obj_)
+ obj_.original_tagname_ = 'para'
+# end class docListItemType
+
+
+class docSimpleSectType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, kind=None, title=None, para=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.kind = _cast(None, kind)
+ self.kind_nsprefix_ = None
+ self.title = title
+ self.title_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docSimpleSectType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docSimpleSectType.subclass:
+ return docSimpleSectType.subclass(*args_, **kwargs_)
+ else:
+ return docSimpleSectType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def get_kind(self):
+ return self.kind
+ def set_kind(self, kind):
+ self.kind = kind
+ def validate_DoxSimpleSectKind(self, value):
+ # Validate type DoxSimpleSectKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['see', 'return', 'author', 'authors', 'version', 'since', 'date', 'note', 'warning', 'pre', 'post', 'copyright', 'invariant', 'remark', 'attention', 'par', 'rcs']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxSimpleSectKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.title is not None or
+ self.para
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSimpleSectType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docSimpleSectType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docSimpleSectType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docSimpleSectType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docSimpleSectType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docSimpleSectType'):
+ if self.kind is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ outfile.write(' kind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kind), input_name='kind')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docSimpleSectType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.title is not None:
+ namespaceprefix_ = self.title_nsprefix_ + ':' if (UseCapturedNS_ and self.title_nsprefix_) else ''
+ self.title.export(outfile, level, namespaceprefix_, namespacedef_='', name_='title', pretty_print=pretty_print)
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('kind', node)
+ if value is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ self.kind = value
+ self.validate_DoxSimpleSectKind(self.kind) # validate type DoxSimpleSectKind
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'title':
+ obj_ = docTitleType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.title = obj_
+ obj_.original_tagname_ = 'title'
+ elif nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.para.append(obj_)
+ obj_.original_tagname_ = 'para'
+# end class docSimpleSectType
+
+
+class docVarListEntryType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, term=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.term = term
+ self.term_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docVarListEntryType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docVarListEntryType.subclass:
+ return docVarListEntryType.subclass(*args_, **kwargs_)
+ else:
+ return docVarListEntryType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_term(self):
+ return self.term
+ def set_term(self, term):
+ self.term = term
+ def hasContent_(self):
+ if (
+ self.term is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docVarListEntryType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docVarListEntryType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docVarListEntryType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docVarListEntryType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docVarListEntryType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docVarListEntryType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docVarListEntryType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.term is not None:
+ namespaceprefix_ = self.term_nsprefix_ + ':' if (UseCapturedNS_ and self.term_nsprefix_) else ''
+ self.term.export(outfile, level, namespaceprefix_, namespacedef_='', name_='term', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'term':
+ obj_ = docTitleType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.term = obj_
+ obj_.original_tagname_ = 'term'
+# end class docVarListEntryType
+
+
+class docVariableListType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, varlistentry=None, listitem=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if varlistentry is None:
+ self.varlistentry = []
+ else:
+ self.varlistentry = varlistentry
+ self.varlistentry_nsprefix_ = None
+ if listitem is None:
+ self.listitem = []
+ else:
+ self.listitem = listitem
+ self.listitem_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docVariableListType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docVariableListType.subclass:
+ return docVariableListType.subclass(*args_, **kwargs_)
+ else:
+ return docVariableListType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_varlistentry(self):
+ return self.varlistentry
+ def set_varlistentry(self, varlistentry):
+ self.varlistentry = varlistentry
+ def add_varlistentry(self, value):
+ self.varlistentry.append(value)
+ def insert_varlistentry_at(self, index, value):
+ self.varlistentry.insert(index, value)
+ def replace_varlistentry_at(self, index, value):
+ self.varlistentry[index] = value
+ 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_at(self, index, value):
+ self.listitem.insert(index, value)
+ def replace_listitem_at(self, index, value):
+ self.listitem[index] = value
+ def hasContent_(self):
+ if (
+ self.varlistentry or
+ self.listitem
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docVariableListType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docVariableListType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docVariableListType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docVariableListType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docVariableListType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docVariableListType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docVariableListType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for varlistentry_ in self.varlistentry:
+ namespaceprefix_ = self.varlistentry_nsprefix_ + ':' if (UseCapturedNS_ and self.varlistentry_nsprefix_) else ''
+ varlistentry_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='varlistentry', pretty_print=pretty_print)
+ for listitem_ in self.listitem:
+ namespaceprefix_ = self.listitem_nsprefix_ + ':' if (UseCapturedNS_ and self.listitem_nsprefix_) else ''
+ listitem_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='listitem', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'varlistentry':
+ obj_ = docVarListEntryType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.varlistentry.append(obj_)
+ obj_.original_tagname_ = 'varlistentry'
+ elif nodeName_ == 'listitem':
+ obj_ = docListItemType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.listitem.append(obj_)
+ obj_.original_tagname_ = 'listitem'
+# end class docVariableListType
+
+
+class docRefTextType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, kindref=None, external=None, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.kindref = _cast(None, kindref)
+ self.kindref_nsprefix_ = None
+ self.external = _cast(None, external)
+ self.external_nsprefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docRefTextType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docRefTextType.subclass:
+ return docRefTextType.subclass(*args_, **kwargs_)
+ else:
+ return docRefTextType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ 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 get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxRefKind(self, value):
+ # Validate type DoxRefKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['compound', 'member']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxRefKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docRefTextType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docRefTextType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docRefTextType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docRefTextType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docRefTextType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docRefTextType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.kindref is not None and 'kindref' not in already_processed:
+ already_processed.add('kindref')
+ outfile.write(' kindref=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kindref), input_name='kindref')), ))
+ if self.external is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ outfile.write(' external=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.external), input_name='external')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docRefTextType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('kindref', node)
+ if value is not None and 'kindref' not in already_processed:
+ already_processed.add('kindref')
+ self.kindref = value
+ self.validate_DoxRefKind(self.kindref) # validate type DoxRefKind
+ value = find_attr_value_('external', node)
+ if value is not None and 'external' not in already_processed:
+ already_processed.add('external')
+ self.external = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docRefTextType
+
+
+class docTableType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, rows=None, cols=None, width=None, caption=None, row=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.rows = _cast(int, rows)
+ self.rows_nsprefix_ = None
+ self.cols = _cast(int, cols)
+ self.cols_nsprefix_ = None
+ self.width = _cast(None, width)
+ self.width_nsprefix_ = None
+ self.caption = caption
+ self.caption_nsprefix_ = None
+ if row is None:
+ self.row = []
+ else:
+ self.row = row
+ self.row_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docTableType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docTableType.subclass:
+ return docTableType.subclass(*args_, **kwargs_)
+ else:
+ return docTableType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_caption(self):
+ return self.caption
+ def set_caption(self, caption):
+ self.caption = caption
+ 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_at(self, index, value):
+ self.row.insert(index, value)
+ def replace_row_at(self, index, value):
+ self.row[index] = value
+ 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 get_width(self):
+ return self.width
+ def set_width(self, width):
+ self.width = width
+ def hasContent_(self):
+ if (
+ self.caption is not None or
+ self.row
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTableType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docTableType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docTableType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docTableType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docTableType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docTableType'):
+ if self.rows is not None and 'rows' not in already_processed:
+ already_processed.add('rows')
+ outfile.write(' rows="%s"' % self.gds_format_integer(self.rows, input_name='rows'))
+ if self.cols is not None and 'cols' not in already_processed:
+ already_processed.add('cols')
+ outfile.write(' cols="%s"' % self.gds_format_integer(self.cols, input_name='cols'))
+ if self.width is not None and 'width' not in already_processed:
+ already_processed.add('width')
+ outfile.write(' width=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.width), input_name='width')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTableType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.caption is not None:
+ namespaceprefix_ = self.caption_nsprefix_ + ':' if (UseCapturedNS_ and self.caption_nsprefix_) else ''
+ self.caption.export(outfile, level, namespaceprefix_, namespacedef_='', name_='caption', pretty_print=pretty_print)
+ for row_ in self.row:
+ namespaceprefix_ = self.row_nsprefix_ + ':' if (UseCapturedNS_ and self.row_nsprefix_) else ''
+ row_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='row', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('rows', node)
+ if value is not None and 'rows' not in already_processed:
+ already_processed.add('rows')
+ self.rows = self.gds_parse_integer(value, node, 'rows')
+ value = find_attr_value_('cols', node)
+ if value is not None and 'cols' not in already_processed:
+ already_processed.add('cols')
+ self.cols = self.gds_parse_integer(value, node, 'cols')
+ value = find_attr_value_('width', node)
+ if value is not None and 'width' not in already_processed:
+ already_processed.add('width')
+ self.width = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'caption':
+ obj_ = docCaptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.caption = obj_
+ obj_.original_tagname_ = 'caption'
+ elif nodeName_ == 'row':
+ obj_ = docRowType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.row.append(obj_)
+ obj_.original_tagname_ = 'row'
+# end class docTableType
+
+
+class docRowType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, entry=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if entry is None:
+ self.entry = []
+ else:
+ self.entry = entry
+ self.entry_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docRowType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docRowType.subclass:
+ return docRowType.subclass(*args_, **kwargs_)
+ else:
+ return docRowType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.entry.insert(index, value)
+ def replace_entry_at(self, index, value):
+ self.entry[index] = value
+ def hasContent_(self):
+ if (
+ self.entry
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docRowType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docRowType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docRowType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docRowType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docRowType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docRowType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docRowType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for entry_ in self.entry:
+ namespaceprefix_ = self.entry_nsprefix_ + ':' if (UseCapturedNS_ and self.entry_nsprefix_) else ''
+ entry_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='entry', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'entry':
+ obj_ = docEntryType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.entry.append(obj_)
+ obj_.original_tagname_ = 'entry'
+# end class docRowType
+
+
+class docEntryType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, thead=None, colspan=None, rowspan=None, align=None, valign=None, width=None, class_=None, para=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.thead = _cast(None, thead)
+ self.thead_nsprefix_ = None
+ self.colspan = _cast(int, colspan)
+ self.colspan_nsprefix_ = None
+ self.rowspan = _cast(int, rowspan)
+ self.rowspan_nsprefix_ = None
+ self.align = _cast(None, align)
+ self.align_nsprefix_ = None
+ self.valign = _cast(None, valign)
+ self.valign_nsprefix_ = None
+ self.width = _cast(None, width)
+ self.width_nsprefix_ = None
+ self.class_ = _cast(None, class_)
+ self.class__nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ self.anyAttributes_ = {}
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docEntryType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docEntryType.subclass:
+ return docEntryType.subclass(*args_, **kwargs_)
+ else:
+ return docEntryType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def get_thead(self):
+ return self.thead
+ def set_thead(self, thead):
+ self.thead = thead
+ def get_colspan(self):
+ return self.colspan
+ def set_colspan(self, colspan):
+ self.colspan = colspan
+ def get_rowspan(self):
+ return self.rowspan
+ def set_rowspan(self, rowspan):
+ self.rowspan = rowspan
+ def get_align(self):
+ return self.align
+ def set_align(self, align):
+ self.align = align
+ def get_valign(self):
+ return self.valign
+ def set_valign(self, valign):
+ self.valign = valign
+ def get_width(self):
+ return self.width
+ def set_width(self, width):
+ self.width = width
+ def get_class(self):
+ return self.class_
+ def set_class(self, class_):
+ self.class_ = class_
+ def get_anyAttributes_(self): return self.anyAttributes_
+ def set_anyAttributes_(self, anyAttributes_): self.anyAttributes_ = anyAttributes_
+ def validate_DoxBool(self, value):
+ # Validate type DoxBool, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['yes', 'no']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxBool' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxAlign(self, value):
+ # Validate type DoxAlign, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['left', 'right', 'center']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxAlign' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxVerticalAlign(self, value):
+ # Validate type DoxVerticalAlign, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['bottom', 'top', 'middle']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxVerticalAlign' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.para
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docEntryType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docEntryType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docEntryType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docEntryType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docEntryType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docEntryType'):
+ unique_counter = 0
+ for name, value in self.anyAttributes_.items():
+ xsinamespaceprefix = 'xsi'
+ xsinamespace1 = 'http://www.w3.org/2001/XMLSchema-instance'
+ xsinamespace2 = '{%s}' % (xsinamespace1, )
+ if name.startswith(xsinamespace2):
+ name1 = name[len(xsinamespace2):]
+ name2 = '%s:%s' % (xsinamespaceprefix, name1, )
+ if name2 not in already_processed:
+ already_processed.add(name2)
+ outfile.write(' %s=%s' % (name2, quote_attrib(value), ))
+ else:
+ mo = re_.match(Namespace_extract_pat_, name)
+ if mo is not None:
+ namespace, name = mo.group(1, 2)
+ if name not in already_processed:
+ already_processed.add(name)
+ if namespace == 'http://www.w3.org/XML/1998/namespace':
+ outfile.write(' %s=%s' % (
+ name, quote_attrib(value), ))
+ else:
+ unique_counter += 1
+ outfile.write(' xmlns:%d="%s"' % (
+ unique_counter, namespace, ))
+ outfile.write(' %d:%s=%s' % (
+ unique_counter, name, quote_attrib(value), ))
+ else:
+ if name not in already_processed:
+ already_processed.add(name)
+ outfile.write(' %s=%s' % (
+ name, quote_attrib(value), ))
+ if self.thead is not None and 'thead' not in already_processed:
+ already_processed.add('thead')
+ outfile.write(' thead=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.thead), input_name='thead')), ))
+ if self.colspan is not None and 'colspan' not in already_processed:
+ already_processed.add('colspan')
+ outfile.write(' colspan="%s"' % self.gds_format_integer(self.colspan, input_name='colspan'))
+ if self.rowspan is not None and 'rowspan' not in already_processed:
+ already_processed.add('rowspan')
+ outfile.write(' rowspan="%s"' % self.gds_format_integer(self.rowspan, input_name='rowspan'))
+ if self.align is not None and 'align' not in already_processed:
+ already_processed.add('align')
+ outfile.write(' align=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.align), input_name='align')), ))
+ if self.valign is not None and 'valign' not in already_processed:
+ already_processed.add('valign')
+ outfile.write(' valign=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.valign), input_name='valign')), ))
+ if self.width is not None and 'width' not in already_processed:
+ already_processed.add('width')
+ outfile.write(' width=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.width), input_name='width')), ))
+ if self.class_ is not None and 'class_' not in already_processed:
+ already_processed.add('class_')
+ outfile.write(' class=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.class_), input_name='class')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docEntryType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('thead', node)
+ if value is not None and 'thead' not in already_processed:
+ already_processed.add('thead')
+ self.thead = value
+ self.validate_DoxBool(self.thead) # validate type DoxBool
+ value = find_attr_value_('colspan', node)
+ if value is not None and 'colspan' not in already_processed:
+ already_processed.add('colspan')
+ self.colspan = self.gds_parse_integer(value, node, 'colspan')
+ value = find_attr_value_('rowspan', node)
+ if value is not None and 'rowspan' not in already_processed:
+ already_processed.add('rowspan')
+ self.rowspan = self.gds_parse_integer(value, node, 'rowspan')
+ value = find_attr_value_('align', node)
+ if value is not None and 'align' not in already_processed:
+ already_processed.add('align')
+ self.align = value
+ self.validate_DoxAlign(self.align) # validate type DoxAlign
+ value = find_attr_value_('valign', node)
+ if value is not None and 'valign' not in already_processed:
+ already_processed.add('valign')
+ self.valign = value
+ self.validate_DoxVerticalAlign(self.valign) # validate type DoxVerticalAlign
+ value = find_attr_value_('width', node)
+ if value is not None and 'width' not in already_processed:
+ already_processed.add('width')
+ self.width = value
+ value = find_attr_value_('class', node)
+ if value is not None and 'class' not in already_processed:
+ already_processed.add('class')
+ self.class_ = value
+ self.anyAttributes_ = {}
+ for name, value in attrs.items():
+ if name not in already_processed:
+ self.anyAttributes_[name] = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.para.append(obj_)
+ obj_.original_tagname_ = 'para'
+# end class docEntryType
+
+
+class docCaptionType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docCaptionType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docCaptionType.subclass:
+ return docCaptionType.subclass(*args_, **kwargs_)
+ else:
+ return docCaptionType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docCaptionType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docCaptionType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docCaptionType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docCaptionType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docCaptionType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docCaptionType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docCaptionType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docCaptionType
+
+
+class docHeadingType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, level=None, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.level = _cast(int, level)
+ self.level_nsprefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docHeadingType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docHeadingType.subclass:
+ return docHeadingType.subclass(*args_, **kwargs_)
+ else:
+ return docHeadingType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ def get_level(self):
+ return self.level
+ def set_level(self, level):
+ self.level = level
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docHeadingType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docHeadingType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docHeadingType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docHeadingType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docHeadingType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docHeadingType'):
+ if self.level is not None and 'level' not in already_processed:
+ already_processed.add('level')
+ outfile.write(' level="%s"' % self.gds_format_integer(self.level, input_name='level'))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docHeadingType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('level', node)
+ if value is not None and 'level' not in already_processed:
+ already_processed.add('level')
+ self.level = self.gds_parse_integer(value, node, 'level')
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docHeadingType
+
+
+class docImageType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, type_=None, name=None, width=None, height=None, alt=None, inline=None, caption=None, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.type_ = _cast(None, type_)
+ self.type__nsprefix_ = None
+ self.name = _cast(None, name)
+ self.name_nsprefix_ = None
+ self.width = _cast(None, width)
+ self.width_nsprefix_ = None
+ self.height = _cast(None, height)
+ self.height_nsprefix_ = None
+ self.alt = _cast(None, alt)
+ self.alt_nsprefix_ = None
+ self.inline = _cast(None, inline)
+ self.inline_nsprefix_ = None
+ self.caption = _cast(None, caption)
+ self.caption_nsprefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docImageType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docImageType.subclass:
+ return docImageType.subclass(*args_, **kwargs_)
+ else:
+ return docImageType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ 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_width(self):
+ return self.width
+ def set_width(self, width):
+ self.width = width
+ def get_height(self):
+ return self.height
+ def set_height(self, height):
+ self.height = height
+ def get_alt(self):
+ return self.alt
+ def set_alt(self, alt):
+ self.alt = alt
+ def get_inline(self):
+ return self.inline
+ def set_inline(self, inline):
+ self.inline = inline
+ def get_caption(self):
+ return self.caption
+ def set_caption(self, caption):
+ self.caption = caption
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxImageKind(self, value):
+ # Validate type DoxImageKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['html', 'latex', 'docbook', 'rtf']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxImageKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def validate_DoxBool(self, value):
+ # Validate type DoxBool, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['yes', 'no']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxBool' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docImageType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docImageType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docImageType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docImageType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docImageType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docImageType'):
+ if self.type_ is not None and 'type_' not in already_processed:
+ already_processed.add('type_')
+ outfile.write(' type=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.type_), input_name='type')), ))
+ if self.name is not None and 'name' not in already_processed:
+ already_processed.add('name')
+ outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), ))
+ if self.width is not None and 'width' not in already_processed:
+ already_processed.add('width')
+ outfile.write(' width=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.width), input_name='width')), ))
+ if self.height is not None and 'height' not in already_processed:
+ already_processed.add('height')
+ outfile.write(' height=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.height), input_name='height')), ))
+ if self.alt is not None and 'alt' not in already_processed:
+ already_processed.add('alt')
+ outfile.write(' alt=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.alt), input_name='alt')), ))
+ if self.inline is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ outfile.write(' inline=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.inline), input_name='inline')), ))
+ if self.caption is not None and 'caption' not in already_processed:
+ already_processed.add('caption')
+ outfile.write(' caption=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.caption), input_name='caption')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docImageType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('type', node)
+ if value is not None and 'type' not in already_processed:
+ already_processed.add('type')
+ self.type_ = value
+ self.validate_DoxImageKind(self.type_) # validate type DoxImageKind
+ value = find_attr_value_('name', node)
+ if value is not None and 'name' not in already_processed:
+ already_processed.add('name')
+ self.name = value
+ value = find_attr_value_('width', node)
+ if value is not None and 'width' not in already_processed:
+ already_processed.add('width')
+ self.width = value
+ value = find_attr_value_('height', node)
+ if value is not None and 'height' not in already_processed:
+ already_processed.add('height')
+ self.height = value
+ value = find_attr_value_('alt', node)
+ if value is not None and 'alt' not in already_processed:
+ already_processed.add('alt')
+ self.alt = value
+ value = find_attr_value_('inline', node)
+ if value is not None and 'inline' not in already_processed:
+ already_processed.add('inline')
+ self.inline = value
+ self.validate_DoxBool(self.inline) # validate type DoxBool
+ value = find_attr_value_('caption', node)
+ if value is not None and 'caption' not in already_processed:
+ already_processed.add('caption')
+ self.caption = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docImageType
+
+
+class docTocItemType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, ulink=None, bold=None, s=None, strike=None, underline=None, emphasis=None, computeroutput=None, subscript=None, superscript=None, center=None, small=None, del_=None, ins=None, htmlonly=None, manonly=None, xmlonly=None, rtfonly=None, latexonly=None, docbookonly=None, image=None, dot=None, msc=None, plantuml=None, anchor=None, formula=None, ref=None, emoji=None, linebreak=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ if ulink is None:
+ self.ulink = []
+ else:
+ self.ulink = ulink
+ self.ulink_nsprefix_ = None
+ if bold is None:
+ self.bold = []
+ else:
+ self.bold = bold
+ self.bold_nsprefix_ = None
+ if s is None:
+ self.s = []
+ else:
+ self.s = s
+ self.s_nsprefix_ = None
+ if strike is None:
+ self.strike = []
+ else:
+ self.strike = strike
+ self.strike_nsprefix_ = None
+ if underline is None:
+ self.underline = []
+ else:
+ self.underline = underline
+ self.underline_nsprefix_ = None
+ if emphasis is None:
+ self.emphasis = []
+ else:
+ self.emphasis = emphasis
+ self.emphasis_nsprefix_ = None
+ if computeroutput is None:
+ self.computeroutput = []
+ else:
+ self.computeroutput = computeroutput
+ self.computeroutput_nsprefix_ = None
+ if subscript is None:
+ self.subscript = []
+ else:
+ self.subscript = subscript
+ self.subscript_nsprefix_ = None
+ if superscript is None:
+ self.superscript = []
+ else:
+ self.superscript = superscript
+ self.superscript_nsprefix_ = None
+ if center is None:
+ self.center = []
+ else:
+ self.center = center
+ self.center_nsprefix_ = None
+ if small is None:
+ self.small = []
+ else:
+ self.small = small
+ self.small_nsprefix_ = None
+ if del_ is None:
+ self.del_ = []
+ else:
+ self.del_ = del_
+ self.del__nsprefix_ = None
+ if ins is None:
+ self.ins = []
+ else:
+ self.ins = ins
+ self.ins_nsprefix_ = None
+ if htmlonly is None:
+ self.htmlonly = []
+ else:
+ self.htmlonly = htmlonly
+ self.htmlonly_nsprefix_ = None
+ if manonly is None:
+ self.manonly = []
+ else:
+ self.manonly = manonly
+ self.manonly_nsprefix_ = None
+ if xmlonly is None:
+ self.xmlonly = []
+ else:
+ self.xmlonly = xmlonly
+ self.xmlonly_nsprefix_ = None
+ if rtfonly is None:
+ self.rtfonly = []
+ else:
+ self.rtfonly = rtfonly
+ self.rtfonly_nsprefix_ = None
+ if latexonly is None:
+ self.latexonly = []
+ else:
+ self.latexonly = latexonly
+ self.latexonly_nsprefix_ = None
+ if docbookonly is None:
+ self.docbookonly = []
+ else:
+ self.docbookonly = docbookonly
+ self.docbookonly_nsprefix_ = None
+ if image is None:
+ self.image = []
+ else:
+ self.image = image
+ self.image_nsprefix_ = None
+ if dot is None:
+ self.dot = []
+ else:
+ self.dot = dot
+ self.dot_nsprefix_ = None
+ if msc is None:
+ self.msc = []
+ else:
+ self.msc = msc
+ self.msc_nsprefix_ = None
+ if plantuml is None:
+ self.plantuml = []
+ else:
+ self.plantuml = plantuml
+ self.plantuml_nsprefix_ = None
+ if anchor is None:
+ self.anchor = []
+ else:
+ self.anchor = anchor
+ self.anchor_nsprefix_ = None
+ if formula is None:
+ self.formula = []
+ else:
+ self.formula = formula
+ self.formula_nsprefix_ = None
+ if ref is None:
+ self.ref = []
+ else:
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ if emoji is None:
+ self.emoji = []
+ else:
+ self.emoji = emoji
+ self.emoji_nsprefix_ = None
+ if linebreak is None:
+ self.linebreak = []
+ else:
+ self.linebreak = linebreak
+ self.linebreak_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docTocItemType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docTocItemType.subclass:
+ return docTocItemType.subclass(*args_, **kwargs_)
+ else:
+ return docTocItemType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ulink(self):
+ return self.ulink
+ def set_ulink(self, ulink):
+ self.ulink = ulink
+ def add_ulink(self, value):
+ self.ulink.append(value)
+ def insert_ulink_at(self, index, value):
+ self.ulink.insert(index, value)
+ def replace_ulink_at(self, index, value):
+ self.ulink[index] = value
+ def get_bold(self):
+ return self.bold
+ def set_bold(self, bold):
+ self.bold = bold
+ def add_bold(self, value):
+ self.bold.append(value)
+ def insert_bold_at(self, index, value):
+ self.bold.insert(index, value)
+ def replace_bold_at(self, index, value):
+ self.bold[index] = value
+ def get_s(self):
+ return self.s
+ def set_s(self, s):
+ self.s = s
+ def add_s(self, value):
+ self.s.append(value)
+ def insert_s_at(self, index, value):
+ self.s.insert(index, value)
+ def replace_s_at(self, index, value):
+ self.s[index] = value
+ def get_strike(self):
+ return self.strike
+ def set_strike(self, strike):
+ self.strike = strike
+ def add_strike(self, value):
+ self.strike.append(value)
+ def insert_strike_at(self, index, value):
+ self.strike.insert(index, value)
+ def replace_strike_at(self, index, value):
+ self.strike[index] = value
+ def get_underline(self):
+ return self.underline
+ def set_underline(self, underline):
+ self.underline = underline
+ def add_underline(self, value):
+ self.underline.append(value)
+ def insert_underline_at(self, index, value):
+ self.underline.insert(index, value)
+ def replace_underline_at(self, index, value):
+ self.underline[index] = value
+ def get_emphasis(self):
+ return self.emphasis
+ def set_emphasis(self, emphasis):
+ self.emphasis = emphasis
+ def add_emphasis(self, value):
+ self.emphasis.append(value)
+ def insert_emphasis_at(self, index, value):
+ self.emphasis.insert(index, value)
+ def replace_emphasis_at(self, index, value):
+ self.emphasis[index] = value
+ def get_computeroutput(self):
+ return self.computeroutput
+ def set_computeroutput(self, computeroutput):
+ self.computeroutput = computeroutput
+ def add_computeroutput(self, value):
+ self.computeroutput.append(value)
+ def insert_computeroutput_at(self, index, value):
+ self.computeroutput.insert(index, value)
+ def replace_computeroutput_at(self, index, value):
+ self.computeroutput[index] = value
+ def get_subscript(self):
+ return self.subscript
+ def set_subscript(self, subscript):
+ self.subscript = subscript
+ def add_subscript(self, value):
+ self.subscript.append(value)
+ def insert_subscript_at(self, index, value):
+ self.subscript.insert(index, value)
+ def replace_subscript_at(self, index, value):
+ self.subscript[index] = value
+ def get_superscript(self):
+ return self.superscript
+ def set_superscript(self, superscript):
+ self.superscript = superscript
+ def add_superscript(self, value):
+ self.superscript.append(value)
+ def insert_superscript_at(self, index, value):
+ self.superscript.insert(index, value)
+ def replace_superscript_at(self, index, value):
+ self.superscript[index] = value
+ def get_center(self):
+ return self.center
+ def set_center(self, center):
+ self.center = center
+ def add_center(self, value):
+ self.center.append(value)
+ def insert_center_at(self, index, value):
+ self.center.insert(index, value)
+ def replace_center_at(self, index, value):
+ self.center[index] = value
+ def get_small(self):
+ return self.small
+ def set_small(self, small):
+ self.small = small
+ def add_small(self, value):
+ self.small.append(value)
+ def insert_small_at(self, index, value):
+ self.small.insert(index, value)
+ def replace_small_at(self, index, value):
+ self.small[index] = value
+ def get_del(self):
+ return self.del_
+ def set_del(self, del_):
+ self.del_ = del_
+ def add_del(self, value):
+ self.del_.append(value)
+ def insert_del_at(self, index, value):
+ self.del_.insert(index, value)
+ def replace_del_at(self, index, value):
+ self.del_[index] = value
+ def get_ins(self):
+ return self.ins
+ def set_ins(self, ins):
+ self.ins = ins
+ def add_ins(self, value):
+ self.ins.append(value)
+ def insert_ins_at(self, index, value):
+ self.ins.insert(index, value)
+ def replace_ins_at(self, index, value):
+ self.ins[index] = value
+ def get_htmlonly(self):
+ return self.htmlonly
+ def set_htmlonly(self, htmlonly):
+ self.htmlonly = htmlonly
+ def add_htmlonly(self, value):
+ self.htmlonly.append(value)
+ def insert_htmlonly_at(self, index, value):
+ self.htmlonly.insert(index, value)
+ def replace_htmlonly_at(self, index, value):
+ self.htmlonly[index] = value
+ def get_manonly(self):
+ return self.manonly
+ def set_manonly(self, manonly):
+ self.manonly = manonly
+ def add_manonly(self, value):
+ self.manonly.append(value)
+ def insert_manonly_at(self, index, value):
+ self.manonly.insert(index, value)
+ def replace_manonly_at(self, index, value):
+ self.manonly[index] = value
+ def get_xmlonly(self):
+ return self.xmlonly
+ def set_xmlonly(self, xmlonly):
+ self.xmlonly = xmlonly
+ def add_xmlonly(self, value):
+ self.xmlonly.append(value)
+ def insert_xmlonly_at(self, index, value):
+ self.xmlonly.insert(index, value)
+ def replace_xmlonly_at(self, index, value):
+ self.xmlonly[index] = value
+ def get_rtfonly(self):
+ return self.rtfonly
+ def set_rtfonly(self, rtfonly):
+ self.rtfonly = rtfonly
+ def add_rtfonly(self, value):
+ self.rtfonly.append(value)
+ def insert_rtfonly_at(self, index, value):
+ self.rtfonly.insert(index, value)
+ def replace_rtfonly_at(self, index, value):
+ self.rtfonly[index] = value
+ def get_latexonly(self):
+ return self.latexonly
+ def set_latexonly(self, latexonly):
+ self.latexonly = latexonly
+ def add_latexonly(self, value):
+ self.latexonly.append(value)
+ def insert_latexonly_at(self, index, value):
+ self.latexonly.insert(index, value)
+ def replace_latexonly_at(self, index, value):
+ self.latexonly[index] = value
+ def get_docbookonly(self):
+ return self.docbookonly
+ def set_docbookonly(self, docbookonly):
+ self.docbookonly = docbookonly
+ def add_docbookonly(self, value):
+ self.docbookonly.append(value)
+ def insert_docbookonly_at(self, index, value):
+ self.docbookonly.insert(index, value)
+ def replace_docbookonly_at(self, index, value):
+ self.docbookonly[index] = value
+ def get_image(self):
+ return self.image
+ def set_image(self, image):
+ self.image = image
+ def add_image(self, value):
+ self.image.append(value)
+ def insert_image_at(self, index, value):
+ self.image.insert(index, value)
+ def replace_image_at(self, index, value):
+ self.image[index] = value
+ def get_dot(self):
+ return self.dot
+ def set_dot(self, dot):
+ self.dot = dot
+ def add_dot(self, value):
+ self.dot.append(value)
+ def insert_dot_at(self, index, value):
+ self.dot.insert(index, value)
+ def replace_dot_at(self, index, value):
+ self.dot[index] = value
+ def get_msc(self):
+ return self.msc
+ def set_msc(self, msc):
+ self.msc = msc
+ def add_msc(self, value):
+ self.msc.append(value)
+ def insert_msc_at(self, index, value):
+ self.msc.insert(index, value)
+ def replace_msc_at(self, index, value):
+ self.msc[index] = value
+ def get_plantuml(self):
+ return self.plantuml
+ def set_plantuml(self, plantuml):
+ self.plantuml = plantuml
+ def add_plantuml(self, value):
+ self.plantuml.append(value)
+ def insert_plantuml_at(self, index, value):
+ self.plantuml.insert(index, value)
+ def replace_plantuml_at(self, index, value):
+ self.plantuml[index] = value
+ def get_anchor(self):
+ return self.anchor
+ def set_anchor(self, anchor):
+ self.anchor = anchor
+ def add_anchor(self, value):
+ self.anchor.append(value)
+ def insert_anchor_at(self, index, value):
+ self.anchor.insert(index, value)
+ def replace_anchor_at(self, index, value):
+ self.anchor[index] = value
+ def get_formula(self):
+ return self.formula
+ def set_formula(self, formula):
+ self.formula = formula
+ def add_formula(self, value):
+ self.formula.append(value)
+ def insert_formula_at(self, index, value):
+ self.formula.insert(index, value)
+ def replace_formula_at(self, index, value):
+ self.formula[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_at(self, index, value):
+ self.ref.insert(index, value)
+ def replace_ref_at(self, index, value):
+ self.ref[index] = value
+ def get_emoji(self):
+ return self.emoji
+ def set_emoji(self, emoji):
+ self.emoji = emoji
+ def add_emoji(self, value):
+ self.emoji.append(value)
+ def insert_emoji_at(self, index, value):
+ self.emoji.insert(index, value)
+ def replace_emoji_at(self, index, value):
+ self.emoji[index] = value
+ def get_linebreak(self):
+ return self.linebreak
+ def set_linebreak(self, linebreak):
+ self.linebreak = linebreak
+ def add_linebreak(self, value):
+ self.linebreak.append(value)
+ def insert_linebreak_at(self, index, value):
+ self.linebreak.insert(index, value)
+ def replace_linebreak_at(self, index, value):
+ self.linebreak[index] = value
+ def get_id(self):
+ return self.id
+ def set_id(self, id):
+ self.id = id
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ulink or
+ self.bold or
+ self.s or
+ self.strike or
+ self.underline or
+ self.emphasis or
+ self.computeroutput or
+ self.subscript or
+ self.superscript or
+ self.center or
+ self.small or
+ self.del_ or
+ self.ins or
+ self.htmlonly or
+ self.manonly or
+ self.xmlonly or
+ self.rtfonly or
+ self.latexonly or
+ self.docbookonly or
+ self.image or
+ self.dot or
+ self.msc or
+ self.plantuml or
+ self.anchor or
+ self.formula or
+ self.ref or
+ self.emoji or
+ self.linebreak or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTocItemType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docTocItemType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docTocItemType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docTocItemType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docTocItemType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docTocItemType'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTocItemType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for ulink_ in self.ulink:
+ namespaceprefix_ = self.ulink_nsprefix_ + ':' if (UseCapturedNS_ and self.ulink_nsprefix_) else ''
+ ulink_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ulink', pretty_print=pretty_print)
+ for bold_ in self.bold:
+ namespaceprefix_ = self.bold_nsprefix_ + ':' if (UseCapturedNS_ and self.bold_nsprefix_) else ''
+ bold_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='bold', pretty_print=pretty_print)
+ for s_ in self.s:
+ namespaceprefix_ = self.s_nsprefix_ + ':' if (UseCapturedNS_ and self.s_nsprefix_) else ''
+ s_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='s', pretty_print=pretty_print)
+ for strike_ in self.strike:
+ namespaceprefix_ = self.strike_nsprefix_ + ':' if (UseCapturedNS_ and self.strike_nsprefix_) else ''
+ strike_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='strike', pretty_print=pretty_print)
+ for underline_ in self.underline:
+ namespaceprefix_ = self.underline_nsprefix_ + ':' if (UseCapturedNS_ and self.underline_nsprefix_) else ''
+ underline_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='underline', pretty_print=pretty_print)
+ for emphasis_ in self.emphasis:
+ namespaceprefix_ = self.emphasis_nsprefix_ + ':' if (UseCapturedNS_ and self.emphasis_nsprefix_) else ''
+ emphasis_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emphasis', pretty_print=pretty_print)
+ for computeroutput_ in self.computeroutput:
+ namespaceprefix_ = self.computeroutput_nsprefix_ + ':' if (UseCapturedNS_ and self.computeroutput_nsprefix_) else ''
+ computeroutput_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='computeroutput', pretty_print=pretty_print)
+ for subscript_ in self.subscript:
+ namespaceprefix_ = self.subscript_nsprefix_ + ':' if (UseCapturedNS_ and self.subscript_nsprefix_) else ''
+ subscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='subscript', pretty_print=pretty_print)
+ for superscript_ in self.superscript:
+ namespaceprefix_ = self.superscript_nsprefix_ + ':' if (UseCapturedNS_ and self.superscript_nsprefix_) else ''
+ superscript_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='superscript', pretty_print=pretty_print)
+ for center_ in self.center:
+ namespaceprefix_ = self.center_nsprefix_ + ':' if (UseCapturedNS_ and self.center_nsprefix_) else ''
+ center_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='center', pretty_print=pretty_print)
+ for small_ in self.small:
+ namespaceprefix_ = self.small_nsprefix_ + ':' if (UseCapturedNS_ and self.small_nsprefix_) else ''
+ small_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='small', pretty_print=pretty_print)
+ for del_ in self.del_:
+ namespaceprefix_ = self.del__nsprefix_ + ':' if (UseCapturedNS_ and self.del__nsprefix_) else ''
+ del_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='del', pretty_print=pretty_print)
+ for ins_ in self.ins:
+ namespaceprefix_ = self.ins_nsprefix_ + ':' if (UseCapturedNS_ and self.ins_nsprefix_) else ''
+ ins_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ins', pretty_print=pretty_print)
+ for htmlonly_ in self.htmlonly:
+ namespaceprefix_ = self.htmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.htmlonly_nsprefix_) else ''
+ htmlonly_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='htmlonly', pretty_print=pretty_print)
+ for manonly_ in self.manonly:
+ namespaceprefix_ = self.manonly_nsprefix_ + ':' if (UseCapturedNS_ and self.manonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%smanonly>%s</%smanonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(manonly_), input_name='manonly')), namespaceprefix_ , eol_))
+ for xmlonly_ in self.xmlonly:
+ namespaceprefix_ = self.xmlonly_nsprefix_ + ':' if (UseCapturedNS_ and self.xmlonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxmlonly>%s</%sxmlonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xmlonly_), input_name='xmlonly')), namespaceprefix_ , eol_))
+ for rtfonly_ in self.rtfonly:
+ namespaceprefix_ = self.rtfonly_nsprefix_ + ':' if (UseCapturedNS_ and self.rtfonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%srtfonly>%s</%srtfonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(rtfonly_), input_name='rtfonly')), namespaceprefix_ , eol_))
+ for latexonly_ in self.latexonly:
+ namespaceprefix_ = self.latexonly_nsprefix_ + ':' if (UseCapturedNS_ and self.latexonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%slatexonly>%s</%slatexonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(latexonly_), input_name='latexonly')), namespaceprefix_ , eol_))
+ for docbookonly_ in self.docbookonly:
+ namespaceprefix_ = self.docbookonly_nsprefix_ + ':' if (UseCapturedNS_ and self.docbookonly_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sdocbookonly>%s</%sdocbookonly>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(docbookonly_), input_name='docbookonly')), namespaceprefix_ , eol_))
+ for image_ in self.image:
+ namespaceprefix_ = self.image_nsprefix_ + ':' if (UseCapturedNS_ and self.image_nsprefix_) else ''
+ image_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='image', pretty_print=pretty_print)
+ for dot_ in self.dot:
+ namespaceprefix_ = self.dot_nsprefix_ + ':' if (UseCapturedNS_ and self.dot_nsprefix_) else ''
+ dot_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='dot', pretty_print=pretty_print)
+ for msc_ in self.msc:
+ namespaceprefix_ = self.msc_nsprefix_ + ':' if (UseCapturedNS_ and self.msc_nsprefix_) else ''
+ msc_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='msc', pretty_print=pretty_print)
+ for plantuml_ in self.plantuml:
+ namespaceprefix_ = self.plantuml_nsprefix_ + ':' if (UseCapturedNS_ and self.plantuml_nsprefix_) else ''
+ plantuml_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='plantuml', pretty_print=pretty_print)
+ for anchor_ in self.anchor:
+ namespaceprefix_ = self.anchor_nsprefix_ + ':' if (UseCapturedNS_ and self.anchor_nsprefix_) else ''
+ anchor_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='anchor', pretty_print=pretty_print)
+ for formula_ in self.formula:
+ namespaceprefix_ = self.formula_nsprefix_ + ':' if (UseCapturedNS_ and self.formula_nsprefix_) else ''
+ formula_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='formula', pretty_print=pretty_print)
+ for ref_ in self.ref:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ ref_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ for emoji_ in self.emoji:
+ namespaceprefix_ = self.emoji_nsprefix_ + ':' if (UseCapturedNS_ and self.emoji_nsprefix_) else ''
+ emoji_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='emoji', pretty_print=pretty_print)
+ for linebreak_ in self.linebreak:
+ namespaceprefix_ = self.linebreak_nsprefix_ + ':' if (UseCapturedNS_ and self.linebreak_nsprefix_) else ''
+ linebreak_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='linebreak', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ulink':
+ obj_ = docURLLink.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ulink', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ulink'):
+ self.add_ulink(obj_.value)
+ elif hasattr(self, 'set_ulink'):
+ self.set_ulink(obj_.value)
+ elif nodeName_ == 'bold':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'bold', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_bold'):
+ self.add_bold(obj_.value)
+ elif hasattr(self, 'set_bold'):
+ self.set_bold(obj_.value)
+ elif nodeName_ == 's':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 's', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_s'):
+ self.add_s(obj_.value)
+ elif hasattr(self, 'set_s'):
+ self.set_s(obj_.value)
+ elif nodeName_ == 'strike':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'strike', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_strike'):
+ self.add_strike(obj_.value)
+ elif hasattr(self, 'set_strike'):
+ self.set_strike(obj_.value)
+ elif nodeName_ == 'underline':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'underline', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_underline'):
+ self.add_underline(obj_.value)
+ elif hasattr(self, 'set_underline'):
+ self.set_underline(obj_.value)
+ elif nodeName_ == 'emphasis':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emphasis', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emphasis'):
+ self.add_emphasis(obj_.value)
+ elif hasattr(self, 'set_emphasis'):
+ self.set_emphasis(obj_.value)
+ elif nodeName_ == 'computeroutput':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'computeroutput', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_computeroutput'):
+ self.add_computeroutput(obj_.value)
+ elif hasattr(self, 'set_computeroutput'):
+ self.set_computeroutput(obj_.value)
+ elif nodeName_ == 'subscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'subscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_subscript'):
+ self.add_subscript(obj_.value)
+ elif hasattr(self, 'set_subscript'):
+ self.set_subscript(obj_.value)
+ elif nodeName_ == 'superscript':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'superscript', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_superscript'):
+ self.add_superscript(obj_.value)
+ elif hasattr(self, 'set_superscript'):
+ self.set_superscript(obj_.value)
+ elif nodeName_ == 'center':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'center', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_center'):
+ self.add_center(obj_.value)
+ elif hasattr(self, 'set_center'):
+ self.set_center(obj_.value)
+ elif nodeName_ == 'small':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'small', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_small'):
+ self.add_small(obj_.value)
+ elif hasattr(self, 'set_small'):
+ self.set_small(obj_.value)
+ elif nodeName_ == 'del':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'del', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_del'):
+ self.add_del(obj_.value)
+ elif hasattr(self, 'set_del'):
+ self.set_del(obj_.value)
+ elif nodeName_ == 'ins':
+ obj_ = docMarkupType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ins', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ins'):
+ self.add_ins(obj_.value)
+ elif hasattr(self, 'set_ins'):
+ self.set_ins(obj_.value)
+ elif nodeName_ == 'htmlonly':
+ obj_ = docHtmlOnlyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'htmlonly', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_htmlonly'):
+ self.add_htmlonly(obj_.value)
+ elif hasattr(self, 'set_htmlonly'):
+ self.set_htmlonly(obj_.value)
+ elif nodeName_ == 'manonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'manonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'manonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'manonly', valuestr_)
+ self.content_.append(obj_)
+ self.manonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xmlonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'xmlonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'xmlonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'xmlonly', valuestr_)
+ self.content_.append(obj_)
+ self.xmlonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'rtfonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'rtfonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'rtfonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'rtfonly', valuestr_)
+ self.content_.append(obj_)
+ self.rtfonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'latexonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'latexonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'latexonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'latexonly', valuestr_)
+ self.content_.append(obj_)
+ self.latexonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'docbookonly' and child_.text is not None:
+ valuestr_ = child_.text
+ valuestr_ = self.gds_parse_string(valuestr_, node, 'docbookonly')
+ valuestr_ = self.gds_validate_string(valuestr_, node, 'docbookonly')
+ obj_ = self.mixedclass_(MixedContainer.CategorySimple,
+ MixedContainer.TypeString, 'docbookonly', valuestr_)
+ self.content_.append(obj_)
+ self.docbookonly_nsprefix_ = child_.prefix
+ elif nodeName_ == 'image':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'image', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_image'):
+ self.add_image(obj_.value)
+ elif hasattr(self, 'set_image'):
+ self.set_image(obj_.value)
+ elif nodeName_ == 'dot':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'dot', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_dot'):
+ self.add_dot(obj_.value)
+ elif hasattr(self, 'set_dot'):
+ self.set_dot(obj_.value)
+ elif nodeName_ == 'msc':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'msc', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_msc'):
+ self.add_msc(obj_.value)
+ elif hasattr(self, 'set_msc'):
+ self.set_msc(obj_.value)
+ elif nodeName_ == 'plantuml':
+ obj_ = docImageType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'plantuml', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_plantuml'):
+ self.add_plantuml(obj_.value)
+ elif hasattr(self, 'set_plantuml'):
+ self.set_plantuml(obj_.value)
+ elif nodeName_ == 'anchor':
+ obj_ = docAnchorType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'anchor', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_anchor'):
+ self.add_anchor(obj_.value)
+ elif hasattr(self, 'set_anchor'):
+ self.set_anchor(obj_.value)
+ elif nodeName_ == 'formula':
+ obj_ = docFormulaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'formula', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_formula'):
+ self.add_formula(obj_.value)
+ elif hasattr(self, 'set_formula'):
+ self.set_formula(obj_.value)
+ elif nodeName_ == 'ref':
+ obj_ = docRefTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ elif nodeName_ == 'emoji':
+ obj_ = docEmojiType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'emoji', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_emoji'):
+ self.add_emoji(obj_.value)
+ elif hasattr(self, 'set_emoji'):
+ self.set_emoji(obj_.value)
+ elif nodeName_ == 'linebreak':
+ obj_ = docEmptyType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'linebreak', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_linebreak'):
+ self.add_linebreak(obj_.value)
+ elif hasattr(self, 'set_linebreak'):
+ self.set_linebreak(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docTocItemType
+
+
+class docTocListType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, tocitem=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if tocitem is None:
+ self.tocitem = []
+ else:
+ self.tocitem = tocitem
+ self.tocitem_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docTocListType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docTocListType.subclass:
+ return docTocListType.subclass(*args_, **kwargs_)
+ else:
+ return docTocListType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.tocitem.insert(index, value)
+ def replace_tocitem_at(self, index, value):
+ self.tocitem[index] = value
+ def hasContent_(self):
+ if (
+ self.tocitem
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTocListType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docTocListType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docTocListType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docTocListType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docTocListType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docTocListType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docTocListType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for tocitem_ in self.tocitem:
+ namespaceprefix_ = self.tocitem_nsprefix_ + ':' if (UseCapturedNS_ and self.tocitem_nsprefix_) else ''
+ tocitem_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tocitem', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'tocitem':
+ obj_ = docTocItemType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.tocitem.append(obj_)
+ obj_.original_tagname_ = 'tocitem'
+# end class docTocListType
+
+
+class docLanguageType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, langid=None, para=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.langid = _cast(None, langid)
+ self.langid_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docLanguageType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docLanguageType.subclass:
+ return docLanguageType.subclass(*args_, **kwargs_)
+ else:
+ return docLanguageType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def get_langid(self):
+ return self.langid
+ def set_langid(self, langid):
+ self.langid = langid
+ def hasContent_(self):
+ if (
+ self.para
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docLanguageType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docLanguageType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docLanguageType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docLanguageType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docLanguageType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docLanguageType'):
+ if self.langid is not None and 'langid' not in already_processed:
+ already_processed.add('langid')
+ outfile.write(' langid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.langid), input_name='langid')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docLanguageType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('langid', node)
+ if value is not None and 'langid' not in already_processed:
+ already_processed.add('langid')
+ self.langid = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.para.append(obj_)
+ obj_.original_tagname_ = 'para'
+# end class docLanguageType
+
+
+class docParamListType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, kind=None, parameteritem=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.kind = _cast(None, kind)
+ self.kind_nsprefix_ = None
+ if parameteritem is None:
+ self.parameteritem = []
+ else:
+ self.parameteritem = parameteritem
+ self.parameteritem_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docParamListType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docParamListType.subclass:
+ return docParamListType.subclass(*args_, **kwargs_)
+ else:
+ return docParamListType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.parameteritem.insert(index, value)
+ def replace_parameteritem_at(self, index, value):
+ self.parameteritem[index] = value
+ def get_kind(self):
+ return self.kind
+ def set_kind(self, kind):
+ self.kind = kind
+ def validate_DoxParamListKind(self, value):
+ # Validate type DoxParamListKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['param', 'retval', 'exception', 'templateparam']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxParamListKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.parameteritem
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamListType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docParamListType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docParamListType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docParamListType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docParamListType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docParamListType'):
+ if self.kind is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ outfile.write(' kind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kind), input_name='kind')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamListType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for parameteritem_ in self.parameteritem:
+ namespaceprefix_ = self.parameteritem_nsprefix_ + ':' if (UseCapturedNS_ and self.parameteritem_nsprefix_) else ''
+ parameteritem_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parameteritem', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('kind', node)
+ if value is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ self.kind = value
+ self.validate_DoxParamListKind(self.kind) # validate type DoxParamListKind
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'parameteritem':
+ obj_ = docParamListItem.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.parameteritem.append(obj_)
+ obj_.original_tagname_ = 'parameteritem'
+# end class docParamListType
+
+
+class docParamListItem(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, parameternamelist=None, parameterdescription=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if parameternamelist is None:
+ self.parameternamelist = []
+ else:
+ self.parameternamelist = parameternamelist
+ self.parameternamelist_nsprefix_ = None
+ self.parameterdescription = parameterdescription
+ self.parameterdescription_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docParamListItem)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docParamListItem.subclass:
+ return docParamListItem.subclass(*args_, **kwargs_)
+ else:
+ return docParamListItem(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.parameternamelist.insert(index, value)
+ def replace_parameternamelist_at(self, index, value):
+ self.parameternamelist[index] = value
+ def get_parameterdescription(self):
+ return self.parameterdescription
+ def set_parameterdescription(self, parameterdescription):
+ self.parameterdescription = parameterdescription
+ def hasContent_(self):
+ if (
+ self.parameternamelist or
+ self.parameterdescription is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamListItem', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docParamListItem')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docParamListItem':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docParamListItem')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docParamListItem', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docParamListItem'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamListItem', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for parameternamelist_ in self.parameternamelist:
+ namespaceprefix_ = self.parameternamelist_nsprefix_ + ':' if (UseCapturedNS_ and self.parameternamelist_nsprefix_) else ''
+ parameternamelist_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parameternamelist', pretty_print=pretty_print)
+ if self.parameterdescription is not None:
+ namespaceprefix_ = self.parameterdescription_nsprefix_ + ':' if (UseCapturedNS_ and self.parameterdescription_nsprefix_) else ''
+ self.parameterdescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parameterdescription', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'parameternamelist':
+ obj_ = docParamNameList.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.parameternamelist.append(obj_)
+ obj_.original_tagname_ = 'parameternamelist'
+ elif nodeName_ == 'parameterdescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.parameterdescription = obj_
+ obj_.original_tagname_ = 'parameterdescription'
+# end class docParamListItem
+
+
+class docParamNameList(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, parametertype=None, parametername=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if parametertype is None:
+ self.parametertype = []
+ else:
+ self.parametertype = parametertype
+ self.parametertype_nsprefix_ = None
+ if parametername is None:
+ self.parametername = []
+ else:
+ self.parametername = parametername
+ self.parametername_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docParamNameList)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docParamNameList.subclass:
+ return docParamNameList.subclass(*args_, **kwargs_)
+ else:
+ return docParamNameList(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_parametertype(self):
+ return self.parametertype
+ def set_parametertype(self, parametertype):
+ self.parametertype = parametertype
+ def add_parametertype(self, value):
+ self.parametertype.append(value)
+ def insert_parametertype_at(self, index, value):
+ self.parametertype.insert(index, value)
+ def replace_parametertype_at(self, index, value):
+ self.parametertype[index] = value
+ 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_at(self, index, value):
+ self.parametername.insert(index, value)
+ def replace_parametername_at(self, index, value):
+ self.parametername[index] = value
+ def hasContent_(self):
+ if (
+ self.parametertype or
+ self.parametername
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamNameList', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docParamNameList')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docParamNameList':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docParamNameList')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docParamNameList', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docParamNameList'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamNameList', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for parametertype_ in self.parametertype:
+ namespaceprefix_ = self.parametertype_nsprefix_ + ':' if (UseCapturedNS_ and self.parametertype_nsprefix_) else ''
+ parametertype_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parametertype', pretty_print=pretty_print)
+ for parametername_ in self.parametername:
+ namespaceprefix_ = self.parametername_nsprefix_ + ':' if (UseCapturedNS_ and self.parametername_nsprefix_) else ''
+ parametername_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='parametername', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'parametertype':
+ obj_ = docParamType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.parametertype.append(obj_)
+ obj_.original_tagname_ = 'parametertype'
+ elif nodeName_ == 'parametername':
+ obj_ = docParamName.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.parametername.append(obj_)
+ obj_.original_tagname_ = 'parametername'
+# end class docParamNameList
+
+
+class docParamType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, ref=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docParamType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docParamType.subclass:
+ return docParamType.subclass(*args_, **kwargs_)
+ else:
+ return docParamType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_ref(self):
+ return self.ref
+ def set_ref(self, ref):
+ self.ref = ref
+ def get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def hasContent_(self):
+ if (
+ self.ref is not None or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docParamType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docParamType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docParamType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docParamType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docParamType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamType', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.ref is not None:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ self.ref.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ref':
+ obj_ = refTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docParamType
+
+
+class docParamName(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, direction=None, ref=None, valueOf_=None, mixedclass_=None, content_=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.direction = _cast(None, direction)
+ self.direction_nsprefix_ = None
+ self.ref = ref
+ self.ref_nsprefix_ = None
+ self.valueOf_ = valueOf_
+ if mixedclass_ is None:
+ self.mixedclass_ = MixedContainer
+ else:
+ self.mixedclass_ = mixedclass_
+ if content_ is None:
+ self.content_ = []
+ else:
+ self.content_ = content_
+ self.valueOf_ = valueOf_
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docParamName)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docParamName.subclass:
+ return docParamName.subclass(*args_, **kwargs_)
+ else:
+ return docParamName(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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 get_valueOf_(self): return self.valueOf_
+ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+ def validate_DoxParamDir(self, value):
+ # Validate type DoxParamDir, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['in', 'out', 'inout']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on DoxParamDir' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.ref is not None or
+ (1 if type(self.valueOf_) in [int,float] else self.valueOf_) or
+ self.content_
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamName', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docParamName')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docParamName':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docParamName')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docParamName', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docParamName'):
+ if self.direction is not None and 'direction' not in already_processed:
+ already_processed.add('direction')
+ outfile.write(' direction=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.direction), input_name='direction')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParamName', fromsubclass_=False, pretty_print=True):
+ if not fromsubclass_:
+ for item_ in self.content_:
+ item_.export(outfile, level, item_.name, namespaceprefix_, pretty_print=pretty_print)
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.ref is not None:
+ namespaceprefix_ = self.ref_nsprefix_ + ':' if (UseCapturedNS_ and self.ref_nsprefix_) else ''
+ self.ref.export(outfile, level, namespaceprefix_, namespacedef_='', name_='ref', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ self.valueOf_ = get_all_text_(node)
+ if node.text is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', node.text)
+ self.content_.append(obj_)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('direction', node)
+ if value is not None and 'direction' not in already_processed:
+ already_processed.add('direction')
+ self.direction = value
+ self.validate_DoxParamDir(self.direction) # validate type DoxParamDir
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'ref':
+ obj_ = refTextType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ obj_ = self.mixedclass_(MixedContainer.CategoryComplex,
+ MixedContainer.TypeNone, 'ref', obj_)
+ self.content_.append(obj_)
+ if hasattr(self, 'add_ref'):
+ self.add_ref(obj_.value)
+ elif hasattr(self, 'set_ref'):
+ self.set_ref(obj_.value)
+ if not fromsubclass_ and child_.tail is not None:
+ obj_ = self.mixedclass_(MixedContainer.CategoryText,
+ MixedContainer.TypeNone, '', child_.tail)
+ self.content_.append(obj_)
+# end class docParamName
+
+
+class docXRefSectType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, id=None, xreftitle=None, xrefdescription=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.id = _cast(None, id)
+ self.id_nsprefix_ = None
+ if xreftitle is None:
+ self.xreftitle = []
+ else:
+ self.xreftitle = xreftitle
+ self.xreftitle_nsprefix_ = None
+ self.xrefdescription = xrefdescription
+ self.xrefdescription_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docXRefSectType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docXRefSectType.subclass:
+ return docXRefSectType.subclass(*args_, **kwargs_)
+ else:
+ return docXRefSectType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.xreftitle.insert(index, value)
+ def replace_xreftitle_at(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 hasContent_(self):
+ if (
+ self.xreftitle or
+ self.xrefdescription is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docXRefSectType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docXRefSectType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docXRefSectType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docXRefSectType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docXRefSectType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docXRefSectType'):
+ if self.id is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ outfile.write(' id=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.id), input_name='id')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docXRefSectType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for xreftitle_ in self.xreftitle:
+ namespaceprefix_ = self.xreftitle_nsprefix_ + ':' if (UseCapturedNS_ and self.xreftitle_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sxreftitle>%s</%sxreftitle>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(xreftitle_), input_name='xreftitle')), namespaceprefix_ , eol_))
+ if self.xrefdescription is not None:
+ namespaceprefix_ = self.xrefdescription_nsprefix_ + ':' if (UseCapturedNS_ and self.xrefdescription_nsprefix_) else ''
+ self.xrefdescription.export(outfile, level, namespaceprefix_, namespacedef_='', name_='xrefdescription', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('id', node)
+ if value is not None and 'id' not in already_processed:
+ already_processed.add('id')
+ self.id = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'xreftitle':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'xreftitle')
+ value_ = self.gds_validate_string(value_, node, 'xreftitle')
+ self.xreftitle.append(value_)
+ self.xreftitle_nsprefix_ = child_.prefix
+ elif nodeName_ == 'xrefdescription':
+ obj_ = descriptionType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.xrefdescription = obj_
+ obj_.original_tagname_ = 'xrefdescription'
+# end class docXRefSectType
+
+
+class docCopyType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, link=None, para=None, sect1=None, internal=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.link = _cast(None, link)
+ self.link_nsprefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ if sect1 is None:
+ self.sect1 = []
+ else:
+ self.sect1 = sect1
+ self.sect1_nsprefix_ = None
+ self.internal = internal
+ self.internal_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docCopyType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docCopyType.subclass:
+ return docCopyType.subclass(*args_, **kwargs_)
+ else:
+ return docCopyType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(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_at(self, index, value):
+ self.sect1.insert(index, value)
+ def replace_sect1_at(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 hasContent_(self):
+ if (
+ self.para or
+ self.sect1 or
+ self.internal is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docCopyType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docCopyType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docCopyType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docCopyType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docCopyType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docCopyType'):
+ if self.link is not None and 'link' not in already_processed:
+ already_processed.add('link')
+ outfile.write(' link=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.link), input_name='link')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docCopyType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ for sect1_ in self.sect1:
+ namespaceprefix_ = self.sect1_nsprefix_ + ':' if (UseCapturedNS_ and self.sect1_nsprefix_) else ''
+ sect1_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='sect1', pretty_print=pretty_print)
+ if self.internal is not None:
+ namespaceprefix_ = self.internal_nsprefix_ + ':' if (UseCapturedNS_ and self.internal_nsprefix_) else ''
+ self.internal.export(outfile, level, namespaceprefix_, namespacedef_='', name_='internal', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('link', node)
+ if value is not None and 'link' not in already_processed:
+ already_processed.add('link')
+ self.link = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.para.append(obj_)
+ obj_.original_tagname_ = 'para'
+ elif nodeName_ == 'sect1':
+ obj_ = docSect1Type.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.sect1.append(obj_)
+ obj_.original_tagname_ = 'sect1'
+ elif nodeName_ == 'internal':
+ obj_ = docInternalType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.internal = obj_
+ obj_.original_tagname_ = 'internal'
+# end class docCopyType
+
+
+class docBlockQuoteType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docBlockQuoteType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docBlockQuoteType.subclass:
+ return docBlockQuoteType.subclass(*args_, **kwargs_)
+ else:
+ return docBlockQuoteType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def hasContent_(self):
+ if (
+ self.para
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docBlockQuoteType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docBlockQuoteType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docBlockQuoteType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docBlockQuoteType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docBlockQuoteType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docBlockQuoteType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docBlockQuoteType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.para.append(obj_)
+ obj_.original_tagname_ = 'para'
+# end class docBlockQuoteType
+
+
+class docParBlockType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, para=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if para is None:
+ self.para = []
+ else:
+ self.para = para
+ self.para_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docParBlockType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docParBlockType.subclass:
+ return docParBlockType.subclass(*args_, **kwargs_)
+ else:
+ return docParBlockType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.para.insert(index, value)
+ def replace_para_at(self, index, value):
+ self.para[index] = value
+ def hasContent_(self):
+ if (
+ self.para
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParBlockType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docParBlockType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docParBlockType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docParBlockType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docParBlockType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docParBlockType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docParBlockType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for para_ in self.para:
+ namespaceprefix_ = self.para_nsprefix_ + ':' if (UseCapturedNS_ and self.para_nsprefix_) else ''
+ para_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='para', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'para':
+ obj_ = docParaType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.para.append(obj_)
+ obj_.original_tagname_ = 'para'
+# end class docParBlockType
+
+
+class docEmptyType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docEmptyType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docEmptyType.subclass:
+ return docEmptyType.subclass(*args_, **kwargs_)
+ else:
+ return docEmptyType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docEmptyType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docEmptyType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docEmptyType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docEmptyType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docEmptyType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docEmptyType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docEmptyType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class docEmptyType
+
+
+class tableofcontentsType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, tocsect=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ if tocsect is None:
+ self.tocsect = []
+ else:
+ self.tocsect = tocsect
+ self.tocsect_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, tableofcontentsType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if tableofcontentsType.subclass:
+ return tableofcontentsType.subclass(*args_, **kwargs_)
+ else:
+ return tableofcontentsType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_tocsect(self):
+ return self.tocsect
+ def set_tocsect(self, tocsect):
+ self.tocsect = tocsect
+ def add_tocsect(self, value):
+ self.tocsect.append(value)
+ def insert_tocsect_at(self, index, value):
+ self.tocsect.insert(index, value)
+ def replace_tocsect_at(self, index, value):
+ self.tocsect[index] = value
+ def hasContent_(self):
+ if (
+ self.tocsect
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='tableofcontentsType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('tableofcontentsType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'tableofcontentsType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tableofcontentsType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tableofcontentsType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tableofcontentsType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='tableofcontentsType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for tocsect_ in self.tocsect:
+ namespaceprefix_ = self.tocsect_nsprefix_ + ':' if (UseCapturedNS_ and self.tocsect_nsprefix_) else ''
+ tocsect_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tocsect', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'tocsect':
+ obj_ = tableofcontentsKindType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.tocsect.append(obj_)
+ obj_.original_tagname_ = 'tocsect'
+# end class tableofcontentsType
+
+
+class tableofcontentsKindType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, name=None, reference=None, tableofcontents=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.name = name
+ self.name_nsprefix_ = None
+ self.reference = reference
+ self.reference_nsprefix_ = None
+ if tableofcontents is None:
+ self.tableofcontents = []
+ else:
+ self.tableofcontents = tableofcontents
+ self.tableofcontents_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, tableofcontentsKindType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if tableofcontentsKindType.subclass:
+ return tableofcontentsKindType.subclass(*args_, **kwargs_)
+ else:
+ return tableofcontentsKindType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_name(self):
+ return self.name
+ def set_name(self, name):
+ self.name = name
+ def get_reference(self):
+ return self.reference
+ def set_reference(self, reference):
+ self.reference = reference
+ def get_tableofcontents(self):
+ return self.tableofcontents
+ def set_tableofcontents(self, tableofcontents):
+ self.tableofcontents = tableofcontents
+ def add_tableofcontents(self, value):
+ self.tableofcontents.append(value)
+ def insert_tableofcontents_at(self, index, value):
+ self.tableofcontents.insert(index, value)
+ def replace_tableofcontents_at(self, index, value):
+ self.tableofcontents[index] = value
+ def hasContent_(self):
+ if (
+ self.name is not None or
+ self.reference is not None or
+ self.tableofcontents
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='tableofcontentsKindType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('tableofcontentsKindType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'tableofcontentsKindType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='tableofcontentsKindType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='tableofcontentsKindType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='tableofcontentsKindType'):
+ pass
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='tableofcontentsKindType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.name is not None:
+ namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
+ if self.reference is not None:
+ namespaceprefix_ = self.reference_nsprefix_ + ':' if (UseCapturedNS_ and self.reference_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sreference>%s</%sreference>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.reference), input_name='reference')), namespaceprefix_ , eol_))
+ for tableofcontents_ in self.tableofcontents:
+ namespaceprefix_ = self.tableofcontents_nsprefix_ + ':' if (UseCapturedNS_ and self.tableofcontents_nsprefix_) else ''
+ tableofcontents_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='tableofcontents', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ pass
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'name':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'name')
+ value_ = self.gds_validate_string(value_, node, 'name')
+ self.name = value_
+ self.name_nsprefix_ = child_.prefix
+ elif nodeName_ == 'reference':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'reference')
+ value_ = self.gds_validate_string(value_, node, 'reference')
+ self.reference = value_
+ self.reference_nsprefix_ = child_.prefix
+ elif nodeName_ == 'tableofcontents':
+ obj_ = tableofcontentsType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.tableofcontents.append(obj_)
+ obj_.original_tagname_ = 'tableofcontents'
+# end class tableofcontentsKindType
+
+
+class docEmojiType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, name=None, unicode=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.name = _cast(None, name)
+ self.name_nsprefix_ = None
+ self.unicode = _cast(None, unicode)
+ self.unicode_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, docEmojiType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if docEmojiType.subclass:
+ return docEmojiType.subclass(*args_, **kwargs_)
+ else:
+ return docEmojiType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_name(self):
+ return self.name
+ def set_name(self, name):
+ self.name = name
+ def get_unicode(self):
+ return self.unicode
+ def set_unicode(self, unicode):
+ self.unicode = unicode
+ def hasContent_(self):
+ if (
+
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docEmojiType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('docEmojiType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'docEmojiType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='docEmojiType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='docEmojiType', pretty_print=pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='docEmojiType'):
+ if self.name is not None and 'name' not in already_processed:
+ already_processed.add('name')
+ outfile.write(' name=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.name), input_name='name')), ))
+ if self.unicode is not None and 'unicode' not in already_processed:
+ already_processed.add('unicode')
+ outfile.write(' unicode=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.unicode), input_name='unicode')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='docEmojiType', fromsubclass_=False, pretty_print=True):
+ pass
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('name', node)
+ if value is not None and 'name' not in already_processed:
+ already_processed.add('name')
+ self.name = value
+ value = find_attr_value_('unicode', node)
+ if value is not None and 'unicode' not in already_processed:
+ already_processed.add('unicode')
+ self.unicode = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ pass
+# end class docEmojiType
+
+
+GDSClassesMapping = {
+ 'doxygen': DoxygenType,
+}
+
+
+USAGE_TEXT = """
+Usage: python <Parser>.py [ -s ] <in_xml_file>
+"""
+
+
+def usage():
+ print(USAGE_TEXT)
+ sys.exit(1)
+
+
+def get_root_tag(node):
+ tag = Tag_pattern_.match(node.tag).groups()[-1]
+ rootClass = GDSClassesMapping.get(tag)
+ if rootClass is None:
+ rootClass = globals().get(tag)
+ return tag, rootClass
+
+
+def get_required_ns_prefix_defs(rootNode):
+ '''Get all name space prefix definitions required in this XML doc.
+ Return a dictionary of definitions and a char string of definitions.
+ '''
+ nsmap = {
+ prefix: uri
+ for node in rootNode.iter()
+ for (prefix, uri) in node.nsmap.items()
+ if prefix is not None
+ }
+ namespacedefs = ' '.join([
+ 'xmlns:{}="{}"'.format(prefix, uri)
+ for prefix, uri in nsmap.items()
+ ])
+ return nsmap, namespacedefs
+
+
+def parse(inFileName, silence=False, print_warnings=True):
+ global CapturedNsmap_
+ gds_collector = GdsCollector_()
+ parser = None
+ doc = parsexml_(inFileName, parser)
+ rootNode = doc.getroot()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode)
+ if not SaveElementTreeNode:
+ doc = None
+ rootNode = None
+ if not silence:
+ sys.stdout.write('<?xml version="1.0" ?>\n')
+ rootObj.export(
+ sys.stdout, 0, name_=rootTag,
+ namespacedef_=namespacedefs,
+ pretty_print=True)
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj
+
+
+def parseEtree(inFileName, silence=False, print_warnings=True,
+ mapping=None, nsmap=None):
+ parser = None
+ doc = parsexml_(inFileName, parser)
+ gds_collector = GdsCollector_()
+ rootNode = doc.getroot()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ # Enable Python to collect the space used by the DOM.
+ if mapping is None:
+ mapping = {}
+ rootElement = rootObj.to_etree(
+ None, name_=rootTag, mapping_=mapping, nsmap_=nsmap)
+ reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
+ if not SaveElementTreeNode:
+ doc = None
+ rootNode = None
+ if not silence:
+ content = etree_.tostring(
+ rootElement, pretty_print=True,
+ xml_declaration=True, encoding="utf-8")
+ sys.stdout.write(str(content))
+ sys.stdout.write('\n')
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj, rootElement, mapping, reverse_mapping
+
+
+def parseString(inString, silence=False, print_warnings=True):
+ '''Parse a string, create the object tree, and export it.
+
+ Arguments:
+ - inString -- A string. This XML fragment should not start
+ with an XML declaration containing an encoding.
+ - silence -- A boolean. If False, export the object.
+ Returns -- The root object in the tree.
+ '''
+ parser = None
+ rootNode= parsexmlstring_(inString, parser)
+ gds_collector = GdsCollector_()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ if not SaveElementTreeNode:
+ rootNode = None
+ if not silence:
+ sys.stdout.write('<?xml version="1.0" ?>\n')
+ rootObj.export(
+ sys.stdout, 0, name_=rootTag,
+ namespacedef_='')
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj
+
+
+def parseLiteral(inFileName, silence=False, print_warnings=True):
+ parser = None
+ doc = parsexml_(inFileName, parser)
+ gds_collector = GdsCollector_()
+ rootNode = doc.getroot()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ # Enable Python to collect the space used by the DOM.
+ if not SaveElementTreeNode:
+ doc = None
+ rootNode = None
+ if not silence:
+ sys.stdout.write('#from compound import *\n\n')
+ sys.stdout.write('import compound as model_\n\n')
+ sys.stdout.write('rootObj = model_.rootClass(\n')
+ rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
+ sys.stdout.write(')\n')
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj
+
+
+def main():
+ args = sys.argv[1:]
+ if len(args) == 1:
+ parse(args[0])
+ else:
+ usage()
+
+
+if __name__ == '__main__':
+ #import pdb; pdb.set_trace()
+ main()
+
+RenameMappings_ = {
+}
+
+#
+# Mapping of namespaces to types defined in them
+# and the file in which each is defined.
+# simpleTypes are marked "ST" and complexTypes "CT".
+NamespaceToDefMappings_ = {'http://www.w3.org/XML/1998/namespace': []}
+
+__all__ = [
+ "DoxygenType",
+ "argsstring",
+ "array",
+ "attributes",
+ "bitfield",
+ "childnodeType",
+ "codelineType",
+ "compoundRefType",
+ "compounddefType",
+ "declname",
+ "definition",
+ "defname",
+ "descriptionType",
+ "docAnchorType",
+ "docBlockQuoteType",
+ "docCaptionType",
+ "docCopyType",
+ "docEmojiType",
+ "docEmptyType",
+ "docEntryType",
+ "docFormulaType",
+ "docHeadingType",
+ "docHtmlOnlyType",
+ "docImageType",
+ "docIndexEntryType",
+ "docInternalS1Type",
+ "docInternalS2Type",
+ "docInternalS3Type",
+ "docInternalS4Type",
+ "docInternalType",
+ "docLanguageType",
+ "docListItemType",
+ "docListType",
+ "docMarkupType",
+ "docParBlockType",
+ "docParaType",
+ "docParamListItem",
+ "docParamListType",
+ "docParamName",
+ "docParamNameList",
+ "docParamType",
+ "docRefTextType",
+ "docRowType",
+ "docSect1Type",
+ "docSect2Type",
+ "docSect3Type",
+ "docSect4Type",
+ "docSimpleSectType",
+ "docTableType",
+ "docTitleType",
+ "docTocItemType",
+ "docTocListType",
+ "docURLLink",
+ "docVarListEntryType",
+ "docVariableListType",
+ "docXRefSectType",
+ "edgelabel",
+ "enumvalueType",
+ "graphType",
+ "highlightType",
+ "incType",
+ "label",
+ "linkType",
+ "linkedTextType",
+ "listingType",
+ "listofallmembersType",
+ "locationType",
+ "memberRefType",
+ "memberdefType",
+ "name",
+ "nodeType",
+ "paramType",
+ "read",
+ "refTextType",
+ "refType",
+ "referenceType",
+ "reimplementType",
+ "scope",
+ "sectiondefType",
+ "spType",
+ "tableofcontentsKindType",
+ "tableofcontentsType",
+ "templateparamlistType",
+ "write"
+]
diff --git a/addon/doxmlparser/doxmlparser/index.py b/addon/doxmlparser/doxmlparser/index.py
new file mode 100644
index 0000000..5ef79c8
--- /dev/null
+++ b/addon/doxmlparser/doxmlparser/index.py
@@ -0,0 +1,1621 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+#
+# Generated by generateDS.py.
+# Python 3.9.0 (default, Oct 27 2020, 14:15:17) [Clang 12.0.0 (clang-1200.0.32.21)]
+#
+# Command line options:
+# ('--no-dates', '')
+# ('--no-versions', '')
+# ('-f', '')
+# ('-o', '/Users/dimitri/doxygen.git/addon/doxmlparser/doxmlparser/index.py')
+#
+# Command line arguments:
+# /Users/dimitri/doxygen.git/templates/xml/index.xsd
+#
+# Command line:
+# /usr/local/bin/generateDS --no-dates --no-versions -f -o "/Users/dimitri/doxygen.git/addon/doxmlparser/doxmlparser/index.py" /Users/dimitri/doxygen.git/templates/xml/index.xsd
+#
+# Current working directory (os.getcwd()):
+# doxmlparser
+#
+
+import sys
+try:
+ ModulenotfoundExp_ = ModuleNotFoundError
+except NameError:
+ ModulenotfoundExp_ = ImportError
+from six.moves import zip_longest
+import os
+import re as re_
+import base64
+import datetime as datetime_
+import decimal as decimal_
+try:
+ from lxml import etree as etree_
+except ModulenotfoundExp_ :
+ from xml.etree import ElementTree as etree_
+
+
+Validate_simpletypes_ = True
+SaveElementTreeNode = True
+if sys.version_info.major == 2:
+ BaseStrType_ = basestring
+else:
+ BaseStrType_ = str
+
+
+def parsexml_(infile, parser=None, **kwargs):
+ if parser is None:
+ # Use the lxml ElementTree compatible parser so that, e.g.,
+ # we ignore comments.
+ try:
+ parser = etree_.ETCompatXMLParser()
+ except AttributeError:
+ # fallback to xml.etree
+ parser = etree_.XMLParser()
+ try:
+ if isinstance(infile, os.PathLike):
+ infile = os.path.join(infile)
+ except AttributeError:
+ pass
+ doc = etree_.parse(infile, parser=parser, **kwargs)
+ return doc
+
+def parsexmlstring_(instring, parser=None, **kwargs):
+ if parser is None:
+ # Use the lxml ElementTree compatible parser so that, e.g.,
+ # we ignore comments.
+ try:
+ parser = etree_.ETCompatXMLParser()
+ except AttributeError:
+ # fallback to xml.etree
+ parser = etree_.XMLParser()
+ element = etree_.fromstring(instring, parser=parser, **kwargs)
+ return element
+
+#
+# Namespace prefix definition table (and other attributes, too)
+#
+# The module generatedsnamespaces, if it is importable, must contain
+# a dictionary named GeneratedsNamespaceDefs. This Python dictionary
+# should map element type names (strings) to XML schema namespace prefix
+# definitions. The export method for any class for which there is
+# a namespace prefix definition, will export that definition in the
+# XML representation of that element. See the export method of
+# any generated element type class for an example of the use of this
+# table.
+# A sample table is:
+#
+# # File: generatedsnamespaces.py
+#
+# GenerateDSNamespaceDefs = {
+# "ElementtypeA": "http://www.xxx.com/namespaceA",
+# "ElementtypeB": "http://www.xxx.com/namespaceB",
+# }
+#
+# Additionally, the generatedsnamespaces module can contain a python
+# dictionary named GenerateDSNamespaceTypePrefixes that associates element
+# types with the namespace prefixes that are to be added to the
+# "xsi:type" attribute value. See the exportAttributes method of
+# any generated element type and the generation of "xsi:type" for an
+# example of the use of this table.
+# An example table:
+#
+# # File: generatedsnamespaces.py
+#
+# GenerateDSNamespaceTypePrefixes = {
+# "ElementtypeC": "aaa:",
+# "ElementtypeD": "bbb:",
+# }
+#
+
+try:
+ from generatedsnamespaces import GenerateDSNamespaceDefs as GenerateDSNamespaceDefs_
+except ModulenotfoundExp_ :
+ GenerateDSNamespaceDefs_ = {}
+try:
+ from generatedsnamespaces import GenerateDSNamespaceTypePrefixes as GenerateDSNamespaceTypePrefixes_
+except ModulenotfoundExp_ :
+ GenerateDSNamespaceTypePrefixes_ = {}
+
+#
+# You can replace the following class definition by defining an
+# importable module named "generatedscollector" containing a class
+# named "GdsCollector". See the default class definition below for
+# clues about the possible content of that class.
+#
+try:
+ from generatedscollector import GdsCollector as GdsCollector_
+except ModulenotfoundExp_ :
+
+ class GdsCollector_(object):
+
+ def __init__(self, messages=None):
+ if messages is None:
+ self.messages = []
+ else:
+ self.messages = messages
+
+ def add_message(self, msg):
+ self.messages.append(msg)
+
+ def get_messages(self):
+ return self.messages
+
+ def clear_messages(self):
+ self.messages = []
+
+ def print_messages(self):
+ for msg in self.messages:
+ print("Warning: {}".format(msg))
+
+ def write_messages(self, outstream):
+ for msg in self.messages:
+ outstream.write("Warning: {}\n".format(msg))
+
+
+#
+# The super-class for enum types
+#
+
+try:
+ from enum import Enum
+except ModulenotfoundExp_ :
+ Enum = object
+
+#
+# The root super-class for element type classes
+#
+# 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 ModulenotfoundExp_ as exp:
+
+ class GeneratedsSuper(object):
+ __hash__ = object.__hash__
+ tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
+ class _FixedOffsetTZ(datetime_.tzinfo):
+ def __init__(self, offset, name):
+ self.__offset = datetime_.timedelta(minutes=offset)
+ self.__name = name
+ def utcoffset(self, dt):
+ return self.__offset
+ def tzname(self, dt):
+ return self.__name
+ def dst(self, dt):
+ return None
+ def gds_format_string(self, input_data, input_name=''):
+ return input_data
+ def gds_parse_string(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_validate_string(self, input_data, node=None, input_name=''):
+ if not input_data:
+ return ''
+ else:
+ return input_data
+ def gds_format_base64(self, input_data, input_name=''):
+ return base64.b64encode(input_data)
+ def gds_validate_base64(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_integer(self, input_data, input_name=''):
+ return '%d' % input_data
+ def gds_parse_integer(self, input_data, node=None, input_name=''):
+ try:
+ ival = int(input_data)
+ except (TypeError, ValueError) as exp:
+ raise_parse_error(node, 'Requires integer value: %s' % exp)
+ return ival
+ def gds_validate_integer(self, input_data, node=None, input_name=''):
+ try:
+ value = int(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires integer value')
+ return value
+ def gds_format_integer_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_integer_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ int(value)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires sequence of integer values')
+ return values
+ def gds_format_float(self, input_data, input_name=''):
+ return ('%.15f' % input_data).rstrip('0')
+ def gds_parse_float(self, input_data, node=None, input_name=''):
+ try:
+ fval_ = float(input_data)
+ except (TypeError, ValueError) as exp:
+ raise_parse_error(node, 'Requires float or double value: %s' % exp)
+ return fval_
+ def gds_validate_float(self, input_data, node=None, input_name=''):
+ try:
+ value = float(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires float value')
+ return value
+ def gds_format_float_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_float_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ float(value)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires sequence of float values')
+ return values
+ def gds_format_decimal(self, input_data, input_name=''):
+ return_value = '%s' % input_data
+ if '.' in return_value:
+ return_value = return_value.rstrip('0')
+ if return_value.endswith('.'):
+ return_value = return_value.rstrip('.')
+ return return_value
+ def gds_parse_decimal(self, input_data, node=None, input_name=''):
+ try:
+ decimal_value = decimal_.Decimal(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires decimal value')
+ return decimal_value
+ def gds_validate_decimal(self, input_data, node=None, input_name=''):
+ try:
+ value = decimal_.Decimal(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires decimal value')
+ return value
+ def gds_format_decimal_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return ' '.join([self.gds_format_decimal(item) for item in input_data])
+ def gds_validate_decimal_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ decimal_.Decimal(value)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires sequence of decimal values')
+ return values
+ def gds_format_double(self, input_data, input_name=''):
+ return '%s' % input_data
+ def gds_parse_double(self, input_data, node=None, input_name=''):
+ try:
+ fval_ = float(input_data)
+ except (TypeError, ValueError) as exp:
+ raise_parse_error(node, 'Requires double or float value: %s' % exp)
+ return fval_
+ def gds_validate_double(self, input_data, node=None, input_name=''):
+ try:
+ value = float(input_data)
+ except (TypeError, ValueError):
+ raise_parse_error(node, 'Requires double or float value')
+ return value
+ def gds_format_double_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_double_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ try:
+ float(value)
+ except (TypeError, ValueError):
+ raise_parse_error(
+ node, 'Requires sequence of double or float values')
+ return values
+ def gds_format_boolean(self, input_data, input_name=''):
+ return ('%s' % input_data).lower()
+ def gds_parse_boolean(self, input_data, node=None, input_name=''):
+ if input_data in ('true', '1'):
+ bval = True
+ elif input_data in ('false', '0'):
+ bval = False
+ else:
+ raise_parse_error(node, 'Requires boolean value')
+ return bval
+ def gds_validate_boolean(self, input_data, node=None, input_name=''):
+ if input_data not in (True, 1, False, 0, ):
+ raise_parse_error(
+ node,
+ 'Requires boolean value '
+ '(one of True, 1, False, 0)')
+ return input_data
+ def gds_format_boolean_list(self, input_data, input_name=''):
+ if len(input_data) > 0 and not isinstance(input_data[0], BaseStrType_):
+ input_data = [str(s) for s in input_data]
+ return '%s' % ' '.join(input_data)
+ def gds_validate_boolean_list(
+ self, input_data, node=None, input_name=''):
+ values = input_data.split()
+ for value in values:
+ if value not in (True, 1, False, 0, ):
+ raise_parse_error(
+ node,
+ 'Requires sequence of boolean values '
+ '(one of True, 1, False, 0)')
+ return values
+ def gds_validate_datetime(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_datetime(self, input_data, input_name=''):
+ if input_data.microsecond == 0:
+ _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
+ input_data.year,
+ input_data.month,
+ input_data.day,
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ )
+ else:
+ _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
+ input_data.year,
+ input_data.month,
+ input_data.day,
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ ('%f' % (float(input_data.microsecond) / 1000000))[2:],
+ )
+ if input_data.tzinfo is not None:
+ tzoff = input_data.tzinfo.utcoffset(input_data)
+ if tzoff is not None:
+ total_seconds = tzoff.seconds + (86400 * tzoff.days)
+ if total_seconds == 0:
+ _svalue += 'Z'
+ else:
+ if total_seconds < 0:
+ _svalue += '-'
+ total_seconds *= -1
+ else:
+ _svalue += '+'
+ hours = total_seconds // 3600
+ minutes = (total_seconds - (hours * 3600)) // 60
+ _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
+ return _svalue
+ @classmethod
+ def gds_parse_datetime(cls, input_data):
+ tz = None
+ if input_data[-1] == 'Z':
+ tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+ input_data = input_data[:-1]
+ else:
+ results = GeneratedsSuper.tzoff_pattern.search(input_data)
+ if results is not None:
+ tzoff_parts = results.group(2).split(':')
+ tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+ if results.group(1) == '-':
+ tzoff *= -1
+ tz = GeneratedsSuper._FixedOffsetTZ(
+ tzoff, results.group(0))
+ input_data = input_data[:-6]
+ time_parts = input_data.split('.')
+ if len(time_parts) > 1:
+ micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
+ input_data = '%s.%s' % (
+ time_parts[0], "{}".format(micro_seconds).rjust(6, "0"), )
+ dt = datetime_.datetime.strptime(
+ input_data, '%Y-%m-%dT%H:%M:%S.%f')
+ else:
+ dt = datetime_.datetime.strptime(
+ input_data, '%Y-%m-%dT%H:%M:%S')
+ dt = dt.replace(tzinfo=tz)
+ return dt
+ def gds_validate_date(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_date(self, input_data, input_name=''):
+ _svalue = '%04d-%02d-%02d' % (
+ input_data.year,
+ input_data.month,
+ input_data.day,
+ )
+ try:
+ if input_data.tzinfo is not None:
+ tzoff = input_data.tzinfo.utcoffset(input_data)
+ if tzoff is not None:
+ total_seconds = tzoff.seconds + (86400 * tzoff.days)
+ if total_seconds == 0:
+ _svalue += 'Z'
+ else:
+ if total_seconds < 0:
+ _svalue += '-'
+ total_seconds *= -1
+ else:
+ _svalue += '+'
+ hours = total_seconds // 3600
+ minutes = (total_seconds - (hours * 3600)) // 60
+ _svalue += '{0:02d}:{1:02d}'.format(
+ hours, minutes)
+ except AttributeError:
+ pass
+ return _svalue
+ @classmethod
+ def gds_parse_date(cls, input_data):
+ tz = None
+ if input_data[-1] == 'Z':
+ tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+ input_data = input_data[:-1]
+ else:
+ results = GeneratedsSuper.tzoff_pattern.search(input_data)
+ if results is not None:
+ tzoff_parts = results.group(2).split(':')
+ tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+ if results.group(1) == '-':
+ tzoff *= -1
+ tz = GeneratedsSuper._FixedOffsetTZ(
+ tzoff, results.group(0))
+ input_data = input_data[:-6]
+ dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
+ dt = dt.replace(tzinfo=tz)
+ return dt.date()
+ def gds_validate_time(self, input_data, node=None, input_name=''):
+ return input_data
+ def gds_format_time(self, input_data, input_name=''):
+ if input_data.microsecond == 0:
+ _svalue = '%02d:%02d:%02d' % (
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ )
+ else:
+ _svalue = '%02d:%02d:%02d.%s' % (
+ input_data.hour,
+ input_data.minute,
+ input_data.second,
+ ('%f' % (float(input_data.microsecond) / 1000000))[2:],
+ )
+ if input_data.tzinfo is not None:
+ tzoff = input_data.tzinfo.utcoffset(input_data)
+ if tzoff is not None:
+ total_seconds = tzoff.seconds + (86400 * tzoff.days)
+ if total_seconds == 0:
+ _svalue += 'Z'
+ else:
+ if total_seconds < 0:
+ _svalue += '-'
+ total_seconds *= -1
+ else:
+ _svalue += '+'
+ hours = total_seconds // 3600
+ minutes = (total_seconds - (hours * 3600)) // 60
+ _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
+ return _svalue
+ def gds_validate_simple_patterns(self, patterns, target):
+ # pat is a list of lists of strings/patterns.
+ # The target value must match at least one of the patterns
+ # in order for the test to succeed.
+ found1 = True
+ for patterns1 in patterns:
+ found2 = False
+ for patterns2 in patterns1:
+ mo = re_.search(patterns2, target)
+ if mo is not None and len(mo.group(0)) == len(target):
+ found2 = True
+ break
+ if not found2:
+ found1 = False
+ break
+ return found1
+ @classmethod
+ def gds_parse_time(cls, input_data):
+ tz = None
+ if input_data[-1] == 'Z':
+ tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+ input_data = input_data[:-1]
+ else:
+ results = GeneratedsSuper.tzoff_pattern.search(input_data)
+ if results is not None:
+ tzoff_parts = results.group(2).split(':')
+ tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+ if results.group(1) == '-':
+ tzoff *= -1
+ tz = GeneratedsSuper._FixedOffsetTZ(
+ tzoff, results.group(0))
+ input_data = input_data[:-6]
+ if len(input_data.split('.')) > 1:
+ dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
+ else:
+ dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
+ dt = dt.replace(tzinfo=tz)
+ return dt.time()
+ def gds_check_cardinality_(
+ self, value, input_name,
+ min_occurs=0, max_occurs=1, required=None):
+ if value is None:
+ length = 0
+ elif isinstance(value, list):
+ length = len(value)
+ else:
+ length = 1
+ if required is not None :
+ if required and length < 1:
+ self.gds_collector_.add_message(
+ "Required value {}{} is missing".format(
+ input_name, self.gds_get_node_lineno_()))
+ if length < min_occurs:
+ self.gds_collector_.add_message(
+ "Number of values for {}{} is below "
+ "the minimum allowed, "
+ "expected at least {}, found {}".format(
+ input_name, self.gds_get_node_lineno_(),
+ min_occurs, length))
+ elif length > max_occurs:
+ self.gds_collector_.add_message(
+ "Number of values for {}{} is above "
+ "the maximum allowed, "
+ "expected at most {}, found {}".format(
+ input_name, self.gds_get_node_lineno_(),
+ max_occurs, length))
+ def gds_validate_builtin_ST_(
+ self, validator, value, input_name,
+ min_occurs=None, max_occurs=None, required=None):
+ if value is not None:
+ try:
+ validator(value, input_name=input_name)
+ except GDSParseError as parse_error:
+ self.gds_collector_.add_message(str(parse_error))
+ def gds_validate_defined_ST_(
+ self, validator, value, input_name,
+ min_occurs=None, max_occurs=None, required=None):
+ if value is not None:
+ try:
+ validator(value)
+ except GDSParseError as parse_error:
+ self.gds_collector_.add_message(str(parse_error))
+ def gds_str_lower(self, instring):
+ return instring.lower()
+ def get_path_(self, node):
+ path_list = []
+ self.get_path_list_(node, path_list)
+ path_list.reverse()
+ path = '/'.join(path_list)
+ return path
+ Tag_strip_pattern_ = re_.compile(r'\{.*\}')
+ def get_path_list_(self, node, path_list):
+ if node is None:
+ return
+ tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
+ if tag:
+ path_list.append(tag)
+ self.get_path_list_(node.getparent(), path_list)
+ def get_class_obj_(self, node, default_class=None):
+ class_obj1 = default_class
+ if 'xsi' in node.nsmap:
+ classname = node.get('{%s}type' % node.nsmap['xsi'])
+ if classname is not None:
+ names = classname.split(':')
+ if len(names) == 2:
+ classname = names[1]
+ class_obj2 = globals().get(classname)
+ if class_obj2 is not None:
+ class_obj1 = class_obj2
+ return class_obj1
+ def gds_build_any(self, node, type_name=None):
+ # provide default value in case option --disable-xml is used.
+ content = ""
+ content = etree_.tostring(node, encoding="unicode")
+ return content
+ @classmethod
+ def gds_reverse_node_mapping(cls, mapping):
+ return dict(((v, k) for k, v in mapping.items()))
+ @staticmethod
+ def gds_encode(instring):
+ if sys.version_info.major == 2:
+ if ExternalEncoding:
+ encoding = ExternalEncoding
+ else:
+ encoding = 'utf-8'
+ return instring.encode(encoding)
+ else:
+ return instring
+ @staticmethod
+ def convert_unicode(instring):
+ if isinstance(instring, str):
+ result = quote_xml(instring)
+ elif sys.version_info.major == 2 and isinstance(instring, unicode):
+ result = quote_xml(instring).encode('utf8')
+ else:
+ result = GeneratedsSuper.gds_encode(str(instring))
+ return result
+ def __eq__(self, other):
+ def excl_select_objs_(obj):
+ return (obj[0] != 'parent_object_' and
+ obj[0] != 'gds_collector_')
+ if type(self) != type(other):
+ return False
+ return all(x == y for x, y in zip_longest(
+ filter(excl_select_objs_, self.__dict__.items()),
+ filter(excl_select_objs_, other.__dict__.items())))
+ def __ne__(self, other):
+ return not self.__eq__(other)
+ # Django ETL transform hooks.
+ def gds_djo_etl_transform(self):
+ pass
+ def gds_djo_etl_transform_db_obj(self, dbobj):
+ pass
+ # SQLAlchemy ETL transform hooks.
+ def gds_sqa_etl_transform(self):
+ return 0, None
+ def gds_sqa_etl_transform_db_obj(self, dbobj):
+ pass
+ def gds_get_node_lineno_(self):
+ if (hasattr(self, "gds_elementtree_node_") and
+ self.gds_elementtree_node_ is not None):
+ return ' near line {}'.format(
+ self.gds_elementtree_node_.sourceline)
+ else:
+ return ""
+
+
+ def getSubclassFromModule_(module, class_):
+ '''Get the subclass of a class from a specific module.'''
+ name = class_.__name__ + 'Sub'
+ if hasattr(module, name):
+ return getattr(module, name)
+ else:
+ return None
+
+
+#
+# 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('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
+
+#
+# Globals
+#
+
+ExternalEncoding = ''
+# Set this to false in order to deactivate during export, the use of
+# name space prefixes captured from the input document.
+UseCapturedNS_ = True
+CapturedNsmap_ = {}
+Tag_pattern_ = re_.compile(r'({.*})?(.*)')
+String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
+Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')
+CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)
+
+# Change this to redirect the generated superclass module to use a
+# specific subclass module.
+CurrentSubclassModule_ = None
+
+#
+# Support/utility functions.
+#
+
+
+def showIndent(outfile, level, pretty_print=True):
+ if pretty_print:
+ for idx in range(level):
+ outfile.write(' ')
+
+
+def quote_xml(inStr):
+ "Escape markup chars, but do not modify CDATA sections."
+ if not inStr:
+ return ''
+ s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
+ s2 = ''
+ pos = 0
+ matchobjects = CDATA_pattern_.finditer(s1)
+ for mo in matchobjects:
+ s3 = s1[pos:mo.start()]
+ s2 += quote_xml_aux(s3)
+ s2 += s1[mo.start():mo.end()]
+ pos = mo.end()
+ s3 = s1[pos:]
+ s2 += quote_xml_aux(s3)
+ return s2
+
+
+def quote_xml_aux(inStr):
+ s1 = inStr.replace('&', '&amp;')
+ s1 = s1.replace('<', '&lt;')
+ s1 = s1.replace('>', '&gt;')
+ return s1
+
+
+def quote_attrib(inStr):
+ s1 = (isinstance(inStr, BaseStrType_) and inStr or '%s' % inStr)
+ s1 = s1.replace('&', '&amp;')
+ s1 = s1.replace('<', '&lt;')
+ s1 = s1.replace('>', '&gt;')
+ if '"' in s1:
+ if "'" in s1:
+ s1 = '"%s"' % s1.replace('"', "&quot;")
+ 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
+
+
+def get_all_text_(node):
+ if node.text is not None:
+ text = node.text
+ else:
+ text = ''
+ for child in node:
+ if child.tail is not None:
+ text += child.tail
+ return text
+
+
+def find_attr_value_(attr_name, node):
+ attrs = node.attrib
+ attr_parts = attr_name.split(':')
+ value = None
+ if len(attr_parts) == 1:
+ value = attrs.get(attr_name)
+ elif len(attr_parts) == 2:
+ prefix, name = attr_parts
+ if prefix == 'xml':
+ namespace = 'http://www.w3.org/XML/1998/namespace'
+ else:
+ namespace = node.nsmap.get(prefix)
+ if namespace is not None:
+ value = attrs.get('{%s}%s' % (namespace, name, ))
+ return value
+
+
+def encode_str_2_3(instr):
+ return instr
+
+
+class GDSParseError(Exception):
+ pass
+
+
+def raise_parse_error(node, msg):
+ if node is not None:
+ msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
+ raise GDSParseError(msg)
+
+
+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
+ TypeBase64 = 8
+ 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
+ def export(self, outfile, level, name, namespace,
+ pretty_print=True):
+ if self.category == MixedContainer.CategoryText:
+ # Prevent exporting empty content as empty lines.
+ if self.value.strip():
+ outfile.write(self.value)
+ elif self.category == MixedContainer.CategorySimple:
+ self.exportSimple(outfile, level, name)
+ else: # category == MixedContainer.CategoryComplex
+ self.value.export(
+ outfile, level, namespace, name_=name,
+ pretty_print=pretty_print)
+ def exportSimple(self, outfile, level, name):
+ if self.content_type == MixedContainer.TypeString:
+ outfile.write('<%s>%s</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeInteger or \
+ self.content_type == MixedContainer.TypeBoolean:
+ outfile.write('<%s>%d</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeFloat or \
+ self.content_type == MixedContainer.TypeDecimal:
+ outfile.write('<%s>%f</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeDouble:
+ outfile.write('<%s>%g</%s>' % (
+ self.name, self.value, self.name))
+ elif self.content_type == MixedContainer.TypeBase64:
+ outfile.write('<%s>%s</%s>' % (
+ self.name,
+ base64.b64encode(self.value),
+ self.name))
+ def to_etree(self, element, mapping_=None, nsmap_=None):
+ if self.category == MixedContainer.CategoryText:
+ # Prevent exporting empty content as empty lines.
+ if self.value.strip():
+ if len(element) > 0:
+ if element[-1].tail is None:
+ element[-1].tail = self.value
+ else:
+ element[-1].tail += self.value
+ else:
+ if element.text is None:
+ element.text = self.value
+ else:
+ element.text += self.value
+ elif self.category == MixedContainer.CategorySimple:
+ subelement = etree_.SubElement(
+ element, '%s' % self.name)
+ subelement.text = self.to_etree_simple()
+ else: # category == MixedContainer.CategoryComplex
+ self.value.to_etree(element)
+ def to_etree_simple(self, mapping_=None, nsmap_=None):
+ if self.content_type == MixedContainer.TypeString:
+ text = self.value
+ elif (self.content_type == MixedContainer.TypeInteger or
+ self.content_type == MixedContainer.TypeBoolean):
+ text = '%d' % self.value
+ elif (self.content_type == MixedContainer.TypeFloat or
+ self.content_type == MixedContainer.TypeDecimal):
+ text = '%f' % self.value
+ elif self.content_type == MixedContainer.TypeDouble:
+ text = '%g' % self.value
+ elif self.content_type == MixedContainer.TypeBase64:
+ text = '%s' % base64.b64encode(self.value)
+ return text
+ def exportLiteral(self, outfile, level, name):
+ if self.category == MixedContainer.CategoryText:
+ showIndent(outfile, level)
+ outfile.write(
+ 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
+ self.category, self.content_type,
+ self.name, self.value))
+ elif self.category == MixedContainer.CategorySimple:
+ showIndent(outfile, level)
+ outfile.write(
+ 'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
+ self.category, self.content_type,
+ self.name, self.value))
+ else: # category == MixedContainer.CategoryComplex
+ showIndent(outfile, level)
+ outfile.write(
+ 'model_.MixedContainer(%d, %d, "%s",\n' % (
+ self.category, self.content_type, self.name,))
+ self.value.exportLiteral(outfile, level + 1)
+ showIndent(outfile, level)
+ outfile.write(')\n')
+
+
+class MemberSpec_(object):
+ def __init__(self, name='', data_type='', container=0,
+ optional=0, child_attrs=None, choice=None):
+ self.name = name
+ self.data_type = data_type
+ self.container = container
+ self.child_attrs = child_attrs
+ self.choice = choice
+ self.optional = optional
+ 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_chain(self): return self.data_type
+ def get_data_type(self):
+ if isinstance(self.data_type, list):
+ if len(self.data_type) > 0:
+ return self.data_type[-1]
+ else:
+ return 'xs:string'
+ else:
+ return self.data_type
+ def set_container(self, container): self.container = container
+ def get_container(self): return self.container
+ def set_child_attrs(self, child_attrs): self.child_attrs = child_attrs
+ def get_child_attrs(self): return self.child_attrs
+ def set_choice(self, choice): self.choice = choice
+ def get_choice(self): return self.choice
+ def set_optional(self, optional): self.optional = optional
+ def get_optional(self): return self.optional
+
+
+def _cast(typ, value):
+ if typ is None or value is None:
+ return value
+ return typ(value)
+
+#
+# Data representation classes.
+#
+
+
+class CompoundKind(str, Enum):
+ CLASS='class'
+ STRUCT='struct'
+ UNION='union'
+ INTERFACE='interface'
+ PROTOCOL='protocol'
+ CATEGORY='category'
+ EXCEPTION='exception'
+ FILE='file'
+ NAMESPACE='namespace'
+ GROUP='group'
+ PAGE='page'
+ EXAMPLE='example'
+ DIR='dir'
+ TYPE='type'
+
+
+class MemberKind(str, Enum):
+ DEFINE='define'
+ PROPERTY='property'
+ EVENT='event'
+ VARIABLE='variable'
+ TYPEDEF='typedef'
+ ENUM='enum'
+ ENUMVALUE='enumvalue'
+ FUNCTION='function'
+ SIGNAL='signal'
+ PROTOTYPE='prototype'
+ FRIEND='friend'
+ DCOP='dcop'
+ SLOT='slot'
+
+
+class DoxygenType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, version=None, lang=None, compound=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.version = _cast(None, version)
+ self.version_nsprefix_ = None
+ self.lang = _cast(None, lang)
+ self.lang_nsprefix_ = None
+ if compound is None:
+ self.compound = []
+ else:
+ self.compound = compound
+ self.compound_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, DoxygenType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if DoxygenType.subclass:
+ return DoxygenType.subclass(*args_, **kwargs_)
+ else:
+ return DoxygenType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.compound.insert(index, value)
+ def replace_compound_at(self, index, value):
+ self.compound[index] = value
+ def get_version(self):
+ return self.version
+ def set_version(self, version):
+ self.version = version
+ def get_lang(self):
+ return self.lang
+ def set_lang(self, lang):
+ self.lang = lang
+ def hasContent_(self):
+ if (
+ self.compound
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('DoxygenType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'DoxygenType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='DoxygenType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='DoxygenType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='DoxygenType'):
+ if self.version is not None and 'version' not in already_processed:
+ already_processed.add('version')
+ outfile.write(' version=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.version), input_name='version')), ))
+ if self.lang is not None and 'lang' not in already_processed:
+ already_processed.add('lang')
+ outfile.write(' xml:lang=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.lang), input_name='lang')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='DoxygenType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ for compound_ in self.compound:
+ namespaceprefix_ = self.compound_nsprefix_ + ':' if (UseCapturedNS_ and self.compound_nsprefix_) else ''
+ compound_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='compound', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('version', node)
+ if value is not None and 'version' not in already_processed:
+ already_processed.add('version')
+ self.version = value
+ value = find_attr_value_('lang', node)
+ if value is not None and 'lang' not in already_processed:
+ already_processed.add('lang')
+ self.lang = value
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'compound':
+ obj_ = CompoundType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.compound.append(obj_)
+ obj_.original_tagname_ = 'compound'
+# end class DoxygenType
+
+
+class CompoundType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, kind=None, name=None, member=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.kind = _cast(None, kind)
+ self.kind_nsprefix_ = None
+ self.name = name
+ self.name_nsprefix_ = None
+ if member is None:
+ self.member = []
+ else:
+ self.member = member
+ self.member_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, CompoundType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if CompoundType.subclass:
+ return CompoundType.subclass(*args_, **kwargs_)
+ else:
+ return CompoundType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ 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_at(self, index, value):
+ self.member.insert(index, value)
+ def replace_member_at(self, index, value):
+ self.member[index] = value
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_kind(self):
+ return self.kind
+ def set_kind(self, kind):
+ self.kind = kind
+ def validate_CompoundKind(self, value):
+ # Validate type CompoundKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['class', 'struct', 'union', 'interface', 'protocol', 'category', 'exception', 'file', 'namespace', 'group', 'page', 'example', 'dir', 'type']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on CompoundKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.name is not None or
+ self.member
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CompoundType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('CompoundType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'CompoundType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='CompoundType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='CompoundType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='CompoundType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.kind is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ outfile.write(' kind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kind), input_name='kind')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CompoundType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.name is not None:
+ namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
+ for member_ in self.member:
+ namespaceprefix_ = self.member_nsprefix_ + ':' if (UseCapturedNS_ and self.member_nsprefix_) else ''
+ member_.export(outfile, level, namespaceprefix_, namespacedef_='', name_='member', pretty_print=pretty_print)
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('kind', node)
+ if value is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ self.kind = value
+ self.validate_CompoundKind(self.kind) # validate type CompoundKind
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'name':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'name')
+ value_ = self.gds_validate_string(value_, node, 'name')
+ self.name = value_
+ self.name_nsprefix_ = child_.prefix
+ elif nodeName_ == 'member':
+ obj_ = MemberType.factory(parent_object_=self)
+ obj_.build(child_, gds_collector_=gds_collector_)
+ self.member.append(obj_)
+ obj_.original_tagname_ = 'member'
+# end class CompoundType
+
+
+class MemberType(GeneratedsSuper):
+ __hash__ = GeneratedsSuper.__hash__
+ subclass = None
+ superclass = None
+ def __init__(self, refid=None, kind=None, name=None, gds_collector_=None, **kwargs_):
+ self.gds_collector_ = gds_collector_
+ self.gds_elementtree_node_ = None
+ self.original_tagname_ = None
+ self.parent_object_ = kwargs_.get('parent_object_')
+ self.ns_prefix_ = None
+ self.refid = _cast(None, refid)
+ self.refid_nsprefix_ = None
+ self.kind = _cast(None, kind)
+ self.kind_nsprefix_ = None
+ self.name = name
+ self.name_nsprefix_ = None
+ def factory(*args_, **kwargs_):
+ if CurrentSubclassModule_ is not None:
+ subclass = getSubclassFromModule_(
+ CurrentSubclassModule_, MemberType)
+ if subclass is not None:
+ return subclass(*args_, **kwargs_)
+ if MemberType.subclass:
+ return MemberType.subclass(*args_, **kwargs_)
+ else:
+ return MemberType(*args_, **kwargs_)
+ factory = staticmethod(factory)
+ def get_ns_prefix_(self):
+ return self.ns_prefix_
+ def set_ns_prefix_(self, ns_prefix):
+ self.ns_prefix_ = ns_prefix
+ def get_name(self):
+ return self.name
+ def set_name(self, name):
+ self.name = name
+ def get_refid(self):
+ return self.refid
+ def set_refid(self, refid):
+ self.refid = refid
+ def get_kind(self):
+ return self.kind
+ def set_kind(self, kind):
+ self.kind = kind
+ def validate_MemberKind(self, value):
+ # Validate type MemberKind, a restriction on xsd:string.
+ if value is not None and Validate_simpletypes_ and self.gds_collector_ is not None:
+ if not isinstance(value, str):
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s is not of the correct base simple type (str)' % {"value": value, "lineno": lineno, })
+ return False
+ value = value
+ enumerations = ['define', 'property', 'event', 'variable', 'typedef', 'enum', 'enumvalue', 'function', 'signal', 'prototype', 'friend', 'dcop', 'slot']
+ if value not in enumerations:
+ lineno = self.gds_get_node_lineno_()
+ self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on MemberKind' % {"value" : encode_str_2_3(value), "lineno": lineno} )
+ result = False
+ def hasContent_(self):
+ if (
+ self.name is not None
+ ):
+ return True
+ else:
+ return False
+ def export(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MemberType', pretty_print=True):
+ imported_ns_def_ = GenerateDSNamespaceDefs_.get('MemberType')
+ if imported_ns_def_ is not None:
+ namespacedef_ = imported_ns_def_
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.original_tagname_ is not None and name_ == 'MemberType':
+ name_ = self.original_tagname_
+ if UseCapturedNS_ and self.ns_prefix_:
+ namespaceprefix_ = self.ns_prefix_ + ':'
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%s%s%s' % (namespaceprefix_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+ already_processed = set()
+ self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='MemberType')
+ if self.hasContent_():
+ outfile.write('>%s' % (eol_, ))
+ self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='MemberType', pretty_print=pretty_print)
+ showIndent(outfile, level, pretty_print)
+ outfile.write('</%s%s>%s' % (namespaceprefix_, name_, eol_))
+ else:
+ outfile.write('/>%s' % (eol_, ))
+ def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='MemberType'):
+ if self.refid is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ outfile.write(' refid=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.refid), input_name='refid')), ))
+ if self.kind is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ outfile.write(' kind=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.kind), input_name='kind')), ))
+ def exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='MemberType', fromsubclass_=False, pretty_print=True):
+ if pretty_print:
+ eol_ = '\n'
+ else:
+ eol_ = ''
+ if self.name is not None:
+ namespaceprefix_ = self.name_nsprefix_ + ':' if (UseCapturedNS_ and self.name_nsprefix_) else ''
+ showIndent(outfile, level, pretty_print)
+ outfile.write('<%sname>%s</%sname>%s' % (namespaceprefix_ , self.gds_encode(self.gds_format_string(quote_xml(self.name), input_name='name')), namespaceprefix_ , eol_))
+ def build(self, node, gds_collector_=None):
+ self.gds_collector_ = gds_collector_
+ if SaveElementTreeNode:
+ self.gds_elementtree_node_ = node
+ already_processed = set()
+ self.ns_prefix_ = node.prefix
+ self.buildAttributes(node, node.attrib, already_processed)
+ for child in node:
+ nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+ self.buildChildren(child, node, nodeName_, gds_collector_=gds_collector_)
+ return self
+ def buildAttributes(self, node, attrs, already_processed):
+ value = find_attr_value_('refid', node)
+ if value is not None and 'refid' not in already_processed:
+ already_processed.add('refid')
+ self.refid = value
+ value = find_attr_value_('kind', node)
+ if value is not None and 'kind' not in already_processed:
+ already_processed.add('kind')
+ self.kind = value
+ self.validate_MemberKind(self.kind) # validate type MemberKind
+ def buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
+ if nodeName_ == 'name':
+ value_ = child_.text
+ value_ = self.gds_parse_string(value_, node, 'name')
+ value_ = self.gds_validate_string(value_, node, 'name')
+ self.name = value_
+ self.name_nsprefix_ = child_.prefix
+# end class MemberType
+
+
+GDSClassesMapping = {
+ 'doxygenindex': DoxygenType,
+}
+
+
+USAGE_TEXT = """
+Usage: python <Parser>.py [ -s ] <in_xml_file>
+"""
+
+
+def usage():
+ print(USAGE_TEXT)
+ sys.exit(1)
+
+
+def get_root_tag(node):
+ tag = Tag_pattern_.match(node.tag).groups()[-1]
+ rootClass = GDSClassesMapping.get(tag)
+ if rootClass is None:
+ rootClass = globals().get(tag)
+ return tag, rootClass
+
+
+def get_required_ns_prefix_defs(rootNode):
+ '''Get all name space prefix definitions required in this XML doc.
+ Return a dictionary of definitions and a char string of definitions.
+ '''
+ nsmap = {
+ prefix: uri
+ for node in rootNode.iter()
+ for (prefix, uri) in node.nsmap.items()
+ if prefix is not None
+ }
+ namespacedefs = ' '.join([
+ 'xmlns:{}="{}"'.format(prefix, uri)
+ for prefix, uri in nsmap.items()
+ ])
+ return nsmap, namespacedefs
+
+
+def parse(inFileName, silence=False, print_warnings=True):
+ global CapturedNsmap_
+ gds_collector = GdsCollector_()
+ parser = None
+ doc = parsexml_(inFileName, parser)
+ rootNode = doc.getroot()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ CapturedNsmap_, namespacedefs = get_required_ns_prefix_defs(rootNode)
+ if not SaveElementTreeNode:
+ doc = None
+ rootNode = None
+ if not silence:
+ sys.stdout.write('<?xml version="1.0" ?>\n')
+ rootObj.export(
+ sys.stdout, 0, name_=rootTag,
+ namespacedef_=namespacedefs,
+ pretty_print=True)
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj
+
+
+def parseEtree(inFileName, silence=False, print_warnings=True,
+ mapping=None, nsmap=None):
+ parser = None
+ doc = parsexml_(inFileName, parser)
+ gds_collector = GdsCollector_()
+ rootNode = doc.getroot()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ # Enable Python to collect the space used by the DOM.
+ if mapping is None:
+ mapping = {}
+ rootElement = rootObj.to_etree(
+ None, name_=rootTag, mapping_=mapping, nsmap_=nsmap)
+ reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
+ if not SaveElementTreeNode:
+ doc = None
+ rootNode = None
+ if not silence:
+ content = etree_.tostring(
+ rootElement, pretty_print=True,
+ xml_declaration=True, encoding="utf-8")
+ sys.stdout.write(str(content))
+ sys.stdout.write('\n')
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj, rootElement, mapping, reverse_mapping
+
+
+def parseString(inString, silence=False, print_warnings=True):
+ '''Parse a string, create the object tree, and export it.
+
+ Arguments:
+ - inString -- A string. This XML fragment should not start
+ with an XML declaration containing an encoding.
+ - silence -- A boolean. If False, export the object.
+ Returns -- The root object in the tree.
+ '''
+ parser = None
+ rootNode= parsexmlstring_(inString, parser)
+ gds_collector = GdsCollector_()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ if not SaveElementTreeNode:
+ rootNode = None
+ if not silence:
+ sys.stdout.write('<?xml version="1.0" ?>\n')
+ rootObj.export(
+ sys.stdout, 0, name_=rootTag,
+ namespacedef_='')
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj
+
+
+def parseLiteral(inFileName, silence=False, print_warnings=True):
+ parser = None
+ doc = parsexml_(inFileName, parser)
+ gds_collector = GdsCollector_()
+ rootNode = doc.getroot()
+ rootTag, rootClass = get_root_tag(rootNode)
+ if rootClass is None:
+ rootTag = 'DoxygenType'
+ rootClass = DoxygenType
+ rootObj = rootClass.factory()
+ rootObj.build(rootNode, gds_collector_=gds_collector)
+ # Enable Python to collect the space used by the DOM.
+ if not SaveElementTreeNode:
+ doc = None
+ rootNode = None
+ if not silence:
+ sys.stdout.write('#from index import *\n\n')
+ sys.stdout.write('import index as model_\n\n')
+ sys.stdout.write('rootObj = model_.rootClass(\n')
+ rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
+ sys.stdout.write(')\n')
+ if print_warnings and len(gds_collector.get_messages()) > 0:
+ separator = ('-' * 50) + '\n'
+ sys.stderr.write(separator)
+ sys.stderr.write('----- Warnings -- count: {} -----\n'.format(
+ len(gds_collector.get_messages()), ))
+ gds_collector.write_messages(sys.stderr)
+ sys.stderr.write(separator)
+ return rootObj
+
+
+def main():
+ args = sys.argv[1:]
+ if len(args) == 1:
+ parse(args[0])
+ else:
+ usage()
+
+
+if __name__ == '__main__':
+ #import pdb; pdb.set_trace()
+ main()
+
+RenameMappings_ = {
+}
+
+#
+# Mapping of namespaces to types defined in them
+# and the file in which each is defined.
+# simpleTypes are marked "ST" and complexTypes "CT".
+NamespaceToDefMappings_ = {'http://www.w3.org/XML/1998/namespace': []}
+
+__all__ = [
+ "CompoundType",
+ "DoxygenType",
+ "MemberType"
+]
diff --git a/addon/doxmlparser/examples/CMakeLists.txt b/addon/doxmlparser/examples/CMakeLists.txt
deleted file mode 100644
index 1e08d36..0000000
--- a/addon/doxmlparser/examples/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-add_subdirectory(metrics)
diff --git a/addon/doxmlparser/examples/dump/dump.py b/addon/doxmlparser/examples/dump/dump.py
new file mode 100644
index 0000000..240c14a
--- /dev/null
+++ b/addon/doxmlparser/examples/dump/dump.py
@@ -0,0 +1,31 @@
+# An minimal example showing how to use the python doxmlparser module to read
+# the XML output generated by doxygen for a project and dump it to the output again.
+
+import sys
+
+import doxmlparser
+
+# process a compound file and export the results to stdout
+def parse_compound(inDirName,baseName):
+ doxmlparser.compound.parse(inDirName+"/"+baseName+".xml",False)
+
+# process the index file and export the results to stdout
+def parse_index(inDirName):
+ rootObj = doxmlparser.index.parse(inDirName+"/index.xml",False)
+ for compound in rootObj.get_compound(): # for each compound defined in the index
+ parse_compound(inDirName,compound.get_refid())
+
+def usage():
+ print("Usage {0} <xml_output_dir>".format(sys.argv[0]))
+ sys.exit(1)
+
+def main():
+ args = sys.argv[1:]
+ if len(args)==1:
+ parse_index(args[0])
+ else:
+ usage()
+
+if __name__ == '__main__':
+ main()
+
diff --git a/addon/doxmlparser/examples/metrics/CMakeLists.txt b/addon/doxmlparser/examples/metrics/CMakeLists.txt
deleted file mode 100644
index 7e99a08..0000000
--- a/addon/doxmlparser/examples/metrics/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-
-include_directories(
- ../../include
- ${PROJECT_SOURCE_DIR}/libversion
-)
-
-add_executable(doxmlparser_metrics
-main.cpp
-)
-
-
-target_link_libraries(doxmlparser_metrics
- doxmlparser
- doxygen_version
- qtools
- ${COVERAGE_LINKER_FLAGS}
-)
-
diff --git a/addon/doxmlparser/examples/metrics/main.cpp b/addon/doxmlparser/examples/metrics/main.cpp
deleted file mode 100644
index 9e301b1..0000000
--- a/addon/doxmlparser/examples/metrics/main.cpp
+++ /dev/null
@@ -1,271 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2006 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-/*! \mainpage Metrics
- * This is a small example that shows how to use doxygen's XML output and
- * the doxmlparser library. The example shows some very basic code metrics.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <doxmlintf.h>
-#include "version.h"
-
-bool isDocumented(IDocRoot *brief,IDocRoot *detailed)
-{
- bool found=false;
- if (brief)
- {
- IDocIterator *docIt = brief->contents();
- if (docIt->current()) // method has brief description
- {
- found=true;
- }
- docIt->release();
- }
- if (detailed && !found)
- {
- IDocIterator *docIt = detailed->contents();
- if (docIt->current())
- {
- found=true;
- }
- docIt->release();
- }
- return found;
-}
-
-int main(int argc,char **argv)
-{
- int locArgc = argc;
-
- if (locArgc == 2)
- {
- if (!strcmp(argv[1],"--help"))
- {
- printf("Usage: %s xml_dir\n",argv[0]);
- exit(0);
- }
- else if (!strcmp(argv[1],"--version"))
- {
- printf("%s version: %s\n",argv[0],getFullVersion());
- exit(0);
- }
- }
-
- if (locArgc!=2)
- {
- printf("Usage: %s xml_dir\n",argv[0]);
- exit(1);
- }
-
- int numClasses=0;
- int numDocClasses=0;
- int numStructs=0;
- int numUnions=0;
- int numInterfaces=0;
- int numExceptions=0;
- int numNamespaces=0;
- int numFiles=0;
- int numGroups=0;
- int numPages=0;
- int numPackages=0;
- int numPubMethods=0;
- int numProMethods=0;
- int numPriMethods=0;
- int numDocPubMethods=0;
- int numDocProMethods=0;
- int numDocPriMethods=0;
- int numFunctions=0;
- int numAttributes=0;
- int numVariables=0;
- int numDocFunctions=0;
- int numDocAttributes=0;
- int numDocVariables=0;
- int numParams=0;
-
- IDoxygen *dox = createObjectModel();
-
- dox->setDebugLevel(0);
-
- if (!dox->readXMLDir(argv[1]))
- {
- printf("Error reading %s/index.xml\n",argv[1]);
- exit(1);
- }
-
- ICompoundIterator *cli = dox->compounds();
- ICompound *comp;
- for (cli->toFirst();(comp=cli->current());cli->toNext())
- {
- printf("Processing %s...\n",comp->name()->latin1());
- bool hasDocs = isDocumented(comp->briefDescription(),comp->detailedDescription());
- switch (comp->kind())
- {
- case ICompound::Class:
- numClasses++;
- if (hasDocs) numDocClasses++;
- break;
- case ICompound::Struct: numStructs++; break;
- case ICompound::Union: numUnions++; break;
- case ICompound::Interface: numInterfaces++; break;
- case ICompound::Exception: numExceptions++; break;
- case ICompound::Namespace: numNamespaces++; break;
- case ICompound::File: numFiles++; break;
- case ICompound::Group: numGroups++; break;
- case ICompound::Page: numPages++; break;
- default: break;
- }
-
- ISectionIterator *sli = comp->sections();
- ISection *sec;
- for (sli->toFirst();(sec=sli->current());sli->toNext())
- {
- IMemberIterator *mli = sec->members();
- IMember *mem;
- for (mli->toFirst();(mem=mli->current());mli->toNext())
- {
- IParamIterator *pli = mem->parameters();
- IParam *par;
- if (comp->kind()==ICompound::Class ||
- comp->kind()==ICompound::Struct ||
- comp->kind()==ICompound::Interface
- )
- {
- if (mem->kind()==IMember::Function ||
- mem->kind()==IMember::Prototype ||
- mem->kind()==IMember::Signal ||
- mem->kind()==IMember::Slot ||
- mem->kind()==IMember::DCOP
- ) // is a "method"
- {
- if (mem->section()->isPublic())
- {
- numPubMethods++;
- if (isDocumented(mem->briefDescription(),mem->detailedDescription()))
- {
- numDocPubMethods++;
- }
- }
- else if (mem->section()->isProtected())
- {
- numProMethods++;
- if (isDocumented(mem->briefDescription(),mem->detailedDescription()))
- {
- numDocProMethods++;
- }
- }
- else if (mem->section()->isPrivate())
- {
- numPriMethods++;
- if (isDocumented(mem->briefDescription(),mem->detailedDescription()))
- {
- numDocPriMethods++;
- }
- }
- }
- else if (mem->kind()==IMember::Variable ||
- mem->kind()==IMember::Property
- ) // is an "attribute"
- {
- numAttributes++;
- if (isDocumented(mem->briefDescription(),mem->detailedDescription()))
- {
- numDocAttributes++;
- }
- }
- }
- else if (comp->kind()==ICompound::File ||
- comp->kind()==ICompound::Namespace
- )
- {
- if (mem->kind()==IMember::Function ||
- mem->kind()==IMember::Prototype ||
- mem->kind()==IMember::Signal ||
- mem->kind()==IMember::Slot ||
- mem->kind()==IMember::DCOP
- ) // is a "method"
- {
- numFunctions++;
- if (isDocumented(mem->briefDescription(),mem->detailedDescription()))
- {
- numDocFunctions++;
- }
- }
- else if (mem->kind()==IMember::Variable ||
- mem->kind()==IMember::Property
- ) // is an "attribute"
- {
- numVariables++;
- if (isDocumented(mem->briefDescription(),mem->detailedDescription()))
- {
- numDocVariables++;
- }
- }
- }
-
- for (pli->toFirst();(par=pli->current());pli->toNext())
- {
- numParams++;
- }
- const char *type = mem->typeString()->latin1();
- if (type && strcmp(type, "void"))
- {
- numParams++; // count non-void return types as well
- }
- pli->release();
- }
- mli->release();
- }
- sli->release();
-
- comp->release();
- }
- cli->release();
-
- dox->release();
-
- int numMethods = numPubMethods+numProMethods+numPriMethods;
- int numDocMethods = numDocPubMethods+numDocProMethods+numDocPriMethods;
-
- printf("Metrics:\n");
- printf("-----------------------------------\n");
- if (numClasses>0) printf("Classes: %10d (%d documented)\n",numClasses,numDocClasses);
- if (numStructs>0) printf("Structs: %10d\n",numStructs);
- if (numUnions>0) printf("Unions: %10d\n",numUnions);
- if (numInterfaces>0) printf("Interfaces: %10d\n",numInterfaces);
- if (numExceptions>0) printf("Exceptions: %10d\n",numExceptions);
- if (numNamespaces>0) printf("Namespaces: %10d\n",numNamespaces);
- if (numFiles>0) printf("Files: %10d\n",numFiles);
- if (numGroups>0) printf("Groups: %10d\n",numGroups);
- if (numPages>0) printf("Pages: %10d\n",numPages);
- if (numPackages>0) printf("Packages: %10d\n",numPackages);
- if (numMethods>0) printf("Methods: %10d (%d documented)\n",numMethods,numDocMethods);
- if (numPubMethods>0) printf(" Public: %10d (%d documented)\n",numPubMethods,numDocPubMethods);
- if (numProMethods>0) printf(" Protected: %10d (%d documented)\n",numProMethods,numDocProMethods);
- if (numPriMethods>0) printf(" Private: %10d (%d documented)\n",numPriMethods,numDocPriMethods);
- if (numFunctions>0) printf("Functions: %10d (%d documented)\n",numFunctions,numDocFunctions);
- if (numAttributes>0) printf("Attributes: %10d (%d documented)\n",numAttributes,numDocAttributes);
- if (numVariables>0) printf("Variables: %10d (%d documented)\n",numVariables,numDocVariables);
- if (numParams>0) printf("Params: %10d\n",numParams);
- printf("-----------------------------------\n");
- if (numClasses>0) printf("Avg. #methods/compound: %10f\n",(double)numMethods/(double)numClasses);
- if (numMethods>0) printf("Avg. #params/method: %10f\n",(double)numParams/(double)numMethods);
- printf("-----------------------------------\n");
-
- return 0;
-}
-
diff --git a/addon/doxmlparser/examples/metrics/metrics.py b/addon/doxmlparser/examples/metrics/metrics.py
new file mode 100644
index 0000000..a83e16f
--- /dev/null
+++ b/addon/doxmlparser/examples/metrics/metrics.py
@@ -0,0 +1,225 @@
+# An example showing how to use the python doxmlparser module to extract some metrics from
+# the XML output generated by doxygen for a project.
+
+import sys
+
+import doxmlparser
+
+from doxmlparser.compound import DoxCompoundKind, DoxMemberKind, DoxSectionKind, MixedContainer
+
+class Metrics:
+ def __init__(self):
+ self.numClasses = 0
+ self.numDocClasses = 0
+ self.numStructs = 0
+ self.numUnions = 0
+ self.numInterfaces = 0
+ self.numExceptions = 0
+ self.numNamespaces = 0
+ self.numFiles = 0
+ self.numDocFiles = 0
+ self.numGroups = 0
+ self.numPages = 0
+ self.numPubMethods = 0
+ self.numDocPubMethods = 0
+ self.numProMethods = 0
+ self.numDocProMethods = 0
+ self.numPriMethods = 0
+ self.numDocPriMethods = 0
+ self.numAttributes = 0
+ self.numDocAttributes = 0
+ self.numFunctions = 0
+ self.numDocFunctions = 0
+ self.numVariables = 0
+ self.numDocVariables = 0
+ self.numParams = 0
+ def print(self):
+ numMethods = self.numPubMethods + self.numProMethods + self.numPriMethods
+ numDocMethods = self.numDocPubMethods + self.numDocProMethods + self.numDocPriMethods
+ print("Metrics:");
+ print("-----------------------------------");
+ if self.numClasses>0:
+ print("Classes: {:=10} ({} documented)".format(self.numClasses,self.numDocClasses))
+ if self.numStructs>0:
+ print("Structs: {:=10}".format(self.numStructs))
+ if self.numUnions>0:
+ print("Unions: {:=10}".format(self.numUnions))
+ if self.numExceptions>0:
+ print("Exceptions: {:=10}".format(self.numExceptions))
+ if self.numNamespaces>0:
+ print("Namespaces: {:=10}".format(self.numNamespaces))
+ if self.numFiles>0:
+ print("Files: {:=10} ({} documented)".format(self.numFiles,self.numDocFiles))
+ if self.numGroups>0:
+ print("Groups: {:=10}".format(self.numGroups))
+ if self.numPages>0:
+ print("Pages: {:=10}".format(self.numPages))
+ if numMethods>0:
+ print("Methods: {:=10} ({} documented)".format(numMethods,numDocMethods))
+ if self.numPubMethods>0:
+ print(" Public: {:=10} ({} documented)".format(self.numPubMethods,self.numDocPubMethods))
+ if self.numProMethods>0:
+ print(" Protected: {:=10} ({} documented)".format(self.numProMethods,self.numDocProMethods))
+ if self.numPriMethods>0:
+ print(" Private: {:=10} ({} documented)".format(self.numPriMethods,self.numDocPriMethods))
+ if self.numFunctions>0:
+ print("Functions: {:=10} ({} documented)".format(self.numFunctions,self.numDocFunctions))
+ if self.numAttributes>0:
+ print("Attributes: {:=10} ({} documented)".format(self.numAttributes,self.numDocAttributes))
+ if self.numVariables>0:
+ print("Variables: {:=10} ({} documented)".format(self.numVariables,self.numDocVariables))
+ if self.numParams>0:
+ print("Params: {:=10}".format(self.numParams))
+ print("-----------------------------------");
+ if self.numClasses>0:
+ print("Avg. #methods/compound: {:=10}".format(float(numMethods)/float(self.numClasses)))
+ if numMethods>0:
+ print("Avg. #params/method: {:=10}".format(float(self.numParams)/float(numMethods)))
+ print("-----------------------------------");
+
+
+def description_is_empty(description):
+ for content in description.content_:
+ if content.getCategory()==MixedContainer.CategoryText:
+ if not content.getValue().isspace():
+ return False # non space-only text
+ elif not content.getCategory()==MixedContainer.CategoryNone:
+ return False # some internal object like a paragraph
+ return True
+
+def is_documented(definition):
+ return not description_is_empty(definition.get_briefdescription()) or \
+ not description_is_empty(definition.get_detaileddescription())
+
+def section_is_protected(sectionkind):
+ return sectionkind in [DoxSectionKind.PROTECTEDTYPE,
+ DoxSectionKind.PROTECTEDFUNC,
+ DoxSectionKind.PROTECTEDATTRIB,
+ DoxSectionKind.PROTECTEDSLOT,
+ DoxSectionKind.PROTECTEDSTATICFUNC,
+ DoxSectionKind.PROTECTEDSTATICATTRIB]
+
+def section_is_private(sectionkind):
+ return sectionkind in [DoxSectionKind.PRIVATETYPE,
+ DoxSectionKind.PRIVATEFUNC,
+ DoxSectionKind.PRIVATEATTRIB,
+ DoxSectionKind.PRIVATESLOT,
+ DoxSectionKind.PRIVATESTATICFUNC,
+ DoxSectionKind.PRIVATESTATICATTRIB]
+
+def section_is_public(sectionkind):
+ return not section_is_protected(sectionkind) and not section_is_private(sectionkind)
+
+def linked_text_to_string(linkedtext):
+ str=''
+ if linkedtext:
+ for text_or_ref in linkedtext.content_:
+ if text_or_ref.getCategory()==MixedContainer.CategoryText:
+ str+=text_or_ref.getValue()
+ else:
+ str+=text_or_ref.getValue().get_valueOf_()
+ return str
+
+def parse_members(compounddef,sectiondef,metrics):
+ functionLikeKind = [DoxMemberKind.FUNCTION,
+ DoxMemberKind.PROTOTYPE,
+ DoxMemberKind.SIGNAL,
+ DoxMemberKind.SLOT,
+ DoxMemberKind.DCOP]
+ variableLikeKind = [DoxMemberKind.VARIABLE, DoxMemberKind.PROPERTY]
+ for memberdef in sectiondef.get_memberdef():
+ if compounddef.get_kind() in [DoxCompoundKind.CLASS, DoxCompoundKind.STRUCT, DoxCompoundKind.INTERFACE]:
+ if memberdef.get_kind() in functionLikeKind:
+ if section_is_public(sectiondef.get_kind()):
+ metrics.numPubMethods+=1
+ if is_documented(memberdef):
+ metrics.numDocPubMethods+=1
+ elif section_is_protected(sectiondef.get_kind()):
+ metrics.numProMethods+=1
+ if is_documented(memberdef):
+ metrics.numDocProMethods+=1
+ elif section_is_private(sectiondef.get_kind()):
+ metrics.numPriMethods+=1
+ if is_documented(memberdef):
+ metrics.numDocPriMethods+=1
+ elif memberdef.get_kind() in variableLikeKind:
+ metrics.numAttributes+=1
+ if is_documented(memberdef):
+ metrics.numDocAttributes+=1
+ elif compounddef.get_kind() in [DoxCompoundKind.FILE, DoxCompoundKind.NAMESPACE]:
+ if memberdef.get_kind() in functionLikeKind:
+ metrics.numFunctions+=1
+ if is_documented(memberdef):
+ metrics.numDocFunctions+=1
+ elif memberdef.get_kind() in variableLikeKind:
+ metrics.numVariables+=1
+ if is_documented(memberdef):
+ metrics.numDocVariables+=1
+ #for param in memberdef.get_param():
+ # name = ''
+ # if param.get_defname():
+ # name = param.get_defname()
+ # if param.get_declname():
+ # name = param.get_declname()
+ # print("param '{}':'{}'".format(linked_text_to_string(param.get_type()),name))
+ metrics.numParams+=len(memberdef.get_param())
+ if memberdef.get_type() and memberdef.get_type()!="void" and linked_text_to_string(memberdef.get_type()):
+ metrics.numParams+=1 # count non-void return types as well
+ #print("returns '{}'".format(linked_text_to_string(memberdef.get_type())))
+
+def parse_sections(compounddef,metrics):
+ for sectiondef in compounddef.get_sectiondef():
+ parse_members(compounddef,sectiondef,metrics)
+
+def parse_compound(inDirName,baseName,metrics):
+ rootObj = doxmlparser.compound.parse(inDirName+"/"+baseName+".xml",True)
+ for compounddef in rootObj.get_compounddef():
+ kind = compounddef.get_kind()
+ if kind==DoxCompoundKind.CLASS:
+ metrics.numClasses+=1
+ if is_documented(compounddef):
+ metrics.numDocClasses+=1
+ elif kind==DoxCompoundKind.STRUCT:
+ metrics.numStructs+=1
+ elif kind==DoxCompoundKind.UNION:
+ metrics.numUnions+=1
+ elif kind==DoxCompoundKind.INTERFACE:
+ metrics.numInterfaces+=1
+ elif kind==DoxCompoundKind.EXCEPTION:
+ metrics.numExceptions+=1
+ elif kind==DoxCompoundKind.NAMESPACE:
+ metrics.numNamespaces+=1
+ elif kind==DoxCompoundKind.FILE:
+ metrics.numFiles+=1
+ if is_documented(compounddef):
+ metrics.numDocFiles+=1
+ elif kind==DoxCompoundKind.GROUP:
+ metrics.numGroups+=1
+ elif kind==DoxCompoundKind.PAGE:
+ metrics.numPages+=1
+ else:
+ continue
+ parse_sections(compounddef,metrics)
+
+def parse_index(inDirName):
+ metrics = Metrics()
+ rootObj = doxmlparser.index.parse(inDirName+"/index.xml",True)
+ for compound in rootObj.get_compound(): # for each compound defined in the index
+ print("Processing {0}...".format(compound.get_name()))
+ parse_compound(inDirName,compound.get_refid(),metrics)
+ metrics.print()
+
+def usage():
+ print("Usage {0} <xml_output_dir>".format(sys.argv[0]))
+ sys.exit(1)
+
+def main():
+ args = sys.argv[1:]
+ if len(args)==1:
+ parse_index(args[0])
+ else:
+ usage()
+
+if __name__ == '__main__':
+ main()
+
diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h
deleted file mode 100644
index cb4a9eb..0000000
--- a/addon/doxmlparser/include/doxmlintf.h
+++ /dev/null
@@ -1,1141 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _DOXMLINTF_H
-#define _DOXMLINTF_H
-
-/*! \file
- * \brief The interface to the object model provided by the XML parser
- * library.
- *
- * To start using this library one calls createObjectModel() and then
- * uses the returned IDoxygen interface to read doxygen generated
- * XML output and navigate through the information contained in it.
- *
- * @see createObjectModel()
- */
-
-class IMember;
-class IDocIterator;
-class ICompound;
-class ISection;
-class INode;
-class IDocInternal;
-class IDocRoot;
-
-#define VIRTUAL_DESTRUCTOR(x) virtual ~x() {}
-
-/*! \brief Read only interface to a string.
- */
-class IString
-{
- public:
- VIRTUAL_DESTRUCTOR(IString)
- /*! Returns a latin1 character representation of the string. */
- virtual const char *latin1() const = 0;
- /*! Returns a utf8 character representation of the string. */
- virtual const char *utf8() const = 0;
- /*! Returns a 16-bit unicode character representation of the character at
- * position \a index in the string. The first character is at index 0.
- */
- virtual unsigned short unicodeCharAt(int index) const = 0;
- /*! Returns true if this string is empty or false otherwise */
- virtual bool isEmpty() const = 0;
- /*! Returns the number of characters in the string. */
- virtual int length() const = 0;
-};
-
-/*! \brief Base interface for hyperlinked text
- *
- * Depending on the result of kind() the interface is extended by
- * ILT_Text or ILT_Ref.
- */
-class ILinkedText
-{
- public:
- VIRTUAL_DESTRUCTOR(ILinkedText)
- enum Kind { Kind_Text, Kind_Ref };
- virtual Kind kind() const = 0;
-};
-
-/*! \brief Plain text fragment.
- */
-class ILT_Text : public ILinkedText
-{
- public:
- VIRTUAL_DESTRUCTOR(ILT_Text)
- virtual const IString *text() const = 0;
-};
-
-/*! \brief Reference to an object.
- */
-class ILT_Ref : public ILinkedText
-{
- public:
- VIRTUAL_DESTRUCTOR(ILT_Ref)
- enum TargetKind { Member, Compound };
- virtual const IString *id() const = 0;
- virtual TargetKind targetKind() const = 0;
- virtual const IString *external() const = 0;
- virtual const IString *text() const = 0;
-};
-
-/*! \brief Iterates over a list of ILinkedText fragments.
- */
-class ILinkedTextIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(ILinkedTextIterator)
- virtual ILinkedText *toFirst() = 0;
- virtual ILinkedText *toLast() = 0;
- virtual ILinkedText *toNext() = 0;
- virtual ILinkedText *toPrev() = 0;
- virtual ILinkedText *current() const = 0;
- virtual void release() = 0;
-};
-
-/*! \brief Representation of a parameter of a function. */
-class IParam
-{
- public:
- VIRTUAL_DESTRUCTOR(IParam)
- virtual ILinkedTextIterator *type() const = 0;
- virtual const IString * declarationName() const = 0;
- virtual const IString * definitionName() const = 0;
- virtual const IString * attrib() const = 0;
- virtual const IString * arraySpecifier() const = 0;
- virtual ILinkedTextIterator *defaultValue() const = 0;
- virtual IDocRoot *briefDescription() const = 0;
-};
-
-class IParamIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IParamIterator)
- virtual IParam *toFirst() = 0;
- virtual IParam *toLast() = 0;
- virtual IParam *toNext() = 0;
- virtual IParam *toPrev() = 0;
- virtual IParam *current() const = 0;
- virtual void release() = 0;
-};
-
-class IMemberReference
-{
- public:
- VIRTUAL_DESTRUCTOR(IMemberReference)
- virtual IMember *member() const = 0;
- virtual const IString * name() const = 0;
- virtual const IString * scope() const = 0;
- virtual const IString * protection() const = 0;
- virtual const IString * virtualness() const = 0;
- virtual const IString * ambiguityScope() const = 0;
-};
-
-class IMemberReferenceIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IMemberReferenceIterator)
- virtual IMemberReference *toFirst() = 0;
- virtual IMemberReference *toLast() = 0;
- virtual IMemberReference *toNext() = 0;
- virtual IMemberReference *toPrev() = 0;
- virtual IMemberReference *current() const = 0;
- virtual void release() = 0;
-};
-
-class IDoc
-{
- public:
- VIRTUAL_DESTRUCTOR(IDoc)
- enum Kind
- {
- Invalid = 0, // 0
- Para, // 1 -> IDocPara
- Text, // 2 -> IDocText
- MarkupModifier, // 3 -> IDocMarkupModifier
- ItemizedList, // 4 -> IDocItemizedList
- OrderedList, // 5 -> IDocOrderedList
- ListItem, // 6 -> IDocListItem
- ParameterList, // 7 -> IDocParameterList
- Parameter, // 8 -> IDocParameter
- SimpleSect, // 9 -> IDocSimpleSect
- Title, // 10 -> IDocTitle
- Ref, // 11 -> IDocRef
- VariableList, // 12 -> IDocVariableList
- VariableListEntry, // 13 -> IDocVariableListEntry
- HRuler, // 14 -> IDocHRuler
- LineBreak, // 15 -> IDocLineBreak
- ULink, // 16 -> IDocULink
- EMail, // 17 -> IDocEMail
- Link, // 18 -> IDocLink
- ProgramListing, // 19 -> IDocProgramListing
- CodeLine, // 20 -> IDocCodeLine
- Highlight, // 21 -> IDocHighlight
- Formula, // 22 -> IDocFormula
- Image, // 23 -> IDocImage
- DotFile, // 24 -> IDocDotFile
- IndexEntry, // 25 -> IDocIndexEntry
- Table, // 26 -> IDocTable
- Row, // 27 -> IDocRow
- Entry, // 28 -> IDocEntry
- Section, // 29 -> IDocSection
- Verbatim, // 30 -> IDocVerbatim
- Copy, // 31 -> IDocCopy
- TocList, // 32 -> IDocTocList
- TocItem, // 33 -> IDocTocItem
- Anchor, // 34 -> IDocAnchor
- Symbol, // 35 -> IDocSymbol
- Internal, // 36 -> IDocInternal
- Root, // 37 -> IDocRoot
- ParameterItem // 38 -> IDocParameterItem
- };
- virtual Kind kind() const = 0;
-};
-
-class IDocMarkup : public IDoc
-{
- public:
- enum Markup
- {
- Normal = 0x000,
- Bold = 0x001,
- Emphasis = 0x002,
- ComputerOutput = 0x004,
- Subscript = 0x008,
- Superscript = 0x010,
- SmallFont = 0x020,
- Center = 0x040,
- Preformatted = 0x080,
- Heading = 0x100
- };
-};
-
-class IDocPara : public IDoc
-{
- public:
- virtual IDocIterator *contents() const = 0;
-};
-
-class IDocText : public IDocMarkup
-{
- public:
- virtual const IString * text() const = 0;
- virtual int markup() const = 0;
- virtual int headingLevel() const = 0;
-};
-
-class IDocMarkupModifier : public IDoc
-{
- public:
- virtual bool enabled() const = 0;
- virtual int markup() const = 0;
- virtual int headingLevel() const = 0;
-};
-
-class IDocItemizedList : public IDoc
-{
- public:
- virtual IDocIterator *elements() const = 0;
-};
-
-class IDocOrderedList : public IDoc
-{
- public:
- virtual IDocIterator *elements() const = 0;
-};
-
-class IDocListItem : public IDoc
-{
- public:
- virtual IDocIterator *contents() const = 0;
-};
-
-class IDocParameterList : public IDoc
-{
- public:
- enum Types { Param, RetVal, Exception };
- virtual Types sectType() const = 0;
- virtual IDocIterator *params() const = 0;
-};
-
-class IDocParameterItem : public IDoc
-{
- public:
- virtual IDocIterator *paramNames() const = 0;
- virtual IDocPara *description() const = 0;
-};
-
-class IDocParameter : public IDoc
-{
- public:
- virtual const IString * name() const = 0;
-};
-
-class IDocTitle : public IDoc
-{
- public:
- virtual IDocIterator *title() const = 0;
-};
-
-class IDocSimpleSect : public IDoc
-{
- public:
- enum Types { Invalid = 0,
- See, Return, Author, Version,
- Since, Date, Bug, Note,
- Warning, Par, Deprecated, Pre,
- Post, Invar, Remark, Attention,
- Todo, Test, RCS, EnumValues,
- Examples
- };
- virtual Types type() const = 0;
- virtual const IString * typeString() const = 0;
- virtual IDocTitle *title() const = 0;
- virtual IDocPara *description() const = 0;
-};
-
-class IDocRef : public IDoc
-{
- public:
- enum TargetKind { Member, Compound };
- virtual const IString * refId() const = 0;
- virtual TargetKind targetKind() const = 0;
- virtual const IString * external() const = 0;
- virtual const IString * text() const = 0;
-};
-
-class IDocVariableList : public IDoc
-{
- public:
- virtual IDocIterator *entries() const = 0;
-};
-
-class IDocVariableListEntry : public IDoc
-{
- public:
- virtual ILinkedTextIterator * term() const = 0;
- virtual IDocPara *description() const = 0;
-};
-
-class IDocHRuler : public IDoc
-{
-};
-
-class IDocLineBreak : public IDoc
-{
-};
-
-class IDocULink : public IDoc
-{
- public:
- virtual const IString * url() const = 0;
- virtual const IString * text() const = 0;
-};
-
-class IDocEMail : public IDoc
-{
- public:
- virtual const IString * address() const = 0;
-};
-
-class IDocLink : public IDoc
-{
- public:
- virtual const IString * refId() const = 0;
- virtual const IString * text() const = 0;
-};
-
-class IDocProgramListing : public IDoc
-{
- public:
- virtual IDocIterator *codeLines() const = 0;
-};
-
-class IDocCodeLine : public IDoc
-{
- public:
- virtual int lineNumber() const = 0;
- virtual const IString * refId() const = 0;
- virtual IDocIterator *codeElements() const = 0;
-};
-
-class IDocHighlight : public IDoc
-{
- public:
- enum HighlightKind
- { Invalid=0,
- Comment, Keyword,
- KeywordType, KeywordFlow, CharLiteral,
- StringLiteral, Preprocessor
- };
- virtual HighlightKind highlightKind() const = 0;
- virtual IDocIterator *codeElements() const = 0;
-};
-
-class IDocFormula : public IDoc
-{
- public:
- virtual const IString * id() const = 0;
- virtual const IString * text() const = 0;
-};
-
-class IDocImage : public IDoc
-{
- public:
- virtual const IString * name() const = 0;
- virtual const IString * caption() const = 0;
-};
-
-class IDocDotFile : public IDoc
-{
- public:
- virtual const IString * name() const = 0;
- virtual const IString * caption() const = 0;
-};
-
-class IDocIndexEntry : public IDoc
-{
- public:
- virtual const IString * primary() const = 0;
- virtual const IString * secondary() const = 0;
-};
-
-class IDocTable : public IDoc
-{
- public:
- virtual IDocIterator *rows() const = 0;
- virtual int numColumns() const = 0;
- virtual const IString * caption() const = 0;
-};
-
-class IDocRow : public IDoc
-{
- public:
- virtual IDocIterator *entries() const = 0;
-};
-
-class IDocEntry : public IDoc
-{
- public:
- virtual IDocIterator *contents() const = 0;
-};
-
-class IDocSection : public IDoc
-{
- public:
- virtual const IString * id() const = 0;
- virtual int level() const = 0;
- virtual IDocTitle *title() const = 0;
- virtual IDocIterator *paragraphs() const = 0;
- virtual IDocIterator *subSections() const = 0;
- virtual IDocInternal *internal() const = 0;
-};
-
-class IDocInternal : public IDoc
-{
- public:
- virtual IDocIterator *paragraphs() const = 0;
- virtual IDocIterator *subSections() const = 0;
-};
-
-class IDocTocList : public IDoc
-{
- public:
- virtual IDocIterator *elements() const = 0;
-};
-
-class IDocTocItem : public IDoc
-{
- public:
- virtual const IString *id() const = 0;
- virtual const IString *title() const = 0;
-};
-
-class IDocCopy : public IDoc
-{
- public:
- virtual IDocIterator *contents() const = 0;
-};
-
-class IDocVerbatim : public IDoc
-{
- public:
- enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim };
- virtual const IString *text() const = 0;
- virtual Types type() const = 0;
-};
-
-class IDocAnchor : public IDoc
-{
- public:
- virtual const IString *id() const = 0;
-};
-
-class IDocSymbol : public IDoc
-{
- public:
- enum Types
- { Invalid = 0,
- Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy
- };
- virtual Types type() const = 0;
- virtual const IString * typeString() const = 0;
- virtual char letter() const = 0;
-};
-
-class IDocRoot : public IDoc
-{
- public:
- virtual IDocIterator *contents() const = 0;
- virtual IDocInternal *internal() const = 0;
-};
-
-class IDocIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IDocIterator)
- virtual IDoc *toFirst() = 0;
- virtual IDoc *toLast() = 0;
- virtual IDoc *toNext() = 0;
- virtual IDoc *toPrev() = 0;
- virtual IDoc *current() const = 0;
- virtual void release() = 0;
-};
-
-class IEdgeLabel
-{
- public:
- VIRTUAL_DESTRUCTOR(IEdgeLabel)
- virtual const IString * label() const = 0;
-};
-
-class IEdgeLabelIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IEdgeLabelIterator)
- virtual IEdgeLabel *toFirst() = 0;
- virtual IEdgeLabel *toLast() = 0;
- virtual IEdgeLabel *toNext() = 0;
- virtual IEdgeLabel *toPrev() = 0;
- virtual IEdgeLabel *current() const = 0;
- virtual void release() = 0;
-};
-
-class IChildNode
-{
- public:
- VIRTUAL_DESTRUCTOR(IChildNode)
- enum NodeRelation { PublicInheritance, ProtectedInheritance,
- PrivateInheritance, Usage, TemplateInstance
- };
- virtual INode * node() const = 0;
- virtual NodeRelation relation() const = 0;
- virtual const IString * relationString() const = 0;
- virtual IEdgeLabelIterator *edgeLabels() const = 0;
-};
-
-class IChildNodeIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IChildNodeIterator)
- virtual IChildNode *toFirst() = 0;
- virtual IChildNode *toLast() = 0;
- virtual IChildNode *toNext() = 0;
- virtual IChildNode *toPrev() = 0;
- virtual IChildNode *current() const = 0;
- virtual void release() = 0;
-};
-
-class INode
-{
- public:
- VIRTUAL_DESTRUCTOR(INode)
- virtual const IString * id() const = 0;
- virtual const IString * label() const = 0;
- virtual const IString * linkId() const = 0;
- virtual IChildNodeIterator *children() const = 0;
-};
-
-class INodeIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(INodeIterator)
- virtual INode *toFirst() = 0;
- virtual INode *toLast() = 0;
- virtual INode *toNext() = 0;
- virtual INode *toPrev() = 0;
- virtual INode *current() const = 0;
- virtual void release() = 0;
-};
-
-class IGraph
-{
- public:
- VIRTUAL_DESTRUCTOR(IGraph)
- virtual INodeIterator *nodes() const = 0;
-};
-
-class IMember
-{
- public:
- VIRTUAL_DESTRUCTOR(IMember)
- enum MemberKind { Invalid=0,
- Define, Property, Variable, Typedef, Enum,
- Function, Signal, Prototype, Friend, DCOP, Slot,
- EnumValue
- };
- virtual ICompound *compound() const = 0;
- virtual ISection *section() const = 0;
- virtual MemberKind kind() const = 0;
- virtual const IString * kindString() const = 0;
- virtual const IString * id() const = 0;
- virtual const IString * protection() const = 0;
- virtual const IString * virtualness() const = 0;
- virtual ILinkedTextIterator *type() const = 0;
- virtual const IString * typeString() const = 0;
- virtual const IString * name() const = 0;
- virtual const IString * readAccessor() const = 0;
- virtual const IString * writeAccessor() const = 0;
- virtual const IString * definition() const = 0;
- virtual const IString * argsstring() const = 0;
- virtual bool isConst() const = 0;
- virtual bool isVolatile() const = 0;
- virtual bool isStatic() const = 0;
- virtual bool isExplicit() const = 0;
- virtual bool isInline() const = 0;
- virtual bool isMutable() const = 0;
- virtual bool isReadable() const = 0;
- virtual bool isWritable() const = 0;
- virtual IParamIterator *parameters() const = 0;
- virtual IParamIterator *templateParameters() const = 0;
- virtual ILinkedTextIterator *initializer() const = 0;
- virtual ILinkedTextIterator *exceptions() const = 0;
- virtual IMemberReferenceIterator *references() const = 0;
- virtual IMemberReferenceIterator *referencedBy() const = 0;
- virtual const IString *bodyFile() const = 0;
- virtual int bodyStart() const = 0;
- virtual int bodyEnd() const = 0;
- virtual const IString * definitionFile() const = 0;
- virtual int definitionLine() const = 0;
- virtual IMemberReference *reimplements() const = 0;
- virtual IMemberReferenceIterator *reimplementedBy() const = 0;
- virtual IDocRoot *briefDescription() const = 0;
- virtual IDocRoot *detailedDescription() const = 0;
- virtual IDocRoot *inbodyDescription() const = 0;
-};
-
-class IDefine : public IMember
-{
- public:
-};
-
-class IProperty : public IMember
-{
- public:
-};
-
-class IVariable : public IMember
-{
- public:
-};
-
-class ITypedef : public IMember
-{
- public:
-};
-
-class IFunction : public IMember
-{
- public:
-};
-
-class ISignal : public IMember
-{
- public:
-};
-
-class IPrototype : public IMember
-{
- public:
-};
-
-class IFriend : public IMember
-{
- public:
-};
-
-class IDCOP : public IMember
-{
- public:
-};
-
-class ISlot : public IMember
-{
- public:
-};
-
-class IEnumValue : public IMember
-{
- public:
- virtual const IString * name() const = 0;
-};
-
-/*! \brief Include relation
- */
-class IInclude
-{
- public:
- VIRTUAL_DESTRUCTOR(IInclude)
- virtual const IString * name() const = 0;
- virtual const IString * refId() const = 0;
- virtual bool isLocal() const = 0;
-};
-
-class IIncludeIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IIncludeIterator)
- virtual IInclude *toFirst() = 0;
- virtual IInclude *toLast() = 0;
- virtual IInclude *toNext() = 0;
- virtual IInclude *toPrev() = 0;
- virtual IInclude *current() const = 0;
- virtual void release() = 0;
-};
-
-class IMemberIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IMemberIterator)
- virtual IMember *toFirst() = 0;
- virtual IMember *toLast() = 0;
- virtual IMember *toNext() = 0;
- virtual IMember *toPrev() = 0;
- virtual IMember *current() const = 0;
- virtual void release() = 0;
-};
-
-class IEnum : public IMember
-{
- public:
- virtual IMemberIterator *enumValues() const = 0;
-};
-
-/*! \brief The interface to a section in the object model.
- *
- * A compound can have a number of sections, where each
- * section contains a set of members with the properties implied by
- * the section kind. The kind() method returns the kind of the section.
- * The members of the section can be accessed via members(). Apart
- * from using kind(), some of the individual properties of the section can
- * also be inspected via isStatic(), isPublic(), isProtected() and
- * isPrivate().
- */
-class ISection
-{
- public:
- VIRTUAL_DESTRUCTOR(ISection)
- /*! Possible section types */
- enum SectionKind
- { Invalid=0,
- UserDefined, //!< A user defined member group
- PubTypes, //!< Public member typedefs
- PubFuncs, //!< Public member functions
- PubAttribs, //!< Public member attributes
- PubSlots, //!< Public Qt Slots
- Signals, //!< Qt Signals
- DCOPFuncs, //!< KDE-DCOP interface functions
- Properties, //!< IDL properties
- Events, //!< C# events
- PubStatFuncs, //!< Public static member functions
- PubStatAttribs, //!< Public static attributes
- ProTypes, //!< Protected member typedefs
- ProFuncs, //!< Protected member functions
- ProAttribs, //!< Protected member attributes
- ProSlots, //!< Protected slots
- ProStatFuncs, //!< Protected static member functions
- ProStatAttribs, //!< Protected static member attributes
- PacTypes, //!< Package member typedefs
- PacFuncs, //!< Package member functions
- PacAttribs, //!< Package member attributes
- PacStatFuncs, //!< Package static member functions
- PacStatAttribs, //!< Package static member attributes
- PriTypes, //!< Private member typedefs
- PriFuncs, //!< Private member functions
- PriAttribs, //!< Private member attributes
- PriSlots, //!< Private Qt slots
- PriStatFuncs, //!< Private static member functions
- PriStatAttribs, //!< Private static member attributes
- Friend, //!< Friends
- Related, //!< Function marked as related
- Defines, //!< Preprocessor defines
- Prototypes, //!< Global function prototypes
- Typedefs, //!< Global typedefs
- Enums, //!< Enumerations
- Functions, //!< Global functions
- Variables //!< Global variables
- };
-
- /*! Returns a string representation of the value returned by kind() */
- virtual const IString * kindString() const = 0;
-
- /*! Returns what kind of section this is */
- virtual SectionKind kind() const = 0;
-
- /*! Returns the description attached to this section (for user defined
- * sections, also known as member groups).
- */
- virtual IDocRoot *description() const = 0;
-
- /*! Returns an iterator for the members of this section */
- virtual IMemberIterator *members() const = 0;
-
- /*! Returns \c true if this section contains statics */
- virtual bool isStatic() const = 0;
-
- /*! Returns \c true if this section belongs to a
- * public section of a class
- */
- virtual bool isPublic() const = 0;
-
- /*! Returns \c true if this section belongs to a
- * private section of a class
- */
- virtual bool isPrivate() const = 0;
-
- /*! Returns \c true if this section belongs to a
- * protected section of a class
- * */
- virtual bool isProtected() const = 0;
-};
-
-class IUserDefined : public ISection
-{
- public:
- virtual const IString * header() const = 0;
-};
-
-class ISectionIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(ISectionIterator)
- virtual ISection *toFirst() = 0;
- virtual ISection *toLast() = 0;
- virtual ISection *toNext() = 0;
- virtual ISection *toPrev() = 0;
- virtual ISection *current() const = 0;
- virtual void release() = 0;
-};
-
-/*! \brief The interface to a compound in the object model.
- *
- * A compound has a name which can be obtained via the name() method
- * and a unique id, which is return via the id() method.
- * A compound consists zero or more members which are grouped into sections.
- * The sections() method can be used to access the individual sections.
- * Alternatively, members can be obtained by name or id. There are
- * different types of compounds. The kind() method returns what kind of
- * compound this is. Depending on the return value one can dynamically
- * cast an interface pointer to an more specialised interface that provides
- * additional methods.
- * Example:
- * \code
- * ICompound *comp=...;
- * if (comp->kind()==ICompound::Class)
- * {
- * IClass *cls = dynamic_cast<IClass*>(comp);
- * // use methods of IClass
- * }
- * \endcode
- * The documentation that is provided by a compound is available via
- * the briefDescription() and detailedDescription() methods.
- * To avoid excessive memory usage, release() should be called (once) on each
- * compound interface pointer that is no longer needed.
- */
-class ICompound
-{
- public:
- VIRTUAL_DESTRUCTOR(ICompound)
- /*! Represents the kind of compounds recognised by doxygen. */
- enum CompoundKind { Invalid=0,
- Class, Struct, Union, Interface, Protocol, Category,
- Exception, File, Namespace, Group, Page, Example, Dir
- };
-
- /*! Returns the name of this compound */
- virtual const IString * name() const = 0;
-
- /*! Returns the id of this compound. The id is a
- * unique string representing a specific compound object.
- */
- virtual const IString * id() const = 0;
-
- /*! Returns the kind of compound. See #CompoundKind for possible
- * values.
- */
- virtual CompoundKind kind() const = 0;
-
- /*! Returns a string representation of the compound kind.
- * @see kind()
- */
- virtual const IString * kindString() const = 0;
-
- /*! Returns an iterator for the different member sections in this
- * compound.
- */
- virtual ISectionIterator *sections() const = 0;
-
- /*! Returns a tree-structured representation of the brief
- * description that is attached to this compound.
- */
- virtual IDocRoot *briefDescription() const = 0;
-
- /*! Returns a tree-structured representation of the detailed
- * description that is attached to this compound.
- */
- virtual IDocRoot *detailedDescription() const = 0;
-
- /*! Returns an interface to a member given its id.
- * @param id The member id.
- */
- virtual IMember *memberById(const char * id) const = 0;
-
- /*! Returns a list of all members within the compound having a certain
- * name. Member overloading is the reason why there can be more than
- * one member.
- * @param name The name of the member.
- */
- virtual IMemberIterator *memberByName(const char * name) const = 0;
-
- /*! Decreases the reference counter for this compound. If it reaches
- * zero, the memory for the compound will be released.
- */
- virtual void release() = 0;
-};
-
-class ICompoundIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(ICompoundIterator)
- virtual void toFirst() = 0;
- virtual void toLast() = 0;
- virtual void toNext() = 0;
- virtual void toPrev() = 0;
- virtual ICompound *current() const = 0;
- virtual void release() = 0;
-};
-
-class IRelatedCompound
-{
- public:
- VIRTUAL_DESTRUCTOR(IRelatedCompound)
- enum Protection { Public, Protected, Private };
- enum Kind { Normal, Virtual };
- virtual ICompound *compound() const = 0;
- virtual Protection protection() const = 0;
- virtual Kind kind() const = 0;
- virtual const IString *name() const = 0;
-
-};
-
-class IRelatedCompoundIterator
-{
- public:
- VIRTUAL_DESTRUCTOR(IRelatedCompoundIterator)
- virtual IRelatedCompound *toFirst() = 0;
- virtual IRelatedCompound *toLast() = 0;
- virtual IRelatedCompound *toNext() = 0;
- virtual IRelatedCompound *toPrev() = 0;
- virtual IRelatedCompound *current() const = 0;
- virtual void release() = 0;
-};
-
-/*! \brief The interface to a class in the object model.
- */
-class IClass : public ICompound
-{
- public:
- virtual IGraph *inheritanceGraph() const = 0;
- virtual IGraph *collaborationGraph() const = 0;
- virtual IRelatedCompoundIterator *baseCompounds() const = 0;
- virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
- virtual ICompoundIterator *nestedCompounds() const = 0;
- virtual IParamIterator *templateParameters() const = 0;
- virtual const IString *locationFile() const = 0;
- virtual int locationLine() const = 0;
- virtual const IString *locationBodyFile() const = 0;
- virtual int locationBodyStartLine() const = 0;
- virtual int locationBodyEndLine() const = 0;
-
- // TODO:
- // class:
- // listOfAllMembers()
- // protection()
- // isAbstract()
-};
-
-/*! \brief The interface to a struct in the object model.
- */
-class IStruct : public ICompound
-{
- public:
- virtual ICompoundIterator *nestedCompounds() const = 0;
- virtual IRelatedCompoundIterator *baseCompounds() const = 0;
- virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
- virtual const IString *locationFile() const = 0;
- virtual int locationLine() const = 0;
- virtual int locationBodyStartLine() const = 0;
- virtual int locationBodyEndLine() const = 0;
-};
-
-/*! \brief The interface to a union in the object model.
- */
-class IUnion : public ICompound
-{
- public:
- virtual ICompoundIterator *nestedCompounds() const = 0;
-};
-
-/*! \brief The interface to a Java/IDL interface in the object model.
- */
-class IInterface : public ICompound
-{
- public:
- virtual IRelatedCompoundIterator *baseCompounds() const = 0;
- virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
-};
-
-
-/*! \brief The interface to a Java/IDL exception in the object model.
- */
-class IException : public ICompound
-{
-};
-
-/*! \brief The interface to a namespace in the object model.
- */
-class INamespace : public ICompound
-{
- public:
- virtual ICompoundIterator *nestedCompounds() const = 0;
-};
-
-/*! \brief The interface to a file in the object model.
- */
-class IFile : public ICompound
-{
- public:
- virtual IGraph *includeDependencyGraph() const = 0;
- virtual IGraph *includedByDependencyGraph() const = 0;
- virtual IDocProgramListing *source() const = 0;
- virtual ICompoundIterator *nestedCompounds() const = 0;
-
- virtual IIncludeIterator *includes() const = 0;
- virtual IIncludeIterator *includedBy() const = 0;
-
- // ICompound *innerNamespaces()
- // ICompoundIterator *innerClasses()
-};
-
-/*! \brief The interface to a group in the object model.
- */
-class IGroup : public ICompound
-{
- public:
- virtual ICompoundIterator *nestedCompounds() const = 0;
- // group:
- // Title()
- // innerFile()
- // innerPage()
-};
-
-/*! \brief The interface to a page in the object model.
- */
-class IPage : public ICompound
-{
- public:
- virtual const IDocTitle *title() const = 0;
-};
-
-/** \brief Interface to a directory in the object model. */
-class IDir : public ICompound
-{
- public:
- virtual ICompoundIterator *nestedCompounds() const = 0;
-};
-
-/*! Root node of the object model. */
-class IDoxygen
-{
- public:
- VIRTUAL_DESTRUCTOR(IDoxygen)
-
- /*! Returns an iterator that can be used to iterate over the list
- * of compounds found in the project.
- */
- virtual ICompoundIterator *compounds() const = 0;
-
- /*! Returns a compound given its unique \a id. If you have a
- * compound id this function is much more efficient than iterating
- * over the compound list. Returns 0 if the id is not valid.
- */
- virtual ICompound *compoundById(const char * id) const = 0;
-
- /*! Returns a compound given its name (including the scope).
- * Returns 0 if the name is not found in the project.
- */
- virtual ICompound *compoundByName(const char * name) const = 0;
-
- /*! Returns an interface to a compound containing a member given it the
- * member's id. Given the ICompound interface one can use the same id
- * to obtain the IMember interface.
- * @param id The member id.
- */
- virtual ICompound *memberById(const char * id) const = 0;
-
- /*! Returns a list of all compounds containing at least one members
- * with a certain name. Each compound can be asked to return the
- * list of members with that name.
- * @param name The name of the member.
- */
- virtual ICompoundIterator *memberByName(const char * name) const = 0;
-
- /*! Releases the memory for the object hierarchy obtained by
- * createdObjectModel(). First release all iterators before calling
- * this function.
- */
- virtual void release() = 0;
-
- /*! Sets the debug level.
- * - 0 all debugging messages are disabled (the default).
- * - 1 display important messages only
- * - 2 display any messages.
- */
- virtual void setDebugLevel(int level) = 0;
-
- /*! Reads an XML directory produced by doxygen and builds up a data
- * structure representing the contents of the XML files in the directory.
- */
- virtual bool readXMLDir(const char *xmlDirName) = 0;
-};
-
-/*! Factory method that creates an empty object model for a doxygen generated XML file.
- * Use the readXMLDir() method to build the model from an XML output
- * directory containing doxygen output.
- */
-IDoxygen *createObjectModel();
-
-#endif
diff --git a/addon/doxmlparser/requirements.txt b/addon/doxmlparser/requirements.txt
new file mode 100644
index 0000000..d7a63aa
--- /dev/null
+++ b/addon/doxmlparser/requirements.txt
@@ -0,0 +1,2 @@
+lxml>=4.0.0
+six>=1.0.0
diff --git a/addon/doxmlparser/setup.py b/addon/doxmlparser/setup.py
new file mode 100644
index 0000000..02a0496
--- /dev/null
+++ b/addon/doxmlparser/setup.py
@@ -0,0 +1,19 @@
+from setuptools import setup, find_packages
+
+with open('README.md') as f:
+ readme = f.read()
+
+with open('LICENSE') as f:
+ license = f.read()
+
+setup(
+ name='doxmlparser',
+ version='0.1',
+ description='Python API to access doxygen generated XML output',
+ long_description=readme,
+ author='Dimitri van Heesch',
+ author_email='doxygen@gmail.com',
+ url='https://github.com/doxygen/doxygen/addon/doxmlparser',
+ license=license,
+ packages=find_packages(exclude=('tests', 'docs'))
+)
diff --git a/addon/doxmlparser/src/CMakeLists.txt b/addon/doxmlparser/src/CMakeLists.txt
deleted file mode 100644
index cbd5811..0000000
--- a/addon/doxmlparser/src/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-include_directories(
- .
- ../include
- ${PROJECT_SOURCE_DIR}/qtools
-)
-add_library(doxmlparser STATIC
- basehandler.cpp
- compoundhandler.cpp
- debug.cpp
- dochandler.cpp
- graphhandler.cpp
- linkedtexthandler.cpp
- loamhandler.cpp
- mainhandler.cpp
- memberhandler.cpp
- paramhandler.cpp
- sectionhandler.cpp
-)
diff --git a/addon/doxmlparser/src/basehandler.cpp b/addon/doxmlparser/src/basehandler.cpp
deleted file mode 100644
index 02d98c2..0000000
--- a/addon/doxmlparser/src/basehandler.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "basehandler.h"
-
-QXmlLocator * LocatorContainer::s_theLocator=0;
diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h
deleted file mode 100644
index 1772d8a..0000000
--- a/addon/doxmlparser/src/basehandler.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _BASEHANDLER_H
-#define _BASEHANDLER_H
-
-#include <qxml.h>
-#include <qdict.h>
-#include <qstring.h>
-
-#include "debug.h"
-
-//-----------------------------------------------------------------------------
-
-class IBaseHandler
-{
- public:
- virtual void setDelegate(QXmlDefaultHandler *delegate) = 0;
- virtual QXmlDefaultHandler *delegate() const = 0;
- virtual ~IBaseHandler() {}
-};
-
-//-----------------------------------------------------------------------------
-
-class IFallBackHandler
-{
- public:
- virtual bool handleStartElement(const QString & name,
- const QXmlAttributes & attrib) = 0;
- virtual bool handleEndElement(const QString &name) = 0;
- virtual ~IFallBackHandler() {}
-};
-
-//-----------------------------------------------------------------------------
-
-template<class T> class ElementMapper
-{
- class StartElementHandler
- {
- typedef void (T::*Handler)(const QXmlAttributes &attrib);
- public:
- StartElementHandler() : m_parent(0) {}
- StartElementHandler(T *parent, Handler h)
- : m_parent(parent), m_handler(h) {}
- void operator()(const QXmlAttributes &attrib)
- { if (m_parent) (m_parent->*m_handler)(attrib); }
- private:
- T *m_parent = 0;
- Handler m_handler;
- };
-
- class EndElementHandler
- {
- typedef void (T::*Handler)();
- public:
- EndElementHandler() : m_parent(0) {}
- EndElementHandler(T *parent, Handler h)
- : m_parent(parent), m_handler(h) {}
- void operator()()
- { if (m_parent) (m_parent->*m_handler)(); }
- private:
- T *m_parent = 0;
- Handler m_handler;
- };
-
- public:
- typedef StartElementHandler StartElementHandlerT;
- typedef EndElementHandler EndElementHandlerT;
-
- ElementMapper() : m_startHandlers(67), m_endHandlers(67)
- {
- m_startHandlers.setAutoDelete(TRUE);
- m_endHandlers.setAutoDelete(TRUE);
- }
- virtual ~ElementMapper()
- {
- }
-
- void addStartHandler(const char *key)
- {
- m_startHandlers.insert(key,new StartElementHandlerT);
- }
-
- void addStartHandler(const char *key, T *obj, void (T::*handler)(const QXmlAttributes &))
- {
- m_startHandlers.insert(key,new StartElementHandlerT(obj,handler));
- }
-
- void addEndHandler(const char *key)
- {
- m_endHandlers.insert(key,new EndElementHandlerT);
- }
-
- void addEndHandler(const char *key, T *obj, void (T::*handler)())
- {
- m_endHandlers.insert(key,new EndElementHandlerT(obj,handler));
- }
-
-
- protected:
- QDict<StartElementHandlerT> m_startHandlers;
- QDict<EndElementHandlerT> m_endHandlers;
-};
-
-//-----------------------------------------------------------------------------
-
-struct LocatorContainer
-{
- static QXmlLocator *s_theLocator;
-};
-
-//-----------------------------------------------------------------------------
-
-template<class T> class BaseHandler : public QXmlDefaultHandler,
- public ElementMapper<T>,
- public LocatorContainer,
- public IBaseHandler
-{
- public:
- typedef typename ElementMapper<T>::StartElementHandlerT StartElementHandlerT;
- typedef typename ElementMapper<T>::EndElementHandlerT EndElementHandlerT;
-
- BaseHandler() : m_skipCount(0), m_delegateHandler(0), m_fallBackHandler(0)
- {
- }
-
- virtual ~BaseHandler()
- {
- ASSERT(m_delegateHandler==0);
- }
-
- virtual bool startDocument()
- {
- return TRUE;
- }
-
- virtual bool startElement( const QString & namespaceURI,
- const QString & localName,
- const QString & name,
- const QXmlAttributes & attrib
- )
- {
- if (m_delegateHandler)
- {
- return m_delegateHandler->startElement(namespaceURI,localName,name,attrib);
- }
- if (!m_skipUntil.isEmpty()) // skip mode
- {
- if (m_skipUntil==name) m_skipCount++;
- debug(1,"line %d, col %d: skipping start tag %s count=%d\n",
- s_theLocator->lineNumber(),s_theLocator->columnNumber(),
- name.data(),m_skipCount);
- return TRUE;
- }
-
- StartElementHandlerT *handler = ElementMapper<T>::m_startHandlers[name.utf8()];
- if (handler)
- {
- (*handler)(attrib);
- //printf("found start tag %s\n",name.data());
- }
- else if (!m_fallBackHandler ||
- !m_fallBackHandler->handleStartElement(name,attrib)
- )
- {
- debug(1,"line %d, col %d: found unexpected tag '%s', skipping until matching end tag\n",
- s_theLocator->lineNumber(),s_theLocator->columnNumber(),
- name.data());
- m_skipUntil = name;
- m_skipCount=1;
- }
- return TRUE;
- }
-
- virtual bool endElement( const QString& namespaceURI, const QString& localName, const QString& name )
- {
- if (m_delegateHandler)
- {
- return m_delegateHandler->endElement(namespaceURI,localName,name);
- }
-
- if (name==m_skipUntil)
- {
- m_skipCount--;
- debug(1,"line %d, col %d: skipping end tag %s count=%d\n",
- s_theLocator->lineNumber(),s_theLocator->columnNumber(),
- name.data(),m_skipCount);
- if (m_skipCount==0)
- {
- m_skipUntil="";
- }
- //printf("found end tag %s\n",name.data());
- }
- else if (m_skipUntil.isEmpty())
- {
- EndElementHandlerT *handler = ElementMapper<T>::m_endHandlers[name.utf8()];
- if (handler)
- {
- (*handler)();
- //printf("found end tag %s\n",name.data());
- }
- else if (m_fallBackHandler)
- {
- m_fallBackHandler->handleEndElement(name);
- }
- }
- m_curString="";
- return TRUE;
- }
-
- bool skippedEntity ( const QString &s )
- {
- if (m_delegateHandler)
- {
- return m_delegateHandler->skippedEntity(s);
- }
-
- debug(1,"line %d, col %d: Skipped unhandled entity %s\n",
- s_theLocator->lineNumber(),s_theLocator->columnNumber(),
- s.data());
- return TRUE;
- }
-
- /*! called when a number of characters are received by the parser.
- * \param ch the characters.
- */
- virtual bool characters ( const QString & ch )
- {
- if (m_delegateHandler)
- {
- return m_delegateHandler->characters(ch);
- }
-
- //printf("Found characters \"%s\"\n",ch.data());
- m_curString+=ch;
- return TRUE;
- }
-
- void setDelegate(QXmlDefaultHandler *delegate)
- {
- m_delegateHandler = delegate;
- }
-
- QXmlDefaultHandler *delegate() const
- {
- return m_delegateHandler;
- }
-
- void setFallBackHandler(IFallBackHandler *h)
- {
- m_fallBackHandler = h;
- }
-
- IFallBackHandler *fallBackHandler() const
- {
- return m_fallBackHandler;
- }
-
- void setDocumentLocator( QXmlLocator * locator )
- {
- debug(2,"setDocumentLocator(%p)\n",locator);
- s_theLocator = locator;
- }
-
- protected:
- QString m_curString;
- QString m_skipUntil;
- int m_skipCount = 0;
- QXmlDefaultHandler *m_delegateHandler = 0;
- IFallBackHandler *m_fallBackHandler = 0;
-};
-
-//-----------------------------------------------------------------------------
-
-template<class T> class BaseFallBackHandler : public ElementMapper<T>,
- public IFallBackHandler
-{
- public:
- typedef typename ElementMapper<T>::StartElementHandlerT StartElementHandlerT;
- typedef typename ElementMapper<T>::EndElementHandlerT EndElementHandlerT;
-
- BaseFallBackHandler()
- {
- }
- virtual ~BaseFallBackHandler()
- {
- }
-
- bool handleStartElement(const QString & name,
- const QXmlAttributes & attrib)
- {
- StartElementHandlerT *handler = ElementMapper<T>::m_startHandlers[name.utf8()];
- if (handler)
- {
- (*handler)(attrib);
- return TRUE;
- }
- return FALSE;
- }
- bool handleEndElement(const QString &name)
- {
- EndElementHandlerT *handler = ElementMapper<T>::m_endHandlers[name.utf8()];
- if (handler)
- {
- (*handler)();
- return TRUE;
- }
- return FALSE;
- }
-};
-
-
-#endif
diff --git a/addon/doxmlparser/src/baseiterator.h b/addon/doxmlparser/src/baseiterator.h
deleted file mode 100644
index 3325f54..0000000
--- a/addon/doxmlparser/src/baseiterator.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-#ifndef BASEITERATOR_H
-#define BASEITERATOR_H
-
-#include <qlist.h>
-#include <doxmlintf.h>
-
-template<class Intf,class ElemIntf,class ElemImpl> class BaseIterator :
- public Intf, public QListIterator<ElemImpl>
-{
- public:
- BaseIterator(const QList<ElemImpl> &list) : QListIterator<ElemImpl>(list) {}
- virtual ~BaseIterator() {}
- virtual ElemIntf *toFirst() { return QListIterator<ElemImpl>::toFirst(); }
- virtual ElemIntf *toLast() { return QListIterator<ElemImpl>::toLast(); }
- virtual ElemIntf *toNext() { return QListIterator<ElemImpl>::operator++(); }
- virtual ElemIntf *toPrev() { return QListIterator<ElemImpl>::operator--(); }
- virtual ElemIntf *current() const { return QListIterator<ElemImpl>::current(); }
- virtual void release() { delete this; }
-};
-
-template<class Intf,class ElemIntf,class ElemImpl,class Intermediate>
- class BaseIteratorVia :
- public Intf, public QListIterator<ElemImpl>
-{
- public:
- BaseIteratorVia(const QList<ElemImpl> &list) : QListIterator<ElemImpl>(list) {}
- virtual ~BaseIteratorVia() {}
- virtual ElemIntf *toFirst() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::toFirst()); }
- virtual ElemIntf *toLast() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::toLast()); }
- virtual ElemIntf *toNext() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::operator++()); }
- virtual ElemIntf *toPrev() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::operator--()); }
- virtual ElemIntf *current() const { return static_cast<Intermediate *>(QListIterator<ElemImpl>::current()); }
- virtual void release() { delete this; }
-};
-
-#endif
diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp
deleted file mode 100644
index 69fb70c..0000000
--- a/addon/doxmlparser/src/compoundhandler.cpp
+++ /dev/null
@@ -1,655 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#include "mainhandler.h"
-#include "compoundhandler.h"
-#include "dochandler.h"
-#include "debug.h"
-#include "graphhandler.h"
-#include "sectionhandler.h"
-#include "paramhandler.h"
-#include "loamhandler.h"
-#include "memberhandler.h"
-#include "linkedtexthandler.h"
-
-//----------------------------------------------------------------------------
-
-IncludeHandler::IncludeHandler(IBaseHandler *parent,const char *endtag) :
- m_parent(parent)
-{
- addEndHandler(endtag,this,&IncludeHandler::endInclude);
-}
-
-IncludeHandler::~IncludeHandler()
-{
-}
-
-void IncludeHandler::startInclude(const QXmlAttributes &attrib)
-{
- m_curString = "";
- m_refId = attrib.value("refid");
- m_isLocal = attrib.value("local")=="yes";
- m_parent->setDelegate(this);
-}
-
-void IncludeHandler::endInclude()
-{
- m_name = m_curString;
- m_parent->setDelegate(0);
- debug(2,"Found include %s\n",m_name.data());
-}
-
-//----------------------------------------------------------------------------
-
-class CompoundIdIterator : public ICompoundIterator,
- public QListIterator<QString>
-{
- public:
- CompoundIdIterator(const MainHandler *m,const QList<QString> &list) :
- QListIterator<QString>(list), m_mainHandler(m) {}
- virtual ~CompoundIdIterator() {}
-
- virtual void toFirst()
- {
- QListIterator<QString>::toFirst();
- }
- virtual void toLast()
- {
- QListIterator<QString>::toLast();
- }
- virtual void toNext()
- {
- QListIterator<QString>::operator++();
- }
- virtual void toPrev()
- {
- QListIterator<QString>::operator--();
- }
- virtual ICompound *current() const
- {
- QString *id = QListIterator<QString>::current();
- return id ? m_mainHandler->compoundById(id->utf8()) : 0;
- }
- virtual void release()
- { delete this; }
-
- private:
- const MainHandler *m_mainHandler = 0;
-};
-
-//----------------------------------------------------------------------------
-
-ICompound *RelatedCompound::compound() const
-{
- return m_parent->m_mainHandler->compoundById(m_id.utf8());
-}
-
-//----------------------------------------------------------------------------
-
-class CompoundErrorHandler : public QXmlErrorHandler
-{
- public:
- virtual ~CompoundErrorHandler() {}
- bool warning( const QXmlParseException & )
- {
- return FALSE;
- }
- bool error( const QXmlParseException & )
- {
- return FALSE;
- }
- bool fatalError( const QXmlParseException &exception )
- {
- debug(1,"Fatal error at line %d column %d: %s\n",
- exception.lineNumber(),exception.columnNumber(),
- exception.message().data());
- return FALSE;
- }
- QString errorString() { return ""; }
-
- private:
- QString errorMsg;
-};
-
-//----------------------------------------------------------------------------
-
-class CompoundTypeMap
-{
- public:
- CompoundTypeMap()
- {
- m_map.setAutoDelete(TRUE);
- m_map.insert("class", new int(ICompound::Class));
- m_map.insert("struct", new int(ICompound::Struct));
- m_map.insert("union", new int(ICompound::Union));
- m_map.insert("interface",new int(ICompound::Interface));
- m_map.insert("protocol", new int(ICompound::Protocol));
- m_map.insert("category", new int(ICompound::Category));
- m_map.insert("exception",new int(ICompound::Exception));
- m_map.insert("file", new int(ICompound::File));
- m_map.insert("namespace",new int(ICompound::Namespace));
- m_map.insert("group", new int(ICompound::Group));
- m_map.insert("page", new int(ICompound::Page));
- m_map.insert("example", new int(ICompound::Example));
- m_map.insert("dir", new int(ICompound::Dir));
- }
- virtual ~CompoundTypeMap()
- {
- }
- ICompound::CompoundKind map(const QString &s)
- {
- int *val = m_map.find(s.utf8());
- if (val==0)
- {
- debug(1,"Warning: '%s' is an invalid compound type\n",s.data());
- return ICompound::Invalid;
- }
- else return (ICompound::CompoundKind)*val;
- }
- private:
- QDict<int> m_map;
-};
-
-static CompoundTypeMap *s_typeMap;
-
-void compoundhandler_init()
-{
- s_typeMap = new CompoundTypeMap;
-}
-
-void compoundhandler_exit()
-{
- delete s_typeMap;
-}
-
-//----------------------------------------------------------------------------
-
-CompoundHandler::CompoundHandler(const QString &xmlDir)
- : m_titleHandler(0),
- m_includeDependencyGraph(0),
- m_includedByDependencyGraph(0),
- m_templateParamList(0),
- m_brief(0),
- m_detailed(0),
- m_inheritanceGraph(0),
- m_collaborationGraph(0),
- m_programListing(0),
- m_members(0),
- m_xmlDir(xmlDir),
- m_refCount(1),
- m_memberDict(257),
- m_memberNameDict(257),
- m_mainHandler(0)
-{
- m_superClasses.setAutoDelete(TRUE);
- m_subClasses.setAutoDelete(TRUE);
- m_sections.setAutoDelete(TRUE);
- m_memberNameDict.setAutoDelete(TRUE);
- m_innerCompounds.setAutoDelete(TRUE);
- m_includes.setAutoDelete(TRUE);
- m_includedBy.setAutoDelete(TRUE);
-
- addStartHandler("doxygen");
- addEndHandler("doxygen");
-
- addStartHandler("compounddef",this,&CompoundHandler::startCompound);
- addEndHandler("compounddef",this,&CompoundHandler::endCompound);
-
- addStartHandler("compoundname");
- addEndHandler("compoundname",this,&CompoundHandler::endCompoundName);
-
- addStartHandler("title",this,&CompoundHandler::startTitle);
-
- addStartHandler("basecompoundref",this,&CompoundHandler::startSuperClass);
- addEndHandler("basecompoundref",this,&CompoundHandler::endSuperClass);
-
- addStartHandler("derivedcompoundref",this,&CompoundHandler::startSubClass);
- addEndHandler("derivedcompoundref",this,&CompoundHandler::endSubClass);
-
- addStartHandler("includes",this,&CompoundHandler::startIncludes);
- addStartHandler("includedby",this,&CompoundHandler::startIncludedBy);
-
- addStartHandler("incdepgraph",this,&CompoundHandler::startIncludeDependencyGraph);
-
- addStartHandler("invincdepgraph",this,&CompoundHandler::startIncludedByDependencyGraph);
-
- addStartHandler("innerdir",this,&CompoundHandler::startInnerDir);
- addEndHandler("innerdir");
-
- addStartHandler("innerfile",this,&CompoundHandler::startInnerFile);
- addEndHandler("innerfile");
-
- addStartHandler("innerclass",this,&CompoundHandler::startInnerClass);
- addEndHandler("innerclass");
-
- addStartHandler("innernamespace",this,&CompoundHandler::startInnerNamespace);
- addEndHandler("innernamespace");
-
- addStartHandler("innerpage",this,&CompoundHandler::startInnerPage);
- addEndHandler("innerpage");
-
- addStartHandler("innergroup",this,&CompoundHandler::startInnerGroup);
- addEndHandler("innergroup");
-
- addStartHandler("templateparamlist",this,&CompoundHandler::startTemplateParamList);
-
- addStartHandler("sectiondef",this,&CompoundHandler::startSection);
-
- addStartHandler("briefdescription",this,&CompoundHandler::startBriefDesc);
-
- addStartHandler("detaileddescription",this,&CompoundHandler::startDetailedDesc);
-
- addStartHandler("inheritancegraph",this,&CompoundHandler::startInheritanceGraph);
-
- addStartHandler("collaborationgraph",this,&CompoundHandler::startCollaborationGraph);
-
- addStartHandler("programlisting",this,&CompoundHandler::startProgramListing);
-
- addStartHandler("location",this,&CompoundHandler::startLocation);
- addEndHandler("location");
-
- addStartHandler("listofallmembers",this,&CompoundHandler::startListOfAllMembers);
-}
-
-CompoundHandler::~CompoundHandler()
-{
- debug(2,"CompoundHandler::~CompoundHandler()\n");
- delete m_titleHandler;
- delete m_brief;
- delete m_detailed;
- delete m_programListing;
- delete m_inheritanceGraph;
- delete m_collaborationGraph;
- delete m_includeDependencyGraph;
- delete m_includedByDependencyGraph;
- delete m_templateParamList;
- delete m_members;
-}
-
-void CompoundHandler::startSection(const QXmlAttributes& attrib)
-{
- SectionHandler *sectHandler = new SectionHandler(this);
- sectHandler->startSection(attrib);
- m_sections.append(sectHandler);
-}
-
-void CompoundHandler::startBriefDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_brief = docHandler;
-}
-
-void CompoundHandler::startDetailedDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_detailed = docHandler;
-}
-
-void CompoundHandler::startProgramListing(const QXmlAttributes& attrib)
-{
- ProgramListingHandler *plHandler = new ProgramListingHandler(this);
- plHandler->startProgramListing(attrib);
- m_programListing = plHandler;
-}
-
-void CompoundHandler::startIncludes(const QXmlAttributes& attrib)
-{
- IncludeHandler *inc = new IncludeHandler(this,"includes");
- m_includes.append(inc);
- inc->startInclude(attrib);
-}
-
-void CompoundHandler::startIncludedBy(const QXmlAttributes& attrib)
-{
- IncludeHandler *inc = new IncludeHandler(this,"includedby");
- m_includedBy.append(inc);
- inc->startInclude(attrib);
-}
-
-void CompoundHandler::startCompound(const QXmlAttributes& attrib)
-{
- m_id = attrib.value("id");
- m_kindString = attrib.value("kind");
- m_kind = s_typeMap->map(m_kindString);
- m_protection = attrib.value("prot");
- debug(2,"startCompound(id='%s' type='%s')\n",m_id.data(),m_kindString.data());
-}
-
-void CompoundHandler::endCompound()
-{
- debug(2,"endCompound()\n");
-}
-
-void CompoundHandler::startLocation(const QXmlAttributes& attrib)
-{
- m_defFile = attrib.value("file");
- m_defLine = attrib.value("line").toInt();
- m_defBodyFile = attrib.value("bodyfile");
- m_defBodyStart = attrib.value("bodystart").toInt();
- m_defBodyEnd = attrib.value("bodyend").toInt();
-}
-
-void CompoundHandler::endCompoundName()
-{
- m_name = m_curString.stripWhiteSpace();
- debug(2,"Compound name '%s'\n",m_name.data());
-}
-
-void CompoundHandler::startInnerClass(const QXmlAttributes& attrib)
-{
- m_innerCompounds.append(new QString(attrib.value("refid")));
-}
-
-void CompoundHandler::startInnerNamespace(const QXmlAttributes& attrib)
-{
- m_innerCompounds.append(new QString(attrib.value("refid")));
-}
-
-void CompoundHandler::startInnerFile(const QXmlAttributes& attrib)
-{
- m_innerCompounds.append(new QString(attrib.value("refid")));
-}
-
-void CompoundHandler::startInnerGroup(const QXmlAttributes& attrib)
-{
- m_innerCompounds.append(new QString(attrib.value("refid")));
-}
-
-void CompoundHandler::startInnerPage(const QXmlAttributes& attrib)
-{
- m_innerCompounds.append(new QString(attrib.value("refid")));
-}
-
-void CompoundHandler::startInnerDir(const QXmlAttributes& attrib)
-{
- m_innerCompounds.append(new QString(attrib.value("refid")));
-}
-
-void CompoundHandler::startTemplateParamList(const QXmlAttributes& attrib)
-{
- m_templateParamList = new TemplateParamListHandler(this);
- m_templateParamList->startTemplateParamList(attrib);
-}
-
-void CompoundHandler::startListOfAllMembers(const QXmlAttributes& attrib)
-{
- m_members = new ListOfAllMembersHandler(this);
- m_members->startListOfAllMembers(attrib);
-}
-
-void CompoundHandler::startSuperClass(const QXmlAttributes& attrib)
-{
- IRelatedCompound::Protection prot = IRelatedCompound::Public;
- QString protString = attrib.value("prot");
- if (protString=="protected")
- {
- prot = IRelatedCompound::Protected;
- }
- else if (protString=="private")
- {
- prot = IRelatedCompound::Private;
- }
- IRelatedCompound::Kind kind = IRelatedCompound::Normal;
- QString kindString = attrib.value("virt");
- if (kindString=="virtual") kind = IRelatedCompound::Virtual;
-
- RelatedCompound *sc=new RelatedCompound(
- this,
- attrib.value("refid"),
- prot,
- kind
- );
- debug(2,"super class id='%s' prot='%s' virt='%s'\n",
- attrib.value("refid").data(),
- protString.data(),
- kindString.data());
- m_superClasses.append(sc);
- m_curString = "";
-}
-
-void CompoundHandler::endSuperClass()
-{
- m_superClasses.getLast()->setName(m_curString);
-}
-
-void CompoundHandler::startSubClass(const QXmlAttributes& attrib)
-{
- IRelatedCompound::Protection prot = IRelatedCompound::Public;
- QString protString = attrib.value("prot");
- if (protString=="protected") prot = IRelatedCompound::Protected;
- else if (protString=="private") prot = IRelatedCompound::Private;
-
- IRelatedCompound::Kind kind = IRelatedCompound::Normal;
- QString kindString = attrib.value("virt");
- if (kindString=="virtual") kind = IRelatedCompound::Virtual;
-
- RelatedCompound *sc = new RelatedCompound(
- this,
- attrib.value("refid"),
- prot,
- kind
- );
- debug(2,"sub class id='%s' prot='%s' virt='%s'\n",
- attrib.value("refid").data(),
- protString.data(),
- kindString.data());
- m_subClasses.append(sc);
- m_curString = "";
-}
-
-void CompoundHandler::endSubClass()
-{
- m_subClasses.getLast()->setName(m_curString);
-}
-
-void CompoundHandler::startTitle(const QXmlAttributes& attrib)
-{
- ASSERT(m_titleHandler==0);
- m_titleHandler = new TitleHandler(this);
- m_titleHandler->startTitle(attrib);
-}
-
-bool CompoundHandler::parseXML(const char *compId)
-{
- QFile xmlFile(m_xmlDir+"/"+compId+".xml");
- if (!xmlFile.exists()) return FALSE;
- CompoundErrorHandler errorHandler;
- QXmlInputSource source( xmlFile );
- QXmlSimpleReader reader;
- reader.setContentHandler( this );
- reader.setErrorHandler( &errorHandler );
- reader.parse( source );
- return TRUE;
-}
-
-void CompoundHandler::initialize(MainHandler *mh)
-{
- m_mainHandler = mh;
- QListIterator<SectionHandler> msi(m_sections);
- SectionHandler *sec;
- for (;(sec=msi.current());++msi)
- {
- sec->initialize(this);
- }
- if (m_members)
- {
- m_members->initialize(mh);
- }
-}
-
-void CompoundHandler::insertMember(MemberHandler *mh)
-{
- m_memberDict.insert(mh->id()->latin1(),mh);
- mh->initialize(m_mainHandler);
- QList<MemberHandler> *mhl = m_memberNameDict.find(mh->id()->latin1());
- if (mhl==0)
- {
- mhl = new QList<MemberHandler>;
- m_memberNameDict.insert(mh->name()->latin1(),mhl);
- }
- mhl->append(mh);
-}
-
-ICompound *CompoundHandler::toICompound() const
-{
- switch (m_kind)
- {
- case ICompound::Class: return (IClass *)this;
- case ICompound::Struct: return (IStruct *)this;
- case ICompound::Union: return (IUnion *)this;
- case ICompound::Interface: return (IInterface *)this;
- case ICompound::Protocol: return (IClass *)this;
- case ICompound::Category: return (IClass *)this;
- case ICompound::Exception: return (IException *)this;
- case ICompound::File: return (IFile *)this;
- case ICompound::Namespace: return (INamespace *)this;
- case ICompound::Group: return (IGroup *)this;
- case ICompound::Page: return (IPage *)this;
- case ICompound::Example: return (IPage *)this;
- case ICompound::Dir: return (IDir *)this;
- default: return 0;
- }
- return 0;
-}
-
-void CompoundHandler::release()
-{
- debug(2,"CompoundHandler::release() %d->%d\n",m_refCount,m_refCount-1);
- if (--m_refCount<=0)
- {
- m_mainHandler->unloadCompound(this);
- delete this;
- }
-}
-
-ISectionIterator *CompoundHandler::sections() const
-{
- return new SectionIterator(m_sections);
-}
-
-IMemberIterator *CompoundHandler::memberByName(const char *name) const
-{
- QList<MemberHandler> *ml = m_memberNameDict[name];
- if (ml==0) return 0;
- return new MemberIterator(*ml);
-}
-
-void CompoundHandler::startInheritanceGraph(const QXmlAttributes &attrib)
-{
- m_inheritanceGraph = new GraphHandler(this,"inheritancegraph");
- m_inheritanceGraph->startGraph(attrib);
-}
-
-void CompoundHandler::startCollaborationGraph(const QXmlAttributes &attrib)
-{
- m_collaborationGraph = new GraphHandler(this,"collaborationgraph");
- m_collaborationGraph->startGraph(attrib);
-}
-
-void CompoundHandler::startIncludeDependencyGraph(const QXmlAttributes &attrib)
-{
- m_includeDependencyGraph = new GraphHandler(this,"incdepgraph");
- m_includeDependencyGraph->startGraph(attrib);
-}
-
-void CompoundHandler::startIncludedByDependencyGraph(const QXmlAttributes &attrib)
-{
- m_includedByDependencyGraph = new GraphHandler(this,"invincdepgraph");
- m_includedByDependencyGraph->startGraph(attrib);
-}
-
-IDocRoot *CompoundHandler::briefDescription() const
-{
- return m_brief;
-}
-
-IDocRoot *CompoundHandler::detailedDescription() const
-{
- return m_detailed;
-}
-
-IMember *CompoundHandler::memberById(const char *id) const
-{
- return (IFunction*)m_memberDict[id];
-}
-
-IGraph *CompoundHandler::inheritanceGraph() const
-{
- return m_inheritanceGraph;
-}
-
-IGraph *CompoundHandler::collaborationGraph() const
-{
- return m_collaborationGraph;
-}
-
-IGraph *CompoundHandler::includeDependencyGraph() const
-{
- return m_includeDependencyGraph;
-}
-
-IGraph *CompoundHandler::includedByDependencyGraph() const
-{
- return m_includedByDependencyGraph;
-}
-
-IRelatedCompoundIterator *CompoundHandler::baseCompounds() const
-{
- return new RelatedCompoundIterator(m_superClasses);
-}
-
-IRelatedCompoundIterator *CompoundHandler::derivedCompounds() const
-{
- return new RelatedCompoundIterator(m_subClasses);
-}
-
-ICompoundIterator *CompoundHandler::nestedCompounds() const
-{
- return new CompoundIdIterator(m_mainHandler,m_innerCompounds);
-}
-
-IDocProgramListing *CompoundHandler::source() const
-{
- return m_programListing;
-}
-
-IIncludeIterator *CompoundHandler::includes() const
-{
- return new IncludeIterator(m_includes);
-}
-
-IIncludeIterator *CompoundHandler::includedBy() const
-{
- return new IncludeIterator(m_includedBy);
-}
-
-IParamIterator *CompoundHandler::templateParameters() const
-{
- return m_templateParamList ? m_templateParamList->templateParams() : 0;
-}
-
-const IDocTitle *CompoundHandler::title() const
-{
- return m_titleHandler;
-}
-
-IMemberReferenceIterator *CompoundHandler::members() const
-{
- return m_members ? m_members->members() : 0;
-}
-
-
diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h
deleted file mode 100644
index 6f191dc..0000000
--- a/addon/doxmlparser/src/compoundhandler.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-#ifndef _COMPOUNDHANDLER_H
-#define _COMPOUNDHANDLER_H
-
-#include <qstring.h>
-#include <qlist.h>
-#include <qxml.h>
-#include <doxmlintf.h>
-
-#include "stringimpl.h"
-#include "basehandler.h"
-#include "baseiterator.h"
-
-class MainHandler;
-class DocHandler;
-class ProgramListingHandler;
-class GraphHandler;
-class MemberHandler;
-class CompoundHandler;
-class SectionHandler;
-class ParamHandler;
-class TemplateParamListHandler;
-class TitleHandler;
-class ListOfAllMembersHandler;
-
-class IncludeHandler : public IInclude, public BaseHandler<IncludeHandler>
-{
- public:
- IncludeHandler(IBaseHandler *parent,const char *endtag);
- virtual ~IncludeHandler();
-
- void startInclude(const QXmlAttributes &attrib);
- void endInclude();
-
- // IInclude
- virtual const IString * name() const
- { return &m_name; }
- virtual const IString * refId() const
- { return &m_refId; }
- virtual bool isLocal() const
- { return m_isLocal; }
-
- private:
- IBaseHandler *m_parent = 0;
- StringImpl m_name; // element's content
- StringImpl m_refId; // refid
- bool m_isLocal = false; // local
-};
-
-class IncludeIterator : public BaseIterator<IIncludeIterator,IInclude,IncludeHandler>
-{
- public:
- IncludeIterator(const QList<IncludeHandler> &list) :
- BaseIterator<IIncludeIterator,IInclude,IncludeHandler>(list) {}
-};
-
-
-class RelatedCompound : public IRelatedCompound
-{
- public:
- RelatedCompound(CompoundHandler *parent,
- const QString &id,
- Protection prot,
- Kind kind
- ) :
- m_parent(parent), m_id(id), m_protection(prot), m_kind(kind) {}
- virtual ~RelatedCompound() {}
- void setName(const QString &str) { m_name = str; }
-
- virtual ICompound *compound() const;
- virtual Protection protection() const { return m_protection; }
- virtual Kind kind() const { return m_kind; }
- virtual const IString *name() const { return &m_name; }
-
- private:
- CompoundHandler *m_parent = 0;
- QString m_id; // refid
- Protection m_protection = Public; // prot
- Kind m_kind = Normal; // virt
- StringImpl m_name; // element's content
-};
-
-class RelatedCompoundIterator : public BaseIterator<IRelatedCompoundIterator,IRelatedCompound,RelatedCompound>
-{
- public:
- RelatedCompoundIterator(const QList<RelatedCompound> &list) :
- BaseIterator<IRelatedCompoundIterator,IRelatedCompound,RelatedCompound>(list) {}
-};
-
-
-class CompoundHandler : public IClass,
- public IStruct,
- public IUnion,
- public IException,
- public IInterface,
- public INamespace,
- public IFile,
- public IGroup,
- public IPage,
- public IDir,
- public BaseHandler<CompoundHandler>
-{
- friend class RelatedCompound;
-
- public:
- virtual void startSection(const QXmlAttributes& attrib);
- virtual void startCompound(const QXmlAttributes& attrib);
- virtual void startSuperClass(const QXmlAttributes& attrib);
- virtual void endSuperClass();
- virtual void startSubClass(const QXmlAttributes& attrib);
- virtual void endSubClass();
- virtual void endCompound();
- virtual void endCompoundName();
- virtual void startBriefDesc(const QXmlAttributes& attrib);
- virtual void startDetailedDesc(const QXmlAttributes& attrib);
- virtual void startLocation(const QXmlAttributes& attrib);
- virtual void startProgramListing(const QXmlAttributes& attrib);
- virtual void startInheritanceGraph(const QXmlAttributes& attrib);
- virtual void startCollaborationGraph(const QXmlAttributes& attrib);
- virtual void startIncludeDependencyGraph(const QXmlAttributes& attrib);
- virtual void startIncludedByDependencyGraph(const QXmlAttributes& attrib);
- virtual void startIncludes(const QXmlAttributes& attrib);
- virtual void startIncludedBy(const QXmlAttributes& attrib);
- virtual void startInnerDir(const QXmlAttributes& attrib);
- virtual void startInnerClass(const QXmlAttributes& attrib);
- virtual void startInnerNamespace(const QXmlAttributes& attrib);
- virtual void startInnerFile(const QXmlAttributes& attrib);
- virtual void startInnerGroup(const QXmlAttributes& attrib);
- virtual void startInnerPage(const QXmlAttributes& attrib);
- virtual void startTitle(const QXmlAttributes& attrib);
- virtual void startTemplateParamList(const QXmlAttributes& attrib);
- virtual void startListOfAllMembers(const QXmlAttributes& attrib);
- virtual void addref() { m_refCount++; }
-
- CompoundHandler(const QString &dirName);
- virtual ~CompoundHandler();
- bool parseXML(const char *compId);
- void initialize(MainHandler *mh);
- void insertMember(MemberHandler *mh);
- ICompound *toICompound() const;
-
- // ICompound implementation
- const IString *name() const { return &m_name; }
- const IString *id() const { return &m_id; }
- CompoundKind kind() const { return m_kind; }
- const IString *kindString() const { return &m_kindString; }
- ISectionIterator *sections() const;
- IDocRoot *briefDescription() const;
- IDocRoot *detailedDescription() const;
- IMember *memberById(const char *id) const;
- IMemberIterator *memberByName(const char *name) const;
- IParamIterator *templateParameters() const;
- void release();
-
- // IClass implementation
- IGraph *inheritanceGraph() const;
- IGraph *collaborationGraph() const;
- IRelatedCompoundIterator *baseCompounds() const;
- IRelatedCompoundIterator *derivedCompounds() const;
- ICompoundIterator *nestedCompounds() const;
- ICompoundIterator *nestedGroup() const;
- const IString *locationFile() const { return &m_defFile; }
- int locationLine() const { return m_defLine; }
- const IString *locationBodyFile() const { return &m_defBodyFile; }
- int locationBodyStartLine() const { return m_defBodyStart; }
- int locationBodyEndLine() const { return m_defBodyEnd; }
- IMemberReferenceIterator *members() const;
-
- // IFile implementation
- IGraph *includeDependencyGraph() const;
- IGraph *includedByDependencyGraph() const;
- IDocProgramListing *source() const;
- IIncludeIterator *includes() const;
- IIncludeIterator *includedBy() const;
-
- // IPage implementation
- const IDocTitle *title() const;
-
- private:
- // XML elements:
- // -------------
- StringImpl m_name; // compoundname
- TitleHandler* m_titleHandler = 0; // title
- QList<RelatedCompound> m_subClasses; // basecompoundref
- QList<RelatedCompound> m_superClasses; // derivedcompoundref
- QList<IncludeHandler> m_includes; // includes
- QList<IncludeHandler> m_includedBy; // includedBy
- GraphHandler* m_includeDependencyGraph = 0;// incdepgraph
- GraphHandler* m_includedByDependencyGraph = 0; // invincdepgraph
- QList<QString> m_innerCompounds; // innerdir/innerfile/innerclass/innernamespace/innergroup
- TemplateParamListHandler* m_templateParamList; // templateparamlist
- QList<SectionHandler> m_sections; // sectiondef
- DocHandler* m_brief = 0; // briefdescription
- DocHandler* m_detailed = 0; // detaileddescription
- GraphHandler* m_inheritanceGraph = 0; // inheritancegraph
- GraphHandler* m_collaborationGraph = 0; // collaborationgraph
- ProgramListingHandler* m_programListing = 0; // programlisting
- // location
- StringImpl m_defFile; // - file
- int m_defLine = 0; // - line
- StringImpl m_defBodyFile; // - bodyfile
- int m_defBodyStart = 0; // - bodystart
- int m_defBodyEnd = 0; // - bodyend
- ListOfAllMembersHandler* m_members = 0; // listofallmember
-
- // XML attributes:
- // ---------------
- StringImpl m_id; // id
- CompoundKind m_kind = Invalid; // kind
- StringImpl m_kindString; // kind as a string
- StringImpl m_protection; // prot
-
- // local variables
- QString m_xmlDir; // directory where the info is found
- int m_refCount = 0; // object reference counter
- QDict<MemberHandler> m_memberDict; // id->member lookup
- QDict<QList<MemberHandler> > m_memberNameDict; // name->memberlist lookup
- MainHandler* m_mainHandler = 0; // parent object
-};
-
-void compoundhandler_init();
-void compoundhandler_exit();
-
-#endif
diff --git a/addon/doxmlparser/src/debug.cpp b/addon/doxmlparser/src/debug.cpp
deleted file mode 100644
index a8be32c..0000000
--- a/addon/doxmlparser/src/debug.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#include "debug.h"
-
-static int s_debugLevel = 0;
-
-void debug(int level,const char *msg,...)
-{
- if (level<=s_debugLevel)
- {
- va_list args;
- va_start(args, msg);
- vfprintf(stderr, msg, args);
- va_end(args);
- }
-}
-
-void setDebugLevel(int level)
-{
- s_debugLevel = level;
-}
-
diff --git a/addon/doxmlparser/src/debug.h b/addon/doxmlparser/src/debug.h
deleted file mode 100644
index c77f7fe..0000000
--- a/addon/doxmlparser/src/debug.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _DEBUG_H
-#define _DEBUG_H
-
-void debug(int level,const char *msg,...);
-void setDebugLevel(int level);
-
-#endif
diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp
deleted file mode 100644
index ea1abf5..0000000
--- a/addon/doxmlparser/src/dochandler.cpp
+++ /dev/null
@@ -1,2240 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#include <qmap.h>
-
-#include "dochandler.h"
-#include "debug.h"
-#include "linkedtexthandler.h"
-
-
-//----------------------------------------------------------------------
-
-class TypeNameMapper
-{
- public:
- TypeNameMapper()
- {
- m_map.insert("see", SimpleSectHandler::See);
- m_map.insert("return", SimpleSectHandler::Return);
- m_map.insert("author", SimpleSectHandler::Author);
- m_map.insert("version", SimpleSectHandler::Version);
- m_map.insert("since", SimpleSectHandler::Since);
- m_map.insert("date", SimpleSectHandler::Date);
- m_map.insert("bug", SimpleSectHandler::Bug);
- m_map.insert("note", SimpleSectHandler::Note);
- m_map.insert("warning", SimpleSectHandler::Warning);
- m_map.insert("par", SimpleSectHandler::Par);
- m_map.insert("deprecated",SimpleSectHandler::Deprecated);
- m_map.insert("pre", SimpleSectHandler::Pre);
- m_map.insert("post", SimpleSectHandler::Post);
- m_map.insert("invariant", SimpleSectHandler::Invar);
- m_map.insert("remark", SimpleSectHandler::Remark);
- m_map.insert("attention", SimpleSectHandler::Attention);
- m_map.insert("todo", SimpleSectHandler::Todo);
- m_map.insert("test", SimpleSectHandler::Test);
- m_map.insert("rcs", SimpleSectHandler::RCS);
- m_map.insert("enumvalues",SimpleSectHandler::EnumValues);
- m_map.insert("examples", SimpleSectHandler::Examples);
- }
- SimpleSectHandler::Types stringToType(const QString &typeStr)
- {
- return m_map[typeStr];
- }
- private:
- QMap<QString,SimpleSectHandler::Types> m_map;
-};
-
-class HighlightMapper
-{
- public:
- HighlightMapper()
- {
- m_map.insert("comment", HighlightHandler::Comment);
- m_map.insert("keyword", HighlightHandler::Keyword);
- m_map.insert("keywordtype", HighlightHandler::KeywordType);
- m_map.insert("keywordflow", HighlightHandler::KeywordFlow);
- m_map.insert("charliteral", HighlightHandler::CharLiteral);
- m_map.insert("stringliteral", HighlightHandler::StringLiteral);
- m_map.insert("preprocessor", HighlightHandler::Preprocessor);
- }
- HighlightHandler::HighlightKind stringToKind(const QString &kindStr)
- {
- return m_map[kindStr];
- }
- private:
- QMap<QString,HighlightHandler::HighlightKind> m_map;
-};
-
-static TypeNameMapper *s_typeMapper;
-static HighlightMapper *s_highlightMapper;
-
-void dochandler_init()
-{
- s_typeMapper = new TypeNameMapper;
- s_highlightMapper = new HighlightMapper;
-}
-
-void dochandler_exit()
-{
- delete s_typeMapper;
- delete s_highlightMapper;
-}
-
-//----------------------------------------------------------------------
-// MarkupHandler
-//----------------------------------------------------------------------
-
-MarkupHandler::MarkupHandler(QList<DocImpl> &children,QString &curString)
- : m_children(children), m_curString(curString),
- m_curMarkup(IDocMarkup::Normal), m_headingLevel(0)
-{
- addStartHandler("bold",this,&MarkupHandler::startBold);
- addEndHandler("bold",this,&MarkupHandler::endBold);
-
- addStartHandler("emphasis",this,&MarkupHandler::startEmphasis);
- addEndHandler("emphasis",this,&MarkupHandler::endEmphasis);
-
- addStartHandler("computeroutput",this,&MarkupHandler::startComputerOutput);
- addEndHandler("computeroutput",this,&MarkupHandler::endComputerOutput);
-
- addStartHandler("center",this,&MarkupHandler::startCenter);
- addEndHandler("center",this,&MarkupHandler::endCenter);
-
- addStartHandler("small",this,&MarkupHandler::startSmallFont);
- addEndHandler("small",this,&MarkupHandler::endSmallFont);
-
- addStartHandler("subscript",this,&MarkupHandler::startSubscript);
- addEndHandler("subscript",this,&MarkupHandler::endSubscript);
-
- addStartHandler("superscript",this,&MarkupHandler::startSuperscript);
- addEndHandler("superscript",this,&MarkupHandler::endSuperscript);
-
- addStartHandler("preformatted",this,&MarkupHandler::startPreformatted);
- addEndHandler("preformatted",this,&MarkupHandler::endPreformatted);
-
- addStartHandler("heading1",this,&MarkupHandler::startHeading1);
- addEndHandler("heading1",this,&MarkupHandler::endHeading1);
-
- addStartHandler("heading2",this,&MarkupHandler::startHeading2);
- addEndHandler("heading2",this,&MarkupHandler::endHeading2);
-
- addStartHandler("heading3",this,&MarkupHandler::startHeading3);
- addEndHandler("heading3",this,&MarkupHandler::endHeading3);
-
- addStartHandler("heading4",this,&MarkupHandler::startHeading4);
- addEndHandler("heading4",this,&MarkupHandler::endHeading4);
-
- addStartHandler("heading5",this,&MarkupHandler::startHeading5);
- addEndHandler("heading5",this,&MarkupHandler::endHeading5);
-
- addStartHandler("heading6",this,&MarkupHandler::startHeading6);
- addEndHandler("heading6",this,&MarkupHandler::endHeading6);
-}
-
-MarkupHandler::~MarkupHandler()
-{
-}
-
-void MarkupHandler::addTextNode()
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(new TextNode(m_curString,m_curMarkup,m_headingLevel));
- debug(2,"addTextNode() text=%s markup=%x\n",m_curString.data(),m_curMarkup);
- m_curString="";
- }
-}
-
-void MarkupHandler::startBold(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Bold,TRUE));
- m_curMarkup |= IDocMarkup::Bold;
-}
-
-void MarkupHandler::endBold()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Bold,FALSE));
- m_curMarkup &= ~IDocMarkup::Bold;
-}
-
-void MarkupHandler::startEmphasis(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Emphasis,TRUE));
- m_curMarkup |= IDocMarkup::Emphasis;
-}
-
-void MarkupHandler::endEmphasis()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Emphasis,FALSE));
- m_curMarkup &= ~IDocMarkup::Emphasis;
-}
-
-void MarkupHandler::startComputerOutput(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::ComputerOutput,TRUE));
- m_curMarkup |= IDocMarkup::ComputerOutput;
-}
-
-void MarkupHandler::endComputerOutput()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::ComputerOutput,FALSE));
- m_curMarkup &= ~IDocMarkup::ComputerOutput;
-}
-
-void MarkupHandler::startCenter(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Center,TRUE));
- m_curMarkup |= IDocMarkup::Center;
-}
-
-void MarkupHandler::endCenter()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Center,FALSE));
- m_curMarkup &= ~IDocMarkup::Center;
-}
-
-void MarkupHandler::startSmallFont(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::SmallFont,TRUE));
- m_curMarkup |= IDocMarkup::SmallFont;
-}
-
-void MarkupHandler::endSmallFont()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::SmallFont,FALSE));
- m_curMarkup &= ~IDocMarkup::SmallFont;
-}
-
-void MarkupHandler::startSubscript(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Subscript,TRUE));
- m_curMarkup |= IDocMarkup::Subscript;
-}
-
-void MarkupHandler::endSubscript()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Subscript,FALSE));
- m_curMarkup &= ~IDocMarkup::Subscript;
-}
-
-void MarkupHandler::startSuperscript(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Superscript,TRUE));
- m_curMarkup |= IDocMarkup::Superscript;
-}
-
-void MarkupHandler::endSuperscript()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Superscript,FALSE));
- m_curMarkup &= ~IDocMarkup::Superscript;
-}
-
-void MarkupHandler::startPreformatted(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,TRUE));
- m_curMarkup |= IDocMarkup::Preformatted;
-}
-
-void MarkupHandler::endPreformatted()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,FALSE));
- m_curMarkup &= ~IDocMarkup::Preformatted;
-}
-
-void MarkupHandler::startHeading1(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,1));
- m_curMarkup |= IDocMarkup::Heading;
- m_headingLevel=1;
-}
-
-void MarkupHandler::endHeading1()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,1));
- m_curMarkup &= ~IDocMarkup::Heading;
- m_headingLevel=0;
-}
-
-void MarkupHandler::startHeading2(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,2));
- m_curMarkup |= IDocMarkup::Heading;
- m_headingLevel=2;
-}
-
-void MarkupHandler::endHeading2()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,2));
- m_curMarkup &= ~IDocMarkup::Heading;
- m_headingLevel=0;
-}
-
-void MarkupHandler::startHeading3(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,3));
- m_curMarkup |= IDocMarkup::Heading;
- m_headingLevel=3;
-}
-
-void MarkupHandler::endHeading3()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,3));
- m_curMarkup &= ~IDocMarkup::Heading;
- m_headingLevel=0;
-}
-
-void MarkupHandler::startHeading4(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,4));
- m_curMarkup |= IDocMarkup::Heading;
- m_headingLevel=4;
-}
-
-void MarkupHandler::endHeading4()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,4));
- m_curMarkup &= ~IDocMarkup::Heading;
- m_headingLevel=0;
-}
-
-void MarkupHandler::startHeading5(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,5));
- m_curMarkup |= IDocMarkup::Heading;
- m_headingLevel=5;
-}
-
-void MarkupHandler::endHeading5()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,5));
- m_curMarkup &= ~IDocMarkup::Heading;
- m_headingLevel=0;
-}
-
-void MarkupHandler::startHeading6(const QXmlAttributes & /*attrib*/)
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,6));
- m_curMarkup |= IDocMarkup::Heading;
- m_headingLevel=6;
-}
-
-void MarkupHandler::endHeading6()
-{
- addTextNode();
- m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,6));
- m_curMarkup &= ~IDocMarkup::Heading;
- m_headingLevel=0;
-}
-
-
-//----------------------------------------------------------------------
-// ListItemHandler
-//----------------------------------------------------------------------
-
-ListItemHandler::ListItemHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
-
- addEndHandler("listitem",this,&ListItemHandler::endListItem);
-
- addStartHandler("para",this,&ListItemHandler::startParagraph);
-}
-
-ListItemHandler::~ListItemHandler()
-{
-}
-
-void ListItemHandler::startListItem(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start list item handler\n");
-}
-
-void ListItemHandler::endListItem()
-{
- debug(2,"end list item handler\n");
- m_parent->setDelegate(0);
-}
-
-void ListItemHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ParagraphHandler *parHandler = new ParagraphHandler(this);
- parHandler->startParagraph(attrib);
- m_children.append(parHandler);
-}
-
-IDocIterator *ListItemHandler::contents() const
-{
- return new ListItemIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// OrderedListHandler
-//----------------------------------------------------------------------
-
-OrderedListHandler::OrderedListHandler(IBaseHandler *parent) : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("orderedlist",this,&OrderedListHandler::endOrderedList);
- addStartHandler("listitem",this,&OrderedListHandler::startOrderedListItem);
-}
-
-OrderedListHandler::~OrderedListHandler()
-{
-}
-
-void OrderedListHandler::startOrderedList(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
-}
-
-void OrderedListHandler::endOrderedList()
-{
- m_parent->setDelegate(0);
-}
-
-void OrderedListHandler::startOrderedListItem(const QXmlAttributes& attrib)
-{
- ListItemHandler *liHandler = new ListItemHandler(this);
- liHandler->startListItem(attrib);
- m_children.append(liHandler);
-}
-
-IDocIterator *OrderedListHandler::elements() const
-{
- return new OrderedListIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// ItemizedListHandler
-//----------------------------------------------------------------------
-
-ItemizedListHandler::ItemizedListHandler(IBaseHandler *parent) : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("itemizedlist",this,&ItemizedListHandler::endItemizedList);
- addStartHandler("listitem",this,&ItemizedListHandler::startItemizedListItem);
-}
-
-ItemizedListHandler::~ItemizedListHandler()
-{
-}
-
-void ItemizedListHandler::startItemizedList(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
-}
-
-void ItemizedListHandler::endItemizedList()
-{
- m_parent->setDelegate(0);
-}
-
-void ItemizedListHandler::startItemizedListItem(const QXmlAttributes& attrib)
-{
- ListItemHandler *liHandler = new ListItemHandler(this);
- liHandler->startListItem(attrib);
- m_children.append(liHandler);
-}
-
-IDocIterator *ItemizedListHandler::elements() const
-{
- return new ItemizedListIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// TocListHandler
-//----------------------------------------------------------------------
-
-TocListHandler::TocListHandler(IBaseHandler *parent) : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("toclist",this,&TocListHandler::endTocList);
- addStartHandler("tocitem",this,&TocListHandler::startTocItem);
-}
-
-TocListHandler::~TocListHandler()
-{
-}
-
-void TocListHandler::startTocList(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
-}
-
-void TocListHandler::endTocList()
-{
- m_parent->setDelegate(0);
-}
-
-void TocListHandler::startTocItem(const QXmlAttributes& attrib)
-{
- TocItemHandler *tiHandler = new TocItemHandler(this);
- tiHandler->startTocItem(attrib);
- m_children.append(tiHandler);
-}
-
-IDocIterator *TocListHandler::elements() const
-{
- return new TocListIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// TocItemHandler
-//----------------------------------------------------------------------
-
-TocItemHandler::TocItemHandler(IBaseHandler *parent) : m_parent(parent)
-{
- addEndHandler("tocitem",this,&TocItemHandler::endTocItem);
-}
-
-TocItemHandler::~TocItemHandler()
-{
-}
-
-void TocItemHandler::startTocItem(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- m_id = attrib.value("id");
- m_curString="";
-}
-
-void TocItemHandler::endTocItem()
-{
- m_title = m_curString;
- m_parent->setDelegate(0);
-}
-
-//----------------------------------------------------------------------
-// ParameterHandler
-//----------------------------------------------------------------------
-
-ParameterHandler::ParameterHandler(IBaseHandler *parent) :
- m_parent(parent)
-{
- addEndHandler("parametername",this,&ParameterHandler::endParameterName);
-}
-
-ParameterHandler::~ParameterHandler()
-{
-}
-
-void ParameterHandler::startParameterName(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
-}
-
-void ParameterHandler::endParameterName()
-{
- m_name = m_curString;
- debug(2,"parameter %s\n",m_name.data());
- m_curString="";
- m_parent->setDelegate(0);
-}
-
-//----------------------------------------------------------------------
-// ParameterListHandler
-//----------------------------------------------------------------------
-
-ParameterItemHandler::ParameterItemHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("parameteritem",this,&ParameterItemHandler::endParameterItem);
- addStartHandler("parameternamelist");
- addEndHandler("parameternamelist");
- addStartHandler("parametername",this,&ParameterItemHandler::startParameterName);
- addStartHandler("parameterdescription");
- addEndHandler("parameterdescription");
- addStartHandler("para",this,&ParameterItemHandler::startParagraph);
- m_parameters.setAutoDelete(TRUE);
- m_description = 0;
-}
-
-ParameterItemHandler::~ParameterItemHandler()
-{
- delete m_description;
-}
-
-void ParameterItemHandler::startParameterItem(const QXmlAttributes&)
-{
- m_parent->setDelegate(this);
-}
-
-void ParameterItemHandler::endParameterItem()
-{
- m_parent->setDelegate(0);
-}
-
-void ParameterItemHandler::startParameterName(const QXmlAttributes& attrib)
-{
- ParameterHandler *param = new ParameterHandler(this);
- m_parameters.append(param);
- param->startParameterName(attrib);
-}
-
-void ParameterItemHandler::startParagraph(const QXmlAttributes& attrib)
-{
- m_description = new ParagraphHandler(this);
- m_description->startParagraph(attrib);
-}
-
-IDocIterator *ParameterItemHandler::paramNames() const
-{
- return new ParameterItemIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// ParameterListHandler
-//----------------------------------------------------------------------
-
-ParameterListHandler::ParameterListHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("parameterlist",this,&ParameterListHandler::endParameterList);
- addStartHandler("parameteritem",this,&ParameterListHandler::startParameterItem);
- m_paramItems.setAutoDelete(TRUE);
-}
-
-ParameterListHandler::~ParameterListHandler()
-{
-}
-
-void ParameterListHandler::startParameterList(const QXmlAttributes& attrib)
-{
- QString kind = attrib.value("kind");
- if (kind=="retval") m_type=RetVal;
- else if (kind=="exception") m_type=Exception;
- else if (kind=="param") m_type=Param;
- else
- {
- debug(1,"Error: invalid parameterlist type: %s\n",kind.data());
- }
- debug(2,"parameterlist kind=%s\n",kind.data());
- m_parent->setDelegate(this);
-}
-
-void ParameterListHandler::endParameterList()
-{
- m_parent->setDelegate(0);
-}
-
-void ParameterListHandler::startParameterItem(const QXmlAttributes& attrib)
-{
- ParameterItemHandler *paramItem = new ParameterItemHandler(this);
- m_paramItems.append(paramItem);
- paramItem->startParameterItem(attrib);
-}
-
-IDocIterator *ParameterListHandler::params() const
-{
- return new ParameterListIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// LinkHandler
-//----------------------------------------------------------------------
-
-LinkHandler::LinkHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("link",this,&LinkHandler::endLink);
-}
-
-LinkHandler::~LinkHandler()
-{
-}
-
-void LinkHandler::startLink(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- debug(2,"Start link\n");
- m_ref = attrib.value("linkend");
- m_curString="";
-}
-
-void LinkHandler::endLink()
-{
- m_text = m_curString;
- m_curString="";
- m_parent->setDelegate(0);
- debug(2,"End link\n");
-}
-
-//----------------------------------------------------------------------
-// EMailHandler
-//----------------------------------------------------------------------
-
-EMailHandler::EMailHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("email",this,&EMailHandler::endEMail);
-}
-
-EMailHandler::~EMailHandler()
-{
-}
-
-void EMailHandler::startEMail(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"Start email\n");
- m_curString="";
-}
-
-void EMailHandler::endEMail()
-{
- m_address = m_curString;
- m_curString="";
- m_parent->setDelegate(0);
- debug(2,"End email\n");
-}
-
-//----------------------------------------------------------------------
-// ULinkHandler
-//----------------------------------------------------------------------
-
-ULinkHandler::ULinkHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("ulink",this,&ULinkHandler::endULink);
-}
-
-ULinkHandler::~ULinkHandler()
-{
-}
-
-void ULinkHandler::startULink(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- debug(2,"Start ulink\n");
- m_url = attrib.value("url");
- m_curString="";
-}
-
-void ULinkHandler::endULink()
-{
- m_text = m_curString;
- m_curString="";
- m_parent->setDelegate(0);
- debug(2,"End ulink\n");
-}
-
-//----------------------------------------------------------------------
-// LineBreakHandler
-//----------------------------------------------------------------------
-
-LineBreakHandler::LineBreakHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("linebreak",this,&LineBreakHandler::endLineBreak);
-}
-
-LineBreakHandler::~LineBreakHandler()
-{
-}
-
-void LineBreakHandler::startLineBreak(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"Start linebreak\n");
-}
-
-void LineBreakHandler::endLineBreak()
-{
- m_parent->setDelegate(0);
- debug(2,"End linebreak\n");
-}
-
-//----------------------------------------------------------------------
-// HRulerHandler
-//----------------------------------------------------------------------
-
-HRulerHandler::HRulerHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("hruler",this,&HRulerHandler::endHRuler);
-}
-
-HRulerHandler::~HRulerHandler()
-{
-}
-
-void HRulerHandler::startHRuler(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"Start hruler\n");
-}
-
-void HRulerHandler::endHRuler()
-{
- m_parent->setDelegate(0);
- debug(2,"End hruler\n");
-}
-
-//----------------------------------------------------------------------
-// RefHandler
-//----------------------------------------------------------------------
-
-RefHandler::RefHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("ref",this,&RefHandler::endRef);
-}
-
-RefHandler::~RefHandler()
-{
-}
-
-void RefHandler::startRef(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- m_refId = attrib.value("refid");
- m_extId = attrib.value("external");
- ASSERT(attrib.value("kindref")=="compound" ||
- attrib.value("kindref")=="member");
- m_targetKind = attrib.value("kindref")=="compound" ? Compound : Member;
- debug(2,"Start ref refId=%s\n",m_refId.data());
- m_curString="";
-}
-
-void RefHandler::endRef()
-{
- m_linkText = m_curString;
- m_parent->setDelegate(0);
- debug(2,"End ref: text='%s'\n",m_linkText.data());
-}
-
-
-//----------------------------------------------------------------------
-// TitleHandler
-//----------------------------------------------------------------------
-
-TitleHandler::TitleHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- m_markupHandler = new MarkupHandler(m_children,m_curString);
- setFallBackHandler(m_markupHandler);
- addStartHandler("ref",this,&TitleHandler::startRef);
- addEndHandler("title",this,&TitleHandler::endTitle);
-}
-
-TitleHandler::~TitleHandler()
-{
- delete m_markupHandler;
-}
-
-void TitleHandler::startTitle(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"Start title\n");
- m_curString="";
-}
-
-void TitleHandler::endTitle()
-{
- addTextNode();
- m_parent->setDelegate(0);
- debug(2,"End title\n");
-}
-
-void TitleHandler::addTextNode()
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(
- new TextNode(
- m_curString,
- m_markupHandler->markup(),
- m_markupHandler->headingLevel()
- )
- );
- debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
- m_curString.data(),m_markupHandler->markup(),m_markupHandler->headingLevel());
- m_curString="";
- }
-}
-
-void TitleHandler::startRef(const QXmlAttributes& attrib)
-{
- RefHandler *ref = new RefHandler(this);
- ref->startRef(attrib);
- m_children.append(ref);
-}
-
-IDocIterator *TitleHandler::title() const
-{
- return new TitleIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// SimpleSectHandler
-//----------------------------------------------------------------------
-
-SimpleSectHandler::SimpleSectHandler(IBaseHandler *parent)
- : m_parent(parent), m_paragraph(0), m_title(0)
-{
- addStartHandler("title",this,&SimpleSectHandler::startTitle);
- addStartHandler("para",this,&SimpleSectHandler::startParagraph);
- addEndHandler("simplesect",this,&SimpleSectHandler::endSimpleSect);
-}
-
-SimpleSectHandler::~SimpleSectHandler()
-{
-}
-
-void SimpleSectHandler::startSimpleSect(const QXmlAttributes& attrib)
-{
- m_typeString = attrib.value("kind");
- m_type = s_typeMapper->stringToType(m_typeString);
- debug(2,"start simple section %s\n",m_typeString.data());
- m_parent->setDelegate(this);
-}
-
-void SimpleSectHandler::endSimpleSect()
-{
- debug(2,"end simple section\n");
- m_parent->setDelegate(0);
-}
-
-void SimpleSectHandler::startTitle(const QXmlAttributes& attrib)
-{
- ASSERT(m_title==0);
- m_title = new TitleHandler(this);
- m_title->startTitle(attrib);
-}
-
-void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ASSERT(m_paragraph==0);
- m_paragraph = new ParagraphHandler(this);
- m_paragraph->startParagraph(attrib);
-}
-
-//----------------------------------------------------------------------
-// VariableListEntryHandler
-//----------------------------------------------------------------------
-
-VariableListEntryHandler::VariableListEntryHandler(IBaseHandler *parent)
- : m_parent(parent), m_description(0), m_linkedTextHandler(0)
-{
- addStartHandler("term",this,&VariableListEntryHandler::startTerm);
- addEndHandler("term",this,&VariableListEntryHandler::endTerm);
- addStartHandler("para",this,&VariableListEntryHandler::startParagraph);
- addEndHandler("varlistentry",this,&VariableListEntryHandler::endVarListEntry);
- addEndHandler("listitem",this,&VariableListEntryHandler::endListItem);
-}
-
-VariableListEntryHandler::~VariableListEntryHandler()
-{
- delete m_description;
-}
-
-void VariableListEntryHandler::startVarListEntry(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start varlistentry\n");
-}
-
-void VariableListEntryHandler::endVarListEntry()
-{
- m_parent->setDelegate(0);
- debug(2,"end varlistentry\n");
-}
-
-void VariableListEntryHandler::startListItem(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start listitem\n");
-}
-
-void VariableListEntryHandler::endListItem()
-{
- m_parent->setDelegate(0);
- debug(2,"end listitem\n");
-}
-
-void VariableListEntryHandler::startTerm(const QXmlAttributes& /*attrib*/)
-{
- m_curString="";
- m_linkedTextHandler = new LinkedTextHandler(this,m_term);
- m_linkedTextHandler->start("term");
-}
-
-void VariableListEntryHandler::endTerm()
-{
- delete m_linkedTextHandler;
-}
-
-void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ASSERT(m_description==0);
- m_description = new ParagraphHandler(this);
- m_description->startParagraph(attrib);
-}
-
-ILinkedTextIterator *VariableListEntryHandler::term() const
-{
- return new LinkedTextIterator(m_term);
-}
-
-
-//----------------------------------------------------------------------
-// VariableListHandler
-//----------------------------------------------------------------------
-
-VariableListHandler::VariableListHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_entries.setAutoDelete(TRUE);
- addStartHandler("varlistentry",this,&VariableListHandler::startVarListEntry);
- addStartHandler("listitem",this,&VariableListHandler::startListItem);
- addEndHandler("variablelist",this,&VariableListHandler::endVariableList);
-}
-
-VariableListHandler::~VariableListHandler()
-{
-}
-
-void VariableListHandler::startVariableList(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start variablelist\n");
-}
-
-void VariableListHandler::endVariableList()
-{
- debug(2,"end variablelist\n");
- m_parent->setDelegate(0);
-}
-
-void VariableListHandler::startVarListEntry(const QXmlAttributes& attrib)
-{
- VariableListEntryHandler *vle = new VariableListEntryHandler(this);
- vle->startVarListEntry(attrib);
- m_curEntry = vle;
- m_entries.append(vle);
-}
-
-void VariableListHandler::startListItem(const QXmlAttributes& attrib)
-{
- ASSERT(m_curEntry!=0);
- m_curEntry->startListItem(attrib);
-}
-
-IDocIterator *VariableListHandler::entries() const
-{
- return new VariableListIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// HighlightHandler
-//----------------------------------------------------------------------
-
-HighlightHandler::HighlightHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("highlight",this,&HighlightHandler::endHighlight);
- addStartHandler("ref",this,&HighlightHandler::startRef);
- addStartHandler("sp",this,&HighlightHandler::startSpace);
- m_hl = IDocHighlight::Invalid;
-}
-
-HighlightHandler::~HighlightHandler()
-{
-}
-
-void HighlightHandler::startHighlight(const QXmlAttributes& attrib)
-{
- m_hlString = attrib.value("class");
- m_hl = s_highlightMapper->stringToKind(m_hlString);
- m_curString="";
- m_parent->setDelegate(this);
- debug(2,"start highlight\n");
-}
-
-void HighlightHandler::endHighlight()
-{
- addTextNode();
- debug(2,"end highlight class='%s'\n",m_hlString.data());
- m_parent->setDelegate(0);
-}
-
-void HighlightHandler::startRef(const QXmlAttributes& attrib)
-{
- addTextNode();
- RefHandler *rh = new RefHandler(this);
- m_children.append(rh);
- rh->startRef(attrib);
-}
-
-void HighlightHandler::startSpace(const QXmlAttributes&)
-{
- m_curString=" ";
- addTextNode();
-}
-
-void HighlightHandler::addTextNode()
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(new TextNode(m_curString,IDocMarkup::Normal,0));
- debug(2,"addTextNode() text=\"%s\"\n",
- m_curString.data());
- m_curString="";
- }
-}
-
-IDocIterator *HighlightHandler::codeElements() const
-{
- return new HighlightIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// CodeLineHandler
-//----------------------------------------------------------------------
-
-CodeLineHandler::CodeLineHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("codeline",this,&CodeLineHandler::endCodeLine);
- addEndHandler("linenumber",this,&CodeLineHandler::endLineNumber);
- addStartHandler("highlight",this,&CodeLineHandler::startHighlight);
- addStartHandler("ref",this,&CodeLineHandler::startRef);
- m_lineNumber = 0;
-}
-
-CodeLineHandler::~CodeLineHandler()
-{
-}
-
-void CodeLineHandler::startCodeLine(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start codeline\n");
-}
-
-void CodeLineHandler::endCodeLine()
-{
- addTextNode();
- debug(2,"end codeline\n");
- m_parent->setDelegate(0);
-}
-
-void CodeLineHandler::startLineNumber(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- debug(2,"start linenumber\n");
- m_lineNumber = attrib.value("line").toInt();
- m_refId = attrib.value("refid");
-}
-
-void CodeLineHandler::endLineNumber()
-{
- m_parent->setDelegate(0);
-}
-
-void CodeLineHandler::startHighlight(const QXmlAttributes& attrib)
-{
- addTextNode();
- HighlightHandler *hlh = new HighlightHandler(this);
- m_children.append(hlh);
- hlh->startHighlight(attrib);
-}
-
-void CodeLineHandler::startRef(const QXmlAttributes& attrib)
-{
- addTextNode();
- RefHandler *rh = new RefHandler(this);
- m_children.append(rh);
- rh->startRef(attrib);
-}
-
-void CodeLineHandler::addTextNode()
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(new TextNode(m_curString,IDocMarkup::Normal,0));
- debug(2,"addTextNode() text=\"%s\"\n",
- m_curString.data());
- m_curString="";
- }
-}
-
-IDocIterator *CodeLineHandler::codeElements() const
-{
- return new CodeLineIterator(*this);
-}
-
-
-//----------------------------------------------------------------------
-// ProgramListingHandler
-//----------------------------------------------------------------------
-
-ProgramListingHandler::ProgramListingHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- m_hasLineNumber=FALSE;
- addEndHandler("programlisting",this,&ProgramListingHandler::endProgramListing);
-
- addStartHandler("linenumber",this,&ProgramListingHandler::startLineNumber);
- addStartHandler("codeline",this,&ProgramListingHandler::startCodeLine);
-}
-
-ProgramListingHandler::~ProgramListingHandler()
-{
-}
-
-void ProgramListingHandler::startProgramListing(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start programlisting\n");
-}
-
-void ProgramListingHandler::endProgramListing()
-{
- debug(2,"end programlisting\n");
- m_parent->setDelegate(0);
-}
-
-void ProgramListingHandler::startLineNumber(const QXmlAttributes& attrib)
-{
- CodeLineHandler *clh = new CodeLineHandler(this);
- m_children.append(clh);
- m_hasLineNumber=TRUE;
- clh->startLineNumber(attrib);
-}
-
-void ProgramListingHandler::startCodeLine(const QXmlAttributes& attrib)
-{
- CodeLineHandler *clh = 0;
- if (!m_hasLineNumber)
- {
- clh = new CodeLineHandler(this);
- m_children.append(clh);
- }
- else
- {
- clh = m_children.getLast();
- }
- ASSERT(clh!=0);
- clh->startCodeLine(attrib);
- m_hasLineNumber=FALSE;
-}
-
-IDocIterator *ProgramListingHandler::codeLines() const
-{
- return new ProgramListingIterator(*this);
-}
-
-
-
-//----------------------------------------------------------------------
-// FormulaHandler
-//----------------------------------------------------------------------
-
-FormulaHandler::FormulaHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("formula",this,&FormulaHandler::endFormula);
-}
-
-FormulaHandler::~FormulaHandler()
-{
-}
-
-void FormulaHandler::startFormula(const QXmlAttributes& attrib)
-{
- m_id = attrib.value("id");
- m_curString="";
- m_parent->setDelegate(this);
-}
-
-void FormulaHandler::endFormula()
-{
- m_text = m_curString;
- debug(2,"formula id='%s' text='%s'\n",m_id.data(),m_text.data());
- m_parent->setDelegate(0);
-}
-
-//----------------------------------------------------------------------
-// AnchorHandler
-//----------------------------------------------------------------------
-
-AnchorHandler::AnchorHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("anchor",this,&AnchorHandler::endAnchor);
-}
-
-AnchorHandler::~AnchorHandler()
-{
-}
-
-void AnchorHandler::startAnchor(const QXmlAttributes& attrib)
-{
- m_id = attrib.value("id");
- m_parent->setDelegate(this);
-}
-
-void AnchorHandler::endAnchor()
-{
- debug(2,"anchor id='%s'\n",m_id.data());
- m_parent->setDelegate(0);
-}
-
-//----------------------------------------------------------------------
-// ImageHandler
-//----------------------------------------------------------------------
-
-ImageHandler::ImageHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("image",this,&ImageHandler::endImage);
-}
-
-ImageHandler::~ImageHandler()
-{
-}
-
-void ImageHandler::startImage(const QXmlAttributes& attrib)
-{
- m_name = attrib.value("name");
- m_curString="";
- m_parent->setDelegate(this);
-}
-
-void ImageHandler::endImage()
-{
- m_caption = m_curString;
- debug(2,"image name='%s' caption='%s'\n",m_name.data(),m_caption.data());
- m_parent->setDelegate(0);
-}
-
-//----------------------------------------------------------------------
-// DotFileHandler
-//----------------------------------------------------------------------
-
-DotFileHandler::DotFileHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("dotfile",this,&DotFileHandler::endDotFile);
-}
-
-DotFileHandler::~DotFileHandler()
-{
-}
-
-void DotFileHandler::startDotFile(const QXmlAttributes& attrib)
-{
- m_name = attrib.value("name");
- m_curString="";
- m_parent->setDelegate(this);
-}
-
-void DotFileHandler::endDotFile()
-{
- m_caption = m_curString;
- debug(2,"image name='%s' caption='%s'\n",m_name.data(),m_caption.data());
- m_parent->setDelegate(0);
-}
-
-//----------------------------------------------------------------------
-// IndexEntryHandler
-//----------------------------------------------------------------------
-
-IndexEntryHandler::IndexEntryHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("indexentry",this,&IndexEntryHandler::endIndexEntry);
- addStartHandler("primaryie",this,&IndexEntryHandler::startPrimaryIE);
- addEndHandler("primaryie",this,&IndexEntryHandler::endPrimaryIE);
- addStartHandler("secondaryie",this,&IndexEntryHandler::startSecondaryIE);
- addEndHandler("secondaryie",this,&IndexEntryHandler::endSecondaryIE);
-}
-
-IndexEntryHandler::~IndexEntryHandler()
-{
-}
-
-void IndexEntryHandler::startIndexEntry(const QXmlAttributes& /*attrib*/)
-{
- debug(2,"start index entry\n");
- m_parent->setDelegate(this);
-}
-
-void IndexEntryHandler::endIndexEntry()
-{
- debug(2,"index entry primary='%s' secondary='%s'\n",
- m_primary.data(),m_secondary.data());
- m_parent->setDelegate(0);
-}
-
-void IndexEntryHandler::startPrimaryIE(const QXmlAttributes& /*attrib*/)
-{
- m_curString="";
-}
-
-void IndexEntryHandler::endPrimaryIE()
-{
- m_primary = m_curString;
-}
-
-void IndexEntryHandler::startSecondaryIE(const QXmlAttributes& /*attrib*/)
-{
- m_curString="";
-}
-
-void IndexEntryHandler::endSecondaryIE()
-{
- m_secondary = m_curString;
-}
-
-//----------------------------------------------------------------------
-// EntryHandler
-//----------------------------------------------------------------------
-
-EntryHandler::EntryHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("entry",this,&EntryHandler::endEntry);
- addStartHandler("para",this,&EntryHandler::startParagraph);
-}
-
-EntryHandler::~EntryHandler()
-{
-}
-
-void EntryHandler::startEntry(const QXmlAttributes&)
-{
- m_parent->setDelegate(this);
-}
-
-void EntryHandler::endEntry()
-{
- m_parent->setDelegate(0);
-}
-
-void EntryHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ParagraphHandler *ph = new ParagraphHandler(this);
- ph->startParagraph(attrib);
- m_children.append(ph);
-}
-
-IDocIterator *EntryHandler::contents() const
-{
- return new EntryIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// RowHandler
-//----------------------------------------------------------------------
-
-RowHandler::RowHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("row",this,&RowHandler::endRow);
- addStartHandler("entry",this,&RowHandler::startEntry);
-}
-
-RowHandler::~RowHandler()
-{
-}
-
-void RowHandler::startRow(const QXmlAttributes&)
-{
- m_parent->setDelegate(this);
-}
-
-void RowHandler::endRow()
-{
- m_parent->setDelegate(0);
-}
-
-void RowHandler::startEntry(const QXmlAttributes& attrib)
-{
- EntryHandler *eh = new EntryHandler(this);
- eh->startEntry(attrib);
- m_children.append(eh);
-}
-
-IDocIterator *RowHandler::entries() const
-{
- return new RowIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// TableHandler
-//----------------------------------------------------------------------
-
-TableHandler::TableHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("table",this,&TableHandler::endTable);
- addStartHandler("row",this,&TableHandler::startRow);
- addStartHandler("caption",this,&TableHandler::startCaption);
- addEndHandler("caption",this,&TableHandler::endCaption);
-}
-
-TableHandler::~TableHandler()
-{
-}
-
-void TableHandler::startTable(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- m_numColumns = attrib.value("cols").toInt();
- debug(2,"table cols=%d\n",m_numColumns);
-}
-
-void TableHandler::endTable()
-{
- m_parent->setDelegate(0);
-}
-
-void TableHandler::startRow(const QXmlAttributes& attrib)
-{
- RowHandler *rh = new RowHandler(this);
- rh->startRow(attrib);
- m_children.append(rh);
-}
-
-void TableHandler::startCaption(const QXmlAttributes& /*attrib*/)
-{
- m_curString="";
-}
-
-void TableHandler::endCaption()
-{
- m_caption = m_curString;
-}
-
-IDocIterator *TableHandler::rows() const
-{
- return new TableIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// CopyHandler
-//----------------------------------------------------------------------
-
-CopyHandler::CopyHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
-
- addEndHandler("copydoc",this,&CopyHandler::endCopy);
-
- addStartHandler("para",this,&CopyHandler::startParagraph);
-}
-
-CopyHandler::~CopyHandler()
-{
-}
-
-void CopyHandler::startCopy(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start copy handler\n");
-}
-
-void CopyHandler::endCopy()
-{
- debug(2,"end copy handler\n");
- m_parent->setDelegate(0);
-}
-
-void CopyHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ParagraphHandler *parHandler = new ParagraphHandler(this);
- parHandler->startParagraph(attrib);
- m_children.append(parHandler);
-}
-
-IDocIterator *CopyHandler::contents() const
-{
- return new CopyIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// VerbatimHandler
-//----------------------------------------------------------------------
-
-VerbatimHandler::VerbatimHandler(IBaseHandler *parent)
- : m_parent(parent), m_type(IDocVerbatim::Invalid)
-{
- addEndHandler("verbatim",this,&VerbatimHandler::endVerbatim);
- addEndHandler("latexonly",this,&VerbatimHandler::endVerbatim);
- addEndHandler("htmlonly",this,&VerbatimHandler::endVerbatim);
-}
-
-VerbatimHandler::~VerbatimHandler()
-{
-}
-
-void VerbatimHandler::startVerbatim(const QXmlAttributes&,Types type)
-{
- m_type = type;
- m_parent->setDelegate(this);
- m_curString="";
-}
-
-void VerbatimHandler::endVerbatim()
-{
- m_text = m_curString;
- m_parent->setDelegate(0);
-}
-
-
-//----------------------------------------------------------------------
-// SymbolHandler
-//----------------------------------------------------------------------
-
-SymbolHandler::SymbolHandler(IBaseHandler *parent,Types type)
- : m_parent(parent), m_letter('\0'), m_type(type)
-{
- addEndHandler("symbol");
- switch (type)
- {
- case IDocSymbol::Invalid: m_typeString="invalid"; break;
- case IDocSymbol::Umlaut: m_typeString="umlaut"; break;
- case IDocSymbol::Acute: m_typeString="acute"; break;
- case IDocSymbol::Grave: m_typeString="grave"; break;
- case IDocSymbol::Circ: m_typeString="circ"; break;
- case IDocSymbol::Tilde: m_typeString="tilde"; break;
- case IDocSymbol::Szlig: m_typeString="szlig"; break;
- case IDocSymbol::Cedil: m_typeString="cedil"; break;
- case IDocSymbol::Ring: m_typeString="ring"; break;
- case IDocSymbol::Nbsp: m_typeString="nbsp"; break;
- case IDocSymbol::Copy: m_typeString="copy"; break;
- }
-}
-
-SymbolHandler::~SymbolHandler()
-{
-}
-
-void SymbolHandler::startSymbol(const QXmlAttributes& attrib)
-{
- QString ls = attrib.value("char");
- if (!ls.isEmpty()) m_letter = ls.latin1()[0];
-}
-
-//----------------------------------------------------------------------
-// ParagraphHandler
-//----------------------------------------------------------------------
-
-ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
-
- m_markupHandler = new MarkupHandler(m_children,m_curString);
-
- // preformatted
- setFallBackHandler(m_markupHandler);
-
- addEndHandler("para",this,&ParagraphHandler::endParagraph);
-
- addStartHandler("linebreak",this,&ParagraphHandler::startLineBreak);
- addStartHandler("hruler",this,&ParagraphHandler::startHRuler);
- addStartHandler("programlisting",this,&ParagraphHandler::startProgramListing);
- addStartHandler("verbatim",this,&ParagraphHandler::startVerbatim);
- addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry);
- addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList);
- addStartHandler("itemizedlist",this,&ParagraphHandler::startItemizedList);
- addStartHandler("simplesect",this,&ParagraphHandler::startSimpleSect);
- // TODO: title
- addStartHandler("variablelist",this,&ParagraphHandler::startVariableList);
- addStartHandler("table",this,&ParagraphHandler::startTable);
- // TODO: heading
- addStartHandler("image",this,&ParagraphHandler::startImage);
- addStartHandler("dotfile",this,&ParagraphHandler::startDotFile);
- addStartHandler("toclist",this,&ParagraphHandler::startTocList);
- // TODO: language???
- addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList);
- // TODO: xrefsect
- addStartHandler("copydoc",this,&ParagraphHandler::startCopyDoc);
-
- addStartHandler("ref",this,&ParagraphHandler::startRef);
- addStartHandler("ulink",this,&ParagraphHandler::startULink);
- addStartHandler("email",this,&ParagraphHandler::startEMail);
- addStartHandler("link",this,&ParagraphHandler::startLink);
- addStartHandler("formula",this,&ParagraphHandler::startFormula);
- addStartHandler("latexonly",this,&ParagraphHandler::startHtmlOnly);
- addStartHandler("htmlonly",this,&ParagraphHandler::startLatexOnly);
- addStartHandler("umlaut",this,&ParagraphHandler::startUmlaut);
- addStartHandler("acute",this,&ParagraphHandler::startAcute);
- addStartHandler("grave",this,&ParagraphHandler::startGrave);
- addStartHandler("circ",this,&ParagraphHandler::startCirc);
- addStartHandler("tilde",this,&ParagraphHandler::startTilde);
- addStartHandler("szlig",this,&ParagraphHandler::startSzlig);
- addStartHandler("cedil",this,&ParagraphHandler::startCedil);
- addStartHandler("ring",this,&ParagraphHandler::startRing);
- addStartHandler("nbsp",this,&ParagraphHandler::startNbsp);
- addStartHandler("copy",this,&ParagraphHandler::startCopy);
- addStartHandler("anchor",this,&ParagraphHandler::startAnchor);
-}
-
-ParagraphHandler::~ParagraphHandler()
-{
- delete m_markupHandler;
-}
-
-void ParagraphHandler::startParagraph(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"para\n");
-}
-
-void ParagraphHandler::endParagraph()
-{
- addTextNode();
- debug(2,"end para\n");
- m_parent->setDelegate(0);
-}
-
-void ParagraphHandler::startItemizedList(const QXmlAttributes& attrib)
-{
- addTextNode();
- ItemizedListHandler *listHandler = new ItemizedListHandler(this);
- listHandler->startItemizedList(attrib);
- m_children.append(listHandler);
-}
-
-void ParagraphHandler::startOrderedList(const QXmlAttributes& attrib)
-{
- addTextNode();
- OrderedListHandler *listHandler = new OrderedListHandler(this);
- listHandler->startOrderedList(attrib);
- m_children.append(listHandler);
-}
-
-void ParagraphHandler::startParameterList(const QXmlAttributes& attrib)
-{
- addTextNode();
- ParameterListHandler *listHandler = new ParameterListHandler(this);
- listHandler->startParameterList(attrib);
- m_children.append(listHandler);
-}
-
-void ParagraphHandler::startSimpleSect(const QXmlAttributes& attrib)
-{
- addTextNode();
- SimpleSectHandler *sectHandler = new SimpleSectHandler(this);
- sectHandler->startSimpleSect(attrib);
- m_children.append(sectHandler);
-}
-
-void ParagraphHandler::startRef(const QXmlAttributes& attrib)
-{
- addTextNode();
- RefHandler *ref = new RefHandler(this);
- ref->startRef(attrib);
- m_children.append(ref);
-}
-
-void ParagraphHandler::startVariableList(const QXmlAttributes& attrib)
-{
- addTextNode();
- VariableListHandler *vl = new VariableListHandler(this);
- vl->startVariableList(attrib);
- m_children.append(vl);
-}
-
-void ParagraphHandler::startHRuler(const QXmlAttributes& attrib)
-{
- addTextNode();
- HRulerHandler *hr = new HRulerHandler(this);
- hr->startHRuler(attrib);
- m_children.append(hr);
-}
-
-void ParagraphHandler::startLineBreak(const QXmlAttributes& attrib)
-{
- addTextNode();
- LineBreakHandler *lb = new LineBreakHandler(this);
- lb->startLineBreak(attrib);
- m_children.append(lb);
-}
-
-void ParagraphHandler::startULink(const QXmlAttributes& attrib)
-{
- addTextNode();
- ULinkHandler *uh = new ULinkHandler(this);
- uh->startULink(attrib);
- m_children.append(uh);
-}
-
-void ParagraphHandler::startEMail(const QXmlAttributes& attrib)
-{
- addTextNode();
- EMailHandler *eh = new EMailHandler(this);
- eh->startEMail(attrib);
- m_children.append(eh);
-}
-
-void ParagraphHandler::startLink(const QXmlAttributes& attrib)
-{
- addTextNode();
- LinkHandler *lh = new LinkHandler(this);
- lh->startLink(attrib);
- m_children.append(lh);
-}
-
-void ParagraphHandler::startProgramListing(const QXmlAttributes& attrib)
-{
- addTextNode();
- ProgramListingHandler *pl = new ProgramListingHandler(this);
- pl->startProgramListing(attrib);
- m_children.append(pl);
-}
-
-void ParagraphHandler::startFormula(const QXmlAttributes& attrib)
-{
- addTextNode();
- FormulaHandler *fh = new FormulaHandler(this);
- fh->startFormula(attrib);
- m_children.append(fh);
-}
-
-void ParagraphHandler::startImage(const QXmlAttributes& attrib)
-{
- addTextNode();
- ImageHandler *ih = new ImageHandler(this);
- ih->startImage(attrib);
- m_children.append(ih);
-}
-
-void ParagraphHandler::startDotFile(const QXmlAttributes& attrib)
-{
- addTextNode();
- DotFileHandler *df = new DotFileHandler(this);
- df->startDotFile(attrib);
- m_children.append(df);
-}
-
-void ParagraphHandler::startIndexEntry(const QXmlAttributes& attrib)
-{
- addTextNode();
- IndexEntryHandler *df = new IndexEntryHandler(this);
- df->startIndexEntry(attrib);
- m_children.append(df);
-}
-
-void ParagraphHandler::startTable(const QXmlAttributes& attrib)
-{
- addTextNode();
- TableHandler *th = new TableHandler(this);
- th->startTable(attrib);
- m_children.append(th);
-}
-
-void ParagraphHandler::startVerbatim(const QXmlAttributes& attrib)
-{
- addTextNode();
- VerbatimHandler *vh = new VerbatimHandler(this);
- vh->startVerbatim(attrib,IDocVerbatim::Verbatim);
- m_children.append(vh);
-}
-
-void ParagraphHandler::startHtmlOnly(const QXmlAttributes& attrib)
-{
- addTextNode();
- VerbatimHandler *vh = new VerbatimHandler(this);
- vh->startVerbatim(attrib,IDocVerbatim::HtmlOnly);
- m_children.append(vh);
-}
-
-void ParagraphHandler::startLatexOnly(const QXmlAttributes& attrib)
-{
- addTextNode();
- VerbatimHandler *vh = new VerbatimHandler(this);
- vh->startVerbatim(attrib,IDocVerbatim::LatexOnly);
- m_children.append(vh);
-}
-
-void ParagraphHandler::startUmlaut(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Umlaut);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startAcute(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Acute);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startGrave(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Grave);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startCirc(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Circ);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startTilde(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Tilde);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startSzlig(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Szlig);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startCedil(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Cedil);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startRing(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Ring);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startNbsp(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Nbsp);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startCopy(const QXmlAttributes& attrib)
-{
- addTextNode();
- SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Copy);
- sh->startSymbol(attrib);
- m_children.append(sh);
-}
-
-void ParagraphHandler::startAnchor(const QXmlAttributes& attrib)
-{
- addTextNode();
- AnchorHandler *ah = new AnchorHandler(this);
- ah->startAnchor(attrib);
- m_children.append(ah);
-}
-
-void ParagraphHandler::startCopyDoc(const QXmlAttributes& attrib)
-{
- addTextNode();
- CopyHandler *ch = new CopyHandler(this);
- ch->startCopy(attrib);
- m_children.append(ch);
-}
-
-void ParagraphHandler::startTocList(const QXmlAttributes& attrib)
-{
- addTextNode();
- TocListHandler *th = new TocListHandler(this);
- th->startTocList(attrib);
- m_children.append(th);
-}
-
-void ParagraphHandler::addTextNode()
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(
- new TextNode(
- m_curString,
- m_markupHandler->markup(),
- m_markupHandler->headingLevel()
- )
- );
- debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
- m_curString.data(),m_markupHandler->markup(),m_markupHandler->headingLevel());
- m_curString="";
- }
-}
-
-IDocIterator *ParagraphHandler::contents() const
-{
- return new ParagraphIterator(*this);
-}
-
-//----------------------------------------------------------------------
-// DocSectionHandler
-//----------------------------------------------------------------------
-
-DocSectionHandler::DocSectionHandler(IBaseHandler *parent,int level)
- : m_parent(parent), m_internal(0), m_level(level), m_title(0)
-{
- QString sectionKey;
- m_paragraphs.setAutoDelete(TRUE);
- m_subsections.setAutoDelete(TRUE);
- addStartHandler("title",this,&DocSectionHandler::startTitle);
- addStartHandler("para",this,&DocSectionHandler::startParagraph);
- if (level<6)
- {
- sectionKey.sprintf("sect%d",level+1);
- addStartHandler(sectionKey.utf8(),this,&DocSectionHandler::startSubSection);
- }
- addStartHandler("internal",this,&DocSectionHandler::startInternal);
- sectionKey.sprintf("sect%d",level);
- addEndHandler(sectionKey.utf8(),this,&DocSectionHandler::endDocSection);
-}
-
-DocSectionHandler::~DocSectionHandler()
-{
-}
-
-void DocSectionHandler::startDocSection(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- debug(2,"Start docsection\n");
- m_id = attrib.value("id");
-}
-
-void DocSectionHandler::endDocSection()
-{
- m_parent->setDelegate(0);
- debug(2,"End docsection\n");
-}
-
-void DocSectionHandler::startSubSection(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1);
- secHandler->startDocSection(attrib);
- m_subsections.append(secHandler);
-}
-
-void DocSectionHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ParagraphHandler *parHandler = new ParagraphHandler(this);
- parHandler->startParagraph(attrib);
- m_paragraphs.append(parHandler);
-}
-
-void DocSectionHandler::startInternal(const QXmlAttributes& attrib)
-{
- m_internal = new DocInternalHandler(this,m_level);
- m_internal->startInternal(attrib);
-}
-
-void DocSectionHandler::startTitle(const QXmlAttributes& attrib)
-{
- m_title = new TitleHandler(this);
- m_title->startTitle(attrib);
-}
-
-IDocIterator *DocSectionHandler::paragraphs() const
-{
- return new DocSectionParaIterator(*this);
-}
-
-IDocIterator *DocSectionHandler::subSections() const
-{
- return new DocSectionSubIterator(*this);
-}
-
-IDocInternal *DocSectionHandler::internal() const
-{
- return m_internal;
-}
-
-//----------------------------------------------------------------------
-// DocInternal
-//----------------------------------------------------------------------
-
-DocInternalHandler::DocInternalHandler(IBaseHandler *parent,int level)
- : m_parent(parent), m_level(level)
-{
- m_paragraphs.setAutoDelete(TRUE);
- m_subsections.setAutoDelete(TRUE);
- addStartHandler("para",this,&DocInternalHandler::startParagraph);
- QString sectionKey;
- sectionKey.sprintf("sect%d",level+1);
- addStartHandler(sectionKey.utf8(),this,&DocInternalHandler::startSubSection);
- addEndHandler("internal",this,&DocInternalHandler::endInternal);
-}
-
-DocInternalHandler::~DocInternalHandler()
-{
-}
-
-void DocInternalHandler::startInternal(const QXmlAttributes&)
-{
- m_parent->setDelegate(this);
- debug(2,"Start internal\n");
-}
-
-void DocInternalHandler::endInternal()
-{
- m_parent->setDelegate(0);
- debug(2,"End internal\n");
-}
-
-void DocInternalHandler::startSubSection(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1);
- secHandler->startDocSection(attrib);
- m_subsections.append(secHandler);
-}
-
-void DocInternalHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ParagraphHandler *parHandler = new ParagraphHandler(this);
- parHandler->startParagraph(attrib);
- m_paragraphs.append(parHandler);
-}
-
-IDocIterator *DocInternalHandler::paragraphs() const
-{
- return new DocInternalParaIterator(*this);
-}
-
-IDocIterator *DocInternalHandler::subSections() const
-{
- return new DocInternalSubIterator(*this);
-}
-
-
-//----------------------------------------------------------------------
-// DocHandler
-//----------------------------------------------------------------------
-
-DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
-
- addEndHandler("briefdescription",this,&DocHandler::endDoc);
- addEndHandler("detaileddescription",this,&DocHandler::endDoc);
- addEndHandler("inbodydescription",this,&DocHandler::endDoc);
- //addEndHandler("internal"); // TODO: implement this as a section
- addStartHandler("internal",this,&DocHandler::startInternal);
-
- addStartHandler("para",this,&DocHandler::startParagraph);
- addStartHandler("sect1",this,&DocHandler::startSect1);
- addStartHandler("title",this,&DocHandler::startTitle);
- //addStartHandler("internal");
-}
-
-DocHandler::~DocHandler()
-{
-}
-
-void DocHandler::startDoc(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"start dochandler\n");
-}
-
-void DocHandler::endDoc()
-{
- debug(2,"end dochandler\n");
- m_parent->setDelegate(0);
-}
-
-void DocHandler::startParagraph(const QXmlAttributes& attrib)
-{
- ParagraphHandler *parHandler = new ParagraphHandler(this);
- parHandler->startParagraph(attrib);
- m_children.append(parHandler);
-}
-
-void DocHandler::startSect1(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,1);
- secHandler->startDocSection(attrib);
- m_children.append(secHandler);
-}
-
-void DocHandler::startTitle(const QXmlAttributes& attrib)
-{
- TitleHandler *titleHandler = new TitleHandler(this);
- titleHandler->startTitle(attrib);
- m_children.append(titleHandler);
-}
-
-void DocHandler::startInternal(const QXmlAttributes& attrib)
-{
- m_internal = new DocInternalHandler(this,1);
- m_internal->startInternal(attrib);
-}
-
-IDocIterator *DocHandler::contents() const
-{
- return new DocIterator(*this);
-}
-
-IDocInternal *DocHandler::internal() const
-{
- return m_internal;
-}
-
diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h
deleted file mode 100644
index 59af4e3..0000000
--- a/addon/doxmlparser/src/dochandler.h
+++ /dev/null
@@ -1,1352 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _DOCHANDLER_H
-#define _DOCHANDLER_H
-
-#include <qstring.h>
-#include <qlist.h>
-#include <qxml.h>
-
-#include <doxmlintf.h>
-#include "stringimpl.h"
-#include "basehandler.h"
-#include "baseiterator.h"
-
-class ParagraphHandler;
-class DocInternalHandler;
-class LinkedTextImpl;
-class LinkedTextHandler;
-
-//-----------------------------------------------------------------------------
-
-class DocImpl : public IDoc { public: virtual ~DocImpl() {} };
-
-#define DEFINE_CLS_IMPL(cls) \
- class cls##Impl : public I##cls, public DocImpl { public: virtual ~cls##Impl() {} }
-
-DEFINE_CLS_IMPL(DocMarkup);
-DEFINE_CLS_IMPL(DocPara);
-DEFINE_CLS_IMPL(DocText);
-DEFINE_CLS_IMPL(DocMarkupModifier);
-DEFINE_CLS_IMPL(DocItemizedList);
-DEFINE_CLS_IMPL(DocOrderedList);
-DEFINE_CLS_IMPL(DocListItem);
-DEFINE_CLS_IMPL(DocParameterList);
-DEFINE_CLS_IMPL(DocParameterItem);
-DEFINE_CLS_IMPL(DocParameter);
-DEFINE_CLS_IMPL(DocTitle);
-DEFINE_CLS_IMPL(DocSimpleSect);
-DEFINE_CLS_IMPL(DocRef);
-DEFINE_CLS_IMPL(DocVariableList);
-DEFINE_CLS_IMPL(DocVariableListEntry);
-DEFINE_CLS_IMPL(DocHRuler);
-DEFINE_CLS_IMPL(DocLineBreak);
-DEFINE_CLS_IMPL(DocULink);
-DEFINE_CLS_IMPL(DocEMail);
-DEFINE_CLS_IMPL(DocLink);
-DEFINE_CLS_IMPL(DocProgramListing);
-DEFINE_CLS_IMPL(DocCodeLine);
-DEFINE_CLS_IMPL(DocHighlight);
-DEFINE_CLS_IMPL(DocFormula);
-DEFINE_CLS_IMPL(DocImage);
-DEFINE_CLS_IMPL(DocDotFile);
-DEFINE_CLS_IMPL(DocIndexEntry);
-DEFINE_CLS_IMPL(DocTable);
-DEFINE_CLS_IMPL(DocRow);
-DEFINE_CLS_IMPL(DocEntry);
-DEFINE_CLS_IMPL(DocSection);
-DEFINE_CLS_IMPL(DocVerbatim);
-DEFINE_CLS_IMPL(DocCopy);
-DEFINE_CLS_IMPL(DocTocList);
-DEFINE_CLS_IMPL(DocTocItem);
-DEFINE_CLS_IMPL(DocAnchor);
-DEFINE_CLS_IMPL(DocSymbol);
-DEFINE_CLS_IMPL(DocInternal);
-DEFINE_CLS_IMPL(DocRoot);
-
-//-----------------------------------------------------------------------------
-
-
-/*! \brief Node representing a piece of text.
- *
- */
-class TextNode : public DocTextImpl
-{
- public:
- TextNode(const QString &t,int markup,int level)
- : m_text(t), m_markup(markup), m_headingLevel(level) {}
- virtual ~TextNode() {}
-
- // IDocText
- virtual Kind kind() const { return DocImpl::Text; }
- virtual const IString *text() const { return &m_text; }
- virtual int markup() const { return m_markup; }
- virtual int headingLevel() const { return m_headingLevel; }
-
- private:
- StringImpl m_text;
- int m_markup;
- int m_headingLevel;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a change in the markup style.
- *
- */
-class MarkupModifierNode : public DocMarkupModifierImpl
-{
- public:
- MarkupModifierNode(int markup,bool enabled,int level=0)
- : m_markup(markup), m_enabled(enabled), m_headingLevel(level) {}
- virtual ~MarkupModifierNode() {}
-
- // IDocMarkupModifier
- virtual Kind kind() const { return DocImpl::MarkupModifier; }
- virtual bool enabled() const { return m_enabled; }
- virtual int markup() const { return m_markup; }
- virtual int headingLevel() const { return m_headingLevel; }
-
- private:
- int m_markup;
- bool m_enabled;
- int m_headingLevel;
-};
-
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Handles markup commands in the XML input.
- *
- */
-class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
-{
- public:
- MarkupHandler(QList<DocImpl> &children,QString &curString);
- virtual ~MarkupHandler();
- int markup() const { return m_curMarkup; }
- int headingLevel() const { return m_headingLevel; }
-
- virtual void startBold(const QXmlAttributes &attrib);
- virtual void endBold();
- virtual void startEmphasis(const QXmlAttributes &attrib);
- virtual void endEmphasis();
- virtual void startComputerOutput(const QXmlAttributes &attrib);
- virtual void endComputerOutput();
- virtual void startCenter(const QXmlAttributes &attrib);
- virtual void endCenter();
- virtual void startSmallFont(const QXmlAttributes &attrib);
- virtual void endSmallFont();
- virtual void startSubscript(const QXmlAttributes &attrib);
- virtual void endSubscript();
- virtual void startSuperscript(const QXmlAttributes &attrib);
- virtual void endSuperscript();
- virtual void startPreformatted(const QXmlAttributes &attrib);
- virtual void endPreformatted();
- virtual void startHeading1(const QXmlAttributes &attrib);
- virtual void endHeading1();
- virtual void startHeading2(const QXmlAttributes &attrib);
- virtual void endHeading2();
- virtual void startHeading3(const QXmlAttributes &attrib);
- virtual void endHeading3();
- virtual void startHeading4(const QXmlAttributes &attrib);
- virtual void endHeading4();
- virtual void startHeading5(const QXmlAttributes &attrib);
- virtual void endHeading5();
- virtual void startHeading6(const QXmlAttributes &attrib);
- virtual void endHeading6();
-
-
- private:
- void addTextNode();
-
- QList<DocImpl> &m_children;
- QString &m_curString;
- int m_curMarkup;
- int m_headingLevel;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a paragraph of text and commands.
- *
- */
-// children: itemizedlist, orderedlist, parameterlist, simplesect, ref,
-// variablelist, hruler, linebreak, ulink, email, link
-// programlisting, formula, image, dotfile, indexentry,
-// table
-//
-// children handled by MarkupHandler:
-// bold, computeroutput, emphasis, center,
-// small, subscript, superscript.
-//
-class ParagraphHandler : public DocParaImpl,
- public BaseHandler<ParagraphHandler>
-{
- friend class ParagraphIterator;
-
- public:
- virtual void startParagraph(const QXmlAttributes& attrib);
- virtual void endParagraph();
- virtual void startItemizedList(const QXmlAttributes& attrib);
- virtual void startOrderedList(const QXmlAttributes& attrib);
- virtual void startParameterList(const QXmlAttributes& attrib);
- virtual void startSimpleSect(const QXmlAttributes& attrib);
- virtual void startRef(const QXmlAttributes& attrib);
- virtual void startVariableList(const QXmlAttributes& attrib);
- virtual void startHRuler(const QXmlAttributes& attrib);
- virtual void startLineBreak(const QXmlAttributes& attrib);
- virtual void startULink(const QXmlAttributes& attrib);
- virtual void startEMail(const QXmlAttributes& attrib);
- virtual void startLink(const QXmlAttributes& attrib);
- virtual void startProgramListing(const QXmlAttributes& attrib);
- virtual void startFormula(const QXmlAttributes& attrib);
- virtual void startImage(const QXmlAttributes& attrib);
- virtual void startDotFile(const QXmlAttributes& attrib);
- virtual void startIndexEntry(const QXmlAttributes& attrib);
- virtual void startTable(const QXmlAttributes& attrib);
- virtual void startVerbatim(const QXmlAttributes& attrib);
- virtual void startHtmlOnly(const QXmlAttributes& attrib);
- virtual void startLatexOnly(const QXmlAttributes& attrib);
- virtual void startUmlaut(const QXmlAttributes& attrib);
- virtual void startAcute(const QXmlAttributes& attrib);
- virtual void startGrave(const QXmlAttributes& attrib);
- virtual void startCirc(const QXmlAttributes& attrib);
- virtual void startTilde(const QXmlAttributes& attrib);
- virtual void startSzlig(const QXmlAttributes& attrib);
- virtual void startCedil(const QXmlAttributes& attrib);
- virtual void startRing(const QXmlAttributes& attrib);
- virtual void startNbsp(const QXmlAttributes& attrib);
- virtual void startCopy(const QXmlAttributes& attrib);
- virtual void startAnchor(const QXmlAttributes& attrib);
- virtual void startCopyDoc(const QXmlAttributes& attrib);
- virtual void startTocList(const QXmlAttributes& attrib);
-
- ParagraphHandler(IBaseHandler *parent);
- virtual ~ParagraphHandler();
-
- // IDocPara
- virtual Kind kind() const { return DocImpl::Para; }
- virtual IDocIterator *contents() const;
-
- private:
- void addTextNode();
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
- MarkupHandler *m_markupHandler;
-};
-
-class ParagraphIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- ParagraphIterator(const ParagraphHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a list item.
- *
- */
-class ListItemHandler : public DocListItemImpl, public BaseHandler<ListItemHandler>
-{
- friend class ListItemIterator;
- public:
- ListItemHandler(IBaseHandler *parent);
- virtual ~ListItemHandler();
- virtual void startListItem(const QXmlAttributes& attrib);
- virtual void endListItem();
- virtual void startParagraph(const QXmlAttributes& attrib);
-
- // IDocItem
- virtual Kind kind() const { return DocImpl::ListItem; }
- virtual IDocIterator *contents() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
-};
-
-class ListItemIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- ListItemIterator(const ListItemHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing list of items.
- *
- */
-class OrderedListHandler : public DocOrderedListImpl, public BaseHandler<OrderedListHandler>
-{
- friend class OrderedListIterator;
- public:
- OrderedListHandler(IBaseHandler *parent);
- virtual ~OrderedListHandler();
- virtual void startOrderedList(const QXmlAttributes& attrib);
- virtual void endOrderedList();
- virtual void startOrderedListItem(const QXmlAttributes& attrib);
-
- // IDocOrderedList
- virtual Kind kind() const { return DocImpl::OrderedList; }
- virtual IDocIterator *elements() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
-};
-
-class OrderedListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- OrderedListIterator(const OrderedListHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing table of contents list.
- *
- */
-class TocListHandler : public DocTocListImpl, public BaseHandler<TocListHandler>
-{
- friend class TocListIterator;
- public:
- TocListHandler(IBaseHandler *parent);
- virtual ~TocListHandler();
- virtual void startTocList(const QXmlAttributes& attrib);
- virtual void endTocList();
- virtual void startTocItem(const QXmlAttributes& attrib);
-
- // IDocTocList
- virtual Kind kind() const { return DocImpl::TocList; }
- virtual IDocIterator *elements() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
-};
-
-class TocListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- TocListIterator(const TocListHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a table of contents item.
- *
- */
-class TocItemHandler : public DocTocItemImpl, public BaseHandler<TocItemHandler>
-{
- friend class TocItemIterator;
- public:
- TocItemHandler(IBaseHandler *parent);
- virtual ~TocItemHandler();
- virtual void startTocItem(const QXmlAttributes& attrib);
- virtual void endTocItem();
-
- // IDocItem
- virtual Kind kind() const { return DocImpl::TocItem; }
- virtual const IString *id() const { return &m_id; }
- virtual const IString *title() const { return &m_title; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_id;
- StringImpl m_title;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing list of items.
- *
- */
-class ItemizedListHandler : public DocItemizedListImpl, public BaseHandler<ItemizedListHandler>
-{
- friend class ItemizedListIterator;
- public:
- ItemizedListHandler(IBaseHandler *parent);
- virtual ~ItemizedListHandler();
- virtual void startItemizedList(const QXmlAttributes& attrib);
- virtual void endItemizedList();
- virtual void startItemizedListItem(const QXmlAttributes& attrib);
-
- // IDocItemizedList
- virtual Kind kind() const { return DocImpl::ItemizedList; }
- virtual IDocIterator *elements() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
-};
-
-class ItemizedListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- ItemizedListIterator(const ItemizedListHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-
-//-----------------------------------------------------------------------------
-/*! \brief Node representing a parameter.
- *
- */
-class ParameterHandler : public DocParameterImpl,
- public BaseHandler<ParameterHandler>
-{
- public:
- ParameterHandler(IBaseHandler *parent);
- virtual ~ParameterHandler();
- virtual void startParameterName(const QXmlAttributes& attrib);
- virtual void endParameterName();
-
- // IDocParameter
- virtual Kind kind() const { return DocImpl::Parameter; }
- virtual const IString *name() const { return &m_name; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_name;
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a list of param names with a single description.
- *
- */
-class ParameterItemHandler : public DocParameterItemImpl,
- public BaseHandler<ParameterItemHandler>
-{
- friend class ParameterItemIterator;
- public:
- ParameterItemHandler(IBaseHandler *parent);
- virtual ~ParameterItemHandler();
- virtual void startParameterItem(const QXmlAttributes& attrib);
- virtual void endParameterItem();
- virtual void startParameterName(const QXmlAttributes& attrib);
- virtual void startParagraph(const QXmlAttributes& attrib);
-
- // IDocParameterItem
- virtual Kind kind() const { return DocImpl::ParameterItem; }
- virtual IDocIterator *paramNames() const;
- virtual IDocPara *description() const { return m_description; }
-
- private:
- IBaseHandler *m_parent;
- QList<ParameterHandler> m_parameters;
- ParagraphHandler *m_description;
-};
-
-class ParameterItemIterator : public BaseIteratorVia<IDocIterator,IDoc,ParameterHandler,DocImpl>
-{
- public:
- ParameterItemIterator(const ParameterItemHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,ParameterHandler,DocImpl>(handler.m_parameters) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a parameter section.
- *
- */
-class ParameterListHandler : public DocParameterListImpl,
- public BaseHandler<ParameterListHandler>
-{
- friend class ParameterListIterator;
- public:
- ParameterListHandler(IBaseHandler *parent);
- virtual ~ParameterListHandler();
- virtual void startParameterList(const QXmlAttributes& attrib);
- virtual void endParameterList();
- virtual void startParameterItem(const QXmlAttributes& attrib);
-
- // IDocParameterList
- virtual Kind kind() const { return DocImpl::ParameterList; }
- virtual Types sectType() const { return m_type; }
- virtual IDocIterator *params() const;
-
- private:
- IBaseHandler *m_parent;
- QList<ParameterItemHandler> m_paramItems;
- Types m_type;
-};
-
-class ParameterListIterator : public BaseIteratorVia<IDocIterator,IDoc,ParameterItemHandler,DocImpl>
-{
- public:
- ParameterListIterator(const ParameterListHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,ParameterItemHandler,DocImpl>(handler.m_paramItems) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a horizontal ruler
- *
- */
-class LineBreakHandler : public DocLineBreakImpl, public BaseHandler<LineBreakHandler>
-{
- public:
- LineBreakHandler(IBaseHandler *parent);
- virtual ~LineBreakHandler();
-
- void startLineBreak(const QXmlAttributes& attrib);
- void endLineBreak();
-
- // IDocLineBreak
- virtual Kind kind() const { return DocImpl::LineBreak; }
-
- private:
- IBaseHandler *m_parent;
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a link to section
- *
- */
-class LinkHandler : public DocLinkImpl, public BaseHandler<LinkHandler>
-{
- public:
- LinkHandler(IBaseHandler *parent);
- virtual ~LinkHandler();
-
- void startLink(const QXmlAttributes& attrib);
- void endLink();
-
- // IDocLink
- virtual Kind kind() const { return DocImpl::Link; }
- virtual const IString *refId() const { return &m_ref; }
- virtual const IString *text() const { return &m_text; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_ref;
- StringImpl m_text;
-};
-
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a link to an email address
- *
- */
-class EMailHandler : public DocEMailImpl, public BaseHandler<EMailHandler>
-{
- public:
- EMailHandler(IBaseHandler *parent);
- virtual ~EMailHandler();
-
- void startEMail(const QXmlAttributes& attrib);
- void endEMail();
-
- // IDocEMail
- virtual Kind kind() const { return DocImpl::EMail; }
- virtual const IString *address() const { return &m_address; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_address;
-};
-
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a link to a URL
- *
- */
-class ULinkHandler : public DocULinkImpl, public BaseHandler<ULinkHandler>
-{
- public:
- ULinkHandler(IBaseHandler *parent);
- virtual ~ULinkHandler();
-
- void startULink(const QXmlAttributes& attrib);
- void endULink();
-
- // IDocULink
- virtual Kind kind() const { return DocImpl::ULink; }
- virtual const IString * url() const { return &m_url; }
- virtual const IString * text() const { return &m_text; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_url;
- StringImpl m_text;
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a horizontal ruler
- *
- */
-class HRulerHandler : public DocHRulerImpl, public BaseHandler<HRulerHandler>
-{
- public:
- HRulerHandler(IBaseHandler *parent);
- virtual ~HRulerHandler();
-
- void startHRuler(const QXmlAttributes& attrib);
- void endHRuler();
-
- // IDocHRuler
- virtual Kind kind() const { return DocImpl::HRuler; }
-
- private:
- IBaseHandler *m_parent;
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a reference to another item
- *
- */
-class RefHandler : public DocRefImpl, public BaseHandler<RefHandler>
-{
- public:
- RefHandler(IBaseHandler *parent);
- virtual ~RefHandler();
- void startRef(const QXmlAttributes& attrib);
- void endRef();
-
- // IDocRef
- virtual Kind kind() const { return DocImpl::Ref; }
- virtual const IString *refId() const { return &m_refId; }
- virtual TargetKind targetKind() const { return m_targetKind; }
- virtual const IString *external() const { return &m_extId; }
- virtual const IString *text() const { return &m_linkText; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_refId;
- StringImpl m_extId;
- StringImpl m_linkText;
- TargetKind m_targetKind;
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing the title of a section
- *
- */
-// children: text, ref
-// children handled by MarkupHandler:
-// bold, computeroutput, emphasis, center,
-// small, subscript, superscript.
-class TitleHandler : public DocTitleImpl, public BaseHandler<TitleHandler>
-{
- friend class TitleIterator;
- public:
- TitleHandler(IBaseHandler *parent);
- virtual ~TitleHandler();
- virtual void startTitle(const QXmlAttributes& attrib);
- virtual void endTitle();
- virtual void startRef(const QXmlAttributes& attrib);
- void addTextNode();
-
- // IDocTitle
- virtual Kind kind() const { return DocImpl::Title; }
- virtual IDocIterator *title() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
- MarkupHandler *m_markupHandler;
-};
-
-class TitleIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- TitleIterator(const TitleHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing a simple section with an unnumbered header.
- *
- */
-// children: title, para
-class SimpleSectHandler : public DocSimpleSectImpl,
- public BaseHandler<SimpleSectHandler>
-{
- public:
- SimpleSectHandler(IBaseHandler *parent);
- virtual ~SimpleSectHandler();
- virtual void startSimpleSect(const QXmlAttributes& attrib);
- virtual void endSimpleSect();
- virtual void startTitle(const QXmlAttributes& attrib);
- virtual void startParagraph(const QXmlAttributes& attrib);
-
- // IDocSimpleSect
- virtual Kind kind() const { return DocImpl::SimpleSect; }
- virtual Types type() const { return m_type; }
- virtual const IString *typeString() const { return &m_typeString; }
- virtual IDocTitle *title() const { return m_title; }
- virtual IDocPara *description() const { return m_paragraph; }
-
- private:
- IBaseHandler *m_parent;
- ParagraphHandler *m_paragraph;
- Types m_type;
- StringImpl m_typeString;
- TitleHandler *m_title;
-};
-
-//-----------------------------------------------------------------------------
-
-/* \brief Node representing an named item of a VariableList.
- *
- */
-class VariableListEntryHandler : public DocVariableListEntryImpl,
- public BaseHandler<VariableListEntryHandler>
-{
- public:
- virtual void startVarListEntry(const QXmlAttributes& attrib);
- virtual void endVarListEntry();
- virtual void startListItem(const QXmlAttributes& attrib);
- virtual void endListItem();
- virtual void startTerm(const QXmlAttributes& attrib);
- virtual void endTerm();
- virtual void startParagraph(const QXmlAttributes& attrib);
-
- VariableListEntryHandler(IBaseHandler *parent);
- virtual ~VariableListEntryHandler();
-
- // IDocVariableListEntry
- virtual Kind kind() const { return DocImpl::VariableListEntry; }
- virtual ILinkedTextIterator *term() const;
- virtual IDocPara *description() const { return m_description; }
-
- private:
- IBaseHandler* m_parent;
- QList<LinkedTextImpl> m_term;
- ParagraphHandler* m_description;
- LinkedTextHandler* m_linkedTextHandler;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a list of named items.
- *
- */
-// children: varlistentry, listitem
-class VariableListHandler : public DocVariableListImpl,
- public BaseHandler<VariableListHandler>
-{
- friend class VariableListIterator;
-
- public:
- virtual void startVariableList(const QXmlAttributes& attrib);
- virtual void endVariableList();
- virtual void startVarListEntry(const QXmlAttributes& attrib);
- virtual void startListItem(const QXmlAttributes& attrib);
-
- VariableListHandler(IBaseHandler *parent);
- virtual ~VariableListHandler();
-
- // IDocVariableList
- virtual Kind kind() const { return DocImpl::VariableList; }
- virtual IDocIterator *entries() const;
-
- private:
- IBaseHandler *m_parent;
- QList<VariableListEntryHandler> m_entries;
- VariableListEntryHandler *m_curEntry;
-};
-
-class VariableListIterator : public BaseIteratorVia<IDocIterator,IDoc,VariableListEntryHandler,DocImpl>
-{
- public:
- VariableListIterator(const VariableListHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,VariableListEntryHandler,DocImpl>(handler.m_entries) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a highlighted text fragment.
- *
- */
-// children: ref
-class HighlightHandler : public DocHighlightImpl, public BaseHandler<HighlightHandler>
-{
- friend class HighlightIterator;
- public:
- HighlightHandler(IBaseHandler *parent);
- virtual ~HighlightHandler();
- void startHighlight(const QXmlAttributes& attrib);
- void endHighlight();
- virtual void startRef(const QXmlAttributes&);
- virtual void startSpace(const QXmlAttributes&);
-
- // IDocHighlight
- virtual Kind kind() const { return DocImpl::Highlight; }
- virtual HighlightKind highlightKind() const { return m_hl; }
- virtual IDocIterator *codeElements() const;
-
- private:
- void addTextNode();
-
- IBaseHandler *m_parent;
- HighlightKind m_hl;
- QString m_hlString;
- QList<DocImpl> m_children;
-};
-
-class HighlightIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- HighlightIterator(const HighlightHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a line of code.
- *
- */
-// children: linenumber, highlight, anchor, ref
-class CodeLineHandler : public DocCodeLineImpl, public BaseHandler<CodeLineHandler>
-{
- friend class CodeLineIterator;
- public:
-
- virtual void startCodeLine(const QXmlAttributes&);
- virtual void endCodeLine();
- virtual void startLineNumber(const QXmlAttributes&);
- virtual void endLineNumber();
- virtual void startHighlight(const QXmlAttributes&);
- virtual void startRef(const QXmlAttributes&);
-
- CodeLineHandler(IBaseHandler *parent);
- virtual ~CodeLineHandler();
-
- // IDocCodeLine
- virtual Kind kind() const { return DocImpl::CodeLine; }
- virtual int lineNumber() const { return m_lineNumber; }
- virtual const IString *refId() const { return &m_refId; }
- virtual IDocIterator *codeElements() const;
-
- private:
- void addTextNode();
-
- IBaseHandler *m_parent;
- int m_lineNumber;
- StringImpl m_refId;
- QList<DocImpl> m_children;
-};
-
-class CodeLineIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- CodeLineIterator(const CodeLineHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a program listing
- *
- */
-// children: codeline, linenumber
-class ProgramListingHandler : public DocProgramListingImpl, public BaseHandler<ProgramListingHandler>
-{
- friend class ProgramListingIterator;
- public:
- virtual void startProgramListing(const QXmlAttributes& attrib);
- virtual void endProgramListing();
- virtual void startCodeLine(const QXmlAttributes&);
- virtual void startLineNumber(const QXmlAttributes&);
-
- ProgramListingHandler(IBaseHandler *parent);
- virtual ~ProgramListingHandler();
-
- // IDocProgramListing
- virtual Kind kind() const { return DocImpl::ProgramListing; }
- virtual IDocIterator *codeLines() const;
-
- private:
- IBaseHandler *m_parent;
- QList<CodeLineHandler> m_children;
- bool m_hasLineNumber;
-};
-
-//-----------------------------------------------------------------------------
-
-class ProgramListingIterator : public BaseIteratorVia<IDocIterator,IDoc,CodeLineHandler,DocImpl>
-{
- public:
- ProgramListingIterator(const ProgramListingHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,CodeLineHandler,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a formula.
- *
- */
-// children: -
-class FormulaHandler : public DocFormulaImpl, public BaseHandler<FormulaHandler>
-{
- public:
- FormulaHandler(IBaseHandler *parent);
- virtual ~FormulaHandler();
- void startFormula(const QXmlAttributes& attrib);
- void endFormula();
-
- // IDocFormula
- virtual Kind kind() const { return DocImpl::Formula; }
- virtual const IString *id() const { return &m_id; }
- virtual const IString *text() const { return &m_text; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_id;
- StringImpl m_text;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing an image.
- *
- */
-// children: -
-class ImageHandler : public DocImageImpl, public BaseHandler<ImageHandler>
-{
- public:
- ImageHandler(IBaseHandler *parent);
- virtual ~ImageHandler();
- void startImage(const QXmlAttributes& attrib);
- void endImage();
-
- // IDocImage
- virtual Kind kind() const { return DocImpl::Image; }
- virtual const IString *name() const { return &m_name; }
- virtual const IString *caption() const { return &m_caption; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_name;
- StringImpl m_caption;
-};
-
-
-//-----------------------------------------------------------------------------
-/*! \brief Node representing an anchor.
- *
- */
-// children: -
-class AnchorHandler : public DocAnchorImpl, public BaseHandler<AnchorHandler>
-{
- public:
- AnchorHandler(IBaseHandler *parent);
- virtual ~AnchorHandler();
- void startAnchor(const QXmlAttributes& attrib);
- void endAnchor();
-
- // IDocAnchor
- virtual Kind kind() const { return DocImpl::Anchor; }
- virtual const IString *id() const { return &m_id; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_id;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a dot file.
- *
- */
-// children: -
-class DotFileHandler : public DocDotFileImpl, public BaseHandler<DotFileHandler>
-{
- public:
- DotFileHandler(IBaseHandler *parent);
- virtual ~DotFileHandler();
- void startDotFile(const QXmlAttributes& attrib);
- void endDotFile();
-
- // IDocDotFile
- virtual Kind kind() const { return DocImpl::DotFile; }
- virtual const IString *name() const { return &m_name; }
- virtual const IString *caption() const { return &m_caption; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_name;
- StringImpl m_caption;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing an entry in the index.
- *
- */
-// children: -
-class IndexEntryHandler : public DocIndexEntryImpl, public BaseHandler<IndexEntryHandler>
-{
- public:
- IndexEntryHandler(IBaseHandler *parent);
- virtual ~IndexEntryHandler();
- void startIndexEntry(const QXmlAttributes& attrib);
- void endIndexEntry();
- void startPrimaryIE(const QXmlAttributes& attrib);
- void endPrimaryIE();
- void startSecondaryIE(const QXmlAttributes& attrib);
- void endSecondaryIE();
-
- // IDocIndexEntry
- virtual Kind kind() const { return DocImpl::IndexEntry; }
- virtual const IString *primary() const { return &m_primary; }
- virtual const IString *secondary() const { return &m_secondary; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_primary;
- StringImpl m_secondary;
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing an entry in the table entry.
- *
- */
-// children: para
-class EntryHandler : public DocEntryImpl, public BaseHandler<EntryHandler>
-{
- friend class EntryIterator;
- public:
- EntryHandler(IBaseHandler *parent);
- virtual ~EntryHandler();
- void startEntry(const QXmlAttributes& attrib);
- void endEntry();
- void startParagraph(const QXmlAttributes& attrib);
-
- // IDocEntry
- virtual Kind kind() const { return DocImpl::Entry; }
- virtual IDocIterator *contents() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
-};
-
-class EntryIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- EntryIterator(const EntryHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing an entry in the table row.
- *
- */
-// children: entry
-class RowHandler : public DocRowImpl, public BaseHandler<RowHandler>
-{
- friend class RowIterator;
- public:
- RowHandler(IBaseHandler *parent);
- virtual ~RowHandler();
- void startRow(const QXmlAttributes& attrib);
- void endRow();
- void startEntry(const QXmlAttributes& attrib);
-
- // IDocRow
- virtual Kind kind() const { return DocImpl::Row; }
- virtual IDocIterator *entries() const;
-
- private:
- IBaseHandler *m_parent;
- QList<EntryHandler> m_children;
-};
-
-class RowIterator : public BaseIteratorVia<IDocIterator,IDoc,EntryHandler,DocImpl>
-{
- public:
- RowIterator(const RowHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,EntryHandler,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing an entry in the table.
- *
- */
-// children: row, caption
-class TableHandler : public DocTableImpl, public BaseHandler<TableHandler>
-{
- friend class TableIterator;
- public:
- TableHandler(IBaseHandler *parent);
- virtual ~TableHandler();
- void startTable(const QXmlAttributes& attrib);
- void endTable();
- void startRow(const QXmlAttributes& attrib);
- void startCaption(const QXmlAttributes& attrib);
- void endCaption();
-
- // IDocTable
- virtual Kind kind() const { return DocImpl::Table; }
- virtual IDocIterator *rows() const;
- virtual int numColumns() const { return m_numColumns; }
- virtual const IString *caption() const { return &m_caption; }
-
- private:
- IBaseHandler *m_parent;
- QList<RowHandler> m_children;
- int m_numColumns;
- StringImpl m_caption;
-};
-
-class TableIterator : public BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl>
-{
- public:
- TableIterator(const TableHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a copied piece of documentation.
- *
- */
-class CopyHandler : public DocCopyImpl, public BaseHandler<CopyHandler>
-{
- friend class CopyIterator;
- public:
- CopyHandler(IBaseHandler *parent);
- virtual ~CopyHandler();
- virtual void startCopy(const QXmlAttributes& attrib);
- virtual void endCopy();
- virtual void startParagraph(const QXmlAttributes& attrib);
-
- // IDocCopy
- virtual Kind kind() const { return DocImpl::Copy; }
- virtual IDocIterator *contents() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
-};
-
-class CopyIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- CopyIterator(const CopyHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing an preformatted section
- */
-class VerbatimHandler : public DocVerbatimImpl,
- public BaseHandler<VerbatimHandler>
-{
- public:
- VerbatimHandler(IBaseHandler *parent);
- virtual ~VerbatimHandler();
- void startVerbatim(const QXmlAttributes& attrib,Types type);
- void endVerbatim();
-
- // IDocVerbatim
- virtual Kind kind() const { return DocImpl::Verbatim; }
- virtual const IString *text() const { return &m_text; }
- virtual Types type() const { return m_type; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_text;
- Types m_type;
-};
-
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing an special symbol.
- *
- */
-// children: -
-class SymbolHandler : public DocSymbolImpl, public BaseHandler<SymbolHandler>
-{
- public:
- SymbolHandler(IBaseHandler *parent,Types type);
- virtual ~SymbolHandler();
- void startSymbol(const QXmlAttributes& attrib);
- void endSymbol();
-
- // IDocSymbol
- virtual Kind kind() const { return DocImpl::Symbol; }
- virtual Types type() const { return m_type; }
- virtual const IString *typeString() const { return &m_typeString; }
- virtual char letter() const { return m_letter; }
-
- private:
- IBaseHandler *m_parent;
- char m_letter;
- Types m_type;
- StringImpl m_typeString;
-};
-
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a section.
- *
- */
-// children: title, para, sect(n+1)
-class DocSectionHandler : public DocSectionImpl, public BaseHandler<DocSectionHandler>
-{
- friend class DocSectionParaIterator;
- friend class DocSectionSubIterator;
- public:
- DocSectionHandler(IBaseHandler *parent,int level);
- virtual ~DocSectionHandler();
- virtual void startDocSection(const QXmlAttributes& attrib);
- virtual void endDocSection();
- virtual void startTitle(const QXmlAttributes& attrib);
- virtual void startSubSection(const QXmlAttributes& attrib);
- virtual void startParagraph(const QXmlAttributes& attrib);
- virtual void startInternal(const QXmlAttributes& attrib);
-
- // IDocSection
- virtual Kind kind() const { return DocImpl::Section; }
- virtual const IString *id() const { return &m_id; }
- virtual int level() const { return m_level; }
- virtual IDocTitle *title() const { return m_title; }
- virtual IDocIterator *paragraphs() const;
- virtual IDocIterator *subSections() const;
- virtual IDocInternal *internal() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_paragraphs;
- QList<DocImpl> m_subsections;
- DocInternalHandler *m_internal;
- StringImpl m_id;
- int m_level;
- TitleHandler *m_title;
-};
-
-class DocSectionParaIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- DocSectionParaIterator(const DocSectionHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_paragraphs) {}
-};
-
-class DocSectionSubIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- DocSectionSubIterator(const DocSectionHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_subsections) {}
-};
-
-//-----------------------------------------------------------------------------
-
-class DocInternalHandler : public DocInternalImpl, public BaseHandler<DocInternalHandler>
-{
- public:
- friend class DocInternalParaIterator;
- friend class DocInternalSubIterator;
- DocInternalHandler(IBaseHandler *parent,int level);
- virtual ~DocInternalHandler();
- virtual void startInternal(const QXmlAttributes& attrib);
- virtual void endInternal();
- virtual void startSubSection(const QXmlAttributes& attrib);
- virtual void startParagraph(const QXmlAttributes& attrib);
-
- // IDocInternal
- virtual Kind kind() const { return DocImpl::Internal; }
- virtual IDocIterator *paragraphs() const;
- virtual IDocIterator *subSections() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_paragraphs;
- QList<DocImpl> m_subsections;
- int m_level;
-};
-
-class DocInternalParaIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- DocInternalParaIterator(const DocInternalHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_paragraphs) {}
-};
-
-class DocInternalSubIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- DocInternalSubIterator(const DocInternalHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_subsections) {}
-};
-
-
-//-----------------------------------------------------------------------------
-
-/*! \brief Node representing a documentation block.
- *
- */
-// children: para, title, sect1, internal
-class DocHandler : public DocRootImpl, public BaseHandler<DocHandler>
-{
- friend class DocIterator;
- public:
- virtual void startDoc(const QXmlAttributes& attrib);
- virtual void endDoc();
- virtual void startParagraph(const QXmlAttributes& attrib);
- virtual void startSect1(const QXmlAttributes& attrib);
- virtual void startTitle(const QXmlAttributes& attrib);
- virtual void startInternal(const QXmlAttributes& attrib);
-
- DocHandler(IBaseHandler *parent);
- virtual ~DocHandler();
-
- // IDocRoot
- virtual Kind kind() const { return DocImpl::Root; }
- virtual IDocIterator *contents() const;
- virtual IDocInternal *internal() const;
-
- private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
- DocInternalHandler *m_internal;
-};
-
-class DocIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
-{
- public:
- DocIterator(const DocHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
-};
-
-//-----------------------------------------------------------------------------
-
-void dochandler_init();
-void dochandler_exit();
-
-#endif
diff --git a/addon/doxmlparser/src/graphhandler.cpp b/addon/doxmlparser/src/graphhandler.cpp
deleted file mode 100644
index de30923..0000000
--- a/addon/doxmlparser/src/graphhandler.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-#include "graphhandler.h"
-
-class EdgeRelationMapper
-{
- public:
- EdgeRelationMapper()
- {
- m_map.insert("public-inheritance", IChildNode::PublicInheritance);
- m_map.insert("protected-inheritance", IChildNode::ProtectedInheritance);
- m_map.insert("private-inheritance", IChildNode::PrivateInheritance);
- m_map.insert("usage", IChildNode::Usage);
- m_map.insert("template-instance", IChildNode::TemplateInstance);
- }
- IChildNode::NodeRelation stringToNodeRelation(const QString &nrStr)
- {
- return m_map[nrStr];
- }
- private:
- QMap<QString,IChildNode::NodeRelation> m_map;
-};
-
-static EdgeRelationMapper *s_edgeRelationMapper;
-
-void graphhandler_init()
-{
- s_edgeRelationMapper = new EdgeRelationMapper;
-}
-
-void graphhandler_exit()
-{
- delete s_edgeRelationMapper;
-}
-
-//------------------------------------------------------------------------
-
-GraphHandler::GraphHandler(IBaseHandler *parent,const char *endTag)
- : m_parent(parent)
-{
- addEndHandler(endTag,this,&GraphHandler::endGraph);
- addStartHandler("node",this,&GraphHandler::startNode);
- m_nodes.setAutoDelete(TRUE);
- m_nodeDict = new QDict<NodeHandler>(1009);
-}
-
-GraphHandler::~GraphHandler()
-{
- delete m_nodeDict;
-}
-
-void GraphHandler::startGraph(const QXmlAttributes &)
-{
- debug(2,"startGraph\n");
- m_parent->setDelegate(this);
-}
-
-void GraphHandler::endGraph()
-{
- debug(2,"endGraph\n");
- m_parent->setDelegate(0);
-}
-
-void GraphHandler::startNode(const QXmlAttributes &attrib)
-{
- NodeHandler *n = new NodeHandler(this);
- n->startNode(attrib);
- m_nodes.append(n);
- m_nodeDict->insert(attrib.value("id").utf8(),n);
-}
-
-INodeIterator *GraphHandler::nodes() const
-{
- return new NodeIterator(*this);
-}
-
-NodeHandler *GraphHandler::getNodeById(const QString &id) const
-{
- return m_nodeDict->find(id.utf8());
-}
-
-//------------------------------------------------------------------------
-
-NodeHandler::NodeHandler(GraphHandler *gh)
- : m_parent(gh), m_graph(gh)
-{
- addEndHandler("node",this,&NodeHandler::endNode);
- addStartHandler("link",this,&NodeHandler::startLink);
- addEndHandler("link",this,&NodeHandler::endLink);
- addStartHandler("label",this,&NodeHandler::startLabel);
- addEndHandler("label",this,&NodeHandler::endLabel);
- addStartHandler("childnode",this,&NodeHandler::startChildNode);
- m_children.setAutoDelete(TRUE);
-}
-
-NodeHandler::~NodeHandler()
-{
-}
-
-void NodeHandler::startNode(const QXmlAttributes &attrib)
-{
- debug(2,"startNode\n");
- m_parent->setDelegate(this);
- m_id = attrib.value("id");
-}
-
-void NodeHandler::endNode()
-{
- debug(2,"endNode\n");
- m_parent->setDelegate(0);
-}
-
-void NodeHandler::startLink(const QXmlAttributes &attrib)
-{
- m_link = attrib.value("refid");
-}
-
-void NodeHandler::endLink()
-{
-}
-
-void NodeHandler::startLabel(const QXmlAttributes &/*attrib*/)
-{
- m_curString="";
-}
-
-void NodeHandler::endLabel()
-{
- m_label = m_curString;
-}
-
-void NodeHandler::startChildNode(const QXmlAttributes &attrib)
-{
- ChildNodeHandler *cnh = new ChildNodeHandler(this,m_graph);
- cnh->startChildNode(attrib);
- m_children.append(cnh);
-}
-
-IChildNodeIterator *NodeHandler::children() const
-{
- return new ChildNodeIterator(*this);
-}
-
-//------------------------------------------------------------------------
-
-ChildNodeHandler::ChildNodeHandler(IBaseHandler *parent,GraphHandler *gh)
- : m_parent(parent), m_graph(gh)
-{
- addEndHandler("childnode",this,&ChildNodeHandler::endChildNode);
- addStartHandler("edgelabel",this,&ChildNodeHandler::startEdgeLabel);
- m_edgeLabels.setAutoDelete(TRUE);
-}
-
-ChildNodeHandler::~ChildNodeHandler()
-{
-}
-
-void ChildNodeHandler::startChildNode(const QXmlAttributes &attrib)
-{
- debug(2,"startChildNode\n");
- m_id = attrib.value("refid");
- m_relationString = attrib.value("relation");
- m_relation = s_edgeRelationMapper->stringToNodeRelation(m_relationString);
- m_parent->setDelegate(this);
-}
-
-void ChildNodeHandler::endChildNode()
-{
- debug(2,"endChildNode\n");
- m_parent->setDelegate(0);
-}
-
-
-void ChildNodeHandler::startEdgeLabel(const QXmlAttributes &attrib)
-{
- EdgeLabelHandler *elh = new EdgeLabelHandler(this);
- elh->startEdgeLabel(attrib);
- m_edgeLabels.append(elh);
-}
-
-IEdgeLabelIterator *ChildNodeHandler::edgeLabels() const
-{
- return new EdgeLabelIterator(*this);
-}
-
-INode *ChildNodeHandler::node() const
-{
- return m_graph->getNodeById(m_id);
-}
-
-//-----------------------------------------------------------------------
-
-EdgeLabelHandler::EdgeLabelHandler(IBaseHandler *parent)
- : m_parent(parent)
-{
- addEndHandler("edgelabel",this,&EdgeLabelHandler::endEdgeLabel);
-}
-
-EdgeLabelHandler::~EdgeLabelHandler()
-{
-}
-
-void EdgeLabelHandler::startEdgeLabel(const QXmlAttributes &)
-{
- m_parent->setDelegate(this);
- m_curString="";
-}
-
-void EdgeLabelHandler::endEdgeLabel()
-{
- m_label=m_curString;
- m_parent->setDelegate(0);
-}
-
-
-
-
-
diff --git a/addon/doxmlparser/src/graphhandler.h b/addon/doxmlparser/src/graphhandler.h
deleted file mode 100644
index 783b9f2..0000000
--- a/addon/doxmlparser/src/graphhandler.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _GRAPHHANDLER_H
-#define _GRAPHHANDLER_H
-
-#include "stringimpl.h"
-#include "doxmlintf.h"
-#include "basehandler.h"
-#include "baseiterator.h"
-
-class NodeHandler;
-class ChildNodeHandler;
-class EdgeLabelHandler;
-
-class GraphHandler : public IGraph, public BaseHandler<GraphHandler>
-{
- friend class NodeIterator;
- public:
- GraphHandler(IBaseHandler *parent,const char *endTag);
- virtual ~GraphHandler();
-
- void startGraph(const QXmlAttributes &attrib);
- void endGraph();
- void startNode(const QXmlAttributes &attrib);
- NodeHandler *getNodeById(const QString &id) const;
-
- // IGraph
- virtual INodeIterator *nodes() const;
-
- private:
- IBaseHandler *m_parent;
- QList<NodeHandler> m_nodes;
- QDict<NodeHandler> *m_nodeDict;
-};
-
-//----------------------------------------------------------------------
-
-class NodeHandler : public INode, public BaseHandler<NodeHandler>
-{
- friend class ChildNodeIterator;
- public:
- NodeHandler(GraphHandler *gh);
- virtual ~NodeHandler();
-
- void startNode(const QXmlAttributes &attrib);
- void endNode();
- void startLabel(const QXmlAttributes &attrib);
- void endLabel();
- void startLink(const QXmlAttributes &attrib);
- void endLink();
- void startChildNode(const QXmlAttributes &attrib);
-
- // INode
- virtual const IString *id() const { return &m_id; }
- virtual const IString *label() const { return &m_label; }
- virtual const IString *linkId() const { return &m_link; }
- virtual IChildNodeIterator *children() const;
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_id;
- StringImpl m_label;
- StringImpl m_link;
- QList<ChildNodeHandler> m_children;
- GraphHandler *m_graph;
-};
-
-class NodeIterator : public BaseIterator<INodeIterator,INode,NodeHandler>
-{
- public:
- NodeIterator(const GraphHandler &handler) :
- BaseIterator<INodeIterator,INode,NodeHandler>(handler.m_nodes) {}
-};
-
-//----------------------------------------------------------------------
-
-class ChildNodeHandler : public IChildNode, public BaseHandler<ChildNodeHandler>
-{
- friend class EdgeLabelIterator;
- public:
- ChildNodeHandler(IBaseHandler *parent,GraphHandler *gh);
- virtual ~ChildNodeHandler();
-
- void startChildNode(const QXmlAttributes &attrib);
- void endChildNode();
- void startEdgeLabel(const QXmlAttributes &attrib);
-
- // IChildNode
- virtual INode *node() const;
- virtual NodeRelation relation() const { return m_relation; }
- virtual const IString * relationString() const { return &m_relationString; }
- virtual IEdgeLabelIterator *edgeLabels() const;
-
- private:
- IBaseHandler *m_parent;
- QString m_id;
- NodeRelation m_relation;
- StringImpl m_relationString;
- QList<EdgeLabelHandler> m_edgeLabels;
- GraphHandler *m_graph;
-};
-
-class ChildNodeIterator : public BaseIterator<IChildNodeIterator,IChildNode,ChildNodeHandler>
-{
- public:
- ChildNodeIterator(const NodeHandler &handler) :
- BaseIterator<IChildNodeIterator,IChildNode,ChildNodeHandler>(handler.m_children) {}
-};
-
-//----------------------------------------------------------------------
-
-class EdgeLabelHandler : public IEdgeLabel, public BaseHandler<EdgeLabelHandler>
-{
- friend class EdgeLabelIterator;
- public:
- EdgeLabelHandler(IBaseHandler *parent);
- virtual ~EdgeLabelHandler();
-
- void startEdgeLabel(const QXmlAttributes &attrib);
- void endEdgeLabel();
-
- // IEdgeLabel
- virtual const IString *label() const { return &m_label; }
-
- private:
- IBaseHandler *m_parent;
- StringImpl m_label;
-};
-
-class EdgeLabelIterator : public BaseIterator<IEdgeLabelIterator,IEdgeLabel,EdgeLabelHandler>
-{
- public:
- EdgeLabelIterator(const ChildNodeHandler &handler) :
- BaseIterator<IEdgeLabelIterator,IEdgeLabel,EdgeLabelHandler>(handler.m_edgeLabels) {}
-};
-
-void graphhandler_init();
-void graphhandler_exit();
-
-#endif
-
diff --git a/addon/doxmlparser/src/linkedtexthandler.cpp b/addon/doxmlparser/src/linkedtexthandler.cpp
deleted file mode 100644
index 140a48b..0000000
--- a/addon/doxmlparser/src/linkedtexthandler.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-#include "linkedtexthandler.h"
-#include "debug.h"
-#include <doxmlintf.h>
-#include "stringimpl.h"
-
-class LT_Text : public LinkedTextImpl, public ILT_Text
-{
- public:
- LT_Text(const QString &text) : m_text(text) {}
- virtual ~LT_Text() {}
-
- // ILT_Text
- virtual const IString *text() const { return &m_text; }
- virtual Kind kind() const { return LinkedTextImpl::Kind_Text; }
- private:
- StringImpl m_text;
-};
-
-class LT_Ref : public LinkedTextImpl, public ILT_Ref
-{
- public:
- LT_Ref() {}
- virtual ~LT_Ref() {}
- void setRefId(const QString &refId) { m_refId=refId; }
- void setText(const QString &text) { m_text=text; }
- void setExtId(const QString &extId) { m_extId=extId; }
- void setTargetKind(TargetKind k) { m_targetKind=k; }
-
- // ILT_Ref
- virtual const IString *text() const { return &m_text; }
- virtual const IString * id() const { return &m_refId; }
- virtual TargetKind targetKind() const { return m_targetKind; }
- virtual const IString *external() const { return &m_extId; }
- virtual Kind kind() const { return LinkedTextImpl::Kind_Ref; }
-
- private:
- StringImpl m_refId;
- StringImpl m_extId;
- StringImpl m_text;
- TargetKind m_targetKind = TargetKind::Member;
-};
-
-LinkedTextHandler::LinkedTextHandler(IBaseHandler *parent,
- QList<LinkedTextImpl> &children
- )
- : m_parent(parent), m_children(children)
-{
- addStartHandler("ref",this,&LinkedTextHandler::startRef);
- addEndHandler("ref",this,&LinkedTextHandler::endRef);
- m_children.setAutoDelete(TRUE);
- m_ref=0;
-}
-
-LinkedTextHandler::~LinkedTextHandler()
-{
-}
-
-void LinkedTextHandler::start(const char *endTag)
-{
- addEndHandler(endTag,this,&LinkedTextHandler::end);
- m_parent->setDelegate(this);
- m_curString="";
-}
-
-void LinkedTextHandler::end()
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(new LT_Text(m_curString));
- debug(2,"LinkedTextHandler: add text '%s'\n",m_curString.data());
- m_curString="";
- }
- m_parent->setDelegate(0);
-}
-
-void LinkedTextHandler::startRef(const QXmlAttributes& attrib)
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(new LT_Text(m_curString));
- debug(2,"LinkedTextHandler: add text '%s'\n",m_curString.data());
- m_curString="";
- }
- ASSERT(m_ref==0);
- m_ref = new LT_Ref;
- m_ref->setRefId(attrib.value("refid"));
- m_ref->setExtId(attrib.value("external"));
- ASSERT(attrib.value("kindref")=="compound" || attrib.value("kindref")=="member");
- m_ref->setTargetKind(attrib.value("kindref")=="compound" ? ILT_Ref::Compound : ILT_Ref::Member);
-}
-
-void LinkedTextHandler::endRef()
-{
- m_ref->setText(m_curString);
- m_children.append(m_ref);
- debug(2,"LinkedTextHandler: add ref '%s'\n",m_ref->text()->latin1());
- m_ref=0;
-}
-
-QString LinkedTextHandler::toString(const QList<LinkedTextImpl> &list)
-{
- QListIterator<LinkedTextImpl> li(list);
- QString result;
- LinkedTextImpl *lt;
- for (li.toFirst();(lt=li.current());++li)
- {
- switch(lt->kind())
- {
- case ILinkedText::Kind_Text:
- result+=dynamic_cast<ILT_Text*>(lt)->text()->latin1();
- break;
- case ILinkedText::Kind_Ref:
- result+=dynamic_cast<ILT_Ref *>(lt)->text()->latin1();
- break;
- }
- }
- return result;
-}
-
diff --git a/addon/doxmlparser/src/linkedtexthandler.h b/addon/doxmlparser/src/linkedtexthandler.h
deleted file mode 100644
index 816726e..0000000
--- a/addon/doxmlparser/src/linkedtexthandler.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-#ifndef LINKEDTEXTHANDLER_H
-#define LINKEDTEXTHANDLER_H
-
-#include "baseiterator.h"
-#include "basehandler.h"
-
-class LT_Ref;
-class LinkedTextImpl : public ILinkedText
-{
- public:
- virtual ~LinkedTextImpl() {}
-};
-
-class LinkedTextHandler : public BaseHandler<LinkedTextHandler>
-{
- public:
- LinkedTextHandler(IBaseHandler *parent,QList<LinkedTextImpl> &children);
- virtual ~LinkedTextHandler();
- virtual void start(const char *endTag);
- virtual void end();
- virtual void startRef(const QXmlAttributes& attrib);
- virtual void endRef();
- static QString toString(const QList<LinkedTextImpl> &list);
-
- // ILinkedText
-
- private:
- IBaseHandler *m_parent;
- QList<LinkedTextImpl> &m_children;
- LT_Ref *m_ref;
-};
-
-class LinkedTextIterator : public BaseIterator<ILinkedTextIterator,ILinkedText,LinkedTextImpl>
-{
- public:
- LinkedTextIterator(const QList<LinkedTextImpl> &list) :
- BaseIterator<ILinkedTextIterator,ILinkedText,LinkedTextImpl>(list) {}
-};
-
-#endif
diff --git a/addon/doxmlparser/src/loamhandler.cpp b/addon/doxmlparser/src/loamhandler.cpp
deleted file mode 100644
index 52aa576..0000000
--- a/addon/doxmlparser/src/loamhandler.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#include "loamhandler.h"
-#include "memberhandler.h"
-#include "linkedtexthandler.h"
-#include "paramhandler.h"
-
-
-ListOfAllMembersHandler::ListOfAllMembersHandler(IBaseHandler *parent) : m_parent(parent)
-{
- m_members.setAutoDelete(TRUE);
-
- addStartHandler("member",this,&ListOfAllMembersHandler::startMember);
- addStartHandler("name",this,&ListOfAllMembersHandler::startName);
- addEndHandler("name",this,&ListOfAllMembersHandler::endName);
- addStartHandler("scope",this,&ListOfAllMembersHandler::startScope);
- addEndHandler("scope",this,&ListOfAllMembersHandler::endScope);
-
- addEndHandler("listofallmembers",this,&ListOfAllMembersHandler::endListOfAllMembers);
-}
-
-void ListOfAllMembersHandler::initialize(MainHandler *mh)
-{
- QListIterator<MemberReference> mli(m_members);
- MemberReference *mr;
- for (;(mr=mli.current());++mli)
- {
- mr->initialize(mh);
- }
-}
-
-void ListOfAllMembersHandler::startMember(const QXmlAttributes& attrib)
-{
- MemberReference *mr = new MemberReference;
- mr->m_memId = attrib.value("refid");
- mr->m_virtualness = attrib.value("virt");
- mr->m_protection = attrib.value("prot");
- mr->m_ambiguityScope = attrib.value("ambiguityscope");
- m_members.append(new MemberReference);
-}
-
-void ListOfAllMembersHandler::startName(const QXmlAttributes&)
-{
- m_curString="";
-}
-
-void ListOfAllMembersHandler::endName()
-{
- ASSERT(m_members.getLast());
- m_members.getLast()->m_name = m_curString;
-}
-
-void ListOfAllMembersHandler::startScope(const QXmlAttributes&)
-{
- m_curString="";
-}
-
-void ListOfAllMembersHandler::endScope()
-{
- ASSERT(m_members.getLast());
- m_members.getLast()->m_scope = m_curString;
-}
-
-void ListOfAllMembersHandler::startListOfAllMembers(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"listofallmembers start\n");
-}
-
-void ListOfAllMembersHandler::endListOfAllMembers()
-{
- m_parent->setDelegate(0);
- debug(2,"listofallmembers end\n");
-}
-
-IMemberReferenceIterator *ListOfAllMembersHandler::members() const
-{
- return new MemberReferenceIterator(m_members);
-}
diff --git a/addon/doxmlparser/src/loamhandler.h b/addon/doxmlparser/src/loamhandler.h
deleted file mode 100644
index 48a9952..0000000
--- a/addon/doxmlparser/src/loamhandler.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _LOAMHANDLER_H
-#define _LOAMHANDLER_H
-
-#include <qstring.h>
-#include <qlist.h>
-#include <doxmlintf.h>
-
-#include "basehandler.h"
-
-class MainHandler;
-class MemberReference;
-
-class ListOfAllMembersHandler : public BaseHandler<ListOfAllMembersHandler>
-{
- public:
- virtual void startMember(const QXmlAttributes& attrib);
- virtual void startName(const QXmlAttributes& attrib);
- virtual void endName();
- virtual void startScope(const QXmlAttributes& attrib);
- virtual void endScope();
- virtual void startListOfAllMembers(const QXmlAttributes& attrib);
- virtual void endListOfAllMembers();
-
- ListOfAllMembersHandler(IBaseHandler *parent);
- virtual ~ListOfAllMembersHandler() {}
-
- void initialize(MainHandler *mh);
-
- virtual IMemberReferenceIterator *members() const;
-
- protected:
- IBaseHandler *m_parent;
- QList<MemberReference> m_members;
-};
-
-#endif
-
diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp
deleted file mode 100644
index a1ba216..0000000
--- a/addon/doxmlparser/src/mainhandler.cpp
+++ /dev/null
@@ -1,301 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#include <qxml.h>
-#include "mainhandler.h"
-#include "compoundhandler.h"
-#include "sectionhandler.h"
-#include "graphhandler.h"
-#include "dochandler.h"
-#include "memberhandler.h"
-#include "linkedtexthandler.h"
-#include "paramhandler.h"
-#include "debug.h"
-
-
-class ErrorHandler : public QXmlErrorHandler
-{
- public:
- virtual ~ErrorHandler() {}
- bool warning( const QXmlParseException & )
- {
- return FALSE;
- }
- bool error( const QXmlParseException & )
- {
- return FALSE;
- }
- bool fatalError( const QXmlParseException &exception )
- {
- debug(1,"Fatal error at line %d column %d: %s\n",
- exception.lineNumber(),exception.columnNumber(),
- exception.message().data());
- return FALSE;
- }
- QString errorString() { return ""; }
-
- private:
- QString errorMsg;
-};
-
-//--------------------------------------------------------------------------
-
-class CompoundEntryIterator : public ICompoundIterator,
- public QListIterator<CompoundEntry>
-{
- public:
- CompoundEntryIterator(const MainHandler *m,const QList<CompoundEntry> &list) :
- QListIterator<CompoundEntry>(list), m_mainHandler(m) {}
- virtual ~CompoundEntryIterator() {}
-
- virtual void toFirst()
- {
- QListIterator<CompoundEntry>::toFirst();
- }
- virtual void toLast()
- {
- QListIterator<CompoundEntry>::toLast();
- }
- virtual void toNext()
- {
- QListIterator<CompoundEntry>::operator++();
- }
- virtual void toPrev()
- {
- QListIterator<CompoundEntry>::operator--();
- }
- virtual ICompound *current() const
- {
- CompoundEntry *ch = QListIterator<CompoundEntry>::current();
- return ch ? m_mainHandler->compoundById(ch->id.utf8()) : 0;
- }
- virtual void release()
- { delete this; }
-
- private:
- const MainHandler *m_mainHandler;
-};
-
-//--------------------------------------------------------------------------
-
-MainHandler::MainHandler() : m_compoundDict(2999), m_compoundNameDict(2999),
- m_memberDict(12251), m_memberNameDict(12251),
- m_compoundsLoaded(1009)
-{
- m_compounds.setAutoDelete(TRUE);
- m_memberNameDict.setAutoDelete(TRUE);
- addStartHandler("doxygenindex");
- addEndHandler("doxygenindex");
- addStartHandler("compound",this,&MainHandler::startCompound);
- addEndHandler("compound");
- addStartHandler("member",this,&MainHandler::startMember);
- addEndHandler("member",this,&MainHandler::endMember);
- addStartHandler("name",this,&MainHandler::startName);
- addEndHandler("name",this,&MainHandler::endName);
- m_curCompound = 0;
- m_insideMember = FALSE;
-}
-
-MainHandler::~MainHandler()
-{
- debug(2,"MainHandler::~MainHandler()\n");
-}
-
-void MainHandler::startCompound(const QXmlAttributes& attrib)
-{
- m_curCompound = new CompoundEntry(257);
- m_curCompound->id = attrib.value("refid");
- m_compounds.append(m_curCompound);
- m_compoundDict.insert(m_curCompound->id.utf8(),m_curCompound);
-}
-
-void MainHandler::startName(const QXmlAttributes& /*attrib*/)
-{
- m_curString = "";
-}
-
-void MainHandler::endName()
-{
- if (m_insideMember)
- {
- m_curMember->name = m_curString;
- }
- else
- {
- m_curCompound->name = m_curString;
- m_compoundNameDict.insert(m_curString.utf8(),m_curCompound);
- }
-}
-
-void MainHandler::startMember(const QXmlAttributes& attrib)
-{
- m_insideMember = TRUE;
- m_curMember = new MemberEntry;
- m_curMember->id = attrib.value("refid");
- m_curMember->compound = m_curCompound;
- m_memberDict.insert(m_curMember->id.utf8(),m_curMember);
-}
-
-void MainHandler::endMember()
-{
- m_curCompound->memberDict.insert(m_curMember->name.utf8(),m_curMember);
- QList<CompoundEntry> *cel=0;
- if ((cel=m_memberNameDict.find(m_curMember->name.utf8()))==0)
- {
- cel = new QList<CompoundEntry>;
- m_memberNameDict.insert(m_curMember->name.utf8(),cel);
- }
- cel->append(m_curCompound);
- m_insideMember = FALSE;
-}
-
-void MainHandler::setDebugLevel(int level)
-{
- ::setDebugLevel(level);
-}
-
-void MainHandler::dump()
-{
- QListIterator<CompoundEntry> cli(m_compounds);
- CompoundEntry *ce;
- for (cli.toFirst();(ce=cli.current());++cli)
- {
- debug(2,"compound id='%s' name='%s'\n",ce->id.data(),ce->name.data());
- QDictIterator<MemberEntry> mdi(ce->memberDict);
- MemberEntry *me;
- for (mdi.toFirst();(me=mdi.current());++mdi)
- {
- debug(2," member id='%s' name='%s'\n",me->id.data(),me->name.data());
- }
- }
-}
-
-bool MainHandler::readXMLDir(const char * xmlDirName)
-{
- m_xmlDirName = xmlDirName;
- QString xmlFileName=m_xmlDirName+"/index.xml";
- QFile xmlFile(xmlFileName);
- //printf("Trying %s xmlFile.exists()=%d isReadable()=%d\n",
- // xmlFileName.data(),xmlFile.exists(),xmlFile.isReadable());
- if (xmlFile.exists())
- {
- ErrorHandler errorHandler;
- QXmlInputSource source( xmlFile );
- QXmlSimpleReader reader;
- reader.setContentHandler( this );
- reader.setErrorHandler( &errorHandler );
- reader.parse( source );
- dump();
- return TRUE;
- }
- return FALSE;
-}
-
-ICompoundIterator *MainHandler::compounds() const
-{
- return new CompoundEntryIterator(this,m_compounds);
-}
-
-ICompound *MainHandler::compoundById(const char *id) const
-{
- QString ids = id;
- if (ids.isEmpty()) return 0;
- CompoundHandler *ch = m_compoundsLoaded[ids.utf8()];
- if (ch) // compound already in memory
- {
- ch->addref(); // returning alias -> increase reference counter
- return ch->toICompound();
- }
- CompoundEntry *ce = m_compoundDict.find(ids.utf8());
- if (ce==0) return 0; // id not found
- // create and load a new compound
- ch = new CompoundHandler(m_xmlDirName);
- if (!ch->parseXML(id))
- {
- // compound could not be initialized.
- delete ch;
- return 0;
- }
-
- // we disregard the constness here, because the object stays conceptually
- // unchanged.
- MainHandler *that = (MainHandler *)this;
- ch->initialize(that);
- //printf("loading compound %s in memory\n",id);
- that->m_compoundsLoaded.insert(id,ch);
- return ch->toICompound();
-}
-
-void MainHandler::unloadCompound(CompoundHandler *ch)
-{
- //printf("unloading compound %s from memory\n",ch->id()->latin1());
- bool result = m_compoundsLoaded.remove(ch->id()->latin1());
- if (!result) debug(1,"Failed to unload component!\n");
-}
-
-ICompound *MainHandler::compoundByName(const char *name) const
-{
- QString nameStr = name;
- if (nameStr.isEmpty()) return 0;
- CompoundEntry *ce = m_compoundNameDict[name];
- if (ce==0) return 0; // name not found
- return compoundById(ce->id.utf8());
-}
-
-ICompound *MainHandler::memberById(const char *id) const
-{
- QString ids = id;
- if (ids.isEmpty()) return 0;
- MemberEntry *me = m_memberDict[id];
- if (me==0) return 0; // id not found
- return compoundById(me->compound->id.utf8());
-}
-
-ICompoundIterator *MainHandler::memberByName(const char *name) const
-{
- QString nameStr = name;
- if (nameStr.isEmpty()) return 0;
- QList<CompoundEntry> *cel = m_memberNameDict[name];
- if (cel==0) return 0; // name not found
- return new CompoundEntryIterator(this,*cel);
-}
-
-IDoxygen *createObjectModel()
-{
- compoundhandler_init();
- sectionhandler_init();
- memberhandler_init();
- dochandler_init();
- graphhandler_init();
- return new MainHandler;
-}
-
-void MainHandler::release()
-{
- //printf("MainHandler::release()\n");
- QDictIterator<CompoundHandler> chi(m_compoundsLoaded);
- CompoundHandler *ch;
- for (chi.toFirst();(ch=chi.current());++chi)
- {
- debug(1,"Compound %s not released\n",ch->name()->latin1());
- }
- graphhandler_exit();
- dochandler_exit();
- memberhandler_exit();
- sectionhandler_exit();
- compoundhandler_exit();
- delete this;
-}
-
diff --git a/addon/doxmlparser/src/mainhandler.h b/addon/doxmlparser/src/mainhandler.h
deleted file mode 100644
index 21e9b0a..0000000
--- a/addon/doxmlparser/src/mainhandler.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _MAINHANDLER_H
-#define _MAINHANDLER_H
-
-#include <qlist.h>
-
-#include <doxmlintf.h>
-#include "basehandler.h"
-
-class CompoundHandler;
-struct CompoundEntry;
-
-struct IndexEntry
-{
- QString id;
- QString name;
-};
-
-struct MemberEntry : public IndexEntry
-{
- CompoundEntry *compound;
-};
-
-struct CompoundEntry : public IndexEntry
-{
- CompoundEntry(int size) : memberDict(size)
- { memberDict.setAutoDelete(TRUE); }
- QDict<MemberEntry> memberDict;
-};
-
-class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
-{
- public:
- virtual void startCompound(const QXmlAttributes& attrib);
- virtual void startMember(const QXmlAttributes& attrib);
- virtual void endMember();
- virtual void startName(const QXmlAttributes& attrib);
- virtual void endName();
- MainHandler();
- virtual ~MainHandler();
-
- // IDoxygen
- ICompoundIterator *compounds() const;
- ICompound *compoundById(const char *id) const;
- virtual ICompound *compoundByName(const char *name) const;
- virtual ICompound *memberById(const char *id) const;
- virtual ICompoundIterator *memberByName(const char *name) const;
-
- virtual void release();
- void setDebugLevel(int level);
- bool readXMLDir(const char *dirName);
- void dump();
- void unloadCompound(CompoundHandler *ch);
-
- private:
- CompoundEntry *m_curCompound;
- MemberEntry *m_curMember;
- QList<CompoundEntry> m_compounds;
- QDict<CompoundEntry> m_compoundDict;
- QDict<CompoundEntry> m_compoundNameDict;
- QDict<MemberEntry> m_memberDict;
- QDict<QList<CompoundEntry> > m_memberNameDict;
- QString m_xmlDirName;
- QDict<CompoundHandler> m_compoundsLoaded;
- bool m_insideMember;
-};
-
-#endif
diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp
deleted file mode 100644
index df8c04f..0000000
--- a/addon/doxmlparser/src/memberhandler.cpp
+++ /dev/null
@@ -1,600 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#include "memberhandler.h"
-#include "sectionhandler.h"
-#include "dochandler.h"
-#include "mainhandler.h"
-#include "linkedtexthandler.h"
-#include "paramhandler.h"
-#include "compoundhandler.h"
-#include "debug.h"
-
-//------------------------------------------------------------------------------
-
-class MemberTypeMap
-{
- public:
- MemberTypeMap()
- {
- m_map.setAutoDelete(TRUE);
- m_map.insert("define",new int(IMember::Define));
- m_map.insert("property",new int(IMember::Property));
- m_map.insert("variable",new int(IMember::Variable));
- m_map.insert("typedef",new int(IMember::Typedef));
- m_map.insert("enum",new int(IMember::Enum));
- m_map.insert("function",new int(IMember::Function));
- m_map.insert("signal",new int(IMember::Signal));
- m_map.insert("prototype",new int(IMember::Prototype));
- m_map.insert("friend",new int(IMember::Friend));
- m_map.insert("dcop",new int(IMember::DCOP));
- m_map.insert("slot",new int(IMember::Slot));
- m_map.insert("enumvalue",new int(IMember::EnumValue));
- }
- IMember::MemberKind map(const QString &s)
- {
- int *val = m_map.find(s.utf8());
- if (val==0)
- {
- debug(1,"Warning: '%s' is an invalid member type\n",s.data());
- return IMember::Invalid;
- }
- else return (IMember::MemberKind)*val;
- }
- private:
- QDict<int> m_map;
-};
-
-static MemberTypeMap *s_typeMap;
-
-void memberhandler_init()
-{
- s_typeMap = new MemberTypeMap;
-}
-
-void memberhandler_exit()
-{
- delete s_typeMap;
-}
-
-//------------------------------------------------------------------------------
-
-void MemberReference::initialize(MainHandler *mh)
-{
- m_mainHandler = mh;
-}
-
-IMember *MemberReference::member() const
-{
- //return m_mainHandler->memberById(m_memId);
- return 0;
-}
-
-//------------------------------------------------------------------------------
-
-
-#if 0
-EnumValueHandler::EnumValueHandler(IBaseHandler *parent) :
- m_parent(parent), m_brief(0), m_detailed(0), m_linkedTextHandler(0)
-{
- addEndHandler("enumvalue",this,&EnumValueHandler::endEnumValue);
-
- addStartHandler("name",this,&EnumValueHandler::startName);
- addEndHandler("name",this,&EnumValueHandler::endName);
- addStartHandler("initializer",this,&EnumValueHandler::startInitializer);
-
- addStartHandler("briefdescription",this,&EnumValueHandler::startBriefDesc);
-
- addStartHandler("detaileddescription",this,&EnumValueHandler::startDetailedDesc);
-
- m_initializer.setAutoDelete(TRUE);
-}
-
-EnumValueHandler::~EnumValueHandler()
-{
- delete m_brief;
- delete m_detailed;
- delete m_linkedTextHandler;
-}
-
-void EnumValueHandler::startEnumValue(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
-}
-
-void EnumValueHandler::endEnumValue()
-{
- m_parent->setDelegate(0);
-}
-
-void EnumValueHandler::startName(const QXmlAttributes& /*attrib*/)
-{
- m_curString="";
-}
-
-void EnumValueHandler::endName()
-{
- m_name = m_curString;
-}
-
-void EnumValueHandler::startInitializer(const QXmlAttributes& /*attrib*/)
-{
- delete m_linkedTextHandler;
- m_linkedTextHandler = new LinkedTextHandler(this,m_initializer);
- m_linkedTextHandler->start("initializer");
-}
-
-void EnumValueHandler::startBriefDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_brief = docHandler;
-}
-
-void EnumValueHandler::startDetailedDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_detailed = docHandler;
-}
-#endif
-
-//------------------------------------------------------------------------------
-
-MemberHandler::MemberHandler(IBaseHandler *parent)
- : m_brief(0), m_detailed(0), m_inbody(0),
- m_compound(0), m_section(0), m_parent(parent)
-{
- //printf("MemberHandler::MemberHandler() %p\n",this);
- addEndHandler("memberdef",this,&MemberHandler::endMember);
-
- addStartHandler("templateparamlist",this,&MemberHandler::startTemplateParamList);
- addEndHandler("templateparamlist",this,&MemberHandler::endTemplateParamList);
-
- addStartHandler("type",this,&MemberHandler::startType);
-
- addStartHandler("definition",this,&MemberHandler::startDefinition);
- addEndHandler("definition",this,&MemberHandler::endDefinition);
-
- addStartHandler("argsstring",this,&MemberHandler::startArgsString);
- addEndHandler("argsstring",this,&MemberHandler::endArgsString);
-
- addStartHandler("name",this,&MemberHandler::startName);
- addEndHandler("name",this,&MemberHandler::endName);
-
- addStartHandler("read",this,&MemberHandler::startRead);
- addEndHandler("read",this,&MemberHandler::endRead);
-
- addStartHandler("write",this,&MemberHandler::startWrite);
- addEndHandler("write",this,&MemberHandler::endWrite);
-
- addStartHandler("reimplements",this,&MemberHandler::startReimplements);
- addEndHandler("reimplements",this,&MemberHandler::endReimplements);
-
- addStartHandler("reimplementedby",this,&MemberHandler::startReimplementedBy);
- addEndHandler("reimplementedby",this,&MemberHandler::endReimplementedBy);
-
- addStartHandler("param",this,&MemberHandler::startParam);
-
- addStartHandler("enumvalue",this,&MemberHandler::startEnumValue2);
- addEndHandler("enumvalue",this,&MemberHandler::endMember);
-
- addStartHandler("initializer",this,&MemberHandler::startInitializer);
- addStartHandler("exceptions",this,&MemberHandler::startException);
-
- addStartHandler("briefdescription",this,&MemberHandler::startBriefDesc);
-
- addStartHandler("detaileddescription",this,&MemberHandler::startDetailedDesc);
-
- addStartHandler("inbodydescription",this,&MemberHandler::startInbodyDesc);
-
- addStartHandler("location",this,&MemberHandler::startLocation);
- addEndHandler("location");
-
- addStartHandler("references",this,&MemberHandler::startReferences);
- addEndHandler("references",this,&MemberHandler::endReferences);
-
- addStartHandler("referencedby",this,&MemberHandler::startReferencedBy);
- addEndHandler("referencedby",this,&MemberHandler::endReferencedBy);
-
- m_type.setAutoDelete(TRUE);
- m_initializer.setAutoDelete(TRUE);
- m_exception.setAutoDelete(TRUE);
- m_params.setAutoDelete(TRUE);
- m_references.setAutoDelete(TRUE);
- m_referencedBy.setAutoDelete(TRUE);
- m_reimplements = 0;
- m_reimplementedBy.setAutoDelete(TRUE);
- m_enumValues.setAutoDelete(TRUE);
- m_linkedTextHandler = 0;
- m_defLine=0;
- m_bodyStart=0;
- m_bodyEnd=0;
- m_insideTemplateParamList=FALSE;
- m_hasTemplateParamList=FALSE;
-}
-
-MemberHandler::~MemberHandler()
-{
- debug(2,"MemberHandler::~MemberHandler() %p\n",this);
- delete m_brief;
- delete m_detailed;
- delete m_inbody;
- delete m_linkedTextHandler;
- delete m_reimplements;
-}
-
-void MemberHandler::startMember(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- m_kindString = attrib.value("kind");
- //printf("startMember kindString='%s'\n",m_kindString.data());
- m_kind = s_typeMap->map(m_kindString);
- m_id = attrib.value("id");
- m_protection = attrib.value("prot");
- m_isStatic = attrib.value("static")=="yes";
- m_isConst = attrib.value("const")=="yes";
- m_isExplicit = attrib.value("explicit")=="yes";
- m_isInline = attrib.value("inline")=="yes";
- m_virtualness = attrib.value("virt");
- m_isVolatile = attrib.value("volatile")=="yes";
- m_isMutable = attrib.value("mutable")=="yes";
- m_isReadable = attrib.value("readable")=="yes";
- m_isWritable = attrib.value("writable")=="yes";
-
- debug(2,"member kind='%s' id='%s' prot='%s' virt='%s'\n",
- m_kindString.data(),m_id.data(),m_protection.data(),m_virtualness.data());
-}
-
-void MemberHandler::startEnumValue(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- m_kindString = "enumvalue";
- //printf("startEnumValue kindString='%s'\n",m_kindString.data());
- m_kind = s_typeMap->map(m_kindString);
- m_id = attrib.value("id");
- m_protection = attrib.value("prot");
- m_isStatic = FALSE;
- m_isConst = FALSE;
- m_isExplicit = FALSE;
- m_isInline = FALSE;
- m_virtualness = "non-virtual";
- m_isVolatile = FALSE;
- m_isMutable = FALSE;
- m_isReadable = FALSE;
- m_isWritable = FALSE;
- debug(2,"member kind='%s' id='%s' prot='%s' virt='%s'\n",
- m_kindString.data(),m_id.data(),m_protection.data(),m_virtualness.data());
-}
-
-void MemberHandler::startEnumValue2(const QXmlAttributes& attrib)
-{
- MemberHandler *mh = new MemberHandler(this);
- mh->startEnumValue(attrib);
- m_enumValues.append(mh);
-}
-
-
-void MemberHandler::startBriefDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_brief = docHandler;
-}
-
-void MemberHandler::startDetailedDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_detailed = docHandler;
-}
-
-void MemberHandler::startInbodyDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_inbody = docHandler;
-}
-
-void MemberHandler::startLocation(const QXmlAttributes& attrib)
-{
- m_defFile = attrib.value("file");
- m_bodyFile = attrib.value("bodyfile");
- QString s;
- s = attrib.value("line");
- if (!s.isEmpty()) m_defLine=s.toInt();
- s = attrib.value("bodystart");
- if (!s.isEmpty()) m_bodyStart=s.toInt();
- s = attrib.value("bodyend");
- if (!s.isEmpty()) m_bodyEnd=s.toInt();
-}
-
-void MemberHandler::startReferences(const QXmlAttributes& attrib)
-{
- MemberReference *mr = new MemberReference;
- mr->m_memId = attrib.value("refid");
- m_references.append(mr);
- m_curString="";
-}
-
-void MemberHandler::endReferences()
-{
- m_references.getLast()->m_name = m_curString;
-}
-
-void MemberHandler::startReferencedBy(const QXmlAttributes& attrib)
-{
- MemberReference *mr = new MemberReference;
- mr->m_memId = attrib.value("refid");
- m_referencedBy.append(mr);
- m_curString="";
-}
-
-void MemberHandler::endReferencedBy()
-{
- m_referencedBy.getLast()->m_name = m_curString;
-}
-
-void MemberHandler::startReimplements(const QXmlAttributes& attrib)
-{
- m_reimplements = new MemberReference;
- m_reimplements->m_memId = attrib.value("refid");
- m_curString="";
-}
-
-void MemberHandler::endReimplements()
-{
- m_reimplements->m_name = m_curString;
-}
-
-void MemberHandler::startReimplementedBy(const QXmlAttributes& attrib)
-{
- MemberReference *mr = new MemberReference;
- mr->m_memId = attrib.value("refid");
- m_reimplementedBy.append(mr);
- m_curString="";
-}
-
-void MemberHandler::endReimplementedBy()
-{
- m_reimplementedBy.getLast()->m_name = m_curString;
-}
-
-void MemberHandler::endMember()
-{
- m_parent->setDelegate(0);
-}
-
-void MemberHandler::startType(const QXmlAttributes &)
-{
- debug(2,"startType!\n");
- delete m_linkedTextHandler;
- m_linkedTextHandler = new LinkedTextHandler(this,m_type);
- m_linkedTextHandler->start("type");
-}
-
-void MemberHandler::startInitializer(const QXmlAttributes &)
-{
- debug(2,"startInitializer!\n");
- delete m_linkedTextHandler;
- m_linkedTextHandler = new LinkedTextHandler(this,m_initializer);
- m_linkedTextHandler->start("initializer");
-}
-
-void MemberHandler::startException(const QXmlAttributes &)
-{
- debug(2,"startException!\n");
- delete m_linkedTextHandler;
- m_linkedTextHandler = new LinkedTextHandler(this,m_exception);
- m_linkedTextHandler->start("exceptions");
-}
-
-void MemberHandler::startName(const QXmlAttributes &)
-{
- m_curString="";
-}
-
-void MemberHandler::endName()
-{
- m_name = m_curString.stripWhiteSpace();
- debug(2,"member name='%s'\n",m_name.data());
-}
-
-void MemberHandler::startRead(const QXmlAttributes &)
-{
- m_curString="";
-}
-
-void MemberHandler::endRead()
-{
- m_read = m_curString.stripWhiteSpace();
- debug(2,"member read='%s'\n",m_read.data());
-}
-
-void MemberHandler::startWrite(const QXmlAttributes &)
-{
- m_curString="";
-}
-
-void MemberHandler::endWrite()
-{
- m_write = m_curString.stripWhiteSpace();
- debug(2,"member write='%s'\n",m_write.data());
-}
-
-void MemberHandler::startDefinition(const QXmlAttributes&)
-{
- m_curString="";
-}
-
-void MemberHandler::endDefinition()
-{
- m_definition = m_curString.stripWhiteSpace();
- debug(2,"definition=%s\n",m_definition.data());
-}
-
-void MemberHandler::startArgsString(const QXmlAttributes&)
-{
- m_curString="";
-}
-
-void MemberHandler::endArgsString()
-{
- m_argsstring = m_curString.stripWhiteSpace();
- debug(2,"argstring=%s\n",m_argsstring.data());
-}
-
-void MemberHandler::startParam(const QXmlAttributes& attrib)
-{
- ParamHandler *paramHandler = new ParamHandler(this);
- paramHandler->startParam(attrib);
- if (m_insideTemplateParamList)
- {
- m_templateParams.append(paramHandler);
- }
- else
- {
- m_params.append(paramHandler);
- }
-}
-
-void MemberHandler::startTemplateParamList(const QXmlAttributes&)
-{
- m_insideTemplateParamList = TRUE;
- m_hasTemplateParamList = TRUE;
-}
-
-void MemberHandler::endTemplateParamList()
-{
- m_insideTemplateParamList = FALSE;
-}
-
-void MemberHandler::initialize(MainHandler *mh)
-{
- {
- QListIterator<MemberReference> mli(m_references);
- MemberReference *mr;
- for (;(mr=mli.current());++mli)
- {
- mr->initialize(mh);
- }
- }
- {
- QListIterator<MemberReference> mli(m_referencedBy);
- MemberReference *mr;
- for (;(mr=mli.current());++mli)
- {
- mr->initialize(mh);
- }
- }
- {
- QListIterator<MemberReference> mli(m_reimplementedBy);
- MemberReference *mr;
- for (;(mr=mli.current());++mli)
- {
- mr->initialize(mh);
- }
- }
- if (m_reimplements) m_reimplements->initialize(mh);
-}
-
-void MemberHandler::setCompoundHandler(CompoundHandler *c)
-{
- m_compound = c;
-}
-
-ICompound *MemberHandler::compound() const
-{
- m_compound->addref();
- return m_compound->toICompound();
-}
-
-void MemberHandler::setSectionHandler(SectionHandler *c)
-{
- m_section = c;
-}
-
-ISection *MemberHandler::section() const
-{
- return m_section;
-}
-
-IMemberIterator *MemberHandler::enumValues() const
-{
- return new MemberIterator(m_enumValues);
-}
-
-ILinkedTextIterator *MemberHandler::type() const
-{
- return new LinkedTextIterator(m_type);
-}
-
-const IString *MemberHandler::typeString() const
-{
- MemberHandler *that = (MemberHandler *)this;
- that->m_typeString = LinkedTextHandler::toString(m_type);
- return &m_typeString;
-}
-
-IParamIterator *MemberHandler::parameters() const
-{
- return new ParamIterator(m_params);
-}
-
-IParamIterator *MemberHandler::templateParameters() const
-{
- return m_hasTemplateParamList ? new ParamIterator(m_templateParams) : 0;
-}
-
-IMemberReferenceIterator *MemberHandler::references() const
-{
- return new MemberReferenceIterator(m_references);
-}
-
-IMemberReferenceIterator *MemberHandler::referencedBy() const
-{
- return new MemberReferenceIterator(m_referencedBy);
-}
-
-ILinkedTextIterator *MemberHandler::initializer() const
-{
- return new LinkedTextIterator(m_initializer);
-}
-
-ILinkedTextIterator *MemberHandler::exceptions() const
-{
- return new LinkedTextIterator(m_exception);
-}
-
-IMemberReferenceIterator *MemberHandler::reimplementedBy() const
-{
- return new MemberReferenceIterator(m_reimplementedBy);
-}
-
-IDocRoot *MemberHandler::briefDescription() const
-{
- return m_brief;
-}
-
-IDocRoot *MemberHandler::detailedDescription() const
-{
- return m_detailed;
-}
-
-IDocRoot *MemberHandler::inbodyDescription() const
-{
- return m_inbody;
-}
-
diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h
deleted file mode 100644
index 7438172..0000000
--- a/addon/doxmlparser/src/memberhandler.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _MEMBERHANDLER_H
-#define _MEMBERHANDLER_H
-
-#include <qstring.h>
-#include <qlist.h>
-#include <qxml.h>
-#include <doxmlintf.h>
-
-#include "basehandler.h"
-#include "baseiterator.h"
-#include "stringimpl.h"
-
-class MainHandler;
-class CompoundHandler;
-class SectionHandler;
-class ParamHandler;
-class LinkedTextImpl;
-class LinkedTextHandler;
-class DocHandler;
-
-class MemberReference : public IMemberReference
-{
- public:
- virtual ~MemberReference() {}
- virtual IMember *member() const;
- virtual const IString *name() const { return &m_name; }
- virtual const IString *scope() const { return &m_scope; }
- virtual const IString *protection() const { return &m_protection; }
- virtual const IString *virtualness() const { return &m_virtualness; }
- virtual const IString *ambiguityScope() const { return &m_ambiguityScope; }
- void initialize(MainHandler *m);
-
- QString m_memId;
- StringImpl m_name;
- StringImpl m_scope;
- StringImpl m_virtualness;
- StringImpl m_protection;
- StringImpl m_ambiguityScope;
- MainHandler *m_mainHandler;
-};
-
-class MemberReferenceIterator : public BaseIterator<IMemberReferenceIterator,IMemberReference,MemberReference>
-{
- public:
- MemberReferenceIterator(const QList<MemberReference> &list) :
- BaseIterator<IMemberReferenceIterator,IMemberReference,MemberReference>(list) {}
-};
-
-class MemberHandler : public IDefine,
- public IProperty,
- public IVariable,
- public ITypedef,
- public IFunction,
- public ISignal,
- public IPrototype,
- public IFriend,
- public IDCOP,
- public ISlot,
- public IEnum,
- public IEnumValue,
- public BaseHandler<MemberHandler>
-{
- public:
- virtual void startMember(const QXmlAttributes& attrib);
- virtual void endMember();
- virtual void startParam(const QXmlAttributes& attrib);
- virtual void startType(const QXmlAttributes& attrib);
- virtual void startName(const QXmlAttributes& attrib);
- virtual void endName();
- virtual void startRead(const QXmlAttributes& attrib);
- virtual void endRead();
- virtual void startWrite(const QXmlAttributes& attrib);
- virtual void endWrite();
- virtual void startDefinition(const QXmlAttributes& attrib);
- virtual void endDefinition();
- virtual void startArgsString(const QXmlAttributes& attrib);
- virtual void endArgsString();
- virtual void startBriefDesc(const QXmlAttributes& attrib);
- virtual void startDetailedDesc(const QXmlAttributes& attrib);
- virtual void startInbodyDesc(const QXmlAttributes& attrib);
- virtual void startLocation(const QXmlAttributes& attrib);
- virtual void startReferences(const QXmlAttributes& attrib);
- virtual void endReferences();
- virtual void startReferencedBy(const QXmlAttributes& attrib);
- virtual void endReferencedBy();
- virtual void startReimplements(const QXmlAttributes& attrib);
- virtual void endReimplements();
- virtual void startReimplementedBy(const QXmlAttributes& attrib);
- virtual void endReimplementedBy();
- virtual void startInitializer(const QXmlAttributes& attrib);
- virtual void startException(const QXmlAttributes& attrib);
- virtual void startEnumValue(const QXmlAttributes& attrib);
- virtual void startEnumValue2(const QXmlAttributes& attrib);
- virtual void startTemplateParamList(const QXmlAttributes &attrib);
- virtual void endTemplateParamList();
-
- MemberHandler(IBaseHandler *parent);
- virtual ~MemberHandler();
-
- // IMember implementation
- virtual ICompound *compound() const;
- virtual ISection *section() const;
- virtual MemberKind kind() const
- { return m_kind; }
- virtual const IString *kindString() const
- { return &m_kindString; }
- virtual const IString *id() const
- { return &m_id; }
- virtual const IString *protection() const
- { return &m_protection; }
- virtual const IString *virtualness() const
- { return &m_virtualness; }
- virtual const IString *name() const
- { return &m_name; }
- virtual const IString *readAccessor() const
- { return &m_read; }
- virtual const IString *writeAccessor() const
- { return &m_write; }
- virtual const IString *definition() const
- { return &m_definition; }
- virtual const IString *argsstring() const
- { return &m_argsstring; }
- virtual bool isConst() const
- { return m_isConst; }
- virtual bool isVolatile() const
- { return m_isVolatile; }
- virtual bool isStatic() const
- { return m_isStatic; }
- virtual bool isExplicit() const
- { return m_isExplicit; }
- virtual bool isInline() const
- { return m_isInline; }
- virtual bool isMutable() const
- { return m_isMutable; }
- virtual bool isReadable() const
- { return m_isReadable; }
- virtual bool isWritable() const
- { return m_isWritable; }
- virtual ILinkedTextIterator *type() const;
- virtual const IString *typeString() const;
- virtual IParamIterator *parameters() const;
- virtual IParamIterator *templateParameters() const;
- virtual IMemberReferenceIterator *references() const;
- virtual IMemberReferenceIterator *referencedBy() const;
- virtual ILinkedTextIterator *initializer() const;
- virtual ILinkedTextIterator *exceptions() const;
- virtual const IString *bodyFile() const
- { return &m_bodyFile; }
- virtual int bodyStart() const
- { return m_bodyStart; }
- virtual int bodyEnd() const
- { return m_bodyEnd; }
- virtual const IString *definitionFile() const
- { return &m_defFile; }
- virtual int definitionLine() const
- { return m_defLine; }
- virtual IMemberReference *reimplements() const
- { return m_reimplements; }
- virtual IMemberReferenceIterator *reimplementedBy() const;
- virtual IDocRoot *briefDescription() const;
- virtual IDocRoot *detailedDescription() const;
- virtual IDocRoot *inbodyDescription() const;
-
- // IEnum
- virtual IMemberIterator *enumValues() const;
-
- void initialize(MainHandler *m);
- void setCompoundHandler(CompoundHandler *c);
- void setSectionHandler(SectionHandler *s);
-
- private:
- // XML elements:
- // -----------------
- QList<ParamHandler> m_templateParams; // templateparamlist
- QList<LinkedTextImpl> m_type; // type
- StringImpl m_definition; // definition
- StringImpl m_argsstring; // argsstring
- StringImpl m_name; // name
- StringImpl m_read; // read
- StringImpl m_write; // write
- MemberReference *m_reimplements; // reimplements
- QList<MemberReference> m_reimplementedBy; // reimplementedby
- QList<ParamHandler> m_params; // param
- QList<MemberHandler> m_enumValues; // enumvalue
- QList<LinkedTextImpl> m_initializer; // initializer
- QList<LinkedTextImpl> m_exception; // exceptions
- DocHandler *m_brief; // briefdescription
- DocHandler *m_detailed; // detaileddescription
- DocHandler *m_inbody; // inbodydescription
- // location
- StringImpl m_defFile; // - file
- int m_defLine; // - line
- StringImpl m_bodyFile; // - bodyfile
- int m_bodyStart; // - bodystart
- int m_bodyEnd; // - bodyend
- QList<MemberReference> m_references; // references
- QList<MemberReference> m_referencedBy; // referencedby
-
- // XML attributes:
- // ---------------
- MemberKind m_kind; // kind
- StringImpl m_kindString; // kind as a string
- StringImpl m_id; // id
- StringImpl m_protection; // prot
- bool m_isStatic; // static
- bool m_isConst; // const
- bool m_isExplicit; // explicit
- bool m_isInline; // inline
- StringImpl m_virtualness; // virt
- bool m_isVolatile; // volatile
- bool m_isMutable; // mutable
- bool m_isReadable; // readable
- bool m_isWritable; // writable
-
- CompoundHandler *m_compound;
- SectionHandler *m_section;
- StringImpl m_typeString;
- LinkedTextHandler *m_linkedTextHandler;
- bool m_insideTemplateParamList;
- bool m_hasTemplateParamList;
- IBaseHandler *m_parent;
-};
-
-class MemberIterator : public BaseIteratorVia<IMemberIterator,
- IMember,
- MemberHandler,
- IFunction>
-{
- public:
- MemberIterator(const QList<MemberHandler> &list) :
- BaseIteratorVia<IMemberIterator,IMember,MemberHandler,IFunction>(list) {}
-};
-
-void memberhandler_init();
-void memberhandler_exit();
-
-#endif
diff --git a/addon/doxmlparser/src/paramhandler.cpp b/addon/doxmlparser/src/paramhandler.cpp
deleted file mode 100644
index 7a6f455..0000000
--- a/addon/doxmlparser/src/paramhandler.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#include "paramhandler.h"
-#include "memberhandler.h"
-#include "linkedtexthandler.h"
-#include "debug.h"
-#include "dochandler.h"
-
-TemplateParamListHandler::TemplateParamListHandler(IBaseHandler *parent) : m_parent(parent)
-{
- addStartHandler("param",this,&TemplateParamListHandler::startParam);
-
- addEndHandler("templateparamlist",this,&TemplateParamListHandler::endTemplateParamList);
-}
-
-void TemplateParamListHandler::startParam(const QXmlAttributes& attrib)
-{
- ParamHandler *ph = new ParamHandler(this);
- ph->startParam(attrib);
- m_templateParams.append(ph);
-}
-
-void TemplateParamListHandler::endParam()
-{
-}
-
-void TemplateParamListHandler::startTemplateParamList(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"templateparamlist\n");
-}
-
-void TemplateParamListHandler::endTemplateParamList()
-{
- m_parent->setDelegate(0);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////
-
-ParamHandler::ParamHandler(IBaseHandler *parent) : m_brief(0), m_parent(parent)
-{
- addEndHandler("param",this,&ParamHandler::endParam);
-
- addStartHandler("type",this,&ParamHandler::startType);
-
- addStartHandler("declname");
- addEndHandler("declname",this,&ParamHandler::endDeclName);
-
- addStartHandler("defname");
- addEndHandler("defname",this,&ParamHandler::endDefName);
-
- addStartHandler("array");
- addEndHandler("array",this,&ParamHandler::endArray);
-
- addStartHandler("attribute");
- addEndHandler("attribute",this,&ParamHandler::endAttrib);
-
- addStartHandler("briefdescription",this,&ParamHandler::startBriefDesc);
-
- addStartHandler("defval",this,&ParamHandler::startDefVal);
-
- m_linkedTextHandler = 0;
-}
-
-ParamHandler::~ParamHandler()
-{
- delete m_brief;
- delete m_linkedTextHandler;
-}
-
-void ParamHandler::startParam(const QXmlAttributes& /*attrib*/)
-{
- m_parent->setDelegate(this);
- debug(2,"param\n");
-}
-
-void ParamHandler::endParam()
-{
- m_parent->setDelegate(0);
-}
-
-void ParamHandler::startType(const QXmlAttributes& /*attrib*/)
-{
- delete m_linkedTextHandler;
- m_linkedTextHandler = new LinkedTextHandler(this,m_type);
- m_linkedTextHandler->start("type");
- debug(2,"param type\n");
-}
-
-void ParamHandler::endDeclName()
-{
- m_declName = m_curString.stripWhiteSpace();
- debug(2,"member declName='%s'\n",m_declName.data());
-}
-
-void ParamHandler::endDefName()
-{
- m_defName = m_curString.stripWhiteSpace();
- debug(2,"member defName='%s'\n",m_defName.data());
-}
-
-void ParamHandler::endAttrib()
-{
- m_attrib = m_curString.stripWhiteSpace();
- debug(2,"member attrib='%s'\n",m_attrib.data());
-}
-
-void ParamHandler::endArray()
-{
- m_array = m_curString.stripWhiteSpace();
- debug(2,"member array='%s'\n",m_array.data());
-}
-
-void ParamHandler::startDefVal(const QXmlAttributes& /*attrib*/)
-{
- delete m_linkedTextHandler;
- m_linkedTextHandler = new LinkedTextHandler(this,m_defVal);
- m_linkedTextHandler->start("defval");
- debug(2,"member defVal\n");
-}
-
-void ParamHandler::startBriefDesc(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_brief = docHandler;
-}
-
-ILinkedTextIterator *ParamHandler::type() const
-{
- return new LinkedTextIterator(m_type);
-}
-
-ILinkedTextIterator *ParamHandler::defaultValue() const
-{
- return new LinkedTextIterator(m_defVal);
-}
-
-IDocRoot *ParamHandler::briefDescription() const
-{
- return m_brief;
-}
-
-
-
diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h
deleted file mode 100644
index 3f0f09b..0000000
--- a/addon/doxmlparser/src/paramhandler.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _PARAMHANDLER_H
-#define _PARAMHANDLER_H
-
-#include <qstring.h>
-#include <qlist.h>
-#include <qxml.h>
-#include <doxmlintf.h>
-
-#include "stringimpl.h"
-#include "basehandler.h"
-#include "baseiterator.h"
-
-class LinkedTextImpl;
-class LinkedTextHandler;
-class DocHandler;
-
-
-class ParamHandler : public IParam, public BaseHandler<ParamHandler>
-{
- public:
- virtual void startParam(const QXmlAttributes& attrib);
- virtual void endParam();
- virtual void startType(const QXmlAttributes& attrib);
- virtual void endDeclName();
- virtual void endDefName();
- virtual void endAttrib();
- virtual void endArray();
- virtual void startDefVal(const QXmlAttributes& attrib);
- virtual void startBriefDesc(const QXmlAttributes& attrib);
-
- ParamHandler(IBaseHandler *parent);
- virtual ~ParamHandler();
-
- // IParam
- virtual ILinkedTextIterator *type() const;
- virtual const IString * declarationName() const { return &m_declName; }
- virtual const IString * definitionName() const { return &m_defName; }
- virtual const IString * attrib() const { return &m_attrib; }
- virtual const IString * arraySpecifier() const { return &m_array; }
- virtual ILinkedTextIterator *defaultValue() const;
- virtual IDocRoot *briefDescription() const;
-
- private:
-
- // XML elements:
- // -------------
- QList<LinkedTextImpl> m_type; // type
- StringImpl m_declName; // declname
- StringImpl m_defName; // defname
- StringImpl m_array; // array
- QList<LinkedTextImpl> m_defVal; // defval
- DocHandler *m_brief; // briefdescription
-
- StringImpl m_attrib; // TODO: not yet in XML output
-
- IBaseHandler *m_parent;
- LinkedTextHandler *m_linkedTextHandler;
-};
-
-class ParamIterator : public BaseIterator<IParamIterator,IParam,ParamHandler>
-{
- public:
- ParamIterator(const QList<ParamHandler> &list) :
- BaseIterator<IParamIterator,IParam,ParamHandler>(list) {}
-};
-
-class TemplateParamListHandler : public BaseHandler<TemplateParamListHandler>
-{
- public:
-
- virtual void startParam(const QXmlAttributes& attrib);
- virtual void endParam();
-
- virtual void startTemplateParamList(const QXmlAttributes& attrib);
- virtual void endTemplateParamList();
-
- TemplateParamListHandler(IBaseHandler *parent);
- virtual ~TemplateParamListHandler() {}
-
- ParamIterator* templateParams() { return new ParamIterator(m_templateParams); }
-
- protected:
- IBaseHandler *m_parent;
- QList<ParamHandler> m_templateParams;
-};
-
-
-#endif
diff --git a/addon/doxmlparser/src/sectionhandler.cpp b/addon/doxmlparser/src/sectionhandler.cpp
deleted file mode 100644
index b6cc31e..0000000
--- a/addon/doxmlparser/src/sectionhandler.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#include "mainhandler.h"
-#include "compoundhandler.h"
-#include "sectionhandler.h"
-#include "memberhandler.h"
-#include "linkedtexthandler.h"
-#include "paramhandler.h"
-#include "dochandler.h"
-#include "debug.h"
-
-class SectionTypeMap
-{
- public:
- SectionTypeMap() : m_map(37)
- {
- m_map.setAutoDelete(TRUE);
- m_map.insert("user-defined",new int(ISection::UserDefined));
- m_map.insert("public-type",new int(ISection::PubTypes));
- m_map.insert("public-func",new int(ISection::PubFuncs));
- m_map.insert("public-attrib",new int(ISection::PubAttribs));
- m_map.insert("public-slot",new int(ISection::PubSlots));
- m_map.insert("signal",new int(ISection::Signals));
- m_map.insert("dcop-func",new int(ISection::DCOPFuncs));
- m_map.insert("property",new int(ISection::Properties));
- m_map.insert("event",new int(ISection::Events));
- m_map.insert("public-static-func",new int(ISection::PubStatFuncs));
- m_map.insert("public-static-attrib",new int(ISection::PubStatAttribs));
- m_map.insert("protected-type",new int(ISection::ProTypes));
- m_map.insert("protected-func",new int(ISection::ProFuncs));
- m_map.insert("protected-attrib",new int(ISection::ProAttribs));
- m_map.insert("protected-slot",new int(ISection::ProSlots));
- m_map.insert("protected-static-func",new int(ISection::ProStatFuncs));
- m_map.insert("protected-static-attrib",new int(ISection::ProStatAttribs));
- m_map.insert("package-type",new int(ISection::PacTypes));
- m_map.insert("package-func",new int(ISection::PacFuncs));
- m_map.insert("package-attrib",new int(ISection::PacAttribs));
- m_map.insert("package-static-func",new int(ISection::PacStatFuncs));
- m_map.insert("package-static-attrib",new int(ISection::PacStatAttribs));
- m_map.insert("private-type",new int(ISection::PriTypes));
- m_map.insert("private-func",new int(ISection::PriFuncs));
- m_map.insert("private-attrib",new int(ISection::PriAttribs));
- m_map.insert("private-slot",new int(ISection::PriSlots));
- m_map.insert("private-static-func",new int(ISection::PriStatFuncs));
- m_map.insert("private-static-attrib",new int(ISection::PriStatAttribs));
- m_map.insert("friend",new int(ISection::Friend));
- m_map.insert("related",new int(ISection::Related));
- m_map.insert("define",new int(ISection::Defines));
- m_map.insert("prototype",new int(ISection::Prototypes));
- m_map.insert("typedef",new int(ISection::Typedefs));
- m_map.insert("enum",new int(ISection::Enums));
- m_map.insert("func",new int(ISection::Functions));
- m_map.insert("var",new int(ISection::Variables));
- }
- ISection::SectionKind map(const QString &s)
- {
- int *val = m_map.find(s.utf8());
- if (val==0)
- {
- debug(1,"Warning: '%s' is an invalid section type\n",s.data());
- return ISection::Invalid;
- }
- else return (ISection::SectionKind)*val;
- }
- private:
- QDict<int> m_map;
-};
-
-static SectionTypeMap *s_typeMap;
-
-void sectionhandler_init()
-{
- s_typeMap = new SectionTypeMap;
-}
-
-void sectionhandler_exit()
-{
- delete s_typeMap;
-}
-
-SectionHandler::SectionHandler(IBaseHandler *parent) : m_parent(parent)
-{
- //printf("SectionHandler::SectionHandler()\n");
- m_members.setAutoDelete(TRUE);
- addEndHandler("sectiondef",this,&SectionHandler::endSection);
- addStartHandler("memberdef",this,&SectionHandler::startMember);
- addStartHandler("header",this,&SectionHandler::startHeader);
- addEndHandler("header",this,&SectionHandler::endHeader);
- addStartHandler("description",this,&SectionHandler::startDescription);
-}
-
-SectionHandler::~SectionHandler()
-{
- debug(2,"SectionHandler::~SectionHandler()\n");
-}
-
-void SectionHandler::startSection(const QXmlAttributes& attrib)
-{
- m_parent->setDelegate(this);
- m_kindString = attrib.value("kind");
- m_kind = s_typeMap->map(m_kindString);
- debug(2,"section kind='%s'\n",m_kindString.data());
-}
-
-void SectionHandler::startDescription(const QXmlAttributes& attrib)
-{
- DocHandler *docHandler = new DocHandler(this);
- docHandler->startDoc(attrib);
- m_description = docHandler;
-}
-
-void SectionHandler::endSection()
-{
- m_parent->setDelegate(0);
-}
-
-void SectionHandler::startMember(const QXmlAttributes& attrib)
-{
- MemberHandler *memHandler = new MemberHandler(this);
- memHandler->startMember(attrib);
- m_members.append(memHandler);
-}
-
-void SectionHandler::startHeader(const QXmlAttributes&)
-{
- m_header="";
- m_curString="";
-}
-
-void SectionHandler::endHeader()
-{
- m_header = m_curString.stripWhiteSpace();
- debug(2,"member header='%s'\n",m_header.data());
-}
-
-void SectionHandler::initialize(CompoundHandler *ch)
-{
- QListIterator<MemberHandler> mli(m_members);
- MemberHandler *mh;
- for (;(mh=mli.current());++mli)
- {
- mh->setCompoundHandler(ch);
- ch->insertMember(mh);
- mh->setSectionHandler(this);
- }
-}
-
-IDocRoot *SectionHandler::description() const
-{
- return m_description;
-}
-
-IMemberIterator *SectionHandler::members() const
-{
- return new MemberIterator(m_members);
-}
-
diff --git a/addon/doxmlparser/src/sectionhandler.h b/addon/doxmlparser/src/sectionhandler.h
deleted file mode 100644
index a212e62..0000000
--- a/addon/doxmlparser/src/sectionhandler.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#ifndef _SECTIONHANDLER_H
-#define _SECTIONHANDLER_H
-
-#include <qstring.h>
-#include <qlist.h>
-#include <qxml.h>
-#include <doxmlintf.h>
-
-#include "basehandler.h"
-
-class SectionIterator :
- public BaseIterator<ISectionIterator,ISection,SectionHandler>
-{
- public:
- SectionIterator(const QList<SectionHandler> &list) :
- BaseIterator<ISectionIterator,ISection,SectionHandler>(list) {}
-};
-
-
-class SectionHandler : public IUserDefined, public BaseHandler<SectionHandler>
-{
- public:
- virtual void startMember(const QXmlAttributes& attrib);
- virtual void startHeader(const QXmlAttributes& attrib);
- virtual void startSection(const QXmlAttributes& attrib);
- virtual void startDescription(const QXmlAttributes& attrib);
- virtual void endSection();
- virtual void endHeader();
-
- SectionHandler(IBaseHandler *parent);
- virtual ~SectionHandler();
-
- // ISection
- virtual const IString *kindString() const
- { return &m_kindString; }
- virtual SectionKind kind() const
- { return m_kind; }
- IDocRoot *description() const;
- virtual IMemberIterator *members() const;
- virtual bool isStatic() const
- {
- return m_kind==PubStatFuncs || m_kind==PubStatAttribs ||
- m_kind==ProStatFuncs || m_kind==ProStatAttribs ||
- m_kind==PriStatFuncs || m_kind==PriStatAttribs;
- }
- virtual bool isPublic() const
- {
- return !isProtected() && !isPrivate();
- }
- virtual bool isProtected() const
- {
- return m_kind==ProTypes || m_kind==ProFuncs || m_kind==ProAttribs ||
- m_kind==ProSlots || m_kind==ProStatFuncs || m_kind==ProStatAttribs;
- }
- virtual bool isPrivate() const
- {
- return m_kind==PriTypes || m_kind==PriFuncs || m_kind==PriAttribs ||
- m_kind==PriSlots || m_kind==PriStatFuncs || m_kind==PriStatAttribs;
- }
-
- void initialize(CompoundHandler *c);
-
- // IUserDefined implementation
- virtual const IString *header() const
- {
- return &m_header;
- }
-
- private:
- IBaseHandler *m_parent;
-
- // XML elements:
- // -------------
- StringImpl m_header; // header
- DocHandler* m_description; // description
- QList<MemberHandler> m_members; // memberdef
-
- // XML attributes:
- // ---------------
- SectionKind m_kind; // kind
- StringImpl m_kindString; // kind as a string
-};
-
-void sectionhandler_init();
-void sectionhandler_exit();
-
-#endif
diff --git a/addon/doxmlparser/src/stringimpl.h b/addon/doxmlparser/src/stringimpl.h
deleted file mode 100644
index 8931b42..0000000
--- a/addon/doxmlparser/src/stringimpl.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef STRINGIMPL_H
-#define STRINGIMPL_H
-
-#include <qstring.h>
-#include "doxmlintf.h"
-
-class StringImpl : public IString
-{
- public:
- StringImpl() {}
- StringImpl(const QString &str) : m_str(str) {}
- StringImpl &operator=(const QString &str)
- { m_str=str; return *this; }
- virtual ~StringImpl() {}
- const char *data() const
- { return m_str.data(); }
-
- // IString
- const char *latin1() const
- { return m_str.latin1(); }
- const char *utf8() const
- { m_cstr = m_str.utf8(); return m_cstr.data(); }
- unsigned short unicodeCharAt(int index) const
- { return m_str.unicode()[index].unicode(); }
- bool isEmpty() const
- { return m_str.isEmpty(); }
- int length() const
- { return m_str.length(); }
-
- operator QString() const { return m_str; }
-
- private:
- QString m_str;
- mutable QCString m_cstr; // used as a cache for m_str.utf8() to avoid returning a temporary
-};
-
-#endif
-
diff --git a/addon/doxmlparser/test/CMakeLists.txt b/addon/doxmlparser/test/CMakeLists.txt
deleted file mode 100644
index 4caef57..0000000
--- a/addon/doxmlparser/test/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-
-include_directories(
- ../include
- ${PROJECT_SOURCE_DIR}/libversion
- ${PROJECT_SOURCE_DIR}/qtools
-)
-
-add_executable(doxmlparser_test
-main.cpp
-)
-
-
-target_link_libraries(doxmlparser_test
- doxmlparser
- doxygen_version
- qtools
- ${COVERAGE_LINKER_FLAGS}
-)
diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp
deleted file mode 100644
index 35fd700..0000000
--- a/addon/doxmlparser/test/main.cpp
+++ /dev/null
@@ -1,776 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2006 by Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <doxmlintf.h>
-#include <qstring.h>
-#include "version.h"
-
-/*! Dumps the contents of a hyperlinked text fragment as plain text to the
- * output.
- */
-QString linkedTextToString(ILinkedTextIterator *ti)
-{
- QString result;
- ILinkedText *lt=0;
- for (ti->toFirst();(lt=ti->current());ti->toNext())
- {
- switch (lt->kind())
- {
- case ILinkedText::Kind_Text: // plain text
- result+=dynamic_cast<ILT_Text*>(lt)->text()->latin1(); break;
- case ILinkedText::Kind_Ref: // a link
- result+=dynamic_cast<ILT_Ref *>(lt)->text()->latin1(); break;
- }
- }
- return result;
-}
-
-/*! Macro for printing an indented message. */
-#define InPrint(x) printf("%s",indent.latin1()), printf x;
-
-/*! Dumps the contents of a documentation block to stdout.
- * @note This function will call itself recursively.
- * @param doc The root of the documentation tree.
- * @param level The indent level.
- */
-void DumpDoc(IDoc *doc,int level)
-{
- if (doc==0) return;
- QString indent;
- indent.fill(' ',level);
- //printf(" doc node kind='%d'\n",doc->kind());
- switch (doc->kind())
- {
- case IDoc::Para:
- {
- InPrint(("<para>\n"));
- IDocPara *par = dynamic_cast<IDocPara*>(doc);
- ASSERT(par!=0);
- IDocIterator *di = par->contents();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("</para>\n"));
- }
- break;
- case IDoc::Text:
- {
- IDocText *txt = dynamic_cast<IDocText*>(doc);
- ASSERT(txt!=0);
- InPrint(("<text value='%s' markup=%d headingLevel=%d/>\n",
- txt->text()->latin1(),txt->markup(),txt->headingLevel()));
- }
- break;
- case IDoc::MarkupModifier:
- {
- IDocMarkupModifier *md = dynamic_cast<IDocMarkupModifier*>(doc);
- ASSERT(md!=0);
- InPrint(("<markup modifier enabled=%d markup=%d headingLevel=%d/>\n",
- md->enabled(),md->markup(),md->headingLevel()));
- }
- break;
- case IDoc::ItemizedList:
- {
- InPrint(("<itemized list>\n"));
- IDocItemizedList *list = dynamic_cast<IDocItemizedList*>(doc);
- ASSERT(list!=0);
- IDocIterator *di = list->elements();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("</itemized list>\n"));
- }
- break;
- case IDoc::OrderedList:
- {
- InPrint(("<ordered list>\n"));
- IDocOrderedList *list = dynamic_cast<IDocOrderedList*>(doc);
- ASSERT(list!=0);
- IDocIterator *di = list->elements();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("</ordered list>\n"));
- }
- break;
- case IDoc::ListItem:
- {
- InPrint(("<list item>\n"));
- IDocListItem *li = dynamic_cast<IDocListItem*>(doc);
- ASSERT(li!=0);
- IDocIterator *di = li->contents();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("</list item>\n"));
- }
- break;
- case IDoc::ParameterItem:
- {
- IDocParameterItem *item = dynamic_cast<IDocParameterItem*>(doc);
- InPrint(("<parameter item>\n"));
- IDocIterator *di = item->paramNames();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- DumpDoc(item->description(),level+1);
- InPrint(("</parameter item>\n"));
- }
- break;
- case IDoc::ParameterList:
- {
- IDocParameterList *list = dynamic_cast<IDocParameterList*>(doc);
- InPrint(("<parameter list type=%d>\n",list->sectType()));
- IDocIterator *di = list->params();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("</parameter list>\n"));
- ASSERT(list!=0);
- }
- break;
- case IDoc::Parameter:
- {
- IDocParameter *par = dynamic_cast<IDocParameter*>(doc);
- ASSERT(par!=0);
- InPrint(("<parameter name=%s/>\n",par->name()->latin1()));
- }
- break;
- case IDoc::SimpleSect:
- {
- IDocSimpleSect *ss = dynamic_cast<IDocSimpleSect*>(doc);
- ASSERT(ss!=0);
- InPrint(("<simplesect type=%s>\n",ss->typeString()->latin1()));
- DumpDoc(ss->title(),level+1);
- DumpDoc(ss->description(),level+1);
- InPrint(("<simplesect/>\n"));
- }
- break;
- case IDoc::Title:
- {
- InPrint(("<title>\n"));
- IDocTitle *t = dynamic_cast<IDocTitle*>(doc);
- ASSERT(t!=0);
- IDocIterator *di = t->title();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- InPrint(("<title/>\n"));
- }
- break;
- case IDoc::Ref:
- {
- IDocRef *ref = dynamic_cast<IDocRef*>(doc);
- ASSERT(ref!=0);
- InPrint(("<ref id=%s text=%s/>\n",
- ref->refId()->latin1(),ref->text()->latin1()));
- }
- break;
- case IDoc::VariableList:
- {
- InPrint(("<variablelist>\n"));
- IDocVariableList *vl = dynamic_cast<IDocVariableList*>(doc);
- ASSERT(vl!=0);
- IDocIterator *di = vl->entries();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("<variablelist/>\n"));
- }
- break;
- case IDoc::VariableListEntry:
- {
- IDocVariableListEntry *vle = dynamic_cast<IDocVariableListEntry*>(doc);
- ASSERT(vle!=0);
- ILinkedTextIterator *lti = vle->term();
- QString term = linkedTextToString(lti);
- lti->release();
- InPrint(("<variablelistentry term=%s>\n",term.latin1()));
- DumpDoc(vle->description(),level+1);
- InPrint(("<variablelistentry/>\n"));
- }
- break;
- case IDoc::HRuler:
- {
- IDocHRuler *hr = dynamic_cast<IDocHRuler*>(doc);
- ASSERT(hr!=0);
- InPrint(("<hruler/>\n"));
- }
- break;
- case IDoc::LineBreak:
- {
- IDocLineBreak *lb = dynamic_cast<IDocLineBreak*>(doc);
- ASSERT(lb!=0);
- InPrint(("<linebreak/>\n"));
- }
- break;
- case IDoc::ULink:
- {
- IDocULink *ul = dynamic_cast<IDocULink*>(doc);
- ASSERT(ul!=0);
- InPrint(("<ulink url='%s' text='%s'/>\n",ul->url()->latin1(),ul->text()->latin1()));
- }
- break;
- case IDoc::EMail:
- {
- IDocEMail *em = dynamic_cast<IDocEMail*>(doc);
- ASSERT(em!=0);
- InPrint(("<email address='%s'/>\n",em->address()->latin1()));
- }
- break;
- case IDoc::Link:
- {
- IDocLink *lk = dynamic_cast<IDocLink*>(doc);
- ASSERT(lk!=0);
- InPrint(("<link refid='%s' text='%s'/>\n",lk->refId()->latin1(),lk->text()->latin1()));
- }
- break;
- case IDoc::ProgramListing:
- {
- IDocProgramListing *pl = dynamic_cast<IDocProgramListing*>(doc);
- ASSERT(pl!=0);
- InPrint(("<programlisting>\n"));
- IDocIterator *cli = pl->codeLines();
- IDoc *cl;
- for (cli->toFirst();(cl=cli->current());cli->toNext())
- {
- DumpDoc(cl,level+1);
- }
- cli->release();
- InPrint(("</programlisting>\n"));
- }
- break;
- case IDoc::CodeLine:
- {
- IDocCodeLine *cl = dynamic_cast<IDocCodeLine*>(doc);
- ASSERT(cl!=0);
- InPrint(("<codeline lineNumber=%d refId='%s'>\n",cl->lineNumber(),cl->refId()->latin1()));
- IDocIterator *cei = cl->codeElements();
- IDoc *ce;
- for (cei->toFirst();(ce=cei->current());cei->toNext())
- {
- DumpDoc(ce,level+1);
- }
- cei->release();
- InPrint(("</codeline>\n"));
- }
- break;
- case IDoc::Highlight:
- {
- IDocHighlight *hl = dynamic_cast<IDocHighlight*>(doc);
- ASSERT(hl!=0);
- InPrint(("<highlight kind=%d>\n",hl->kind()));
- IDocIterator *cei = hl->codeElements();
- IDoc *ce;
- for (cei->toFirst();(ce=cei->current());cei->toNext())
- {
- DumpDoc(ce,level+1);
- }
- cei->release();
- InPrint(("</highlight>\n"));
- }
- break;
- case IDoc::Formula:
- {
- IDocFormula *fm = dynamic_cast<IDocFormula*>(doc);
- ASSERT(fm!=0);
- InPrint(("<formula id='%s' text='%s'/>\n",fm->id()->latin1(),fm->text()->latin1()));
- }
- break;
- case IDoc::Image:
- {
- IDocImage *img = dynamic_cast<IDocImage*>(doc);
- ASSERT(img!=0);
- InPrint(("<image name='%s' caption='%s'/>\n",img->name()->latin1(),img->caption()->latin1()));
- }
- break;
- case IDoc::DotFile:
- {
- IDocDotFile *df = dynamic_cast<IDocDotFile*>(doc);
- ASSERT(df!=0);
- InPrint(("<dotfile name='%s' caption='%s'/>\n",df->name()->latin1(),df->caption()->latin1()));
- }
- break;
- case IDoc::IndexEntry:
- {
- IDocIndexEntry *ie = dynamic_cast<IDocIndexEntry*>(doc);
- ASSERT(ie!=0);
- InPrint(("<indexentry primary='%s' secondary='%s'/>\n",ie->primary()->latin1(),ie->secondary()->latin1()));
- }
- break;
- case IDoc::Table:
- {
- IDocTable *tbl = dynamic_cast<IDocTable*>(doc);
- ASSERT(tbl!=0);
- InPrint(("<table numcols=%d caption='%s'>\n",tbl->numColumns(),tbl->caption()->latin1()));
- IDocIterator *ri = tbl->rows();
- IDoc *row;
- for (ri->toFirst();(row=ri->current());ri->toNext())
- {
- DumpDoc(row,level+1);
- }
- ri->release();
- InPrint(("</table>\n"));
- }
- break;
- case IDoc::Row:
- {
- IDocRow *row = dynamic_cast<IDocRow*>(doc);
- ASSERT(row!=0);
- InPrint(("<row>\n"));
- IDocIterator *ei = row->entries();
- IDoc *e;
- for (ei->toFirst();(e=ei->current());ei->toNext())
- {
- DumpDoc(e,level+1);
- }
- ei->release();
- InPrint(("</row>\n"));
- }
- break;
- case IDoc::Entry:
- {
- IDocEntry *ent = dynamic_cast<IDocEntry*>(doc);
- ASSERT(ent!=0);
- InPrint(("<entry>\n"));
- IDocIterator *di = ent->contents();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("</entry>\n"));
- }
- break;
- case IDoc::Section:
- {
- IDocSection *sec = dynamic_cast<IDocSection*>(doc);
- ASSERT(sec!=0);
- InPrint(("<section id='%s' level=%d>\n",
- sec->id()->latin1(),sec->level()));
- DumpDoc(sec->title(),level+1);
- IDocIterator *di = sec->paragraphs();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di=sec->subSections();
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- IDocInternal *intern = sec->internal();
- if (intern)
- {
- DumpDoc(intern,level+1);
- }
- InPrint(("</section>\n"));
- }
- break;
- case IDoc::Internal:
- {
- IDocInternal *intern = dynamic_cast<IDocInternal*>(doc);
- ASSERT(intern!=0);
- InPrint(("<internal>\n"));
- IDocIterator *di = intern->paragraphs();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di=intern->subSections();
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- InPrint(("</internal>\n"));
- }
- break;
- case IDoc::Copy:
- {
- IDocCopy *cpy = dynamic_cast<IDocCopy*>(doc);
- ASSERT(cpy!=0);
- InPrint(("<copydoc>\n"));
- IDocIterator *di = cpy->contents();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("<copydoc/>\n"));
- }
- break;
- case IDoc::TocItem:
- {
- IDocTocItem *ti = dynamic_cast<IDocTocItem*>(doc);
- ASSERT(ti!=0);
- InPrint(("<tocitem id=\"%s\" title=\"%s\"/>\n",
- ti->id()->latin1(),ti->title()->latin1()));
- }
- break;
- case IDoc::TocList:
- {
- IDocTocList *tl = dynamic_cast<IDocTocList*>(doc);
- ASSERT(tl!=0);
- InPrint(("<toclist>\n"));
- IDocIterator *di = tl->elements();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("<toclist/>\n"));
- }
- break;
- case IDoc::Verbatim:
- {
- IDocVerbatim *vt = dynamic_cast<IDocVerbatim*>(doc);
- ASSERT(vt!=0);
- const char *s=0;
- switch (vt->type())
- {
- case IDocVerbatim::Verbatim: s="verbatim"; break;
- case IDocVerbatim::HtmlOnly: s="htmlonly"; break;
- case IDocVerbatim::LatexOnly: s="latexonly"; break;
- default:
- printf("Invalid verbatim type!\n");
- }
- InPrint(("<verbatim %s>\n",s));
- InPrint(("%s",vt->text()->latin1()));
- InPrint(("</verbatim>\n"));
- }
- break;
- case IDoc::Anchor:
- {
- IDocAnchor *anc = dynamic_cast<IDocAnchor*>(doc);
- ASSERT(anc!=0);
- InPrint(("<anchor id='%s'/>\n",anc->id()->latin1()));
- }
- break;
- case IDoc::Symbol:
- {
- IDocSymbol *sym = dynamic_cast<IDocSymbol*>(doc);
- ASSERT(sym!=0);
- InPrint(("<symbol type=%s letter=%c/>\n",
- sym->typeString()->latin1(),sym->letter()));
- }
- break;
- case IDoc::Root:
- {
- InPrint(("<root>\n"));
- IDocRoot *root = dynamic_cast<IDocRoot*>(doc);
- ASSERT(root!=0);
- IDocIterator *di = root->contents();
- IDoc *pdoc;
- for (di->toFirst();(pdoc=di->current());di->toNext())
- {
- DumpDoc(pdoc,level+1);
- }
- di->release();
- InPrint(("</root>\n"));
- }
- break;
-
- default:
- printf("Found unsupported node type %d!\n",doc->kind());
- break;
- }
-}
-
-void DumpGraph(IGraph *graph)
-{
- if (graph==0) { printf(" --- no graph ---\n"); return; }
- printf(" --- graph ----\n");
- INodeIterator *ni = graph->nodes();
- INode *node;
- for (ni->toFirst();(node=ni->current());ni->toNext())
- {
- printf(" --- node id=%s label=%s linkId=%s\n",
- node->id()->latin1(),
- node->label()->latin1(),
- node->linkId()->latin1()
- );
- IChildNodeIterator *cni = node->children();
- IChildNode *cn;
- for (cni->toFirst();(cn=cni->current());cni->toNext())
- {
- printf(" + child id=%s label=%s relation=%s\n",
- cn->node()->id()->latin1(),
- cn->node()->label()->latin1(),
- cn->relationString()->latin1()
- );
- IEdgeLabelIterator *eli = cn->edgeLabels();
- IEdgeLabel *el;
- for (eli->toFirst();(el=eli->current());eli->toNext())
- {
- printf(" edgeLabel=%s\n",el->label()->latin1());
- }
- eli->release();
- }
- cni->release();
- }
- ni->release();
- printf(" --- end graph ----\n");
-
-}
-
-void DumpParamList(IParamIterator *pli,int indent)
-{
- QString indentStr;
- indentStr.fill(' ',indent);
- IParam *par;
- for (pli->toFirst();(par=pli->current());pli->toNext())
- {
- ILinkedTextIterator *lti = par->type();
- QString parType = linkedTextToString(lti);
- lti->release();
- lti = par->defaultValue();
- QString defVal = linkedTextToString(lti);
- lti->release();
- printf("%sParam type=%s decl_name=%s def_name=%s defvalue=%s\n",
- indentStr.data(), parType.latin1(),
- par->declarationName()->latin1(),
- par->definitionName()->latin1(),
- defVal.latin1());
- }
-}
-
-int main(int argc,char **argv)
-{
- int locArgc = argc;
-
- if (locArgc == 2)
- {
- if (!strcmp(argv[1],"--help"))
- {
- printf("Usage: %s xml_dir\n",argv[0]);
- exit(0);
- }
- else if (!strcmp(argv[1],"--version"))
- {
- printf("%s version: %s\n",argv[0],getFullVersion());
- exit(0);
- }
- }
-
- if (locArgc!=2)
- {
- printf("Usage: %s xml_dir\n",argv[0]);
- exit(1);
- }
-
- IDoxygen *dox = createObjectModel();
-
- dox->setDebugLevel(4);
-
- if (!dox->readXMLDir(argv[1]))
- {
- printf("Error reading %s/index.xml\n",argv[1]);
- exit(1);
- }
-
- ICompoundIterator *cli = dox->compounds();
- ICompound *comp;
- printf("--- compound list ---------\n");
- for (cli->toFirst();(comp=cli->current());cli->toNext())
- {
- printf("Compound name=%s id=%s kind=%s\n",
- comp->name()->latin1(),comp->id()->latin1(),comp->kindString()->latin1());
-
- ISectionIterator *sli = comp->sections();
- ISection *sec;
- for (sli->toFirst();(sec=sli->current());sli->toNext())
- {
- printf(" Section kind=%s\n",sec->kindString()->latin1());
- IMemberIterator *mli = sec->members();
- IMember *mem;
- if( sec->kind() == ISection::UserDefined )
- {
- IUserDefined *group = dynamic_cast<IUserDefined*>(sec);
- printf(" Title=%s\n", group->header()->latin1() );
- }
- for (mli->toFirst();(mem=mli->current());mli->toNext())
- {
- ILinkedTextIterator *lti = mem->type();
- printf(" Member type=%s name=%s\n",
- linkedTextToString(lti).latin1(),mem->name()->latin1());
- lti->release();
-
- IParamIterator *pli = mem->parameters();
- DumpParamList(pli,6);
- pli->release();
- IMemberReferenceIterator *mri = mem->references();
- IMemberReference *mr;
- for (mri->toFirst();(mr=mri->current());mri->toNext())
- {
- IMember *memr = mr->member();
- printf(" References %s at line %d\n",
- mr->name()->latin1(),memr->bodyStart());
- }
-
- mri->release();
- mri = mem->referencedBy();
- for (mri->toFirst();(mr=mri->current());mri->toNext())
- {
- IMember *memr = mr->member();
- printf(" ReferencedBy %s at line %d\n",
- mr->name()->latin1(),memr->bodyStart());
- }
- mri->release();
-
- if (mem->kind()==IMember::Enum) // we have found an enum
- {
- IEnum *e = dynamic_cast<IEnum*>(mem);
- IMemberIterator *evi = e->enumValues(); // get the enum values
- IMember *mev;
- for (evi->toFirst();(mev=evi->current());evi->toNext())
- {
- IEnumValue *ev = dynamic_cast<IEnumValue*>(mev);
- ILinkedTextIterator *lti = ev->initializer();
- QString init = linkedTextToString(lti);
- lti->release();
- printf(" Enum value '%s' init='%s'\n",
- ev->name()->latin1(),init.latin1());
- }
- evi->release();
- }
-
- pli = mem->templateParameters();
- if (pli)
- {
- printf(" Template parameters\n");
- DumpParamList(pli,8);
- pli->release();
- }
-
- IDoc *doc = mem->briefDescription();
- if (doc)
- {
- printf("===== brief description ==== \n");
- DumpDoc(doc,0);
- }
-
- doc = mem->detailedDescription();
- if (doc)
- {
- printf("===== detailed description ==== \n");
- DumpDoc(doc,0);
- }
- }
- mli->release();
- }
- sli->release();
-
- IDoc *doc = comp->briefDescription();
- if (doc)
- {
- printf("===== brief description ==== \n");
- DumpDoc(doc,0);
- }
-
- doc = comp->detailedDescription();
- if (doc)
- {
- printf("===== detailed description ==== \n");
- DumpDoc(doc,0);
- }
-
- if (comp->kind()==ICompound::Class)
- {
- IClass *cls = dynamic_cast<IClass*>(comp);
- ASSERT(cls!=0);
-
- printf("==== inheritance graph ==== \n");
- DumpGraph(cls->inheritanceGraph());
-
- printf("==== collaboration graph ==== \n");
- DumpGraph(cls->collaborationGraph());
-
- printf("==== base classes ==== \n");
- IRelatedCompoundIterator *bcli = cls->baseCompounds();
- IRelatedCompound *bClass;
- for (bcli->toFirst();(bClass=bcli->current());bcli->toNext())
- {
- ICompound *bc = bClass->compound();
- printf(" + class %s\n",bc->name()->latin1());
- bc->release();
- }
- bcli->release();
-
- printf("==== derived classes ==== \n");
- IRelatedCompoundIterator *dcli = cls->derivedCompounds();
- IRelatedCompound *dClass;
- for (dcli->toFirst();(dClass=dcli->current());dcli->toNext())
- {
- ICompound *dc = dClass->compound();
- printf(" + class %s\n",dc->name()->latin1());
- dc->release();
- }
- dcli->release();
- }
- else if (comp->kind()==ICompound::File)
- {
- IFile *file = dynamic_cast<IFile*>(comp);
- ASSERT(file!=0);
-
- printf("==== include dependency graph ==== \n");
- DumpGraph(file->includeDependencyGraph());
-
- printf("==== included by dependency graph ==== \n");
- DumpGraph(file->includedByDependencyGraph());
-
- printf("==== source ====\n");
- DumpDoc(file->source(),0);
- }
-
- comp->release();
- }
- cli->release();
- printf("---------------------------\n");
-
- dox->release();
-
- return 0;
-}
-