Commit ecb8f53e authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.9

parent 7703ff62
DOXYGEN Version 1.2.8-20010723
DOXYGEN Version 1.2.9
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (23 July 2001)
Dimitri van Heesch (01 August 2001)
......@@ -11,20 +11,18 @@ Just follow these steps:
I'll use xx in the rest of this document.
3) Edit language.cpp:
- Add a #include<translator_xx.h>
- in setTranslator() add
- In setTranslator() add
else if (L_EQUAL("your_language_name"))
{
theTranslator = new TranslatorYourlanguage;
theTranslator = new TranslatorYourLanguage;
}
after the if { ... }
4) Edit libdoxygen.pro.in and add translator_xx.h to the HEADERS line.
5) Edit translator_xx.h:
- Rename TRANSLATOR_EN_H to TRANSLATOR_XX_H twice.
- Rename TranslatorEnglish to TranslatorYourlanguage
- In the member latexBabelPackage() change "english" into the name of the
latex package that adds support for your language.
- Rename TranslatorEnglish to TranslatorYourLanguage
- In the member idLanguage() change "english" into the name of your
language (use lower case characters only). Depending on the language you
may also wish to change the member functions latexLanguageSupportCommand()
......@@ -44,6 +42,8 @@ Just follow these steps:
7) Now you can use OUTPUT_LANGUAGE = your_language_name
in the config file to generate output in your language.
8) Send translator_xx.h to me so I can add it to doxygen.
Send also your name and e-mail address to be included in the
maintainers.txt list.
Good luck, and let me know if there are problems.
DOCDIR = $(INSTALL)/share/doc/packages/doxygen
#all: src/version.cpp doxywizard
# cd qtools ; $(MAKE)
# cd src ; $(MAKE)
......@@ -10,16 +8,14 @@ clean: FORCE
cd qtools ; $(MAKE) clean
cd src ; $(MAKE) clean
cd addon/doxywizard ; $(MAKE) clean
cd addon/xmlread ; $(MAKE) clean
cd addon/xmlgen ; $(MAKE) clean
cd addon/xmlparse ; $(MAKE) clean
-rm -f bin/doxy*
-rm -f objects/*.o
distclean: clean
cd src ; $(MAKE) distclean
cd addon/doxywizard ; $(MAKE) distclean
cd addon/xmlread ; $(MAKE) distclean
cd addon/xmlgen ; $(MAKE) distclean
cd addon/xmlparse ; $(MAKE) distclean
-rm -f lib/lib*
-rm -f bin/doxy*
-rm -f html
......@@ -37,15 +33,9 @@ distclean: clean
-rm -f addon/doxywizard/obj/*.o
-rm -f addon/doxywizard/moc/moc_*
-rm -f addon/doxywizard/config.cpp
-rm -f addon/xmlread/xmlread.pro
-rm -f addon/xmlread/Makefile addon/xmlread/Makefile.xmlread
-rm -f addon/xmlread/*.o
-rm -f addon/xmlgen/xmlgen.pro
-rm -f addon/xmlgen/Makefile addon/xmlgen/Makefile.xmlgen
-rm -f addon/xmlgen/*.o
install: doxywizard_install xmlgen_install
install: doxywizard_install
$(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxytag $(INSTALL)/bin
......
DOXYGEN Version 1.2.8_20010723
DOXYGEN Version 1.2.9
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (23 July 2001)
Dimitri van Heesch (dimitri@stack.nl) (01 August 2001)
1.2.8-20010723
1.2.9
all clean depend: Makefile.xmlgen
$(MAKE) -f Makefile.xmlgen $@
distclean: clean
$(RM) -f Makefile.xmlgen
tmake:
$(ENV) $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen
Makefile.xmlgen: xmlgen.pro
$(ENV) $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen
install:
$(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -m 755 ../../bin/doxygen_xml $(INSTALL)/bin
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- DTD describing the grammar used in doxygen's XML output -->
<!-- standard character entities -->
<!ENTITY lt "&#38;#60;">
<!ENTITY gt "&#62;">
<!ENTITY amp "&#38;#38;">
<!ENTITY apos "&#39;">
<!ENTITY quot "&#34;">
<!-- required attributes for compounds -->
<!ENTITY % compound-req.att
'id ID #REQUIRED
type (group|file|namespace|
class|struct|union|
interface|dispinterface|
valuetype|library) #REQUIRED'
>
<!-- required attributes for references -->
<!ENTITY % ref-req.att 'idref IDREF #REQUIRED'
>
<!-- required attributes for inheritance relations -->
<!ENTITY % inheritcompref-req.att
'%ref-req.att;
prot (public|protected|private) #REQUIRED
virt (non-virtual|virtual) #REQUIRED'
>
<!-- required attributes for member sections -->
<!ENTITY % sec-req.att 'type (user
|public-type
|public-func
|public-attrib
|public-slot
|public-static-func
|public-static-attrib
|protected-type
|protected-func
|protected-attrib
|protected-slot
|protected-static-func
|protected-static-attrib
|private-type
|private-func
|private-attrib
|private-slot
|private-static-func
|private-static-attrib
|signal
|friend
|related
|define|prototype|typedef|enum|func|var
|dcop-func
|property
) #REQUIRED
'
>
<!-- required attributes for members -->
<!ENTITY % mem-req.att 'id ID #REQUIRED'>
<!-- optional attributes for function -->
<!ENTITY % func-opt.att 'virt (virtual|pure-virtual) #IMPLIED'>
<!-- elements -->
<!ELEMENT doxygen (compoundlist?)>
<!ELEMENT compoundlist (compounddef)+>
<!ELEMENT compounddef (compoundname,
basecompoundlist?,
derivedcompoundlist?,
sectionlist?
)
>
<!ATTLIST compounddef %compound-req.att;>
<!ELEMENT basecompoundlist (basecompoundref)+>
<!ELEMENT derivedcompoundlist (derivedcompoundref)+>
<!ELEMENT compoundref (#PCDATA)>
<!ATTLIST compoundref %ref-req.att;>
<!ELEMENT memberref (#PCDATA)>
<!ATTLIST memberref %ref-req.att;>
<!ELEMENT basecompoundref EMPTY>
<!ATTLIST basecompoundref %inheritcompref-req.att;>
<!ELEMENT derivedcompoundref EMPTY>
<!ATTLIST derivedcompoundref %inheritcompref-req.att;>
<!ELEMENT sectionlist (sectiondef)+>
<!ELEMENT sectiondef (memberlist)>
<!ATTLIST sectiondef %sec-req.att;>
<!ELEMENT memberlist (functiondef|variabledef|typedef|definedef|enumdef)+>
<!ELEMENT functiondef (type?,name,paramlist)>
<!ATTLIST functiondef %mem-req.att; %func-opt.att;>
<!ELEMENT variabledef (type,name,array?,initializer?)>
<!ATTLIST variabledef %mem-req.att;>
<!ELEMENT typedef (type,name)>
<!ATTLIST typedef %mem-req.att;>
<!ELEMENT definedef (name,defparamlist?,initializer?)>
<!ATTLIST definedef %mem-req.att;>
<!ELEMENT enumdef (name,enumvaluelist)>
<!ATTLIST enumdef %mem-req.att;>
<!ELEMENT slotdef (type,name,paramlist)>
<!ATTLIST slotdef %mem-req.att;>
<!ELEMENT signaldef (type,name,paramlist)>
<!ATTLIST signaldef %mem-req.att;>
<!ELEMENT paramlist (param)*>
<!ELEMENT param (attributes?,type,declname?,defname?,array?,defval?)>
<!ELEMENT defparamlist (defarg)*>
<!ELEMENT defarg (#PCDATA)>
<!ELEMENT enumvaluelist (enumvalue)*>
<!ELEMENT enumvalue (name,initializer?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT compoundname (#PCDATA)>
<!ELEMENT declname (#PCDATA)>
<!ELEMENT defname (#PCDATA)>
<!ELEMENT type (#PCDATA|memberref|compoundref|compounddef)*>
<!ELEMENT defval (#PCDATA|memberref|compoundref)*>
<!ELEMENT initializer (#PCDATA|memberref|compoundref)*>
<!ELEMENT array (#PCDATA)>
<!ELEMENT attributes (#PCDATA)>
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 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.
*
*/
#include "doxygen.h"
#include "message.h"
#include "xml.h"
/*! \file
* \brief main entry point for doxygen's XML generator
*
* This file contains main()
*/
/*! Main that generate XML output
*
*/
int main(int argc,char **argv)
{
initDoxygen();
readConfiguration(argc,argv);
parseInput();
msg("Generating XML output\n");
generateXML();
return 0;
}
This diff is collapsed.
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-2001 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 XML_H
#define XML_H
class QTextStream;
void generateXML();
void writeXMLString(QTextStream &t,const char *s);
void writeXMLString(QTextStream &t,const char *s);
void writeXMLLink(QTextStream &t,const char *compoundRef,const char *memAnchor,
const char *text);
#endif
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
"<!-- DTD describing the grammar used in doxygen's XML output -->\n"
"\n"
"<!-- standard character entities -->\n"
"<!ENTITY lt \"&#38;#60;\"> \n"
"<!ENTITY gt \"&#62;\"> \n"
"<!ENTITY amp \"&#38;#38;\"> \n"
"<!ENTITY apos \"&#39;\"> \n"
"<!ENTITY quot \"&#34;\"> \n"
"\n"
"<!-- required attributes for compounds -->\n"
"<!ENTITY % compound-req.att \n"
" 'id ID #REQUIRED\n"
" type (group|file|namespace|\n"
" class|struct|union|\n"
" interface|dispinterface|\n"
" valuetype|library) #REQUIRED'\n"
">\n"
"<!-- required attributes for references -->\n"
"<!ENTITY % ref-req.att 'idref IDREF #REQUIRED'\n"
">\n"
"<!-- required attributes for inheritance relations -->\n"
"<!ENTITY % inheritcompref-req.att\n"
" '%ref-req.att;\n"
" prot (public|protected|private) #REQUIRED\n"
" virt (non-virtual|virtual) #REQUIRED'\n"
">\n"
"\n"
"<!-- required attributes for member sections -->\n"
"<!ENTITY % sec-req.att 'type (user\n"
" |public-type\n"
" |public-func\n"
" |public-attrib\n"
" |public-slot\n"
" |public-static-func\n"
" |public-static-attrib\n"
" |protected-type\n"
" |protected-func\n"
" |protected-attrib\n"
" |protected-slot\n"
" |protected-static-func\n"
" |protected-static-attrib\n"
" |private-type\n"
" |private-func\n"
" |private-attrib\n"
" |private-slot\n"
" |private-static-func\n"
" |private-static-attrib\n"
" |signal\n"
" |friend\n"
" |related\n"
" |define|prototype|typedef|enum|func|var\n"
" |dcop-func\n"
" |property\n"
" ) #REQUIRED\n"
" '\n"
">\n"
"<!-- required attributes for members -->\n"
"<!ENTITY % mem-req.att 'id ID #REQUIRED'>\n"
"\n"
"<!-- optional attributes for function -->\n"
"<!ENTITY % func-opt.att 'virt (virtual|pure-virtual) #IMPLIED'>\n"
"\n"
"<!-- elements -->\n"
"<!ELEMENT doxygen (compoundlist?)>\n"
"<!ELEMENT compoundlist (compounddef)+>\n"
"<!ELEMENT compounddef (compoundname,\n"
" basecompoundlist?, \n"
" derivedcompoundlist?, \n"
" sectionlist? \n"
" )\n"
">\n"
"<!ATTLIST compounddef %compound-req.att;>\n"
"<!ELEMENT basecompoundlist (basecompoundref)+>\n"
"<!ELEMENT derivedcompoundlist (derivedcompoundref)+>\n"
"<!ELEMENT compoundref (#PCDATA)>\n"
"<!ATTLIST compoundref %ref-req.att;>\n"
"<!ELEMENT memberref (#PCDATA)>\n"
"<!ATTLIST memberref %ref-req.att;>\n"
"<!ELEMENT basecompoundref EMPTY>\n"
"<!ATTLIST basecompoundref %inheritcompref-req.att;>\n"
"<!ELEMENT derivedcompoundref EMPTY>\n"
"<!ATTLIST derivedcompoundref %inheritcompref-req.att;>\n"
"<!ELEMENT sectionlist (sectiondef)+>\n"
"<!ELEMENT sectiondef (memberlist)>\n"
"<!ATTLIST sectiondef %sec-req.att;>\n"
"<!ELEMENT memberlist (functiondef|variabledef|typedef|definedef|enumdef)+>\n"
"<!ELEMENT functiondef (type?,name,paramlist)>\n"
"<!ATTLIST functiondef %mem-req.att; %func-opt.att;>\n"
"<!ELEMENT variabledef (type,name,array?,initializer?)>\n"
"<!ATTLIST variabledef %mem-req.att;>\n"
"<!ELEMENT typedef (type,name)>\n"
"<!ATTLIST typedef %mem-req.att;>\n"
"<!ELEMENT definedef (name,defparamlist?,initializer?)>\n"
"<!ATTLIST definedef %mem-req.att;>\n"
"<!ELEMENT enumdef (name,enumvaluelist)>\n"
"<!ATTLIST enumdef %mem-req.att;>\n"
"<!ELEMENT slotdef (type,name,paramlist)>\n"
"<!ATTLIST slotdef %mem-req.att;>\n"
"<!ELEMENT signaldef (type,name,paramlist)>\n"
"<!ATTLIST signaldef %mem-req.att;>\n"
"<!ELEMENT paramlist (param)*>\n"
"<!ELEMENT param (attributes?,type,declname?,defname?,array?,defval?)>\n"
"<!ELEMENT defparamlist (defarg)*>\n"
"<!ELEMENT defarg (#PCDATA)>\n"
"<!ELEMENT enumvaluelist (enumvalue)*>\n"
"<!ELEMENT enumvalue (name,initializer?)>\n"
"<!ELEMENT name (#PCDATA)>\n"
"<!ELEMENT compoundname (#PCDATA)>\n"
"<!ELEMENT declname (#PCDATA)>\n"
"<!ELEMENT defname (#PCDATA)>\n"
"<!ELEMENT type (#PCDATA|memberref|compoundref|compounddef)*>\n"
"<!ELEMENT defval (#PCDATA|memberref|compoundref)*>\n"
"<!ELEMENT initializer (#PCDATA|memberref|compoundref)*>\n"
"<!ELEMENT array (#PCDATA)>\n"
"<!ELEMENT attributes (#PCDATA)>\n"
"\n"
TEMPLATE = xmlgen.t
CONFIG = console warn_on $extraopt
HEADERS = xml.h xml_dtd.h
SOURCES = main.cpp xml.cpp
DEPENDPATH = ../../src
unix:LIBS += -L../../lib -ldoxygen -ldoxycfg -lqtools
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../../lib -ldoxygen -ldoxycfg -lqtools
win32-msvc:LIBS += qtools.lib doxygen.lib doxycfg.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\lib
win32-borland:LIBS += qtools.lib doxygen.lib doxycfg.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\..\lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../../qtools ../../src
DESTDIR = ../../bin
TARGET = doxygen_xml
unix:TARGETDEPS = ../../lib/libdoxygen.a ../../lib/libdoxycfg.a
win32:TARGETDEPS = ..\..\lib\doxygen.lib ../../lib/doxycfg.lib
OBJECTS_DIR = obj
#
# $Id$
#
# Copyright (C) 1997-2001 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.
#!
#! doxygen.t: This is a custom template for building Doxygen
#!
#$ IncludeTemplate("app.t");
xml_dtd.h: doxygen.dtd
cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h
# Doxyfile 1.2.0
# Doxyfile 1.2.8-20010715
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = xmlread
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doc
OUTPUT_LANGUAGE = English
DISABLE_INDEX = NO
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = YES
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
TAB_SIZE = 8
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
PROJECT_NAME = dox2html
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doc
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = YES
INLINE_SOURCES = 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
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
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 = "$file:$line: $text"
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = .
FILE_PATTERNS = *.h *.cpp
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
INPUT = .
FILE_PATTERNS = *.h *.cpp
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
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 = latex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
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 = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
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
MAN_EXTENSION = .3
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = YES
GENERATE_XML = YES
#---------------------------------------------------------------------------
# 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 =
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
PERL_PATH = /usr/bin/perl
TAGFILES = ../../qtools_docs/qtools.tag=../../../../qtools_docs/html
GENERATE_TAGFILE =
ALLEXTERNALS = NO
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
MAX_DOT_GRAPH_WIDTH = 3024
MAX_DOT_GRAPH_HEIGHT = 3024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =
SEARCHENGINE = NO
CGI_NAME =
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH =
EXT_DOC_PATHS =
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:
$(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -m 755 ../../bin/xmlparse $(INSTALL)/bin
#ifndef _BASEHANDLER_H
#define _BASEHANDLER_H
#include <qxml.h>
#include <qdict.h>
#include <qstring.h>
class IBaseHandler
{
public:
virtual void setDelegate(QXmlDefaultHandler *delegate) = 0;
virtual QXmlDefaultHandler *delegate() const = 0;
};
class IFallBackHandler
{
public:
virtual bool handleStartElement(const QString & name,
const QXmlAttributes & attrib) = 0;
virtual bool handleEndElement(const QString &name) = 0;
};
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;
};
typedef StartElementHandler<T> StartElementHandlerT;
typedef EndElementHandler<T> EndElementHandlerT;
public:
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;
};
template<class T> class BaseHandler : public IBaseHandler,
public QXmlDefaultHandler,
public ElementMapper<T>
{
public:
BaseHandler() : m_delegateHandler(0), m_fallBackHandler(0)
{
}
virtual ~BaseHandler()
{
delete m_fallBackHandler;
}
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++;
printf("skipping start tag %s count=%d\n",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)
)
{
printf("found unexpected tag `%s', skipping until matching end tag\n",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--;
printf("skipping end tag %s count=%d\n",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;
}
virtual bool characters ( const QString & ch )
{
if (m_delegateHandler)
{
return m_delegateHandler->characters(ch);
}
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;
}
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:
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
#include "mainhandler.h"
#include "compoundhandler.h"
#include "dochandler.h"
CompoundHandler::CompoundHandler(IBaseHandler *parent)
: m_parent(parent), m_brief(0), m_detailed(0)
{
m_superClasses.setAutoDelete(TRUE);
addEndHandler("compounddef",this,&CompoundHandler::endCompound);
addStartHandler("compoundname");
addEndHandler("compoundname",this,&CompoundHandler::endCompoundName);
addStartHandler("derivedcompoundref",this,&CompoundHandler::addSubClass);
addEndHandler("derivedcompoundref");
addStartHandler("basecompoundref",this,&CompoundHandler::addSuperClass);
addEndHandler("basecompoundref");
addStartHandler("briefdescription",this,&CompoundHandler::startBriefDesc);
addStartHandler("detaileddescription",this,&CompoundHandler::startDetailedDesc);
addStartHandler("sectiondef",this,&CompoundHandler::startSection);
}
CompoundHandler::~CompoundHandler()
{
}
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::startCompound(const QXmlAttributes& attrib)
{
m_parent->setDelegate(this);
m_id = attrib.value("id");
m_kind = attrib.value("kind");
printf("startCompound(id=`%s' type=`%s')\n",m_id.data(),m_kind.data());
}
void CompoundHandler::endCompound()
{
printf("endCompound()\n");
m_parent->setDelegate(0);
}
void CompoundHandler::endCompoundName()
{
m_name = m_curString.stripWhiteSpace();
printf("Compound name `%s'\n",m_name.data());
}
void CompoundHandler::addSuperClass(const QXmlAttributes& attrib)
{
SuperClass *sc=new SuperClass(
attrib.value("idref"),
attrib.value("prot"),
attrib.value("virt")
);
printf("super class id=`%s' prot=`%s' virt=`%s'\n",
sc->m_id.data(),
sc->m_protection.data(),
sc->m_virtualness.data());
m_superClasses.append(sc);
}
void CompoundHandler::addSubClass(const QXmlAttributes& attrib)
{
SubClass *sc = new SubClass(
attrib.value("idref"),
attrib.value("prot"),
attrib.value("virt")
);
printf("sub class id=`%s' prot=`%s' virt=`%s'\n",
sc->m_id.data(),
sc->m_protection.data(),
sc->m_virtualness.data());
m_subClasses.append(sc);
}
#ifndef _COMPOUNDHANDLER_H
#define _COMPOUNDHANDLER_H
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include "basehandler.h"
#include "sectionhandler.h"
class DocHandler;
class CompoundHandler : public BaseHandler<CompoundHandler>
{
public:
virtual void startSection(const QXmlAttributes& attrib);
virtual void startCompound(const QXmlAttributes& attrib);
virtual void addSuperClass(const QXmlAttributes& attrib);
virtual void addSubClass(const QXmlAttributes& attrib);
virtual void endCompound();
virtual void endCompoundName();
virtual void startBriefDesc(const QXmlAttributes& attrib);
virtual void startDetailedDesc(const QXmlAttributes& attrib);
CompoundHandler(IBaseHandler *parent);
virtual ~CompoundHandler();
private:
struct SuperClass
{
SuperClass(const QString &id,const QString &prot,const QString &virt) :
m_id(id),m_protection(prot),m_virtualness(virt) {}
QString m_id;
QString m_protection;
QString m_virtualness;
};
struct SubClass
{
SubClass(const QString &id,const QString &prot,const QString &virt) :
m_id(id),m_protection(prot),m_virtualness(virt) {}
QString m_id;
QString m_protection;
QString m_virtualness;
};
QList<SuperClass> m_superClasses;
QList<SubClass> m_subClasses;
QList<SectionHandler> m_sections;
IBaseHandler *m_parent;
DocHandler *m_brief;
DocHandler *m_detailed;
QString m_id;
QString m_kind;
QString m_name;
};
#endif
#include "dochandler.h"
//----------------------------------------------------------------------
// MarkupHandler
//----------------------------------------------------------------------
MarkupHandler::MarkupHandler(QList<DocNode> &children,QString &curString)
: m_children(children), m_curString(curString), m_curMarkup(DocNode::Normal)
{
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);
}
MarkupHandler::~MarkupHandler()
{
}
void MarkupHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
m_children.append(new TextNode(m_curString,m_curMarkup));
printf("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(DocNode::Bold,TRUE));
m_curMarkup |= DocNode::Bold;
}
void MarkupHandler::endBold()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Bold,FALSE));
m_curMarkup &= ~DocNode::Bold;
}
void MarkupHandler::startEmphasis(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Emphasis,TRUE));
m_curMarkup |= DocNode::Emphasis;
}
void MarkupHandler::endEmphasis()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Emphasis,FALSE));
m_curMarkup &= ~DocNode::Emphasis;
}
void MarkupHandler::startComputerOutput(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::ComputerOutput,TRUE));
m_curMarkup |= DocNode::ComputerOutput;
}
void MarkupHandler::endComputerOutput()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::ComputerOutput,FALSE));
m_curMarkup &= ~DocNode::ComputerOutput;
}
void MarkupHandler::startCenter(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Center,TRUE));
m_curMarkup |= DocNode::Center;
}
void MarkupHandler::endCenter()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Center,FALSE));
m_curMarkup &= ~DocNode::Center;
}
void MarkupHandler::startSmallFont(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::SmallFont,TRUE));
m_curMarkup |= DocNode::SmallFont;
}
void MarkupHandler::endSmallFont()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::SmallFont,FALSE));
m_curMarkup &= ~DocNode::SmallFont;
}
void MarkupHandler::startSubscript(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Subscript,TRUE));
m_curMarkup |= DocNode::Subscript;
}
void MarkupHandler::endSubscript()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Subscript,FALSE));
m_curMarkup &= ~DocNode::Subscript;
}
void MarkupHandler::startSuperscript(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Superscript,TRUE));
m_curMarkup |= DocNode::Superscript;
}
void MarkupHandler::endSuperscript()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Superscript,FALSE));
m_curMarkup &= ~DocNode::Superscript;
}
//----------------------------------------------------------------------
// ListItemHandler
//----------------------------------------------------------------------
ListItemHandler::ListItemHandler(IBaseHandler *parent)
: DocNode(ListItem), m_parent(parent)
{
addEndHandler("listitem",this,&ListItemHandler::endListItem);
addStartHandler("para",this,&ListItemHandler::startParagraph);
}
ListItemHandler::~ListItemHandler()
{
}
void ListItemHandler::startListItem(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
printf("start list item handler\n");
}
void ListItemHandler::endListItem()
{
printf("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);
}
//----------------------------------------------------------------------
// ListHandler
//----------------------------------------------------------------------
ListHandler::ListHandler(NodeKind k,IBaseHandler *parent)
: DocNode(k), m_parent(parent)
{
m_children.setAutoDelete(TRUE);
const char *endListName=0;
switch(k)
{
case ItemizedList : endListName="itemizedlist"; break;
case OrderedList : endListName="orderedlist"; break;
default: ASSERT(0);
}
addEndHandler(endListName,this,&ListHandler::endList);
addStartHandler("listitem",this,&ListHandler::startListItem);
}
ListHandler::~ListHandler()
{
}
void ListHandler::startList(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
}
void ListHandler::endList()
{
m_parent->setDelegate(0);
}
void ListHandler::startListItem(const QXmlAttributes& attrib)
{
ListItemHandler *liHandler = new ListItemHandler(this);
liHandler->startListItem(attrib);
m_children.append(liHandler);
}
//----------------------------------------------------------------------
// ParagraphHandler
//----------------------------------------------------------------------
ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
: DocNode(Para), m_parent(parent)
{
m_children.setAutoDelete(TRUE);
m_markupHandler = new MarkupHandler(m_children,m_curString);
setFallBackHandler(m_markupHandler);
addEndHandler("para",this,&ParagraphHandler::endParagraph);
addStartHandler("itemizedlist",this,&ParagraphHandler::startItemizedList);
addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList);
}
ParagraphHandler::~ParagraphHandler()
{
}
void ParagraphHandler::startParagraph(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
printf("para\n");
}
void ParagraphHandler::endParagraph()
{
addTextNode();
printf("end para\n");
m_parent->setDelegate(0);
}
void ParagraphHandler::startItemizedList(const QXmlAttributes& attrib)
{
addTextNode();
ListHandler *listHandler = new ListHandler(ItemizedList,this);
listHandler->startList(attrib);
m_children.append(listHandler);
}
void ParagraphHandler::startOrderedList(const QXmlAttributes& attrib)
{
addTextNode();
ListHandler *listHandler = new ListHandler(OrderedList,this);
listHandler->startList(attrib);
m_children.append(listHandler);
}
void ParagraphHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
printf("addTextNode() text=%s markup=%x\n",
m_curString.data(),m_markupHandler->markup());
m_curString="";
}
}
//----------------------------------------------------------------------
// DocHandler
//----------------------------------------------------------------------
DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent)
{
addEndHandler("briefdescription",this,&DocHandler::endDoc);
addEndHandler("detaileddescription",this,&DocHandler::endDoc);
addStartHandler("para",this,&DocHandler::startParagraph);
}
DocHandler::~DocHandler()
{
}
void DocHandler::startDoc(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
printf("start dochandler\n");
}
void DocHandler::endDoc()
{
printf("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);
}
#ifndef _DOCHANDLER_H
#define _DOCHANDLER_H
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include "basehandler.h"
class DocNode
{
public:
enum Markup
{
Normal = 0x00,
Bold = 0x01,
Emphasis = 0x02,
ComputerOutput = 0x04,
Subscript = 0x08,
Superscript = 0x10,
SmallFont = 0x20,
Center = 0x40
};
enum NodeKind
{
Para,
Text,
MarkupModifier,
ItemizedList,
OrderedList,
ListItem
};
DocNode(NodeKind k) : m_kind(k) {}
virtual ~DocNode() {}
private:
NodeKind m_kind;
};
class TextNode : public DocNode
{
public:
TextNode(const QString &t,int markup)
: DocNode(Text), m_text(t), m_markup(markup) {}
private:
QString m_text;
int m_markup;
};
class MarkupModifierNode : public DocNode
{
public:
MarkupModifierNode(int markup,bool enabled)
: DocNode(MarkupModifier), m_markup(markup), m_enabled(enabled) {}
private:
int m_markup;
bool m_enabled;
};
class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
{
public:
MarkupHandler(QList<DocNode> &children,QString &curString);
virtual ~MarkupHandler();
int markup() const { return m_curMarkup; }
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();
private:
void addTextNode();
QList<DocNode> &m_children;
QString &m_curString;
int m_curMarkup;
};
class ListItemHandler : public DocNode, public BaseHandler<ListItemHandler>
{
public:
ListItemHandler(IBaseHandler *parent);
virtual ~ListItemHandler();
virtual void startListItem(const QXmlAttributes& attrib);
virtual void endListItem();
virtual void startParagraph(const QXmlAttributes& attrib);
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
};
class ListHandler : public DocNode, public BaseHandler<ListHandler>
{
public:
ListHandler(NodeKind k,IBaseHandler *parent);
virtual ~ListHandler();
virtual void startList(const QXmlAttributes& attrib);
virtual void endList();
virtual void startListItem(const QXmlAttributes& attrib);
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
};
class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler>
{
public:
virtual void startParagraph(const QXmlAttributes& attrib);
virtual void endParagraph();
virtual void startItemizedList(const QXmlAttributes& attrib);
virtual void startOrderedList(const QXmlAttributes& attrib);
ParagraphHandler(IBaseHandler *parent);
virtual ~ParagraphHandler();
private:
void addTextNode();
IBaseHandler *m_parent;
QList<DocNode> m_children;
MarkupHandler *m_markupHandler;
};
class DocHandler : public BaseHandler<DocHandler>
{
public:
virtual void startDoc(const QXmlAttributes& attrib);
virtual void endDoc();
virtual void startParagraph(const QXmlAttributes& attrib);
DocHandler(IBaseHandler *parent);
virtual ~DocHandler();
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
};
#endif
#include "mainhandler.h"
#include <qstring.h>
#include <qxml.h>
#include <qfile.h>
#include <qdict.h>
#include <qlist.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 )
{
fprintf(stderr,"Fatal error at line %d column %d: %s\n",
exception.lineNumber(),exception.columnNumber(),
exception.message().data());
return FALSE;
}
QString errorString() { return ""; }
private:
QString errorMsg;
};
int main(int argc,char **argv)
{
if (argc==1)
{
printf("Usage: %s file.xml\n",argv[0]);
exit(1);
}
QFile xmlFile(argv[1]);
MainHandler handler;
ErrorHandler errorHandler;
QXmlInputSource source( xmlFile );
QXmlSimpleReader reader;
reader.setContentHandler( &handler );
reader.setErrorHandler( &errorHandler );
reader.parse( source );
return 0;
}
#include "mainhandler.h"
void MainHandler::startCompound(const QXmlAttributes& attrib)
{
CompoundHandler *compHandler = new CompoundHandler(this);
compHandler->startCompound(attrib);
m_compounds.append(compHandler);
}
MainHandler::MainHandler()
{
m_compounds.setAutoDelete(TRUE);
addStartHandler("doxygen");
addStartHandler("compounddef",this,&MainHandler::startCompound);
addEndHandler("doxygen");
addEndHandler("compounddef");
}
MainHandler::~MainHandler()
{
}
#ifndef _MAINHANDLER_H
#define _MAINHANDLER_H
#include <qlist.h>
#include "basehandler.h"
#include "compoundhandler.h"
class MainHandler : public BaseHandler<MainHandler>
{
public:
virtual void startCompound(const QXmlAttributes& attrib);
MainHandler();
virtual ~MainHandler();
private:
QList<CompoundHandler> m_compounds;
};
#endif
#include "memberhandler.h"
#include "sectionhandler.h"
#include "dochandler.h"
MemberHandler::MemberHandler(IBaseHandler *parent)
: m_parent(parent), m_brief(0), m_detailed(0)
{
addEndHandler("memberdef",this,&MemberHandler::endMember);
addStartHandler("type");
addEndHandler("type",this,&MemberHandler::endType);
addStartHandler("name");
addEndHandler("name",this,&MemberHandler::endName);
addStartHandler("param",this,&MemberHandler::startParam);
addStartHandler("briefdescription",this,&MemberHandler::startBriefDesc);
addStartHandler("detaileddescription",this,&MemberHandler::startDetailedDesc);
}
MemberHandler::~MemberHandler()
{
}
void MemberHandler::startMember(const QXmlAttributes& attrib)
{
m_parent->setDelegate(this);
m_kind = attrib.value("kind");
m_id = attrib.value("id");
m_protection = attrib.value("prot");
m_virtualness = attrib.value("virtualness");
printf("member kind=`%s' id=`%s' prot=`%s' virt=`%s'\n",
m_kind.data(),m_id.data(),m_protection.data(),m_virtualness.data());
}
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::endMember()
{
m_parent->setDelegate(0);
}
void MemberHandler::endType()
{
m_type = m_curString.stripWhiteSpace();
printf("member type=`%s'\n",m_type.data());
}
void MemberHandler::endName()
{
m_name = m_curString.stripWhiteSpace();
printf("member name=`%s'\n",m_name.data());
}
void MemberHandler::startParam(const QXmlAttributes& attrib)
{
ParamHandler *paramHandler = new ParamHandler(this);
paramHandler->startParam(attrib);
m_params.append(paramHandler);
}
#ifndef _MEMBERHANDLER_H
#define _MEMBERHANDLER_H
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include "basehandler.h"
#include "paramhandler.h"
class DocHandler;
class MemberHandler : public BaseHandler<MemberHandler>
{
public:
virtual void startMember(const QXmlAttributes& attrib);
virtual void endMember();
virtual void startParam(const QXmlAttributes& attrib);
virtual void endType();
virtual void endName();
virtual void startBriefDesc(const QXmlAttributes& attrib);
virtual void startDetailedDesc(const QXmlAttributes& attrib);
MemberHandler(IBaseHandler *parent);
virtual ~MemberHandler();
private:
IBaseHandler *m_parent;
QString m_kind;
QString m_id;
QString m_protection;
QString m_virtualness;
QString m_type;
QString m_name;
DocHandler *m_brief;
DocHandler *m_detailed;
QList<ParamHandler> m_params;
};
#endif
#include "paramhandler.h"
#include "memberhandler.h"
ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent)
{
addEndHandler("param",this,&ParamHandler::endParam);
addStartHandler("type");
addEndHandler("type",this,&ParamHandler::endType);
addStartHandler("declname");
addEndHandler("declname",this,&ParamHandler::endDeclName);
addStartHandler("defname");
addEndHandler("defname",this,&ParamHandler::endDefName);
addStartHandler("array");
addEndHandler("array",this,&ParamHandler::endArray);
addStartHandler("attrib");
addEndHandler("attrib",this,&ParamHandler::endAttrib);
addStartHandler("defval");
addEndHandler("defval",this,&ParamHandler::endDefVal);
}
ParamHandler::~ParamHandler()
{
}
void ParamHandler::startParam(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
printf("param\n");
}
void ParamHandler::endParam()
{
m_parent->setDelegate(0);
}
void ParamHandler::endType()
{
m_type = m_curString.stripWhiteSpace();
printf("param type=`%s'\n",m_type.data());
}
void ParamHandler::endDeclName()
{
m_declName = m_curString.stripWhiteSpace();
printf("member declName=`%s'\n",m_declName.data());
}
void ParamHandler::endDefName()
{
m_defName = m_curString.stripWhiteSpace();
printf("member defName=`%s'\n",m_defName.data());
}
void ParamHandler::endAttrib()
{
m_attrib = m_curString.stripWhiteSpace();
printf("member attrib=`%s'\n",m_attrib.data());
}
void ParamHandler::endArray()
{
m_array = m_curString.stripWhiteSpace();
printf("member array=`%s'\n",m_array.data());
}
void ParamHandler::endDefVal()
{
m_defVal = m_curString.stripWhiteSpace();
printf("member defVal=`%s'\n",m_defVal.data());
}
#ifndef _PARAMHANDLER_H
#define _PARAMHANDLER_H
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include "basehandler.h"
class ParamHandler : public BaseHandler<ParamHandler>
{
public:
virtual void startParam(const QXmlAttributes& attrib);
virtual void endParam();
virtual void endType();
virtual void endDeclName();
virtual void endDefName();
virtual void endAttrib();
virtual void endArray();
virtual void endDefVal();
ParamHandler(IBaseHandler *parent);
virtual ~ParamHandler();
private:
IBaseHandler *m_parent;
QString m_type;
QString m_declName;
QString m_defName;
QString m_attrib;
QString m_array;
QString m_defVal;
};
#endif
#include "compoundhandler.h"
#include "sectionhandler.h"
SectionHandler::SectionHandler(IBaseHandler *parent) : m_parent(parent)
{
m_members.setAutoDelete(TRUE);
addEndHandler("sectiondef",this,&SectionHandler::endSection);
addStartHandler("memberdef",this,&SectionHandler::startMember);
}
SectionHandler::~SectionHandler()
{
}
void SectionHandler::startSection(const QXmlAttributes& attrib)
{
m_parent->setDelegate(this);
m_kind = attrib.value("kind");
printf("section kind=`%s'\n",m_kind.data());
}
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);
}
#ifndef _SECTIONHANDLER_H
#define _SECTIONHANDLER_H
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include "basehandler.h"
#include "memberhandler.h"
class SectionHandler : public BaseHandler<SectionHandler>
{
public:
virtual void startMember(const QXmlAttributes& attrib);
virtual void startSection(const QXmlAttributes& attrib);
virtual void endSection();
SectionHandler(IBaseHandler *parent);
virtual ~SectionHandler();
private:
IBaseHandler *m_parent;
QString m_kind;
QList<MemberHandler> m_members;
};
#endif
TEMPLATE = app.t
CONFIG = console warn_on $extraopt
HEADERS = basehandler.h mainhandler.h \
compoundhandler.h sectionhandler.h \
memberhandler.h paramhandler.h \
dochandler.h
SOURCES = main.cpp mainhandler.cpp \
compoundhandler.cpp sectionhandler.cpp \
memberhandler.cpp paramhandler.cpp \
dochandler.cpp
DEPENDPATH = ../../src
unix:LIBS += -L../../lib -ldoxycfg -lqtools
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../../lib -ldoxycfg -lqtools
win32-msvc:LIBS += qtools.lib doxycfg.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
INCLUDEPATH += ../../qtools ../../src
DESTDIR =
TARGET = xmlparse
unix:TARGETDEPS = ../../lib/libdoxycfg.a
win32:TARGETDEPS = ../../lib/doxycfg.lib
OBJECTS_DIR = obj
all clean depend: Makefile.xmlread
$(MAKE) -f Makefile.xmlread $@
distclean: clean
$(RM) -f Makefile.xmlread
tmake:
export TMAKEPATH=$(TMAKEPATH) ; $(PERL) $(TMAKE) xmlread.pro >Makefile.xmlread
Makefile.xmlread: xmlread.pro
export TMAKEPATH=$(TMAKEPATH) ; $(PERL) $(TMAKE) xmlread.pro >Makefile.xmlread
This is a small utility that is used to test and validate the
XML output generated by doxygen (when GENERATE_XML = YES).
It uses the Xerces-C XML parser/validator (see http://xml.apache.org)
and expects the environment variable XERCESCROOT to point to the root
of the Xerces package.
Currently is reads an XML file, validates it, and prints the class
hierarchy contained in it.
#ifndef COMPOUNDDEF_H
#define COMPOUNDDEF_H
#include "qtbc.h"
#include <qlist.h>
#include <qdict.h>
#include <qstrlist.h>
/*! Abstract interface for a compound as presented to the user */
class CompoundDef
{
public:
/*! Possible compound types */
enum Type { Unknown_t, Class_t, Struct_t, Union_t,
File_t, Namespace_t, Group_t, Interface_t };
/*! Destructor */
virtual ~CompoundDef() {}
/*! Returns the name of this compound */
virtual QCString name() const = 0;
/*! Returns the type of this compound */
virtual Type type() const = 0;
/*! Returns the unique identifier for this compound */
virtual QCString id() const = 0;
/*! Returns the list of base compounds from which this compound inherits */
virtual QList<CompoundDef> *baseCompounds() const = 0;
/*! Returns the list of compounds that derive from this one */
virtual QList<CompoundDef> *derivedCompounds() const = 0;
};
/*! Ordered dictionary of abstract compounds. */
class CompoundSDict : public QList<CompoundDef>
{
friend class CompoundSDictIterator;
public:
/*! Create an ordered dictionary.
* \param size The size of the dictionary. Should be a prime number for
* best distribution of elements.
*/
CompoundSDict(int size)
{
m_list = new QList<CompoundDef>;
m_list->setAutoDelete(TRUE);
m_dict = new QDict<CompoundDef>(size);
}
/*! Destroys the dictionary */
~CompoundSDict()
{
delete m_list;
delete m_dict;
}
/*! Appends a compound to the dictionary. The element is owned by the
* dictionary.
* \param key The unique key to use to quicky find the item later on.
* \param d The compound to add.
* \sa find()
*/
void append(const char *key,CompoundDef *d)
{
m_list->append(d);
m_dict->insert(key,d);
}
/*! Looks up a compound given its key.
* \param key The key to identify this element.
* \return The requested compound or zero if it cannot be found.
* \sa append()
*/
CompoundDef *find(const char *key)
{
return m_dict->find(key);
}
private:
QList<CompoundDef> *m_list;
QDict<CompoundDef> *m_dict;
};
/*! Simple iterator for CompoundSDict. It iterates in the order the
* element were appended.
*/
class CompoundSDictIterator
{
public:
/*! Create an iterator given the dictionary. */
CompoundSDictIterator(const CompoundSDict &dict)
{
m_li = new QListIterator<CompoundDef>(*dict.m_list);
}
/*! Destroys the dictionary */
~CompoundSDictIterator()
{
delete m_li;
}
/*! Set the iterator to the first element in the list.
* \return The first compound, or zero if the list was empty.
*/
CompoundDef *toFirst() const
{
return m_li->toFirst();
}
/*! Returns the current compound */
CompoundDef *current() const
{
return m_li->current();
}
/*! Moves the iterator to the next element.
* \return the new "current" element, or zero if the iterator was
* already pointing at the last element.
*/
CompoundDef *operator++()
{
return m_li->operator++();
}
private:
QListIterator<CompoundDef> *m_li;
};
/*! Concrete compound implementation. Used internally by the sax handlers */
class CompoundDef_Impl : public CompoundDef
{
public:
/*! Create an compound implementation object */
CompoundDef_Impl()
{
m_type = Unknown_t;
m_baseCompounds = new QList<CompoundDef>;
m_derivedCompounds = new QList<CompoundDef>;
}
/*! Destroy the implementation object */
~CompoundDef_Impl()
{
delete m_baseCompounds;
delete m_derivedCompounds;
}
/* implementation of the abstract interface */
Type type() const { return m_type; }
QCString name() const { return m_name; }
QCString id() const { return m_id; }
QList<CompoundDef> *baseCompounds() const { return m_baseCompounds; }
QList<CompoundDef> *derivedCompounds() const { return m_derivedCompounds; }
/*! Sets the type of the compound to \a t. */
void setType(Type t) { m_type = t; }
/*! Sets the name of the compound to \a name. */
void setName(const char *name) { m_name=name; }
/*! Sets the Id of the compound to \a id. */
void setId(const char *id) { m_id=id; }
/*! Adds a new reference to the internal base class reference list */
void addBaseRef(const char *name) { m_baseRefs.append(name); }
/*! Adds a new reference to the internal derived class reference list */
void addDerivedRef(const char *name) { m_derivedRefs.append(name); }
/*! Resolve the base and derived compound references. */
void resolveReferences(CompoundSDict *dict)
{
char *refId;
refId = m_baseRefs.first();
while (refId)
{
CompoundDef *cd = dict->find(refId);
m_baseCompounds->append(cd);
refId = m_baseRefs.next();
}
refId = m_derivedRefs.first();
while (refId)
{
CompoundDef *cd = dict->find(refId);
m_derivedCompounds->append(cd);
refId = m_derivedRefs.next();
}
}
private:
Type m_type;
QCString m_name;
QCString m_id;
QStrList m_derivedRefs;
QStrList m_baseRefs;
QList<CompoundDef> *m_baseCompounds;
QList<CompoundDef> *m_derivedCompounds;
};
#endif
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <util/PlatformUtils.hpp>
#include <parsers/SAXParser.hpp>
#include "strx.h"
#include "saxhandlers.h"
#include "compounddef.h"
// ---------------------------------------------------------------------------
// Local data
//
// xmlFile
// The path to the file to parser. Set via command line.
//
// ---------------------------------------------------------------------------
static char* xmlFile = 0;
// ---------------------------------------------------------------------------
// Local helper methods
// ---------------------------------------------------------------------------
static void usage()
{
cout << "\nUsage: xmlread file.xml\n"
<< " Extracts the class hierarchy from a doxygen generated XML file.\n"
<< endl;
}
// recursively display non-root compounds
static void showDerivedCompounds(QList<CompoundDef> *compoundList,int level)
{
if (compoundList->count()>0)
{
QListIterator<CompoundDef> cli(*compoundList);
CompoundDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
int i;
for (i=0;i<level;i++) cout << " ";
cout << cd->name() << endl;
showDerivedCompounds(cd->derivedCompounds(),level+1);
}
}
}
// show compound hierarchy
static void showCompoundHierarchy(CompoundSDict *compounds)
{
CompoundSDictIterator cdi(*compounds);
CompoundDef *cd;
for (cdi.toFirst();(cd=cdi.current());++cdi)
{
if (cd->type()==CompoundDef::Class_t &&
cd->baseCompounds()->count()==0) // root compound
{
cout << cd->name() << endl;
showDerivedCompounds(cd->derivedCompounds(),1);
}
}
}
// ---------------------------------------------------------------------------
// Program entry point
// ---------------------------------------------------------------------------
int main(int argC, char* argV[])
{
// Initialize the XML4C2 system
try
{
XMLPlatformUtils::Initialize();
}
catch (const XMLException& toCatch)
{
cerr << "Error during initialization! :\n"
<< StrX(toCatch.getMessage()) << endl;
return 1;
}
// Check command line and extract arguments.
if (argC!=2)
{
usage();
return 1;
}
// Watch for special case help request
if (strcmp(argV[1], "-?") == 0)
{
usage();
return 0;
}
// Assume the argument is a file name
xmlFile = argV[1];
//
// Create a SAX validating parser object.
//
SAXParser parser;
parser.setDoValidation(TRUE);
// Create a compound dictionary, where the results will be stored.
// The size of the dictionary is 1009 entries (should be a prime number)
CompoundSDict compounds(1009);
//
// Create the handler object and install it as the document and error
// handler for the parser.
//
SaxPass1Handlers handler(&compounds);
parser.setDocumentHandler(&handler);
parser.setErrorHandler(&handler);
// Parse the file and catch any exceptions that propogate out
try
{
parser.parse(xmlFile);
}
catch (const XMLException& toCatch)
{
cerr << "\nFile not found: '" << xmlFile << "'\n"
<< "Exception message is: \n"
<< StrX(toCatch.getMessage())
<< "\n" << endl;
return -1;
}
// Show the class hierarchy that we extracted
showCompoundHierarchy(&compounds);
return 0;
}
/******************************************************************************
*
*
*
* Copyright (C) 1997-2001 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
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <util/XMLUni.hpp>
#include <sax/AttributeList.hpp>
#include "saxhandlers.h"
#include "strx.h"
#include <iostream.h>
static void error(const SAXParseException& e)
{
cerr << "\nError at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "): " << StrX(e.getMessage()) << endl;
exit(1);
}
static void fatalError(const SAXParseException& e)
{
cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "): " << StrX(e.getMessage()) << endl;
exit(1);
}
static void warning(const SAXParseException& e)
{
cerr << "\nWarning at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "): " << StrX(e.getMessage()) << endl;
exit(1);
}
// ---------------------------------------------------------------------------
// SaxPass1Handlers: Constructors and Destructor
// ---------------------------------------------------------------------------
SaxPass1Handlers::SaxPass1Handlers(CompoundSDict *comp) : m_compounds(comp)
{
m_currentCompound = 0;
}
SaxPass1Handlers::~SaxPass1Handlers()
{
}
// ---------------------------------------------------------------------------
// SaxPass1Handlers: Overrides of the SAX ErrorHandler interface
// ---------------------------------------------------------------------------
void SaxPass1Handlers::error(const SAXParseException& e)
{
::error(e);
}
void SaxPass1Handlers::fatalError(const SAXParseException& e)
{
::fatalError(e);
}
void SaxPass1Handlers::warning(const SAXParseException& e)
{
::warning(e);
}
// ---------------------------------------------------------------------------
// SaxPass1Handlers: Overrides of the SAX DocumentHandler interface
// ---------------------------------------------------------------------------
void SaxPass1Handlers::characters(const XMLCh* const chars,
const unsigned int /*length*/
)
{
if (m_charAction==ReadCompoundName)
{
m_compoundName=StrX(chars);
m_charAction=Done;
}
}
void SaxPass1Handlers::endDocument()
{
// resolve all references
CompoundSDictIterator cdi(*m_compounds);
CompoundDef *cd;
for (cdi.toFirst();(cd=cdi.current());++cdi)
{
CompoundDef_Impl *impl = dynamic_cast<CompoundDef_Impl*>(cd);
impl->resolveReferences(m_compounds);
}
}
void SaxPass1Handlers::startElement(const XMLCh* const name,
AttributeList& attributes
)
{
QCString sname = StrX(name);
if (sname=="compounddef")
{
m_currentCompound = new CompoundDef_Impl;
unsigned int len = attributes.getLength(),index;
for (index = 0; index < len; index++)
{
QCString attName = StrX(attributes.getName(index));
QCString attValue = StrX(attributes.getValue(index));
if (attName == "id")
{
m_currentCompound->setId(attValue);
}
else if (attName=="type")
{
if (attValue=="class")
{
m_currentCompound->setType(CompoundDef::Class_t);
}
else if (attValue=="struct")
{
m_currentCompound->setType(CompoundDef::Struct_t);
}
else if (attValue=="union")
{
m_currentCompound->setType(CompoundDef::Union_t);
}
else if (attValue=="interface")
{
m_currentCompound->setType(CompoundDef::Interface_t);
}
else if (attValue=="file")
{
m_currentCompound->setType(CompoundDef::File_t);
}
else
{
cerr << "Unsupported compound type: " << attValue << "\n";
}
}
}
}
else if (sname=="compoundname")
{
m_charAction = ReadCompoundName;
}
else if (sname=="basecompoundref")
{
unsigned int len = attributes.getLength(),index;
for (index = 0; index < len; index++)
{
QCString attName = StrX(attributes.getName(index));
QCString attValue = StrX(attributes.getValue(index));
if (attName=="idref")
{
m_currentCompound->addBaseRef(attValue);
}
}
}
else if (sname=="derivedcompoundref")
{
unsigned int len = attributes.getLength(),index;
for (index = 0; index < len; index++)
{
QCString attName = StrX(attributes.getName(index));
QCString attValue = StrX(attributes.getValue(index));
if (attName=="idref")
{
m_currentCompound->addDerivedRef(attValue);
}
}
}
}
void SaxPass1Handlers::endElement(const XMLCh* const name)
{
QCString sname = StrX(name);
if (sname=="compounddef")
{
m_compounds->append(m_currentCompound->id(),m_currentCompound);
m_currentCompound=0;
}
else if (sname=="compoundname")
{
m_currentCompound->setName(m_compoundName);
}
}
#ifndef _SAXHANDLERS_H
#define _SAXHANDLERS_H
#include "compounddef.h"
#include <sax/HandlerBase.hpp>
/*! SAX Handlers used for pass 1. */
class SaxPass1Handlers : public HandlerBase
{
public:
// -----------------------------------------------------------------------
//! @name Constructors
// -----------------------------------------------------------------------
//@{
/*! Constructor */
SaxPass1Handlers(CompoundSDict *comp);
/*! Destructor */
~SaxPass1Handlers();
//@}
// -----------------------------------------------------------------------
//! @name Implementations of the SAX DocumentHandler interface
// -----------------------------------------------------------------------
//@{
/*! Handler called at the start of the XML document */
void startDocument() {}
/*! Handler called at the end of the XML document */
void endDocument();
/*! Handler called when an element is found in the XML file
* \param name The element's name.
* \param attributes The list of attributes for the element.
*/
void startElement(const XMLCh* const name, AttributeList& attributes);
/*! Handler called when the element of an element is found in the XML file
* \param name The element's name.
*/
void endElement(const XMLCh* const name);
/*! Handler called when a character string is found in the XML file.
* \param chars Zero terminated string of characters.
* \param length The number of characters in the string.
*/
void characters(const XMLCh* const chars, const unsigned int length);
/*! Handler called when an amount of whitespace is found, that is not
* Part of the text.
*/
void ignorableWhitespace(const XMLCh* const /*chars*/,
const unsigned int /*length*/
) {}
/*! Handler called when a preprocessing intruction is found.
*/
void processingInstruction(const XMLCh* const /*target*/,
const XMLCh* const /*data*/
) {}
//@}
// -----------------------------------------------------------------------
//! @name Implementations of the SAX ErrorHandler interface
// -----------------------------------------------------------------------
//@{
/*! Handler called for a parser warning. */
void warning(const SAXParseException& exception);
/*! Handler called for a parser error. */
void error(const SAXParseException& exception);
/*! Handler called for a parser fatal error. */
void fatalError(const SAXParseException& exception);
//@}
// -----------------------------------------------------------------------
//! @name Implementation of the SAX DTDHandler interface
// -----------------------------------------------------------------------
//@{
/*! Handler for DTD notation declaration. */
void notationDecl(const XMLCh* const /*name*/,
const XMLCh* const /*publicId*/,
const XMLCh* const /*systemId*/
) {}
/*! Handler for DTD unparsed entity declaration. */
void unparsedEntityDecl(const XMLCh* const /*name*/,
const XMLCh* const /*publicId*/,
const XMLCh* const /*systemId*/,
const XMLCh* const /*notationName*/
) {}
//@}
private:
// -----------------------------------------------------------------------
// Private data members
//
// -----------------------------------------------------------------------
enum CharActions { Done, ReadCompoundName };
CompoundSDict *m_compounds;
CompoundDef_Impl *m_currentCompound;
QCString m_compoundName;
CharActions m_charAction;
};
#endif
#ifndef _STRX_H
#define _STRX_H
// ---------------------------------------------------------------------------
// Includes for all the program files to see
// ---------------------------------------------------------------------------
#include "qtbc.h"
#include <iostream.h>
/*!
* This is a simple wrapper class around QCString that lets us do easy
* trancoding of XMLCh data to local code page for display.
*/
class StrX : public QCString
{
public:
/*! Constructor */
StrX(const XMLCh* const toTranscode) :
QCString(XMLString::transcode(toTranscode)) {}
/*! Destructor */
~StrX() {}
};
#endif
TEMPLATE = app
CONFIG = console qt warn_on debug
HEADERS = saxhandler.h strx.h compounddef.h
SOURCES = main.cpp \
saxhandlers.cpp
LIBS = -lxerces-c1_2 -L$(XERCESCROOT)/lib
INCLUDEPATH = $(XERCESCROOT)/include
......@@ -27,49 +27,48 @@ f_prefix=/usr
f_insttool=NO
f_english=NO
f_wizard=NO
f_xmlgen=NO
while test -n "$1"; do
case $1 in
--prefix)
--prefix | -prefix)
shift; f_prefix=$1
;;
--shared)
--docdir | -docdir)
shift; f_docdir=$1/doxygen
;;
--shared | -shared)
f_shared=YES
;;
--static)
--static | -static)
f_shared=NO
;;
--release)
--release | -release)
f_debug=NO
;;
--debug)
--debug | -debug)
f_debug=YES
;;
--english-only)
--english-only | -english-only)
f_english=YES
;;
--platform)
--platform | -platform)
shift; f_platform=$1
;;
--make)
--make | -make)
shift; f_make=$1
;;
--dot)
--dot | -dot)
shift; f_dot=$1
;;
--perl)
--perl | -perl)
shift; f_perl=$1
;;
--install)
--install | -install)
shift; f_insttool=$1
;;
--with-doxywizard)
--with-doxywizard | -with-doxywizard)
f_wizard=YES
;;
--with-xmlgen)
f_xmlgen=YES
;;
-h | -help | --help)
f_help=y
;;
......@@ -86,46 +85,36 @@ if test "$f_help" = y; then
cat <<EOF
Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--make name] [--dot name] [--platform target]
[--prefix dir] [--install name] [--english-only]
[--with-doxywizard] [--with-xmlgen]
[--prefix dir] [--docdir dir] [--install name] [--english-only]
[--with-doxywizard]
Options:
--help Print this help
--shared | --static Build using shared or static linking
[default: shared]
--release | --debug Build for release or debug
[default: release]
--perl name Use \`name' as the name of the perl interpreter
[default: autodetect]
--make name Use \`name' as the name of the GNU make tool
[default: autodetect]
--dot name Use \`name' as the name of the dot tool that
is part of the Graphviz package.
[default: autodetect]
--platform target Do not detect platform but use \`target' instead.
See PLATFORMS for a list of possibilities
--prefix dir Installation prefix directory
--prefix dir Installation prefix directory (doxygen will be
put in PREFIX/bin/doxygen)
[default: /usr]
--docdir dir Documentation is installed in DOCDIR/doxygen/
[default: PREFIX/share/doc/packages]
--install name Use \`name' as the name of the GNU install tool
[default: autodetect]
--english-only Include support for English only.
--with-doxywizard Build the GUI frontend for doxygen. This
requires Qt 2.x.x
--with-xmlgen Builds a separate doxygen executable that
generates XML output.
EOF
test "$f_error" = y && exit 1
exit 0;
......@@ -206,6 +195,10 @@ if test -z "$f_platform"; then
f_plf_auto=YES
fi
if test -z "$f_docdir"; then
f_docdir=$f_prefix/share/doc/packages/doxygen
fi
if test "$f_plf_auto" = NO; then
echo -n " Checking for platform $f_platform... "
if test '!' -d tmake/lib/$f_platform; then
......@@ -277,10 +270,8 @@ if test "$f_insttool" = NO; then
for j in $install_dirs; do
if test -x "$j/$i"; then
install_found=YES
if $j/$i --version 2>/dev/null | grep GNU >/dev/null; then
install_prog="$j/$i"
break 2
fi
install_prog="$j/$i"
break 2
fi
done
done
......@@ -371,6 +362,7 @@ VERSION = `cat VERSION`
INSTALL = $f_prefix
INSTTOOL = $f_insttool
DOXYDOCS = ..
DOCDIR = $f_docdir
EOF
if test "$f_dot" != NO; then
......@@ -406,7 +398,7 @@ TMAKE_CXXFLAGS += -DENGLISH_ONLY
EOF
fi
f_inmakefiles="Makefile.in addon/xmlgen/Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/xmlread/Makefile.in"
f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/xmlparse/Makefile.in"
for i in $f_inmakefiles ; do
SRC=$i
......@@ -427,26 +419,18 @@ EOF
if test $f_wizard = YES; then
echo " \$(MAKE) -C addon/doxywizard" >> $DST
fi
if test $f_xmlgen = YES; then
echo " \$(MAKE) -C addon/xmlgen" >> $DST
fi
echo "" >> $DST
echo "doxywizard_install:" >> $DST
if test $f_wizard = YES; then
echo " \$(MAKE) -C addon/doxywizard install" >> $DST
fi
echo "" >> $DST
echo "xmlgen_install:" >> $DST
if test $f_xmlgen = YES; then
echo " \$(MAKE) -C addon/xmlgen install" >> $DST
fi
echo "" >> $DST
fi
cat $SRC >> $DST
echo " Created $DST from $SRC..."
done
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/doxywizard/doxywizard.pro.in addon/xmlread/xmlread.pro.in addon/xmlgen/xmlgen.pro.in"
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/doxywizard/doxywizard.pro.in addon/xmlparse/xmlparse.pro.in"
for i in $f_inprofiles ; do
SRC=$i
......
......@@ -12,7 +12,7 @@
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
PROJECT_NAME =
PROJECT_NAME = "Doxygen manual"
OUTPUT_DIRECTORY = ..
HTML_HEADER =
HTML_FOOTER =
......
......@@ -756,11 +756,8 @@ followed by the descriptions of the tags grouped by category.
doxygen generates three additional HTML index files:
\c index.hhp, \c index.hhc, and \c index.hhk. The \c index.hhp is a
project file that can be read by
<a href="http://msdn.microsoft.com/library/tools/htmlhelp/wkshp/download_main.htm">
Microsoft HTML Help Workshop</a>
\latexonly
(see http://msdn.microsoft.com/library/tools/htmlhelp/wkshp/download\_main.htm)
\endlatexonly
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconHH1Start.asp">
Microsoft's HTML Help Workshop</a>
on Windows.
The HTML Help Workshop contains a compiler that can convert all HTML output
......@@ -1007,7 +1004,7 @@ EXTRA_PACKAGES = times
\anchor cfg_man_links
<dt>\c MAN_LINKS <dd>
\addindex MAN_LINKs
\addindex MAN_LINKS
If the \c MAN_LINKS tag is set to \c YES and doxygen generates man output,
then it will generate one additional man file for each entity documented in
the real man page(s). These additional files only source the real man page,
......@@ -1208,7 +1205,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\anchor cfg_dot_cleanup
<dt>\c DOT_CLEANUP <dd>
\addindex DOT_CLEANUP
This tag can be used to ?? cleanup any mess DOT left behind?
This tag can be used to cleanup any mess DOT left behind.
If left blank, "NO" is assumed.
</dl>
......
......@@ -79,7 +79,7 @@ sections.
The first part forms a user manual:
<ul>
<li>Section \ref install discusses how to
<a href="http://www.stack.nl/~dimitri/doxygen/download.html">download</a>, compile and install
<a href="http://www.doxygen.org/download.html">download</a>, compile and install
doxygen for your platform.
<li>Section \ref starting tells you how to generate your first piece of
documentation quickly.
......@@ -126,11 +126,11 @@ The second part forms a reference manual:
I have compiled a
\htmlonly
<a href="http://www.stack.nl/~dimitri/doxygen/projects.html">list of projects</a>
<a href="http://www.doxygen.org/projects.html">list of projects</a>
that use doxygen.
\endhtmlonly
\latexonly
list of projects that use doxygen (see {\tt http://www.stack.nl/$\sim$dimitri/doxygen/projects.html}).
list of projects that use doxygen (see {\tt http://www.doxygen.org/projects.html}).
\endlatexonly
If you know other projects, let me know and I'll add them.
......@@ -138,10 +138,10 @@ If you know other projects, let me know and I'll add them.
Although doxygen is used successfully by a lot of people already,
there is always room for improvement. Therefore, I have compiled a
\htmlonly
<a href="http://www.stack.nl/~dimitri/doxygen/todo.html">todo/wish list</a>
<a href="http://www.doxygen.org/todo.html">todo/wish list</a>
\endhtmlonly
\latexonly
todo/wish list (see {\tt http://www.stack.nl/$\sim$dimitri/doxygen/todo.html})
todo/wish list (see {\tt http://www.doxygen.org/todo.html})
\endlatexonly
of possible and/or requested enhancements.
......
......@@ -147,9 +147,9 @@ Compilation is now done by performing the following steps:
make pdf
\endverbatim
The postscript manual <code>doxygen_manual.ps</code> will be located
The PostScript manual <code>doxygen_manual.ps</code> will be located
in the latex directory of the distribution. Just send it to a
postscript printer to print it or use <code>ghostview</code> to view it.
PostScript printer to print it or use <code>ghostview</code> to view it.
</ol>
......@@ -165,13 +165,14 @@ Compilation is now done by performing the following steps:
\endverbatim
Binaries are installed into the directory <code>\<prefix\>/bin</code>.
Use <code>make install_docs DOCDIR=\<path\></code> to install the
documentation and examples into the <code>\<path\></code> directory.
Use <code>make install_docs</code> to install the
documentation and examples into <code>\<docdir\>/doxygen</code>.
<code>\<prefix\></code> defaults to /usr but can be changed with
<code>\<prefix\></code> defaults to <code>/usr</code> but can be changed with
the <code>--prefix</code> option of the configure script.
The default <code>DOCDIR</code> directory is
<code>\<prefix\>/share/doc/packages/doxygen</code>
The default <code>\<docdir\></code> directory is
<code>\<prefix\>/share/doc/packages</code> and can be changed with
the <code>--docdir</code> option of the configure script.
Alternatively, you can also copy the binaries from the <code>bin</code>
directory manually to some <code>bin</code> directory in your search path.
......@@ -445,7 +446,7 @@ Here is what is required:
(see \ref cfg_generate_htmlhelp "GENERATE_HTMLHELP") in the
config file, then you need the Microsoft HTML help workshop.
You can download it at:
http://msdn.microsoft.com/library/tools/htmlhelp/wkshp/download_main.htm
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconHH1Start.asp
<li>If you used WinZip to extract the tar archive it will (apparently) not
create empty folders, so you have to add the folders
......@@ -454,6 +455,7 @@ Here is what is required:
<li><a href="http://www.graphviz.org/">
the Graph visualization toolkit version 1.5</a><br>
\latexonly(see {\tt http://www.graphviz.org/})\endlatexonly.
Needed for the include dependency graphs, the graphical inheritance graphs,
and the collaboration graphs.
</ul>
......
......@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.8-20010723), 24 languages
Currently (version 1.2.8-20010726), 24 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German,
......@@ -101,13 +101,13 @@ when the translator was updated.
<TR BGCOLOR="#ffffff">
<TD>French</TD>
<TD>Xavier Outhier</TD>
<TD>xavier.outhier@NOSPAM.anfdata.cz</TD>
<TD>xouthier@NOSPAM.yahoo.fr</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>German</TD>
<TD>Jens Seidel<br>Jens Breitenstein</TD>
<TD>jensseidel@NOSPAM.users.sourceforge.net<br>Jens.Breitenstein@NOSPAM.tlc.de</TD>
<TD>jensseidel@NOSPAM.users.sf.net<br>Jens.Breitenstein@NOSPAM.tlc.de</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -222,9 +222,9 @@ when the translator was updated.
\hline
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & 1.0.0 \\
\hline
French & Xavier Outhier & {\tt xavier.outhier@anfdata.cz} & up-to-date \\
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\
\hline
German & Jens Seidel & {\tt jensseidel@users.sourceforge.net} & up-to-date \\
German & Jens Seidel & {\tt jensseidel@users.sf.net} & up-to-date \\
& Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} & \\
\hline
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\
......@@ -295,13 +295,13 @@ Just follow these steps:
\endverbatim
after the <code>if { ... }</code>
<li>Edit libdoxygen.pro.in and add \c translator_xx.h to
the \c HEADERS line in the file doxygen.pro.
the \c HEADERS line.
<li>Edit <code>translator_xx.h</code>:
<ul>
<li>Rename <code>TRANSLATOR_EN_H</code> to <code>TRANSLATOR_XX_H</code> twice.
<li>Rename TranslatorEnglish to TranslatorYourLanguage
<li>In the member <code>idLanguage()</code> change "english" into the
name of the your language (use lower case characters only). Depending
name of your language (use lower case characters only). Depending
on the language you may also wish to change the member functions
latexLanguageSupportCommand(), idLanguageCharset() and others
(you will recognize them when you start the work).
......
......@@ -68,13 +68,13 @@ Just follow these steps:
\endverbatim
after the <code>if { ... }</code>
<li>Edit libdoxygen.pro.in and add \c translator_xx.h to
the \c HEADERS line in the file doxygen.pro.
the \c HEADERS line.
<li>Edit <code>translator_xx.h</code>:
<ul>
<li>Rename <code>TRANSLATOR_EN_H</code> to <code>TRANSLATOR_XX_H</code> twice.
<li>Rename TranslatorEnglish to TranslatorYourLanguage
<li>In the member <code>idLanguage()</code> change "english" into the
name of the your language (use lower case characters only). Depending
name of your language (use lower case characters only). Depending
on the language you may also wish to change the member functions
latexLanguageSupportCommand(), idLanguageCharset() and others
(you will recognize them when you start the work).
......
......@@ -27,10 +27,10 @@ Finnish
Olli Korhonen: Olli.Korhonen@ccc.fi
French
Xavier Outhier: xavier.outhier@anfdata.cz
Xavier Outhier: xouthier@yahoo.fr
German
Jens Seidel: jensseidel@users.sourceforge.net
Jens Seidel: jensseidel@users.sf.net
Jens Breitenstein: Jens.Breitenstein@tlc.de
Hungarian
......
......@@ -575,7 +575,7 @@ xxxTABLE_FOOTxxx
##}}}
# Finish the tables, and substitute the mark in the doc
# template by the contatenation of the tables. Add NOSPAM to
# template by the concatenation of the tables. Add NOSPAM to
# email addresses in the HTML table. Replace the special
# character sequences. #{{{
#
......
Name: doxygen
Version: 1.2.8_20010723
Version: 1.2.9
Summary: documentation system for C, C++ and IDL
Release: 3
Release: 4
Source: doxygen-%{version}.src.tar.gz
Copyright: GPL
......@@ -41,13 +41,20 @@ Autor:
%setup -n doxygen-%{version}
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --with-doxywizard
CFLAGS="$RPM_OPT_FLAGS" ./configure --with-doxywizard --with-xmlgen
# the next path is Suse specific
QTDIR=/usr/lib/qt2
PATH=${QTDIR}/bin:$PATH
export QTDIR PATH
make
%install
rm -rf $RPM_BUILD_ROOT
make install INSTALL=$RPM_BUILD_ROOT/usr DOCDIR=$RPM_BUILD_ROOT%{_docdir}/doxygen
install -m 644 LICENSE LANGUAGE.HOWTO PLATFORMS README VERSION $RPM_BUILD_ROOT%{_docdir}/doxygen
make install install_docs INSTALL=$RPM_BUILD_ROOT/usr \
DOCDIR=$RPM_BUILD_ROOT%{_docdir}/doxygen
install -m 644 LICENSE LANGUAGE.HOWTO PLATFORMS README VERSION \
$RPM_BUILD_ROOT%{_docdir}/doxygen
find $RPM_BUILD_ROOT -name CVS -type d -depth -exec rm -r {} \;
%files
......@@ -59,6 +66,11 @@ find $RPM_BUILD_ROOT -name CVS -type d -depth -exec rm -r {} \;
rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Jun 10 2001 Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
- update to 1.2.8.1
* Tue Jun 5 2001 Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
- update to 1.2.8
- enable XML-Generator
* Mon Apr 16 2001 Jens Seidel <jensseidel@users.sourceforge.net>
- new decription (english, german)
- use of %{_docdir}
......
......@@ -103,6 +103,7 @@ ClassDef::ClassDef(
m_templateMaster =0;
m_templBaseClassNames = 0;
m_artificial = FALSE;
m_isAbstract = FALSE;
}
// destroy the class definition
......@@ -453,6 +454,11 @@ void ClassDef::insertMember(MemberDef *md)
}
if (md->virtualness()==Pure)
{
m_isAbstract=TRUE;
}
MemberInfo *mi = new MemberInfo((MemberDef *)md,
md->protection(),md->virtualness(),FALSE);
MemberNameInfo *mni=0;
......@@ -660,7 +666,10 @@ static void writeTemplateSpec(OutputList &ol,Definition *d,
if (a) ol.docify(", ");
}
ol.docify(">");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.lineBreak();
ol.popGeneratorState();
}
ol.docify(type.lower()+" "+name);
ol.endSubsubsection();
......@@ -1186,8 +1195,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
ClassDef *innerCd;
for (cli.toFirst();(innerCd=cli.current());++cli)
{
msg("Generating docs for nested compound %s...\n",innerCd->name().data());
innerCd->writeDocumentation(ol);
if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0)
{
msg("Generating docs for nested compound %s...\n",innerCd->name().data());
innerCd->writeDocumentation(ol);
}
}
}
}
......
......@@ -195,6 +195,11 @@ class ClassDef : public Definition
QCString qualifiedNameWithTemplateParameters(
QList<ArgumentList> *actualParams=0) const;
/*! Returns TRUE if there is at least one pure virtual member in this
* class.
*/
bool isAbstract() const { return m_isAbstract; }
/* member lists by protection */
MemberList pubMembers;
MemberList proMembers;
......@@ -402,6 +407,9 @@ class ClassDef : public Definition
* the inheritance tree.
*/
bool m_artificial;
/*! Is this an abstact class? */
bool m_isAbstract;
};
/*! \brief Class that contains information about a usage relation.
......
......@@ -328,7 +328,7 @@ static void addVariable()
else
{
int i;
if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
if ((getResolvedClass(g_currentDefinition,g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
{
//printf("adding variable `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
g_cvd.classScope=g_classScope;
......@@ -337,7 +337,7 @@ static void addVariable()
else if ((i=g_cvd.type.find('<'))>0)
{
g_cvd.type = g_cvd.type.left(i);
if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type.left(i)]))
if ((getResolvedClass(g_currentDefinition,g_cvd.type)) || (g_codeClassDict[g_cvd.type.left(i)]))
{
//printf("adding template type variable `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
g_cvd.classScope=g_classScope;
......@@ -359,7 +359,7 @@ static void addParameter()
else
{
int i;
if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
if ((getResolvedClass(g_currentDefinition,g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
{
//printf("adding parameter `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
g_cvd.classScope=g_classScope;
......@@ -368,7 +368,7 @@ static void addParameter()
else if ((i=g_cvd.type.find('<'))>0)
{
g_cvd.type = g_cvd.type.left(i);
if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type.left(i)]))
if ((getResolvedClass(g_currentDefinition,g_cvd.type)) || (g_codeClassDict[g_cvd.type.left(i)]))
{
//printf("adding template type parameter `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
g_cvd.classScope=g_classScope;
......@@ -409,10 +409,10 @@ static void generateClassLink(OutputDocInterface &ol,char *clName,int *clNameLen
QCString className=clName;
if (clNameLen) *clNameLen=0;
if (className.isEmpty()) return;
ClassDef *cd=getResolvedClass(className);
ClassDef *cd=getResolvedClass(g_currentDefinition,className);
if (cd==0 && (i=className.find('<'))!=-1)
{
cd=getResolvedClass(className.left(i));
cd=getResolvedClass(g_currentDefinition,className.left(i));
}
if (cd && cd->isLinkable())
{
......@@ -458,11 +458,11 @@ static ClassDef *stripClassName(const char *s)
//printf("g_classScope=`%s' clName=`%s'\n",g_classScope.data(),clName.data());
if (!g_classScope.isEmpty())
{
cd=getResolvedClass(g_classScope+"::"+clName);
cd=getResolvedClass(g_currentDefinition,g_classScope+"::"+clName);
}
if (cd==0)
{
cd=getResolvedClass(clName);
cd=getResolvedClass(g_currentDefinition,clName);
}
if (cd)
{
......@@ -632,7 +632,7 @@ static void generateMemberLink(OutputDocInterface &ol,const char *varName,
}
else
{
ClassDef *vcd = getResolvedClass(g_classScope);
ClassDef *vcd = getResolvedClass(g_currentDefinition,g_classScope);
if (vcd && vcd->isLinkable())
{
//printf("Found class %s for variable `%s'\n",g_classScope.data(),varName);
......
......@@ -2165,28 +2165,68 @@ void Config::create()
// The IMAGE_PATTERNS tag is now officially obsolete.
}
bool Config::parse(const char *fn)
static QCString configFileToString(const char *name)
{
QFileInfo fi( fn );
if (!fi.exists())
if (name==0 || name[0]==0) return 0;
QFile f;
bool fileOpened=FALSE;
if (name[0]=='-' && name[1]==0) // read from stdin
{
return FALSE;
fileOpened=f.open(IO_ReadOnly,stdin);
if (fileOpened)
{
const int bSize=4096;
QCString contents(bSize);
int totalSize=0;
int size;
while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize)
{
totalSize+=bSize;
contents.resize(totalSize+bSize);
}
totalSize+=size+2;
contents.resize(totalSize);
contents.at(totalSize-2)='\n'; // to help the scanner
contents.at(totalSize-1)='\0';
return contents;
}
}
QFile f( fn );
if (!f.open(IO_ReadOnly))
else // read from file
{
return FALSE;
QFileInfo fi(name);
if (!fi.exists() || !fi.isFile())
{
config_err("Error: file `%s' not found\n",name);
return "";
}
f.setName(name);
fileOpened=f.open(IO_ReadOnly);
if (fileOpened)
{
int fsize=f.size();
QCString contents(fsize+2);
f.readBlock(contents.data(),fsize);
if (fsize==0 || contents[fsize-1]=='\n')
contents[fsize]='\0';
else
contents[fsize]='\n'; // to help the scanner
contents[fsize+1]='\0';
f.close();
return contents;
}
}
// read file into a string buffer
int fsize = fi.size();
QCString contents(fsize+1); // add room for \0 terminator
if (f.readBlock(contents.data(),fsize)!=fsize)
if (!fileOpened)
{
return FALSE;
config_err("Error: cannot open file `%s' for reading\n",name);
}
contents[fsize]='\0';
return "";
}
bool Config::parse(const char *fn)
{
QCString contents = configFileToString(fn);
config = Config::instance();
inputString = contents.data();
inputPosition = 0;
......
......@@ -262,12 +262,12 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
a->attrib = g_curArgAttrib.copy();
if (i>=0 && g_curArgTypeName.at(i)!=':')
{ // type contains a name
a->type = g_curArgTypeName.left(i+1).stripWhiteSpace();
a->type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1));
a->name = g_curArgTypeName.right(g_curArgTypeName.length()-i-1);
}
else // assume only the type was specified, try to determine name later
{
a->type = g_curArgTypeName.stripWhiteSpace();
a->type = removeRedundantWhiteSpace(g_curArgTypeName);
}
a->array = removeRedundantWhiteSpace(g_curArgArray);
a->defval = g_curArgDefValue.copy();
......@@ -365,7 +365,6 @@ void stringToArgumentList(const char *argsString,ArgumentList* &al)
if (al==0) return;
if (argsString==0) return;
g_inputString = argsString;
//printf("stringToArgumentList(%s)\n",argsString);
g_inputPosition = 0;
g_curArgTypeName.resize(0);
g_curArgDefValue.resize(0);
......@@ -374,6 +373,7 @@ void stringToArgumentList(const char *argsString,ArgumentList* &al)
defargsYYrestart( defargsYYin );
BEGIN( Start );
defargsYYlex();
//printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(al).data());
}
extern "C" { // some bogus code to keep the compiler happy
......
......@@ -50,7 +50,7 @@ Definition::Definition(const char *df,int dl,
m_todoId=0;
m_testId=0;
m_bugId=0;
m_outerScope=0;
m_outerScope=Doxygen::globalScope;
}
Definition::~Definition()
......
......@@ -2050,10 +2050,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
<DocScan>"</"{TR}{ATTR}">"
<DocScan>"<"{TD}{ATTR}">" { if (curTable) curTable->newElem(); }
<DocScan>"</"{TD}{ATTR}">"
<DocScan>"<"{OL}{ATTR}">" { outDoc->startEnumList();
<DocScan>"<"{OL}{ATTR}">"{BN}* { outDoc->startEnumList();
currentListIndent.push("O");
}
<DocScan>"</"{OL}{ATTR}">" {
<DocScan>"</"{OL}{ATTR}">"{BN}* {
if (currentListIndent.isEmpty())
{
warn(yyFileName,yyLineNr,
......@@ -2072,10 +2072,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
currentListIndent.pop();
}
}
<DocScan>"<"{UL}{ATTR}">" { outDoc->startItemList();
<DocScan>"<"{UL}{ATTR}">"{BN}* { outDoc->startItemList();
currentListIndent.push("U");
}
<DocScan>"</"{UL}{ATTR}">" {
<DocScan>"</"{UL}{ATTR}">"{BN}* {
if (currentListIndent.isEmpty())
{
warn(yyFileName,yyLineNr,
......
......@@ -97,7 +97,8 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
if ((dest=Doxygen::tagDestinationDict[refPtr])) t << *dest << "/";
}
t << urlPtr << "\" shape=\"rect\" coords=\""
<< x1 << "," << y1 << "," << x2 << "," << y2 << "\">" << endl;
<< x1 << "," << y1 << "," << x2 << "," << y2 << "\""
<< " alt=\"\">" << endl;
}
}
}
......
......@@ -98,7 +98,7 @@ StringDict Doxygen::aliasDict(257); // aliases
FileNameDict *Doxygen::includeNameDict; // include names
FileNameDict *Doxygen::exampleNameDict; // examples
FileNameDict *Doxygen::imageNameDict; // images
StringDict Doxygen::typedefDict(1009); // all typedefs
//TypedefDict Doxygen::typedefDict(1009); // all typedefs
StringDict Doxygen::namespaceAliasDict(257); // all namespace aliases
StringDict Doxygen::tagDestinationDict(257); // all tag locations
// a member group
......@@ -140,7 +140,7 @@ void clearAll()
Doxygen::includeNameDict->clear();
Doxygen::exampleNameDict->clear();
Doxygen::imageNameDict->clear();
Doxygen::typedefDict.clear();
//Doxygen::typedefDict.clear();
Doxygen::groupDict.clear();
Doxygen::formulaDict.clear();
Doxygen::formulaNameDict.clear();
......@@ -172,7 +172,7 @@ void statistics()
fprintf(stderr,"--- aliasDict stats ----\n");
Doxygen::aliasDict.statistics();
fprintf(stderr,"--- typedefDict stats ----\n");
Doxygen::typedefDict.statistics();
//Doxygen::typedefDict.statistics();
fprintf(stderr,"--- namespaceAliasDict stats ----\n");
Doxygen::namespaceAliasDict.statistics();
fprintf(stderr,"--- groupDict stats ----\n");
......@@ -937,9 +937,6 @@ static void buildClassList(Entry *root)
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
if (d==0)
{
// TODO: Due to the order in which the tag file is written
// a nested class can be found before its parent!
//
//warn(root->fileName,root->startLine,
// "Warning: Internal inconsistency: scope for class %s not "
// "found!\n",fullName.data()
......@@ -1263,8 +1260,6 @@ static void findUsingDeclarations(Entry *root)
}
}
//----------------------------------------------------------------------
static MemberDef *addVariableToClass(
......@@ -1401,6 +1396,7 @@ static MemberDef *addVariableToClass(
//TODO: insert FileDef instead of filename strings.
cd->insertUsedFile(root->fileName);
root->section = Entry::EMPTY_SEC;
return md;
}
......@@ -1569,6 +1565,7 @@ static MemberDef *addVariableToFile(
Doxygen::functionNameDict.insert(name,mn);
Doxygen::functionNameList.append(mn);
}
root->section = Entry::EMPTY_SEC;
return md;
}
......@@ -1983,6 +1980,7 @@ static void buildMemberList(Entry *root)
cd->insertUsedFile(root->fileName);
addMemberToGroups(root,md);
root->section = Entry::EMPTY_SEC;
}
else if (root->parent &&
!(root->parent->section & Entry::COMPOUND_MASK) &&
......@@ -2176,6 +2174,7 @@ static void buildMemberList(Entry *root)
Doxygen::functionNameList.append(mn);
}
addMemberToGroups(root,md);
root->section = Entry::EMPTY_SEC;
}
else
{
......@@ -2397,28 +2396,6 @@ static void replaceNamespaceAliases(QCString &scope,int i)
//printf("replaceNamespaceAliases() result=%s\n",scope.data());
}
static QCString resolveTypeDef(const QCString &name)
{
QCString typeName;
if (!name.isEmpty())
{
QCString *subst = Doxygen::typedefDict[name];
if (subst)
{
int count=0;
typeName=*subst;
QCString *newSubst;
while ((newSubst=Doxygen::typedefDict[typeName]) && count<10)
{
if (typeName==*newSubst) break; // prevent lock-up
typeName=*newSubst;
count++;
}
}
}
return typeName;
}
/*! make a dictionary of all template arguments of class cd
* that are part of the base class name.
* Example: A template class A with template arguments <R,S,T>
......@@ -2507,7 +2484,7 @@ static void findUsedClassesForClass(Entry *root,
//printf("extractClassNameFromType(%s)\n",type.data());
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec))
{
QCString typeName = resolveTypeDef(usedClassName);
QCString typeName = resolveTypeDef(masterCd,usedClassName);
QCString usedName = usedClassName+templSpec;
if (!typeName.isEmpty())
{
......@@ -2566,14 +2543,14 @@ static void findUsedClassesForClass(Entry *root,
QCString scopeName = scope ? scope->qualifiedName().data() : 0;
if (!scopeName.isEmpty())
{
usedCd=getResolvedClass(scopeName+"::"+usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(scopeName+"::"+usedClassName,0,&templSpec);
usedCd=getResolvedClass(masterCd,scopeName+"::"+usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(masterCd,scopeName+"::"+usedClassName,0,&templSpec);
//printf("Search for class %s result=%p\n",(scopeName+"::"+usedName).data(),usedCd);
}
else
{
usedCd=getResolvedClass(usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(usedClassName,0,&templSpec);
usedCd=getResolvedClass(masterCd,usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(masterCd,usedClassName,0,&templSpec);
//printf("Search for class %s result=%p\n",usedName.data(),usedCd);
}
if (scope) scope=scope->getOuterScope();
......@@ -2735,17 +2712,19 @@ static bool findClassRelation(
//printf("scopePrefix=`%s' bi->name=`%s'\n",
// scopeName.left(scopeOffset).data(),bi->name.data());
QCString baseClassName=stripTemplateSpecifiersFromScope
(removeRedundantWhiteSpace(bi->name));
QCString baseClassName=bi->name;
if (scopeOffset>0)
{
baseClassName.prepend(scopeName.left(scopeOffset)+"::");
}
baseClassName=stripTemplateSpecifiersFromScope
(removeRedundantWhiteSpace(baseClassName));
bool baseClassIsTypeDef;
QCString templSpec;
ClassDef *baseClass=getResolvedClass(baseClassName,&baseClassIsTypeDef,&templSpec);
ClassDef *baseClass=getResolvedClass(cd,baseClassName,&baseClassIsTypeDef,&templSpec);
//printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd);
//printf(" baseClassName=`%s' baseClass=%s templSpec=%s\n",
// baseClassName.data(),
// baseClassName.data(),
// baseClass?baseClass->name().data():"<none>",
// templSpec.data()
// );
......@@ -2787,7 +2766,7 @@ static bool findClassRelation(
{
templSpec=baseClassName.mid(i,e-i);
baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e);
baseClass=getResolvedClass(baseClassName);
baseClass=getResolvedClass(cd,baseClassName);
//printf("baseClass=%p -> baseClass=%s templSpec=%s\n",
// baseClass,baseClassName.data(),templSpec.data());
}
......@@ -2799,7 +2778,7 @@ static bool findClassRelation(
{
// replace any namespace aliases
replaceNamespaceAliases(baseClassName,i);
baseClass=getResolvedClass(baseClassName);
baseClass=getResolvedClass(cd,baseClassName);
found=baseClass!=0 && baseClass!=cd;
}
......@@ -2818,7 +2797,7 @@ static bool findClassRelation(
for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli)
{
QCString fName = nd->name()+"::"+baseClassName;
found = (baseClass=getResolvedClass(fName))!=0 && baseClass!=cd &&
found = (baseClass=getResolvedClass(cd,fName))!=0 && baseClass!=cd &&
root->name!=fName;
}
}
......@@ -2844,7 +2823,7 @@ static bool findClassRelation(
{
NamespaceList *nl = nd->getUsedNamespaces();
QCString fName = nd->name()+"::"+baseClassName;
found = (baseClass=getResolvedClass(fName))!=0 && root->name!=fName;
found = (baseClass=getResolvedClass(cd,fName))!=0 && root->name!=fName;
if (nl) // try to prepend any of the using namespace scopes.
{
NamespaceListIterator nli(*nl);
......@@ -2852,7 +2831,7 @@ static bool findClassRelation(
for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli)
{
fName = nd->name()+"::"+baseClassName;
found = (baseClass=getResolvedClass(fName))!=0 && baseClass!=cd &&
found = (baseClass=getResolvedClass(cd,fName))!=0 && baseClass!=cd &&
root->name!=fName;
}
}
......@@ -3849,13 +3828,13 @@ static void findMember(Entry *root,
if (!funcDecl.isEmpty() && funcDecl[0]!=' ') funcDecl.prepend(" ");
// remove some superfluous spaces
funcDecl=substitute(
substitute(
substitute(funcDecl,"~ ","~"),
":: ","::"
),
" ::","::"
);
funcDecl= substitute(
substitute(
substitute(funcDecl,"~ ","~"),
":: ","::"
),
" ::","::"
);
// extract information from the declarations
parseFuncDecl(funcDecl,scopeName,classTempList,funcType,funcName,
......@@ -7005,7 +6984,7 @@ void parseInput()
msg("Building class list...\n");
buildClassList(root);
findUsingDeclarations(root);
msg("Building example list...\n");
buildExampleList(root);
......
......@@ -49,6 +49,7 @@ class StringDict : public QDict<QCString>
virtual ~StringDict() {}
};
extern QCString spaces;
/*! \brief This class serves as a namespace for global variables used by doxygen.
......@@ -78,7 +79,7 @@ class Doxygen
static QTextStream tagFile;
static SectionDict sectionDict;
static FileNameList inputNameList;
static StringDict typedefDict;
//static TypedefDict typedefDict;
static StringDict namespaceAliasDict;
static GroupList groupList;
static GroupDict groupDict;
......
......@@ -289,17 +289,10 @@ class Entry
const char *groupdoccmd() const
{
switch( this->groupdoctype ) {
case GROUPDOC_NORMAL:
return "\\defgroup";
break;
case GROUPDOC_ADD:
return "\\addgroup";
break;
case GROUPDOC_WEAK:
return "\\weakgroup";
break;
default:
return "unknown group command";
case GROUPDOC_NORMAL: return "\\defgroup"; break;
case GROUPDOC_ADD: return "\\addgroup"; break;
case GROUPDOC_WEAK: return "\\weakgroup"; break;
default: return "unknown group command";
}
}
Grouping::GroupPri_t groupingpri() const
......@@ -308,17 +301,10 @@ class Entry
return Grouping::GROUPING_LOWEST;
}
switch( this->groupdoctype ) {
case GROUPDOC_NORMAL:
return Grouping::GROUPING_AUTO_DEF;
break;
case GROUPDOC_ADD:
return Grouping::GROUPING_AUTO_ADD;
break;
case GROUPDOC_WEAK:
return Grouping::GROUPING_AUTO_WEAK;
break;
default:
return Grouping::GROUPING_LOWEST;
case GROUPDOC_NORMAL: return Grouping::GROUPING_AUTO_DEF; break;
case GROUPDOC_ADD: return Grouping::GROUPING_AUTO_ADD; break;
case GROUPDOC_WEAK: return Grouping::GROUPING_AUTO_WEAK; break;
default: return Grouping::GROUPING_LOWEST;
}
}
private:
......
......@@ -48,7 +48,8 @@ static const char *defaultStyleSheet =
"DL.el { margin-left: -1cm }\n"
"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
"DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n"
"TD.md { background-color: #f2f2ff }\n"
"TD.md { background-color: #f2f2ff; font-weight: bold; }\n"
"TD.mdname { background-color: #f2f2ff; font-weight: bold; font-style: italic }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"FONT.keyword { color: #008000 }\n"
......@@ -160,6 +161,7 @@ void HtmlGenerator::writeFooterFile(QFile &file)
void HtmlGenerator::startFile(const char *name,const char *,
const char *title,bool external)
{
//printf("HtmlGenerator::startFile(%s)\n",name);
QCString fileName=name;
lastTitle=title;
if (fileName.right(5)!=".html") fileName+=".html";
......@@ -870,13 +872,13 @@ void HtmlGenerator::startMemberDocPrefixItem()
{
DBG_HTML(t << "<!-- startMemberDocPrefixItem -->" << endl;)
t << " <tr>" << endl;
t << " <td colspan=\"2\"><b>" << endl;
t << " <td class=\"md\" colspan=\"4\">" << endl;
}
void HtmlGenerator::endMemberDocPrefixItem()
{
DBG_HTML(t << "<!-- endMemberDocPrefixItem -->" << endl;)
t << " </b></td>" << endl;
t << " </td>" << endl;
t << " </tr>" << endl;
}
......@@ -884,51 +886,86 @@ void HtmlGenerator::startMemberDocName()
{
DBG_HTML(t << "<!-- startMemberDocName -->" << endl;)
t << " <tr>" << endl;
t << " <td nowrap valign=\"top\"><b> " << endl;
t << " <td class=\"md\" nowrap valign=\"top\"> " << endl;
}
void HtmlGenerator::endMemberDocName()
{
DBG_HTML(t << "<!-- endMemberDocName -->" << endl;)
t << endl;
t << " </b></td>" << endl;
t << " </td>" << endl;
}
void HtmlGenerator::startParameter(bool first)
void HtmlGenerator::startParameterList()
{
DBG_HTML(t << "<!-- startParameterList -->" << endl;)
t << " <td class=\"md\">(&nbsp</td>" << endl;
}
void HtmlGenerator::startParameterType(bool first)
{
if (first)
{
DBG_HTML(t << "<!-- startFirstParameter -->" << endl;)
t << " <td valign=\"bottom\"><b>" << endl;
DBG_HTML(t << "<!-- startFirstParameterType -->" << endl;)
t << " <td class=\"md\">";
}
else
{
DBG_HTML(t << "<!-- startParameter -->" << endl;)
DBG_HTML(t << "<!-- startParameterType -->" << endl;)
t << " <tr>" << endl;
t << " <td></td>" << endl;
t << " <td><b>" << endl;
t << " <td></td>" << endl;
t << " <td class=\"md\">";
}
}
void HtmlGenerator::endParameter(bool first)
void HtmlGenerator::endParameterType()
{
if (first)
DBG_HTML(t << "<!-- endParameterType -->" << endl;)
t << " </td>" << endl;
}
void HtmlGenerator::startParameterName()
{
DBG_HTML(t << "<!-- startParameterName -->" << endl;)
t << " <td class=\"mdname\">";
}
void HtmlGenerator::endParameterName(bool last,bool emptyList)
{
DBG_HTML(t << "<!-- endParameterName -->" << endl;)
if (last)
{
DBG_HTML(t << "<!-- endFirstParameter -->" << endl;)
t << endl;
t << " </b></td>" << endl;
//t << " <td width=\"300\"><img src=\"null.gif\"></td>" << endl;
t << " </tr>" << endl;
if (emptyList)
{
t << " </td>" << endl;
t << " <td class=\"md\">)&nbsp;</td>" << endl;
t << " <td class=\"md\">";
}
else
{
t << " </td>" << endl;
t << " </tr>" << endl;
t << " <tr>" << endl;
t << " <td></td>" << endl;
t << " <td class=\"md\">)&nbsp</td>" << endl;
t << " <td class=\"md\" colspan=\"2\">";
}
}
else
{
DBG_HTML(t << "<!-- endParameter -->" << endl;)
t << endl;
t << " </b></td>" << endl;
t << " </td>" << endl;
t << " </tr>" << endl;
}
}
void HtmlGenerator::endParameterList()
{
DBG_HTML(t << "<!-- endParameterList -->" << endl;)
t << " </td>" << endl;
t << " </tr>" << endl;
}
void HtmlGenerator::endMemberDoc()
{
DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
......
......@@ -232,8 +232,12 @@ class HtmlGenerator : public OutputGenerator
void endMemberDocPrefixItem();
void startMemberDocName();
void endMemberDocName();
void startParameter(bool first);
void endParameter(bool last);
void startParameterType(bool first);
void endParameterType();
void startParameterName();
void endParameterName(bool last,bool emptyList);
void startParameterList();
void endParameterList();
void startFontClass(const char *s) { t << "<font class=\"" << s << "\">"; }
void endFontClass() { t << "</font>"; }
......
......@@ -231,7 +231,7 @@ HtmlHelp *HtmlHelp::theInstance = 0;
* The object has to be \link initialize() initialized\endlink before it can
* be used.
*/
HtmlHelp::HtmlHelp()
HtmlHelp::HtmlHelp() : indexFileDict(1009)
{
/* initial depth */
dc = 0;
......@@ -330,7 +330,7 @@ void HtmlHelp::createProjectFile()
while (s)
{
t << s << endl;
s=indexFiles.next();
s = indexFiles.next();
}
f.close();
}
......@@ -342,7 +342,11 @@ void HtmlHelp::createProjectFile()
void HtmlHelp::addIndexFile(const char *s)
{
indexFiles.append(s);
if (indexFileDict.find(s)==0)
{
indexFiles.append(s);
indexFileDict.insert(s,(void *)0x8);
}
}
/*! Finalizes the HTML help. This will finish and close the
......
......@@ -87,6 +87,7 @@ class HtmlHelp
HtmlHelpIndex *index;
int dc;
QStrList indexFiles;
QDict<void> indexFileDict;
static HtmlHelp *theInstance;
};
......
......@@ -871,6 +871,8 @@ void writeFileIndex(OutputList &ol)
{
path=stripFromPath(fd->getPath().copy());
}
QCString fullName=fd->name();
if (!path.isEmpty()) fullName.prepend(path+"/");
// --------------- LaTeX/RTF only -------------------------
if (doc)
......@@ -907,11 +909,11 @@ void writeFileIndex(OutputList &ol)
ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name());
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(FALSE,fd->name(),fd->getOutputFileBase());
htmlHelp->addContentsItem(FALSE,fullName,fd->getOutputFileBase());
}
if (hasFtvHelp)
{
ftvHelp->addContentsItem(FALSE,fd->getReference(),fd->getOutputFileBase(),0,fd->name());
ftvHelp->addContentsItem(FALSE,fd->getReference(),fd->getOutputFileBase(),0,fullName);
}
}
else
......
......@@ -606,9 +606,13 @@ void LatexGenerator::endIndexSection(IndexSections is)
}
break;
case isMainPage:
t << "}\n\\label{index}";
if (Config_getBool("PDF_HYPERLINKS")) t << "\\hypertarget{index}{}";
t << "\\input{index}\n";
{
QCString indexName="index";
if (Config_getBool("GENERATE_TREEVIEW")) indexName="main";
t << "}\n\\label{index}";
if (Config_getBool("PDF_HYPERLINKS")) t << "\\hypertarget{index}{}";
t << "\\input{" << indexName << "}\n";
}
break;
case isPackageIndex:
t << "}\n\\input{packages}\n";
......
......@@ -239,8 +239,12 @@ class LatexGenerator : public OutputGenerator
void endMemberDocPrefixItem() {}
void startMemberDocName() {}
void endMemberDocName() {}
void startParameter(bool) {}
void endParameter(bool) {}
void startParameterType(bool) {}
void endParameterType() {}
void startParameterName() {}
void endParameterName(bool,bool) {}
void startParameterList() {}
void endParameterList() {}
void startFontClass(const char *) {}
void endFontClass() {}
......
......@@ -220,8 +220,12 @@ class ManGenerator : public OutputGenerator
void endMemberDocPrefixItem() {}
void startMemberDocName() {}
void endMemberDocName() {}
void startParameter(bool) {}
void endParameter(bool) {}
void startParameterType(bool) {}
void endParameterType() {}
void startParameterName() {}
void endParameterName(bool,bool) {}
void startParameterList() {}
void endParameterList() {}
void startFontClass(const char *) {}
void endFontClass() {}
......
......@@ -75,8 +75,18 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
ArgumentList *argList=md->argumentList();
if (argList==0) return; // member has no function like argument list
if (!md->isDefine()) ol.docify(" ");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.endMemberDocName();
ol.startParameterList();
ol.enableAll();
ol.disable(OutputGenerator::Html);
ol.docify("("); // start argument list
ol.endMemberDocName();
ol.popGeneratorState();
//printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine());
Argument *a=argList->first();
QCString cName;
//if (md->scopeDefTemplateArguments())
......@@ -106,10 +116,10 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
//printf("~~~ %s cName=%s\n",md->name().data(),cName.data());
//if (!md->isDefine()) ol.startParameter(TRUE); else ol.docify(" ");
ol.startParameter(TRUE);
bool first=TRUE;
while (a)
{
if (!md->isDefine() || first) ol.startParameterType(first);
QRegExp re(")(");
int vp;
if (!a->attrib.isEmpty()) // argument has an IDL attribute
......@@ -128,6 +138,11 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),scopeName,md->name(),n);
}
if (!md->isDefine())
{
ol.endParameterType();
ol.startParameterName();
}
if (!a->name.isEmpty()) // argument has a name
{
ol.docify(" ");
......@@ -146,7 +161,8 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
if (vp!=-1) // write the part of the argument type
// that comes after the name
{
linkifyText(TextGeneratorOLImpl(ol),scopeName,md->name(),a->type.right(a->type.length()-vp));
linkifyText(TextGeneratorOLImpl(ol),scopeName,
md->name(),a->type.right(a->type.length()-vp));
}
if (!a->defval.isEmpty()) // write the default value
{
......@@ -161,17 +177,30 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
ol.docify(", "); // there are more arguments
if (!md->isDefine())
{
ol.endParameter(first);
ol.startParameter(FALSE);
ol.endParameterName(FALSE,FALSE);
ol.startParameterType(FALSE);
}
}
first=FALSE;
}
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
//if (!first) ol.writeString("&nbsp;");
ol.docify(")"); // end argument list
ol.enableAll();
ol.disableAllBut(OutputGenerator::Html);
if (!first) ol.writeString("&nbsp;");
if (!md->isDefine())
{
if (first) ol.startParameterName();
ol.endParameterName(TRUE,argList->count()<2);
}
else
{
ol.endParameterType();
ol.startParameterName();
ol.endParameterName(TRUE,TRUE);
}
ol.popGeneratorState();
ol.docify(")"); // end argument list
if (argList->constSpecifier)
{
ol.docify(" const");
......@@ -250,6 +279,12 @@ MemberDef::MemberDef(const char *df,int dl,
m_defTmpArgLists=0;
initLines=0;
type=t;
if (mt==Typedef && type.left(8)=="typedef ") type=type.mid(8);
if (type.left(7)=="struct ") type=type.right(type.length()-7);
if (type.left(6)=="class " ) type=type.right(type.length()-6);
if (type.left(6)=="union " ) type=type.right(type.length()-6);
type=removeRedundantWhiteSpace(type);
args=a;
args=removeRedundantWhiteSpace(args);
if (type.isEmpty()) decl=name()+args; else decl=type+" "+name()+args;
......@@ -635,6 +670,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
}
QCString ltype(type);
if (mtype==Typedef) ltype.prepend("typedef ");
// strip `static' keyword from ltype
if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7);
// strip `friend' keyword from ltype
......@@ -1092,7 +1128,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.docify("]");
ol.endTypewriter();
}
if (!isDefine()) ol.endParameter(TRUE);
if (!isDefine() && argList) ol.endParameterList();
ol.endMemberDoc();
ol.endDoxyAnchor(cfname,anchor());
ol.startIndent();
......@@ -1108,6 +1144,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
)
)
{
//printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
ol.startBold();
if (mtype==Define)
parseText(ol,theTranslator->trDefineValue());
......@@ -1439,7 +1476,8 @@ bool MemberDef::isLinkableInProject() const
((hasDocumentation() && !isReference())
) &&
(prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && // not a private class member
(classDef!=0 || Config_getBool("EXTRACT_STATIC") || !isStatic()); // not a static file/namespace member
(classDef!=0 || Config_getBool("EXTRACT_STATIC") ||
!isStatic()); // not a static file/namespace member
}
bool MemberDef::isLinkable() const
......
......@@ -357,8 +357,12 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberDocPrefixItem() = 0;
virtual void startMemberDocName() = 0;
virtual void endMemberDocName() = 0;
virtual void startParameter(bool) = 0;
virtual void endParameter(bool) = 0;
virtual void startParameterType(bool) = 0;
virtual void endParameterType() = 0;
virtual void startParameterName() = 0;
virtual void endParameterName(bool,bool) = 0;
virtual void startParameterList() = 0;
virtual void endParameterList() = 0;
protected:
QTextStream fs;
......
......@@ -399,10 +399,18 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDocName); }
void endMemberDocName()
{ forall(&OutputGenerator::endMemberDocName); }
void startParameter(bool first)
{ forall(&OutputGenerator::startParameter,first); }
void endParameter(bool last)
{ forall(&OutputGenerator::endParameter,last); }
void startParameterType(bool first)
{ forall(&OutputGenerator::startParameterType,first); }
void endParameterType()
{ forall(&OutputGenerator::endParameterType); }
void startParameterName()
{ forall(&OutputGenerator::startParameterName); }
void endParameterName(bool last,bool emptyList)
{ forall(&OutputGenerator::endParameterName,last,emptyList); }
void startParameterList()
{ forall(&OutputGenerator::startParameterList); }
void endParameterList()
{ forall(&OutputGenerator::endParameterList); }
void startFontClass(const char *c)
{ forall(&OutputGenerator::startFontClass,c); }
......
......@@ -859,7 +859,7 @@ void addDefine()
while ((c=*p++) && (c==' ' || c=='\t')) k++;
g_defLitText=g_defLitText.mid(l+1,k-l-1)+g_defLitText.stripWhiteSpace();
}
md->setInitializer(g_defLitText);
md->setInitializer(g_defLitText.stripWhiteSpace());
//md->setDefFile(g_yyFileName);
//md->setDefLine(g_yyLineNr);
......
......@@ -223,8 +223,12 @@ class RTFGenerator : public OutputGenerator
void endMemberDocPrefixItem() {}
void startMemberDocName() {}
void endMemberDocName() {}
void startParameter(bool) {}
void endParameter(bool) {}
void startParameterType(bool) {}
void endParameterType() {}
void startParameterName() {}
void endParameterName(bool,bool) {}
void startParameterList() {}
void endParameterList() {}
void startFontClass(const char *) {}
void endFontClass() {}
......
......@@ -329,6 +329,7 @@ static void checkDocs()
}
}
#if 0
static QCString extractName(const QCString &s)
{
//static const QRegExp id("[a-z_A-Z][a-z_A-Z0-9]*");
......@@ -354,6 +355,7 @@ static QCString extractName(const QCString &s)
) l--;
return removeRedundantWhiteSpace(result.left(l+1));
}
#endif
static void setContext()
{
......@@ -1459,16 +1461,18 @@ TITLE [tT][iI][tT][lL][eE]
current->type=current->type.simplifyWhiteSpace();
current->args=current->args.simplifyWhiteSpace();
current->name=current->name.stripWhiteSpace();
if (!current->name.isEmpty() && current->type.left(8)=="typedef ")
{
// add typedef to dictionary
QCString dest = extractName(current->type.right(current->type.length()-8));
if (Doxygen::typedefDict[current->name]==0 && !dest.isEmpty())
{
//printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data());
Doxygen::typedefDict.insert(current->name, new QCString(dest));
}
}
//if (!current->name.isEmpty() && current->type.left(8)=="typedef ")
//{
// // add typedef to dictionary
// QCString dest = extractName(current->type.right(current->type.length()-8));
// if (Doxygen::typedefDict[current->name]==0 && !dest.isEmpty())
// {
// //printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data());
// QCString scope;
// if (current_root->section & Entry::SCOPE_MASK) scope=current_root->name;
// Doxygen::typedefDict.insert(current->name, new TypedefInfo(dest,scope));
// }
//}
current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
......@@ -1714,16 +1718,18 @@ TITLE [tT][iI][tT][lL][eE]
//if (!current->name.isEmpty() && current->name[0]!='@' &&
// current->parent->section & Entry::COMPOUND_MASK)
// varEntry->type+=current->parent->name+"::";
if (isTypedef)
{
varEntry->type.prepend("typedef ");
//printf("current->name = %s %s\n",current->name.data(),msName.data());
if (!current->name.isEmpty() && current->name.at(0)!='@')
{
//printf("2>>>>>>>>>> adding %s->%s\n",msName.data(),current->name.data());
Doxygen::typedefDict.insert(msName,new QCString(current->name));
}
}
//if (isTypedef)
//{
// varEntry->type.prepend("typedef ");
// //printf("current->name = %s %s\n",current->name.data(),msName.data());
// if (!current->name.isEmpty() && current->name.at(0)!='@')
// {
// //printf("2>>>>>>>>>> adding %s->%s\n",msName.data(),current->name.data());
// QCString scope;
// if (current_root->section & Entry::SCOPE_MASK) scope=current_root->name;
// Doxygen::typedefDict.insert(msName,new TypedefInfo(current->name,scope));
// }
//}
varEntry->type+=current->name+msType;
varEntry->fileName = yyFileName;
varEntry->startLine = yyLineNr;
......@@ -2397,15 +2403,17 @@ TITLE [tT][iI][tT][lL][eE]
}
else
{
if (isTypedef)
{
//QCString dest = extractName(current->name);
//printf("3>>>>>>>>>> adding %s->%s\n",yytext,current->name.data());
Doxygen::typedefDict.insert(yytext,new QCString(current->name));
//current->extends->append(
// new BaseInfo(yytext,Public,Normal)
// );
}
//if (isTypedef)
//{
// //QCString dest = extractName(current->name);
// //printf("3>>>>>>>>>> adding %s->%s\n",yytext,current->name.data());
// QCString scope;
// if (current_root->section & Entry::SCOPE_MASK) scope=current_root->name;
// Doxygen::typedefDict.insert(yytext,new TypedefInfo(current->name,scope));
// //current->extends->append(
// // new BaseInfo(yytext,Public,Normal)
// // );
//}
current->type += ' ' ;
current->type += current->name ;
current->name = yytext ;
......
This diff is collapsed.
......@@ -12,9 +12,8 @@
*
* Brazilian Portuguese version by
* Fabio "FJTC" Jun Takada Chino <chino@grad.icmc.sc.usp.br>
* Version: 1.2.6.1 (2001/04/13)
* Version: 1.2.8.2 (2001/07/24)
*/
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H
......@@ -33,8 +32,9 @@ class TranslatorBrazilian: public Translator
*/
virtual QCString idLanguage()
{
/* I'm not sure if it is correct. I did not found the documentation
of BabelPackage. If you know the right string, please contact me. */
return "portuges";
/* I'm not sure if it is correct. I did not found the documentation of BabelPackage*/
}
/*! Used to get the command(s) for the language support. This method
......@@ -47,10 +47,6 @@ class TranslatorBrazilian: public Translator
return "Brazilian";
}
/*! returns the name of the package that is included by LaTeX */
virtual QCString latexBabelPackage()
{ return ""; }
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{
......@@ -138,12 +134,6 @@ class TranslatorBrazilian: public Translator
virtual QCString trDefinedIn()
{ return "definida em"; }
/*! put as in introduction in the verbatim header file of a class.
* parameter f is the name of the include file.
*/
virtual QCString trVerbatimText(const char *f)
{ return (QCString)"Este é o texto original do arquivo "+f+"."; }
// quick reference sections
/*! This is put above each page as a link to the list of all groups of
......@@ -417,10 +407,6 @@ class TranslatorBrazilian: public Translator
virtual QCString trEnumerationValues()
{ return "Valores Enumerados"; }
/*! This is used in man pages as the author section. */
virtual QCString trAuthor()
{ return "Autor"; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
......@@ -478,12 +464,6 @@ class TranslatorBrazilian: public Translator
}
}
/*! This is used in the documentation of a group before the list of
* links to documented files
*/
virtual QCString trFiles()
{ return "Arquivos"; }
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
......@@ -531,10 +511,6 @@ class TranslatorBrazilian: public Translator
virtual QCString trDate()
{ return "Data"; }
/*! this text is generated when the \\author command is used. */
virtual QCString trAuthors()
{ return "Autor(es)"; }
/*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
{ return "Retorna"; }
......@@ -1322,6 +1298,5 @@ and
if (!singular) result+="es";
return result;
}
};
#endif
......@@ -49,6 +49,9 @@
// - Update for "new since 1.2.7-20010524" version:
// removed trAuthors(), trAuthor(), added trAuthor(bool, bool)
//
// 2001/07/24 Jens Seidel (jensseidel@users.sourceforge.net)
// - trClassDocumentation() updated as in the English translator.
//
// Todo:
// - translation of all Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
// strings (see translator_en.h)
......@@ -334,7 +337,12 @@ class TranslatorGerman : public Translator
* the documentation of all classes, structs and unions.
*/
virtual QCString trClassDocumentation()
{ return "Klassen-Dokumentation"; }
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
return "Datenstruktur-Dokumentation";
else
return "Klassen-Dokumentation";
}
/* This is used in LaTeX as the title of the chapter containing
* the documentation of all files.
......@@ -990,7 +998,8 @@ class TranslatorGerman : public Translator
return "Erklärung des Graphen";
}
/* page explaining how the dot graph's should be interpreted */
/* page explaining how the dot graph's should be interpreted
The %A in the text below are to prevent link to classes called "A". */
virtual QCString trLegendDocs()
{
return
......
......@@ -1092,6 +1092,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_2_7
/*! Used as ansicpg for RTF file
*
* The following table shows the correlation of Charset name, Charset Value and
* <pre>
* Codepage number:
* Charset Name Charset Value(hex) Codepage number
* ------------------------------------------------------
......@@ -1110,6 +1111,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_2_7
* HANGEUL_CHARSET 129 (x81) 949
* GB2313_CHARSET 134 (x86) 936
* CHINESEBIG5_CHARSET 136 (x88) 950
* </pre>
*
*/
virtual QCString trRTFansicp()
......
......@@ -16,7 +16,7 @@
* The translation into French was provided by
* Christophe Bordeux (bordeux@lig.di.epfl.ch)
* and after version 1.2.0 by Xavier Outhier (xouthier@yahoo.fr)
* member of of the non for profit association D2SET (http://www.d2set.org,
* member of the non for profit association D2SET (http://www.d2set.org,
* d2set@d2set.org).
*/
......
......@@ -34,7 +34,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_2_7
}
public:
// --- Language contol methods -------------------
// --- Language control methods -------------------
virtual QCString idLanguage()
{ return "slovak"; }
......
This diff is collapsed.
......@@ -41,6 +41,7 @@ class NamespaceList;
class ClassList;
class MemberGroupList;
class MemberGroupDict;
class Definition;
//--------------------------------------------------------------------
......@@ -104,7 +105,8 @@ extern QCString substituteClassNames(const QCString &s);
extern QCString substitute(const char *s,const char *src,const char *dst);
extern QCString resolveDefines(const char *n);
extern ClassDef *getClass(const char *key);
extern ClassDef *getResolvedClass(const char *key,
extern ClassDef *getResolvedClass(Definition *scope,
const char *key,
bool *pIsTypeDef=0,
QCString *pTemplSpec=0);
extern NamespaceDef *getResolvedNamespace(const char *key);
......@@ -157,6 +159,7 @@ ArgumentList *copyArgumentList(const ArgumentList *src);
QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists);
QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
bool parentOnly=TRUE);
QCString resolveTypeDef(Definition *d,const QCString &name);
#endif
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment