summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
author(no author) <(no author)@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-08-08 20:01:03 (GMT)
committer(no author) <(no author)@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-08-08 20:01:03 (GMT)
commit001e27ddbb1bfaa351b5f268b22418fb0557d6c2 (patch)
treea390a2400721fd1ed137738bd2679ab33ed0306f /addon
parent0559d5795f6e2adc993577a4dd55b5370d31677c (diff)
downloadDoxygen-Release_1_4_4_20050804.zip
Doxygen-Release_1_4_4_20050804.tar.gz
Doxygen-Release_1_4_4_20050804.tar.bz2
This commit was manufactured by cvs2svn to create tagRelease_1_4_4_20050804
'Release_1_4_4_20050804'.
Diffstat (limited to 'addon')
-rw-r--r--addon/doxmlparser/Doxyfile177
-rw-r--r--addon/doxmlparser/Doxyfile.impl179
-rw-r--r--addon/doxmlparser/examples/metrics/.cvsignore4
-rw-r--r--addon/doxmlparser/examples/metrics/Makefile.in13
-rw-r--r--addon/doxmlparser/examples/metrics/main.cpp254
-rw-r--r--addon/doxmlparser/examples/metrics/metrics.pro.in20
-rw-r--r--addon/doxmlparser/include/doxmlintf.h1101
-rw-r--r--addon/doxmlparser/src/.cvsignore3
-rw-r--r--addon/doxmlparser/src/Makefile.in13
-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.cpp650
-rw-r--r--addon/doxmlparser/src/compoundhandler.h236
-rw-r--r--addon/doxmlparser/src/debug.cpp24
-rw-r--r--addon/doxmlparser/src/debug.h7
-rw-r--r--addon/doxmlparser/src/dochandler.cpp2241
-rw-r--r--addon/doxmlparser/src/dochandler.h1352
-rw-r--r--addon/doxmlparser/src/doxmlintf.h1101
-rw-r--r--addon/doxmlparser/src/doxmlparser.pro.in27
-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.cpp75
-rw-r--r--addon/doxmlparser/src/loamhandler.h52
-rw-r--r--addon/doxmlparser/src/mainhandler.cpp299
-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.cpp168
-rw-r--r--addon/doxmlparser/src/sectionhandler.h102
-rw-r--r--addon/doxmlparser/src/stringimpl.h28
-rw-r--r--addon/doxmlparser/test/.cvsignore3
-rw-r--r--addon/doxmlparser/test/Makefile.in13
-rw-r--r--addon/doxmlparser/test/main.cpp759
-rw-r--r--addon/doxmlparser/test/xmlparse.pro.in20
-rw-r--r--addon/doxywizard/.cvsignore8
-rw-r--r--addon/doxywizard/Makefile.in42
-rw-r--r--addon/doxywizard/Makefile.win_nmake.in38
-rw-r--r--addon/doxywizard/README3
-rw-r--r--addon/doxywizard/doxywizard.cpp1424
-rw-r--r--addon/doxywizard/doxywizard.h292
-rw-r--r--addon/doxywizard/doxywizard.pro.in59
-rwxr-xr-xaddon/doxywizard/doxywizard.resbin13464 -> 0 bytes
-rw-r--r--addon/doxywizard/doxywizard.t45
-rw-r--r--addon/doxywizard/expert.cpp276
-rw-r--r--addon/doxywizard/expert.h82
-rw-r--r--addon/doxywizard/input.h14
-rw-r--r--addon/doxywizard/inputbool.cpp59
-rw-r--r--addon/doxywizard/inputbool.h50
-rw-r--r--addon/doxywizard/inputint.cpp65
-rw-r--r--addon/doxywizard/inputint.h53
-rw-r--r--addon/doxywizard/inputstring.cpp187
-rw-r--r--addon/doxywizard/inputstring.h69
-rw-r--r--addon/doxywizard/inputstrlist.cpp210
-rw-r--r--addon/doxywizard/inputstrlist.h71
-rw-r--r--addon/doxywizard/qtbc.h45
-rw-r--r--addon/doxywizard/version.cpp1
-rw-r--r--addon/doxywizard/version.h23
62 files changed, 0 insertions, 14167 deletions
diff --git a/addon/doxmlparser/Doxyfile b/addon/doxmlparser/Doxyfile
deleted file mode 100644
index faf4bee..0000000
--- a/addon/doxmlparser/Doxyfile
+++ /dev/null
@@ -1,177 +0,0 @@
-# Doxyfile 1.2.12-20011209
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = doxmlparser
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = doc
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = NO
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
-SHOW_INCLUDE_FILES = YES
-JAVADOC_AUTOBRIEF = NO
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES =
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = NO
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = include
-FILE_PATTERNS = *.h
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = 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_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# 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::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = ../../qtools_docs/qtools.tag=../../../../qtools_docs/html
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-PERL_PATH =
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-GRAPHICAL_HIERARCHY = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1280
-MAX_DOT_GRAPH_HEIGHT = 1024
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
-CGI_NAME =
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH =
-EXT_DOC_PATHS =
diff --git a/addon/doxmlparser/Doxyfile.impl b/addon/doxmlparser/Doxyfile.impl
deleted file mode 100644
index a954db3..0000000
--- a/addon/doxmlparser/Doxyfile.impl
+++ /dev/null
@@ -1,179 +0,0 @@
-# Doxyfile 1.2.13.1
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = doxmlparser
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = doc_impl
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = NO
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = YES
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
-SHOW_INCLUDE_FILES = YES
-JAVADOC_AUTOBRIEF = NO
-INHERIT_DOCS = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES =
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = NO
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_FORMAT =
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = src
-FILE_PATTERNS =
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = 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_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT =
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT =
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT =
-MAN_EXTENSION =
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# 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::addtions related to external references
-#---------------------------------------------------------------------------
-TAGFILES = ../../qtools_docs/qtools.tag=../../../../qtools_docs/html
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH =
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-HAVE_DOT = YES
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-TEMPLATE_RELATIONS = YES
-HIDE_UNDOC_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-GRAPHICAL_HIERARCHY = YES
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1280
-MAX_DOT_GRAPH_HEIGHT = 1024
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
-CGI_NAME =
-CGI_URL =
-DOC_URL =
-DOC_ABSPATH =
-BIN_ABSPATH =
-EXT_DOC_PATHS =
diff --git a/addon/doxmlparser/examples/metrics/.cvsignore b/addon/doxmlparser/examples/metrics/.cvsignore
deleted file mode 100644
index 90512ec..0000000
--- a/addon/doxmlparser/examples/metrics/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-metrics.pro
-Makefile.metrics
-obj
diff --git a/addon/doxmlparser/examples/metrics/Makefile.in b/addon/doxmlparser/examples/metrics/Makefile.in
deleted file mode 100644
index 83cbc28..0000000
--- a/addon/doxmlparser/examples/metrics/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-all clean depend: Makefile.metrics
- $(MAKE) -f Makefile.metrics $@
-
-distclean: clean
- $(RM) -rf Makefile.metrics metrics.pro Makefile obj
-
-tmake:
- $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics
-
-Makefile.metrics: metrics.pro
- $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics
-
-install:
diff --git a/addon/doxmlparser/examples/metrics/main.cpp b/addon/doxmlparser/examples/metrics/main.cpp
deleted file mode 100644
index 2c4bee3..0000000
--- a/addon/doxmlparser/examples/metrics/main.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2003 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>
-
-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)
-{
- if (argc!=2)
- {
- printf("Usage: %s xml_output_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.pro.in b/addon/doxmlparser/examples/metrics/metrics.pro.in
deleted file mode 100644
index 6dd344f..0000000
--- a/addon/doxmlparser/examples/metrics/metrics.pro.in
+++ /dev/null
@@ -1,20 +0,0 @@
-TEMPLATE = app.t
-CONFIG = console warn_on $extraopts
-HEADERS =
-SOURCES = main.cpp
-unix:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools
-win32:INCLUDEPATH += .
-win32-mingw:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools
-win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib
-win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\..\lib;..\..\lib
-win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib
-win32-borland:TMAKE_LFLAGS += -L..\..\..\..\lib -L..\..\lib
-win32:TMAKE_CXXFLAGS += -DQT_NODLL
-DESTDIR =
-OBJECTS_DIR = obj
-TARGET = metrics
-DEPENDPATH = ../../include
-INCLUDEPATH += ../../../../qtools ../../include
-unix:TARGETDEPS = ../../lib/libdoxmlparser.a
-win32:TARGETDEPS = ..\..\lib\doxmlparser.lib
-
diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h
deleted file mode 100644
index 79dc763..0000000
--- a/addon/doxmlparser/include/doxmlintf.h
+++ /dev/null
@@ -1,1101 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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;
-
-/*! \brief Read only interface to a string.
- */
-class IString
-{
- public:
- /*! Returns a latin1 character representation of the string. */
- virtual const char *latin1() 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:
- enum Kind { Kind_Text, Kind_Ref };
- virtual Kind kind() const = 0;
-};
-
-/*! \brief Plain text fragment.
- */
-class ILT_Text : public ILinkedText
-{
- public:
- virtual const IString *text() const = 0;
-};
-
-/*! \brief Reference to an object.
- */
-class ILT_Ref : public ILinkedText
-{
- public:
- 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 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 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 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 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 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:
- 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 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 const IString * label() const = 0;
-};
-
-class IEdgeLabelIterator
-{
- public:
- 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:
- 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 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 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 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 INodeIterator *nodes() const = 0;
-};
-
-class IMember
-{
- public:
- 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 const IString * name() const = 0;
- virtual const IString * refId() const = 0;
- virtual bool isLocal() const = 0;
-};
-
-class IIncludeIterator
-{
- public:
- 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 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:
- /*! 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 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:
- /*! 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 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:
- 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 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;
-};
-
-/*! Root node of the object model. */
-class IDoxygen
-{
- public:
-
- /*! 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
- * createdObjecModelFromXML(). 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/src/.cvsignore b/addon/doxmlparser/src/.cvsignore
deleted file mode 100644
index af1ea36..0000000
--- a/addon/doxmlparser/src/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-doxmlparser.pro
-Makefile.doxmlparser
diff --git a/addon/doxmlparser/src/Makefile.in b/addon/doxmlparser/src/Makefile.in
deleted file mode 100644
index 049f969..0000000
--- a/addon/doxmlparser/src/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-all clean depend: Makefile.doxmlparser
- $(MAKE) -f Makefile.doxmlparser $@
-
-distclean: clean
- $(RM) -rf Makefile.doxmlparser doxmlparser.pro Makefile obj
-
-tmake:
- $(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser
-
-Makefile.doxmlparser: doxmlparser.pro
- $(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser
-
-install:
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 446f777..0000000
--- a/addon/doxmlparser/src/basehandler.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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;
- 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;
- 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_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 = m_startHandlers[name];
- 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 = m_endHandlers[name];
- 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;
- QXmlDefaultHandler *m_delegateHandler;
- IFallBackHandler *m_fallBackHandler;
-};
-
-//-----------------------------------------------------------------------------
-
-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 = m_startHandlers[name];
- if (handler)
- {
- (*handler)(attrib);
- return TRUE;
- }
- return FALSE;
- }
- bool handleEndElement(const QString &name)
- {
- EndElementHandlerT *handler = m_endHandlers[name];
- 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 06a9a11..0000000
--- a/addon/doxmlparser/src/baseiterator.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 5bdf160..0000000
--- a/addon/doxmlparser/src/compoundhandler.cpp
+++ /dev/null
@@ -1,650 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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"
-
-//----------------------------------------------------------------------------
-
-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) : 0;
- }
- virtual void release()
- { delete this; }
-
- private:
- const MainHandler *m_mainHandler;
-};
-
-//----------------------------------------------------------------------------
-
-ICompound *RelatedCompound::compound() const
-{
- return m_parent->m_mainHandler->compoundById(m_id);
-}
-
-//----------------------------------------------------------------------------
-
-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);
- 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 IClass::Class: return (IClass *)this;
- case IStruct::Struct: return (IStruct *)this;
- case IUnion::Union: return (IUnion *)this;
- case IException::Exception: return (IException *)this;
- case IInterface::Interface: return (IInterface *)this;
- case INamespace::Namespace: return (INamespace *)this;
- case IFile::File: return (IFile *)this;
- case IGroup::Group: return (IGroup *)this;
- case IPage::Page: return (IPage *)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 ad8e2c8..0000000
--- a/addon/doxmlparser/src/compoundhandler.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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;
- StringImpl m_name; // element's content
- StringImpl m_refId; // refid
- bool m_isLocal; // 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;
- QString m_id; // refid
- Protection m_protection; // prot
- Kind m_kind; // 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 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; // title
- QList<RelatedCompound> m_subClasses; // basecompoundref
- QList<RelatedCompound> m_superClasses; // derivedcompoundref
- QList<IncludeHandler> m_includes; // includes
- QList<IncludeHandler> m_includedBy; // includedBy
- GraphHandler* m_includeDependencyGraph; // incdepgraph
- GraphHandler* m_includedByDependencyGraph; // invincdepgraph
- QList<QString> m_innerCompounds; // innerdir/innerfile/innerclass/innernamespace/innergroup
- TemplateParamListHandler* m_templateParamList; // templateparamlist
- QList<SectionHandler> m_sections; // sectiondef
- DocHandler* m_brief; // briefdescription
- DocHandler* m_detailed; // detaileddescription
- GraphHandler* m_inheritanceGraph; // inheritancegraph
- GraphHandler* m_collaborationGraph; // collaborationgraph
- ProgramListingHandler* m_programListing; // programlisting
- // location
- StringImpl m_defFile; // - file
- int m_defLine; // - line
- StringImpl m_defBodyFile; // - bodyfile
- int m_defBodyStart; // - bodystart
- int m_defBodyEnd; // - bodyend
- ListOfAllMembersHandler* m_members; // listofallmember
-
- // XML attributes:
- // ---------------
- StringImpl m_id; // id
- CompoundKind m_kind; // 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; // object reference counter
- QDict<MemberHandler> m_memberDict; // id->member lookup
- QDict<QList<MemberHandler> > m_memberNameDict; // name->memberlist lookup
- MainHandler* m_mainHandler; // 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 ba562ef..0000000
--- a/addon/doxmlparser/src/dochandler.cpp
+++ /dev/null
@@ -1,2241 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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()
-{
- printf("m_curString=`%s'\n",m_curString.data());
- 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,this,&DocSectionHandler::startSubSection);
- }
- addStartHandler("internal",this,&DocSectionHandler::startInternal);
- sectionKey.sprintf("sect%d",level);
- addEndHandler(sectionKey,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,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 922624d..0000000
--- a/addon/doxmlparser/src/dochandler.h
+++ /dev/null
@@ -1,1352 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 an 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/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h
deleted file mode 100644
index 79dc763..0000000
--- a/addon/doxmlparser/src/doxmlintf.h
+++ /dev/null
@@ -1,1101 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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;
-
-/*! \brief Read only interface to a string.
- */
-class IString
-{
- public:
- /*! Returns a latin1 character representation of the string. */
- virtual const char *latin1() 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:
- enum Kind { Kind_Text, Kind_Ref };
- virtual Kind kind() const = 0;
-};
-
-/*! \brief Plain text fragment.
- */
-class ILT_Text : public ILinkedText
-{
- public:
- virtual const IString *text() const = 0;
-};
-
-/*! \brief Reference to an object.
- */
-class ILT_Ref : public ILinkedText
-{
- public:
- 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 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 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 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 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 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:
- 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 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 const IString * label() const = 0;
-};
-
-class IEdgeLabelIterator
-{
- public:
- 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:
- 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 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 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 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 INodeIterator *nodes() const = 0;
-};
-
-class IMember
-{
- public:
- 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 const IString * name() const = 0;
- virtual const IString * refId() const = 0;
- virtual bool isLocal() const = 0;
-};
-
-class IIncludeIterator
-{
- public:
- 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 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:
- /*! 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 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:
- /*! 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 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:
- 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 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;
-};
-
-/*! Root node of the object model. */
-class IDoxygen
-{
- public:
-
- /*! 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
- * createdObjecModelFromXML(). 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/src/doxmlparser.pro.in b/addon/doxmlparser/src/doxmlparser.pro.in
deleted file mode 100644
index 841a46c..0000000
--- a/addon/doxmlparser/src/doxmlparser.pro.in
+++ /dev/null
@@ -1,27 +0,0 @@
-TEMPLATE = lib.t
-CONFIG = console staticlib warn_on $extraopts
-HEADERS = basehandler.h mainhandler.h \
- compoundhandler.h sectionhandler.h \
- memberhandler.h paramhandler.h \
- dochandler.h linkedtexthandler.h \
- debug.h graphhandler.h stringimpl.h \
- loamhandler.h
-SOURCES = mainhandler.cpp \
- compoundhandler.cpp sectionhandler.cpp \
- memberhandler.cpp paramhandler.cpp \
- dochandler.cpp linkedtexthandler.cpp \
- basehandler.cpp debug.cpp graphhandler.cpp \
- loamhandler.cpp
-unix:LIBS += -L../../../lib -lqtools
-win32:INCLUDEPATH += .
-win32-mingw:LIBS += -L../../../lib -lqtools
-win32-msvc:LIBS += qtools.lib shell32.lib
-win32-msvc:TMAKE_LFLAGS += /LIBPATH:....\\..\lib
-win32-borland:LIBS += qtools.lib doxycfg.lib shell32.lib
-win32-borland:TMAKE_LFLAGS += -L..\..\..\lib
-win32:TMAKE_CXXFLAGS += -DQT_NODLL
-DESTDIR = ../lib
-OBJECTS_DIR = ../objects
-TARGET = doxmlparser
-INCLUDEPATH += ../../../qtools ../include
-
diff --git a/addon/doxmlparser/src/graphhandler.cpp b/addon/doxmlparser/src/graphhandler.cpp
deleted file mode 100644
index 7816970..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"),n);
-}
-
-INodeIterator *GraphHandler::nodes() const
-{
- return new NodeIterator(*this);
-}
-
-NodeHandler *GraphHandler::getNodeById(const QString &id) const
-{
- return m_nodeDict->find(id);
-}
-
-//------------------------------------------------------------------------
-
-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 24a33d3..0000000
--- a/addon/doxmlparser/src/graphhandler.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 d27adcc..0000000
--- a/addon/doxmlparser/src/linkedtexthandler.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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;
-};
-
-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 01dbf4a..0000000
--- a/addon/doxmlparser/src/linkedtexthandler.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 a939b7b..0000000
--- a/addon/doxmlparser/src/loamhandler.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-#include "loamhandler.h"
-#include "memberhandler.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 2cff8d4..0000000
--- a/addon/doxmlparser/src/loamhandler.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 a0a1b07..0000000
--- a/addon/doxmlparser/src/mainhandler.cpp
+++ /dev/null
@@ -1,299 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 "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) : 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,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,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,m_curMember);
-}
-
-void MainHandler::endMember()
-{
- m_curCompound->memberDict.insert(m_curString,m_curMember);
- QList<CompoundEntry> *cel=0;
- if ((cel=m_memberNameDict.find(m_curString))==0)
- {
- cel = new QList<CompoundEntry>;
- m_memberNameDict.insert(m_curString,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];
- if (ch) // compound already in memory
- {
- ch->addref(); // returning alias -> increase reference counter
- return ch->toICompound();
- }
- CompoundEntry *ce = m_compoundDict.find(ids);
- 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);
-}
-
-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);
-}
-
-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 a9f68b0..0000000
--- a/addon/doxmlparser/src/mainhandler.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 74d1347..0000000
--- a/addon/doxmlparser/src/memberhandler.cpp
+++ /dev/null
@@ -1,600 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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);
- 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");
- QCString 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,"arggstring=%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 19eacbd..0000000
--- a/addon/doxmlparser/src/memberhandler.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 0084c80..0000000
--- a/addon/doxmlparser/src/paramhandler.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 d1194ac..0000000
--- a/addon/doxmlparser/src/paramhandler.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 973d990..0000000
--- a/addon/doxmlparser/src/sectionhandler.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 "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);
- 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 46a072f..0000000
--- a/addon/doxmlparser/src/sectionhandler.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2005 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 ac4ee12..0000000
--- a/addon/doxmlparser/src/stringimpl.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef STRINGIMPL_H
-#define STRINGIMPL_H
-
-#include <qstring.h>
-#include "doxmlintf.h"
-
-class StringImpl : public QString, public IString
-{
- public:
- StringImpl() {}
- StringImpl(const QString &str) : QString(str) {}
- StringImpl &operator=(const QString &str)
- { QString::operator=(str); return *this; }
- virtual ~StringImpl() {}
-
- // IString
- const char *latin1() const
- { return QString::latin1(); }
- unsigned short unicodeCharAt(int index) const
- { return QString::unicode()[index].unicode(); }
- bool isEmpty() const
- { return QString::isEmpty(); }
- int length() const
- { return QString::length(); }
-};
-
-#endif
-
diff --git a/addon/doxmlparser/test/.cvsignore b/addon/doxmlparser/test/.cvsignore
deleted file mode 100644
index dd07649..0000000
--- a/addon/doxmlparser/test/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-xmlparse.pro
-Makefile.xmlparse
diff --git a/addon/doxmlparser/test/Makefile.in b/addon/doxmlparser/test/Makefile.in
deleted file mode 100644
index 1dfbd17..0000000
--- a/addon/doxmlparser/test/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-all clean depend: Makefile.xmlparse
- $(MAKE) -f Makefile.xmlparse $@
-
-distclean: clean
- $(RM) -rf Makefile.xmlparse xmlparse.pro Makefile obj
-
-tmake:
- $(ENV) $(PERL) $(TMAKE) xmlparse.pro >Makefile.xmlparse
-
-Makefile.xmlparse: xmlparse.pro
- $(ENV) $(PERL) $(TMAKE) xmlparse.pro >Makefile.xmlparse
-
-install:
diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp
deleted file mode 100644
index 8bf9dd2..0000000
--- a/addon/doxmlparser/test/main.cpp
+++ /dev/null
@@ -1,759 +0,0 @@
-/******************************************************************************
- *
- * $Id$
- *
- *
- * Copyright (C) 1997-2003 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>
-
-/*! 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)
-{
- if (argc!=2)
- {
- printf("Usage: %s xmldir\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("==== collabration 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;
-}
-
diff --git a/addon/doxmlparser/test/xmlparse.pro.in b/addon/doxmlparser/test/xmlparse.pro.in
deleted file mode 100644
index cfb95be..0000000
--- a/addon/doxmlparser/test/xmlparse.pro.in
+++ /dev/null
@@ -1,20 +0,0 @@
-TEMPLATE = app.t
-CONFIG = console warn_on $extraopts
-HEADERS =
-SOURCES = main.cpp
-unix:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools
-win32:INCLUDEPATH += .
-win32-mingw:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools
-win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib
-win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\lib;..\lib
-win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib
-win32-borland:TMAKE_LFLAGS += -L..\..\..\lib -L..\lib
-win32:TMAKE_CXXFLAGS += -DQT_NODLL
-DESTDIR =
-OBJECTS_DIR = ../objects
-TARGET = xmlparse
-INCLUDEPATH += ../../../qtools ../include
-DEPENDPATH += ../include
-unix:TARGETDEPS = ../lib/libdoxmlparser.a
-win32:TARGETDEPS = ..\lib\doxmlparser.lib
-
diff --git a/addon/doxywizard/.cvsignore b/addon/doxywizard/.cvsignore
deleted file mode 100644
index 75ae21b..0000000
--- a/addon/doxywizard/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-doxywizard.pro
-Makefile.doxywizard
-config.cpp
-config.h
-config.l
-moc
-obj
diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in
deleted file mode 100644
index 42d5871..0000000
--- a/addon/doxywizard/Makefile.in
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-#
-#
-# Copyright (C) 1997-2005 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.
-#
-
-all: config.h config.l version.cpp Makefile.doxywizard
- $(MAKE) -f Makefile.doxywizard QTDIR=$(QTDIR) $@
-
-config.h: ../../src/config.h
- $(CP) ../../src/config.h config.h
-
-config.l: ../../src/config.l
- $(CP) ../../src/config.l config.l
-
-version.cpp:
- $(CP) ../../src/version.cpp version.cpp
-
-Makefile.doxywizard: doxywizard.pro
- $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
-
-tmake:
- $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
-
-clean: Makefile.doxywizard
- $(MAKE) -f Makefile.doxywizard clean
- $(RM) config.cpp
-
-distclean: clean
- $(RM) Makefile.doxywizard config.l config.h version.cpp
-
-install:
- $(INSTTOOL) -d $(INSTALL)/bin
- $(INSTTOOL) -m 755 ../../bin/doxywizard $(INSTALL)/bin
-
-FORCE:
diff --git a/addon/doxywizard/Makefile.win_nmake.in b/addon/doxywizard/Makefile.win_nmake.in
deleted file mode 100644
index 7ebcdf8..0000000
--- a/addon/doxywizard/Makefile.win_nmake.in
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-#
-#
-# Copyright (C) 1997-2005 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.
-#
-
-all: config.h config.l unistd.h Makefile.doxywizard
- $(MAKE) -f Makefile.doxywizard $@
-
-unistd.h:
- $(CP) ..\..\src\unistd.h unistd.h
-
-config.h:
- $(CP) ..\..\src\config.h config.h
-
-config.l:
- $(CP) ..\..\src\config.l config.l
-
-Makefile.doxywizard: doxywizard.pro
- $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
-
-tmake:
- $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
-
-clean: Makefile.doxywizard
- $(MAKE) -f Makefile.doxywizard clean
- $(RM) config.cpp
-
-distclean: clean
- $(RM) Makefile.doxywizard config.l config.h
-
-FORCE:
diff --git a/addon/doxywizard/README b/addon/doxywizard/README
deleted file mode 100644
index fc9c5aa..0000000
--- a/addon/doxywizard/README
+++ /dev/null
@@ -1,3 +0,0 @@
-Doxywizard is a graphical front-end to read/edit/write doxygen configuration
-files. It requires Qt version 3.x or higher.
-
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp
deleted file mode 100644
index b221530..0000000
--- a/addon/doxywizard/doxywizard.cpp
+++ /dev/null
@@ -1,1424 +0,0 @@
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlineedit.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qtextedit.h>
-#include <qprocess.h>
-#include <qtimer.h>
-#include <qstatusbar.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qtooltip.h>
-
-#include <stdlib.h>
-
-#if defined(Q_OS_MACX)
-#include <CoreFoundation/CFBundle.h>
-#include <ApplicationServices/ApplicationServices.h>
-#undef check
-#endif
-
-#include "doxywizard.h"
-#include "expert.h"
-#include "config.h"
-#include "version.h"
-
-const int messageTimeout = 5000; //!< status bar message timeout in millisec.
-
-#if defined(Q_OS_MACX)
-QCString getResourcePath()
-{
- // todo: use qApp->applicationDirPath()
- QCString result;
- CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
- CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, kCFURLPOSIXPathStyle);
- result = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding());
- result+="/Contents/Resources/";
- return result;
-}
-
-#define GRAPHVIZ_PATH "/Applications/Graphviz.app"
-#define DOT_PATH GRAPHVIZ_PATH "/Contents/MacOS"
-#define DOT_LOCATION DOT_PATH "/dot"
-
-bool checkIfDotInstalled()
-{
- QFileInfo fi(GRAPHVIZ_PATH);
- if (fi.exists() && fi.isDir())
- {
- fi.setFile(DOT_LOCATION);
- if (fi.exists() && fi.isFile())
- {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-void setDotPath()
-{
- if (checkIfDotInstalled())
- {
- Config_getString("DOT_PATH")=DOT_PATH;
- Config_getBool("HAVE_DOT")=TRUE;
- }
-}
-
-#endif
-
-
-//==========================================================================
-
-Step1::Step1(QWidget *parent) : QWidget(parent,"Step1")
-{
- QVBoxLayout *layout = new QVBoxLayout(this);
- layout->setMargin(4);
- layout->setSpacing(8);
- layout->addWidget(new QLabel( "Provide some information "
- "about the project you are documenting",this));
- QWidget *w = new QWidget( this );
- QHBoxLayout *bl = new QHBoxLayout(w,10);
-
- QVBox *col1 = new QVBox( w );
- col1->setSpacing(8);
- (new QLabel("Project name:",col1))->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- (new QLabel("Project version or id:",col1))->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-
- QVBox *col2 = new QVBox( w );
- col2->setSpacing(8);
- m_projName = new QLineEdit(col2);
- m_projNumber = new QLineEdit(col2);
-
- bl->addWidget(col1);
- bl->addWidget(col2);
-
- layout->addWidget(w);
-
- //---------------------------------------------------
- QFrame *f = new QFrame( this );
- f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- layout->addWidget(f);
-
- layout->addWidget(new QLabel( "Specify the directory to "
- "scan for source code", this));
- QHBox *row = new QHBox( this );
- row->setSpacing(10);
- new QLabel("Source code directory:",row);
- m_sourceDir = new QLineEdit(row);
- m_srcSelectDir = new QPushButton("Select...",row);
- layout->addWidget(row);
-
- m_recursive = new QCheckBox("Scan recursively",this);
- m_recursive->setChecked(TRUE);
- layout->addWidget(m_recursive);
-
- //---------------------------------------------------
- f = new QFrame( this );
- f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- layout->addWidget(f);
-
- layout->addWidget(new QLabel(
- "Specify the directory where doxygen should "
- "put the generated documentation",this
- ));
- row = new QHBox( this );
- row->setSpacing(10);
- new QLabel("Destination directory:",row);
- m_destDir = new QLineEdit(row);
- m_dstSelectDir = new QPushButton("Select...",row);
- layout->addWidget(row);
- layout->addStretch(1);
-
- connect(m_srcSelectDir,SIGNAL(clicked()),
- this,SLOT(selectSourceDir()));
- connect(m_dstSelectDir,SIGNAL(clicked()),
- this,SLOT(selectDestinationDir()));
-}
-
-void Step1::selectSourceDir()
-{
- m_sourceDir->setText(QFileDialog::getExistingDirectory(m_sourceDir->text(),this));
-}
-
-void Step1::selectDestinationDir()
-{
- m_destDir->setText(QFileDialog::getExistingDirectory(m_destDir->text(),this));
-}
-
-QString Step1::getProjectName() const
-{
- return m_projName->text();
-}
-
-QString Step1::getProjectNumber() const
-{
- return m_projNumber->text();
-}
-
-QString Step1::getSourceDir() const
-{
- return m_sourceDir->text();
-}
-
-bool Step1::scanRecursively() const
-{
- return m_recursive->isChecked();
-}
-
-QString Step1::getDestinationDir() const
-{
- return m_destDir->text();
-}
-
-void Step1::setProjectName(const QString &name)
-{
- m_projName->setText(name);
-}
-
-void Step1::setProjectNumber(const QString &num)
-{
- m_projNumber->setText(num);
-}
-
-void Step1::setSourceDir(const QString &dir)
-{
- m_sourceDir->setText(dir);
-}
-
-void Step1::setRecursiveScan(bool enable)
-{
- m_recursive->setChecked(enable);
-}
-
-void Step1::setDestinationDir(const QString &dir)
-{
- m_destDir->setText(dir);
-}
-
-
-//==========================================================================
-
-Step2::Step2(QWidget *parent) : QWidget(parent,"Step2")
-{
- QVBoxLayout *layout = new QVBoxLayout(this);
- layout->setSpacing(8);
-
- m_extractMode = new QButtonGroup("Select the desired extraction mode:",this);
- QGridLayout *gbox = new QGridLayout( m_extractMode, 4, 1, 8, 0 );
- gbox->addRowSpacing( 0, fontMetrics().lineSpacing()+2 );
- gbox->addWidget(new QRadioButton("Documented entities only",m_extractMode),1,0);
- gbox->addWidget(new QRadioButton("All entities",m_extractMode),2,0);
- gbox->addWidget(m_crossRef = new QCheckBox("Include cross-referenced source code in the output",m_extractMode),3,0);
- m_extractMode->setButton(0);
- layout->addWidget(m_extractMode);
-
- //---------------------------------------------------
- QFrame *f = new QFrame( this );
- f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- layout->addWidget(f);
-
- m_optimizeLang = new QButtonGroup("Select programming language to optimize the results for",this);
- gbox = new QGridLayout( m_optimizeLang, 4, 1, 8, 0 );
- gbox->addRowSpacing( 0, fontMetrics().lineSpacing()+2 );
- gbox->addWidget(new QRadioButton("Optimize for C++ output",m_optimizeLang),1,0);
- gbox->addWidget(new QRadioButton("Optimize for Java output",m_optimizeLang),2,0);
- gbox->addWidget(new QRadioButton("Optimize for C output",m_optimizeLang),3,0);
- m_optimizeLang->setButton(0);
- layout->addWidget(m_optimizeLang);
-
- layout->addStretch(1);
-
- connect(m_crossRef,SIGNAL(stateChanged(int)),
- parent,SLOT(changeCrossRefState(int)));
-}
-
-bool Step2::crossReferencingEnabled() const
-{
- //printf("Step2::crossReferencingEnabled()=%d\n",m_crossRef->isOn());
- return m_crossRef->isOn();
-}
-
-void Step2::enableCrossReferencing()
-{
- //printf("Step2::enableCrossReferencing()\n");
- m_crossRef->setChecked(TRUE);
-}
-
-bool Step2::extractAll() const
-{
- //printf("Step2::extractAll()=%d\n",m_extractMode->find(1)->isOn());
- return m_extractMode->find(1)->isOn();
-}
-
-bool Step2::crossReferencing() const
-{
- return m_crossRef->isChecked();
-}
-
-OptLang Step2::optimizeFor() const
-{
- switch (m_optimizeLang->selectedId())
- {
- case 0: return Lang_Cpp;
- case 1: return Lang_Java;
- case 2: return Lang_C;
- }
- return Lang_Cpp;
-}
-
-void Step2::setExtractAll(bool enable)
-{
- //printf("Step2::setExtractAll(%d)\n",enable);
- m_extractMode->setButton(enable?1:0);
-}
-
-void Step2::setCrossReferencing(bool enable)
-{
- //printf("Step2::setCrossReferencing(%d)\n",enable);
- m_crossRef->setChecked(enable);
-}
-
-void Step2::setOptimizeFor(OptLang lang)
-{
- switch (lang)
- {
- case Lang_Cpp: m_optimizeLang->setButton(0); break;
- case Lang_Java: m_optimizeLang->setButton(1); break;
- case Lang_C: m_optimizeLang->setButton(2); break;
- }
-}
-
-//==========================================================================
-
-Step3::Step3(QWidget *parent) : QWidget(parent,"Step3")
-{
- QVBoxLayout *layout = new QVBoxLayout(this);
- QButtonGroup *bg = new QButtonGroup("Output format(s) to generate",this);
- QGridLayout *gbox = new QGridLayout( bg, 8, 1, 8, 0 );
- gbox->addRowSpacing( 0, fontMetrics().lineSpacing()+2 );
- gbox->addWidget(m_htmlEnabled=new QCheckBox("HTML",bg),1,0);
- QWidget *w = new QWidget(bg);
- QHBoxLayout *bl = new QHBoxLayout(w);
- m_htmlOptions = new QButtonGroup(w);
- m_htmlOptions->hide();
- m_htmlOptionBox = new QVBox(w);
- m_htmlOptions->insert(new QRadioButton("plain HTML",m_htmlOptionBox));
- m_htmlOptions->insert(new QRadioButton("with frames and a navigation tree",m_htmlOptionBox));
- m_htmlOptions->insert(new QRadioButton("prepare for compressed HTML (.chm)",m_htmlOptionBox));
- m_htmlOptions->insert(m_searchEnabled=new QCheckBox("With search function (requires PHP enabled web server)",m_htmlOptionBox));
- bl->addSpacing(30);
- bl->addWidget(m_htmlOptionBox);
- m_htmlOptions->setButton(0);
- m_htmlOptionBox->setEnabled(TRUE);
- gbox->addWidget(w,2,0);
-
- gbox->addWidget(m_latexEnabled=new QCheckBox("LaTeX",bg),3,0);
- w = new QWidget(bg);
- bl = new QHBoxLayout(w);
- m_texOptions = new QButtonGroup(w);
- m_texOptions->hide();
- m_texOptionBox = new QVBox(w);
- m_texOptions->insert(new QRadioButton("as intermediate format for hyperlinked PDF",m_texOptionBox));
- m_texOptions->insert(new QRadioButton("as intermediate format for PDF",m_texOptionBox));
- m_texOptions->insert(new QRadioButton("as intermediate format for PostScript",m_texOptionBox));
- bl->addSpacing(30);
- bl->addWidget(m_texOptionBox);
- m_texOptions->setButton(0);
- m_texOptionBox->setEnabled(FALSE);
- gbox->addWidget(w,4,0);
-
- gbox->addWidget(m_manEnabled=new QCheckBox("Man pages",bg),5,0);
- gbox->addWidget(m_rtfEnabled=new QCheckBox("Rich Text Format (RTF)",bg),6,0);
- gbox->addWidget(m_xmlEnabled=new QCheckBox("XML",bg),7,0);
- bg->setButton(0);
- layout->addWidget(bg);
-
- layout->addStretch(1);
-
- connect(m_latexEnabled,SIGNAL(stateChanged(int)),
- this,SLOT(latexStateChange(int)));
- connect(m_htmlEnabled,SIGNAL(stateChanged(int)),
- this,SLOT(htmlStateChange(int)));
-}
-
-void Step3::latexStateChange(int state)
-{
- if (state==QButton::On)
- {
- m_texOptionBox->setEnabled(TRUE);
- }
- else if (state==QButton::Off)
- {
- m_texOptionBox->setEnabled(FALSE);
- }
-}
-
-void Step3::htmlStateChange(int state)
-{
- if (state==QButton::On)
- {
- m_htmlOptionBox->setEnabled(TRUE);
- }
- else if (state==QButton::Off)
- {
- m_htmlOptionBox->setEnabled(FALSE);
- }
-}
-
-bool Step3::htmlEnabled() const
-{
- return m_htmlEnabled->isChecked();
-}
-
-bool Step3::latexEnabled() const
-{
- return m_latexEnabled->isChecked();
-}
-
-bool Step3::manEnabled() const
-{
- return m_manEnabled->isChecked();
-}
-
-bool Step3::rtfEnabled() const
-{
- return m_rtfEnabled->isChecked();
-}
-
-bool Step3::xmlEnabled() const
-{
- return m_xmlEnabled->isChecked();
-}
-
-bool Step3::searchEnabled() const
-{
- return m_searchEnabled->isChecked();
-}
-
-HtmlStyle Step3::htmlStyle() const
-{
- if (m_htmlOptions->find(0)->isOn())
- {
- return HS_Plain;
- }
- else if (m_htmlOptions->find(1)->isOn())
- {
- return HS_TreeView;
- }
- else if (m_htmlOptions->find(2)->isOn())
- {
- return HS_CHM;
- }
- // broken radio button logic
- return HS_Plain;
-}
-
-TexStyle Step3::texStyle() const
-{
- switch (m_texOptions->selectedId())
- {
- case 0: return TS_PDFHyper;
- case 1: return TS_PDF;
- case 2: return TS_PS;
- }
- return TS_PDFHyper;
-}
-
-void Step3::setHtmlEnabled(bool enable)
-{
- m_htmlEnabled->setChecked(enable);
-}
-
-void Step3::setLatexEnabled(bool enable)
-{
- m_latexEnabled->setChecked(enable);
-}
-
-void Step3::setManEnabled(bool enable)
-{
- m_manEnabled->setChecked(enable);
-}
-
-void Step3::setRtfEnabled(bool enable)
-{
- m_rtfEnabled->setChecked(enable);
-}
-
-void Step3::setXmlEnabled(bool enable)
-{
- m_xmlEnabled->setChecked(enable);
-}
-
-void Step3::setSearchEnabled(bool enable)
-{
- m_searchEnabled->setChecked(enable);
-}
-
-void Step3::setHtmlStyle(HtmlStyle style)
-{
- switch(style)
- {
- case HS_Plain: m_htmlOptions->setButton(0); break;
- case HS_TreeView: m_htmlOptions->setButton(1); break;
- case HS_CHM: m_htmlOptions->setButton(2); break;
- }
-}
-
-void Step3::setTexStyle(TexStyle style)
-{
- switch(style)
- {
- case TS_PDFHyper: m_texOptions->setButton(0); break;
- case TS_PDF: m_texOptions->setButton(1); break;
- case TS_PS: m_texOptions->setButton(2); break;
- }
-}
-
-
-//==========================================================================
-
-Step4::Step4(QWidget *parent) : QWidget(parent,"Step4")
-{
- QVBoxLayout *layout = new QVBoxLayout(this);
- m_diagramMode = new QButtonGroup("Diagrams to generate",this);
- QGridLayout *gbox = new QGridLayout( m_diagramMode, 5, 1, 8, 0 );
- gbox->addRowSpacing( 0, fontMetrics().lineSpacing()+2 );
- gbox->addWidget(new QRadioButton("No diagrams",m_diagramMode),1,0);
- gbox->addWidget(new QRadioButton("Use built-in class diagram generator",m_diagramMode),2,0);
- gbox->addWidget(new QRadioButton("Use dot tool from the GraphViz package to generate",m_diagramMode),3,0);
- QWidget *w = new QWidget(m_diagramMode);
- QHBoxLayout *bl = new QHBoxLayout(w);
- QButtonGroup *dotGroup = new QButtonGroup(w);
- dotGroup->hide();
- m_dotOptions = new QVBox(w);
- dotGroup->insert(m_dotClass=new QCheckBox("Class diagrams",m_dotOptions));
- dotGroup->insert(m_dotCollaboration=new QCheckBox("Collaboration diagrams",m_dotOptions));
- dotGroup->insert(m_dotInclude=new QCheckBox("Include dependency graphs",m_dotOptions));
- dotGroup->insert(m_dotIncludedBy=new QCheckBox("Included by dependency graphs",m_dotOptions));
- dotGroup->insert(m_dotInheritance=new QCheckBox("Overall Class hierarchy",m_dotOptions));
- dotGroup->insert(m_dotCall=new QCheckBox("Call graphs",m_dotOptions));
- bl->addSpacing(30);
- bl->addWidget(m_dotOptions);
- dotGroup->setButton(0);
- m_dotOptions->setEnabled(FALSE);
- gbox->addWidget(w,4,0);
- m_diagramMode->setButton(1);
- layout->addWidget(m_diagramMode);
- layout->addStretch(1);
-
- connect(m_diagramMode,SIGNAL(clicked(int)),
- this,SLOT(diagramModeChanged(int)));
- connect(m_dotCall,SIGNAL(stateChanged(int)),
- parent,SLOT(changeCallGraphState(int)));
-}
-
-void Step4::diagramModeChanged(int buttonId)
-{
- m_dotOptions->setEnabled(buttonId==2);
-}
-
-void Step4::disableCallGraphs()
-{
- m_dotCall->setChecked(FALSE);
-}
-
-bool Step4::callGraphEnabled() const
-{
- return m_dotCall->isOn();
-}
-
-DiagramMode Step4::diagramMode() const
-{
- switch(m_diagramMode->selectedId())
- {
- case 0: return DM_None;
- case 1: return DM_Builtin;
- case 2: return DM_Dot;
- }
- return DM_None;
-}
-
-bool Step4::classDiagram() const
-{
- return m_dotClass->isChecked();
-}
-
-bool Step4::collaborationDiagram() const
-{
- return m_dotCollaboration->isChecked();
-}
-
-bool Step4::includeGraph() const
-{
- return m_dotInclude->isChecked();
-}
-
-bool Step4::includedByGraph() const
-{
- return m_dotIncludedBy->isChecked();
-}
-
-bool Step4::inheritanceGraph() const
-{
- return m_dotInheritance->isChecked();
-}
-
-bool Step4::callGraph() const
-{
- return m_dotCall->isChecked();
-}
-
-void Step4::setDiagramMode(DiagramMode mode)
-{
- switch(mode)
- {
- case DM_None: m_diagramMode->setButton(0); diagramModeChanged(0); break;
- case DM_Builtin: m_diagramMode->setButton(1); diagramModeChanged(1); break;
- case DM_Dot: m_diagramMode->setButton(2); diagramModeChanged(2); break;
- }
-}
-
-void Step4::setClassDiagram(bool enable)
-{
- m_dotClass->setChecked(enable);
-}
-
-void Step4::setCollaborationDiagram(bool enable)
-{
- m_dotCollaboration->setChecked(enable);
-}
-
-void Step4::setIncludeGraph(bool enable)
-{
- m_dotInclude->setChecked(enable);
-}
-
-void Step4::setIncludedByGraph(bool enable)
-{
- m_dotIncludedBy->setChecked(enable);
-}
-
-void Step4::setInheritanceGraph(bool enable)
-{
- m_dotInheritance->setChecked(enable);
-}
-
-void Step4::setCallGraph(bool enable)
-{
- m_dotCall->setChecked(enable);
-}
-
-
-//==========================================================================
-
-Wizard::Wizard(QWidget *parent=0) : QTabDialog(parent)
-{
- addTab( m_step1 = new Step1(this),"Project");
- addTab( m_step2 = new Step2(this),"Mode");
- addTab( m_step3 = new Step3(this),"Output");
- addTab( m_step4 = new Step4(this),"Diagrams");
- setCancelButton();
-}
-
-void Wizard::changeCallGraphState(int state)
-{
- if (state==QButton::On && !m_step2->crossReferencingEnabled())
- {
- if (QMessageBox::question(this,"This option depends on another option",
- "The call graph option requires that cross-referencing "
- "of source code is enabled.\nDo you want to enable this "
- "option?",QMessageBox::Yes,QMessageBox::No)==QMessageBox::Yes)
- {
- m_step2->enableCrossReferencing();
- }
- else
- {
- m_step4->disableCallGraphs();
- }
- }
-}
-
-void Wizard::changeCrossRefState(int state)
-{
- if (state==QButton::Off && m_step4->callGraphEnabled())
- {
- if (QMessageBox::question(this,"Another option depends on this one",
- "The call graph option requires that cross-referencing "
- "of source code is enabled.\nDo you want to disable the call "
- "graph option?",QMessageBox::Yes,QMessageBox::No
- )==QMessageBox::Yes
- )
- {
- m_step4->disableCallGraphs();
- }
- else
- {
- m_step2->enableCrossReferencing();
- }
- }
-}
-
-//==========================================================================
-
-MainWidget::MainWidget(QWidget *parent)
- : QMainWindow(parent,"MainWidget")
-{
- setCaption("Doxygen GUI frontend");
-
- // initialize config settings
- Config::instance()->init();
- Config::instance()->check();
-#if defined(Q_OS_MACX)
- setDotPath();
-#endif
-
- QWidget *w = new QWidget(this);
- setCentralWidget(w);
- QVBoxLayout *layout = new QVBoxLayout(w);
- layout->setMargin(10);
-
- QPopupMenu *file = new QPopupMenu(this);
- file->insertItem("Open...", this, SLOT(loadConfigFile()), CTRL+Key_O);
- file->insertItem("Save As...", this, SLOT(saveConfigFile()), CTRL+Key_S);
- m_recentMenu = new QPopupMenu;
- file->insertItem( "&Recent configurations", m_recentMenu );
- connect(m_recentMenu,SIGNAL(activated(int)),this,SLOT(openRecent(int)));
- file->insertItem("Set as default...",this,SLOT(saveDefaults()) );
- file->insertItem("Reset...",this,SLOT(resetConfig()) );
- file->insertItem("Quit", this, SLOT(quit()), CTRL+Key_Q);
- QPopupMenu *help = new QPopupMenu(this);
-#if defined(Q_OS_MACX)
- help->insertItem("Online manual", this, SLOT(manual()), Key_F1);
-#endif
- help->insertItem("About", this, SLOT(about()) );
- menuBar()->insertItem("File",file);
- menuBar()->insertItem("Help",help);
-
- //---------------------------------------------------
- QVBox *heading = new QVBox(w);
- QLabel *l = new QLabel("Step 1: Configure doxygen",heading);
- QFrame *f = new QFrame( heading );
- f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- //f->setFixedSize(l->sizeHint().width(),f->sizeHint().height());
- layout->addWidget(heading);
- layout->addSpacing(10);
-
- l = new QLabel("Choose one of the following ways to configure doxygen",w);
- layout->addWidget(l);
- layout->addSpacing(5);
- QHBoxLayout *hbl = new QHBoxLayout(layout);
- hbl->setSpacing(8);
-
- m_wizard = new QPushButton("Wizard...",w);
- QToolTip::add(m_wizard,"Quickly configure the most important settings");
- hbl->addWidget(m_wizard);
-
- m_expert = new QPushButton("Expert...",w);
- QToolTip::add(m_expert,"Determine all configuration settings in detail");
- hbl->addWidget(m_expert);
-
- m_load = new QPushButton("Load...",w);
- QToolTip::add(m_load,"Load the configuration settings from file");
- hbl->addWidget(m_load);
-
- hbl->addStretch(1);
-
- //---------------------------------------------------
- heading = new QVBox(w);
- l = new QLabel("Step 2: Save the configuration file",heading);
- f = new QFrame( heading );
- f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- //f->setFixedSize(l->sizeHint().width(),f->sizeHint().height());
- layout->addSpacing(15);
- layout->addWidget(heading);
- layout->addSpacing(5);
-
- QGridLayout *grid = new QGridLayout(layout,1,2,10);
- m_save = new QPushButton("Save...",w);
- m_save->setFixedSize(m_save->sizeHint());
- grid->addWidget(m_save,0,0);
- grid->addWidget(m_saveStatus=new QLabel(w),0,1);
- m_saveStatus->setTextFormat(Qt::RichText);
-
- //---------------------------------------------------
- heading = new QVBox(w);
- l = new QLabel("Step 3: Specify the directory from which to run doxygen",heading);
- f = new QFrame( heading );
- f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- //f->setFixedSize(l->sizeHint().width(),f->sizeHint().height());
- layout->addSpacing(15);
- layout->addWidget(heading);
- layout->addSpacing(5);
-
- QHBoxLayout *row = new QHBoxLayout( layout );
- row->setSpacing(10);
- row->addWidget(new QLabel("Working directory:",w));
- m_workingDir = new QLineEdit(w);
- m_selWorkingDir = new QPushButton("Select...",w);
- row->addWidget(m_workingDir,1);
- row->addWidget(m_selWorkingDir);
-
- //---------------------------------------------------
- heading = new QVBox(w);
- l = new QLabel("Step 4: Run doxygen",heading);
- f = new QFrame( heading );
- f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- //f->setFixedSize(l->sizeHint().width(),f->sizeHint().height());
- layout->addSpacing(15);
- layout->addWidget(heading);
- layout->addSpacing(5);
-
- row = new QHBoxLayout( layout );
- row->setSpacing(10);
- m_run = new QPushButton("Start",w);
- row->addWidget(m_run);
- row->addWidget(m_runStatus = new QLabel("Status: not running",w));
- row->addStretch(1);
- m_run->setEnabled(FALSE);
- m_runStatus->setEnabled(FALSE);
-
- m_saveLog = new QPushButton("Save log...",w);
- m_saveLog->setEnabled(FALSE);
- row->addWidget(m_saveLog);
-
- layout->addSpacing(8);
- layout->addWidget(m_outputHeading=new QLabel("Output produced by doxygen",w));
- grid = new QGridLayout(layout,1,1,3);
- m_outputLog = new QTextEdit(w);
- m_outputLog->setReadOnly(TRUE);
- m_outputLog->setMinimumWidth(600);
- grid->addWidget(m_outputLog,0,0);
- grid->setColStretch(0,1);
- grid->setRowStretch(0,1);
- m_outputLog->setEnabled(FALSE);
- m_outputHeading->setEnabled(FALSE);
-
- // make connections
- connect(m_wizard,SIGNAL(clicked()),
- this,SLOT(launchWizard()));
- connect(m_expert,SIGNAL(clicked()),
- this,SLOT(launchExpert()));
- connect(m_load,SIGNAL(clicked()),
- this,SLOT(loadConfigFile()));
- connect(m_save,SIGNAL(clicked()),
- this,SLOT(saveConfigFile()));
- connect(m_selWorkingDir,SIGNAL(clicked()),
- this,SLOT(selectWorkingDir()));
- connect(m_workingDir,SIGNAL(textChanged(const QString&)),
- this,SLOT(updateRunnable(const QString&)));
- connect(m_run,SIGNAL(clicked()),
- this,SLOT(runDoxygen()));
- connect(m_saveLog,SIGNAL(clicked()),
- this,SLOT(saveLog()));
-
- // load default settings
- m_settings.setPath("www.doxygen.org","Doxygen GUI");
- bool ok;
- QString config = m_settings.readEntry("/doxywizard/config/default",QString::null,&ok);
- if (ok && !config.isEmpty())
- {
- Config::instance()->parseString("default settings",config);
- }
- QString workingDir = m_settings.readEntry("/doxywizard/config/workingdir",QString::null,&ok);
- if (ok && !workingDir.isEmpty())
- {
- m_workingDir->setText(workingDir);
- }
- setConfigSaved(FALSE);
- for (int i=0;i<10;i++)
- {
- QString entry = m_settings.readEntry(QString().sprintf("/doxywizard/recent/config%d",i));
- if (!entry.isEmpty())
- {
- addRecentFile(entry);
- }
- }
-
- m_runProcess = new QProcess;
- connect(m_runProcess,SIGNAL(readyReadStdout()),this,SLOT(readStdout()));
- connect(m_runProcess,SIGNAL(processExited()),this,SLOT(runComplete()));
- m_running = FALSE;
- m_timer = new QTimer;
- connect(m_timer,SIGNAL(timeout()),this,SLOT(readStdout()));
-
- statusBar()->message("Welcome to Doxygen",messageTimeout);
-}
-
-MainWidget::~MainWidget()
-{
- delete m_runProcess;
-}
-
-void MainWidget::selectWorkingDir()
-{
- QString selectedDir = QFileDialog::getExistingDirectory(m_workingDir->text());
- if (!selectedDir.isEmpty())
- {
- m_workingDir->setText(selectedDir);
- }
-}
-
-void MainWidget::updateRunnable(const QString &newDirName)
-{
- if (m_running) return;
- QFileInfo fi(newDirName);
- bool isRunnable = fi.exists() && fi.isDir() && m_configSaved;
- m_run->setEnabled(isRunnable);
- m_runStatus->setEnabled(isRunnable);
- m_outputHeading->setEnabled(isRunnable);
- m_outputLog->setEnabled(isRunnable);
- m_saveLog->setEnabled(isRunnable && !m_outputLog->text().isEmpty());
-}
-
-void MainWidget::launchWizard()
-{
- Wizard wizard(this);
-
- // -------- Initialize the dialog ----------------
-
- // step1
- wizard.setProjectName(Config_getString("PROJECT_NAME"));
- wizard.setProjectNumber(Config_getString("PROJECT_NUMBER"));
- if (Config_getList("INPUT").count()>0)
- {
- QString dirName=Config_getList("INPUT").getFirst();
- QFileInfo fi(dirName);
- if (fi.exists() && fi.isDir())
- {
- wizard.setSourceDir(dirName);
- }
- }
- wizard.setRecursiveScan(Config_getBool("RECURSIVE"));
- wizard.setDestinationDir(Config_getString("OUTPUT_DIRECTORY"));
-
- // step2
- wizard.setExtractAll(Config_getBool("EXTRACT_ALL"));
- wizard.setCrossReferencing(Config_getBool("SOURCE_BROWSER"));
- if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
- {
- wizard.setOptimizeFor(Lang_Java);
- }
- else if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- {
- wizard.setOptimizeFor(Lang_C);
- }
- else
- {
- wizard.setOptimizeFor(Lang_Cpp);
- }
-
- // step3
- wizard.setHtmlEnabled(Config_getBool("GENERATE_HTML"));
- wizard.setLatexEnabled(Config_getBool("GENERATE_LATEX"));
- wizard.setManEnabled(Config_getBool("GENERATE_MAN"));
- wizard.setRtfEnabled(Config_getBool("GENERATE_RTF"));
- wizard.setXmlEnabled(Config_getBool("GENERATE_XML"));
- wizard.setSearchEnabled(Config_getBool("SEARCHENGINE"));
- if (Config_getBool("GENERATE_HTMLHELP"))
- {
- wizard.setHtmlStyle(HS_CHM);
- }
- else if (Config_getBool("GENERATE_TREEVIEW"))
- {
- wizard.setHtmlStyle(HS_TreeView);
- }
- else
- {
- wizard.setHtmlStyle(HS_Plain);
- }
- if (Config_getBool("USE_PDFLATEX"))
- {
- if (Config_getBool("PDF_HYPERLINKS"))
- {
- wizard.setTexStyle(TS_PDFHyper);
- }
- else
- {
- wizard.setTexStyle(TS_PDF);
- }
- }
- else
- {
- wizard.setTexStyle(TS_PS);
- }
-
- // step4
- if (Config_getBool("HAVE_DOT"))
- {
- wizard.setDiagramMode(DM_Dot);
- }
- else if (Config_getBool("CLASS_DIAGRAMS"))
- {
- wizard.setDiagramMode(DM_Builtin);
- }
- else
- {
- wizard.setDiagramMode(DM_None);
- }
- wizard.setClassDiagram(Config_getBool("CLASS_GRAPH"));
- wizard.setCollaborationDiagram(Config_getBool("COLLABORATION_GRAPH"));
- wizard.setIncludeGraph(Config_getBool("INCLUDE_GRAPH"));
- wizard.setIncludedByGraph(Config_getBool("INCLUDED_BY_GRAPH"));
- wizard.setInheritanceGraph(Config_getBool("GRAPHICAL_HIERARCHY"));
- wizard.setCallGraph(Config_getBool("CALL_GRAPH"));
-
- // -------- Run the dialog ----------------
-
- if (wizard.exec()==QDialog::Accepted)
- {
- // -------- Store the results ----------------
-
- // step1
- Config_getString("PROJECT_NAME")=wizard.getProjectName();
- Config_getString("PROJECT_NUMBER")=wizard.getProjectNumber();
- Config_getList("INPUT").clear();
- Config_getList("INPUT").append(wizard.getSourceDir());
- Config_getBool("RECURSIVE")=wizard.scanRecursively();
- Config_getString("OUTPUT_DIRECTORY")=wizard.getDestinationDir();
-
- // step2
- if (wizard.extractAll())
- {
- Config_getBool("EXTRACT_ALL")=TRUE;
- Config_getBool("EXTRACT_PRIVATE")=TRUE;
- Config_getBool("EXTRACT_STATIC")=TRUE;
- Config_getBool("EXTRACT_LOCAL_CLASSES")=TRUE;
- Config_getBool("HIDE_UNDOC_MEMBERS")=FALSE;
- Config_getBool("HIDE_UNDOC_CLASSES")=FALSE;
- }
- else
- {
- Config_getBool("EXTRACT_ALL")=FALSE;
- Config_getBool("EXTRACT_PRIVATE")=FALSE;
- Config_getBool("EXTRACT_STATIC")=FALSE;
- Config_getBool("EXTRACT_LOCAL_CLASSES")=TRUE;
- Config_getBool("HIDE_UNDOC_MEMBERS")=TRUE;
- Config_getBool("HIDE_UNDOC_CLASSES")=TRUE;
- }
-
- if (wizard.crossReferencing())
- {
- Config_getBool("SOURCE_BROWSER")=TRUE;
- Config_getBool("REFERENCED_BY_RELATION")=TRUE;
- Config_getBool("REFERENCES_RELATION")=TRUE;
- Config_getBool("VERBATIM_HEADERS")=TRUE;
- }
- else
- {
- Config_getBool("SOURCE_BROWSER")=FALSE;
- Config_getBool("REFERENCED_BY_RELATION")=FALSE;
- Config_getBool("REFERENCES_RELATION")=FALSE;
- Config_getBool("VERBATIM_HEADERS")=FALSE;
- }
-
- switch(wizard.optimizeFor())
- {
- case Lang_Cpp:
- Config_getBool("OPTIMIZE_OUTPUT_FOR_C")=FALSE;
- Config_getBool("OPTIMIZE_OUTPUT_JAVA")=FALSE;
- break;
- case Lang_Java:
- Config_getBool("OPTIMIZE_OUTPUT_FOR_C")=FALSE;
- Config_getBool("OPTIMIZE_OUTPUT_JAVA")=TRUE;
- break;
- case Lang_C:
- Config_getBool("OPTIMIZE_OUTPUT_FOR_C")=TRUE;
- Config_getBool("OPTIMIZE_OUTPUT_JAVA")=FALSE;
- break;
- }
-
- // step3
- Config_getBool("GENERATE_HTML")=wizard.htmlEnabled();
- Config_getBool("GENERATE_LATEX")=wizard.latexEnabled();
- Config_getBool("GENERATE_MAN")=wizard.manEnabled();
- Config_getBool("GENERATE_RTF")=wizard.rtfEnabled();
- Config_getBool("GENERATE_XML")=wizard.xmlEnabled();
- Config_getBool("SEARCHENGINE")=wizard.searchEnabled();
- if (wizard.htmlEnabled())
- {
- switch (wizard.htmlStyle())
- {
- case HS_Plain:
- Config_getBool("GENERATE_HTMLHELP")=FALSE;
- Config_getBool("GENERATE_TREEVIEW")=FALSE;
- break;
- case HS_TreeView:
- Config_getBool("GENERATE_HTMLHELP")=FALSE;
- Config_getBool("GENERATE_TREEVIEW")=TRUE;
- break;
- case HS_CHM:
- Config_getBool("GENERATE_HTMLHELP")=TRUE;
- Config_getBool("GENERATE_TREEVIEW")=FALSE;
- break;
- }
- }
- if (wizard.latexEnabled())
- {
- switch (wizard.texStyle())
- {
- case TS_PDFHyper:
- Config_getBool("USE_PDFLATEX")=TRUE;
- Config_getBool("PDF_HYPERLINKS")=TRUE;
- break;
- case TS_PDF:
- Config_getBool("USE_PDFLATEX")=TRUE;
- Config_getBool("PDF_HYPERLINKS")=FALSE;
- break;
- case TS_PS:
- Config_getBool("USE_PDFLATEX")=FALSE;
- Config_getBool("PDF_HYPERLINKS")=FALSE;
- break;
- }
- }
-
- // step4
- switch (wizard.diagramMode())
- {
- case DM_None:
- Config_getBool("CLASS_DIAGRAMS")=FALSE;
- Config_getBool("HAVE_DOT")=FALSE;
- break;
- case DM_Builtin:
- Config_getBool("CLASS_DIAGRAMS")=TRUE;
- Config_getBool("HAVE_DOT")=FALSE;
- break;
- case DM_Dot:
- Config_getBool("CLASS_DIAGRAMS")=FALSE;
- Config_getBool("HAVE_DOT")=TRUE;
- Config_getBool("CLASS_GRAPH")=wizard.classDiagram();
- Config_getBool("COLLABORATION_GRAPH")=wizard.collaborationDiagram();
- Config_getBool("INCLUDE_GRAPH")=wizard.includeGraph();
- Config_getBool("INCLUDED_BY_GRAPH")=wizard.includedByGraph();
- Config_getBool("GRAPHICAL_HIERARCHY")=wizard.inheritanceGraph();
- Config_getBool("CALL_GRAPH")=wizard.callGraph();
- break;
- }
-#if defined(Q_OS_MACX)
- if (Config_getBool("HAVE_DOT"))
- {
- setDotPath();
- }
-#endif
- setConfigSaved(FALSE);
- }
-}
-
-void MainWidget::loadConfigFromFile(const QString &fn)
-{
- if (!Config::instance()->parse(fn))
- {
- QMessageBox::warning(0,"Warning",
- "Could not open or read config file "+fn+"!",
- "abort"
- );
- }
- else
- {
- Config::instance()->convertStrToVal();
-#if defined(Q_OS_MACX)
- if (checkIfDotInstalled() &&
- qstricmp(Config_getString("DOT_PATH"),DOT_PATH)!=0
- )
- {
- Config_getString("DOT_PATH")=DOT_PATH;
- setConfigSaved(FALSE);
- }
- else
- {
- setConfigSaved(TRUE);
- }
-#else
- setConfigSaved(TRUE);
-#endif
- addRecentFile(fn);
- m_workingDir->setText(QFileInfo(fn).dirPath(TRUE));
- m_configFileName = fn;
- statusBar()->message("New configuration loaded",messageTimeout);
- }
-}
-
-void MainWidget::loadConfigFile()
-{
- QString fn = QFileDialog::getOpenFileName(m_workingDir->text(),QString::null,this);
- if (!fn.isEmpty())
- {
- loadConfigFromFile(fn);
- // set current dir to where the config file is located
- QDir::setCurrent(QFileInfo(fn).dirPath(TRUE));
- }
-}
-
-void MainWidget::launchExpert()
-{
- Expert expert(this);
- expert.init();
- expert.exec();
-#if defined(Q_OS_MACX)
- setDotPath();
-#endif
- if (expert.hasChanged()) setConfigSaved(FALSE);
-}
-
-void MainWidget::saveDefaults()
-{
- if (QMessageBox::question(this,"Store settings as defaults",
- "Do you wish to use the "
- "current configuration settings as the default settings?",
- QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes)
- {
- QString newConfig;
- QTextStream t(&newConfig,IO_WriteOnly);
- Config::instance()->writeTemplate(t,TRUE,FALSE);
- m_settings.writeEntry("/doxywizard/config/default",newConfig);
- m_settings.writeEntry("/doxywizard/config/workingdir",m_workingDir->text());
- statusBar()->message("Current configuration saved as default",messageTimeout);
- }
-}
-
-void MainWidget::saveConfigFile()
-{
- QString fn = QFileDialog::getSaveFileName(m_workingDir->text()+"/Doxyfile",QString::null,this);
- if (!fn.isEmpty())
- {
- QFile f(fn);
- if (f.open(IO_WriteOnly))
- {
- QTextStream t(&f);
- Config::instance()->writeTemplate(t,TRUE,FALSE);
- m_configFileName = fn;
- setConfigSaved(TRUE);
- addRecentFile(fn);
- statusBar()->message("Configuration saved",messageTimeout);
- }
- else
- {
- QMessageBox::warning(0,"Warning",
- "Cannot open file "+fn+" for writing. Nothing saved!","ok");
- }
- }
-}
-
-void MainWidget::resetConfig()
-{
- if (QMessageBox::question(this,"Reset settings to their defaults",
- "Do you wish to reset the "
- "current configuration settings to their factory defaults?",
- QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes)
- {
- // initialize config settings
- Config::instance()->init();
-#if defined(Q_OS_MACX)
- setDotPath();
-#endif
-
- m_configFileName = "";
- setConfigSaved(FALSE);
- statusBar()->message("Configuration settings reset to their defaults",messageTimeout);
- }
-}
-
-void MainWidget::setConfigSaved(bool enable)
-{
- m_configSaved=enable;
- if (m_configSaved)
- {
- m_saveStatus->setText("Status: saved");
- }
- else
- {
- m_saveStatus->setText("Status: <font color=\"red\">not saved</font>");
- }
- updateRunnable(m_workingDir->text());
-}
-
-void MainWidget::runDoxygen()
-{
- if (!m_running)
- {
- QString doxygenPath;
-#if defined(Q_OS_MACX)
- doxygenPath = getResourcePath();
-#else
- // TODO: get the right value if not in the search path
-#endif
- //printf("Trying to run doxygen from path %s\n",doxygenPath.data());
-
- m_runProcess->setCommunication(QProcess::Stdout|
- QProcess::Stderr|
- QProcess::DupStderr
- );
- m_runProcess->setWorkingDirectory(QDir(m_workingDir->text()));
- m_runProcess->clearArguments();
- m_runProcess->addArgument(doxygenPath+"doxygen");
- m_runProcess->addArgument("-b");
- m_runProcess->addArgument(m_configFileName);
- m_outputLog->clear();
- if (!m_runProcess->start())
- {
- m_outputLog->append(QString("*** Failed to run doxygen\n"));
- }
- else
- {
- m_running=TRUE;
- m_run->setText("Cancel");
- m_runStatus->setText("Status: running");
- m_timer->start(1000);
- }
- }
- else
- {
- m_running=FALSE;
- m_run->setText("Start");
- m_runStatus->setText("Status: not running");
- m_runProcess->kill();
- m_timer->stop();
- updateRunnable(m_workingDir->text());
- }
-}
-
-void MainWidget::readStdout()
-{
- m_outputLog->append(QString(m_runProcess->readStdout()));
-}
-
-void MainWidget::runComplete()
-{
- if (m_running)
- {
- m_outputLog->append(QString("*** Doxygen has finished\n"));
- }
- else
- {
- m_outputLog->append(QString("*** Cancelled by user\n"));
- }
- m_run->setText("Start");
- m_runStatus->setText("Status: not running");
- m_running=FALSE;
- updateRunnable(m_workingDir->text());
-}
-
-void MainWidget::about()
-{
- QString msg;
- QTextStream t(&msg,IO_WriteOnly);
- t << QString("<qt><center>A tool to configure and run doxygen version ")+versionString+
- " on your source files.</center><p><br>"
- "<center>Written by<br> Dimitri van Heesch<br>&copy; 2000-2005</center><p>"
- "</qt>";
- QMessageBox::about(this,"Doxygen GUI",msg);
-}
-
-void MainWidget::manual()
-{
-#if defined(Q_OS_MACX)
- const char *urlBytes = "http://www.doxygen.org/manual.html";
- CFURLRef url = CFURLCreateWithBytes (
- NULL, // allocator
- (UInt8*)urlBytes, // bytes
- strlen(urlBytes), // length
- kCFStringEncodingASCII, // encoding
- NULL // baseURL
- );
- LSOpenCFURLRef(url,0);
- CFRelease(url);
-#endif
-}
-
-void MainWidget::addRecentFile(const QString &file)
-{
- QStringList::Iterator it = m_recentFiles.find(file);
- if (it!=m_recentFiles.end())
- {
- // already found => move to top
- m_recentFiles.remove(it);
- m_recentFiles.prepend(file);
- }
- else
- {
- // not found
- if (m_recentFiles.count() < 10) // append
- {
- m_recentFiles.prepend(file);
- }
- else // add + drop last item
- {
- m_recentFiles.remove(m_recentFiles.last());
- m_recentFiles.prepend(file);
- }
- }
-
- m_recentMenu->clear();
- int i=0;
- for ( it = m_recentFiles.begin(); it != m_recentFiles.end(); ++it, ++i )
- {
- m_recentMenu->insertItem(*it);
- m_settings.writeEntry(QString().sprintf("/doxywizard/recent/config%d",i),*it);
- }
-}
-
-
-void MainWidget::openRecent(int id)
-{
- loadConfigFromFile(m_recentMenu->text(id));
-}
-
-void MainWidget::quit()
-{
- if (!m_configSaved &&
- QMessageBox::warning( this, "DoxyWizard", "Quit and lose changes?",
- QMessageBox::Yes, QMessageBox::No)==QMessageBox::No
- ) return; // Quit cancelled by user
-
- qApp->quit();
-}
-
-void MainWidget::saveLog()
-{
- QString fn = QFileDialog::getSaveFileName(m_workingDir->text()+"/doxygen_log.txt",QString::null,this);
- if (!fn.isEmpty())
- {
- QFile f(fn);
- if (f.open(IO_WriteOnly))
- {
- QTextStream t(&f);
- t << m_outputLog->text();
- statusBar()->message("Output log saved",messageTimeout);
- }
- else
- {
- QMessageBox::warning(0,"Warning",
- "Cannot open file "+fn+" for writing. Nothing saved!","ok");
- }
- }
-}
-
-//==========================================================================
-
-int main(int argc,char **argv)
-{
- QApplication a(argc,argv);
- MainWidget main;
- if (argc==2 && argv[1][0]!='-') // name of config file as an argument
- {
- main.loadConfigFromFile(argv[1]);
- }
- else if (argc>1)
- {
- printf("Usage: %s [config file]\n",argv[0]);
- exit(1);
- }
- a.setMainWidget(&main);
- main.show();
- return a.exec();
-}
-
diff --git a/addon/doxywizard/doxywizard.h b/addon/doxywizard/doxywizard.h
deleted file mode 100644
index c937dae..0000000
--- a/addon/doxywizard/doxywizard.h
+++ /dev/null
@@ -1,292 +0,0 @@
-#ifndef DOXYWIZARD_H
-#define DOXYWIZARD_H
-
-#include <qvbox.h>
-#include <qtabdialog.h>
-#include <qmainwindow.h>
-#include <qsettings.h>
-#include <qstringlist.h>
-
-class QLineEdit;
-class QCheckBox;
-class QPushButton;
-class QComboBox;
-class QButtonGroup;
-class QTextEdit;
-class QLabel;
-class QProcess;
-class QTimer;
-class QPopupMenu;
-
-enum OptLang { Lang_Cpp, Lang_C, Lang_Java };
-enum HtmlStyle { HS_Plain, HS_TreeView, HS_CHM };
-enum TexStyle { TS_PDFHyper, TS_PDF, TS_PS };
-enum DiagramMode { DM_None, DM_Builtin, DM_Dot };
-
-class Step1 : public QWidget
-{
- Q_OBJECT
-
- public:
- Step1(QWidget *parent);
-
- QString getProjectName() const;
- QString getProjectNumber() const;
- QString getSourceDir() const;
- bool scanRecursively() const;
- QString getDestinationDir() const;
-
- void setProjectName(const QString &name);
- void setProjectNumber(const QString &num);
- void setSourceDir(const QString &dir);
- void setRecursiveScan(bool enable);
- void setDestinationDir(const QString &dir);
-
- private slots:
- void selectSourceDir();
- void selectDestinationDir();
-
- private:
- QLineEdit *m_projName;
- QLineEdit *m_projNumber;
- QLineEdit *m_sourceDir;
- QLineEdit *m_destDir;
- QCheckBox *m_recursive;
- QPushButton *m_srcSelectDir;
- QPushButton *m_dstSelectDir;
-};
-
-class Step2 : public QWidget
-{
- public:
- Step2(QWidget *parent);
- bool crossReferencingEnabled() const;
- void enableCrossReferencing();
-
- bool extractAll() const;
- bool crossReferencing() const;
- OptLang optimizeFor() const;
-
- void setExtractAll(bool enable);
- void setCrossReferencing(bool enable);
- void setOptimizeFor(OptLang lang);
-
- private:
- QButtonGroup *m_extractMode;
- QButtonGroup *m_optimizeLang;
- QCheckBox *m_crossRef;
-};
-
-class Step3 : public QWidget
-{
- Q_OBJECT
-
- public:
- Step3(QWidget *parent);
-
- bool htmlEnabled() const;
- bool latexEnabled() const;
- bool manEnabled() const;
- bool rtfEnabled() const;
- bool xmlEnabled() const;
- bool searchEnabled() const;
- HtmlStyle htmlStyle() const;
- TexStyle texStyle() const;
-
- void setHtmlEnabled(bool);
- void setLatexEnabled(bool);
- void setManEnabled(bool);
- void setRtfEnabled(bool);
- void setXmlEnabled(bool);
- void setSearchEnabled(bool);
- void setHtmlStyle(HtmlStyle);
- void setTexStyle(TexStyle);
-
-
- private slots:
- void latexStateChange(int state);
- void htmlStateChange(int state);
-
- private:
- QButtonGroup *m_texOptions;
- QVBox *m_texOptionBox;
- QButtonGroup *m_htmlOptions;
- QVBox *m_htmlOptionBox;
- QCheckBox *m_htmlEnabled;
- QCheckBox *m_latexEnabled;
- QCheckBox *m_manEnabled;
- QCheckBox *m_rtfEnabled;
- QCheckBox *m_xmlEnabled;
- QCheckBox *m_searchEnabled;
-};
-
-class Step4 : public QWidget
-{
- Q_OBJECT
-
- public:
- Step4(QWidget *parent);
- void disableCallGraphs();
- bool callGraphEnabled() const;
-
- DiagramMode diagramMode() const;
- bool classDiagram() const;
- bool collaborationDiagram() const;
- bool includeGraph() const;
- bool includedByGraph() const;
- bool inheritanceGraph() const;
- bool callGraph() const;
-
- void setDiagramMode(DiagramMode mode);
- void setClassDiagram(bool enable);
- void setCollaborationDiagram(bool enable);
- void setIncludeGraph(bool enable);
- void setIncludedByGraph(bool enable);
- void setInheritanceGraph(bool enable);
- void setCallGraph(bool enable);
-
- private slots:
- void diagramModeChanged(int);
-
- private:
- QButtonGroup *m_diagramMode;
- QVBox *m_dotOptions;
- QCheckBox *m_dotClass;
- QCheckBox *m_dotCollaboration;
- QCheckBox *m_dotInclude;
- QCheckBox *m_dotIncludedBy;
- QCheckBox *m_dotInheritance;
- QCheckBox *m_dotCall;
-};
-
-class Wizard : public QTabDialog
-{
- Q_OBJECT
-
- public:
- Wizard(QWidget *parent);
- void disableCallGraphs();
-
- // step1
- QString getProjectName() const { return m_step1->getProjectName(); }
- QString getProjectNumber() const { return m_step1->getProjectNumber(); }
- QString getSourceDir() const { return m_step1->getSourceDir(); }
- bool scanRecursively() const { return m_step1->scanRecursively(); }
- QString getDestinationDir() const { return m_step1->getDestinationDir(); }
-
- void setProjectName(const QString &name) { m_step1->setProjectName(name); }
- void setProjectNumber(const QString &num) { m_step1->setProjectNumber(num); }
- void setSourceDir(const QString &dir) { m_step1->setSourceDir(dir); }
- void setRecursiveScan(bool enable) { m_step1->setRecursiveScan(enable); }
- void setDestinationDir(const QString &dir) { m_step1->setDestinationDir(dir); }
-
- // step2
- bool extractAll() const { return m_step2->extractAll(); }
- bool crossReferencing() const { return m_step2->crossReferencing(); }
- OptLang optimizeFor() const { return m_step2->optimizeFor(); }
-
- void setExtractAll(bool enable) { m_step2->setExtractAll(enable); }
- void setCrossReferencing(bool enable) { m_step2->setCrossReferencing(enable); }
- void setOptimizeFor(OptLang lang) { m_step2->setOptimizeFor(lang); }
-
- // step3
- bool htmlEnabled() const { return m_step3->htmlEnabled(); }
- bool latexEnabled() const { return m_step3->latexEnabled(); }
- bool manEnabled() const { return m_step3->manEnabled(); }
- bool rtfEnabled() const { return m_step3->rtfEnabled(); }
- bool xmlEnabled() const { return m_step3->xmlEnabled(); }
- bool searchEnabled() const { return m_step3->searchEnabled(); }
- HtmlStyle htmlStyle() const { return m_step3->htmlStyle(); }
- TexStyle texStyle() const { return m_step3->texStyle(); }
-
- void setHtmlEnabled(bool enable) { m_step3->setHtmlEnabled(enable); }
- void setLatexEnabled(bool enable) { m_step3->setLatexEnabled(enable); }
- void setManEnabled(bool enable) { m_step3->setManEnabled(enable); }
- void setRtfEnabled(bool enable) { m_step3->setRtfEnabled(enable); }
- void setXmlEnabled(bool enable) { m_step3->setXmlEnabled(enable); }
- void setSearchEnabled(bool enable) { m_step3->setSearchEnabled(enable); }
- void setHtmlStyle(HtmlStyle style) { m_step3->setHtmlStyle(style); }
- void setTexStyle(TexStyle style) { m_step3->setTexStyle(style); }
-
- // step4
- DiagramMode diagramMode() const { return m_step4->diagramMode(); }
- bool classDiagram() const { return m_step4->classDiagram(); }
- bool collaborationDiagram() const { return m_step4->collaborationDiagram(); }
- bool includeGraph() const { return m_step4->includeGraph(); }
- bool includedByGraph() const { return m_step4->includedByGraph(); }
- bool inheritanceGraph() const { return m_step4->inheritanceGraph(); }
- bool callGraph() const { return m_step4->callGraph(); }
-
- void setDiagramMode(DiagramMode mode) { m_step4->setDiagramMode(mode); }
- void setClassDiagram(bool enable) { m_step4->setClassDiagram(enable); }
- void setCollaborationDiagram(bool enable) { m_step4->setCollaborationDiagram(enable); }
- void setIncludeGraph(bool enable) { m_step4->setIncludeGraph(enable); }
- void setIncludedByGraph(bool enable) { m_step4->setIncludedByGraph(enable); }
- void setInheritanceGraph(bool enable) { m_step4->setInheritanceGraph(enable); }
- void setCallGraph(bool enable) { m_step4->setCallGraph(enable); }
-
- public slots:
- void changeCallGraphState(int state);
- void changeCrossRefState(int state);
-
- private:
- Step1 *m_step1;
- Step2 *m_step2;
- Step3 *m_step3;
- Step4 *m_step4;
-};
-
-class MainWidget : public QMainWindow
-{
- Q_OBJECT
- public:
- MainWidget(QWidget *parent=0);
- ~MainWidget();
- void loadConfigFromFile(const QString &);
-
- private slots:
- void launchWizard();
- void launchExpert();
- void loadConfigFile();
- void selectWorkingDir();
- void updateRunnable(const QString &newDirName);
- void saveDefaults();
- void saveConfigFile();
- void runDoxygen();
- void readStdout();
- void runComplete();
- void about();
- void manual();
- void resetConfig();
- void openRecent(int);
- void quit();
- void saveLog();
-
- private:
- void setConfigSaved(bool);
- void addRecentFile(const QString &);
-
- QPushButton *m_wizard;
- QPushButton *m_expert;
- QPushButton *m_load;
- QPushButton *m_save;
- QPushButton *m_defaults;
- QLineEdit *m_workingDir;
- QPushButton *m_selWorkingDir;
- QPushButton *m_run;
- QPushButton *m_saveLog;
- QLabel *m_runStatus;
- QProcess *m_runProcess;
- QLabel *m_saveStatus;
- QLabel *m_outputHeading;
- QTextEdit *m_outputLog;
- QTimer *m_timer;
- QSettings m_settings;
- QPopupMenu *m_recentMenu;
- bool m_configSaved;
- bool m_running;
- QString m_configFileName;
- QStringList m_recentFiles;
-};
-
-#endif
diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in
deleted file mode 100644
index ae83cb8..0000000
--- a/addon/doxywizard/doxywizard.pro.in
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-#
-#
-# Copyright (C) 1997-2005 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.
-#
-# project file for the doxywizard project
-
-# special template configuration file because we use flex
-TEMPLATE = doxywizard.t
-
-# executable to generate
-TARGET = ../../bin/doxywizard
-
-# configure options
-CONFIG = qt warn_on $extraopts
-
-# header file for the project
-HEADERS = doxywizard.h \
- version.h \
- inputstring.h \
- inputbool.h \
- inputstrlist.h \
- inputint.h \
- expert.h \
- config.h
-
-# source flle for the project
-SOURCES = doxywizard.cpp \
- version.cpp \
- inputstring.cpp \
- inputbool.cpp \
- inputstrlist.cpp \
- inputint.cpp \
- expert.cpp \
- config.cpp
-
-# where to put the objects
-OBJECTS_DIR = obj
-
-# where to put the intermediate moc stuff
-MOC_DIR = moc
-
-# extra C++ compiler options
-INCLUDEPATH += ../../src
-win32:TMAKE_CXXFLAGS += -DQT_DLL
-win32:INCLUDEPATH += .
-macosx-c++:LIBS+=-framework CoreFoundation -framework ApplicationServices
-
-# extra link options
-win32:TMAKE_LFLAGS = /NODEFAULTLIB:msvcrt.lib doxywizard.res
-win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt332.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
-win32:TMAKE_LIBS_QT =
-
diff --git a/addon/doxywizard/doxywizard.res b/addon/doxywizard/doxywizard.res
deleted file mode 100755
index 283b8bb..0000000
--- a/addon/doxywizard/doxywizard.res
+++ /dev/null
Binary files differ
diff --git a/addon/doxywizard/doxywizard.t b/addon/doxywizard/doxywizard.t
deleted file mode 100644
index c7576de..0000000
--- a/addon/doxywizard/doxywizard.t
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-#
-#
-# Copyright (C) 1997-2004 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.
-#!
-#! wizard.t: This is a custom template for building doxywizard
-#!
-#$ IncludeTemplate("app.t");
-
-LEX = flex
-YACC = bison
-
-#${
-sub GenerateDep {
- my($obj,$src,$dep) = @_;
- my(@objv,$srcv,$i,$s,$o,$d,$c);
- @objv = split(/\s+/,$obj);
- @srcv = split(/\s+/,$src);
- for $i ( 0..$#objv ) {
- $s = $srcv[$i];
- $o = $objv[$i];
- next if $s eq "";
- $text .= $o . ": " . $s;
- $text .= " ${linebreak}\n\t\t" . $dep if $dep ne "";
- if ( $moc_output{$s} ne "" ) {
- $text .= " ${linebreak}\n\t\t" . $moc_output{$s};
- }
- $d = &make_depend($s);
- $text .= " ${linebreak}\n\t\t" . $d if $d ne "";
- $text .= "\n";
- }
- chop $text;
-}
-#$}
-
-####################
-
-#$ GenerateDep("config.cpp","config.l");
- $(LEX) -PconfigYY -t config.l >config.cpp
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp
deleted file mode 100644
index a9d4028..0000000
--- a/addon/doxywizard/expert.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 <qmainwindow.h>
-#include <qpopupmenu.h>
-#include <qfileinfo.h>
-#include <qmenubar.h>
-#include <qstatusbar.h>
-#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
-#include <qscrollview.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-
-#include "expert.h"
-#include "inputbool.h"
-#include "inputstring.h"
-#include "inputstrlist.h"
-#include "inputint.h"
-#include "config.h"
-#include "version.h"
-
-//-------------------------------------------------------------------------
-
-Expert::Expert( QWidget *parent ) : QTabDialog( parent )
-{
-
- m_dependencies = new QDict< QList<IInput> >(257);
- m_dependencies->setAutoDelete(TRUE);
- m_inputWidgets = new QDict< IInput >;
- m_switches = new QDict< QObject >;
- m_changed = FALSE;
-
- setHelpButton();
-
- QListIterator<ConfigOption> options = Config::instance()->iterator();
- QVBoxLayout *pageLayout = 0;
- QFrame *page = 0;
- ConfigOption *option = 0;
- for (options.toFirst();(option=options.current());++options)
- {
- switch(option->kind())
- {
- case ConfigOption::O_Info:
- {
- if (pageLayout) pageLayout->addStretch(1);
- QScrollView *view = new QScrollView(this);
- view->setVScrollBarMode(QScrollView::Auto);
- view->setHScrollBarMode(QScrollView::AlwaysOff);
- view->setResizePolicy(QScrollView::AutoOneFit);
- page = new QFrame( view->viewport(), option->name() );
- pageLayout = new QVBoxLayout(page);
- pageLayout->setMargin(10);
- view->addChild(page);
- addTab(view,option->name());
- QWhatsThis::add(page, option->docs().simplifyWhiteSpace() );
- QToolTip::add(page, option->docs() );
- }
- break;
- case ConfigOption::O_String:
- {
- ASSERT(page!=0);
- InputString::StringMode sm=InputString::StringFree;
- switch(((ConfigString *)option)->widgetType())
- {
- case ConfigString::String: sm=InputString::StringFree; break;
- case ConfigString::File: sm=InputString::StringFile; break;
- case ConfigString::Dir: sm=InputString::StringDir; break;
- }
- InputString *inputString = new InputString(
- option->name(), // name
- page, // widget
- *((ConfigString *)option)->valueRef(), // variable
- sm // type
- );
- pageLayout->addWidget(inputString);
- QWhatsThis::add(inputString, option->docs().simplifyWhiteSpace() );
- QToolTip::add(inputString,option->docs());
- connect(inputString,SIGNAL(changed()),SLOT(changed()));
- m_inputWidgets->insert(option->name(),inputString);
- addDependency(m_switches,option->dependsOn(),option->name());
- }
- break;
- case ConfigOption::O_Enum:
- {
- ASSERT(page!=0);
- InputString *inputString = new InputString(
- option->name(), // name
- page, // widget
- *((ConfigEnum *)option)->valueRef(), // variable
- InputString::StringFixed // type
- );
- pageLayout->addWidget(inputString);
- QStrListIterator sli=((ConfigEnum *)option)->iterator();
- for (sli.toFirst();sli.current();++sli)
- {
- inputString->addValue(sli.current());
- }
- inputString->init();
- QWhatsThis::add(inputString, option->docs().simplifyWhiteSpace() );
- QToolTip::add(inputString, option->docs());
- connect(inputString,SIGNAL(changed()),SLOT(changed()));
- m_inputWidgets->insert(option->name(),inputString);
- addDependency(m_switches,option->dependsOn(),option->name());
- }
- break;
- case ConfigOption::O_List:
- {
- ASSERT(page!=0);
- InputStrList::ListMode lm=InputStrList::ListString;
- switch(((ConfigList *)option)->widgetType())
- {
- case ConfigList::String: lm=InputStrList::ListString; break;
- case ConfigList::File: lm=InputStrList::ListFile; break;
- case ConfigList::Dir: lm=InputStrList::ListDir; break;
- case ConfigList::FileAndDir: lm=InputStrList::ListFileDir; break;
- }
- InputStrList *inputStrList = new InputStrList(
- option->name(), // name
- page, // widget
- *((ConfigList *)option)->valueRef(), // variable
- lm // type
- );
- pageLayout->addWidget(inputStrList);
- QWhatsThis::add(inputStrList, option->docs().simplifyWhiteSpace() );
- QToolTip::add(inputStrList, option->docs());
- connect(inputStrList,SIGNAL(changed()),SLOT(changed()));
- m_inputWidgets->insert(option->name(),inputStrList);
- addDependency(m_switches,option->dependsOn(),option->name());
- }
- break;
- break;
- case ConfigOption::O_Bool:
- {
- ASSERT(page!=0);
- InputBool *inputBool = new InputBool(
- option->name(), // name
- page, // widget
- *((ConfigBool *)option)->valueRef() // variable
- );
- pageLayout->addWidget(inputBool);
- QWhatsThis::add(inputBool, option->docs().simplifyWhiteSpace() );
- QToolTip::add(inputBool, option->docs() );
- connect(inputBool,SIGNAL(changed()),SLOT(changed()));
- m_inputWidgets->insert(option->name(),inputBool);
- addDependency(m_switches,option->dependsOn(),option->name());
- }
- break;
- case ConfigOption::O_Int:
- {
- ASSERT(page!=0);
- InputInt *inputInt = new InputInt(
- option->name(), // name
- page, // widget
- *((ConfigInt *)option)->valueRef(), // variable
- ((ConfigInt *)option)->minVal(), // min value
- ((ConfigInt *)option)->maxVal() // max value
- );
- pageLayout->addWidget(inputInt);
- QWhatsThis::add(inputInt, option->docs().simplifyWhiteSpace() );
- QToolTip::add(inputInt, option->docs() );
- connect(inputInt,SIGNAL(changed()),SLOT(changed()));
- m_inputWidgets->insert(option->name(),inputInt);
- addDependency(m_switches,option->dependsOn(),option->name());
- }
- break;
- case ConfigOption::O_Obsolete:
- break;
- }
- }
- if (pageLayout) pageLayout->addStretch(1);
-
- QDictIterator<QObject> di(*m_switches);
- QObject *obj = 0;
- for (di.toFirst();(obj=di.current());++di)
- {
- connect(obj,SIGNAL(toggle(const char *,bool)),SLOT(toggle(const char *,bool)));
- // UGLY HACK: assumes each item depends on a boolean without checking!
- emit toggle(di.currentKey(),((InputBool *)obj)->getState());
- }
-
- connect(this,SIGNAL(helpButtonPressed()),this,SLOT(handleHelp()));
-
-}
-
-Expert::~Expert()
-{
- delete m_dependencies;
- delete m_inputWidgets;
- delete m_switches;
-}
-
-void Expert::handleHelp()
-{
- QWhatsThis::enterWhatsThisMode();
-}
-
-void Expert::addDependency(QDict<QObject> *switches,
- const QCString &dep,const QCString &name)
-{
- if (!dep.isEmpty())
- {
- //printf("Expert::addDependency(%s)\n",name.data());
- IInput *parent = m_inputWidgets->find(dep);
- ASSERT(parent!=0);
- IInput *child = m_inputWidgets->find(name);
- ASSERT(child!=0);
- if (switches->find(dep)==0)
- {
- switches->insert(dep,parent->qobject());
- }
- QList<IInput> *list = m_dependencies->find(dep);
- if (list==0)
- {
- list = new QList<IInput>;
- m_dependencies->insert(dep,list);
- }
- list->append(child);
- }
-}
-
-void Expert::toggle(const char *name,bool state)
-{
- QList<IInput> *inputs = m_dependencies->find(name);
- ASSERT(inputs!=0);
- IInput *input = inputs->first();
- while (input)
- {
- input->setEnabled(state);
- input = inputs->next();
- }
-}
-
-void Expert::init()
-{
- QDictIterator<IInput> di(*m_inputWidgets);
- IInput *input = 0;
- for (di.toFirst();(input=di.current());++di)
- {
- input->init();
- }
- QDictIterator<QObject> dio(*m_switches);
- QObject *obj = 0;
- for (dio.toFirst();(obj=dio.current());++dio)
- {
- connect(obj,SIGNAL(toggle(const char *,bool)),SLOT(toggle(const char *,bool)));
- // UGLY HACK: assumes each item depends on a boolean without checking!
- emit toggle(dio.currentKey(),((InputBool *)obj)->getState());
- }
-
-}
-
-void Expert::changed()
-{
- m_changed=TRUE;
-}
-
diff --git a/addon/doxywizard/expert.h b/addon/doxywizard/expert.h
deleted file mode 100644
index 4fdaea1..0000000
--- a/addon/doxywizard/expert.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 EXPERT_H
-#define EXPERT_H
-
-#include <qtabdialog.h>
-#include <qlist.h>
-#include <qdict.h>
-
-class IInput;
-class QWidget;
-class QObject;
-class InputBool;
-class InputString;
-class InputStrList;
-class InputFile;
-class InputDir;
-class InputInt;
-
-class ConfigWidget
-{
- public:
- enum Kind { Int, String, StrList, Bool };
-
- ConfigWidget(QWidget *w,Kind k) : m_widget(w), m_kind(k) {}
-
- Kind kind() const { return m_kind; }
-
- InputString *getString() const
- { return m_kind==String ? (InputString *)m_widget : 0; }
-
- InputBool *getBool() const
- { return m_kind==Bool ? (InputBool *)m_widget : 0; }
-
- InputStrList *getStrList() const
- { return m_kind==StrList ? (InputStrList *)m_widget : 0; }
-
- InputInt *getInt() const
- { return m_kind==Int ? (InputInt *)m_widget : 0; }
-
- private:
- QWidget *m_widget;
- Kind m_kind;
-};
-
-class Expert : public QTabDialog
-{
- Q_OBJECT
-
- public:
- Expert(QWidget *parent=0);
- ~Expert();
- void init();
- void addDependency(QDict<QObject> *switches,
- const QCString &dep,const QCString &name);
- bool hasChanged() const { return m_changed; }
-
- private slots:
- void toggle(const char *,bool);
- void handleHelp();
- void changed();
-
- private:
- QDict<IInput> *m_inputWidgets;
- QDict< QList<IInput> > *m_dependencies;
- QDict<QObject> *m_switches;
- bool m_changed;
-};
-
-#endif
diff --git a/addon/doxywizard/input.h b/addon/doxywizard/input.h
deleted file mode 100644
index ab9bcf5..0000000
--- a/addon/doxywizard/input.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _INPUT_H
-#define _INPUT_H
-
-class QObject;
-
-class IInput
-{
- public:
- virtual void init() = 0;
- virtual void setEnabled(bool) = 0;
- virtual QObject *qobject() = 0;
-};
-
-#endif
diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp
deleted file mode 100644
index 554c228..0000000
--- a/addon/doxywizard/inputbool.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 "inputbool.h"
-//#if QT_VERSION >= 300
-//#include <qstylefactory.h>
-//#else
-//#include <qwindowsstyle.h>
-//#endif
-#include <qlayout.h>
-
-InputBool::InputBool( const QString & text, QWidget * parent, bool &flag )
- : QWidget(parent), state(flag)
-{
- QBoxLayout *layout = new QHBoxLayout(this);
- cb = new QCheckBox(text,this);
- layout->addWidget(cb);
- layout->addStretch(10);
-
-//#if QT_VERSION >= 300
-// QStyle *winStyle = QStyleFactory::create("windows");
-//#else
-// QWindowsStyle *winStyle = new QWindowsStyle();
-//#endif
- cb->setChecked( flag );
-// if (winStyle) cb->setStyle( winStyle );
- cb->setMinimumSize( sizeHint() );
-
- connect( cb, SIGNAL(toggled(bool)), SLOT(setState(bool)) );
-
- layout->activate();
-}
-
-void InputBool::init()
-{
- cb->setChecked(state);
-}
-
-void InputBool::setState( bool s )
-{
- if (state!=s)
- {
- emit changed();
- emit toggle(cb->text(),s);
- }
- state=s;
-}
-
diff --git a/addon/doxywizard/inputbool.h b/addon/doxywizard/inputbool.h
deleted file mode 100644
index ee76ba9..0000000
--- a/addon/doxywizard/inputbool.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 _INPUTBOOL_H
-#define _INPUTBOOL_H
-
-#include <qwidget.h>
-#include <qcheckbox.h>
-
-#include "input.h"
-
-class PageWidget;
-
-class InputBool : public QWidget, /*QCheckBox,*/ public IInput
-{
- Q_OBJECT
-
- public:
- InputBool( const QString &text, QWidget *parent, bool &flag );
- ~InputBool(){};
- void init();
- void setEnabled(bool b) { cb->setEnabled(b); }
- QObject *qobject() { return this; }
- bool getState() const { return state; }
-
- signals:
- void changed();
- void toggle(const char *,bool);
-
- private slots:
- void setState(bool);
-
- private:
- bool &state;
- QCheckBox *cb;
-
-};
-
-#endif
diff --git a/addon/doxywizard/inputint.cpp b/addon/doxywizard/inputint.cpp
deleted file mode 100644
index 4398f31..0000000
--- a/addon/doxywizard/inputint.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 "inputint.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwindowsstyle.h>
-#include <qspinbox.h>
-
-InputInt::InputInt( const QString & label, QWidget *parent, int &val, int minVal,int maxVal )
- : QWidget( parent), m_val(val), m_minVal(minVal), m_maxVal(maxVal)
-{
- QHBoxLayout *layout = new QHBoxLayout( this, 5 );
-
- lab = new QLabel( label, this );
- lab->setMinimumSize( lab->sizeHint() );
-
- sp = new QSpinBox( minVal,maxVal,1,this );
- sp->setMinimumSize( sp->sizeHint() );
-
- init();
-
- layout->addWidget( lab );
- layout->addWidget( sp );
- layout->addStretch(1);
- layout->activate();
- setMinimumSize( sizeHint() );
-
- connect(sp, SIGNAL(valueChanged(int)),
- this, SLOT(valueChanged(int)) );
-
-}
-
-void InputInt::valueChanged(int val)
-{
- if (val!=m_val) emit changed();
- m_val = val;
-}
-
-void InputInt::setEnabled(bool state)
-{
- lab->setEnabled(state);
- sp->setEnabled(state);
-}
-
-void InputInt::init()
-{
- m_val = QMAX(m_minVal,m_val);
- m_val = QMIN(m_maxVal,m_val);
- sp->setValue(m_val);
-}
diff --git a/addon/doxywizard/inputint.h b/addon/doxywizard/inputint.h
deleted file mode 100644
index 92435b7..0000000
--- a/addon/doxywizard/inputint.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 _INPUTINT_H
-#define _INPUTINT_H
-
-#include <qwidget.h>
-#include <qstring.h>
-
-#include "input.h"
-
-class QLabel;
-class QSpinBox;
-
-class InputInt : public QWidget, public IInput
-{
- Q_OBJECT
-
- public:
- InputInt( const QString &text, QWidget *parent, int &val,
- int minVal, int maxVal );
- ~InputInt(){};
- void setEnabled(bool);
- void init();
- QObject *qobject() { return this; }
-
- private:
- QLabel *lab;
- QSpinBox *sp;
- int &m_val;
- int m_minVal;
- int m_maxVal;
-
- signals:
- void changed();
-
- private slots:
- void valueChanged(int val);
-
-};
-
-#endif
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp
deleted file mode 100644
index f301384..0000000
--- a/addon/doxywizard/inputstring.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 "inputstring.h"
-//#include "pixmaps.h"
-
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qwindowsstyle.h>
-#include <qcstring.h>
-#include <qpushbutton.h>
-#include <qfiledialog.h>
-#include <qcombobox.h>
-#include <qtooltip.h>
-
-
-InputString::InputString( const QString & label,
- QWidget *parent, QCString &s, StringMode m )
- : QWidget( parent ), str(s), sm(m), m_values(0), m_index(0)
-{
- if (m==StringFixed)
- {
- QHBoxLayout *layout = new QHBoxLayout( this, 5);
- lab = new QLabel( label, this );
- lab->setMinimumSize( lab->sizeHint() );
- layout->addWidget( lab );
- com = new QComboBox( this );
- com->setMinimumSize(com->sizeHint());
- layout->addWidget( com );
- layout->addStretch( 1 );
- le=0;
- br=0;
- layout->activate();
- setMinimumSize( sizeHint() );
- }
- else
- {
- QGridLayout *layout = new QGridLayout( this, 1, m==StringFree ? 1 : 3, 5 );
- lab = new QLabel( label, this );
- lab->setMinimumSize( lab->sizeHint() );
- layout->addWidget( lab,0,0 );
- le = new QLineEdit( this );
- le->setMinimumSize( le->sizeHint() );
- le->setText( s );
- layout->addWidget( le,0,1 );
- if (m==StringFile || m==StringDir)
- {
- //QPixmap pixmap = QPixmap(m==StringFile ?
- // file_xpm :
- // folder_xpm );
- br = new QPushButton( this );
- br->setMinimumSize( br->sizeHint() );
- if (m==StringFile)
- {
- br->setText("File...");
- QToolTip::add(br,"Browse to a file");
- }
- else
- {
- br->setText("Folder...");
- QToolTip::add(br,"Browse to a folder");
- }
- layout->addWidget( br,0,2 );
- }
- else
- {
- br=0;
- }
- com=0;
- layout->activate();
- setMinimumSize( sizeHint() );
- }
-
- if (le) connect( le, SIGNAL(textChanged(const QString&)),
- this, SLOT(textChanged(const QString&)) );
- if (br) connect( br, SIGNAL(clicked()), this, SLOT(browse()) );
- if (com) connect( com, SIGNAL(activated(const QString &)),
- this, SLOT(textChanged(const QString &)) );
-}
-
-InputString::~InputString()
-{
- if (m_values) delete m_values;
-}
-
-
-void InputString::textChanged(const QString &s)
-{
- if (str!=(const char *)s)
- {
- str = s;
- emit changed();
- }
-}
-
-void InputString::setEnabled(bool state)
-{
- lab->setEnabled(state);
- if (le) le->setEnabled(state);
- if (br) br->setEnabled(state);
- if (com) com->setEnabled(state);
-}
-
-void InputString::browse()
-{
- if (sm==StringFile)
- {
- QString fileName = QFileDialog::getOpenFileName();
-
- if (!fileName.isNull())
- {
- le->setText( fileName );
- if (str!=(const char *)le->text())
- {
- str = le->text();
- emit changed();
- }
- }
- }
- else // sm==StringDir
- {
- QString dirName = QFileDialog::getExistingDirectory();
-
- if (!dirName.isNull())
- {
- le->setText( dirName );
- if (str!=(const char *)le->text())
- {
- str = le->text();
- emit changed();
- }
- }
- }
-}
-
-void InputString::clear()
-{
- le->setText("");
- if (!str.isEmpty())
- {
- emit changed();
- str = "";
- }
-}
-
-void InputString::addValue(const char *s)
-{
- if (sm==StringFixed)
- {
- if (m_values==0) m_values = new QDict<int>;
- m_values->setAutoDelete(TRUE);
- m_values->insert(s,new int(m_index++));
- com->insertItem(s);
- }
-}
-
-void InputString::init()
-{
- if (sm==StringFixed)
- {
- int *itemIndex = m_values->find(str);
- if (itemIndex)
- {
- com->setCurrentItem(*itemIndex);
- }
- else
- {
- com->setCurrentItem(0);
- }
- }
- else
- {
- le->setText(str);
- }
-}
diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h
deleted file mode 100644
index ddcdfea..0000000
--- a/addon/doxywizard/inputstring.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 _INPUTSTRING_H
-#define _INPUTSTRING_H
-
-#include <qwidget.h>
-#include <qstring.h>
-#include <qdict.h>
-
-#include "qtbc.h"
-#include "input.h"
-
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QComboBox;
-
-class InputString : public QWidget, public IInput
-{
- Q_OBJECT
-
- public:
- enum StringMode { StringFree=0,
- StringFile=1,
- StringDir=2,
- StringFixed=3
- };
-
- InputString( const QString &text, QWidget *parent, QCString &s,
- StringMode m=StringFree );
- ~InputString();
- void setEnabled(bool);
- void addValue(const char *s);
- void init();
- QObject *qobject() { return this; }
-
- private:
- QLabel *lab;
- QLineEdit *le;
- QPushButton *br;
- QComboBox *com;
- QCString &str;
- StringMode sm;
- QDict<int> *m_values;
- int m_index;
-
- signals:
- void changed();
-
- private slots:
- void textChanged(const QString&);
- void browse();
- void clear();
-
-};
-
-#endif
diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp
deleted file mode 100644
index fc8cf50..0000000
--- a/addon/doxywizard/inputstrlist.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 "inputstrlist.h"
-//#include "pixmaps.h"
-
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qfiledialog.h>
-#include <qtooltip.h>
-
-InputStrList::InputStrList( const QString & label,
- QWidget *parent, QStrList &sl, ListMode lm)
- : QWidget(parent), strList(sl)
-{
- QGridLayout *layout = new QGridLayout( this, 2, 2, 5 );
- lab = new QLabel( label, this );
- lab->setMinimumSize( lab->sizeHint() );
- layout->addWidget( lab,0,0 );
-
- QWidget *dw = new QWidget(this); /* dummy widget used for layouting */
- QHBoxLayout *boxlayout = new QHBoxLayout( dw, 0, 5 );
- le = new QLineEdit( dw );
- le->setMinimumSize( le->sizeHint() );
- boxlayout->addWidget( le, 1 );
-
- add = new QPushButton( dw );
- //add->setPixmap( QPixmap( add_xpm ));
- add->setText( "+" );
- add->setMinimumSize( add->sizeHint() );
- QToolTip::add(add,"Add item");
- boxlayout->addWidget( add );
-
- del = new QPushButton( dw );
- //del->setPixmap( QPixmap( del_xpm ));
- del->setText( "-" );
- del->setMinimumSize( del->sizeHint() );
- QToolTip::add(del,"Delete selected item");
- boxlayout->addWidget( del );
-
- upd = new QPushButton( dw );
- //upd->setPixmap( QPixmap( update_xpm ));
- upd->setText( "*" );
- upd->setMinimumSize( upd->sizeHint() );
- QToolTip::add(upd,"Update selected item");
- boxlayout->addWidget( upd );
-
- lb = new QListBox( this );
- lb->setMinimumSize(400,100);
- init();
- lb->setVScrollBarMode(QScrollView::Auto);
- lb->setHScrollBarMode(QScrollView::Auto);
-
- brFile=0;
- brDir=0;
- if (lm!=ListString)
- {
- if (lm&ListFile)
- {
- brFile = new QPushButton(dw);
- //brFile->setPixmap( QPixmap(file_xpm) );
- brFile->setText("Select...");
- brFile->setMinimumSize(brFile->sizeHint());
- QToolTip::add(brFile,"Browse to a file");
- boxlayout->addWidget( brFile );
- }
- if (lm&ListDir)
- {
- brDir = new QPushButton(dw);
- //brDir->setPixmap( QPixmap(folder_xpm) );
- brDir->setText("Select...");
- brDir->setMinimumSize(brDir->sizeHint());
- QToolTip::add(brDir,"Browse to a folder");
- boxlayout->addWidget( brDir );
- }
- }
- layout->addWidget( dw, 0,1 );
- layout->addWidget( lb,1,1 );
- layout->activate();
- setMinimumSize( sizeHint() );
-
- connect(le, SIGNAL(returnPressed()),
- this, SLOT(addString()) );
- connect(add, SIGNAL(clicked()),
- this, SLOT(addString()) );
- connect(del, SIGNAL(clicked()),
- this, SLOT(delString()) );
- connect(upd, SIGNAL(clicked()),
- this, SLOT(updateString()) );
- if (brFile)
- {
- connect(brFile, SIGNAL(clicked()),
- this, SLOT(browseFiles()));
- }
- if (brDir)
- {
- connect(brDir, SIGNAL(clicked()),
- this, SLOT(browseDir()));
- }
- connect(lb, SIGNAL(selected(const QString &)),
- this, SLOT(selectText(const QString &)));
-}
-
-void InputStrList::addString()
-{
- if (!le->text().isEmpty())
- {
- lb->insertItem(le->text());
- strList.append(le->text());
- emit changed();
- le->clear();
- }
-}
-
-void InputStrList::delString()
-{
- if (lb->currentItem()!=-1)
- {
- int itemIndex = lb->currentItem();
- lb->removeItem(itemIndex);
- strList.remove(itemIndex);
- emit changed();
- }
-}
-
-void InputStrList::updateString()
-{
- if (lb->currentItem()!=-1 && !le->text().isEmpty())
- {
- lb->changeItem(le->text(),lb->currentItem());
- strList.insert(lb->currentItem(),le->text());
- strList.remove(lb->currentItem()+1);
- emit changed();
- }
-}
-
-void InputStrList::selectText(const QString &s)
-{
- le->setText(s);
-}
-
-void InputStrList::setEnabled(bool state)
-{
- lab->setEnabled(state);
- le->setEnabled(state);
- add->setEnabled(state);
- del->setEnabled(state);
- upd->setEnabled(state);
- lb->setEnabled(state);
- if (brFile) brFile->setEnabled(state);
- if (brDir) brDir->setEnabled(state);
-}
-
-void InputStrList::browseFiles()
-{
- QStringList fileNames = QFileDialog::getOpenFileNames();
-
- if (!fileNames.isEmpty())
- {
- QStringList::Iterator it;
- for ( it= fileNames.begin(); it != fileNames.end(); ++it )
- {
- lb->insertItem(*it);
- strList.append(*it);
- emit changed();
- }
- le->setText(*fileNames.begin());
- }
-}
-
-void InputStrList::browseDir()
-{
- QString dirName = QFileDialog::getExistingDirectory();
-
- if (!dirName.isNull())
- {
- lb->insertItem(dirName);
- strList.append(dirName);
- emit changed();
- le->setText(dirName);
- }
-}
-
-void InputStrList::init()
-{
- le->clear();
- lb->clear();
- char *s = strList.first();
- while (s)
- {
- lb->insertItem(s);
- s = strList.next();
- }
-}
diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h
deleted file mode 100644
index 0156c20..0000000
--- a/addon/doxywizard/inputstrlist.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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 _INPUTSTRLIST_H
-#define _INPUTSTRLIST_H
-
-#include <qwidget.h>
-#include <qstring.h>
-
-#include "input.h"
-
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QListBox;
-class QStrList;
-
-class InputStrList : public QWidget, public IInput
-{
- Q_OBJECT
-
- public:
- enum ListMode { ListString=0,
- ListFile=1,
- ListDir=2,
- ListFileDir=ListFile|ListDir
- };
-
- InputStrList( const QString &text, QWidget *parent,
- QStrList &sl, ListMode v=ListString );
- ~InputStrList() {};
- void setEnabled(bool);
- void init();
- QObject *qobject() { return this; }
-
- private:
- QLabel *lab;
- QLineEdit *le;
- QPushButton *add;
- QPushButton *del;
- QPushButton *upd;
- QPushButton *brFile;
- QPushButton *brDir;
- QListBox *lb;
- QStrList &strList;
-
- signals:
- void changed();
-
- private slots:
- void addString();
- void delString();
- void updateString();
- void selectText(const QString &s);
- void browseFiles();
- void browseDir();
-
-};
-
-#endif
diff --git a/addon/doxywizard/qtbc.h b/addon/doxywizard/qtbc.h
deleted file mode 100644
index 452974c..0000000
--- a/addon/doxywizard/qtbc.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- */
-
-#ifndef QTBC_H
-#define QTBC_H
-
-/*! This file contains some hacks to make Doxygen work with
- * Qt version 2.00 and Qt version 1.xx
- */
-
-#include <qglobal.h>
-
-#if QT_VERSION >= 200
-
-#include <locale.h>
-
-#define GCI QCollection::Item
-
-#include <qcstring.h>
-#include <qstring.h>
-inline QCString convertToQCString(const QString &s) { return s.latin1(); }
-
-#else /* QT_VERSION < 200 */
-
-#include <qstring.h>
-#define QCString QString
-inline QCString convertToQCString(const QCString &s) { return s; }
-
-#endif
-
-#endif
diff --git a/addon/doxywizard/version.cpp b/addon/doxywizard/version.cpp
deleted file mode 100644
index 5a00b3e..0000000
--- a/addon/doxywizard/version.cpp
+++ /dev/null
@@ -1 +0,0 @@
-char versionString[]="0.1";
diff --git a/addon/doxywizard/version.h b/addon/doxywizard/version.h
deleted file mode 100644
index 0cbe12a..0000000
--- a/addon/doxywizard/version.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2005 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.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- */
-
-#ifndef VERSION_H
-#define VERSION_H
-
-extern char versionString[];
-
-#endif