summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-02-09 19:18:25 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-02-09 19:18:25 (GMT)
commitaacd1557af129e2bff3514169e04168376a2431b (patch)
tree95ba82f21de02e4db4763daea53134c8e56fb1df
parentdcd4714c4413348d02eb7224dafee5d06be43dfb (diff)
downloadDoxygen-aacd1557af129e2bff3514169e04168376a2431b.zip
Doxygen-aacd1557af129e2bff3514169e04168376a2431b.tar.gz
Doxygen-aacd1557af129e2bff3514169e04168376a2431b.tar.bz2
Release-1.8.3.1-20130209
-rw-r--r--INSTALL4
-rw-r--r--README4
-rw-r--r--addon/doxmlparser/include/doxmlintf.h2
-rw-r--r--addon/doxmlparser/src/basehandler.h2
-rw-r--r--addon/doxmlparser/src/baseiterator.h2
-rw-r--r--addon/doxmlparser/src/compoundhandler.cpp2
-rw-r--r--addon/doxmlparser/src/compoundhandler.h2
-rw-r--r--addon/doxmlparser/src/dochandler.cpp2
-rw-r--r--addon/doxmlparser/src/dochandler.h2
-rw-r--r--addon/doxmlparser/src/graphhandler.h2
-rw-r--r--addon/doxmlparser/src/linkedtexthandler.cpp2
-rw-r--r--addon/doxmlparser/src/linkedtexthandler.h2
-rw-r--r--addon/doxmlparser/src/loamhandler.h2
-rw-r--r--addon/doxmlparser/src/mainhandler.cpp2
-rw-r--r--addon/doxmlparser/src/mainhandler.h2
-rw-r--r--addon/doxmlparser/src/memberhandler.cpp2
-rw-r--r--addon/doxmlparser/src/memberhandler.h2
-rw-r--r--addon/doxmlparser/src/paramhandler.cpp2
-rw-r--r--addon/doxmlparser/src/paramhandler.h2
-rw-r--r--addon/doxmlparser/src/sectionhandler.cpp2
-rw-r--r--addon/doxmlparser/src/sectionhandler.h2
-rw-r--r--addon/doxyapp/Makefile.in4
-rw-r--r--addon/doxysearch/Makefile.in8
-rw-r--r--addon/doxysearch/doxyindexer.pro.in2
-rwxr-xr-xconfigure66
-rw-r--r--doc/commands.doc18
-rw-r--r--doc/config.doc54
-rw-r--r--doc/language.doc2
-rw-r--r--doc/maintainers.txt3
-rw-r--r--libmd5/Makefile.in4
-rw-r--r--qtools/Doxyfile16
-rw-r--r--qtools/Makefile.in4
-rw-r--r--qtools/qdatetime.cpp4
-rw-r--r--src/Makefile.in12
-rw-r--r--src/classdef.cpp11
-rw-r--r--src/classdef.h6
-rw-r--r--src/cmdmapper.cpp2
-rw-r--r--src/cmdmapper.h4
-rw-r--r--src/code.l101
-rw-r--r--src/commentcnv.l4
-rw-r--r--src/commentscan.l9
-rw-r--r--src/compound.xsd1
-rw-r--r--src/compound_xsd.h1
-rw-r--r--src/config.xml51
-rw-r--r--src/configoptions.cpp54
-rw-r--r--src/define.cpp2
-rw-r--r--src/define.h1
-rw-r--r--src/definition.cpp57
-rw-r--r--src/definition.h10
-rw-r--r--src/dirdef.cpp2
-rw-r--r--src/docbookgen.cpp1906
-rw-r--r--src/docbookgen.h20
-rw-r--r--src/docbookvisitor.cpp1397
-rw-r--r--src/docbookvisitor.h161
-rw-r--r--src/docparser.cpp12
-rw-r--r--src/docparser.h2
-rw-r--r--src/docsets.cpp5
-rw-r--r--src/doctokenizer.h1
-rw-r--r--src/doctokenizer.l15
-rw-r--r--src/docvisitor.h1
-rw-r--r--src/dot.cpp112
-rw-r--r--src/dot.h4
-rw-r--r--src/doxygen.cpp465
-rw-r--r--src/doxygen.css4
-rw-r--r--src/doxygen.pro.in4
-rw-r--r--src/doxygen_css.h4
-rw-r--r--src/entry.cpp2
-rw-r--r--src/entry.h1
-rw-r--r--src/filedef.cpp2
-rw-r--r--src/fortrancode.l26
-rw-r--r--src/fortranscanner.l30
-rw-r--r--src/groupdef.cpp2
-rw-r--r--src/htmldocvisitor.cpp5
-rw-r--r--src/htmlhelp.cpp2
-rw-r--r--src/language.cpp9
-rw-r--r--src/latexdocvisitor.cpp3
-rw-r--r--src/libdoxygen.pro.in10
-rw-r--r--src/mandocvisitor.cpp3
-rw-r--r--src/markdown.cpp19
-rw-r--r--src/memberdef.cpp23
-rw-r--r--src/memberdef.h4
-rw-r--r--src/namespacedef.cpp4
-rw-r--r--src/namespacedef.h2
-rw-r--r--src/pagedef.cpp11
-rw-r--r--src/perlmodgen.cpp15
-rw-r--r--src/pre.l55
-rw-r--r--src/printdocvisitor.h2
-rw-r--r--src/pycode.l37
-rw-r--r--src/pyscanner.l24
-rw-r--r--src/rtfdocvisitor.cpp3
-rw-r--r--src/scanner.l85
-rw-r--r--src/settings.h4
-rw-r--r--src/sqlite3gen.cpp1361
-rw-r--r--src/sqlite3gen.h23
-rw-r--r--src/tagreader.cpp4
-rw-r--r--src/tagreader.h2
-rw-r--r--src/tclscanner.l2
-rw-r--r--src/translator_lv.h2002
-rw-r--r--src/util.cpp7
-rw-r--r--src/vhdlcode.l4
-rw-r--r--src/vhdldocgen.cpp144
-rw-r--r--src/vhdldocgen.h7
-rw-r--r--src/vhdlparser.y45
-rw-r--r--src/vhdlscanner.l2
-rw-r--r--src/xmldocvisitor.cpp5
-rw-r--r--src/xmlgen.cpp103
-rw-r--r--winbuild/Doxygen.vcproj20
107 files changed, 8166 insertions, 620 deletions
diff --git a/INSTALL b/INSTALL
index 35cae58..5f397ae 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.8.3.1
+DOXYGEN Version 1.8.3.1-20130209
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (20 January 2013)
+Dimitri van Heesch (09 February 2013)
diff --git a/README b/README
index 365b7dd..f3fdb00 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.8.3.1
+DOXYGEN Version 1.8.3.1_20130209
Please read INSTALL for compilation instructions.
@@ -26,4 +26,4 @@ forum.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (20 January 2013)
+Dimitri van Heesch (dimitri@stack.nl) (09 February 2013)
diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h
index 2314021..f13971f 100644
--- a/addon/doxmlparser/include/doxmlintf.h
+++ b/addon/doxmlparser/include/doxmlintf.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2006 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h
index edb4580..32e4181 100644
--- a/addon/doxmlparser/src/basehandler.h
+++ b/addon/doxmlparser/src/basehandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/baseiterator.h b/addon/doxmlparser/src/baseiterator.h
index a1d6f87..9a59502 100644
--- a/addon/doxmlparser/src/baseiterator.h
+++ b/addon/doxmlparser/src/baseiterator.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp
index 71d50cb..3cd77b0 100644
--- a/addon/doxmlparser/src/compoundhandler.cpp
+++ b/addon/doxmlparser/src/compoundhandler.cpp
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h
index dea7d42..635cff3 100644
--- a/addon/doxmlparser/src/compoundhandler.h
+++ b/addon/doxmlparser/src/compoundhandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp
index 535889f..992b185 100644
--- a/addon/doxmlparser/src/dochandler.cpp
+++ b/addon/doxmlparser/src/dochandler.cpp
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h
index 829d977..172bcd2 100644
--- a/addon/doxmlparser/src/dochandler.h
+++ b/addon/doxmlparser/src/dochandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/graphhandler.h b/addon/doxmlparser/src/graphhandler.h
index acce157..d946fcf 100644
--- a/addon/doxmlparser/src/graphhandler.h
+++ b/addon/doxmlparser/src/graphhandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/linkedtexthandler.cpp b/addon/doxmlparser/src/linkedtexthandler.cpp
index a921b6c..d51d8e2 100644
--- a/addon/doxmlparser/src/linkedtexthandler.cpp
+++ b/addon/doxmlparser/src/linkedtexthandler.cpp
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/linkedtexthandler.h b/addon/doxmlparser/src/linkedtexthandler.h
index 83cc4d8..6c6a1c7 100644
--- a/addon/doxmlparser/src/linkedtexthandler.h
+++ b/addon/doxmlparser/src/linkedtexthandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/loamhandler.h b/addon/doxmlparser/src/loamhandler.h
index b7c6397..61f9e6b 100644
--- a/addon/doxmlparser/src/loamhandler.h
+++ b/addon/doxmlparser/src/loamhandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp
index 1124b3d..49cfef9 100644
--- a/addon/doxmlparser/src/mainhandler.cpp
+++ b/addon/doxmlparser/src/mainhandler.cpp
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/mainhandler.h b/addon/doxmlparser/src/mainhandler.h
index 7b9e7fc..5706e6e 100644
--- a/addon/doxmlparser/src/mainhandler.h
+++ b/addon/doxmlparser/src/mainhandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp
index 303e556..4d0a0cf 100644
--- a/addon/doxmlparser/src/memberhandler.cpp
+++ b/addon/doxmlparser/src/memberhandler.cpp
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h
index f80a4eb..66c9a14 100644
--- a/addon/doxmlparser/src/memberhandler.h
+++ b/addon/doxmlparser/src/memberhandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/paramhandler.cpp b/addon/doxmlparser/src/paramhandler.cpp
index 124fde0..4b57e50 100644
--- a/addon/doxmlparser/src/paramhandler.cpp
+++ b/addon/doxmlparser/src/paramhandler.cpp
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h
index 64b89a2..89ef541 100644
--- a/addon/doxmlparser/src/paramhandler.h
+++ b/addon/doxmlparser/src/paramhandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/sectionhandler.cpp b/addon/doxmlparser/src/sectionhandler.cpp
index 8b3d9f2..df89941 100644
--- a/addon/doxmlparser/src/sectionhandler.cpp
+++ b/addon/doxmlparser/src/sectionhandler.cpp
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxmlparser/src/sectionhandler.h b/addon/doxmlparser/src/sectionhandler.h
index 86aad3b..b43e878 100644
--- a/addon/doxmlparser/src/sectionhandler.h
+++ b/addon/doxmlparser/src/sectionhandler.h
@@ -3,7 +3,7 @@
* $Id$
*
*
- * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ * Copyright (C) 1997-2013 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
diff --git a/addon/doxyapp/Makefile.in b/addon/doxyapp/Makefile.in
index c5acd67..49ddb4d 100644
--- a/addon/doxyapp/Makefile.in
+++ b/addon/doxyapp/Makefile.in
@@ -6,12 +6,12 @@ distclean: clean
$(RM) -rf Makefile doxyapp.pro Makefile.doxyapp
tmake:
- $(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp
+ $(ENV) $(PERL) "$(TMAKE)" doxyapp.pro >Makefile.doxyapp
strip:
strip doxyapp
Makefile.doxyapp: doxyapp.pro
- $(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp
+ $(ENV) $(PERL) "$(TMAKE)" doxyapp.pro >Makefile.doxyapp
install:
diff --git a/addon/doxysearch/Makefile.in b/addon/doxysearch/Makefile.in
index 3159e22..7daafee 100644
--- a/addon/doxysearch/Makefile.in
+++ b/addon/doxysearch/Makefile.in
@@ -8,17 +8,17 @@ distclean: clean
$(RM) -rf Makefile doxyindexer.pro Makefile.doxyindexer
tmake:
- $(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch
- $(ENV) $(PERL) $(TMAKE) doxyindexer.pro >Makefile.doxyindexer
+ $(ENV) $(PERL) "$(TMAKE)" doxysearch.pro >Makefile.doxysearch
+ $(ENV) $(PERL) "$(TMAKE)" doxyindexer.pro >Makefile.doxyindexer
strip:
strip doxysearch
Makefile.doxysearch: doxysearch.pro
- $(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch
+ $(ENV) $(PERL) "$(TMAKE)" doxysearch.pro >Makefile.doxysearch
Makefile.doxyindexer: doxyindexer.pro
- $(ENV) $(PERL) $(TMAKE) doxyindexer.pro >Makefile.doxyindexer
+ $(ENV) $(PERL) "$(TMAKE)" doxyindexer.pro >Makefile.doxyindexer
install:
$(INSTTOOL) -d $(INSTALL)/bin
diff --git a/addon/doxysearch/doxyindexer.pro.in b/addon/doxysearch/doxyindexer.pro.in
index 7286df8..deeb8f8 100644
--- a/addon/doxysearch/doxyindexer.pro.in
+++ b/addon/doxysearch/doxyindexer.pro.in
@@ -2,7 +2,7 @@ TEMPLATE = app.t
CONFIG = console warn_on static release
HEADERS =
SOURCES = doxyindexer.cpp
-LIBS += -lxapian -lqtools -L../../lib
+LIBS += -L../../lib -lxapian -lqtools
DESTDIR =
OBJECTS_DIR = ../../objects
TARGET = ../../bin/doxyindexer
diff --git a/configure b/configure
index ff266ee..65c5f25 100755
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
#
# $Id$
#
-# Copyright (C) 1997-2012 by Dimitri van Heesch.
+# Copyright (C) 1997-2013 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
@@ -20,7 +20,7 @@ doxygen_version_minor=8
doxygen_version_revision=3.1
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
-doxygen_version_mmn=NO
+doxygen_version_mmn=20130209
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
@@ -40,6 +40,7 @@ f_flex=NO
f_bison=NO
f_search=NO
f_langs=nl,sv,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,mk,br,dk,sk,ua,gr,tw,sr,ca,lt,za,ar,fa,sc,vi,tr,eo,am
+f_sqlite3=NO
while test -n "$1"; do
case $1 in
@@ -97,6 +98,9 @@ while test -n "$1"; do
--with-doxysearch | -with-doxysearch)
f_search=YES
;;
+ --with-sqlite3 | -with-sqlite3)
+ f_sqlite3=YES
+ ;;
-h | -help | --help)
f_help=y
;;
@@ -114,7 +118,7 @@ if test "$f_help" = y; then
Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--flex name] [--bison name] [--make name]
[--dot name] [--platform target] [--prefix dir] [--docdir dir]
- [--install name] [--english-only] [--enable-langs list]
+ [--install name] [--english-only] [--enable-langs list] [--with-sqlite3]
[--with-doxywizard] [--with-doxysearch] [--with-doxyapp]
Options:
@@ -147,6 +151,7 @@ Options:
--english-only Include support for English only.
--enable-langs list Include support for output languages listed in list.
[default: $f_langs]
+ --with-sqlite3 Add support for sqlite3 output [experimental]
--with-doxywizard Build the GUI frontend for doxygen. This
requires Qt version 4.
--with-doxysearch Build external search tools (doxysearch and doxyindexer)
@@ -400,6 +405,41 @@ else
echo "using $f_dot"
fi
+# - check for sqlite3 ---------------------------------------------------------
+
+if test "$f_sqlite3" = YES; then
+ echo -n " Checking for sqlite3 ... "
+ sqlite3_hdr_dir="/usr/include /usr/local/include /opt/local/include"
+ sqlite3_lib_dir="/usr/lib /usr/local/lib /opt/local/lib"
+ sqlite3_lib_name="libsqlite3.so libsqlite3.dylib libsqlite3.a"
+ sqlite3_hdr=NO
+ sqlite3_lib=NO
+ sqlite3_link=
+ for j in $sqlite3_hdr_dir; do
+ if test -f "$j/sqlite3.h"; then
+ sqlite3_hdr="$j/sqlite3.h"
+ break
+ fi
+ done
+ for i in $sqlite3_lib_dir; do
+ if test "$sqlite3_lib" = NO; then
+ for j in $sqlite3_lib_name; do
+ if test -f "$i/$j"; then
+ sqlite3_lib="$i/$j"
+ sqlite3_link="-L $i -lsqlite3"
+ break
+ fi
+ done
+ fi
+ done
+ if test "$sqlite3_hdr" = NO -o "$sqlite3_lib" = NO; then
+ echo "not found!";
+ else
+ echo "using header $sqlite3_hdr and library $sqlite3_lib...";
+ fi
+fi
+
+
# - check for perl ------------------------------------------------------------
echo -n " Checking for perl... "
@@ -502,7 +542,7 @@ configPWD=`pwd`
cat > .makeconfig <<EOF
DOXYGEN = $configPWD
TMAKEPATH = $configPWD/tmake/lib/$f_platform
-ENV = env TMAKEPATH=\$(TMAKEPATH)
+ENV = env TMAKEPATH="\$(TMAKEPATH)"
TMAKE = $configPWD/tmake/bin/tmake
MAKE = $f_make
PERL = $f_perl
@@ -522,6 +562,7 @@ HAVE_DOT = $f_dot
EOF
fi
+
if test "$f_platform" = "m68k-atari-mint-g++"; then
cat >> .makeconfig <<EOF
TMAKE += -unix
@@ -698,7 +739,7 @@ EOF
#if test "$f_thread" = YES; then
# realopts="$realopts thread"
#fi
- cat $SRC .tmakeconfig | sed -e "s/\$extraopts/$realopts/g" >> $DST
+ cat $SRC .tmakeconfig | sed -e "s/\$extraopts/$realopts/g" -e "s;%%SQLITE3_LIBS%%;$sqlite3_link;g" >> $DST
echo " Created $DST from $SRC..."
done
@@ -707,7 +748,7 @@ done
if test -f "src/lang_cfg.h"; then
chmod u+w src/lang_cfg.h # make sure file can be overwritten
fi
-echo -n " Generating src/lang_cfg.h..."
+echo " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
@allowed=(split(/,/,"NL,SV,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,MK,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA,AR,FA,SC,VI,TR,EO,AM"));
@@ -720,4 +761,17 @@ echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; }
print "#define LANG_$elem\n";
};' > ./src/lang_cfg.h
+
+if test -f "src/config.h"; then
+ chmod u+w src/config.h
+fi
+echo " Generating src/settings.h..."
+echo "#ifndef SETTINGS_H" > src/settings.h
+echo "#define SETTINGS_H" >> src/settings.h
+if test "$f_sqlite3" != NO; then
+echo "#define USE_SQLITE3 1" >> src/settings.h
+else
+echo "#define USE_SQLITE3 0" >> src/settings.h
+fi
+echo "#endif" >> src/settings.h
echo
diff --git a/doc/commands.doc b/doc/commands.doc
index 87eec7a..2f30979 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -65,6 +65,7 @@ documentation:
\refitem cmddeprecated \\deprecated
\refitem cmddetails \\details
\refitem cmddir \\dir
+\refitem cmddocbookonly \\docbookonly
\refitem cmddontinclude \\dontinclude
\refitem cmddot \\dot
\refitem cmddotfile \\dotfile
@@ -74,6 +75,7 @@ documentation:
\refitem cmdem \\em
\refitem cmdendcode \\endcode
\refitem cmdendcond \\endcond
+\refitem cmdenddocbookonly \\enddocbookonly
\refitem cmdenddot \\enddot
\refitem cmdendhtmlonly \\endhtmlonly
\refitem cmdendif \\endif
@@ -2276,6 +2278,14 @@ Works in a similar way as \ref cmdcopydoc "\\copydoc" but will
only copy the detailed documentation, not the brief description.
<hr>
+\section cmddocbookonly \\docbookonly
+
+ \addindex \\docbookonly
+ Starts a block of text that will be verbatim included in the
+ generated docbook documentation only. The block ends with a
+ \ref cmdenddocbookonly "\\enddocbookonly" command.
+
+<hr>
\section cmddot \\dot
\addindex \\dot
@@ -2441,6 +2451,14 @@ class Receiver
\sa section \ref cmdcode "\\code"
<hr>
+\section cmdenddocbookonly \\enddocbookonly
+
+ \addindex \\enddocbookonly
+ Ends a block of text that was started with a \\docbookonly command.
+
+ \sa section \ref cmddocbookonly "\\docbookonly".
+
+<hr>
\section cmdenddot \\enddot
\addindex \\enddot
diff --git a/doc/config.doc b/doc/config.doc
index 01ffcb5..15912a7 100644
--- a/doc/config.doc
+++ b/doc/config.doc
@@ -82,6 +82,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_directory_graph DIRECTORY_GRAPH
\refitem cfg_disable_index DISABLE_INDEX
\refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC
+\refitem cfg_docbook_output DOCBOOK_OUTPUT
\refitem cfg_docset_bundle_id DOCSET_BUNDLE_ID
\refitem cfg_docset_feedname DOCSET_FEEDNAME
\refitem cfg_docset_publisher_id DOCSET_PUBLISHER_ID
@@ -114,6 +115,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_ext_links_in_window EXT_LINKS_IN_WINDOW
\refitem cfg_extension_mapping EXTENSION_MAPPING
\refitem cfg_external_groups EXTERNAL_GROUPS
+\refitem cfg_external_pages EXTERNAL_PAGES
\refitem cfg_external_search EXTERNAL_SEARCH
\refitem cfg_external_search_id EXTERNAL_SEARCH_ID
\refitem cfg_extra_packages EXTRA_PACKAGES
@@ -137,6 +139,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_generate_buglist GENERATE_BUGLIST
\refitem cfg_generate_chi GENERATE_CHI
\refitem cfg_generate_deprecatedlist GENERATE_DEPRECIATEDLIST
+\refitem cfg_generate_docbook GENERATE_DOCBOOK
\refitem cfg_generate_docset GENERATE_DOCSET
\refitem cfg_generate_eclipsehelp GENERATE_ECLIPSEHELP
\refitem cfg_generate_html GENERATE_HTML
@@ -187,6 +190,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_inline_grouped_classes INLINE_GROUPED_CLASSES
\refitem cfg_inline_info INLINE_INFO
\refitem cfg_inline_inherited_memb INLINE_INHERITED_MEMB
+\refitem cfg_inline_simple_structs INLINE_SIMPLE_STRUCTS
\refitem cfg_inline_sources INLINE_SOURCES
\refitem cfg_input INPUT
\refitem cfg_input_encoding INPUT_ENCODING
@@ -197,6 +201,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_latex_batchmode LATEX_BATCHMODE
\refitem cfg_latex_bib_style LATEX_BIB_STYLE
\refitem cfg_latex_cmd_name LATEX_CMD_NAME
+\refitem cfg_latex_extra_files LATEX_EXTRA_FILES
\refitem cfg_latex_footer LATEX_FOOTER
\refitem cfg_latex_header LATEX_HEADER
\refitem cfg_latex_hide_indices LATEX_HIDE_INDICES
@@ -369,8 +374,8 @@ followed by the descriptions of the tags grouped by category.
The default language is English, other supported languages are:
Afrikaans, Arabic, Brazilian, Catalan, Chinese, Croatian, Czech, Danish, Dutch,
Finnish, French, German, Greek, Hungarian, Italian, Japanese, Korean,
- Lithuanian, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian,
- Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+ Latvian, Lithuanian, Norwegian, Persian, Polish, Portuguese, Romanian, Russian,
+ Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
\anchor cfg_brief_member_desc
<dt>\c BRIEF_MEMBER_DESC <dd>
@@ -650,6 +655,16 @@ unions are shown inside the group in which they are included
or section (for LaTeX and RTF). Note that this feature does not work in
combination with \ref cfg_separate_member_pages "SEPARATE_MEMBER_PAGES".
+\anchor cfg_inline_simple_structs
+<dt>\c INLINE_SIMPLE_STRUCTS <dd>
+ \addindex INLINE_SIMPLE_STRUCTS
+When the \c INLINE_SIMPLE_STRUCTS tag is set to \c YES, structs, classes, and
+unions with only public data fields or simple typedef fields will be shown
+inline in the documentation of the scope in which they are defined (i.e. file,
+namespace, or group documentation), provided this scope is documented. If set
+to NO (the default), structs, classes, and unions are shown on a separate
+page (for HTML and Man pages) or section (for LaTeX and RTF).
+
\anchor cfg_typedef_hides_struct
<dt>\c TYPEDEF_HIDES_STRUCT <dd>
\addindex TYPEDEF_HIDES_STRUCT
@@ -2069,7 +2084,15 @@ EXTRA_PACKAGES = times
the generated latex document. The footer should contain everything after
the last chapter. If it is left blank doxygen will generate a
standard footer. Notice: only use this tag if you know what you are doing!
-
+
+\anchor cfg_latex_extra_files
+<dt>\c LATEX_EXTRA_FILES <dd>
+ \addindex LATEX_EXTRA_FILES
+ The \c LATEX_EXTRA_FILES tag can be used to specify one or more extra images
+ or other source files which should be copied to the LaTeX output directory.
+ Note that the files will be copied as-is; there are no commands or markers
+ available.
+
\anchor cfg_pdf_hyperlinks
<dt>\c PDF_HYPERLINKS <dd>
\addindex PDF_HYPERLINKS
@@ -2254,6 +2277,24 @@ EXTRA_PACKAGES = times
</dl>
+\section docbook_output Docbook related options
+\anchor cfg_generate_docbook
+<dl>
+
+<dt>\c GENERATE_DOCBOOK <dd>
+ \addindex GENERATE_DOCBOOK
+If the \c GENERATE_DOCBOOK tag is set to \c YES Doxygen will generate Docbook files
+that can be used to generate PDF.
+
+\anchor cfg_docbook_output
+<dt>\c DOCBOOK_OUTPUT <dd>
+ \addindex DOCBOOK_OUTPUT
+The \c DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+If a relative path is entered the value of \ref cfg_output_directory "OUTPUT_DIRECTORY" will be put in
+front of it. If left blank docbook will be used as the default path.
+
+</dl>
+
\section autogen_output AUTOGEN_DEF related options
\anchor cfg_generate_autogen_def
<dl>
@@ -2418,6 +2459,13 @@ EXTRA_PACKAGES = times
If the \c EXTERNAL_GROUPS tag is set to \c YES all external groups will be listed
in the modules index. If set to \c NO, only the current project's groups will
be listed.
+
+\anchor cfg_external_pages
+<dt>\c EXTERNAL_PAGES <dd>
+ \addindex EXTERNAL_PAGES
+ If the \c EXTERNAL_PAGES tag is set to \c YES all external pages will be listed
+ in the related pages index. If set to \c NO, only the current project's
+ pages will be listed.
\anchor cfg_perl_path
<dt>\c PERL_PATH <dd>
diff --git a/doc/language.doc b/doc/language.doc
index 2793d66..da5aaa6 100644
--- a/doc/language.doc
+++ b/doc/language.doc
@@ -28,7 +28,7 @@ are supported (sorted alphabetically):
Afrikaans, Arabic, Armenian, Brazilian Portuguese, Catalan, Chinese,
Chinese Traditional, Croatian, Czech, Danish, Dutch, English,
Esperanto, Finnish, French, German, Greek, Hungarian, Indonesian,
-Italian, Japanese (+En), Korean (+En), Lithuanian, Macedonian,
+Italian, Japanese (+En), Korean (+En), Latvian, Lithuanian, Macedonian,
Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian,
SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian,
and Vietnamese..
diff --git a/doc/maintainers.txt b/doc/maintainers.txt
index 1eade70..2f9651b 100644
--- a/doc/maintainers.txt
+++ b/doc/maintainers.txt
@@ -96,6 +96,9 @@ Kim Taedong: fly1004 at gmail dot com
SooYoung Jung: jung5000 at gmail dot com
Richard Kim: [unreachable] ryk at dspwiz dot com
+TranslatorLatvian
+Lauris: lauris at nix.lv
+
TranslatorLithuanian
Tomas Simonaitis: [unreachable] haden at homelan dot lt
Mindaugas Radzius: [unreachable] mindaugasradzius at takas dot lt
diff --git a/libmd5/Makefile.in b/libmd5/Makefile.in
index 5f71b11..1a6caab 100644
--- a/libmd5/Makefile.in
+++ b/libmd5/Makefile.in
@@ -8,9 +8,9 @@ distclean: clean
$(RM) -f Makefile.libmd5 libmd5.pro Makefile
tmake:
- $(ENV) $(PERL) $(TMAKE) libmd5.pro >Makefile.libmd5
+ $(ENV) $(PERL) "$(TMAKE)" libmd5.pro >Makefile.libmd5
Makefile.libmd5: libmd5.pro
- $(ENV) $(PERL) $(TMAKE) libmd5.pro >Makefile.libmd5
+ $(ENV) $(PERL) "$(TMAKE)" libmd5.pro >Makefile.libmd5
install:
diff --git a/qtools/Doxyfile b/qtools/Doxyfile
index 1ba80cc..fdf0741 100644
--- a/qtools/Doxyfile
+++ b/qtools/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.8.3
+# Doxyfile 1.8.3.1
#---------------------------------------------------------------------------
# Project related configuration options
@@ -87,7 +87,7 @@ CITE_BIB_FILES =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-QUIET = YES
+QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
@@ -186,8 +186,9 @@ MATHJAX_EXTENSIONS =
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO
-SEARCHENGINE_URL =
+SEARCHENGINE_URL =
SEARCHDATA_FILE = searchdata.xml
+EXTERNAL_SEARCH_ID =
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
@@ -201,6 +202,7 @@ PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
+LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
@@ -232,6 +234,11 @@ XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
+# configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+GENERATE_DOCBOOK = YES
+DOCBOOK_OUTPUT = docbook
+#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
@@ -261,6 +268,7 @@ TAGFILES =
GENERATE_TAGFILE = ../qtools_docs/qtools.tag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
+EXTERNAL_PAGES = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
@@ -268,7 +276,7 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
+HAVE_DOT = YES
DOT_NUM_THREADS = 0
DOT_FONTNAME =
DOT_FONTSIZE = 10
diff --git a/qtools/Makefile.in b/qtools/Makefile.in
index 78710fd..ca66cc1 100644
--- a/qtools/Makefile.in
+++ b/qtools/Makefile.in
@@ -17,10 +17,10 @@ all: Makefile.qtools Makefile
$(MAKE) -f Makefile.qtools $@
Makefile.qtools: qtools.pro
- $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools
+ $(ENV) $(PERL) "$(TMAKE)" qtools.pro >Makefile.qtools
tmake:
- $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools
+ $(ENV) $(PERL) "$(TMAKE)" qtools.pro >Makefile.qtools
clean: Makefile.qtools
$(MAKE) -f Makefile.qtools clean
diff --git a/qtools/qdatetime.cpp b/qtools/qdatetime.cpp
index 4edaca9..d0cc36e 100644
--- a/qtools/qdatetime.cpp
+++ b/qtools/qdatetime.cpp
@@ -52,7 +52,7 @@
#include <dos.h>
#elif defined(_OS_OS2_)
#include <os2.h>
-#elif defined(_OS_UNIX_)
+#elif defined(_OS_UNIX_) || defined(_OS_MAC_)
#include <sys/time.h>
#include <unistd.h>
#undef gettimeofday
@@ -893,7 +893,7 @@ bool QTime::currentTime( QTime *ct )
t.second*1000 + t.hsecond*10;
return (t.hour== 0 && t.minute == 0);
-#elif defined(_OS_UNIX_)
+#elif defined(_OS_UNIX_) || defined(_OS_MAC_)
struct timeval tv;
gettimeofday( &tv, 0 );
diff --git a/src/Makefile.in b/src/Makefile.in
index ae6c436..2e78088 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -20,18 +20,18 @@ all: Makefile.libdoxygen Makefile.libdoxycfg Makefile.doxygen Makefile
$(MAKE) -f Makefile.doxygen PERL=$(PERL) $@
Makefile.libdoxygen: libdoxygen.pro libdoxygen.t
- $(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen
+ $(ENV) $(PERL) "$(TMAKE)" libdoxygen.pro >Makefile.libdoxygen
Makefile.libdoxycfg: libdoxycfg.pro libdoxycfg.t
- $(ENV) $(PERL) $(TMAKE) libdoxycfg.pro >Makefile.libdoxycfg
+ $(ENV) $(PERL) "$(TMAKE)" libdoxycfg.pro >Makefile.libdoxycfg
Makefile.doxygen: doxygen.pro
- $(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen
+ $(ENV) $(PERL) "$(TMAKE)" doxygen.pro >Makefile.doxygen
tmake:
- $(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen
- $(ENV) $(PERL) $(TMAKE) libdoxycfg.pro >Makefile.libdoxycfg
- $(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen
+ $(ENV) $(PERL) "$(TMAKE)" libdoxygen.pro >Makefile.libdoxygen
+ $(ENV) $(PERL) "$(TMAKE)" libdoxycfg.pro >Makefile.libdoxycfg
+ $(ENV) $(PERL) "$(TMAKE)" doxygen.pro >Makefile.doxygen
# clean objects
clean: Makefile.libdoxygen Makefile.libdoxycfg Makefile.doxygen
diff --git a/src/classdef.cpp b/src/classdef.cpp
index b285325..d9ee46d 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -277,11 +277,11 @@ ClassDefImpl::~ClassDefImpl()
// constructs a new class definition
ClassDef::ClassDef(
- const char *defFileName,int defLine,
+ const char *defFileName,int defLine,int defColumn,
const char *nm,CompoundType ct,
const char *lref,const char *fName,
bool isSymbol,bool isJavaEnum)
- : Definition(defFileName,defLine,removeRedundantWhiteSpace(nm),0,0,isSymbol)
+ : Definition(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),0,0,isSymbol)
{
visited=FALSE;
setReference(lref);
@@ -535,6 +535,7 @@ void ClassDef::internalInsertMember(MemberDef *md,
break;
case Public:
addMemberToList(MemberListType_pubTypes,md,TRUE);
+ isSimple=QCString(md->typeString()).find(")(")==-1;
break;
case Private:
addMemberToList(MemberListType_priTypes,md,TRUE);
@@ -3491,7 +3492,7 @@ Definition *ClassDef::findInnerCompound(const char *name)
//}
ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName,
- int startLine, const QCString &templSpec,bool &freshInstance)
+ int startLine, int startColumn, const QCString &templSpec,bool &freshInstance)
{
freshInstance = FALSE;
if (m_impl->templateInstances==0)
@@ -3503,7 +3504,7 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName,
{
Debug::print(Debug::Classes,0," New template instance class `%s'`%s'\n",name().data(),templSpec.data());
templateClass = new ClassDef(
- fileName,startLine,localName()+templSpec,ClassDef::Class);
+ fileName,startLine,startColumn,localName()+templSpec,ClassDef::Class);
templateClass->setTemplateMaster(this);
templateClass->setOuterScope(getOuterScope());
templateClass->setHidden(isHidden());
@@ -3524,7 +3525,7 @@ ClassDef *ClassDef::getVariableInstance(const char *templSpec)
if (templateClass==0)
{
Debug::print(Debug::Classes,0," New template variable instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec));
- templateClass = new ClassDef("<code>",1,name()+templSpec,
+ templateClass = new ClassDef("<code>",1,1,name()+templSpec,
ClassDef::Class,0,0,FALSE);
templateClass->addMembersToTemplateInstance( this, templSpec );
templateClass->setTemplateMaster(this);
diff --git a/src/classdef.h b/src/classdef.h
index 53e1c15..19bf976 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -69,6 +69,8 @@ class ClassDef : public Definition
* found.
* \param startLine line number where the definition of this compound
* starts.
+ * \param startColumn column number where the definition of this compound
+ * starts.
* \param name the name of this compound (including scope)
* \param ct the kind of Compound
* \param ref the tag file from which this compound is extracted
@@ -82,7 +84,7 @@ class ClassDef : public Definition
* I didn't add this to CompoundType to avoid having
* to adapt all translators.
*/
- ClassDef(const char *fileName,int startLine,
+ ClassDef(const char *fileName,int startLine,int startColumn,
const char *name,CompoundType ct,
const char *ref=0,const char *fName=0,
bool isSymbol=TRUE,bool isJavaEnum=FALSE);
@@ -310,7 +312,7 @@ class ClassDef : public Definition
void setProtection(Protection p);
void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void addInnerCompound(Definition *d);
- ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,
+ ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
const QCString &templSpec,bool &freshInstance);
void addUsedClass(ClassDef *cd,const char *accessName,Protection prot);
void addUsedByClass(ClassDef *cd,const char *accessName,Protection prot);
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index d9ee4b8..f88f91e 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -129,6 +129,8 @@ CommandMap cmdMap[] =
{ "rtfonly", CMD_RTFONLY },
{ "endrtfonly", CMD_ENDRTFONLY },
{ "vhdlflow", CMD_VHDLFLOW },
+ { "docbookonly", CMD_DBONLY },
+ { "enddocbookonly",CMD_ENDDBONLY },
{ 0, 0 },
};
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index bea301e..c7b7c37 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -118,7 +118,9 @@ enum CommandType
CMD_RTFONLY = 88,
CMD_ENDRTFONLY = 89,
CMD_PIPE = 90,
- CMD_VHDLFLOW = 91
+ CMD_VHDLFLOW = 91,
+ CMD_DBONLY = 92,
+ CMD_ENDDBONLY = 93
};
enum HtmlTagType
diff --git a/src/code.l b/src/code.l
index b3851b9..2269709 100644
--- a/src/code.l
+++ b/src/code.l
@@ -41,12 +41,12 @@
#include "filename.h"
#include "namespacedef.h"
-#define YY_NEVER_INTERACTIVE 1
-
// Toggle for some debugging info
//#define DBG_CTX(x) fprintf x
#define DBG_CTX(x) do { } while(0)
-
+
+#define YY_NEVER_INTERACTIVE 1
+
#define CLASSBLOCK (int *)4
#define SCOPEBLOCK (int *)8
#define INNERBLOCK (int *)12
@@ -68,6 +68,7 @@ static const char * g_inputString; //!< the code fragment as text
static int g_inputPosition; //!< read offset during parsing
static int g_inputLines; //!< number of line in the code fragment
static int g_yyLineNr; //!< current line number
+static int g_yyColNr; //!< current column number
static bool g_needsTermination;
static bool g_exampleBlock;
@@ -565,10 +566,11 @@ static void codifyLines(const char *text)
while (!done)
{
sp=p;
- while ((c=*p++) && c!='\n') { }
+ while ((c=*p++) && c!='\n') { g_yyColNr++; }
if (c=='\n')
{
g_yyLineNr++;
+ g_yyColNr=1;
//*(p-1)='\0';
int l = (int)(p-sp-1);
char *tmp = (char*)malloc(l+1);
@@ -702,7 +704,7 @@ static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition)
static MemberDef *setCallContextForVar(const QCString &name)
{
if (name.isEmpty()) return 0;
- //fprintf(stderr,"setCallContextForVar(%s) g_classScope=%s\n",name.data(),g_classScope.data());
+ DBG_CTX((stderr,"setCallContextForVar(%s) g_classScope=%s\n",name.data(),g_classScope.data()));
int scopeEnd = name.findRev("::");
if (scopeEnd!=-1) // name with explicit scope
@@ -741,28 +743,28 @@ static MemberDef *setCallContextForVar(const QCString &name)
ClassDef *mcd = g_theVarContext.findVariable(name);
if (mcd) // local variable
{
- //fprintf(stderr,"local variable?\n");
+ DBG_CTX((stderr,"local variable?\n"));
if (mcd!=VariableContext::dummyContext)
{
- //fprintf(stderr,"local var `%s' mcd=%s\n",name.data(),mcd->name().data());
+ DBG_CTX((stderr,"local var `%s' mcd=%s\n",name.data(),mcd->name().data()));
g_theCallContext.setClass(mcd);
}
}
else
{
- //fprintf(stderr,"class member? scope=%s\n",g_classScope.data());
+ DBG_CTX((stderr,"class member? scope=%s\n",g_classScope.data()));
// look for a class member
mcd = getClass(g_classScope);
if (mcd)
{
- //fprintf(stderr,"Inside class %s\n",mcd->name().data());
+ DBG_CTX((stderr,"Inside class %s\n",mcd->name().data()));
MemberDef *md=mcd->getMemberByName(name);
if (md)
{
- //fprintf(stderr,"Found member %s\n",md->name().data());
+ DBG_CTX((stderr,"Found member %s\n",md->name().data()));
if (g_scopeStack.top()!=CLASSBLOCK)
{
- //fprintf(stderr,"class member `%s' mcd=%s\n",name.data(),mcd->name().data());
+ DBG_CTX((stderr,"class member `%s' mcd=%s\n",name.data(),mcd->name().data()));
g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope()));
}
return md;
@@ -828,6 +830,15 @@ static void updateCallContextForSmartPointer()
}
}
+static const char* fileLocation()
+{
+ const int maxLen=4096;
+ static char floc[maxLen+1];
+ floc[maxLen]='\0';
+ snprintf(floc,maxLen,"%s:%d:%d",g_sourceFileDef?g_sourceFileDef->absFilePath().data():"[unknown]",g_yyLineNr,g_yyColNr);
+ return floc;
+}
+
static void addDocCrossReference(MemberDef *src,MemberDef *dst)
{
static bool referencedByRelation = Config_getBool("REFERENCED_BY_RELATION");
@@ -841,32 +852,32 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
(src->isFunction() || src->isSlot())
)
{
- dst->addSourceReferencedBy(src);
+ dst->addSourceReferencedBy(src,fileLocation());
MemberDef *mdDef = dst->memberDefinition();
if (mdDef)
{
- mdDef->addSourceReferencedBy(src);
+ mdDef->addSourceReferencedBy(src,fileLocation());
}
MemberDef *mdDecl = dst->memberDeclaration();
if (mdDecl)
{
- mdDecl->addSourceReferencedBy(src);
+ mdDecl->addSourceReferencedBy(src,fileLocation());
}
}
if ((referencesRelation || callGraph || src->hasCallGraph()) &&
(src->isFunction() || src->isSlot())
)
{
- src->addSourceReferences(dst);
+ src->addSourceReferences(dst,fileLocation());
MemberDef *mdDef = src->memberDefinition();
if (mdDef)
{
- mdDef->addSourceReferences(dst);
+ mdDef->addSourceReferences(dst,fileLocation());
}
MemberDef *mdDecl = src->memberDeclaration();
if (mdDecl)
{
- mdDecl->addSourceReferences(dst);
+ mdDecl->addSourceReferences(dst,fileLocation());
}
}
@@ -885,7 +896,7 @@ static bool getLinkInScope(const QCString &c, // scope
FileDef *fd;
NamespaceDef *nd;
GroupDef *gd;
- //fprintf(stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly);
+ DBG_CTX((stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly));
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef,FALSE,g_forceTagReference) &&
md->isLinkable() && (!varOnly || md->isVariable()))
{
@@ -981,20 +992,20 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
Definition *d = g_currentDefinition;
//printf("d=%s g_sourceFileDef=%s\n",d?d->name().data():"<none>",g_sourceFileDef?g_sourceFileDef->name().data():"<none>");
cd = getResolvedClass(d,g_sourceFileDef,className,&md);
- //fprintf(stderr,"non-local variable name=%s context=%d cd=%s md=%s!\n",
- // className.data(),g_theVarContext.count(),cd?cd->name().data():"<none>",
- // md?md->name().data():"<none>");
+ DBG_CTX((stderr,"non-local variable name=%s context=%d cd=%s md=%s!\n",
+ className.data(),g_theVarContext.count(),cd?cd->name().data():"<none>",
+ md?md->name().data():"<none>"));
if (cd==0 && md==0 && (i=className.find('<'))!=-1)
{
QCString bareName = className.left(i); //stripTemplateSpecifiersFromScope(className);
- //fprintf(stderr,"bareName=%s\n",bareName.data());
+ DBG_CTX((stderr,"bareName=%s\n",bareName.data()));
if (bareName!=className)
{
cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version
}
}
//printf("md=%s\n",md?md->name().data():"<none>");
- //fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>");
+ DBG_CTX((stderr,"is found as a type %s\n",cd?cd->name().data():"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
if (getLink(g_classScope,clName,ol,clName,varOnly))
@@ -1020,11 +1031,11 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
//}
}
isLocal=TRUE;
- //fprintf(stderr,"is a local variable cd=%p!\n",cd);
+ DBG_CTX((stderr,"is a local variable cd=%p!\n",cd));
}
if (cd && cd->isLinkable()) // is it a linkable class
{
- //fprintf(stderr,"is linkable class %s\n",clName);
+ DBG_CTX((stderr,"is linkable class %s\n",clName));
if (g_exampleBlock)
{
QCString anchor;
@@ -1055,7 +1066,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
}
else // not a class, maybe a global member
{
- //fprintf(stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly);
+ DBG_CTX((stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,cd,md,typeOnly));
if (!isLocal && (md!=0 || (cd==0 && !typeOnly))) // not a class, see if it is a global enum/variable/typedef.
{
if (md==0) // not found as a typedef
@@ -1064,10 +1075,10 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
//printf("setCallContextForVar(%s) md=%p g_currentDefinition=%p\n",clName,md,g_currentDefinition);
if (md && g_currentDefinition)
{
- //fprintf(stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
- // md->name().data(),g_currentDefinition->name().data(),
- // isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md),
- // md->getOuterScope()->name().data());
+ DBG_CTX((stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
+ md->name().data(),g_currentDefinition->name().data(),
+ isAccessibleFrom(g_currentDefinition,g_sourceFileDef,md),
+ md->getOuterScope()->name().data()));
}
if (md && g_currentDefinition &&
@@ -1078,7 +1089,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
}
if (md && (!varOnly || md->isVariable()))
{
- //fprintf(stderr,"is a global md=%p g_currentDefinition=%s linkable=%d\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>",md->isLinkable());
+ DBG_CTX((stderr,"is a global md=%p g_currentDefinition=%s linkable=%d\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>",md->isLinkable()));
if (md->isLinkable())
{
QCString text;
@@ -1112,7 +1123,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
}
// nothing found, just write out the word
- //fprintf(stderr,"not found!\n");
+ DBG_CTX((stderr,"not found!\n"));
ol.linkableSymbol(g_yyLineNr,clName,0,
g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(clName);
@@ -1143,7 +1154,7 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
}
ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
- //fprintf(stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass);
+ DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass));
g_theCallContext.setClass(typeClass);
Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
@@ -1315,7 +1326,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
QCString funcWithScope=locFunc;
QCString funcWithFullScope=locFunc;
QCString fullScope=locScope;
- //fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());
+ DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
int len=2;
int i=locFunc.findRev("::");
if (g_currentMemberDef && g_currentMemberDef->getClassDef() &&
@@ -2099,7 +2110,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_code->codify(yytext);
- //fprintf(stderr,"g_bodyCurlyCount=%d\n",g_bodyCurlyCount);
+ DBG_CTX((stderr,"g_bodyCurlyCount=%d\n",g_bodyCurlyCount));
if (--g_bodyCurlyCount<=0)
{
g_insideBody=FALSE;
@@ -2200,7 +2211,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN( Bases );
}
<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
- //fprintf(stderr,"***** C++/CLI modifier %s on g_curClassName=%s\n",yytext,g_curClassName.data());
+ DBG_CTX((stderr,"***** C++/CLI modifier %s on g_curClassName=%s\n",yytext,g_curClassName.data()));
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
@@ -2241,11 +2252,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
g_scopeStack.push(CLASSBLOCK);
pushScope(g_curClassName);
- //fprintf(stderr,"***** g_curClassName=%s\n",g_curClassName.data());
+ DBG_CTX((stderr,"***** g_curClassName=%s\n",g_curClassName.data()));
if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0)
{
- //fprintf(stderr,"Adding new class %s\n",g_curClassName.data());
- ClassDef *ncd=new ClassDef("<code>",1,
+ DBG_CTX((stderr,"Adding new class %s\n",g_curClassName.data()));
+ ClassDef *ncd=new ClassDef("<code>",1,1,
g_curClassName,ClassDef::Class,0,0,FALSE);
g_codeClassSDict->append(g_curClassName,ncd);
// insert base classes.
@@ -2279,7 +2290,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
endFontClass();
}
<Bases>{SEP}?({ID}{SEP})*{ID} {
- //fprintf(stderr,"%s:addBase(%s)\n",g_curClassName.data(),yytext);
+ DBG_CTX((stderr,"%s:addBase(%s)\n",g_curClassName.data(),yytext));
g_curClassBases.inSort(yytext);
generateClassOrGlobalLink(*g_code,yytext);
}
@@ -2700,7 +2711,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<MemberCall>{SCOPENAME}/{B}* {
if (g_theCallContext.getClass())
{
- //fprintf(stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getClass());
+ DBG_CTX((stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getClass()));
if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext))
{
g_code->linkableSymbol(g_yyLineNr,yytext,0,
@@ -2712,7 +2723,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
else
{
- //fprintf(stderr,"no class context!\n");
+ DBG_CTX((stderr,"no class context!\n"));
g_code->codify(yytext);
addToSearchIndex(yytext);
g_name.resize(0);
@@ -2991,7 +3002,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (*yytext==';') g_searchingForBody=FALSE;
if (!g_type.isEmpty())
{
- //fprintf(stderr,"add variable g_type=%s g_name=%s)\n",g_type.data(),g_name.data());
+ DBG_CTX((stderr,"add variable g_type=%s g_name=%s)\n",g_type.data(),g_name.data()));
g_theVarContext.addVariable(g_type,g_name);
}
g_parmType.resize(0);g_parmName.resize(0);
@@ -3025,7 +3036,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
//g_theCallContext.popScope();
g_parmType.resize(0);g_parmName.resize(0);
int index = g_name.findRev("::");
- //fprintf(stderr,"g_name=%s\n",g_name.data());
+ DBG_CTX((stderr,"g_name=%s\n",g_name.data()));
if (index!=-1)
{
QCString scope = g_name.left(index);
@@ -3470,9 +3481,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_theCallContext.popScope();
}
<*>\n {
+ g_yyColNr++;
codifyLines(yytext);
}
<*>. {
+ g_yyColNr++;
g_code->codify(yytext);
}
/*
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 96a34d8..46b8938 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -443,7 +443,7 @@ void replaceComment(int offset);
g_lastCommentContext = YY_START;
BEGIN(Verbatim);
}
-<CComment,ReadLine>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly")/[^a-z_A-Z0-9] { /* start of a verbatim block */
+<CComment,ReadLine>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly")/[^a-z_A-Z0-9] { /* start of a verbatim block */
copyToOutput(yytext,(int)yyleng);
g_blockName=&yytext[1];
g_lastCommentContext = YY_START;
@@ -452,7 +452,7 @@ void replaceComment(int offset);
<Scan>. { /* any ather character */
copyToOutput(yytext,(int)yyleng);
}
-<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */
+<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"docbookonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */
copyToOutput(yytext,(int)yyleng);
if (yytext[1]=='f') // end of formula
{
diff --git a/src/commentscan.l b/src/commentscan.l
index 249fec8..b851d81 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -180,6 +180,7 @@ static DocCmdMap docCmdMap[] =
{ "latexonly", &handleFormatBlock, FALSE },
{ "htmlonly", &handleFormatBlock, FALSE },
{ "xmlonly", &handleFormatBlock, FALSE },
+ { "docbookonly", &handleFormatBlock, FALSE },
{ "rtfonly", &handleFormatBlock, FALSE },
{ "manonly", &handleFormatBlock, FALSE },
{ "dot", &handleFormatBlock, TRUE },
@@ -314,6 +315,7 @@ class DocCmdMapper
DocCmdMapper *DocCmdMapper::s_instance=0;
+bool inInternalDocs = FALSE;
#define YY_NEVER_INTERACTIVE 1
@@ -1018,9 +1020,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
BEGIN(HtmlComment);
}
<Comment>{B}*{CMD}"endinternal"{B}* {
- warn(yyFileName,yyLineNr,
+ if (!inInternalDocs)
+ warn(yyFileName,yyLineNr,
"warning: found \\endinternal without matching \\internal"
);
+ inInternalDocs = FALSE;
}
<Comment>{B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command
// the {B}* in the front was added for bug620924
@@ -1693,7 +1697,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the preformatted block commands ------- */
-<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc"|"endvhdlflow")/{NW} { // possible ends
+<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc"|"endvhdlflow")/{NW} { // possible ends
addOutput(yytext);
if (&yytext[4]==blockName) // found end of the block
{
@@ -2569,6 +2573,7 @@ static bool handleInternal(const QCString &)
{
// re-enabled for bug640828
addOutput("\\internal ");
+ inInternalDocs = TRUE;
}
return FALSE;
}
diff --git a/src/compound.xsd b/src/compound.xsd
index d8e2589..fd24fc9 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -279,6 +279,7 @@
<xsd:complexType name="locationType">
<xsd:attribute name="file" type="xsd:string" />
<xsd:attribute name="line" type="xsd:integer" />
+ <xsd:attribute name="column" type="xsd:integer" use="optional"/>
<xsd:attribute name="bodyfile" type="xsd:string" />
<xsd:attribute name="bodystart" type="xsd:integer" />
<xsd:attribute name="bodyend" type="xsd:integer" />
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index 7d0a9d4..7a726ae 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -279,6 +279,7 @@
" <xsd:complexType name=\"locationType\">\n"
" <xsd:attribute name=\"file\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"line\" type=\"xsd:integer\" />\n"
+" <xsd:attribute name=\"column\" type=\"xsd:integer\" use=\"optional\"/>\n"
" <xsd:attribute name=\"bodyfile\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"bodystart\" type=\"xsd:integer\" />\n"
" <xsd:attribute name=\"bodyend\" type=\"xsd:integer\" />\n"
diff --git a/src/config.xml b/src/config.xml
index 26496c9..d7c2f18 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -49,7 +49,7 @@ The default language is English, other supported languages are:
Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, Persian,
Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
'>
@@ -76,6 +76,7 @@ Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
<value name='Japanese-en'/>
<value name='Korean'/>
<value name='Korean-en'/>
+ <value name='Latvian'/>
<value name='Norwegian'/>
<value name='Macedonian'/>
<value name='Persian'/>
@@ -312,11 +313,12 @@ section (for LaTeX and RTF).
' defval='0'/>
<option type='bool' id='INLINE_SIMPLE_STRUCTS' docs='
When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-unions with only public data fields will be shown inline in the documentation
-of the scope in which they are defined (i.e. file, namespace, or group
-documentation), provided this scope is documented. If set to NO (the default),
-structs, classes, and unions are shown on a separate page (for HTML and Man
-pages) or section (for LaTeX and RTF).' defval='0'/>
+unions with only public data fields or simple typedef fields will be shown
+inline in the documentation of the scope in which they are defined (i.e. file,
+namespace, or group documentation), provided this scope is documented. If set
+to NO (the default), structs, classes, and unions are shown on a separate
+page (for HTML and Man pages) or section (for LaTeX and RTF).
+' defval='0'/>
<option type='bool' id='TYPEDEF_HIDES_STRUCT' docs='
When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
is documented as struct, union, or enum with the name of the typedef. So
@@ -882,7 +884,7 @@ the output directory.
The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
other source files which should be copied to the HTML output directory. Note
that these files will be copied to the base HTML output directory. Use the
-$relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+$relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
files. In the HTML_STYLESHEET file, use the file name only. Also note that
the files will be copied as-is; there are no commands or markers available.
' depends='GENERATE_HTML'/>
@@ -1246,6 +1248,12 @@ the generated latex document. The footer should contain everything after
the last chapter. If it is left blank doxygen will generate a
standard footer. Notice: only use this tag if you know what you are doing!
' defval='' depends='GENERATE_LATEX'/>
+ <option type='list' id='LATEX_EXTRA_FILES' format='file' docs='
+The LATEX_EXTRA_FILES tag can be used to specify one or more extra images
+or other source files which should be copied to the LaTeX output directory.
+Note that the files will be copied as-is; there are no commands or markers
+available.
+' depends='GENERATE_LATEX'/>
<option type='bool' id='PDF_HYPERLINKS' docs='
If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
is prepared for conversion to pdf (using ps2pdf). The pdf file will
@@ -1364,6 +1372,17 @@ and cross-referencing information) to the XML output. Note that
enabling this will significantly increase the size of the XML output.
' defval='1' depends='GENERATE_XML'/>
</group>
+ <group name='DOCBOOK' docs='configuration options related to the DOCBOOK output'>
+ <option type='bool' id='GENERATE_DOCBOOK' docs='
+If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files
+that can be used to generate PDF.
+' defval='0'/>
+ <option type='string' id='DOCBOOK_OUTPUT' format='dir' docs='
+The DOCBOOK_OUTPUT tag is used to specify where the DOCBOOK pages will be put.
+If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+front of it. If left blank docbook will be used as the default path.
+' defval='docbook' depends='GENERATE_DOCBOOK'/>
+ </group>
<group name='DEF' docs='configuration options for the AutoGen Definitions output'>
<option type='bool' id='GENERATE_AUTOGEN_DEF' docs='
If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
@@ -1373,6 +1392,19 @@ documentation. Note that this feature is still experimental
and incomplete at the moment.
' defval='0'/>
</group>
+<!--
+ <group name='Sqlite3' docs='configuration options related to Sqlite3 output'>
+ <option type='bool' id='GENERATE_SQLITE3' docs='
+If the GENERATE_SQLITE3 tag is set to YES doxygen will generate an
+sqlite database with symbols found by doxygen stored in tables.
+' defval='0'/>
+ <option type='string' id='SQLITE3_OUTPUT' format='dir' docs='
+The SQLITE3_OUTPUT tag is used to specify where the Sqlite3 database will be put.
+If a relative path is entered the value of OUTPUT_DIRECTORY will be
+put in front of it. If left blank sqlite3 will be used as the default path.
+' defval='' depends='GENERATE_SQLITE3'/>
+ </group>
+-->
<group name='PerlMod' docs='configuration options related to the Perl module output'>
<option type='bool' id='GENERATE_PERLMOD' docs='
If the GENERATE_PERLMOD tag is set to YES Doxygen will
@@ -1486,6 +1518,11 @@ If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
in the modules index. If set to NO, only the current project&apos;s groups will
be listed.
' defval='1'/>
+ <option type='bool' id='EXTERNAL_PAGES' docs='
+If the EXTERNAL_PAGES tag is set to YES all external pages will be listed
+in the related pages index. If set to NO, only the current project&apos;s
+pages will be listed.
+' defval='1'/>
<option type='string' id='PERL_PATH' format='dir' docs='
The PERL_PATH should be the absolute path and name of the perl script
interpreter (i.e. the result of `which perl&apos;).
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index eef2272..e7ffbfe 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -90,7 +90,7 @@ void addConfigOptions(Config *cfg)
"Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,\n"
"Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,\n"
"Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English\n"
- "messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,\n"
+ "messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, Persian,\n"
"Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,\n"
"Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.",
"English"
@@ -118,6 +118,7 @@ void addConfigOptions(Config *cfg)
ce->addValue("Japanese-en");
ce->addValue("Korean");
ce->addValue("Korean-en");
+ ce->addValue("Latvian");
ce->addValue("Norwegian");
ce->addValue("Macedonian");
ce->addValue("Persian");
@@ -440,11 +441,11 @@ void addConfigOptions(Config *cfg)
cb = cfg->addBool(
"INLINE_SIMPLE_STRUCTS",
"When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and\n"
- "unions with only public data fields will be shown inline in the documentation\n"
- "of the scope in which they are defined (i.e. file, namespace, or group\n"
- "documentation), provided this scope is documented. If set to NO (the default),\n"
- "structs, classes, and unions are shown on a separate page (for HTML and Man\n"
- "pages) or section (for LaTeX and RTF).",
+ "unions with only public data fields or simple typedef fields will be shown\n"
+ "inline in the documentation of the scope in which they are defined (i.e. file,\n"
+ "namespace, or group documentation), provided this scope is documented. If set\n"
+ "to NO (the default), structs, classes, and unions are shown on a separate\n"
+ "page (for HTML and Man pages) or section (for LaTeX and RTF).",
FALSE
);
//----
@@ -1261,7 +1262,7 @@ void addConfigOptions(Config *cfg)
"The HTML_EXTRA_FILES tag can be used to specify one or more extra images or\n"
"other source files which should be copied to the HTML output directory. Note\n"
"that these files will be copied to the base HTML output directory. Use the\n"
- "$relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n"
+ "$relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these\n"
"files. In the HTML_STYLESHEET file, use the file name only. Also note that\n"
"the files will be copied as-is; there are no commands or markers available."
);
@@ -1835,6 +1836,16 @@ void addConfigOptions(Config *cfg)
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_LATEX");
//----
+ cl = cfg->addList(
+ "LATEX_EXTRA_FILES",
+ "The LATEX_EXTRA_FILES tag can be used to specify one or more extra images\n"
+ "or other source files which should be copied to the LaTeX output directory.\n"
+ "Note that the files will be copied as-is; there are no commands or markers\n"
+ "available."
+ );
+ cl->addDependency("GENERATE_LATEX");
+ cl->setWidgetType(ConfigList::File);
+ //----
cb = cfg->addBool(
"PDF_HYPERLINKS",
"If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\n"
@@ -2039,6 +2050,27 @@ void addConfigOptions(Config *cfg)
);
cb->addDependency("GENERATE_XML");
//---------------------------------------------------------------------------
+ cfg->addInfo("DOCBOOK","configuration options related to the DOCBOOK output");
+ //---------------------------------------------------------------------------
+
+ //----
+ cb = cfg->addBool(
+ "GENERATE_DOCBOOK",
+ "If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files\n"
+ "that can be used to generate PDF.",
+ FALSE
+ );
+ //----
+ cs = cfg->addString(
+ "DOCBOOK_OUTPUT",
+ "The DOCBOOK_OUTPUT tag is used to specify where the DOCBOOK pages will be put.\n"
+ "If a relative path is entered the value of OUTPUT_DIRECTORY will be put in\n"
+ "front of it. If left blank docbook will be used as the default path."
+ );
+ cs->setDefaultValue("docbook");
+ cs->setWidgetType(ConfigString::Dir);
+ cs->addDependency("GENERATE_DOCBOOK");
+ //---------------------------------------------------------------------------
cfg->addInfo("DEF","configuration options for the AutoGen Definitions output");
//---------------------------------------------------------------------------
@@ -2231,6 +2263,14 @@ void addConfigOptions(Config *cfg)
TRUE
);
//----
+ cb = cfg->addBool(
+ "EXTERNAL_PAGES",
+ "If the EXTERNAL_PAGES tag is set to YES all external pages will be listed\n"
+ "in the related pages index. If set to NO, only the current project's\n"
+ "pages will be listed.",
+ TRUE
+ );
+ //----
cs = cfg->addString(
"PERL_PATH",
"The PERL_PATH should be the absolute path and name of the perl script\n"
diff --git a/src/define.cpp b/src/define.cpp
index c814e34..76a64e1 100644
--- a/src/define.cpp
+++ b/src/define.cpp
@@ -22,6 +22,7 @@ Define::Define()
{
fileDef=0;
lineNr=1;
+ columnNr=1;
nargs=-1;
undef=FALSE;
varArgs=FALSE;
@@ -34,6 +35,7 @@ Define::Define(const Define &d)
{
//name=d.name; definition=d.definition; fileName=d.fileName;
lineNr=d.lineNr;
+ lineNr=d.columnNr;
nargs=d.nargs;
undef=d.undef;
varArgs=d.varArgs;
diff --git a/src/define.h b/src/define.h
index da3d956..843ecec 100644
--- a/src/define.h
+++ b/src/define.h
@@ -40,6 +40,7 @@ class Define
QCString anchor;
FileDef *fileDef;
int lineNr;
+ int columnNr;
int nargs;
bool undef;
bool varArgs;
diff --git a/src/definition.cpp b/src/definition.cpp
index 1212a7b..e882225 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -277,12 +277,13 @@ void Definition::removeFromMap(Definition *d)
}
}
-Definition::Definition(const char *df,int dl,
+Definition::Definition(const char *df,int dl,int dc,
const char *name,const char *b,
const char *d,bool isSymbol)
{
m_name = name;
m_defLine = dl;
+ m_defColumn = dc;
m_impl = new DefinitionImpl;
m_impl->init(df,name);
m_isSymbol = isSymbol;
@@ -1031,13 +1032,6 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
MemberDef *thisMd = 0;
if (definitionType()==TypeMember) thisMd = (MemberDef *)this;
- // vhdl parser can' t start at an arbitrary point in the source code
- if (getLanguage()==SrcLangExt_VHDL)
- {
- if (thisMd) VhdlDocGen::writeCodeFragment(ol,actualStart,codeFragment,thisMd);
- return;
- }
-
ol.startCodeFragment();
pIntf->parseCode(ol, // codeOutIntf
scopeName, // scope
@@ -1226,18 +1220,26 @@ bool Definition::hasUserDocumentation() const
return hasDocs;
}
-void Definition::addSourceReferencedBy(MemberDef *md)
+
+
+void Definition::addSourceReferencedBy(MemberDef *md, const char *floc/*=NULL*/)
{
+ QCString name ;
+ QCString scope = md->getScopeString();
+
+ if (floc)
+ name = floc;
+ else
+ {
+ name = md->name();
+ if (!scope.isEmpty())
+ {
+ name.prepend(scope+"::");
+ }
+ }
if (md)
{
makeResident();
- QCString name = md->name();
- QCString scope = md->getScopeString();
-
- if (!scope.isEmpty())
- {
- name.prepend(scope+"::");
- }
if (m_impl->sourceRefByDict==0)
{
@@ -1250,19 +1252,32 @@ void Definition::addSourceReferencedBy(MemberDef *md)
}
}
-void Definition::addSourceReferences(MemberDef *md)
+void Definition::addSourceReferences(MemberDef *md, const char *floc)
{
+ QCString name = md->name();
+ QCString scope = md->getScopeString();
+
+ if (floc)
+ name = floc;
+#if 0
+ else
+ {
+ name = md->name();
+ if (!scope.isEmpty())
+ {
+ name.prepend(scope+"::");
+ }
+ }
+#endif
if (md)
{
- QCString name = md->name();
- QCString scope = md->getScopeString();
makeResident();
-
+#if 0
if (!scope.isEmpty())
{
name.prepend(scope+"::");
}
-
+#endif
if (m_impl->sourceRefsDict==0)
{
m_impl->sourceRefsDict = new MemberSDict;
diff --git a/src/definition.h b/src/definition.h
index 9bbc85e..285e889 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -95,7 +95,7 @@ class Definition : public DefinitionIntf, public LockableObj
/*! Create a new definition */
Definition(
- const char *defFileName,int defLine,
+ const char *defFileName,int defLine,int defColumn,
const char *name,const char *b=0,const char *d=0,
bool isSymbol=TRUE);
@@ -180,6 +180,9 @@ class Definition : public DefinitionIntf, public LockableObj
/*! returns the line number at which the definition was found */
int getDefLine() const { return m_defLine; }
+ /*! returns the column number at which the definition was found */
+ int getDefColumn() const { return m_defColumn; }
+
/*! Returns TRUE iff the definition is documented
* (which could be generated documentation)
* @see hasUserDocumentation()
@@ -287,8 +290,8 @@ class Definition : public DefinitionIntf, public LockableObj
// source references
void setBodySegment(int bls,int ble);
void setBodyDef(FileDef *fd);
- void addSourceReferencedBy(MemberDef *d);
- void addSourceReferences(MemberDef *d);
+ void addSourceReferencedBy(MemberDef *d, const char *floc=NULL);
+ void addSourceReferences(MemberDef *d, const char *floc);
void setRefItems(const QList<ListItemInfo> *sli);
void mergeRefItems(Definition *d);
@@ -354,6 +357,7 @@ class Definition : public DefinitionIntf, public LockableObj
bool m_isSymbol;
QCString m_symbolName;
int m_defLine;
+ int m_defColumn;
};
/** A list of Definition objects. */
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 6795e38..cf3d69e 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -17,7 +17,7 @@
static int g_dirCount=0;
-DirDef::DirDef(const char *path) : Definition(path,1,path)
+DirDef::DirDef(const char *path) : Definition(path,1,1,path)
{
bool fullPathNames = Config_getBool("FULL_PATH_NAMES");
// get display name (stipping the paths mentioned in STRIP_FROM_PATH)
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
new file mode 100644
index 0000000..722117e
--- /dev/null
+++ b/src/docbookgen.cpp
@@ -0,0 +1,1906 @@
+/******************************************************************************
+*
+*
+*
+* Copyright (C) 1997-2012 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 <stdlib.h>
+
+#include <qdir.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qintdict.h>
+#include "docbookgen.h"
+#include "doxygen.h"
+#include "message.h"
+#include "config.h"
+#include "classlist.h"
+#include "util.h"
+#include "defargs.h"
+#include "outputgen.h"
+#include "dot.h"
+#include "pagedef.h"
+#include "filename.h"
+#include "version.h"
+#include "docbookvisitor.h"
+#include "docparser.h"
+#include "language.h"
+#include "parserintf.h"
+#include "arguments.h"
+#include "memberlist.h"
+#include "groupdef.h"
+#include "memberdef.h"
+#include "namespacedef.h"
+#include "membername.h"
+#include "membergroup.h"
+#include "dirdef.h"
+#include "section.h"
+
+// no debug info
+#define Docbook_DB(x) do {} while(0)
+// debug to stdout
+//#define Docbook_DB(x) printf x
+// debug inside output
+//#define Docbook_DB(x) QCString __t;__t.sprintf x;m_t << __t
+
+//------------------
+
+static const char index_xsd[] =
+#include "index_xsd.h"
+;
+
+//------------------
+//
+static const char compound_xsd[] =
+#include "compound_xsd.h"
+;
+
+//------------------
+
+class DocbookSectionMapper : public QIntDict<char>
+{
+ public:
+ DocbookSectionMapper() : QIntDict<char>(47)
+ {
+ insert(MemberListType_pubTypes,"public-type");
+ insert(MemberListType_pubMethods,"public-func");
+ insert(MemberListType_pubAttribs,"public-attrib");
+ insert(MemberListType_pubSlots,"public-slot");
+ insert(MemberListType_signals,"signal");
+ insert(MemberListType_dcopMethods,"dcop-func");
+ insert(MemberListType_properties,"property");
+ insert(MemberListType_events,"event");
+ insert(MemberListType_pubStaticMethods,"public-static-func");
+ insert(MemberListType_pubStaticAttribs,"public-static-attrib");
+ insert(MemberListType_proTypes,"protected-type");
+ insert(MemberListType_proMethods,"protected-func");
+ insert(MemberListType_proAttribs,"protected-attrib");
+ insert(MemberListType_proSlots,"protected-slot");
+ insert(MemberListType_proStaticMethods,"protected-static-func");
+ insert(MemberListType_proStaticAttribs,"protected-static-attrib");
+ insert(MemberListType_pacTypes,"package-type");
+ insert(MemberListType_pacMethods,"package-func");
+ insert(MemberListType_pacAttribs,"package-attrib");
+ insert(MemberListType_pacStaticMethods,"package-static-func");
+ insert(MemberListType_pacStaticAttribs,"package-static-attrib");
+ insert(MemberListType_priTypes,"private-type");
+ insert(MemberListType_priMethods,"private-func");
+ insert(MemberListType_priAttribs,"private-attrib");
+ insert(MemberListType_priSlots,"private-slot");
+ insert(MemberListType_priStaticMethods,"private-static-func");
+ insert(MemberListType_priStaticAttribs,"private-static-attrib");
+ insert(MemberListType_friends,"friend");
+ insert(MemberListType_related,"related");
+ insert(MemberListType_decDefineMembers,"define");
+ insert(MemberListType_decProtoMembers,"prototype");
+ insert(MemberListType_decTypedefMembers,"typedef");
+ insert(MemberListType_decEnumMembers,"enum");
+ insert(MemberListType_decFuncMembers,"func");
+ insert(MemberListType_decVarMembers,"var");
+ }
+};
+
+static DocbookSectionMapper g_docbookSectionMapper;
+
+
+inline void writeDocbookString(FTextStream &t,const char *s)
+{
+ t << convertToXML(s);
+}
+
+inline void writeDocbookCodeString(FTextStream &t,const char *s, int &col)
+{
+ char c;
+ while ((c=*s++))
+ {
+ switch(c)
+ {
+ case '\t':
+ {
+ static int tabSize = Config_getInt("TAB_SIZE");
+ int spacesToNextTabStop = tabSize - (col%tabSize);
+ col+=spacesToNextTabStop;
+ while (spacesToNextTabStop--) t << "&#32;";
+ break;
+ }
+ case ' ': t << "&#32;"; col++; break;
+ case '<': t << "&lt;"; col++; break;
+ case '>': t << "&gt;"; col++; break;
+ case '&': t << "&amp;"; col++; break;
+ case '\'': t << "&apos;"; col++; break;
+ case '"': t << "&quot;"; col++; break;
+ default: t << c; col++; break;
+ }
+ }
+}
+
+static void writeDocbookHeaderMainpage(FTextStream &t)
+{
+ t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
+ t << "<chapter xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">" << endl;
+}
+
+static void writeDocbookHeader_ID(FTextStream &t, QCString id)
+{
+ t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
+ t << "<section xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:id=\"" << id << "\">" << endl;
+}
+
+void writeDocbookLink(FTextStream &t,const char * /*extRef*/,const char *compoundId,
+ const char *anchorId,const char * text,const char * /*tooltip*/)
+{
+ t << "<link linkend=\"" << compoundId;
+ if (anchorId) t << "_1" << anchorId;
+ t << "\"";
+ t << ">";
+ writeDocbookString(t,text);
+ t << "</link>";
+}
+
+class TextGeneratorDocbookImpl : public TextGeneratorIntf
+{
+ public:
+ TextGeneratorDocbookImpl(FTextStream &t): m_t(t) {}
+ void writeString(const char *s,bool /*keepSpaces*/) const
+ {
+ writeDocbookString(m_t,s);
+ }
+ void writeBreak(int) const {}
+ void writeLink(const char *extRef,const char *file,
+ const char *anchor,const char *text
+ ) const
+ {
+ writeDocbookLink(m_t,extRef,file,anchor,text,0);
+ }
+ private:
+ FTextStream &m_t;
+};
+
+class DocbookCodeGenerator : public CodeOutputInterface
+{
+ public:
+ DocbookCodeGenerator(FTextStream &t) : m_t(t), m_lineNumber(-1),
+ m_insideCodeLine(FALSE), m_normalHLNeedStartTag(TRUE),
+ m_insideSpecialHL(FALSE) {}
+ virtual ~DocbookCodeGenerator() {}
+
+ void codify(const char *text)
+ {
+ Docbook_DB(("(codify \"%s\")\n",text));
+ writeDocbookCodeString(m_t,text,col);
+ }
+ void writeCodeLink(const char *ref,const char *file,
+ const char *anchor,const char *name,
+ const char *tooltip)
+ {
+ Docbook_DB(("(writeCodeLink)\n"));
+ writeDocbookLink(m_t,ref,file,anchor,name,tooltip);
+ col+=strlen(name);
+ }
+ void startCodeLine(bool)
+ {
+ Docbook_DB(("(startCodeLine)\n"));
+ if (m_lineNumber!=-1)
+ {
+ if (!m_refId.isEmpty())
+ {
+ m_t << "<link linkend=\"" << m_refId << "\">";
+ }
+ m_t << m_lineNumber;
+ if (!m_refId.isEmpty())
+ {
+ m_t << "</link>";
+ }
+ }
+ m_insideCodeLine=TRUE;
+ col=0;
+ }
+ void endCodeLine()
+ {
+ m_t << endl;
+ Docbook_DB(("(endCodeLine)\n"));
+ m_lineNumber = -1;
+ m_refId.resize(0);
+ m_external.resize(0);
+ m_insideCodeLine=FALSE;
+ }
+ void startCodeAnchor(const char *id)
+ {
+ Docbook_DB(("(startCodeAnchor)\n"));
+ m_t << "<anchor id=\"" << id << "\">";
+ }
+ void endCodeAnchor()
+ {
+ Docbook_DB(("(endCodeAnchor)\n"));
+ m_t << "</anchor>";
+ }
+ void startFontClass(const char * /*colorClass*/)
+ {
+ Docbook_DB(("(startFontClass)\n"));
+ m_t << "<emphasis>"; // non DocBook
+ m_insideSpecialHL=TRUE;
+ }
+ void endFontClass()
+ {
+ Docbook_DB(("(endFontClass)\n"));
+ m_t << "</emphasis>"; // non DocBook
+ m_insideSpecialHL=FALSE;
+ }
+ void writeCodeAnchor(const char *)
+ {
+ Docbook_DB(("(writeCodeAnchor)\n"));
+ }
+ void writeLineNumber(const char *extRef,const char *compId,
+ const char *anchorId,int l)
+ {
+ Docbook_DB(("(writeLineNumber)\n"));
+ // we remember the information provided here to use it
+ // at the <codeline> start tag.
+ m_lineNumber = l;
+ if (compId)
+ {
+ m_refId=compId;
+ if (anchorId) m_refId+=(QCString)"_1"+anchorId;
+ m_isMemberRef = anchorId!=0;
+ if (extRef) m_external=extRef;
+ }
+ }
+ void linkableSymbol(int, const char *,Definition *,Definition *)
+ {
+ }
+ void setCurrentDoc(Definition *,const char *,bool)
+ {
+ }
+ void addWord(const char *,bool)
+ {
+ }
+ void finish()
+ {
+ if (m_insideCodeLine) endCodeLine();
+ }
+
+ private:
+ FTextStream &m_t;
+ QCString m_refId;
+ QCString m_external;
+ int m_lineNumber;
+ bool m_isMemberRef;
+ int col;
+ bool m_insideCodeLine;
+ bool m_normalHLNeedStartTag;
+ bool m_insideSpecialHL;
+};
+
+
+static void writeTemplateArgumentList(ArgumentList *al,
+ FTextStream &t,
+ Definition *scope,
+ FileDef *fileScope,
+ int indent)
+{
+ QCString indentStr;
+ indentStr.fill(' ',indent);
+ if (al)
+ {
+ t << indentStr << "<templateparamlist>" << endl;
+ ArgumentListIterator ali(*al);
+ Argument *a;
+ for (ali.toFirst();(a=ali.current());++ali)
+ {
+ t << indentStr << " <param>" << endl;
+ if (!a->type.isEmpty())
+ {
+ t << indentStr << " <type>";
+ linkifyText(TextGeneratorDocbookImpl(t),scope,fileScope,0,a->type);
+ t << "</type>" << endl;
+ }
+ if (!a->name.isEmpty())
+ {
+ t << indentStr << " <declname>" << a->name << "</declname>" << endl;
+ t << indentStr << " <defname>" << a->name << "</defname>" << endl;
+ }
+ if (!a->defval.isEmpty())
+ {
+ t << indentStr << " <defval>";
+ linkifyText(TextGeneratorDocbookImpl(t),scope,fileScope,0,a->defval);
+ t << "</defval>" << endl;
+ }
+ t << indentStr << " </param>" << endl;
+ }
+ t << indentStr << "</templateparamlist>" << endl;
+ }
+}
+
+static void writeTemplateList(ClassDef *cd,FTextStream &t)
+{
+ writeTemplateArgumentList(cd->templateArguments(),t,cd,0,4);
+}
+
+static void writeDocbookDocBlock(FTextStream &t,
+ const QCString &fileName,
+ int lineNr,
+ Definition *scope,
+ MemberDef * md,
+ const QCString &text)
+{
+ QCString stext = text.stripWhiteSpace();
+ if (stext.isEmpty()) return;
+ // convert the documentation string into an abstract syntax tree
+ DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,text+"\n",FALSE,FALSE);
+ // create a code generator
+ DocbookCodeGenerator *docbookCodeGen = new DocbookCodeGenerator(t);
+ // create a parse tree visitor for Docbook
+ DocbookDocVisitor *visitor = new DocbookDocVisitor(t,*docbookCodeGen);
+ // visit all nodes
+ root->accept(visitor);
+ // clean up
+ delete visitor;
+ delete docbookCodeGen;
+ delete root;
+}
+
+void writeDocbookCodeBlock(FTextStream &t,FileDef *fd)
+{
+ ParserInterface *pIntf=Doxygen::parserManager->getParser(fd->getDefFileExtension());
+ pIntf->resetCodeParserState();
+ DocbookCodeGenerator *docbookGen = new DocbookCodeGenerator(t);
+ pIntf->parseCode(*docbookGen, // codeOutIntf
+ 0, // scopeName
+ fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES")),
+ FALSE, // isExampleBlock
+ 0, // exampleName
+ fd, // fileDef
+ -1, // startLine
+ -1, // endLine
+ FALSE, // inlineFragement
+ 0, // memberDef
+ TRUE // showLineNumbers
+ );
+ docbookGen->finish();
+ delete docbookGen;
+}
+
+static QCString classOutputFileBase(ClassDef *cd)
+{
+ //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //if (inlineGroupedClasses && cd->partOfGroups()!=0)
+ return cd->getOutputFileBase();
+ //else
+ // return cd->getOutputFileBase();
+}
+
+static QCString memberOutputFileBase(MemberDef *md)
+{
+ //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //if (inlineGroupedClasses && md->getClassDef() && md->getClassDef()->partOfGroups()!=0)
+ // return md->getClassDef()->getDocbookOutputFileBase();
+ //else
+ // return md->getOutputFileBase();
+ return md->getOutputFileBase();
+}
+
+
+static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *def, bool detailed=0)
+{
+
+ // + declaration/definition arg lists
+ // + reimplements
+ // + reimplementedBy
+ // + exceptions
+ // + const/volatile specifiers
+ // - examples
+ // + source definition
+ // + source references
+ // + source referenced by
+ // - body code
+ // + template arguments
+ // (templateArguments(), definitionTemplateParameterLists())
+ // - call graph
+
+ // enum values are written as part of the enum
+ if (md->memberType()==MemberType_EnumValue) return;
+ if (md->isHidden()) return;
+ //if (md->name().at(0)=='@') return; // anonymous member
+
+ // group members are only visible in their group
+ //if (def->definitionType()!=Definition::TypeGroup && md->getGroupDef()) return;
+ QCString memType;
+ bool isFunc=FALSE;
+ switch (md->memberType())
+ {
+ case MemberType_Define: memType="define"; break;
+ case MemberType_EnumValue: ASSERT(0); break;
+ case MemberType_Property: memType="property"; break;
+ case MemberType_Event: memType="event"; break;
+ case MemberType_Variable: memType="variable"; break;
+ case MemberType_Typedef: memType="typedef"; break;
+ case MemberType_Enumeration: memType="enum"; break;
+ case MemberType_Function: memType="function"; isFunc=TRUE; break;
+ case MemberType_Signal: memType="signal"; isFunc=TRUE; break;
+ case MemberType_Friend: memType="friend"; isFunc=TRUE; break;
+ case MemberType_DCOP: memType="dcop"; isFunc=TRUE; break;
+ case MemberType_Slot: memType="slot"; isFunc=TRUE; break;
+ }
+ QCString scopeName;
+ if (md->getClassDef())
+ {
+ scopeName=md->getClassDef()->name();
+ }
+ else if (md->getNamespaceDef())
+ {
+ scopeName=md->getNamespaceDef()->name();
+ }
+ if (detailed==0)
+ {
+ t << " <para>" << endl;
+ t << " <itemizedlist>" << endl;
+ t << " <listitem>" << endl;
+ //enum
+ bool closePara=TRUE;
+ if (md->memberType()==MemberType_Enumeration)
+ {
+ LockingPtr<MemberList> enumFields = md->enumFieldList();
+ t << " <para>" << memType << " <link linkend=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << convertToXML(md->name()) << "</link>";
+ if (enumFields!=0)
+ {
+ MemberListIterator emli(*enumFields);
+ MemberDef *emd;
+ t << "{";
+ int cnt=0;
+ for (emli.toFirst();(emd=emli.current());++emli)
+ {
+ if (cnt!=0)
+ {
+ t << ", ";
+ }
+ t << "<link linkend=\"" << memberOutputFileBase(emd) << "_1" << emd->anchor() << "\">";
+ writeDocbookString(t,emd->name());
+ t << "</link>";
+ if (!emd->initializer().isEmpty())
+ {
+ t << "=";
+ writeDocbookString(t,emd->initializer());
+ }
+ cnt++;
+ }
+ t << "}";
+ }
+ }
+ else if (md->memberType()==MemberType_Define)
+ {
+ t << " <para>" << "#" << memType << " <link linkend=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << convertToXML(md->name()) << "</link>";
+ if (!md->initializer().isEmpty() && md->initializer().length()<2000)
+ {
+ t << " ";
+ linkifyText(TextGeneratorDocbookImpl(t),def,md->getBodyDef(),md,md->initializer());
+ }
+ if (md->briefDescription())
+ {
+ t << "<para><emphasis>";
+ writeDocbookString(t,md->briefDescription());
+ t << "</emphasis></para>" << endl;
+ }
+ }
+ else if (md->memberType()==MemberType_Variable)
+ {
+ if (md->getClassDef())
+ {
+ t << " <para>" << convertToXML(md->declaration());
+ if (md->briefDescription())
+ {
+ t << "<para><emphasis>";
+ writeDocbookString(t,md->briefDescription());
+ t << "</emphasis></para>";
+ }
+ }
+ else
+ {
+ t << " <para>";
+ linkifyText(TextGeneratorDocbookImpl(t),def,md->getBodyDef(),md,md->typeString());
+ t << " <link linkend=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << convertToXML(md->name()) << "</link>";
+ }
+ }
+ else if (md->memberType()==MemberType_Typedef)
+ {
+ t << " <para>" << memType;
+ t << " ";
+ linkifyText(TextGeneratorDocbookImpl(t),def,md->getBodyDef(),md,md->typeString());
+ t << " ";
+ t << " <link linkend=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << convertToXML(md->name()) << "</link>";
+ }
+ else if (md->memberType()==MemberType_Function)
+ {
+ t << " <para>";
+ linkifyText(TextGeneratorDocbookImpl(t),def,md->getBodyDef(),md,md->typeString());
+ t << " <link linkend=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << convertToXML(md->name()) << "</link>";
+ t << " (" << endl;
+ LockingPtr<ArgumentList> declAl = md->declArgumentList();
+ LockingPtr<ArgumentList> defAl = md->argumentList();
+ if (declAl!=0 && declAl->count()>0)
+ {
+ ArgumentListIterator declAli(*declAl);
+ ArgumentListIterator defAli(*defAl);
+ Argument *a;
+ int cnt=0;
+ for (declAli.toFirst();(a=declAli.current());++declAli)
+ {
+ if (cnt!=0)
+ {
+ t << ", ";
+ }
+ if (!a->type.isEmpty())
+ {
+ linkifyText(TextGeneratorDocbookImpl(t),def,md->getBodyDef(),md,a->type);
+ }
+ t << " ";
+ if (!a->name.isEmpty())
+ {
+ writeDocbookString(t,a->name);
+ }
+ cnt++;
+ }
+ }
+ t << ")";
+ }
+ else
+ {
+ closePara = FALSE;
+ }
+ if (closePara) t << "</para>" << endl;
+ t << " </listitem>" << endl;
+ t << " </itemizedlist>" << endl;
+ t << " </para>" << endl;
+ }
+ else
+ {
+ if (md->memberType()==MemberType_Enumeration)
+ {
+ LockingPtr<MemberList> enumFields = md->enumFieldList();
+ t << " <section xml:id=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << endl;
+ t << " <title>" << memType << " " << convertToXML(md->name()) << " " << "</title>" << endl;
+ t << " ";
+ writeDocbookDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
+ t << endl;
+ if (enumFields!=0)
+ {
+ MemberListIterator emli(*enumFields);
+ MemberDef *emd;
+ t << " <formalpara>" << endl;
+ t << " <title>Enumerator:</title>" << endl;
+ t << " <variablelist>" << endl;
+ for (emli.toFirst();(emd=emli.current());++emli)
+ {
+ t << " <varlistentry xml:id=\"";
+ t << memberOutputFileBase(emd) << "_1" << emd->anchor() << "\">" << endl;
+ t << " <term>";
+ writeDocbookString(t,emd->name());
+ t << "</term>" << endl;
+ t << " <listitem>" << endl;
+ t << " <para>";
+ writeDocbookString(t,emd->briefDescription());
+ t << "</para>" << endl;
+ t << " </listitem>" << endl;
+ t << " </varlistentry>" << endl;
+ }
+ t << " </variablelist>" << endl;
+ t << " </formalpara>" << endl;
+ t << " <para>";
+ t << "Definition at line " << md->getDefLine() << " of file " << stripPath(md->getDefFileName()) << endl;
+ t << " <programlisting>" << endl;
+ t << "{" << endl;
+ for (emli.toFirst();(emd=emli.current());++emli)
+ {
+ writeDocbookString(t,emd->name());
+ if (!emd->initializer().isEmpty())
+ {
+ t << "=";
+ writeDocbookString(t,emd->initializer());
+ }
+ t << ", " << endl;
+ }
+ t << "}" << convertToXML(md->name()) << ";" << endl;
+ t << " </programlisting>" << endl;
+ t << " </para>" << endl;
+ t << " </section>" << endl;
+ }
+ }
+ else if (md->memberType()==MemberType_Typedef)
+ {
+ t << " <section xml:id=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << endl;
+ t << " <title>" << convertToXML(md->definition()) << "</title>";
+ t << " <emphasis>";
+ writeDocbookString(t,md->briefDescription());
+ t << "</emphasis>" << endl;
+ t << " ";
+ writeDocbookDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
+ t << endl;
+ t << " </section>" << endl;
+ }
+ else if (md->memberType()==MemberType_Function)
+ {
+ t << " <section xml:id=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << endl;
+ t << " <title>" << convertToXML(md->definition()) << " " << convertToXML(md->argsString()) << "</title>";
+ t << " <emphasis>";
+ writeDocbookString(t,md->briefDescription());
+ t << "</emphasis>" << endl;
+ t << " ";
+ writeDocbookDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
+ t << endl;
+ t << " </section>" << endl;
+ }
+ else if (md->memberType()==MemberType_Define)
+ {
+ if (md->documentation())
+ {
+ t << " <section xml:id=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << endl;
+ t << " <title>" << convertToXML(md->definition()) << "</title>";
+ t << " ";
+ writeDocbookDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
+ t << endl;
+ t << " <para>Definition at line " << md->getDefLine() << " of file " << stripPath(md->getDefFileName()) << "</para>" << endl;
+ t << " <para>The Documentation for this define was generated from the following file: </para>" << endl;
+ t << " <para><itemizedlist><listitem><para>" << stripPath(md->getDefFileName()) << "</para></listitem></itemizedlist></para>" << endl;
+ t << " </section>" << endl;
+ }
+ }
+ else if (md->memberType()==MemberType_Variable)
+ {
+ if (md->getClassDef())
+ {
+ if (md->documentation())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>" << convertToXML(md->definition()) << "</title>";
+ t << " ";
+ writeDocbookDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
+ t << endl;
+ t << " <para>Definition at line " << md->getDefLine() << " of file " << stripPath(md->getDefFileName()) << "</para>" << endl;
+ t << " <para>The Documentation for this struct was generated from the following file: </para>" << endl;
+ t << " <para><itemizedlist><listitem><para>" << stripPath(md->getDefFileName()) << "</para></listitem></itemizedlist></para>" << endl;
+ t << " </simplesect>" << endl;
+ }
+ }
+ else
+ {
+ t << " <section xml:id=\"";
+ if (md->getGroupDef() && def->definitionType()==Definition::TypeGroup)
+ {
+ t << md->getGroupDef()->getOutputFileBase();
+ }
+ else
+ {
+ t << memberOutputFileBase(md);
+ }
+ t << "_1" << md->anchor() << "\">" << endl;
+ t << " <title>" << convertToXML(md->definition()) << "</title>";
+ t << " <emphasis>";
+ writeDocbookString(t,md->briefDescription());
+ t << "</emphasis>" << endl;
+ t << " ";
+ writeDocbookDocBlock(t,md->docFile(),md->docLine(),md->getOuterScope(),md,md->documentation());
+ t << endl;
+ t << " </section>" << endl;
+ }
+ }
+ }
+}
+
+static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,const char *kind,
+ bool detailed=0, const char *header=0,const char *documentation=0)
+{
+ if (ml==0) return;
+ MemberListIterator mli(*ml);
+ MemberDef *md;
+ int count=0;
+ int doc_count=0;
+ QCString compkind = kind;
+ QCString title, desctitle;
+
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ // namespace members are also inserted in the file scope, but
+ // to prevent this duplication in the Docbook output, we filter those here.
+ if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ {
+ count++;
+ }
+ }
+
+ switch (ml->listType())
+ {
+ case MemberListType_decDefineMembers: title="Defines"; desctitle="Define Documentation"; break;
+ case MemberListType_decTypedefMembers: title="Typedefs"; desctitle="Typedef Documentation"; break;
+ case MemberListType_decEnumMembers: title="Enumerations"; desctitle="Enumeration Type documentation"; break;
+ case MemberListType_decFuncMembers: title="Functions"; desctitle="Function Documentation"; break;
+ case MemberListType_decVarMembers: title="Variables"; desctitle="Variable Documentation"; break;
+ case MemberListType_pubAttribs: title="Public Attributes"; desctitle="Member Documentation"; break;
+ case MemberListType_priAttribs: title="Private Attributes"; desctitle="Member Documentation"; break;
+ case MemberListType_proAttribs: title="Protected Attributes";desctitle="Member Documentation"; break;
+ default: title=""; desctitle=""; break;
+ }
+
+ if (count==0) return; // empty list
+
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ if (md->documentation())
+ {
+ doc_count++;
+ }
+ }
+
+ if (detailed)
+ {
+ if (desctitle)
+ {
+ if (desctitle=="Member Documentation")
+ {
+ if (doc_count > 0)
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>" << desctitle << "</title>" << endl;
+ }
+ }
+ else if (desctitle=="Define Documentation")
+ {
+ if (doc_count > 0)
+ {
+ t << " <section>" << endl;
+ t << " <title>" << desctitle << "</title>" << endl;
+ }
+ }
+ else
+ {
+ t << " <section>" << endl;
+ t << " <title>" << desctitle << "</title>" << endl;
+ }
+ }
+ } else
+ {
+ t << " <simplesect>" << endl;
+ if (header)
+ {
+ t << " <title>" << convertToXML(header) << "</title>" << endl;
+ }
+ else
+ {
+ t << " <title>" << title << "</title>" << endl;
+ }
+ }
+
+ if (documentation)
+ {
+ t << " <description>";
+ writeDocbookDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
+ t << "</description>" << endl;
+ }
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ // namespace members are also inserted in the file scope, but
+ // to prevent this duplication in the Docbook output, we filter those here.
+ if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ {
+ generateDocbookForMember(md,t,d,detailed);
+ }
+ }
+ if (detailed)
+ {
+ if (desctitle)
+ {
+ if (desctitle=="Member Documentation")
+ {
+ if (doc_count > 0)
+ {
+ t << " </simplesect>" << endl;
+ }
+ }
+ else if (desctitle=="Define Documentation")
+ {
+ if (doc_count > 0)
+ {
+ t << " </section>" << endl;
+ }
+ }
+ else
+ {
+ t << " </section>" << endl;
+ }
+ }
+ }
+ else
+ {
+ t << " </simplesect>" << endl;
+ }
+}
+
+static void writeInnerClasses(const ClassSDict *cl,FTextStream &t)
+{
+ if (cl)
+ {
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ QCString title = "Classes";
+
+ if (cli.toFirst())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title> " << title << " </title>" << endl;
+ }
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ if (!cd->isHidden() && cd->name().find('@')==-1)
+ {
+ t << " <para>" << endl;
+ t << " <itemizedlist>" << endl;
+ t << " <listitem>" << endl;
+ t << " <para>" << "struct <link linkend=\"" << classOutputFileBase(cd) << "\">" << convertToXML(cd->name()) << "</link>";
+ t << "</para>" << endl;
+ t << " </listitem>" << endl;
+ t << " </itemizedlist>" << endl;
+ t << " </para>" << endl;
+ }
+ }
+ if (cli.toFirst())
+ {
+ t << " </simplesect>" << endl;
+ }
+ }
+}
+
+static void writeInnerNamespaces(const NamespaceSDict *nl,FTextStream &t)
+{
+ if (nl)
+ {
+ NamespaceSDict::Iterator nli(*nl);
+ NamespaceDef *nd;
+ QCString title = "Namespaces";
+
+ if (nli.toFirst())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title> " << title << " </title>" << endl;
+ }
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ if (!nd->isHidden() && nd->name().find('@')==-1) // skip anonymouse scopes
+ {
+ t << " <para>" << endl;
+ t << " <itemizedlist>" << endl;
+ t << " <listitem>" << endl;
+ t << " <para>" << "struct <link linkend=\"" << nd->getOutputFileBase() << "\">" << convertToXML(nd->name()) << "</link>";
+ t << "</para>" << endl;
+ t << " </listitem>" << endl;
+ t << " </itemizedlist>" << endl;
+ t << " </para>" << endl;
+ }
+ }
+ if (nli.toFirst())
+ {
+ t << " </simplesect>" << endl;
+ }
+ }
+}
+
+static void writeInnerFiles(const FileList *fl,FTextStream &t)
+{
+ if (fl)
+ {
+ QListIterator<FileDef> fli(*fl);
+ FileDef *fd;
+ QCString title = "Files";
+
+ if (fli.toFirst())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title> " << title << " </title>" << endl;
+ }
+ for (fli.toFirst();(fd=fli.current());++fli)
+ {
+ t << " <para>" << endl;
+ t << " <itemizedlist>" << endl;
+ t << " <listitem>" << endl;
+ t << " <para>" << "file <link linkend=\"" << fd->getOutputFileBase() << "\">" << convertToXML(fd->name()) << "</link>";
+ t << "</para>" << endl;
+ t << " </listitem>" << endl;
+ t << " </itemizedlist>" << endl;
+ t << " </para>" << endl;
+ }
+ if (fli.toFirst())
+ {
+ t << " </simplesect>" << endl;
+ }
+ }
+}
+
+static void writeInnerPages(const PageSDict *pl,FTextStream &t)
+{
+ if (pl)
+ {
+ PageSDict::Iterator pli(*pl);
+ PageDef *pd;
+
+ for (pli.toFirst();(pd=pli.current());++pli)
+ {
+ t << "<xi:include href=\"" << pd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ }
+ }
+}
+
+static void writeInnerGroups(const GroupList *gl,FTextStream &t)
+{
+ if (gl)
+ {
+ GroupListIterator gli(*gl);
+ GroupDef *sgd;
+
+ //Docbook header tags for inner groups
+ if (gli.toFirst())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>Modules</title>" << endl;
+ t << " </simplesect>" << endl;
+ t << " <para>" << endl;
+ t << " <itemizedlist>" << endl;
+ }
+
+ for (gli.toFirst();(sgd=gli.current());++gli)
+ {
+ t << " <listitem><para><link linkend=\"" << sgd->getOutputFileBase() << "\">" << convertToXML(sgd->groupTitle()) << "</link></para></listitem>" << endl;
+ }
+
+ //Docbook footer tags for inner groups
+ if (gli.toFirst())
+ {
+ t << " </itemizedlist>" << endl;
+ t << " </para>" << endl;
+ }
+
+ }
+}
+
+static void writeInnerDirs(const DirList *dl,FTextStream &t)
+{
+ if (dl)
+ {
+ QListIterator<DirDef> subdirs(*dl);
+ DirDef *subdir;
+ QCString title = "Directories";
+ if (subdirs.toFirst())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title> " << title << " </title>" << endl;
+ }
+ for (subdirs.toFirst();(subdir=subdirs.current());++subdirs)
+ {
+ t << " <para>" << endl;
+ t << " <itemizedlist>" << endl;
+ t << " <listitem>" << endl;
+ t << " <para>" << "dir <link linkend=\"" << subdir->getOutputFileBase() << "\">" << convertToXML(subdir->displayName()) << "</link>";
+ t << "</para>" << endl;
+ t << " </listitem>" << endl;
+ t << " </itemizedlist>" << endl;
+ t << " </para>" << endl;
+ }
+ if (subdirs.toFirst())
+ {
+ t << " </simplesect>" << endl;
+ }
+ }
+}
+
+static void writeInnerGroupFiles(const GroupList *gl,FTextStream &t)
+{
+ if (gl)
+ {
+ GroupListIterator gli(*gl);
+ GroupDef *sgd;
+
+ for (gli.toFirst();(sgd=gli.current());++gli)
+ {
+ t << "<xi:include href=\"" << sgd->getOutputFileBase() << ".xml\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ }
+ }
+}
+
+static void generateDocbookForClass(ClassDef *cd,FTextStream &ti)
+{
+ // + brief description
+ // + detailed description
+ // + template argument list(s)
+ // - include file
+ // + member groups
+ // + inheritance diagram
+ // + list of direct super classes
+ // + list of direct sub classes
+ // + list of inner classes
+ // + collaboration diagram
+ // + list of all members
+ // + user defined member sections
+ // + standard member sections
+ // + detailed member documentation
+ // - examples using the class
+
+ if (cd->isReference()) return; // skip external references.
+ if (cd->isHidden()) return; // skip hidden classes.
+ if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
+ if (cd->templateMaster()!=0) return; // skip generated template instances.
+
+ msg("Generating Docbook output for class %s\n",cd->name().data());
+
+ QCString fileDocbook=cd->getOutputFileBase()+".xml";
+ //Add the file Documentation info to index file
+ ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+
+ QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString fileName=outputDirectory+"/"+ classOutputFileBase(cd)+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+
+ writeDocbookHeader_ID(t, classOutputFileBase(cd));
+ t << "<title>";
+ writeDocbookString(t,cd->name());
+ t << " " << cd->compoundTypeString() << " Reference";
+ t << "</title>" << endl;
+
+ IncludeInfo *ii=cd->includeInfo();
+ if (ii)
+ {
+ QCString nm = ii->includeName;
+ if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
+ if (!nm.isEmpty())
+ {
+ t << "<para>" << endl;
+ t << " <programlisting>#include ";
+ if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
+ {
+ t << "<link linkend=\"" << ii->fileDef->getOutputFileBase() << "\">";
+ }
+ t << "&lt;" << nm << "&gt;" << "</link>";
+ t << "</programlisting>" << endl;
+ t << "</para>" << endl;
+ }
+ }
+
+ writeInnerClasses(cd->getClassSDict(),t);
+
+ writeTemplateList(cd,t);
+ if (cd->getMemberGroupSDict())
+ {
+ MemberGroupSDict::Iterator mgli(*cd->getMemberGroupSDict());
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateDocbookSection(cd,t,mg->members(),"user-defined",0,mg->header(),
+ mg->documentation());
+ }
+ }
+
+
+ QListIterator<MemberList> mli(cd->getMemberLists());
+ MemberList *ml;
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_detailedLists)==0)
+ {
+ generateDocbookSection(cd,t,ml,g_docbookSectionMapper.find(ml->listType()));
+ }
+ }
+ if (cd->briefDescription())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>Brief Description</title>" << endl;
+ writeDocbookDocBlock(t,cd->briefFile(),cd->briefLine(),cd,0,cd->briefDescription());
+ t << " </simplesect>" << endl;
+ }
+
+ if (cd->documentation())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>Detailed Description</title>" << endl;
+ writeDocbookDocBlock(t,cd->docFile(),cd->docLine(),cd,0,cd->documentation());
+ t << " <para>Definition at line " << cd->getDefLine() << " of file " << stripPath(cd->getDefFileName()) << "</para>" << endl;
+ t << " <para>The Documentation for this struct was generated from the following file: </para>" << endl;
+ t << " <para><itemizedlist><listitem><para>" << stripPath(cd->getDefFileName()) << "</para></listitem></itemizedlist></para>" << endl;
+ t << " </simplesect>" << endl;
+ }
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_detailedLists)==0)
+ {
+ generateDocbookSection(cd,t,ml,g_docbookSectionMapper.find(ml->listType()),1);
+ }
+ }
+
+ /*// TODO: Handling of Inheritance and Colloboration graph for Docbook to be implemented
+ DotClassGraph inheritanceGraph(cd,DotNode::Inheritance);
+ if (!inheritanceGraph.isTrivial())
+ {
+ t << " <inheritancegraph>" << endl;
+ inheritanceGraph.writeDocbook(t);
+ t << " </inheritancegraph>" << endl;
+ }
+ DotClassGraph collaborationGraph(cd,DotNode::Collaboration);
+ if (!collaborationGraph.isTrivial())
+ {
+ t << " <collaborationgraph>" << endl;
+ collaborationGraph.writeDocbook(t);
+ t << " </collaborationgraph>" << endl;
+ }
+ t << " <location file=\""
+ << cd->getDefFileName() << "\" line=\""
+ << cd->getDefLine() << "\"";
+ if (cd->getStartBodyLine()!=-1)
+ {
+ FileDef *bodyDef = cd->getBodyDef();
+ if (bodyDef)
+ {
+ t << " bodyfile=\"" << bodyDef->absFilePath() << "\"";
+ }
+ t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
+ << cd->getEndBodyLine() << "\"";
+ }
+ t << "/>" << endl;
+ writeListOfAllMembers(cd,t);
+ */
+
+ t << "</section>" << endl;
+
+}
+
+static void generateDocbookForNamespace(NamespaceDef *nd,FTextStream &ti)
+{
+ // + contained class definitions
+ // + contained namespace definitions
+ // + member groups
+ // + normal members
+ // + brief desc
+ // + detailed desc
+ // + location
+ // - files containing (parts of) the namespace definition
+
+ if (nd->isReference() || nd->isHidden()) return; // skip external references
+
+ QCString fileDocbook=nd->getOutputFileBase()+".xml";
+ //Add the file Documentation info to index file
+ ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+
+ QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString fileName=outputDirectory+"/"+nd->getOutputFileBase()+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+
+ writeDocbookHeader_ID(t, nd->getOutputFileBase());
+ t << "<title>";
+ writeDocbookString(t,nd->name());
+ t << "</title>" << endl;
+
+ writeInnerClasses(nd->getClassSDict(),t);
+ writeInnerNamespaces(nd->getNamespaceSDict(),t);
+
+ if (nd->getMemberGroupSDict())
+ {
+ MemberGroupSDict::Iterator mgli(*nd->getMemberGroupSDict());
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateDocbookSection(nd,t,mg->members(),"user-defined",0,mg->header(),
+ mg->documentation());
+ }
+ }
+
+ QListIterator<MemberList> mli(nd->getMemberLists());
+ MemberList *ml;
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_declarationLists)!=0)
+ {
+ generateDocbookSection(nd,t,ml,g_docbookSectionMapper.find(ml->listType()));
+ }
+ }
+
+ if (nd->briefDescription())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>Brief Description</title>" << endl;
+ writeDocbookDocBlock(t,nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription());
+ t << " </simplesect>" << endl;
+ }
+
+ if (nd->documentation())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>Detailed Description</title>" << endl;
+ writeDocbookDocBlock(t,nd->docFile(),nd->docLine(),nd,0,nd->documentation());
+ t << " <para>Definition at line " << nd->getDefLine() << " of file " << stripPath(nd->getDefFileName()) << "</para>" << endl;
+ t << " <para>The Documentation for this struct was generated from the following file: </para>" << endl;
+ t << " <para><itemizedlist><listitem><para>" << stripPath(nd->getDefFileName()) << "</para></listitem></itemizedlist></para>" << endl;
+ t << " </simplesect>" << endl;
+ }
+ t << "</section>" << endl;
+}
+
+static void generateDocbookForFile(FileDef *fd,FTextStream &ti)
+{
+ // + includes files
+ // + includedby files
+ // + include graph
+ // + included by graph
+ // + contained class definitions
+ // + contained namespace definitions
+ // + member groups
+ // + normal members
+ // + brief desc
+ // + detailed desc
+ // + source code
+ // + location
+ // - number of lines
+
+ if (fd->isReference()) return; // skip external references
+
+ QCString fileDocbook=fd->getOutputFileBase()+".xml";
+ //Add the file Documentation info to index file
+ ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+
+ QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml";
+
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+ writeDocbookHeader_ID(t, fd->getOutputFileBase());
+
+ t << " <title>";
+ writeDocbookString(t,fd->name());
+ t << " File Reference";
+ t << "</title>" << endl;
+
+ IncludeInfo *inc;
+
+ if (fd->includeFileList())
+ {
+ QListIterator<IncludeInfo> ili1(*fd->includeFileList());
+ for (ili1.toFirst();(inc=ili1.current());++ili1)
+ {
+ t << " <programlisting>#include ";
+ t << inc->includeName;
+ t << "</programlisting>" << endl;
+ }
+ }
+
+ if (fd->getClassSDict())
+ {
+ writeInnerClasses(fd->getClassSDict(),t);
+ }
+ if (fd->getNamespaceSDict())
+ {
+ writeInnerNamespaces(fd->getNamespaceSDict(),t);
+ }
+
+ if (fd->getMemberGroupSDict())
+ {
+ MemberGroupSDict::Iterator mgli(*fd->getMemberGroupSDict());
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateDocbookSection(fd,t,mg->members(),"user-defined",0,mg->header(),
+ mg->documentation());
+ }
+ }
+
+ QListIterator<MemberList> mli(fd->getMemberLists());
+ MemberList *ml;
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_declarationLists)!=0)
+ {
+ generateDocbookSection(fd,t,ml,g_docbookSectionMapper.find(ml->listType()));
+ }
+ }
+
+ t << " <simplesect>" << endl;
+ t << " <title>Detailed Description</title>" << endl;
+ writeDocbookDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription());
+ writeDocbookDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation());
+ t << " <para>Definition in file " << fd->getDefFileName() << "</para>" << endl;
+ t << " </simplesect>" << endl;
+
+ /*// TODO: Handling of Program listing for Docbook to be implemented
+ if (Config_getBool("DOCBOOK_PROGRAMLISTING"))
+ {
+ t << " <programlisting>" << endl;
+ writeDocbookCodeBlock(t,fd);
+ t << " </programlisting>" << endl;
+ }
+ */
+
+ t << "</section>" << endl;
+
+}
+
+static void generateDocbookForGroup(GroupDef *gd,FTextStream &ti)
+{
+ // + members
+ // + member groups
+ // + files
+ // + classes
+ // + namespaces
+ // - packages
+ // + pages
+ // + child groups
+ // - examples
+ // + brief description
+ // + detailed description
+
+ if (gd->isReference()) return; // skip external references
+
+ if (!gd->isASubGroup())
+ {
+ QCString fileDocbook=gd->getOutputFileBase()+".xml";
+ //Add the file Documentation info to index file
+ ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ }
+
+ QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString fileName=outputDirectory+"/"+gd->getOutputFileBase()+".xml";
+
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+ writeDocbookHeader_ID(t, gd->getOutputFileBase());
+
+ t << " <title>" << convertToXML(gd->groupTitle()) << "</title>" << endl;
+
+ if (gd->briefDescription())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>Brief Description</title>" << endl;
+ writeDocbookDocBlock(t,gd->briefFile(),gd->briefLine(),gd,0,gd->briefDescription());
+ t << " </simplesect>" << endl;
+ }
+
+ if (gd->documentation())
+ {
+ t << " <simplesect>" << endl;
+ t << " <title>Detailed Description</title>" << endl;
+ writeDocbookDocBlock(t,gd->docFile(),gd->docLine(),gd,0,gd->documentation());
+ t << " </simplesect>" << endl;
+ }
+
+ writeInnerFiles(gd->getFiles(),t);
+ writeInnerClasses(gd->getClasses(),t);
+ writeInnerNamespaces(gd->getNamespaces(),t);
+ writeInnerPages(gd->getPages(),t);
+ writeInnerGroups(gd->getSubGroups(),t);
+
+ if (gd->getMemberGroupSDict())
+ {
+ MemberGroupSDict::Iterator mgli(*gd->getMemberGroupSDict());
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateDocbookSection(gd,t,mg->members(),"user-defined",0,mg->header(),
+ mg->documentation());
+ }
+ }
+
+ QListIterator<MemberList> mli(gd->getMemberLists());
+ MemberList *ml;
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_declarationLists)!=0)
+ {
+ generateDocbookSection(gd,t,ml,g_docbookSectionMapper.find(ml->listType()));
+ }
+ }
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_declarationLists)!=0)
+ {
+ generateDocbookSection(gd,t,ml,g_docbookSectionMapper.find(ml->listType()),1);
+ }
+ }
+
+ writeInnerGroupFiles(gd->getSubGroups(),t);
+
+ t << "</section>" << endl;
+
+}
+
+static void generateDocbookForDir(DirDef *dd,FTextStream &ti)
+{
+ if (dd->isReference()) return; // skip external references
+
+ QCString fileDocbook=dd->getOutputFileBase()+".xml";
+ //Add the file Documentation info to index file
+ ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+
+ QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+ writeDocbookHeader_ID(t, dd->getOutputFileBase());
+
+ t << " <title>";
+ writeDocbookString(t, dd->displayName());
+ t << " Directory Reference";
+ t << "</title>" << endl;
+
+ writeInnerDirs(&dd->subDirs(),t);
+ writeInnerFiles(dd->getFiles(),t);
+
+ t << " <simplesect>" << endl;
+ t << " <title>Detailed Description</title>" << endl;
+ writeDocbookDocBlock(t,dd->briefFile(),dd->briefLine(),dd,0,dd->briefDescription());
+ writeDocbookDocBlock(t,dd->docFile(),dd->docLine(),dd,0,dd->documentation());
+ t << " <para>Directory location is " << dd->name() << "</para>" << endl;
+ t << " </simplesect>" << endl;
+
+ t << "</section>" << endl;
+}
+
+static void generateDocbookForPage(PageDef *pd,FTextStream &ti,bool isExample)
+{
+ // + name
+ // + title
+ // + documentation
+
+ if (pd->isReference()) return;
+
+ QCString pageName = pd->getOutputFileBase();
+ if (pd->getGroupDef())
+ {
+ pageName+=(QCString)"_"+pd->name();
+ }
+ if (pageName=="index")
+ {
+ pageName="mainpage"; // to prevent overwriting the generated index page.
+ }
+
+ QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString fileName=outputDirectory+"/"+pageName+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+
+ if (!pd->hasParentPage())
+ {
+ QCString fileDocbook=pageName+".xml";
+ //Add the file Documentation info to index file
+ ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
+ writeDocbookHeaderMainpage(t);
+ }
+ else
+ {
+ QCString pid = pageName+"_1"+pageName;
+ writeDocbookHeader_ID(t, pid);
+ }
+
+ SectionInfo *si = Doxygen::sectionDict->find(pd->name());
+ if (si)
+ {
+ t << " <title>" << convertToXML(si->title) << "</title>" << endl;
+ }
+ else
+ {
+ t << " <title>" << convertToXML(pd->name()) << "</title>" << endl;
+ }
+
+ if (isExample)
+ {
+ writeDocbookDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
+ pd->documentation()+"\n&lt;include "+pd->name()+"&gt;");
+ }
+ else
+ {
+ writeDocbookDocBlock(t,pd->docFile(),pd->docLine(),pd,0,
+ pd->documentation());
+ }
+ writeInnerPages(pd->getSubPages(),t);
+
+ if (!pd->hasParentPage())
+ {
+ t << endl << "</chapter>" << endl;
+ }
+ else
+ {
+ t << endl << "</section>" << endl;
+ }
+}
+
+void generateDocbook()
+{
+
+ // + classes
+ // + namespaces
+ // + files
+ // + groups
+ // + related pages
+ // - examples
+
+ QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ if (outputDirectory.isEmpty())
+ {
+ outputDirectory=QDir::currentDirPath().utf8();
+ }
+ else
+ {
+ QDir dir(outputDirectory);
+ if (!dir.exists())
+ {
+ dir.setPath(QDir::currentDirPath());
+ if (!dir.mkdir(outputDirectory))
+ {
+ err("error: tag DOCBOOK_OUTPUT: Output directory `%s' does not "
+ "exist and cannot be created\n",outputDirectory.data());
+ exit(1);
+ }
+ else if (!Config_getBool("QUIET"))
+ {
+ err("notice: Output directory `%s' does not exist. "
+ "I have created it for you.\n", outputDirectory.data());
+ }
+ dir.cd(outputDirectory);
+ }
+ outputDirectory=dir.absPath().utf8();
+ }
+
+ QDir dir(outputDirectory);
+ if (!dir.exists())
+ {
+ dir.setPath(QDir::currentDirPath());
+ if (!dir.mkdir(outputDirectory))
+ {
+ err("Cannot create directory %s\n",outputDirectory.data());
+ return;
+ }
+ }
+ QDir docbookDir(outputDirectory);
+ createSubDirs(docbookDir);
+
+ QCString fileName=outputDirectory+"/index.xml";
+ QCString dbk_projectName = Config_getString("PROJECT_NAME");
+ QFile f(fileName);
+
+ f.setName(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+
+ // write index header for Docbook which calls the structure file
+ t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
+ t << "<book xmlns=\"http://docbook.org/ns/docbook\" version=\"5.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">" << endl;
+ t << " <info>" << endl;
+ t << " <title>" << dbk_projectName << "</title>" << endl;
+ t << " </info>" << endl;
+
+ // NAMESPACE DOCUMENTATION
+
+ NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict);
+ NamespaceDef *nd;
+
+ //Namespace Documentation index header
+ if (nli.toFirst())
+ {
+ t << " <chapter>" << endl;
+ t << " <title>Namespace Documentation</title>" << endl;
+ }
+
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ msg("Generating Docbook output for namespace %s\n",nd->name().data());
+ generateDocbookForNamespace(nd,t);
+ }
+
+ //Namespace Documentation index footer
+ if (nli.toFirst())
+ {
+ t << " </chapter>" << endl;
+ }
+
+ /** MAINPAGE DOCUMENTATION **/
+
+ if (Doxygen::mainPage)
+ {
+ msg("Generating Docbook output for the main page\n");
+ generateDocbookForPage(Doxygen::mainPage,t,FALSE);
+ }
+
+ // PAGE DOCUMENTATION
+ {
+ PageSDict::Iterator pdi(*Doxygen::pageSDict);
+ PageDef *pd=0;
+
+ for (pdi.toFirst();(pd=pdi.current());++pdi)
+ {
+ msg("Generating Docbook output for page %s\n",pd->name().data());
+ generateDocbookForPage(pd,t,FALSE);
+ }
+ }
+
+ /** MODULE GROUP DOCUMENTATION **/
+
+ GroupSDict::Iterator gli(*Doxygen::groupSDict);
+ GroupDef *gd;
+
+ //Module group Documentation index header
+ if (gli.toFirst())
+ {
+ t << " <chapter>" << endl;
+ t << " <title>Module Documentation</title>" << endl;
+ }
+
+ for (;(gd=gli.current());++gli)
+ {
+ msg("Generating Docbook output for group %s\n",gd->name().data());
+ generateDocbookForGroup(gd,t);
+ }
+
+ //Module group Documentation index footer
+ if (gli.toFirst())
+ {
+ t << " </chapter>" << endl;
+ }
+
+ //CLASS DOCUMENTATION
+
+ {
+ ClassSDict::Iterator cli(*Doxygen::classSDict);
+ ClassDef *cd;
+
+ //Class Documentation index header
+ if (cli.toFirst())
+ {
+ t << " <chapter>" << endl;
+ t << " <title>Class Documentation</title>" << endl;
+ }
+
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ generateDocbookForClass(cd,t);
+ }
+
+ //Class Documentation index footer
+ if (cli.toFirst())
+ {
+ t << " </chapter>" << endl;
+ }
+ }
+
+ // FILE DOCUMENTATION
+
+ FileNameListIterator fnli(*Doxygen::inputNameList);
+ FileName *fn;
+
+ //File Documentation index header
+ if (fnli.toFirst())
+ {
+ t << " <chapter>" << endl;
+ t << " <title>File Documentation</title>" << endl;
+ }
+
+ for (;(fn=fnli.current());++fnli)
+ {
+ FileNameIterator fni(*fn);
+ FileDef *fd;
+ for (;(fd=fni.current());++fni)
+ {
+ msg("Generating Docbook output for file %s\n",fd->name().data());
+ generateDocbookForFile(fd,t);
+ }
+ }
+
+ //File Documentation index footer
+ if (fnli.toFirst())
+ {
+ t << " </chapter>" << endl;
+ }
+
+ // DIRECTORY DOCUMENTATION
+
+ {
+ DirDef *dir;
+ DirSDict::Iterator sdi(*Doxygen::directories);
+
+ //Directory Documentation index header
+ if (sdi.toFirst())
+ {
+ t << " <chapter>" << endl;
+ t << " <title>Directory Documentation</title>" << endl;
+ }
+
+ for (sdi.toFirst();(dir=sdi.current());++sdi)
+ {
+ msg("Generate Docbook output for dir %s\n",dir->name().data());
+ generateDocbookForDir(dir,t);
+ }
+
+ //Module group Documentation index footer
+ if (sdi.toFirst())
+ {
+ t << " </chapter>" << endl;
+ }
+ }
+
+ // EXAMPLE PAGE DOCUMENTATION
+
+ {
+ PageSDict::Iterator pdi(*Doxygen::exampleSDict);
+ PageDef *pd=0;
+
+ //Example Page Documentation index header
+ if (pdi.toFirst())
+ {
+ t << " <chapter>" << endl;
+ t << " <title>Example Documentation</title>" << endl;
+ }
+
+ for (pdi.toFirst();(pd=pdi.current());++pdi)
+ {
+ msg("Generating Docbook output for example %s\n",pd->name().data());
+ generateDocbookForPage(pd,t,TRUE);
+ }
+
+ //Example Page Documentation index footer
+ if (pdi.toFirst())
+ {
+ t << " </chapter>" << endl;
+ }
+ }
+
+ t << "</book>" << endl;
+
+}
+
+
diff --git a/src/docbookgen.h b/src/docbookgen.h
new file mode 100644
index 0000000..344cb5b
--- /dev/null
+++ b/src/docbookgen.h
@@ -0,0 +1,20 @@
+/******************************************************************************
+*
+*
+*
+* Copyright (C) 1997-2012 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 DOCBOOKGEN_H
+#define DOCBOOKGEN_H
+
+void generateDocbook();
+
+#endif
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
new file mode 100644
index 0000000..8dedbff
--- /dev/null
+++ b/src/docbookvisitor.cpp
@@ -0,0 +1,1397 @@
+/******************************************************************************
+ *
+ *
+ *
+ *
+ * Copyright (C) 1997-2012 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 <qfileinfo.h>
+
+#include "docbookvisitor.h"
+#include "docparser.h"
+#include "language.h"
+#include "doxygen.h"
+#include "outputgen.h"
+#include "docbookgen.h"
+#include "dot.h"
+#include "message.h"
+#include "util.h"
+#include "parserintf.h"
+#include "filename.h"
+#include "config.h"
+#include "filedef.h"
+#include "msc.h"
+
+DocbookDocVisitor::DocbookDocVisitor(FTextStream &t,CodeOutputInterface &ci)
+ : DocVisitor(DocVisitor_Docbook), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
+{
+}
+
+//--------------------------------------
+// visitor functions for leaf nodes
+//--------------------------------------
+
+void DocbookDocVisitor::visit(DocWord *w)
+{
+ if (m_hide) return;
+ filter(w->word());
+}
+
+void DocbookDocVisitor::visit(DocLinkedWord *w)
+{
+ if (m_hide) return;
+ startLink(w->file(),w->anchor());
+ filter(w->word());
+ endLink();
+}
+
+void DocbookDocVisitor::visit(DocWhiteSpace *w)
+{
+ if (m_hide) return;
+ if (m_insidePre)
+ {
+ m_t << w->chars();
+ }
+ else
+ {
+ m_t << " ";
+ }
+}
+
+void DocbookDocVisitor::visit(DocSymbol *s)
+{
+ if (m_hide) return;
+ switch(s->symbol())
+ {
+ case DocSymbol::BSlash: m_t << "\\"; break;
+ case DocSymbol::At: m_t << "@"; break;
+ case DocSymbol::Less: m_t << "&lt;"; break;
+ case DocSymbol::Greater: m_t << "&gt;"; break;
+ case DocSymbol::Amp: m_t << "&amp;"; break;
+ case DocSymbol::Dollar: m_t << "$"; break;
+ case DocSymbol::Hash: m_t << "#"; break;
+ case DocSymbol::DoubleColon: m_t << "::"; break;
+ case DocSymbol::Percent: m_t << "%"; break;
+ case DocSymbol::Copy: m_t << "&#x00A9;"; break;
+ case DocSymbol::Tm: m_t << "&#8482;"; break;
+ case DocSymbol::Reg: m_t << "&#174;"; break;
+ case DocSymbol::Apos: m_t << "&apos;"; break;
+ case DocSymbol::Quot: m_t << "&quot;"; break;
+ case DocSymbol::Lsquo: m_t << "&#8216;"; break;
+ case DocSymbol::Rsquo: m_t << "&#8217;"; break;
+ case DocSymbol::Ldquo: m_t << "&#8220;"; break;
+ case DocSymbol::Rdquo: m_t << "&#8221;"; break;
+ case DocSymbol::Ndash: m_t << "&#8211;"; break;
+ case DocSymbol::Mdash: m_t << "&#8212;"; break;
+ case DocSymbol::Uml: m_t << "&#168;"; break;
+ case DocSymbol::Acute: m_t << "&#180;"; break;
+ case DocSymbol::Grave: m_t << "&#192;"; break;
+ case DocSymbol::Circ: m_t << "&#710;"; break;
+ case DocSymbol::Tilde: m_t << "&#732;"; break;
+ case DocSymbol::Szlig: m_t << "&#223;"; break;
+ case DocSymbol::Cedil: m_t << "&#184;"; break;
+ case DocSymbol::Ring: m_t << "&#197;"; break;
+ case DocSymbol::Slash: m_t << "&#216;"; break;
+ case DocSymbol::Nbsp: m_t << "&#160;"; break;
+ case DocSymbol::Aelig: m_t << "&#230;"; break;
+ case DocSymbol::AElig: m_t << "&#198;"; break;
+ case DocSymbol::GrkGamma: m_t << "&#915;"; break;
+ case DocSymbol::GrkDelta: m_t << "&#916;"; break;
+ case DocSymbol::GrkTheta: m_t << "&#920;"; break;
+ case DocSymbol::GrkLambda: m_t << "&#923;"; break;
+ case DocSymbol::GrkXi: m_t << "&#926;"; break;
+ case DocSymbol::GrkPi: m_t << "&#928;"; break;
+ case DocSymbol::GrkSigma: m_t << "&#931;"; break;
+ case DocSymbol::GrkUpsilon: m_t << "&#933;"; break;
+ case DocSymbol::GrkPhi: m_t << "&#934;"; break;
+ case DocSymbol::GrkPsi: m_t << "&#936;"; break;
+ case DocSymbol::GrkOmega: m_t << "&#937;"; break;
+ case DocSymbol::Grkalpha: m_t << "&#945;"; break;
+ case DocSymbol::Grkbeta: m_t << "&#946;"; break;
+ case DocSymbol::Grkgamma: m_t << "&#947;"; break;
+ case DocSymbol::Grkdelta: m_t << "&#948;"; break;
+ case DocSymbol::Grkepsilon: m_t << "&#949;"; break;
+ case DocSymbol::Grkzeta: m_t << "&#950;"; break;
+ case DocSymbol::Grketa: m_t << "&#951;"; break;
+ case DocSymbol::Grktheta: m_t << "&#952;"; break;
+ case DocSymbol::Grkiota: m_t << "&#953;"; break;
+ case DocSymbol::Grkkappa: m_t << "&#954;"; break;
+ case DocSymbol::Grklambda: m_t << "&#955;"; break;
+ case DocSymbol::Grkmu: m_t << "&#956;"; break;
+ case DocSymbol::Grknu: m_t << "&#957;"; break;
+ case DocSymbol::Grkxi: m_t << "&#958;"; break;
+ case DocSymbol::Grkpi: m_t << "&#960;"; break;
+ case DocSymbol::Grkrho: m_t << "&#961;"; break;
+ case DocSymbol::Grksigma: m_t << "&#963;"; break;
+ case DocSymbol::Grktau: m_t << "&#964;"; break;
+ case DocSymbol::Grkupsilon: m_t << "&#965;"; break;
+ case DocSymbol::Grkphi: m_t << "&#966;"; break;
+ case DocSymbol::Grkchi: m_t << "&#967;"; break;
+ case DocSymbol::Grkpsi: m_t << "&#968;"; break;
+ case DocSymbol::Grkomega: m_t << "&#969;"; break;
+ case DocSymbol::Grkvarsigma: m_t << "&#962;"; break;
+ case DocSymbol::Section: m_t << "<simplesect/>"; break;
+ case DocSymbol::Degree: m_t << "&#176;"; break;
+ case DocSymbol::Prime: m_t << "&#8242;"; break;
+ case DocSymbol::DoublePrime: m_t << "&#8243;"; break;
+ case DocSymbol::Infinity: m_t << "&#8734;"; break;
+ case DocSymbol::EmptySet: m_t << "&#8709;"; break;
+ case DocSymbol::PlusMinus: m_t << "&#177;"; break;
+ case DocSymbol::Times: m_t << "&#215;"; break;
+ case DocSymbol::Minus: m_t << "&#8722;"; break;
+ case DocSymbol::CenterDot: m_t << "&#8901;"; break;
+ case DocSymbol::Partial: m_t << "&#8706;"; break;
+ case DocSymbol::Nabla: m_t << "&#8711;"; break;
+ case DocSymbol::SquareRoot: m_t << "&#8730;"; break;
+ case DocSymbol::Perpendicular: m_t << "&#8869;"; break;
+ case DocSymbol::Sum: m_t << "&#8721;"; break;
+ case DocSymbol::Integral: m_t << "&#8747;"; break;
+ case DocSymbol::Product: m_t << "&#8719;"; break;
+ case DocSymbol::Similar: m_t << "&#8764;"; break;
+ case DocSymbol::Approx: m_t << "&#8776;"; break;
+ case DocSymbol::NotEqual: m_t << "&#8800;"; break;
+ case DocSymbol::Equivalent: m_t << "&#8801;"; break;
+ case DocSymbol::Proportional: m_t << "&#8733;"; break;
+ case DocSymbol::LessEqual: m_t << "&#8804;"; break;
+ case DocSymbol::GreaterEqual: m_t << "&#8805;"; break;
+ case DocSymbol::LeftArrow: m_t << "&#8592;"; break;
+ case DocSymbol::RightArrow: m_t << "&#8594;"; break;
+ case DocSymbol::SetIn: m_t << "&#8712;"; break;
+ case DocSymbol::SetNotIn: m_t << "&#8713;"; break;
+ case DocSymbol::LeftCeil: m_t << "&#8968;"; break;
+ case DocSymbol::RightCeil: m_t << "&#8969;"; break;
+ case DocSymbol::LeftFloor: m_t << "&#8970;"; break;
+ case DocSymbol::RightFloor: m_t << "&#8971;"; break;
+ default:
+ err("error: unknown symbol found\n");
+ }
+}
+
+void DocbookDocVisitor::visit(DocURL *u)
+{
+ if (m_hide) return;
+ m_t << "<link xlink:href=\"";
+ if (u->isEmail()) m_t << "mailto:";
+ filter(u->url());
+ m_t << "\">";
+ filter(u->url());
+ m_t << "</link>";
+}
+
+void DocbookDocVisitor::visit(DocLineBreak *)
+{
+ if (m_hide) return;
+ m_t << endl << "<literallayout>\n</literallayout>" << endl;
+}
+
+void DocbookDocVisitor::visit(DocHorRuler *)
+{
+ if (m_hide) return;
+ m_t << "<informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>\n";
+ m_t << "</entry></row></tbody></tgroup></informaltable>\n";
+}
+
+void DocbookDocVisitor::visit(DocStyleChange *s)
+{
+ if (m_hide) return;
+ switch (s->style())
+ {
+ case DocStyleChange::Bold:
+ if (s->enable()) m_t << "<emphasis role=\"bold\">"; else m_t << "</emphasis>";
+ break;
+ case DocStyleChange::Italic:
+ if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
+ break;
+ case DocStyleChange::Code:
+ if (s->enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
+ break;
+ case DocStyleChange::Subscript:
+ if (s->enable()) m_t << "<subscript>"; else m_t << "</subscript>";
+ break;
+ case DocStyleChange::Superscript:
+ if (s->enable()) m_t << "<superscript>"; else m_t << "</superscript>";
+ break;
+ case DocStyleChange::Center:
+ if (s->enable()) m_t << "<informaltable frame='none'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>";
+ else m_t << "</entry></row></tbody></tgroup></informaltable>";
+ break;
+ case DocStyleChange::Preformatted:
+ if (s->enable())
+ {
+ m_t << "<literallayout>";
+ m_insidePre=TRUE;
+ }
+ else
+ {
+ m_t << "</literallayout>";
+ m_insidePre=FALSE;
+ }
+ break;
+ /* There is no equivalent Docbook tag for rendering Small text */
+ case DocStyleChange::Small: /* XSLT Stylesheets can be used */ break;
+ /* HTML only */
+ case DocStyleChange::Div: /* HTML only */ break;
+ case DocStyleChange::Span: /* HTML only */ break;
+ }
+}
+
+void DocbookDocVisitor::visit(DocVerbatim *s)
+{
+ if (m_hide) return;
+ switch(s->type())
+ {
+ case DocVerbatim::Code: // fall though
+ m_t << "<programlisting>";
+ Doxygen::parserManager->getParser(m_langExt)
+ ->parseCode(m_ci,s->context(),s->text(),
+ s->isExample(),s->exampleFile());
+ m_t << "</programlisting>";
+ break;
+ case DocVerbatim::Verbatim:
+ m_t << "<programlisting><literallayout>";
+ filter(s->text());
+ m_t << "</literallayout></programlisting>";
+ break;
+ case DocVerbatim::HtmlOnly:
+ break;
+ case DocVerbatim::RtfOnly:
+ break;
+ case DocVerbatim::ManOnly:
+ break;
+ case DocVerbatim::LatexOnly:
+ break;
+ case DocVerbatim::XmlOnly:
+ break;
+ case DocVerbatim::DocbookOnly:
+ break;
+ m_t << s->text();
+ break;
+ case DocVerbatim::Dot:
+ {
+ static int dotindex = 1;
+ QCString baseName(4096);
+ QCString stext = s->text();
+ m_t << "<para>" << endl;
+ baseName.sprintf("%s%d",
+ (Config_getString("DOCBOOK_OUTPUT")+"/inline_dotgraph_").data(),
+ dotindex++
+ );
+ QFile file(baseName+".dot");
+ if (!file.open(IO_WriteOnly))
+ {
+ err("Could not open file %s.msc for writing\n",baseName.data());
+ }
+ file.writeBlock( stext, stext.length() );
+ file.close();
+ m_t << " <figure>" << endl;
+ m_t << " <title></title>" << endl;
+ m_t << " <mediaobject>" << endl;
+ m_t << " <imageobject>" << endl;
+ writeDotFile(baseName);
+ m_t << " </imageobject>" << endl;
+ m_t << " </mediaobject>" << endl;
+ m_t << " </figure>" << endl;
+ m_t << "</para>" << endl;
+ }
+ break;
+ case DocVerbatim::Msc:
+ static int mscindex = 1;
+ QCString baseName(4096);
+ QCString stext = s->text();
+ m_t << "<para>" << endl;
+ baseName.sprintf("%s%d",
+ (Config_getString("DOCBOOK_OUTPUT")+"/inline_mscgraph_").data(),
+ mscindex++
+ );
+ QFile file(baseName+".msc");
+ if (!file.open(IO_WriteOnly))
+ {
+ err("Could not open file %s.msc for writing\n",baseName.data());
+ }
+ QCString text = "msc {";
+ text+=stext;
+ text+="}";
+ file.writeBlock( text, text.length() );
+ file.close();
+ m_t << " <figure>" << endl;
+ m_t << " <title></title>" << endl;
+ m_t << " <mediaobject>" << endl;
+ m_t << " <imageobject>" << endl;
+ writeMscFile(baseName);
+ m_t << " </imageobject>" << endl;
+ m_t << " </mediaobject>" << endl;
+ m_t << " </figure>" << endl;
+ m_t << "</para>" << endl;
+ break;
+ }
+}
+
+void DocbookDocVisitor::visit(DocAnchor *anc)
+{
+ if (m_hide) return;
+ m_t << "<anchor id=\"" << anc->file() << "_1" << anc->anchor() << "\"/>";
+}
+
+void DocbookDocVisitor::visit(DocInclude *inc)
+{
+ if (m_hide) return;
+ switch(inc->type())
+ {
+ case DocInclude::IncWithLines:
+ {
+ m_t << "<programlisting>";
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,inc->context(),
+ inc->text(),
+ inc->isExample(),
+ inc->exampleFile(), &fd);
+ m_t << "</programlisting>";
+ }
+ break;
+ case DocInclude::Include:
+ m_t << "<programlisting>";
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,inc->context(),
+ inc->text(),
+ inc->isExample(),
+ inc->exampleFile());
+ m_t << "</programlisting>";
+ break;
+ case DocInclude::DontInclude:
+ break;
+ case DocInclude::HtmlInclude:
+ break;
+ case DocInclude::VerbInclude:
+ m_t << "<verbatim>";
+ filter(inc->text());
+ m_t << "</verbatim>";
+ break;
+ case DocInclude::Snippet:
+ m_t << "<programlisting>";
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ inc->isExample(),
+ inc->exampleFile()
+ );
+ m_t << "</programlisting>";
+ break;
+ }
+}
+
+void DocbookDocVisitor::visit(DocIncOperator *op)
+{
+ if (op->isFirst())
+ {
+ if (!m_hide)
+ {
+ m_t << "<programlisting>";
+ }
+ pushEnabled();
+ m_hide = TRUE;
+ }
+ if (op->type()!=DocIncOperator::Skip)
+ {
+ popEnabled();
+ if (!m_hide)
+ {
+ Doxygen::parserManager->getParser(m_langExt)
+ ->parseCode(m_ci,op->context(),
+ op->text(),op->isExample(),
+ op->exampleFile());
+ }
+ pushEnabled();
+ m_hide=TRUE;
+ }
+ if (op->isLast())
+ {
+ popEnabled();
+ if (!m_hide) m_t << "</programlisting>";
+ }
+ else
+ {
+ if (!m_hide) m_t << endl;
+ }
+}
+
+void DocbookDocVisitor::visit(DocFormula *f)
+{
+ if (m_hide) return;
+ m_t << "<equation><title>" << f->name() << "</title>";
+ filter(f->text());
+ m_t << "</equation>";
+}
+
+void DocbookDocVisitor::visit(DocIndexEntry *ie)
+{
+ if (m_hide) return;
+ m_t << "<indexentry><primaryie>" << endl;
+ filter(ie->entry());
+ m_t << "</primaryie><secondaryie></secondaryie></indexentry>" << endl;
+}
+
+void DocbookDocVisitor::visit(DocSimpleSectSep *)
+{
+ m_t << "<simplesect/>";
+}
+
+void DocbookDocVisitor::visit(DocCite *cite)
+{
+ if (m_hide) return;
+ if (!cite->file().isEmpty()) startLink(cite->file(),cite->anchor());
+ filter(cite->text());
+ if (!cite->file().isEmpty()) endLink();
+}
+
+//--------------------------------------
+// visitor functions for compound nodes
+//--------------------------------------
+
+void DocbookDocVisitor::visitPre(DocAutoList *l)
+{
+ if (m_hide) return;
+ if (l->isEnumList())
+ {
+ m_t << "<orderedlist>\n";
+ }
+ else
+ {
+ m_t << "<itemizedlist>\n";
+ }
+}
+
+void DocbookDocVisitor::visitPost(DocAutoList *l)
+{
+ if (m_hide) return;
+ if (l->isEnumList())
+ {
+ m_t << "</orderedlist>\n";
+ }
+ else
+ {
+ m_t << "</itemizedlist>\n";
+ }
+}
+
+void DocbookDocVisitor::visitPre(DocAutoListItem *)
+{
+ if (m_hide) return;
+ m_t << "<listitem>";
+}
+
+void DocbookDocVisitor::visitPost(DocAutoListItem *)
+{
+ if (m_hide) return;
+ m_t << "</listitem>";
+}
+
+void DocbookDocVisitor::visitPre(DocPara *)
+{
+ if (m_hide) return;
+ m_t << endl;
+ m_t << "<para>";
+}
+
+void DocbookDocVisitor::visitPost(DocPara *)
+{
+ if (m_hide) return;
+ m_t << "</para>";
+ m_t << endl;
+}
+
+void DocbookDocVisitor::visitPre(DocRoot *)
+{
+ //m_t << "<hr><h4><font color=\"red\">New parser:</font></h4>\n";
+}
+
+void DocbookDocVisitor::visitPost(DocRoot *)
+{
+ //m_t << "<hr><h4><font color=\"red\">Old parser:</font></h4>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocSimpleSect *s)
+{
+ if (m_hide) return;
+ switch(s->type())
+ {
+ case DocSimpleSect::See:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trSeeAlso() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trSeeAlso()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Return:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trReturns()<< ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trReturns()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Author:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, TRUE) << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trAuthor(TRUE, TRUE)) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Authors:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trAuthor(TRUE, FALSE) << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trAuthor(TRUE, FALSE)) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Version:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trVersion() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trVersion()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Since:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trSince() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trSince()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Date:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trDate() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trDate()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Note:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trNote() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trNote()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Warning:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trWarning() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trWarning()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Pre:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trPrecondition() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trPrecondition()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Post:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trPostcondition() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trPostcondition()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Copyright:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trCopyright() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trCopyright()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Invar:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trInvariant() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trInvariant()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Remark:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trRemarks() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trRemarks()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::Attention:
+ if (m_insidePre)
+ {
+ m_t << "<formalpara><title>" << theTranslator->trAttention() << ": </title>" << endl;
+ }
+ else
+ {
+ m_t << "<formalpara><title>" << convertToXML(theTranslator->trAttention()) << ": </title>" << endl;
+ }
+ break;
+ case DocSimpleSect::User:
+ m_t << "<formalpara><title></title>" << endl;
+ break;
+ case DocSimpleSect::Rcs:
+ m_t << "<formalpara><title></title>" << endl;
+ break;
+ case DocSimpleSect::Unknown: m_t << "<formalpara><title></title>" << endl; break;
+ }
+}
+
+void DocbookDocVisitor::visitPost(DocSimpleSect *)
+{
+ if (m_hide) return;
+ m_t << "</formalpara>" << endl;
+}
+
+void DocbookDocVisitor::visitPre(DocTitle *)
+{
+ if (m_hide) return;
+ m_t << "<title>";
+}
+
+void DocbookDocVisitor::visitPost(DocTitle *)
+{
+ if (m_hide) return;
+ m_t << "</title>";
+}
+
+void DocbookDocVisitor::visitPre(DocSimpleList *)
+{
+ if (m_hide) return;
+ m_t << "<itemizedlist>\n";
+}
+
+void DocbookDocVisitor::visitPost(DocSimpleList *)
+{
+ if (m_hide) return;
+ m_t << "</itemizedlist>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocSimpleListItem *)
+{
+ if (m_hide) return;
+ m_t << "<listitem>";
+}
+
+void DocbookDocVisitor::visitPost(DocSimpleListItem *)
+{
+ if (m_hide) return;
+ m_t << "</listitem>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocSection *s)
+{
+ if (m_hide) return;
+ m_t << "<section xml:id=\"" << s->file();
+ if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor();
+ m_t << "\">" << endl;
+ m_t << "<title>";
+ filter(s->title());
+ m_t << "</title>" << endl;
+}
+
+void DocbookDocVisitor::visitPost(DocSection *)
+{
+ m_t << "</section>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlList *s)
+{
+ if (m_hide) return;
+ if (s->type()==DocHtmlList::Ordered)
+ m_t << "<orderedlist>\n";
+ else
+ m_t << "<itemizedlist>\n";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlList *s)
+{
+ if (m_hide) return;
+ if (s->type()==DocHtmlList::Ordered)
+ m_t << "</orderedlist>\n";
+ else
+ m_t << "</itemizedlist>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlListItem *)
+{
+ if (m_hide) return;
+ m_t << "<listitem>\n";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlListItem *)
+{
+ if (m_hide) return;
+ m_t << "</listitem>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlDescList *)
+{
+ if (m_hide) return;
+ m_t << "<variablelist>\n";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlDescList *)
+{
+ if (m_hide) return;
+ m_t << "</variablelist>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlDescTitle *)
+{
+ if (m_hide) return;
+ m_t << "<varlistentry><term>";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlDescTitle *)
+{
+ if (m_hide) return;
+ m_t << "</term>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlDescData *)
+{
+ if (m_hide) return;
+ m_t << "<listitem>";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlDescData *)
+{
+ if (m_hide) return;
+ m_t << "</listitem></varlistentry>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlTable *t)
+{
+ if (m_hide) return;
+ m_t << "<table frame=\"all\">" << endl;
+ m_t << " <title></title>" << endl;
+ m_t << " <tgroup cols=\"" << t->numColumns() << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
+ m_t << " <tbody>" << endl;
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlTable *)
+{
+ if (m_hide) return;
+ m_t << " </tbody>" << endl;
+ m_t << " </tgroup>" << endl;
+ m_t << "</table>" << endl;
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlRow *)
+{
+ if (m_hide) return;
+ m_t << "<row>\n";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlRow *)
+{
+ if (m_hide) return;
+ m_t << "</row>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlCell *)
+{
+ if (m_hide) return;
+ m_t << "<entry>";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlCell *)
+{
+ if (m_hide) return;
+ m_t << "</entry>";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlCaption *)
+{
+ if (m_hide) return;
+ m_t << "<caption>";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlCaption *)
+{
+ if (m_hide) return;
+ m_t << "</caption>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocInternal *)
+{
+ if (m_hide) return;
+ // TODO: to be implemented
+}
+
+void DocbookDocVisitor::visitPost(DocInternal *)
+{
+ if (m_hide) return;
+ // TODO: to be implemented
+}
+
+void DocbookDocVisitor::visitPre(DocHRef *href)
+{
+ if (m_hide) return;
+ m_t << "<link xlink:href=\"" << href->url() << "\">";
+}
+
+void DocbookDocVisitor::visitPost(DocHRef *)
+{
+ if (m_hide) return;
+ m_t << "</link>";
+}
+
+void DocbookDocVisitor::visitPre(DocHtmlHeader *)
+{
+ if (m_hide) return;
+ m_t << "<formalpara><title>";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlHeader *)
+{
+ if (m_hide) return;
+ m_t << "</title></formalpara>\n";
+}
+
+void DocbookDocVisitor::visitPre(DocImage *img)
+{
+ if (img->type()==DocImage::Latex)
+ {
+ if (m_hide) return;
+ m_t << endl;
+ m_t << " <figure>" << endl;
+ m_t << " <title>";
+ }
+ else
+ {
+ pushEnabled();
+ m_hide=TRUE;
+ }
+}
+
+void DocbookDocVisitor::visitPost(DocImage *img)
+{
+ if (img->type()==DocImage::Latex)
+ {
+ if (m_hide) return;
+ QCString typevar;
+ m_t << "</title>" << endl;
+ m_t << " <mediaobject>" << endl;
+ m_t << " <imageobject>" << endl;
+ QCString baseName=img->name();
+ int i;
+ if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
+ {
+ baseName=baseName.right(baseName.length()-i-1);
+ }
+ m_t << " <imagedata";
+ if (!img->width().isEmpty())
+ {
+ m_t << " width=\"";
+ filter(img->width());
+ m_t << "\"";
+ }
+ else if (!img->height().isEmpty())
+ {
+ m_t << " depth=\"";
+ filter(img->height());
+ m_t << "\"";
+ }
+ m_t << " align=\"center\" fileref=\"" << baseName << "\">";
+ m_t << "</imagedata>" << endl;
+ m_t << " </imageobject>" << endl;
+ m_t << " </mediaobject>" << endl;
+ m_t << " </figure>" << endl;
+ // copy the image to the output dir
+ QCString m_file;
+ bool ambig;
+ FileDef *fd=findFileDef(Doxygen::imageNameDict, baseName, ambig);
+ if (fd)
+ {
+ m_file=fd->absFilePath();
+ }
+ QFile inImage(m_file);
+ QFile outImage(Config_getString("DOCBOOK_OUTPUT")+"/"+baseName.data());
+ if (inImage.open(IO_ReadOnly))
+ {
+ if (outImage.open(IO_WriteOnly))
+ {
+ char *buffer = new char[inImage.size()];
+ inImage.readBlock(buffer,inImage.size());
+ outImage.writeBlock(buffer,inImage.size());
+ outImage.flush();
+ delete[] buffer;
+ }
+ }
+ }
+ else
+ {
+ popEnabled();
+ }
+}
+
+void DocbookDocVisitor::visitPre(DocDotFile *df)
+{
+ if (m_hide) return;
+ startDotFile(df->file(),df->width(),df->height(),df->hasCaption());
+}
+
+void DocbookDocVisitor::visitPost(DocDotFile *df)
+{
+ if (m_hide) return;
+ endDotFile(df->hasCaption());
+}
+
+void DocbookDocVisitor::visitPre(DocMscFile *df)
+{
+ if (m_hide) return;
+ startMscFile(df->file(),df->width(),df->height(),df->hasCaption());
+}
+
+void DocbookDocVisitor::visitPost(DocMscFile *df)
+{
+ if (m_hide) return;
+ endMscFile(df->hasCaption());
+}
+void DocbookDocVisitor::visitPre(DocLink *lnk)
+{
+ if (m_hide) return;
+ startLink(lnk->file(),lnk->anchor());
+}
+
+void DocbookDocVisitor::visitPost(DocLink *)
+{
+ if (m_hide) return;
+ endLink();
+}
+
+void DocbookDocVisitor::visitPre(DocRef *ref)
+{
+ if (m_hide) return;
+ if (!ref->file().isEmpty()) startLink(ref->file(),ref->anchor());
+ if (!ref->hasLinkText()) filter(ref->targetTitle());
+}
+
+void DocbookDocVisitor::visitPost(DocRef *ref)
+{
+ if (m_hide) return;
+ if (!ref->file().isEmpty()) endLink();
+}
+
+void DocbookDocVisitor::visitPre(DocSecRefItem *ref)
+{
+ if (m_hide) return;
+ m_t << "<tocitem id=\"" << ref->file() << "_1" << ref->anchor() << "\">";
+}
+
+void DocbookDocVisitor::visitPost(DocSecRefItem *)
+{
+ if (m_hide) return;
+ m_t << "</tocitem>" << endl;
+}
+
+void DocbookDocVisitor::visitPre(DocSecRefList *)
+{
+ if (m_hide) return;
+ m_t << "<toclist>" << endl;
+}
+
+void DocbookDocVisitor::visitPost(DocSecRefList *)
+{
+ if (m_hide) return;
+ m_t << "</toclist>" << endl;
+}
+
+void DocbookDocVisitor::visitPre(DocParamSect *s)
+{
+ if (m_hide) return;
+ switch(s->type())
+ {
+ case DocParamSect::Param:
+ {
+ m_t << endl;
+ m_t << " <formalpara>" << endl;
+ m_t << " <title/>" << endl;
+ m_t << " <table frame=\"all\">" << endl;
+ m_t << " <title>Parameters</title>" << endl;
+ m_t << " <tgroup cols=\"2\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
+ m_t << " <tbody>" << endl;
+ break;
+ }
+ case DocParamSect::RetVal:
+ {
+ m_t << endl;
+ m_t << " <formalpara>" << endl;
+ m_t << " <title/>" << endl;
+ m_t << " <table frame=\"all\">" << endl;
+ m_t << " <title>Parameters</title>" << endl;
+ m_t << " <tgroup cols=\"2\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
+ m_t << " <tbody>" << endl;
+ break;
+ }
+ case DocParamSect::Exception:
+ m_t << "exception"; break;
+ case DocParamSect::TemplateParam:
+ m_t << "templateparam"; break;
+ default:
+ ASSERT(0);
+ }
+}
+
+void DocbookDocVisitor::visitPost(DocParamSect *)
+{
+ if (m_hide) return;
+ m_t << " </tbody>" << endl;
+ m_t << " </tgroup>" << endl;
+ m_t << " </table>" << endl;
+ m_t << " </formalpara>" << endl;
+ m_t << " ";
+}
+
+void DocbookDocVisitor::visitPre(DocParamList *pl)
+{
+ if (m_hide) return;
+ QListIterator<DocNode> li(pl->parameters());
+ DocNode *param;
+ m_t << " <row>" << endl;
+ if (!li.toFirst())
+ {
+ m_t << " <entry></entry>" << endl;
+ }
+ else
+ {
+ m_t << " <entry>";
+ int cnt = 0;
+ for (li.toFirst();(param=li.current());++li)
+ {
+ if (cnt)
+ {
+ m_t << ", ";
+ }
+ if (param->kind()==DocNode::Kind_Word)
+ {
+ visit((DocWord*)param);
+ }
+ else if (param->kind()==DocNode::Kind_LinkedWord)
+ {
+ visit((DocLinkedWord*)param);
+ }
+ cnt++;
+ }
+ m_t << "</entry>" << endl;
+ }
+ m_t << " <entry>";
+}
+
+void DocbookDocVisitor::visitPost(DocParamList *)
+{
+ if (m_hide) return;
+ m_t << "</entry>" << endl;
+ m_t << " </row>" << endl;
+}
+
+void DocbookDocVisitor::visitPre(DocXRefItem *x)
+{
+ if (m_hide) return;
+ m_t << "<para><link linkend=\"";
+ m_t << x->file() << "_1" << x->anchor();
+ m_t << "\">";
+ filter(x->title());
+ m_t << "</link>";
+ m_t << " ";
+}
+
+void DocbookDocVisitor::visitPost(DocXRefItem *)
+{
+ if (m_hide) return;
+ m_t << "</para>";
+}
+
+void DocbookDocVisitor::visitPre(DocInternalRef *ref)
+{
+ if (m_hide) return;
+ startLink(ref->file(),ref->anchor());
+}
+
+void DocbookDocVisitor::visitPost(DocInternalRef *)
+{
+ if (m_hide) return;
+ endLink();
+ m_t << " ";
+}
+
+void DocbookDocVisitor::visitPre(DocCopy *)
+{
+ if (m_hide) return;
+ // TODO: to be implemented
+}
+
+
+void DocbookDocVisitor::visitPost(DocCopy *)
+{
+ if (m_hide) return;
+ // TODO: to be implemented
+}
+
+
+void DocbookDocVisitor::visitPre(DocText *)
+{
+ // TODO: to be implemented
+}
+
+
+void DocbookDocVisitor::visitPost(DocText *)
+{
+ // TODO: to be implemented
+}
+
+
+void DocbookDocVisitor::visitPre(DocHtmlBlockQuote *)
+{
+ if (m_hide) return;
+ m_t << "<blockquote>";
+}
+
+void DocbookDocVisitor::visitPost(DocHtmlBlockQuote *)
+{
+ if (m_hide) return;
+ m_t << "</blockquote>";
+}
+
+void DocbookDocVisitor::visitPre(DocVhdlFlow *)
+{
+ // TODO: to be implemented
+}
+
+
+void DocbookDocVisitor::visitPost(DocVhdlFlow *)
+{
+ // TODO: to be implemented
+}
+
+void DocbookDocVisitor::filter(const char *str)
+{
+ m_t << convertToXML(str);
+}
+
+void DocbookDocVisitor::startLink(const QCString &file,const QCString &anchor)
+{
+ m_t << "<link linkend=\"" << file;
+ if (!anchor.isEmpty()) m_t << "_1" << anchor;
+ m_t << "\">";
+}
+
+void DocbookDocVisitor::endLink()
+{
+ m_t << "</link>";
+}
+
+void DocbookDocVisitor::pushEnabled()
+{
+ m_enabled.push(new bool(m_hide));
+}
+
+void DocbookDocVisitor::popEnabled()
+{
+ bool *v=m_enabled.pop();
+ ASSERT(v!=0);
+ m_hide = *v;
+ delete v;
+}
+
+void DocbookDocVisitor::writeMscFile(const QCString &baseName)
+{
+ QCString shortName = baseName;
+ int i;
+ if ((i=shortName.findRev('/'))!=-1)
+ {
+ shortName=shortName.right(shortName.length()-i-1);
+ }
+ QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP);
+ m_t << " <imagedata";
+ m_t << " align=\"center\" fileref=\"" << shortName << ".png" << "\">";
+ m_t << "</imagedata>" << endl;
+}
+
+void DocbookDocVisitor::startMscFile(const QCString &fileName,
+ const QCString &width,
+ const QCString &height,
+ bool hasCaption
+ )
+{
+ QCString baseName=fileName;
+ int i;
+ if ((i=baseName.findRev('/'))!=-1)
+ {
+ baseName=baseName.right(baseName.length()-i-1);
+ }
+ if ((i=baseName.find('.'))!=-1)
+ {
+ baseName=baseName.left(i);
+ }
+ baseName.prepend("msc_");
+ QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
+ m_t << "<para>" << endl;
+ m_t << " <figure>" << endl;
+ m_t << " <title></title>" << endl;
+ m_t << " <mediaobject>" << endl;
+ m_t << " <imageobject>" << endl;
+ m_t << " <imagedata";
+ if (!width.isEmpty())
+ {
+ m_t << " width=\"";
+ m_t << width;
+ m_t << "\"";
+ }
+ else if (!height.isEmpty())
+ {
+ m_t << " depth=\"";
+ m_t << height;
+ m_t << "\"";
+ }
+ m_t << " align=\"center\" fileref=\"" << baseName << ".png" << "\">";
+ m_t << "</imagedata>" << endl;
+ m_t << " </imageobject>" << endl;
+ if (hasCaption)
+ {
+ m_t << " <caption>" << endl;
+ }
+}
+
+void DocbookDocVisitor::endMscFile(bool hasCaption)
+{
+ if (m_hide) return;
+ m_t << "endl";
+ if (hasCaption)
+ {
+ m_t << " </caption>" << endl;
+ }
+ m_t << " </mediaobject>" << endl;
+ m_t << " </figure>" << endl;
+ m_t << "</para>" << endl;
+}
+
+void DocbookDocVisitor::writeDotFile(const QCString &baseName)
+{
+ QCString shortName = baseName;
+ int i;
+ if ((i=shortName.findRev('/'))!=-1)
+ {
+ shortName=shortName.right(shortName.length()-i-1);
+ }
+ QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ writeDotGraphFromFile(baseName+".dot",outDir,shortName,BITMAP);
+ m_t << " <imagedata";
+ m_t << " align=\"center\" fileref=\"" << shortName << ".png" << "\">";
+ m_t << "</imagedata>" << endl;
+}
+
+void DocbookDocVisitor::startDotFile(const QCString &fileName,
+ const QCString &width,
+ const QCString &height,
+ bool hasCaption
+ )
+{
+ QCString baseName=fileName;
+ int i;
+ if ((i=baseName.findRev('/'))!=-1)
+ {
+ baseName=baseName.right(baseName.length()-i-1);
+ }
+ if ((i=baseName.find('.'))!=-1)
+ {
+ baseName=baseName.left(i);
+ }
+ baseName.prepend("dot_");
+ QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
+ m_t << "<para>" << endl;
+ m_t << " <figure>" << endl;
+ m_t << " <title></title>" << endl;
+ m_t << " <mediaobject>" << endl;
+ m_t << " <imageobject>" << endl;
+ m_t << " <imagedata";
+ if (!width.isEmpty())
+ {
+ m_t << " width=\"";
+ m_t << width;
+ m_t << "\"";
+ }
+ else if (!height.isEmpty())
+ {
+ m_t << " depth=\"";
+ m_t << height;
+ m_t << "\"";
+ }
+ m_t << " align=\"center\" fileref=\"" << baseName << ".png" << "\">";
+ m_t << "</imagedata>" << endl;
+ m_t << " </imageobject>" << endl;
+ if (hasCaption)
+ {
+ m_t << " <caption>" << endl;
+ }
+}
+
+void DocbookDocVisitor::endDotFile(bool hasCaption)
+{
+ if (m_hide) return;
+ m_t << "endl";
+ if (hasCaption)
+ {
+ m_t << " </caption>" << endl;
+ }
+ m_t << " </mediaobject>" << endl;
+ m_t << " </figure>" << endl;
+ m_t << "</para>" << endl;
+}
+
diff --git a/src/docbookvisitor.h b/src/docbookvisitor.h
new file mode 100644
index 0000000..c79301d
--- /dev/null
+++ b/src/docbookvisitor.h
@@ -0,0 +1,161 @@
+/******************************************************************************
+*
+*
+*
+* Copyright (C) 1997-2012 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 _DOCBOOKDOCVISITOR_H
+#define _DOCBOOKDOCVISITOR_H
+
+#include "docvisitor.h"
+#include <qstack.h>
+#include <qcstring.h>
+
+class FTextStream;
+class CodeOutputInterface;
+class QCString;
+
+/*! @brief Concrete visitor implementation for Docbook output. */
+class DocbookDocVisitor : public DocVisitor
+{
+ public:
+ DocbookDocVisitor(FTextStream &t,CodeOutputInterface &ci);
+ //--------------------------------------
+ // visitor functions for leaf nodes
+ //--------------------------------------
+ void visit(DocWord *);
+ void visit(DocLinkedWord *);
+ void visit(DocWhiteSpace *);
+ void visit(DocSymbol *);
+ void visit(DocURL *);
+ void visit(DocLineBreak *);
+ void visit(DocHorRuler *);
+ void visit(DocStyleChange *);
+ void visit(DocVerbatim *);
+ void visit(DocAnchor *);
+ void visit(DocInclude *);
+ void visit(DocIncOperator *);
+ void visit(DocFormula *);
+ void visit(DocIndexEntry *);
+ void visit(DocSimpleSectSep *);
+ void visit(DocCite *);
+ //--------------------------------------
+ // visitor functions for compound nodes
+ //--------------------------------------
+ void visitPre(DocAutoList *);
+ void visitPost(DocAutoList *);
+ void visitPre(DocAutoListItem *);
+ void visitPost(DocAutoListItem *);
+ void visitPre(DocPara *) ;
+ void visitPost(DocPara *);
+ void visitPre(DocRoot *);
+ void visitPost(DocRoot *);
+ void visitPre(DocSimpleSect *);
+ void visitPost(DocSimpleSect *);
+ void visitPre(DocTitle *);
+ void visitPost(DocTitle *);
+ void visitPre(DocSimpleList *);
+ void visitPost(DocSimpleList *);
+ void visitPre(DocSimpleListItem *);
+ void visitPost(DocSimpleListItem *);
+ void visitPre(DocSection *);
+ void visitPost(DocSection *);
+ void visitPre(DocHtmlList *);
+ void visitPost(DocHtmlList *) ;
+ void visitPre(DocHtmlListItem *);
+ void visitPost(DocHtmlListItem *);
+ //void visitPre(DocHtmlPre *);
+ //void visitPost(DocHtmlPre *);
+ void visitPre(DocHtmlDescList *);
+ void visitPost(DocHtmlDescList *);
+ void visitPre(DocHtmlDescTitle *);
+ void visitPost(DocHtmlDescTitle *);
+ void visitPre(DocHtmlDescData *);
+ void visitPost(DocHtmlDescData *);
+ void visitPre(DocHtmlTable *);
+ void visitPost(DocHtmlTable *);
+ void visitPre(DocHtmlRow *);
+ void visitPost(DocHtmlRow *) ;
+ void visitPre(DocHtmlCell *);
+ void visitPost(DocHtmlCell *);
+ void visitPre(DocHtmlCaption *);
+ void visitPost(DocHtmlCaption *);
+ void visitPre(DocInternal *);
+ void visitPost(DocInternal *);
+ void visitPre(DocHRef *);
+ void visitPost(DocHRef *);
+ void visitPre(DocHtmlHeader *);
+ void visitPost(DocHtmlHeader *);
+ void visitPre(DocImage *);
+ void visitPost(DocImage *);
+ void visitPre(DocDotFile *);
+ void visitPost(DocDotFile *);
+ void visitPre(DocMscFile *);
+ void visitPost(DocMscFile *);
+ void visitPre(DocLink *);
+ void visitPost(DocLink *);
+ void visitPre(DocRef *);
+ void visitPost(DocRef *);
+ void visitPre(DocSecRefItem *);
+ void visitPost(DocSecRefItem *);
+ void visitPre(DocSecRefList *);
+ void visitPost(DocSecRefList *);
+ //void visitPre(DocLanguage *);
+ //void visitPost(DocLanguage *);
+ void visitPre(DocParamSect *);
+ void visitPost(DocParamSect *);
+ void visitPre(DocParamList *);
+ void visitPost(DocParamList *);
+ void visitPre(DocXRefItem *);
+ void visitPost(DocXRefItem *);
+ void visitPre(DocInternalRef *);
+ void visitPost(DocInternalRef *);
+ void visitPre(DocCopy *);
+ void visitPost(DocCopy *);
+ void visitPre(DocText *);
+ void visitPost(DocText *);
+ void visitPre(DocHtmlBlockQuote *);
+ void visitPost(DocHtmlBlockQuote *);
+ void visitPre(DocVhdlFlow *);
+ void visitPost(DocVhdlFlow *);
+ private:
+ //--------------------------------------
+ // helper functions
+ //--------------------------------------
+ void filter(const char *str);
+ void startLink(const QCString &file,
+ const QCString &anchor);
+ void endLink();
+ void pushEnabled();
+ void popEnabled();
+ void startMscFile(const QCString &fileName,const QCString &width,
+ const QCString &height, bool hasCaption);
+ void endMscFile(bool hasCaption);
+ void writeMscFile(const QCString &fileName);
+ void startDotFile(const QCString &fileName,const QCString &width,
+ const QCString &height, bool hasCaption);
+ void endDotFile(bool hasCaption);
+ void writeDotFile(const QCString &fileName);
+ //--------------------------------------
+ // state variables
+ //--------------------------------------
+ FTextStream &m_t;
+ CodeOutputInterface &m_ci;
+ bool m_insidePre;
+ bool m_hide;
+ QStack<bool> m_enabled;
+ QCString m_langExt;
+};
+
+#endif
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 29b0030..418a83b 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1346,6 +1346,15 @@ reparsetoken:
doctokenizerYYsetStatePara();
}
break;
+ case CMD_DBONLY:
+ {
+ doctokenizerYYsetStateDbOnly();
+ tok = doctokenizerYYlex();
+ children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::DocbookOnly,g_isExample,g_exampleName));
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"warning: xmlonly section ended without end marker",doctokenizerYYlineno);
+ doctokenizerYYsetStatePara();
+ }
+ break;
case CMD_FORMULA:
{
DocFormula *form=new DocFormula(parent,g_token->id);
@@ -1547,7 +1556,7 @@ static int handleDocCopy(DocNode *parent,QList<DocNode> &children)
cmdId==CMD_COPYDOC || cmdId==CMD_COPYDETAILS);
cpy->parse(children);
delete cpy;
- return 0;
+ return TK_NEWPARA;
}
@@ -5509,6 +5518,7 @@ int DocPara::handleCommand(const QCString &cmdName)
case CMD_ENDRTFONLY:
case CMD_ENDLATEXONLY:
case CMD_ENDXMLONLY:
+ case CMD_ENDDBONLY:
case CMD_ENDLINK:
case CMD_ENDVERBATIM:
case CMD_ENDDOT:
diff --git a/src/docparser.h b/src/docparser.h
index 7279d21..227974a 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -381,7 +381,7 @@ class DocWhiteSpace : public DocNode
class DocVerbatim : public DocNode
{
public:
- enum Type { Code, HtmlOnly, ManOnly, LatexOnly, RtfOnly, XmlOnly, Verbatim, Dot, Msc };
+ enum Type { Code, HtmlOnly, ManOnly, LatexOnly, RtfOnly, XmlOnly, Verbatim, Dot, Msc, DocbookOnly };
DocVerbatim(DocNode *parent,const QCString &context,
const QCString &text, Type t,bool isExample,
const QCString &exampleFile,const QCString &lang=QCString());
diff --git a/src/docsets.cpp b/src/docsets.cpp
index 1ba865a..a6c06ac 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -135,6 +135,11 @@ void DocSets::initialize()
" <string>" << publisherId << "</string>\n"
" <key>DocSetPublisherName</key>\n"
" <string>" << publisherName << "</string>\n"
+ // markers for Dash
+ " <key>DashDocSetFamily</key>\n"
+ " <string>doxy</string>\n"
+ " <key>DocSetPlatformFamily</key>\n"
+ " <string>doxygen</string>\n"
"</dict>\n"
"</plist>\n";
}
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index 048558e..3ff73db 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -136,6 +136,7 @@ void doctokenizerYYsetStateHtmlOnly();
void doctokenizerYYsetStateManOnly();
void doctokenizerYYsetStateLatexOnly();
void doctokenizerYYsetStateXmlOnly();
+void doctokenizerYYsetStateDbOnly();
void doctokenizerYYsetStateRtfOnly();
void doctokenizerYYsetStateVerbatim();
void doctokenizerYYsetStateDot();
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 6bc541e..cc8a944 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -402,6 +402,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
%x St_LatexOnly
%x St_RtfOnly
%x St_XmlOnly
+%x St_DbOnly
%x St_Verbatim
%x St_Dot
%x St_Msc
@@ -780,6 +781,14 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
<St_XmlOnly>. {
g_token->verb+=yytext;
}
+<St_DbOnly>{CMD}"enddocbookonly" {
+ return RetVal_OK;
+ }
+<St_DbOnly>[^\\@\n]+ |
+<St_DbOnly>\n |
+<St_DbOnly>. {
+ g_token->verb+=yytext;
+ }
<St_Verbatim>{CMD}"endverbatim" {
g_token->verb=stripEmptyLines(g_token->verb);
return RetVal_OK;
@@ -1230,6 +1239,12 @@ void doctokenizerYYsetStateXmlOnly()
BEGIN(St_XmlOnly);
}
+void doctokenizerYYsetStateDbOnly()
+{
+ g_token->verb="";
+ BEGIN(St_DbOnly);
+}
+
void doctokenizerYYsetStateLatexOnly()
{
g_token->verb="";
diff --git a/src/docvisitor.h b/src/docvisitor.h
index 312b05d..240e137 100644
--- a/src/docvisitor.h
+++ b/src/docvisitor.h
@@ -27,6 +27,7 @@ const int DocVisitor_RTF = 3;
const int DocVisitor_Man = 4;
const int DocVisitor_Text = 5;
const int DocVisitor_Other = 6;
+const int DocVisitor_Docbook = 7;
// forward declarations
class DocWord;
diff --git a/src/dot.cpp b/src/dot.cpp
index f6d091a..6a902c1 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1801,16 +1801,10 @@ void DotNode::writeBox(FTextStream &t,
else
{
static bool dotTransparent = Config_getBool("DOT_TRANSPARENT");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (!dotTransparent)
{
- ClassDef* ccd=m_classDef;
-
t << ",color=\"" << labCol << "\", fillcolor=\"";
- if (ccd && vhdlOpt && (VhdlDocGen::VhdlClasses)ccd->protection()==VhdlDocGen::ARCHITECTURECLASS)
- t << "khaki";
- else
- t << "white";
+ t << "white";
t << "\", style=\"filled\"";
}
else
@@ -2016,6 +2010,74 @@ void DotNode::writeXML(FTextStream &t,bool isClassGraph)
t << " </node>" << endl;
}
+void DotNode::writeDocbook(FTextStream &t,bool isClassGraph)
+{
+ t << " <node id=\"" << m_number << "\">" << endl;
+ t << " <label>" << convertToXML(m_label) << "</label>" << endl;
+ if (!m_url.isEmpty())
+ {
+ QCString url(m_url);
+ char *refPtr = url.data();
+ char *urlPtr = strchr(url.data(),'$');
+ if (urlPtr)
+ {
+ *urlPtr++='\0';
+ t << " <link refid=\"" << convertToXML(urlPtr) << "\"";
+ if (*refPtr!='\0')
+ {
+ t << " external=\"" << convertToXML(refPtr) << "\"";
+ }
+ t << "/>" << endl;
+ }
+ }
+ if (m_children)
+ {
+ QListIterator<DotNode> nli(*m_children);
+ QListIterator<EdgeInfo> eli(*m_edgeInfo);
+ DotNode *childNode;
+ EdgeInfo *edgeInfo;
+ for (;(childNode=nli.current());++nli,++eli)
+ {
+ edgeInfo=eli.current();
+ t << " <childnode refid=\"" << childNode->m_number << "\" relation=\"";
+ if (isClassGraph)
+ {
+ switch(edgeInfo->m_color)
+ {
+ case EdgeInfo::Blue: t << "public-inheritance"; break;
+ case EdgeInfo::Green: t << "protected-inheritance"; break;
+ case EdgeInfo::Red: t << "private-inheritance"; break;
+ case EdgeInfo::Purple: t << "usage"; break;
+ case EdgeInfo::Orange: t << "template-instance"; break;
+ case EdgeInfo::Grey: ASSERT(0); break;
+ }
+ }
+ else // include graph
+ {
+ t << "include";
+ }
+ t << "\">" << endl;
+ if (!edgeInfo->m_label.isEmpty())
+ {
+ int p=0;
+ int ni;
+ while ((ni=edgeInfo->m_label.find('\n',p))!=-1)
+ {
+ t << " <edgelabel>"
+ << convertToXML(edgeInfo->m_label.mid(p,ni-p))
+ << "</edgelabel>" << endl;
+ p=ni+1;
+ }
+ t << " <edgelabel>"
+ << convertToXML(edgeInfo->m_label.right(edgeInfo->m_label.length()-p))
+ << "</edgelabel>" << endl;
+ }
+ t << " </childnode>" << endl;
+ }
+ }
+ t << " </node>" << endl;
+}
+
void DotNode::writeDEF(FTextStream &t)
{
@@ -2190,8 +2252,6 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,
//printf("DotGfxHierarchyTable::writeGraph(%s)\n",name);
//printf("m_rootNodes=%p count=%d\n",m_rootNodes,m_rootNodes->count());
- static bool vhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
-
if (m_rootSubgraphs->count()==0) return;
QDir d(path);
@@ -2210,18 +2270,6 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out,
for (dnli.toFirst();(n=dnli.current());++dnli)
{
QCString baseName;
-
- if (vhdl)
- {
- QCString l=n->m_url;
- l=VhdlDocGen::convertFileNameToClassName(l);
- ClassDef *cd=Doxygen::classSDict->find(l);
- if (cd==0) continue;
- // only entities are shown
- if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
- continue;
- }
-
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
baseName.sprintf("inherit_graph_%d",count++);
//baseName = convertNameToFile(baseName);
@@ -2398,6 +2446,8 @@ void DotGfxHierarchyTable::addClassList(ClassSDict *cl)
for (cli.toLast();(cd=cli.current());--cli)
{
//printf("Trying %s subClasses=%d\n",cd->name().data(),cd->subClasses()->count());
+ if (cd->getLanguage()==SrcLangExt_VHDL && !(VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS)
+ continue;
if (!hasVisibleRoot(cd->baseClasses()) &&
cd->isVisibleInHierarchy()
) // root node in the forest
@@ -3169,6 +3219,16 @@ void DotClassGraph::writeXML(FTextStream &t)
}
}
+void DotClassGraph::writeDocbook(FTextStream &t)
+{
+ QDictIterator<DotNode> dni(*m_usedNodes);
+ DotNode *node;
+ for (;(node=dni.current());++dni)
+ {
+ node->writeDocbook(t,TRUE);
+ }
+}
+
void DotClassGraph::writeDEF(FTextStream &t)
{
QDictIterator<DotNode> dni(*m_usedNodes);
@@ -3484,6 +3544,16 @@ void DotInclDepGraph::writeXML(FTextStream &t)
}
}
+void DotInclDepGraph::writeDocbook(FTextStream &t)
+{
+ QDictIterator<DotNode> dni(*m_usedNodes);
+ DotNode *node;
+ for (;(node=dni.current());++dni)
+ {
+ node->writeDocbook(t,FALSE);
+ }
+}
+
//-------------------------------------------------------------
int DotCallGraph::m_curNodeNumber = 0;
diff --git a/src/dot.h b/src/dot.h
index 9b6bcbf..d746024 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -81,6 +81,7 @@ class DotNode
int m_subgraphId;
void clearWriteFlag();
void writeXML(FTextStream &t,bool isClassGraph);
+ void writeDocbook(FTextStream &t,bool isClassGraph);
void writeDEF(FTextStream &t);
QCString label() const { return m_label; }
int number() const { return m_number; }
@@ -169,6 +170,7 @@ class DotClassGraph
bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1) const;
void writeXML(FTextStream &t);
+ void writeDocbook(FTextStream &t);
void writeDEF(FTextStream &t);
QCString diskName() const;
@@ -201,7 +203,7 @@ class DotInclDepGraph
bool isTooBig() const;
QCString diskName() const;
void writeXML(FTextStream &t);
-
+ void writeDocbook(FTextStream &t);
private:
void buildGraph(DotNode *n,FileDef *fd,int distance);
void determineVisibleNodes(QList<DotNode> &queue,int &maxNodes);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index f88972f..cc4916f 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -57,7 +57,9 @@
#include "ftvhelp.h"
#include "defargs.h"
#include "rtfgen.h"
+#include "sqlite3gen.h"
#include "xmlgen.h"
+#include "docbookgen.h"
#include "defgen.h"
#include "perlmodgen.h"
#include "reflist.h"
@@ -94,6 +96,7 @@
#include "membergroup.h"
#include "docsets.h"
#include "formula.h"
+#include "settings.h"
#define RECURSE_ENTRYTREE(func,var) \
do { if (var->children()) { \
@@ -176,30 +179,67 @@ static bool g_dumpConfigAsXML = FALSE;
void clearAll()
{
- g_inputFiles.clear();
- //g_excludeNameDict.clear();
+ g_inputFiles.clear();
+ //g_excludeNameDict.clear();
//delete g_outputList; g_outputList=0;
- Doxygen::classSDict->clear();
- Doxygen::namespaceSDict->clear();
- Doxygen::pageSDict->clear();
- Doxygen::exampleSDict->clear();
- Doxygen::inputNameList->clear();
- Doxygen::formulaList->clear();
- Doxygen::sectionDict->clear();
- Doxygen::inputNameDict->clear();
- Doxygen::includeNameDict->clear();
- Doxygen::exampleNameDict->clear();
- Doxygen::imageNameDict->clear();
- Doxygen::dotFileNameDict->clear();
- Doxygen::mscFileNameDict->clear();
- Doxygen::formulaDict->clear();
- Doxygen::formulaNameDict->clear();
+ Doxygen::classSDict->clear();
+ Doxygen::namespaceSDict->clear();
+ Doxygen::pageSDict->clear();
+ Doxygen::exampleSDict->clear();
+ Doxygen::inputNameList->clear();
+ Doxygen::formulaList->clear();
+ Doxygen::sectionDict->clear();
+ Doxygen::inputNameDict->clear();
+ Doxygen::includeNameDict->clear();
+ Doxygen::exampleNameDict->clear();
+ Doxygen::imageNameDict->clear();
+ Doxygen::dotFileNameDict->clear();
+ Doxygen::mscFileNameDict->clear();
+ Doxygen::formulaDict->clear();
+ Doxygen::formulaNameDict->clear();
Doxygen::tagDestinationDict.clear();
delete Doxygen::citeDict;
delete Doxygen::mainPage; Doxygen::mainPage=0;
}
+class Statistics
+{
+ public:
+ Statistics() {}
+ void begin(const char *name)
+ {
+ msg(name);
+ stat *entry= new stat(name,0);
+ stats.append(entry);
+ time.restart();
+ }
+ void end()
+ {
+ stats.last()->elapsed=((double)time.elapsed())/1000.0;
+ }
+ void print()
+ {
+ QListIterator<stat> sli(stats);
+ stat *s;
+ for ( sli.toFirst(); (s=sli.current()); ++sli )
+ {
+ msg("Spent %.3f seconds in %s",s->elapsed,s->name);
+ }
+ }
+ private:
+ struct stat
+ {
+ const char *name;
+ double elapsed;
+ stat() : name(NULL),elapsed(0) {}
+ stat(const char *n, double el) : name(n),elapsed(el) {}
+ };
+ QList<stat> stats;
+ QTime time;
+} g_s;
+
+
void statistics()
{
fprintf(stderr,"--- inputNameDict stats ----\n");
@@ -950,7 +990,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name,int level,Src
// introduce bogus namespace
//printf("++ adding dummy namespace %s to %s\n",nsName.data(),prevScope->name().data());
nd=new NamespaceDef(
- "[generated]",1,fullScope);
+ "[generated]",1,1,fullScope);
nd->setLanguage(lang);
// add namespace to the list
@@ -1217,7 +1257,7 @@ static void addClassToContext(EntryNav *rootNav)
tagName = rootNav->tagInfo()->tagName;
refFileName = rootNav->tagInfo()->fileName;
}
- cd=new ClassDef(root->fileName,root->startLine,fullName,sec,
+ cd=new ClassDef(root->fileName,root->startLine,root->startColumn,fullName,sec,
tagName,refFileName,TRUE,root->spec&Entry::Enum);
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
fullName.data(),sec,root->tArgLists ? (int)root->tArgLists->count() : -1);
@@ -1415,6 +1455,7 @@ static ClassDef *createTagLessInstance(ClassDef *rootCd,ClassDef *templ,const QC
fullName+="."+fieldName;
ClassDef *cd = new ClassDef(templ->getDefFileName(),
templ->getDefLine(),
+ templ->getDefColumn(),
fullName,
templ->compoundType());
cd->setDocumentation(templ->documentation(),templ->docFile(),templ->docLine()); // copy docs to definition
@@ -1458,7 +1499,7 @@ static ClassDef *createTagLessInstance(ClassDef *rootCd,ClassDef *templ,const QC
for (li.toFirst();(md=li.current());++li)
{
//printf(" Member %s type=%s\n",md->name().data(),md->typeString());
- MemberDef *imd = new MemberDef(md->getDefFileName(),md->getDefLine(),
+ MemberDef *imd = new MemberDef(md->getDefFileName(),md->getDefLine(),md->getDefColumn(),
md->typeString(),md->name(),md->argsString(),md->excpString(),
md->protection(),md->virtualness(),md->isStatic(),Member,
md->memberType(),
@@ -1665,7 +1706,7 @@ static void buildNamespaceList(EntryNav *rootNav)
tagFileName=rootNav->tagInfo()->fileName;
}
//printf("++ new namespace %s lang=%s\n",fullName.data(),langToString(root->lang).data());
- NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,fullName,tagName,tagFileName);
+ NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,root->startColumn,fullName,tagName,tagFileName);
nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->addSectionsToDefinition(root->anchors);
@@ -1834,7 +1875,7 @@ static void findUsingDirectives(EntryNav *rootNav)
else // unknown namespace, but add it anyway.
{
//printf("++ new unknown namespace %s lang=%s\n",name.data(),langToString(root->lang).data());
- NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,name);
+ NamespaceDef *nd=new NamespaceDef(root->fileName,root->startLine,root->startColumn,name);
nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->addSectionsToDefinition(root->anchors);
@@ -1950,7 +1991,7 @@ static void findUsingDeclarations(EntryNav *rootNav)
Debug::print(Debug::Classes,0," New using class `%s' (sec=0x%08x)! #tArgLists=%d\n",
name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
usingCd = new ClassDef(
- "<using>",1,
+ "<using>",1,1,
name,ClassDef::Class);
Doxygen::hiddenClasses->append(root->name,usingCd);
usingCd->setArtificial(TRUE);
@@ -2032,7 +2073,7 @@ static void findUsingDeclImports(EntryNav *rootNav)
LockingPtr<ArgumentList> templAl = md->templateArguments();
LockingPtr<ArgumentList> al = md->templateArguments();
newMd = new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
md->typeString(),memName,md->argsString(),
md->excpString(),root->protection,root->virt,
md->isStatic(),Member,md->memberType(),
@@ -2219,7 +2260,7 @@ static MemberDef *addVariableToClass(
// new member variable, typedef or enum value
MemberDef *md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
root->type,name,root->args,0,
prot,Normal,root->stat,related,
mtype,root->tArgLists ? root->tArgLists->last() : 0,0);
@@ -2455,7 +2496,7 @@ static MemberDef *addVariableToFile(
" new variable, nd=%s!\n",nd?nd->name().data():"<global>");
// new global variable, enum value or typedef
MemberDef *md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
root->type,name,root->args,0,
Public, Normal,root->stat,Member,
mtype,root->tArgLists ? root->tArgLists->last() : 0,0);
@@ -2994,7 +3035,7 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
// adding class member
MemberDef *md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
root->type,name,root->args,root->exception,
root->protection,root->virt,
root->stat && root->relatesType != MemberOf,
@@ -3386,7 +3427,7 @@ static void buildFunctionList(EntryNav *rootNav)
ArgumentList *tArgList = root->tArgLists ? root->tArgLists->last() : 0;
QCString name=removeRedundantWhiteSpace(rname);
md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
root->type,name,root->args,root->exception,
root->protection,root->virt,root->stat,Member,
MemberType_Function,tArgList,root->argList);
@@ -3697,25 +3738,27 @@ static void transferFunctionReferences()
LockingPtr<MemberSDict> decDict = mdec->getReferencesMembers();
if (defDict!=0)
{
- MemberSDict::Iterator msdi(*defDict);
+ MemberSDict::IteratorDict msdi(*defDict);
MemberDef *rmd;
for (msdi.toFirst();(rmd=msdi.current());++msdi)
{
if (decDict==0 || decDict->find(rmd->name())==0)
{
- mdec->addSourceReferences(rmd);
+ printf("CURRENT_KEY:%s\n",msdi.currentKey().data());
+ mdec->addSourceReferences(rmd,msdi.currentKey());
}
}
}
if (decDict!=0)
{
- MemberSDict::Iterator msdi(*decDict);
+ MemberSDict::IteratorDict msdi(*decDict);
MemberDef *rmd;
for (msdi.toFirst();(rmd=msdi.current());++msdi)
{
if (defDict==0 || defDict->find(rmd->name())==0)
{
- mdef->addSourceReferences(rmd);
+ printf("CURRENT_KEY:%s\n",msdi.currentKey().data());
+ mdef->addSourceReferences(rmd,msdi.currentKey());
}
}
}
@@ -3724,25 +3767,25 @@ static void transferFunctionReferences()
decDict = mdec->getReferencedByMembers();
if (defDict!=0)
{
- MemberSDict::Iterator msdi(*defDict);
+ MemberSDict::IteratorDict msdi(*defDict);
MemberDef *rmd;
for (msdi.toFirst();(rmd=msdi.current());++msdi)
{
if (decDict==0 || decDict->find(rmd->name())==0)
{
- mdec->addSourceReferencedBy(rmd);
+ mdec->addSourceReferencedBy(rmd,msdi.currentKey());
}
}
}
if (decDict!=0)
{
- MemberSDict::Iterator msdi(*decDict);
+ MemberSDict::IteratorDict msdi(*decDict);
MemberDef *rmd;
for (msdi.toFirst();(rmd=msdi.current());++msdi)
{
if (defDict==0 || defDict->find(rmd->name())==0)
{
- mdef->addSourceReferencedBy(rmd);
+ mdef->addSourceReferencedBy(rmd,msdi.currentKey());
}
}
}
@@ -3983,7 +4026,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
if (usedCd==0)
{
usedCd = new ClassDef(
- masterCd->getDefFileName(),masterCd->getDefLine(),
+ masterCd->getDefFileName(),masterCd->getDefLine(),masterCd->getDefColumn(),
usedName,ClassDef::Class);
//printf("making %s a template argument!!!\n",usedCd->name().data());
usedCd->makeTemplateArgument();
@@ -4033,7 +4076,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
}
Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", type.data());
usedCd = new ClassDef(
- masterCd->getDefFileName(),masterCd->getDefLine(),
+ masterCd->getDefFileName(),masterCd->getDefLine(),masterCd->getDefColumn(),
type,ClassDef::Class);
usedCd->setUsedOnly(TRUE);
usedCd->setLanguage(masterCd->getLanguage());
@@ -4149,7 +4192,7 @@ static bool findTemplateInstanceRelation(Entry *root,
bool freshInstance=FALSE;
ClassDef *instanceClass = templateClass->insertTemplateInstance(
- root->fileName,root->startLine,templSpec,freshInstance);
+ root->fileName,root->startLine,root->startColumn,templSpec,freshInstance);
if (isArtificial) instanceClass->setArtificial(TRUE);
instanceClass->setLanguage(root->lang);
@@ -4554,7 +4597,7 @@ static bool findClassRelation(
baseClass=Doxygen::hiddenClasses->find(baseClassName);
if (baseClass==0)
{
- baseClass=new ClassDef(root->fileName,root->startLine,
+ baseClass=new ClassDef(root->fileName,root->startLine,root->startColumn,
baseClassName,ClassDef::Class);
Doxygen::hiddenClasses->append(baseClassName,baseClass);
if (isArtificial) baseClass->setArtificial(TRUE);
@@ -4568,7 +4611,7 @@ static bool findClassRelation(
// baseClassName.data(),baseClass,biName.data(),templSpec.data());
if (baseClass==0)
{
- baseClass=new ClassDef(root->fileName,root->startLine,
+ baseClass=new ClassDef(root->fileName,root->startLine,root->startColumn,
baseClassName,ClassDef::Class);
Doxygen::classSDict->append(baseClassName,baseClass);
if (isArtificial) baseClass->setArtificial(TRUE);
@@ -6080,7 +6123,7 @@ static void findMember(EntryNav *rootNav,
ArgumentList *tArgList = new ArgumentList;
// getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
declMd ? declMd->protection() : root->protection,
root->virt,root->stat,Member,
@@ -6146,7 +6189,7 @@ static void findMember(EntryNav *rootNav,
getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
//printf("new related member %s args=`%s'\n",md->name().data(),funcArgs.data());
MemberDef *md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,Related,
mtype,tArgList,root->argList);
@@ -6276,7 +6319,7 @@ static void findMember(EntryNav *rootNav,
// the related function, which don't have to do with
// those of the related class.
MemberDef *md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,
root->stat && !isMemberOf,
@@ -6416,7 +6459,7 @@ localObjCMethod:
" scopeName=%s className=%s\n",root->name.data(),scopeName.data(),className.data());
//printf("Local objective C method `%s' of class `%s' found\n",root->name.data(),cd->name().data());
MemberDef *md=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
root->protection,root->virt,root->stat,Member,
MemberType_Function,0,root->argList);
@@ -6742,7 +6785,7 @@ static void findEnums(EntryNav *rootNav)
{
// new enum type
md = new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
0,name,0,0,
root->protection,Normal,FALSE,
isMemberOf ? Foreign : isRelated ? Related : Member,
@@ -6953,7 +6996,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav)
substitute(rootNav->name(),"::",".")) // enum value scope matches that of the enum
{
MemberDef *fmd=new MemberDef(
- root->fileName,root->startLine,
+ root->fileName,root->startLine,root->startColumn,
root->type,root->name,root->args,0,
Public, Normal,root->stat,Member,
MemberType_EnumValue,0,0);
@@ -6973,7 +7016,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav)
fmd->setRefItems(root->sli);
fmd->setAnchor();
md->insertEnumField(fmd);
- fmd->setEnumScope(md);
+ fmd->setEnumScope(md,TRUE);
MemberName *mn=mnsd->find(root->name);
if (mn)
{
@@ -7970,7 +8013,7 @@ static void findDefineDocumentation(EntryNav *rootNav)
if (rootNav->tagInfo() && !root->name.isEmpty()) // define read from a tag file
{
- MemberDef *md=new MemberDef("<tagfile>",1,
+ MemberDef *md=new MemberDef("<tagfile>",1,1,
"#define",root->name,root->args,0,
Public,Normal,FALSE,Member,MemberType_Define,0,0);
md->setTagInfo(rootNav->tagInfo());
@@ -8674,7 +8717,7 @@ static void readTagFile(Entry *root,const char *tl)
fileName = tagLine.left(eqPos).stripWhiteSpace();
destName = tagLine.right(tagLine.length()-eqPos-1).stripWhiteSpace();
QFileInfo fi(fileName);
- Doxygen::tagDestinationDict.insert(fi.fileName().utf8(),new QCString(destName));
+ Doxygen::tagDestinationDict.insert(fi.absFilePath().utf8(),new QCString(destName));
//printf("insert tagDestination %s->%s\n",fi.fileName().data(),destName.data());
}
else
@@ -8695,7 +8738,7 @@ static void readTagFile(Entry *root,const char *tl)
else
msg("Reading tag file `%s'...\n",fileName.data());
- parseTagFile(root,fi.absFilePath().utf8(),fi.fileName().utf8());
+ parseTagFile(root,fi.absFilePath().utf8());
}
//----------------------------------------------------------------------------
@@ -8754,9 +8797,9 @@ static void copyLogo()
}
}
-static void copyExtraFiles()
+static void copyExtraFiles(const QCString& filesOption,const QCString &outputOption)
{
- QStrList files = Config_getList("HTML_EXTRA_FILES");
+ QStrList files = Config_getList(filesOption);
uint i;
for (i=0; i<files.count(); ++i)
{
@@ -8767,12 +8810,12 @@ static void copyExtraFiles()
QFileInfo fi(fileName);
if (!fi.exists())
{
- err("Extra HTML file '%s' specified in HTML_EXTRA_FILES does not exist!\n", fileName.data());
+ err("Extra file '%s' specified in" + filesOption + " does not exist!\n", fileName.data());
}
else
{
- QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data();
- Doxygen::indexList->addImageFile(fi.fileName().data());
+ QCString destFileName = Config_getString(outputOption)+"/"+fi.fileName().data();
+ Doxygen::indexList->addImageFile(fi.fileName().utf8());
copyFile(fileName, destFileName);
}
}
@@ -9368,7 +9411,7 @@ void initDoxygen()
Doxygen::functionNameSDict->setAutoDelete(TRUE);
Doxygen::groupSDict = new GroupSDict(17);
Doxygen::groupSDict->setAutoDelete(TRUE);
- Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globalScope>");
+ Doxygen::globalScope = new NamespaceDef("<globalScope>",1,1,"<globalScope>");
Doxygen::namespaceSDict = new NamespaceSDict(20);
Doxygen::namespaceSDict->setAutoDelete(TRUE);
Doxygen::classSDict = new ClassSDict(1009);
@@ -9975,7 +10018,7 @@ void searchInputFiles(StringList &inputFiles)
excludeNameDict.setAutoDelete(TRUE);
// gather names of all files in the include path
- msg("Searching for include files...\n");
+ g_s.begin("Searching for include files...\n");
QStrList &includePathList = Config_getList("INCLUDE_PATH");
char *s=includePathList.first();
while (s)
@@ -9990,8 +10033,9 @@ void searchInputFiles(StringList &inputFiles)
alwaysRecursive);
s=includePathList.next();
}
-
- msg("Searching for example files...\n");
+ g_s.end();
+
+ g_s.begin("Searching for example files...\n");
QStrList &examplePathList = Config_getList("EXAMPLE_PATH");
s=examplePathList.first();
while (s)
@@ -10002,8 +10046,9 @@ void searchInputFiles(StringList &inputFiles)
(alwaysRecursive || Config_getBool("EXAMPLE_RECURSIVE")));
s=examplePathList.next();
}
+ g_s.end();
- msg("Searching for images...\n");
+ g_s.begin("Searching for images...\n");
QStrList &imagePathList=Config_getList("IMAGE_PATH");
s=imagePathList.first();
while (s)
@@ -10013,8 +10058,9 @@ void searchInputFiles(StringList &inputFiles)
alwaysRecursive);
s=imagePathList.next();
}
+ g_s.end();
- msg("Searching for dot files...\n");
+ g_s.begin("Searching for dot files...\n");
QStrList &dotFileList=Config_getList("DOTFILE_DIRS");
s=dotFileList.first();
while (s)
@@ -10024,8 +10070,9 @@ void searchInputFiles(StringList &inputFiles)
alwaysRecursive);
s=dotFileList.next();
}
+ g_s.end();
- msg("Searching for msc files...\n");
+ g_s.begin("Searching for msc files...\n");
QStrList &mscFileList=Config_getList("MSCFILE_DIRS");
s=mscFileList.first();
while (s)
@@ -10035,9 +10082,9 @@ void searchInputFiles(StringList &inputFiles)
alwaysRecursive);
s=mscFileList.next();
}
+ g_s.end();
-
- msg("Searching for files to exclude\n");
+ g_s.begin("Searching for files to exclude\n");
QStrList &excludeList = Config_getList("EXCLUDE");
s=excludeList.first();
while (s)
@@ -10048,12 +10095,13 @@ void searchInputFiles(StringList &inputFiles)
FALSE);
s=excludeList.next();
}
+ g_s.end();
/**************************************************************************
* Determine Input Files *
**************************************************************************/
- msg("Searching for files to process...\n");
+ g_s.begin("Searching for files to process...\n");
QDict<void> *killDict = new QDict<void>(10007);
int inputSize=0;
QStrList &inputList=Config_getList("INPUT");
@@ -10080,6 +10128,7 @@ void searchInputFiles(StringList &inputFiles)
s=inputList.next();
}
delete killDict;
+ g_s.end();
}
@@ -10179,6 +10228,11 @@ void parseInput()
if (generateHtml)
htmlOutput = createOutputDirectory(outputDirectory,"HTML_OUTPUT","/html");
+ QCString docbookOutput;
+ bool &generateDocbook = Config_getBool("GENERATE_DOCBOOK");
+ if (generateDocbook)
+ docbookOutput = createOutputDirectory(outputDirectory,"DOCBOOK_OUTPUT","/docbook");
+
QCString xmlOutput;
bool &generateXml = Config_getBool("GENERATE_XML");
if (generateXml)
@@ -10199,6 +10253,10 @@ void parseInput()
if (generateMan)
manOutput = createOutputDirectory(outputDirectory,"MAN_OUTPUT","/man");
+ //QCString sqlOutput;
+ //bool &generateSql = Config_getBool("GENERATE_SQLITE3");
+ //if (generateSql)
+ // sqlOutput = createOutputDirectory(outputDirectory,"SQLITE3_OUTPUT","/sqlite3");
if (Config_getBool("HAVE_DOT"))
{
@@ -10255,12 +10313,12 @@ void parseInput()
// prevent search in the output directories
QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
if (generateHtml) exclPatterns.append(htmlOutput);
+ if (generateDocbook) exclPatterns.append(docbookOutput);
if (generateXml) exclPatterns.append(xmlOutput);
if (generateLatex) exclPatterns.append(latexOutput);
if (generateRtf) exclPatterns.append(rtfOutput);
if (generateMan) exclPatterns.append(manOutput);
-
searchInputFiles(g_inputFiles);
// Notice: the order of the function calls below is very important!
@@ -10305,8 +10363,10 @@ void parseInput()
addSTLClasses(rootNav);
}
+ g_s.begin("Parsing files\n");
parseFiles(root,rootNav);
g_storage->close();
+ g_s.end();
// we are done with input scanning now, so free up the buffers used by flex
// (can be around 4MB)
@@ -10324,34 +10384,41 @@ void parseInput()
/**************************************************************************
* Gather information *
**************************************************************************/
-
- msg("Building group list...\n");
+
+ g_s.begin("Building group list...\n");
buildGroupList(rootNav);
organizeSubGroups(rootNav);
+ g_s.end();
- msg("Building directory list...\n");
+ g_s.begin("Building directory list...\n");
buildDirectories();
findDirDocumentation(rootNav);
+ g_s.end();
- msg("Building namespace list...\n");
+ g_s.begin("Building namespace list...\n");
buildNamespaceList(rootNav);
findUsingDirectives(rootNav);
+ g_s.end();
- msg("Building file list...\n");
+ g_s.begin("Building file list...\n");
buildFileList(rootNav);
+ g_s.end();
//generateFileTree();
-
- msg("Building class list...\n");
+
+ g_s.begin("Building class list...\n");
buildClassList(rootNav);
+ g_s.end();
- msg("Associating documentation with classes...\n");
+ g_s.begin("Associating documentation with classes...\n");
buildClassDocList(rootNav);
// build list of using declarations here (global list)
buildListOfUsingDecls(rootNav);
-
- msg("Computing nesting relations for classes...\n");
+ g_s.end();
+
+ g_s.begin("Computing nesting relations for classes...\n");
resolveClassNestingRelations();
+ g_s.end();
// 1.8.2-20121111: no longer add nested classes to the group as well
//distributeClassGroupRelations();
@@ -10362,97 +10429,121 @@ void parseInput()
// we don't need the list of using declaration anymore
g_usingDeclarations.clear();
- msg("Building example list...\n");
+ g_s.begin("Building example list...\n");
buildExampleList(rootNav);
-
- msg("Searching for enumerations...\n");
+ g_s.end();
+
+ g_s.begin("Searching for enumerations...\n");
findEnums(rootNav);
-
+ g_s.end();
+
// Since buildVarList calls isVarWithConstructor
// and this calls getResolvedClass we need to process
// typedefs first so the relations between classes via typedefs
// are properly resolved. See bug 536385 for an example.
- msg("Searching for documented typedefs...\n");
+ g_s.begin("Searching for documented typedefs...\n");
buildTypedefList(rootNav);
+ g_s.end();
- msg("Searching for members imported via using declarations...\n");
+ g_s.begin("Searching for members imported via using declarations...\n");
findUsingDeclImports(rootNav);
// this should be after buildTypedefList in order to properly import
// used typedefs
findUsingDeclarations(rootNav);
+ g_s.end();
- msg("Searching for included using directives...\n");
+ g_s.begin("Searching for included using directives...\n");
findIncludedUsingDirectives();
+ g_s.end();
- msg("Searching for documented variables...\n");
+ g_s.begin("Searching for documented variables...\n");
buildVarList(rootNav);
+ g_s.end();
- msg("Building member list...\n"); // using class info only !
+ g_s.begin("Building member list...\n"); // using class info only !
buildFunctionList(rootNav);
+ g_s.end();
- msg("Searching for friends...\n");
+ g_s.begin("Searching for friends...\n");
findFriends();
-
- msg("Searching for documented defines...\n");
- findDefineDocumentation(rootNav);
-
- findClassEntries(rootNav);
- msg("Computing class inheritance relations...\n");
- findInheritedTemplateInstances();
- msg("Computing class usage relations...\n");
- findUsedTemplateInstances();
+ g_s.end();
+
+ g_s.begin("Searching for documented defines...\n");
+ findDefineDocumentation(rootNav);
+ g_s.end();
+
+ g_s.begin("Computing class inheritance relations...\n");
+ findClassEntries(rootNav);
+ findInheritedTemplateInstances();
+ g_s.end();
+
+ g_s.begin("Computing class usage relations...\n");
+ findUsedTemplateInstances();
+ g_s.end();
+
if (Config_getBool("INLINE_SIMPLE_STRUCTS"))
{
- msg("Searching for tag less structs...\n");
+ g_s.begin("Searching for tag less structs...\n");
findTagLessClasses();
+ g_s.end();
}
- msg("Flushing cached template relations that have become invalid...\n");
+ g_s.begin("Flushing cached template relations that have become invalid...\n");
flushCachedTemplateRelations();
-
- msg("Creating members for template instances...\n");
+ g_s.end();
+
+ g_s.begin("Creating members for template instances...\n");
createTemplateInstanceMembers();
+ g_s.end();
- msg("Computing class relations...\n");
- computeTemplateClassRelations();
+ g_s.begin("Computing class relations...\n");
+ computeTemplateClassRelations();
flushUnresolvedRelations();
if (Config_getBool("OPTIMIZE_OUTPUT_VHDL"))
{
VhdlDocGen::computeVhdlComponentRelations();
}
- computeClassRelations();
- g_classEntries.clear();
+ computeClassRelations();
+ g_classEntries.clear();
+ g_s.end();
- msg("Add enum values to enums...\n");
+ g_s.begin("Add enum values to enums...\n");
addEnumValuesToEnums(rootNav);
findEnumDocumentation(rootNav);
+ g_s.end();
- msg("Searching for member function documentation...\n");
+ g_s.begin("Searching for member function documentation...\n");
findObjCMethodDefinitions(rootNav);
findMemberDocumentation(rootNav); // may introduce new members !
transferRelatedFunctionDocumentation();
transferFunctionDocumentation();
-
- msg("Building page list...\n");
+ g_s.end();
+
+ g_s.begin("Building page list...\n");
buildPageList(rootNav);
+ g_s.end();
- msg("Search for main page...\n");
+ g_s.begin("Search for main page...\n");
findMainPage(rootNav);
+ g_s.end();
- msg("Computing page relations...\n");
+ g_s.begin("Computing page relations...\n");
computePageRelations(rootNav);
checkPageRelations();
+ g_s.end();
- msg("Determining the scope of groups...\n");
+ g_s.begin("Determining the scope of groups...\n");
findGroupScope(rootNav);
+ g_s.end();
- msg("Sorting lists...\n");
+ g_s.begin("Sorting lists...\n");
Doxygen::memberNameSDict->sort();
Doxygen::functionNameSDict->sort();
Doxygen::hiddenClasses->sort();
Doxygen::classSDict->sort();
-
+ g_s.end();
+
msg("Freeing entry tree\n");
delete rootNav;
g_storage->close();
@@ -10461,78 +10552,98 @@ void parseInput()
QDir thisDir;
thisDir.remove(Doxygen::entryDBFileName);
-
- msg("Determining which enums are documented\n");
+
+ g_s.begin("Determining which enums are documented\n");
findDocumentedEnumValues();
+ g_s.end();
- msg("Computing member relations...\n");
+ g_s.begin("Computing member relations...\n");
mergeCategories();
computeMemberRelations();
+ g_s.end();
- msg("Building full member lists recursively...\n");
+ g_s.begin("Building full member lists recursively...\n");
buildCompleteMemberLists();
-
- msg("Adding members to member groups.\n");
+ g_s.end();
+
+ g_s.begin("Adding members to member groups.\n");
addMembersToMemberGroup();
+ g_s.end();
if (Config_getBool("DISTRIBUTE_GROUP_DOC"))
{
- msg("Distributing member group documentation.\n");
+ g_s.begin("Distributing member group documentation.\n");
distributeMemberGroupDocumentation();
+ g_s.end();
}
-
- msg("Computing member references...\n");
- computeMemberReferences();
+
+ g_s.begin("Computing member references...\n");
+ computeMemberReferences();
+ g_s.end();
if (Config_getBool("INHERIT_DOCS"))
{
- msg("Inheriting documentation...\n");
+ g_s.begin("Inheriting documentation...\n");
inheritDocumentation();
+ g_s.end();
}
// compute the shortest possible names of all files
// without losing the uniqueness of the file names.
- msg("Generating disk names...\n");
+ g_s.begin("Generating disk names...\n");
Doxygen::inputNameList->generateDiskNames();
-
- msg("Adding source references...\n");
+ g_s.end();
+
+ g_s.begin("Adding source references...\n");
addSourceReferences();
+ g_s.end();
- msg("Adding xrefitems...\n");
+ g_s.begin("Adding xrefitems...\n");
addListReferences();
generateXRefPages();
+ g_s.end();
- msg("Sorting member lists...\n");
+ g_s.begin("Sorting member lists...\n");
sortMemberLists();
+ g_s.end();
if (Config_getBool("DIRECTORY_GRAPH"))
{
- msg("Computing dependencies between directories...\n");
+ g_s.begin("Computing dependencies between directories...\n");
computeDirDependencies();
+ g_s.end();
}
- //msg("Resolving citations...\n");
+ //g_s.begin("Resolving citations...\n");
//Doxygen::citeDict->resolve();
- msg("Generating citations page...\n");
+ g_s.begin("Generating citations page...\n");
Doxygen::citeDict->generatePage();
+ g_s.end();
- msg("Counting data structures...\n");
+ g_s.begin("Counting data structures...\n");
countDataStructures();
-
- msg("Resolving user defined references...\n");
+ g_s.end();
+
+ g_s.begin("Resolving user defined references...\n");
resolveUserReferences();
+ g_s.end();
- msg("Finding anchors and sections in the documentation...\n");
+ g_s.begin("Finding anchors and sections in the documentation...\n");
findSectionsInDocumentation();
+ g_s.end();
+ g_s.begin("Transferring function references...\n");
transferFunctionReferences();
+ g_s.end();
- msg("Combining using relations...\n");
+ g_s.begin("Combining using relations...\n");
combineUsingRelations();
+ g_s.end();
- msg("Adding members to index pages...\n");
+ g_s.begin("Adding members to index pages...\n");
addMembersToIndex();
+ g_s.end();
if (Config_getBool("OPTIMIZE_OUTPUT_VHDL") &&
Config_getBool("HAVE_DOT") &&
@@ -10586,13 +10697,16 @@ void generateOutput()
// copy static stuff
copyStyleSheet();
copyLogo();
- copyExtraFiles();
+ copyExtraFiles("HTML_EXTRA_FILES","HTML_OUTPUT");
FTVHelp::generateTreeViewImages();
}
if (generateLatex)
{
g_outputList->add(new LatexGenerator);
LatexGenerator::init();
+
+ // copy static stuff
+ copyExtraFiles("LATEX_EXTRA_FILES","LATEX_OUTPUT");
}
if (generateMan)
{
@@ -10604,7 +10718,6 @@ void generateOutput()
g_outputList->add(new RTFGenerator);
RTFGenerator::init();
}
-
if (Config_getBool("USE_HTAGS"))
{
Htags::useHtags = TRUE;
@@ -10641,7 +10754,7 @@ void generateOutput()
if (generateLatex) writeDoxFont(Config_getString("LATEX_OUTPUT"));
if (generateRtf) writeDoxFont(Config_getString("RTF_OUTPUT"));
- msg("Generating style sheet...\n");
+ g_s.begin("Generating style sheet...\n");
//printf("writing style info\n");
QCString genString =
theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"));
@@ -10656,7 +10769,8 @@ void generateOutput()
//parseText(*g_outputList,theTranslator->trWrittenBy());
g_outputList->writeStyleInfo(4); // write last part
g_outputList->enableAll();
-
+ g_s.end();
+
static bool searchEngine = Config_getBool("SEARCHENGINE");
static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
@@ -10665,7 +10779,7 @@ void generateOutput()
// what categories we find in this function.
if (generateHtml && searchEngine)
{
- msg("Generating search indices...\n");
+ g_s.begin("Generating search indices...\n");
QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
QDir searchDir(searchDirName);
if (!searchDir.exists() && !searchDir.mkdir(searchDirName))
@@ -10679,40 +10793,50 @@ void generateOutput()
{
writeJavascriptSearchIndex();
}
+ g_s.end();
}
- msg("Generating example documentation...\n");
+ g_s.begin("Generating example documentation...\n");
generateExampleDocs();
+ g_s.end();
msg("Generating file sources...\n");
if (!Htags::useHtags)
{
+ g_s.begin("Generating file sources...\n");
generateFileSources();
+ g_s.end();
}
- msg("Generating file documentation...\n");
+ g_s.begin("Generating file documentation...\n");
generateFileDocs();
-
- msg("Generating page documentation...\n");
+ g_s.end();
+
+ g_s.begin("Generating page documentation...\n");
generatePageDocs();
-
- msg("Generating group documentation...\n");
+ g_s.end();
+
+ g_s.begin("Generating group documentation...\n");
generateGroupDocs();
+ g_s.end();
- msg("Generating class documentation...\n");
+ g_s.begin("Generating class documentation...\n");
generateClassDocs();
-
- msg("Generating namespace index...\n");
+ g_s.end();
+
+ g_s.begin("Generating namespace index...\n");
generateNamespaceDocs();
-
+ g_s.end();
+
if (Config_getBool("GENERATE_LEGEND"))
{
msg("Generating graph info page...\n");
writeGraphInfo(*g_outputList);
}
- msg("Generating directory documentation...\n");
+ g_s.begin("Generating directory documentation...\n");
generateDirDocs(*g_outputList);
+ g_s.end();
if (Doxygen::formulaList->count()>0 && generateHtml
&& !Config_getBool("USE_MATHJAX"))
@@ -10728,8 +10852,9 @@ void generateOutput()
writeIndexHierarchy(*g_outputList);
}
- msg("finalizing index lists...\n");
+ g_s.begin("finalizing index lists...\n");
Doxygen::indexList->finalize();
+ g_s.end();
if (!generateTagFile.isEmpty())
{
@@ -10749,24 +10874,41 @@ void generateOutput()
if (Config_getBool("GENERATE_XML"))
{
- msg("Generating XML output...\n");
+ g_s.begin("Generating XML output...\n");
Doxygen::generatingXmlOutput=TRUE;
generateXML();
Doxygen::generatingXmlOutput=FALSE;
+ g_s.end();
+ }
+ if (USE_SQLITE3)
+ {
+ g_s.begin("Generating SQLITE3 output...\n");
+ generateSqlite3();
+ g_s.end();
}
+
+ if (Config_getBool("GENERATE_DOCBOOK"))
+ {
+ g_s.begin("Generating Docbook output...\n");
+ generateDocbook();
+ g_s.end();
+ }
+
if (Config_getBool("GENERATE_AUTOGEN_DEF"))
{
- msg("Generating AutoGen DEF output...\n");
+ g_s.begin("Generating AutoGen DEF output...\n");
generateDEF();
+ g_s.end();
}
if (Config_getBool("GENERATE_PERLMOD"))
{
- msg("Generating Perl module output...\n");
+ g_s.begin("Generating Perl module output...\n");
generatePerlMod();
+ g_s.end();
}
if (generateHtml && searchEngine && serverBasedSearch)
{
- msg("Generating search index\n");
+ g_s.begin("Generating search index\n");
if (Doxygen::searchIndex->kind()==SearchIndexIntf::Internal) // write own search index
{
HtmlGenerator::writeSearchPage();
@@ -10786,15 +10928,17 @@ void generateOutput()
}
Doxygen::searchIndex->write(searchDataFile);
}
+ g_s.end();
}
if (generateRtf)
{
- msg("Combining RTF output...\n");
+ g_s.begin("Combining RTF output...\n");
if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf"))
{
err("An error occurred during post-processing the RTF files!\n");
}
+ g_s.end();
}
if (Config_getBool("HAVE_DOT"))
@@ -10862,6 +11006,7 @@ void generateOutput()
msg("Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
}
+ g_s.print();
if (Debug::isFlagSet(Debug::Time))
{
msg("Total elapsed time: %.3f seconds\n(of which %.3f seconds waiting for external tools to finish)\n",
diff --git a/src/doxygen.css b/src/doxygen.css
index 544cc71..2781983 100644
--- a/src/doxygen.css
+++ b/src/doxygen.css
@@ -787,7 +787,7 @@ table.fieldtable {
}
.fieldtable td.fieldname {
- padding-top: 5px;
+ padding-top: 3px;
}
.fieldtable td.fielddoc {
@@ -796,7 +796,7 @@ table.fieldtable {
}
.fieldtable td.fielddoc p:first-child {
- margin-top: 2px;
+ margin-top: 0px;
}
.fieldtable td.fielddoc p:last-child {
diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in
index 3bd617e..e7b05dc 100644
--- a/src/doxygen.pro.in
+++ b/src/doxygen.pro.in
@@ -18,7 +18,7 @@ TEMPLATE = app.t
CONFIG = console warn_on $extraopts
HEADERS = doxygen.h
SOURCES = main.cpp
-unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
+unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread %%SQLITE3_LIBS%%
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
win32-msvc:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
@@ -26,7 +26,7 @@ win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL
-win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread -Wl,--as-needed -lole32
+win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread %%SQLITE3_LIBS%% -Wl,--as-needed -lole32
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
INCLUDEPATH += ../qtools ../libmd5 .
DESTDIR = ../bin
diff --git a/src/doxygen_css.h b/src/doxygen_css.h
index 2b3f668..b5d492e 100644
--- a/src/doxygen_css.h
+++ b/src/doxygen_css.h
@@ -787,7 +787,7 @@
"}\n"
"\n"
".fieldtable td.fieldname {\n"
-" padding-top: 5px;\n"
+" padding-top: 3px;\n"
"}\n"
"\n"
".fieldtable td.fielddoc {\n"
@@ -796,7 +796,7 @@
"}\n"
"\n"
".fieldtable td.fielddoc p:first-child {\n"
-" margin-top: 2px;\n"
+" margin-top: 0px;\n"
"} \n"
" \n"
".fieldtable td.fielddoc p:last-child {\n"
diff --git a/src/entry.cpp b/src/entry.cpp
index 06e1a5f..afe4090 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -113,6 +113,7 @@ Entry::Entry(const Entry &e)
anchors = new QList<SectionInfo>;
fileName = e.fileName;
startLine = e.startLine;
+ startColumn = e.startColumn;
if (e.sli)
{
sli = new QList<ListItemInfo>;
@@ -239,6 +240,7 @@ void Entry::reset()
initializer.resize(0);
initLines = -1;
startLine = 1;
+ startColumn = 1;
bodyLine = -1;
endBodyLine = -1;
mGrpId = -1;
diff --git a/src/entry.h b/src/entry.h
index dac1e78..6471995 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -261,6 +261,7 @@ class Entry
QList<SectionInfo> *anchors; //!< list of anchors defined in this entry
QCString fileName; //!< file this entry was extracted from
int startLine; //!< start line of entry in the source
+ int startColumn; //!< start column of entry in the source
QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in
SrcLangExt lang; //!< programming language in which this entry was found
bool hidden; //!< does this represent an entity that is hidden from the output
diff --git a/src/filedef.cpp b/src/filedef.cpp
index ccf419e..ae700e4 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -74,7 +74,7 @@ class DevNullCodeDocInterface : public CodeOutputInterface
*/
FileDef::FileDef(const char *p,const char *nm,
const char *lref,const char *dn)
- : Definition((QCString)p+nm,1,nm)
+ : Definition((QCString)p+nm,1,1,nm)
{
path=p;
filepath=path+nm;
diff --git a/src/fortrancode.l b/src/fortrancode.l
index cb8ad4e..54b33bf 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -50,6 +50,10 @@
#include "filedef.h"
#include "namespacedef.h"
+// Toggle for some debugging info
+//#define DBG_CTX(x) fprintf x
+#define DBG_CTX(x) do { } while(0)
+
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_TOP_STATE 1
#define YY_NO_INPUT 1
@@ -364,6 +368,16 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
}
}
+static const char* fileLocation()
+{
+ const int maxLen=4096;
+ static char floc[maxLen+1];
+ floc[maxLen]='\0';
+ snprintf(floc,maxLen,"%s:%d:%d",g_sourceFileDef?g_sourceFileDef->absFilePath().data():"[unknown]",g_yyLineNr,1);
+ return floc;
+}
+
+
/**
generates dictionay entries that are used if REFERENCED_BY_RELATION ... options are set
(e.g. the "referenced by ..." list after the function documentation)
@@ -376,11 +390,11 @@ static void addDocCrossReference(MemberDef *src, MemberDef *dst)
if ((Config_getBool("REFERENCED_BY_RELATION") || Config_getBool("CALLER_GRAPH")) &&
(src->isFunction()))
{
- dst->addSourceReferencedBy(src);
+ dst->addSourceReferencedBy(src,fileLocation());
}
if ((Config_getBool("REFERENCES_RELATION") || Config_getBool("CALL_GRAPH")) && (src->isFunction()))
{
- src->addSourceReferences(dst);
+ src->addSourceReferences(dst,fileLocation());
}
}
@@ -619,7 +633,7 @@ static int countLines()
/** start scope */
static void startScope()
{
- // fprintf(stderr, "===> startScope %s",yytext);
+ DBG_CTX((stderr, "===> startScope %s",yytext));
Scope *scope = new Scope;
scopeStack.append(scope);
}
@@ -627,10 +641,10 @@ static void startScope()
/** end scope */
static void endScope()
{
- // fprintf(stderr,"===> endScope %s",yytext);
+ DBG_CTX((stderr,"===> endScope %s",yytext));
if (scopeStack.isEmpty())
{
- //fprintf(stderr,"WARNING: fortrancode.l: stack empty!\n");
+ DBG_CTX((stderr,"WARNING: fortrancode.l: stack empty!\n"));
return;
}
@@ -848,7 +862,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
BEGIN(Subprog);
}
<Subprog>{ID} { // subroutine/function name
- // fprintf(stderr, "===> start subprogram %s\n", yytext);
+ DBG_CTX((stderr, "===> start subprogram %s\n", yytext));
startScope();
generateLink(*g_code,yytext);
}
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index d59b32b..dcb5caa 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -65,6 +65,10 @@
#include "pre.h"
#include "arguments.h"
+// Toggle for some debugging info
+//#define DBG_CTX(x) fprintf x
+#define DBG_CTX(x) do { } while(0)
+
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_INPUT 1
@@ -309,7 +313,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
<*>^.*\n { // prepass: look for line continuations
functionLine = FALSE;
- //fprintf(stderr, "---%s", yytext);
+ DBG_CTX((stderr, "---%s", yytext));
int indexStart = getAmpersandAtTheStart(yytext, (int)yyleng);
int indexEnd = getAmpOrExclAtTheEnd(yytext, (int)yyleng);
@@ -391,11 +395,11 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
yy_push_state(YY_START);
BEGIN(StrIgnore);
debugStr="*!";
- //fprintf(stderr,"start comment %d\n",yyLineNr);
+ DBG_CTX((stderr,"start comment %d\n",yyLineNr));
}
}
<StrIgnore>.?/\n { yy_pop_state(); // comment ends with endline character
- //fprintf(stderr,"end comment %d %s\n",yyLineNr,debugStr.data());
+ DBG_CTX((stderr,"end comment %d %s\n",yyLineNr,debugStr.data()));
} // comment line ends
<StrIgnore>. { debugStr+=yytext; }
@@ -411,7 +415,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
yy_push_state(Use);
}
<Use>{ID} {
- //fprintf(stderr,"using dir %s\n",yytext);
+ DBG_CTX((stderr,"using dir %s\n",yytext));
current->name=yytext;
current->fileName = yyFileName;
current->section=Entry::USINGDIR_SEC;
@@ -723,7 +727,7 @@ protected {
{ATTR_STMT}/{BS_}{ID} |
{ATTR_STMT}/{BS}"::" {
/* attribute statement starts */
- //fprintf(stderr,"5=========> Attribute statement: %s\n", yytext);
+ DBG_CTX((stderr,"5=========> Attribute statement: %s\n", yytext));
QCString tmp = yytext;
currentModifiers |= tmp.stripWhiteSpace();
argType="";
@@ -1113,7 +1117,7 @@ protected {
<*><<EOF>> {
if ( include_stack_ptr <= 0 ) {
if (YY_START!=INITIAL && YY_START!=Start) {
- //fprintf(stderr,"==== Error: EOF reached in wrong state (end missing)");
+ DBG_CTX((stderr,"==== Error: EOF reached in wrong state (end missing)"));
scanner_abort();
}
yyterminate();
@@ -1408,12 +1412,12 @@ static void pushBuffer(QCString& buffer)
include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER;
yy_switch_to_buffer(yy_scan_string(buffer));
- //fprintf(stderr, "--PUSH--%s", (const char *)buffer);
+ DBG_CTX((stderr, "--PUSH--%s", (const char *)buffer));
buffer = NULL;
}
static void popBuffer() {
- //fprintf(stderr, "--POP--");
+ DBG_CTX((stderr, "--POP--"));
include_stack_ptr --;
yy_delete_buffer( YY_CURRENT_BUFFER );
yy_switch_to_buffer( include_stack[include_stack_ptr] );
@@ -1935,7 +1939,7 @@ static int max(int a, int b) {return a>b?a:b;}
static void addModule(const char *name, bool isModule)
{
- //fprintf(stderr, "0=========> got module %s\n", name);
+ DBG_CTX((stderr, "0=========> got module %s\n", name));
if (isModule)
current->section = Entry::CLASS_SEC;
@@ -1965,7 +1969,7 @@ static void addModule(const char *name, bool isModule)
static void addSubprogram(const char *text)
{
- //fprintf(stderr,"1=========> got subprog, type: %s\n",text);
+ DBG_CTX((stderr,"1=========> got subprog, type: %s\n",text));
subrCurrent.prepend(current);
current->section = Entry::FUNCTION_SEC ;
QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
@@ -2073,7 +2077,7 @@ static void handleCommentBlock(const QCString &doc,bool brief)
static bool hideInBodyDocs = Config_getBool("HIDE_IN_BODY_DOCS");
int position=0;
if (docBlockInBody && hideInBodyDocs) return;
- //fprintf(stderr,"call parseCommentBlock [%s]\n",doc.data());
+ DBG_CTX((stderr,"call parseCommentBlock [%s]\n",doc.data()));
int lineNr = brief ? current->briefLine : current->docLine;
while (parseCommentBlock(
g_thisParser,
@@ -2089,10 +2093,10 @@ static void handleCommentBlock(const QCString &doc,bool brief)
needsEntry
))
{
- //fprintf(stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry);
+ DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
if (needsEntry) addCurrentEntry(0);
}
- //fprintf(stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry);
+ DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
if (needsEntry) addCurrentEntry(0);
}
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index ef73830..554a0e3 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -44,7 +44,7 @@
//---------------------------------------------------------------------------
GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t,
- const char *refFileName) : Definition(df,dl,na)
+ const char *refFileName) : Definition(df,dl,1,na)
{
fileList = new FileList;
classSDict = new ClassSDict(17);
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 3b3bb31..c517776 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -447,7 +447,8 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::ManOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
- case DocVerbatim::RtfOnly:
+ case DocVerbatim::RtfOnly:
+ case DocVerbatim::DocbookOnly:
/* nothing */
break;
@@ -536,7 +537,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
- TRUE, // show line numbers
+ FALSE, // show line numbers
m_ctx // search context
);
m_t << PREFRAG_END;
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 2146e2f..f43beba 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -383,6 +383,7 @@ void HtmlHelp::initialize()
0x422 Ukrainian
0x81A Serbian (Serbia, Latin)
0x403 Catalan
+ 0x426 Latvian
0x427 Lithuanian
0x436 Afrikaans
0x42A Vietnamese
@@ -431,6 +432,7 @@ void HtmlHelp::initialize()
s_languageDict.insert("vietnamese", new QCString("0x42A Vietnamese"));
s_languageDict.insert("persian", new QCString("0x429 Persian (Iran)"));
s_languageDict.insert("arabic", new QCString("0xC01 Arabic (Egypt)"));
+ s_languageDict.insert("latvian", new QCString("0x426 Latvian"));
}
diff --git a/src/language.cpp b/src/language.cpp
index 00386e1..2d24ed8 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -127,6 +127,9 @@
#ifdef LANG_LT
#include "translator_lt.h"
#endif
+#ifdef LANG_LV
+#include "translator_lv.h"
+#endif
#ifdef LANG_ZA
#include "translator_za.h"
#endif
@@ -369,6 +372,12 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorDecoder(new TranslatorLithuanian);
}
#endif
+#ifdef LANG_LV
+ else if (L_EQUAL("latvian"))
+ {
+ theTranslator=new TranslatorDecoder(new TranslatorLatvian);
+ }
+#endif
#ifdef LANG_ZA
else if (L_EQUAL("afrikaans"))
{
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 91f585c..18b4385 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -358,7 +358,8 @@ void LatexDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::ManOnly:
- case DocVerbatim::RtfOnly:
+ case DocVerbatim::RtfOnly:
+ case DocVerbatim::DocbookOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index 47aaa34..7d9f077 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -81,6 +81,7 @@ HEADERS = arguments.h \
logos.h \
mandocvisitor.h \
mangen.h \
+ sqlite3gen.h \
markdown.h \
marshal.h \
memberdef.h \
@@ -170,7 +171,9 @@ HEADERS = arguments.h \
vhdldocgen.h \
vhdlscanner.h \
xmldocvisitor.h \
- xmlgen.h
+ xmlgen.h \
+ docbookvisitor.h \
+ docbookgen.h
SOURCES = arguments.cpp \
ce_lex.cpp \
@@ -222,6 +225,7 @@ SOURCES = arguments.cpp \
logos.cpp \
mandocvisitor.cpp \
mangen.cpp \
+ sqlite3gen.cpp \
markdown.cpp \
marshal.cpp \
memberdef.cpp \
@@ -259,7 +263,9 @@ SOURCES = arguments.cpp \
vhdlparser.cpp \
vhdlscanner.cpp \
xmldocvisitor.cpp \
- xmlgen.cpp
+ xmlgen.cpp \
+ docbookvisitor.cpp \
+ docbookgen.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-msvc:TMAKE_CXXFLAGS += -Zm200
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index db401bb..9a6f029 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -223,7 +223,8 @@ void ManDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
case DocVerbatim::LatexOnly:
- case DocVerbatim::RtfOnly:
+ case DocVerbatim::RtfOnly:
+ case DocVerbatim::DocbookOnly:
case DocVerbatim::Dot:
case DocVerbatim::Msc:
/* nothing */
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 0f6a4fe..50dbdd5 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -192,15 +192,16 @@ static QCString isBlockCommand(const char *data,int offset,int size)
{
return "}";
}
- else if (blockName=="dot" ||
- blockName=="code" ||
- blockName=="msc" ||
- blockName=="verbatim" ||
- blockName=="latexonly" ||
- blockName=="htmlonly" ||
- blockName=="xmlonly" ||
- blockName=="rtfonly" ||
- blockName=="manonly"
+ else if (blockName=="dot" ||
+ blockName=="code" ||
+ blockName=="msc" ||
+ blockName=="verbatim" ||
+ blockName=="latexonly" ||
+ blockName=="htmlonly" ||
+ blockName=="xmlonly" ||
+ blockName=="rtfonly" ||
+ blockName=="manonly" ||
+ blockName=="docbookonly"
)
{
return "end"+blockName;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 924b1e6..0c89554 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -439,6 +439,7 @@ class MemberDefImpl
NamespaceDef *nspace; // the namespace this member is in.
MemberDef *enumScope; // the enclosing scope, if this is an enum field
+ bool livesInsideEnum;
MemberDef *annEnumType; // the anonymous enum that is the type of this member
MemberList *enumFields; // enumeration fields
@@ -591,6 +592,7 @@ void MemberDefImpl::init(Definition *def,
exampleSDict=0;
enumFields=0;
enumScope=0;
+ livesInsideEnum=FALSE;
defTmpArgLists=0;
hasCallGraph = FALSE;
hasCallerGraph = FALSE;
@@ -680,6 +682,7 @@ void MemberDefImpl::init(Definition *def,
*
* \param df File containing the definition of this member.
* \param dl Line at which the member definition was found.
+ * \param dc Column at which the member definition was found.
* \param t A string representing the type of the member.
* \param na A string representing the name of the member.
* \param a A string representing the arguments of the member.
@@ -690,18 +693,18 @@ void MemberDefImpl::init(Definition *def,
* \c Normal, \c Virtual, \c Pure.
* \param s A boolean that is true iff the member is static.
* \param r The relationship between the class and the member.
- * \param mt The kind of member. See #MemberDef::MemberType for a list of
+ * \param mt The kind of member. See #MemberType for a list of
* all types.
* \param tal The template arguments of this member.
* \param al The arguments of this member. This is a structured form of
* the string past as argument \a a.
*/
-MemberDef::MemberDef(const char *df,int dl,
+MemberDef::MemberDef(const char *df,int dl,int dc,
const char *t,const char *na,const char *a,const char *e,
Protection p,Specifier v,bool s,Relationship r,MemberType mt,
const ArgumentList *tal,const ArgumentList *al
- ) : Definition(df,dl,removeRedundantWhiteSpace(na))
+ ) : Definition(df,dl,dc,removeRedundantWhiteSpace(na))
{
//printf("MemberDef::MemberDef(%s)\n",na);
m_storagePos=-1;
@@ -1178,6 +1181,10 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *,
QCString n = name();
if (!hideScopeNames)
{
+ if (m_impl->enumScope && m_impl->livesInsideEnum)
+ {
+ n.prepend(m_impl->enumScope->displayName()+sep);
+ }
if (m_impl->classDef && gd && !isRelated())
{
n.prepend(m_impl->classDef->displayName()+sep);
@@ -2902,6 +2909,9 @@ void MemberDef::writeMemberDocSimple(OutputList &ol, Definition *container)
{
type = m_impl->type;
}
+
+ if (isTypedef()) type.prepend("typedef ");
+
QCString ts = simplifyTypeForTable(type);
if (cd) // cd points to an anonymous struct pointed to by this member
@@ -3165,10 +3175,11 @@ void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
m_isLinkableCached = 0;
}
-void MemberDef::setEnumScope(MemberDef *md)
+void MemberDef::setEnumScope(MemberDef *md,bool livesInsideEnum)
{
makeResident();
m_impl->enumScope=md;
+ m_impl->livesInsideEnum=livesInsideEnum;
if (md->getGroupDef())
{
m_impl->group=md->getGroupDef();
@@ -3224,7 +3235,7 @@ MemberDef *MemberDef::createTemplateInstanceMember(
}
MemberDef *imd = new MemberDef(
- getDefFileName(),getDefLine(),
+ getDefFileName(),getDefLine(),getDefColumn(),
substituteTemplateArgumentsInString(m_impl->type,formalArgs,actualArgs),
methodName,
substituteTemplateArgumentsInString(m_impl->args,formalArgs,actualArgs),
@@ -4751,6 +4762,7 @@ void MemberDef::flushToDisk() const
marshalObjPointer (Doxygen::symbolStorage,m_impl->fileDef);
marshalObjPointer (Doxygen::symbolStorage,m_impl->nspace);
marshalObjPointer (Doxygen::symbolStorage,m_impl->enumScope);
+ marshalBool (Doxygen::symbolStorage,m_impl->livesInsideEnum);
marshalObjPointer (Doxygen::symbolStorage,m_impl->annEnumType);
marshalMemberList (Doxygen::symbolStorage,m_impl->enumFields);
marshalObjPointer (Doxygen::symbolStorage,m_impl->redefines);
@@ -4855,6 +4867,7 @@ void MemberDef::loadFromDisk() const
m_impl->fileDef = (FileDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->nspace = (NamespaceDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->enumScope = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
+ m_impl->livesInsideEnum = unmarshalBool (Doxygen::symbolStorage);
m_impl->annEnumType = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->enumFields = unmarshalMemberList (Doxygen::symbolStorage);
m_impl->redefines = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
diff --git a/src/memberdef.h b/src/memberdef.h
index 47c79bd..0b49d6e 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -44,7 +44,7 @@ class MemberDef : public Definition
{
public:
- MemberDef(const char *defFileName,int defLine,
+ MemberDef(const char *defFileName,int defLine,int defColumn,
const char *type,const char *name,const char *args,
const char *excp,Protection prot,Specifier virt,bool stat,
Relationship related,MemberType t,const ArgumentList *tal,
@@ -274,7 +274,7 @@ class MemberDef : public Definition
// enumeration specific members
void insertEnumField(MemberDef *md);
- void setEnumScope(MemberDef *md);
+ void setEnumScope(MemberDef *md,bool livesInsideEnum=FALSE);
void setEnumClassScope(ClassDef *cd);
void setDocumentedEnumValues(bool value);
void setAnonymousEnumType(MemberDef *md);
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index b7a6397..c5fafee 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -33,10 +33,10 @@
//------------------------------------------------------------------
-NamespaceDef::NamespaceDef(const char *df,int dl,
+NamespaceDef::NamespaceDef(const char *df,int dl,int dc,
const char *name,const char *lref,
const char *fName) :
- Definition(df,dl,name)
+ Definition(df,dl,dc,name)
{
if (fName)
{
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 9bc4fea..dbc98d5 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -37,7 +37,7 @@ class NamespaceSDict;
class NamespaceDef : public Definition
{
public:
- NamespaceDef(const char *defFileName,int defLine,
+ NamespaceDef(const char *defFileName,int defLine,int defColumn,
const char *name,const char *ref=0,
const char *refFile=0);
~NamespaceDef();
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index d553570..7445287 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -28,7 +28,7 @@
PageDef::PageDef(const char *f,int l,const char *n,
const char *d,const char *t)
- : Definition(f,l,n), m_title(t)
+ : Definition(f,l,1,n), m_title(t)
{
setDocumentation(d,f,l);
m_subPageDict = new PageSDict(7);
@@ -265,16 +265,11 @@ void PageDef::writePageDocumentation(OutputList &ol)
bool PageDef::visibleInIndex() const
{
- static bool allExternals = Config_getBool("ALLEXTERNALS");
+ static bool externalPages = Config_getBool("EXTERNAL_PAGES");
return // not part of a group
!getGroupDef() &&
// not an externally defined page
- (!isReference() || allExternals)
- // &&
- // not a subpage
- //(getOuterScope()==0 ||
- // getOuterScope()->definitionType()!=Definition::TypePage
- //)
+ (!isReference() || externalPages)
;
}
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 9da834d..bba416f 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -718,14 +718,15 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
m_output.add("</programlisting>");
#endif
return;
- case DocVerbatim::Verbatim: type = "preformatted"; break;
- case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
- case DocVerbatim::RtfOnly: type = "rtfonly"; break;
- case DocVerbatim::ManOnly: type = "manonly"; break;
+ case DocVerbatim::Verbatim: type = "preformatted"; break;
+ case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
+ case DocVerbatim::RtfOnly: type = "rtfonly"; break;
+ case DocVerbatim::ManOnly: type = "manonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
- case DocVerbatim::XmlOnly: type = "xmlonly"; break;
- case DocVerbatim::Dot: type = "dot"; break;
- case DocVerbatim::Msc: type = "msc"; break;
+ case DocVerbatim::XmlOnly: type = "xmlonly"; break;
+ case DocVerbatim::DocbookOnly: type = "docbookonly"; break;
+ case DocVerbatim::Dot: type = "dot"; break;
+ case DocVerbatim::Msc: type = "msc"; break;
}
openItem(type);
m_output.addFieldQuotedString("content", s->text());
diff --git a/src/pre.l b/src/pre.l
index 7d438f8..ab11fb6 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -54,6 +54,10 @@
#include "memberdef.h"
#include "membername.h"
+// Toggle for some debugging info
+//#define DBG_CTX(x) fprintf x
+#define DBG_CTX(x) do { } while(0)
+
#define YY_NEVER_INTERACTIVE 1
enum GuardType
{
@@ -317,6 +321,8 @@ void DefineManager::DefinesPerFile::collectDefines(
*/
static int g_yyLineNr = 1;
+static int g_yyMLines = 1;
+static int g_yyColNr = 1;
static QCString g_yyFileName;
static FileDef *g_yyFileDef;
static FileDef *g_inputFileDef;
@@ -1398,7 +1404,8 @@ Define *newDefine()
def->nargs = g_defArgs;
def->fileName = g_yyFileName;
def->fileDef = g_yyFileDef;
- def->lineNr = g_yyLineNr;
+ def->lineNr = g_yyLineNr-g_yyMLines;
+ def->columnNr = g_yyColNr;
def->varArgs = g_defVarArgs;
//printf("newDefine: %s %s file: %s\n",def->name.data(),def->definition.data(),
// def->fileDef ? def->fileDef->name().data() : def->fileName.data());
@@ -1420,7 +1427,7 @@ void addDefine()
//ArgumentList *al = new ArgumentList;
//stringToArgumentList(g_defArgsStr,al);
MemberDef *md=new MemberDef(
- g_yyFileName,g_yyLineNr,
+ g_yyFileName,g_yyLineNr-g_yyMLines,g_yyColNr,
"#define",g_defName,g_defArgsStr,0,
Public,Normal,FALSE,Member,MemberType_Define,0,0);
if (!g_defArgsStr.isEmpty())
@@ -1598,7 +1605,7 @@ static void readIncludeFile(const QCString &inc)
lineStr.sprintf("# 1 \"%s\" 1\n",g_yyFileName.data());
outputArray(lineStr.data(),lineStr.length());
- //fprintf(stderr,"Switching to include file %s\n",incFileName.data());
+ DBG_CTX((stderr,"Switching to include file %s\n",incFileName.data()));
g_expectGuard=TRUE;
g_inputBuf = &fs->fileBuf;
g_inputBufPos=0;
@@ -1797,7 +1804,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<*>"??"[=/'()!<>-] { // Trigraph
unput(resolveTrigraph(yytext[2]));
}
-<Start>^{B}*"#" { BEGIN(Command); }
+<Start>^{B}*"#" { BEGIN(Command); g_yyColNr+=yyleng; g_yyMLines=0;}
<Start>^{B}*/[^#] {
outputArray(yytext,(int)yyleng);
BEGIN(CopyLine);
@@ -1947,6 +1954,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar('\n');
BEGIN(Start);
g_yyLineNr++;
+ g_yyColNr=1;
}
<FindDefineArgs>"(" {
g_defArgsStr+='(';
@@ -2041,6 +2049,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<Command>("cmake")?"define"{B}+ {
//printf("!!!DefName\n");
+ g_yyColNr+=yyleng;
BEGIN(DefName);
}
<Command>"ifdef"/{B}*"(" {
@@ -2124,7 +2133,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_yyLineNr++;
}
<IgnoreLine>.
-<Command>.
+<Command>. {g_yyColNr+=yyleng;}
<UndefName>{ID} {
Define *def;
if ((def=DefineManager::instance().isDefined(yytext))
@@ -2473,11 +2482,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") {
outputArray(yytext,(int)yyleng);
}
-<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
+<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
outputArray(yytext,(int)yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
}
-<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
+<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
outputArray(yytext,(int)yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
if (yytext[1]=='f')
@@ -2515,7 +2524,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputArray(yytext,(int)yyleng);
endCondSection();
}
-<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */
+<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */
outputArray(yytext,(int)yyleng);
if (yytext[1]=='f' && g_blockName=="f")
{
@@ -2637,7 +2646,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<DefineText>\\[\r]?\n {
g_defLitText+=yytext;
outputChar('\n');
- g_defText += ' '; g_yyLineNr++;
+ g_defText += ' ';
+ g_yyLineNr++;
+ g_yyMLines++;
}
<DefineText>\n {
QCString comment=extractTrailingComment(g_defLitText);
@@ -2679,7 +2690,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
def->definition = g_defText.stripWhiteSpace();
def->nargs = g_defArgs;
def->fileName = g_yyFileName.copy();
- def->lineNr = g_yyLineNr;
+ def->lineNr = g_yyLineNr-g_yyMLines;
+ def->columnNr = g_yyColNr;
}
else
{
@@ -2688,6 +2700,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
delete g_argDict; g_argDict=0;
g_yyLineNr++;
+ g_yyColNr=1;
g_lastGuardName.resize(0);
BEGIN(Start);
}
@@ -2726,11 +2739,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipSingleQuote>. { g_defText += *yytext; g_defLitText+=yytext; }
<DefineText>. { g_defText += *yytext; g_defLitText+=yytext; }
<<EOF>> {
- //fprintf(stderr,"End of include file\n");
+ DBG_CTX((stderr,"End of include file\n"));
//printf("Include stack depth=%d\n",g_includeStack.count());
if (g_includeStack.isEmpty())
{
- //fprintf(stderr,"Terminating scanner!\n");
+ DBG_CTX((stderr,"Terminating scanner!\n"));
yyterminate();
}
else
@@ -2745,7 +2758,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_inputBuf = fs->oldFileBuf;
g_inputBufPos = fs->oldFileBufPos;
setFileName(fs->fileName);
- //fprintf(stderr,"######## FileName %s\n",g_yyFileName.data());
+ DBG_CTX((stderr,"######## FileName %s\n",g_yyFileName.data()));
// Deal with file changes due to
// #include's within { .. } blocks
@@ -2765,10 +2778,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipCComment);
}
<*>"//"[/]? {
- outputArray(yytext,(int)yyleng);
- g_lastCPPContext=YY_START;
- if (yyleng==3) g_lastGuardName.resize(0); // reset guard in case the #define is documented!
- BEGIN(SkipCPPComment);
+ if (YY_START==SkipVerbatim)
+ {
+ REJECT;
+ }
+ else
+ {
+ outputArray(yytext,(int)yyleng);
+ g_lastCPPContext=YY_START;
+ if (yyleng==3) g_lastGuardName.resize(0); // reset guard in case the #define is documented!
+ BEGIN(SkipCPPComment);
+ }
}
<*>\n {
outputChar('\n');
@@ -3013,6 +3033,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
}
g_yyLineNr = 1;
+ g_yyColNr = 1;
g_level = 0;
g_ifcount = 0;
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index cb3daaa..eba7bd9 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -221,6 +221,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::ManOnly: printf("<manonly>"); break;
case DocVerbatim::LatexOnly: printf("<latexonly>"); break;
case DocVerbatim::XmlOnly: printf("<xmlonly>"); break;
+ case DocVerbatim::DocbookOnly: printf("<docbookonly>"); break;
case DocVerbatim::Dot: printf("<dot>"); break;
case DocVerbatim::Msc: printf("<msc>"); break;
}
@@ -234,6 +235,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::ManOnly: printf("</manonly>"); break;
case DocVerbatim::LatexOnly: printf("</latexonly>"); break;
case DocVerbatim::XmlOnly: printf("</xmlonly>"); break;
+ case DocVerbatim::DocbookOnly: printf("</docbookonly>"); break;
case DocVerbatim::Dot: printf("</dot>"); break;
case DocVerbatim::Msc: printf("</msc>"); break;
}
diff --git a/src/pycode.l b/src/pycode.l
index ef4bb2a..0413f31 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -43,6 +43,10 @@
#include "filedef.h"
#include "namespacedef.h"
+// Toggle for some debugging info
+//#define DBG_CTX(x) fprintf x
+#define DBG_CTX(x) do { } while(0)
+
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_INPUT 1
@@ -479,6 +483,15 @@ static void codifyLines(char *text)
}
}
+static const char* fileLocation()
+{
+ const int maxLen=4096;
+ static char floc[maxLen+1];
+ floc[maxLen]='\0';
+ snprintf(floc,maxLen,"%s:%d:%d",g_sourceFileDef?g_sourceFileDef->absFilePath().data():"[unknown]",g_yyLineNr,1);
+ return floc;
+}
+
static void addDocCrossReference(MemberDef *src,MemberDef *dst)
{
static bool referencedByRelation = Config_getBool("REFERENCED_BY_RELATION");
@@ -489,11 +502,11 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
//printf("addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());
if ((referencedByRelation || callerGraph) && (src->isFunction() || src->isSlot()))
{
- dst->addSourceReferencedBy(src);
+ dst->addSourceReferencedBy(src,fileLocation());
}
if ((referencesRelation || callGraph) && (src->isFunction() || src->isSlot()))
{
- src->addSourceReferences(dst);
+ src->addSourceReferences(dst,fileLocation());
}
}
@@ -580,7 +593,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
// Don't do anything for empty text
if (className.isEmpty()) return;
- //fprintf(stderr,"generateClassOrGlobalLink(className=%s)\n",className.data());
+ DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",className.data()));
ClassDef *cd=0,*lcd=0; /** Class def that we may find */
MemberDef *md=0; /** Member def that we may find */
@@ -593,10 +606,10 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
cd = getResolvedClass(d,g_sourceFileDef,substitute(className,".","::"),&md);
- //fprintf(stderr,"d=%s g_sourceFileDef=%s\n",
- // d?d->displayName().data():"<null>",
- // g_currentDefinition?g_currentDefinition->displayName().data():"<null>");
- //fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>");
+ DBG_CTX((stderr,"d=%s g_sourceFileDef=%s\n",
+ d?d->displayName().data():"<null>",
+ g_currentDefinition?g_currentDefinition->displayName().data():"<null>"));
+ DBG_CTX((stderr,"is found as a type %s\n",cd?cd->name().data():"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
@@ -620,7 +633,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
g_theCallContext.setClass(lcd);
}
//isLocal=TRUE;
- //fprintf(stderr,"is a local variable cd=%p!\n",cd);
+ DBG_CTX((stderr,"is a local variable cd=%p!\n",cd));
}
if (cd && cd->isLinkable()) // is it a linkable class
@@ -646,7 +659,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
QCString scope = substitute(className.left(scopeEnd),".","::");
QCString locName = className.right(className.length()-scopeEnd-1);
ClassDef *mcd = getClass(scope);
- //fprintf(stderr,"scope=%s locName=%s mcd=%p\n",scope.data(),locName.data(),mcd);
+ DBG_CTX((stderr,"scope=%s locName=%s mcd=%p\n",scope.data(),locName.data(),mcd));
if (mcd)
{
MemberDef *md = mcd->getMemberByName(locName);
@@ -709,7 +722,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
ClassDef *ccd=0;
QCString locScope=g_classScope.copy();
QCString locFunc=removeRedundantWhiteSpace(funcName);
- //fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());
+ DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
int i=locFunc.findRev("::");
if (i>0)
{
@@ -759,7 +772,7 @@ static bool findMemberLink(CodeOutputInterface &ol,Definition *sym,const char *s
addDocCrossReference(g_currentMemberDef,(MemberDef*)sym);
}
}
- //fprintf(stderr,"cd=%s thisCd=%s\n",cd?cd->name().data():"<none>",thisCd?thisCd->name().data():"<none>");
+ DBG_CTX((stderr,"cd=%s thisCd=%s\n",cd?cd->name().data():"<none>",thisCd?thisCd->name().data():"<none>"));
// TODO: find the nearest base class in case cd is a base class of
// thisCd
@@ -1045,7 +1058,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
// Push a class scope
- ClassDef *classDefToAdd = new ClassDef("<code>",1,g_curClassName,ClassDef::Class,0,0,FALSE);
+ ClassDef *classDefToAdd = new ClassDef("<code>",1,1,g_curClassName,ClassDef::Class,0,0,FALSE);
g_codeClassSDict.append(g_curClassName,classDefToAdd);
char *s=g_curClassBases.first();
while (s)
diff --git a/src/pyscanner.l b/src/pyscanner.l
index a2dc878..ef11320 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -51,6 +51,10 @@
#include "pycode.h"
#include "arguments.h"
+// Toggle for some debugging info
+//#define DBG_CTX(x) fprintf x
+#define DBG_CTX(x) do { } while(0)
+
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_INPUT 1
@@ -226,7 +230,7 @@ static QCString findPackageScope(const char *fileName)
static void lineCount()
{
- //fprintf(stderr,"yyLineNr=%d\n",yyLineNr);
+ DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr));
for (const char *p = yytext; *p; ++p)
{
yyLineNr += (*p == '\n') ;
@@ -235,7 +239,7 @@ static void lineCount()
static void incLineNr()
{
- //fprintf(stderr,"yyLineNr=%d\n",yyLineNr);
+ DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr));
yyLineNr++;
}
@@ -537,7 +541,7 @@ STARTDOCSYMS "##"
<Search>{
^{B}"def"{BB} { // start of a function/method definition with indent
- //fprintf(stderr,"Found def at %d\n",yyLineNr);
+ DBG_CTX((stderr,"Found def at %d\n",yyLineNr));
g_indent=computeIndent(yytext);
searchFoundDef();
BEGIN( FunctionDec );
@@ -548,7 +552,7 @@ STARTDOCSYMS "##"
}
^{B}"class"{BB} { // start of a class definition with indent
- //fprintf(stderr,"Found class at %d\n",yyLineNr);
+ DBG_CTX((stderr,"Found class at %d\n",yyLineNr));
g_indent=computeIndent(yytext);
searchFoundClass();
BEGIN( ClassDec ) ;
@@ -731,7 +735,7 @@ STARTDOCSYMS "##"
<SearchMemVars>{
"self."{IDENTIFIER}/{B}"=" {
- //fprintf(stderr,"Found member variable %s in %s at %d\n",&yytext[5],current_root->name.data(),yyLineNr);
+ DBG_CTX((stderr,"Found member variable %s in %s at %d\n",&yytext[5],current_root->name.data(),yyLineNr));
current->name=&yytext[5];
current->section=Entry::VARIABLE_SEC;
current->fileName = yyFileName;
@@ -782,7 +786,7 @@ STARTDOCSYMS "##"
<FunctionBody>{
\n{B}/{IDENTIFIER}{BB} {
- //fprintf(stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),g_indent);
+ DBG_CTX((stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),g_indent));
if (computeIndent(&yytext[1])<=g_indent)
{
int i;
@@ -1002,7 +1006,7 @@ STARTDOCSYMS "##"
}
^{BB} { // something at indent >0
g_curIndent=computeIndent(yytext);
- //fprintf(stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent);
+ DBG_CTX((stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent));
if (g_curIndent<=g_indent)
// jumped out of the class/method
{
@@ -1133,7 +1137,7 @@ STARTDOCSYMS "##"
//current->startLine = yyLineNr;
g_curIndent=computeIndent(yytext);
bodyEntry = current;
- //fprintf(stderr,"setting indent %d\n",g_curIndent);
+ DBG_CTX((stderr,"setting indent %d\n",g_curIndent));
//printf("current->program=[%s]\n",current->program.data());
//g_hideClassDocs = TRUE;
BEGIN(ClassBody);
@@ -1352,11 +1356,11 @@ STARTDOCSYMS "##"
{ // strip g_curIndent amount of whitespace
int i;
for (i=0;i<indent-g_curIndent;i++) docBlock+=' ';
- //fprintf(stderr,"stripping indent %d\n",g_curIndent);
+ DBG_CTX((stderr,"stripping indent %d\n",g_curIndent));
}
else
{
- //fprintf(stderr,"not stripping: %d<%d\n",indent,g_curIndent);
+ DBG_CTX((stderr,"not stripping: %d<%d\n",indent,g_curIndent));
docBlock += yytext;
}
}
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 8d9cfc2..8eb3e98 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -446,7 +446,8 @@ void RTFDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::HtmlOnly:
case DocVerbatim::LatexOnly:
case DocVerbatim::XmlOnly:
- case DocVerbatim::ManOnly:
+ case DocVerbatim::ManOnly:
+ case DocVerbatim::DocbookOnly:
/* nothing */
break;
case DocVerbatim::Dot:
diff --git a/src/scanner.l b/src/scanner.l
index 3ed0e70..15e5f86 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -43,6 +43,10 @@
#include "code.h"
#include "arguments.h"
+// Toggle for some debugging info
+#define DBG_CTX(x) fprintf x
+//#define DBG_CTX(x) do { } while(0)
+
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_INPUT 1
@@ -89,6 +93,9 @@ static Entry* tempEntry = 0 ;
static Entry* firstTypedefEntry = 0 ;
static Entry* memspecEntry = 0 ;
static int yyLineNr = 1 ;
+static int yyBegLineNr = yyLineNr ;
+static int yyColNr = 1 ;
+static int yyBegColNr = yyColNr ;
static int anonCount = 0 ;
static int anonNSCount = 0 ;
static QCString yyFileName;
@@ -288,11 +295,17 @@ static void lineCount()
for (p = yytext ; *p ; ++p )
{
if (*p=='\n')
- yyLineNr++,g_column=0;
+ {
+ yyLineNr++,g_column=0,yyColNr=1;
+ }
else if (*p=='\t')
+ {
g_column+=tabSize - (g_column%tabSize);
+ }
else
- g_column++;
+ {
+ g_column++,yyColNr++;
+ }
}
}
@@ -508,7 +521,7 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
oldStyleArgName=current->args.copy().stripWhiteSpace();
}
}
- //fprintf(stderr,"type=%s ptr=%s name=%s\n",oldStyleArgType.data(),oldStyleArgPtr.data(),oldStyleArgName.data());
+ DBG_CTX((stderr,"type=%s ptr=%s name=%s\n",oldStyleArgType.data(),oldStyleArgPtr.data(),oldStyleArgName.data()));
}
//-----------------------------------------------------------------------------
@@ -595,7 +608,7 @@ static int yyread(char *buf,int max_size)
/* start command character */
CMD ("\\"|"@")
-SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"callgraph"|"callergraph"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"{"|"verbatim"|"dotfile"|"dot"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"details"|"typedef"|"def"|"overload")|("<"{PRE}">")
+SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"callgraph"|"callergraph"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"manonly"|"{"|"verbatim"|"dotfile"|"dot"|"defgroup"|"addtogroup"|"weakgroup"|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"details"|"typedef"|"def"|"overload")|("<"{PRE}">")
BN [ \t\n\r]
BL [ \t\r]*"\n"
B [ \t]
@@ -1084,6 +1097,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
lineCount();
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
current->section = Entry::FUNCTION_SEC;
current->protection = protection = Public ;
@@ -1290,6 +1304,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type = "namespace" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount();
}
@@ -1363,6 +1378,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type = "namespace" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount();
if (insidePHP)
@@ -1383,6 +1399,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type = "module" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
BEGIN( CompoundName );
}
@@ -1406,6 +1423,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type = "library" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
BEGIN( CompoundName );
}
@@ -1426,6 +1444,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " interface" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
BEGIN( CompoundName );
}
@@ -1464,6 +1483,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " interface" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
BEGIN( CompoundName );
}
@@ -1479,6 +1499,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " protocol" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
BEGIN( CompoundName );
}
@@ -1490,6 +1511,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " exception" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount();
BEGIN( CompoundName );
@@ -1503,6 +1525,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " class" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
if (yytext[0]=='@')
{
@@ -1527,6 +1550,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " value class" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1541,6 +1565,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " ref class" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1555,6 +1580,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " interface class" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1569,6 +1595,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " coclass" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
BEGIN( CompoundName ) ;
@@ -1592,6 +1619,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " struct" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1606,6 +1634,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " value struct" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1620,6 +1649,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " ref struct" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1634,6 +1664,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " interface struct";
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1650,6 +1681,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->type += " union" ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1677,6 +1709,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->bodyLine = yyLineNr;
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
@@ -1822,6 +1855,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<FindMembers>"using"{BN}+ {
current->startLine=yyLineNr;
+ current->startColumn = yyColNr;
lineCount();
BEGIN(Using);
}
@@ -1843,6 +1877,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->name=yytext;
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->section=Entry::USINGDIR_SEC;
current_root->addSubEntry(current);
current = new Entry ;
@@ -2093,6 +2128,8 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN(FindMembers);
}
<FindMembers,FindMemberName>{SCOPENAME} {
+ yyBegColNr=yyColNr;
+ yyBegLineNr=yyLineNr;
lineCount();
if (insideIDL && yyleng==9 && qstrcmp(yytext,"cpp_quote")==0)
{
@@ -2378,6 +2415,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
lineCount();
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->type.resize(0);
current->args = current->args.simplifyWhiteSpace();
current->name = current->name.stripWhiteSpace();
@@ -2391,6 +2429,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
//printf("End define\n");
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->type.resize(0);
current->type = "const";
QCString init = current->initializer.data();
@@ -2619,6 +2658,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->args = current->args.simplifyWhiteSpace();
current->name = current->name.stripWhiteSpace();
current->section = Entry::VARIABLE_SEC;
@@ -3111,7 +3151,8 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName;
- current->startLine = yyLineNr;
+ current->startLine = yyBegLineNr;
+ current->startColumn = yyBegColNr;
current_root->addSubEntry( current ) ;
needNewCurrent=TRUE;
}
@@ -3213,6 +3254,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->name = yytext;
current->name = current->name.left(current->name.length()-1).stripWhiteSpace();
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
BEGIN( IDLProp );
}
<IDLProp>{BN}*"["[^\]]*"]"{BN}* { // attribute of a parameter
@@ -3318,6 +3360,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
current->type = "@"; // enum marker
current->args = current->args.simplifyWhiteSpace();
current->name = current->name.stripWhiteSpace();
@@ -3346,6 +3389,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
current->fileName = yyFileName;
current->startLine = yyLineNr;
+ current->startColumn = yyColNr;
if (!(current_root->spec&Entry::Enum))
{
current->type = "@"; // enum marker
@@ -3694,6 +3738,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
varEntry->fileName = yyFileName;
varEntry->startLine = yyLineNr;
+ varEntry->startColumn = yyColNr;
varEntry->doc = current->doc.copy();
varEntry->brief = current->brief.copy();
varEntry->mGrpId = current->mGrpId;
@@ -4134,7 +4179,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
fullArgString+=yytext;
BEGIN(CopyArgVerbatim);
}
-<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9] { // end of verbatim block
+<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9] { // end of verbatim block
fullArgString+=yytext;
if (yytext[1]=='f') // end of formula
{
@@ -4460,7 +4505,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
else if (checkForKnRstyleC())
{
- //fprintf(stderr,"===> got a K&R style function\n");
+ DBG_CTX((stderr,"===> got a K&R style function\n"));
current->args = yytext;
oldStyleArgType.resize(0);
BEGIN(OldStyleArgs);
@@ -4565,7 +4610,8 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->args=removeRedundantWhiteSpace(current->args);
// was: current->args.simplifyWhiteSpace();
current->fileName = yyFileName;
- current->startLine = yyLineNr;
+ current->startLine = yyBegLineNr;
+ current->startColumn = yyBegColNr;
static QRegExp re("([^)]*[*&][^)]*)"); // (...*...)
if (*yytext!=';' || (current_root->section&Entry::COMPOUND_MASK) )
{
@@ -5272,6 +5318,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->program+=yytext;
current->fileName = yyFileName ;
current->startLine = yyLineNr ;
+ current->startColumn = yyColNr;
curlyCount=0;
BEGIN( ReadBodyIntf );
}
@@ -5290,6 +5337,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
current->program+=yytext;
current->fileName = yyFileName ;
current->startLine = yyLineNr ;
+ current->startColumn = yyColNr;
curlyCount=0;
BEGIN( ReadBodyIntf );
}
@@ -5297,6 +5345,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<CompoundName,ClassVar>{B}*"{"{B}* {
current->fileName = yyFileName ;
current->startLine = yyLineNr ;
+ current->startColumn = yyColNr;
current->name = removeRedundantWhiteSpace(current->name);
if (current->name.isEmpty() && !isTypedef) // anonymous compound
{
@@ -5552,6 +5601,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<Bases>{B}*"{"{B}* { current->fileName = yyFileName ;
current->startLine = yyLineNr ;
+ current->startColumn = yyColNr;
current->name = removeRedundantWhiteSpace(current->name);
if (!baseName.isEmpty())
current->extends->append(
@@ -5619,7 +5669,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
docBlockAutoBrief = Config_getBool("QT_AUTOBRIEF");
- docBlock.resize(0);
+
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,g_column));
+ docBlock=indent;
+
if (docBlockAutoBrief)
{
current->briefLine = yyLineNr;
@@ -5666,7 +5720,11 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
docBlockAutoBrief = FALSE;
- docBlock.resize(0);
+
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,g_column));
+ docBlock=indent;
+
startCommentBlock(current->brief.isEmpty());
BEGIN( DocLine );
}
@@ -5680,7 +5738,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
docBlockAutoBrief = FALSE;
- docBlock.resize(0);
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,g_column));
+ docBlock=indent;
startCommentBlock(current->brief.isEmpty());
BEGIN( DocLine );
}
@@ -5874,7 +5934,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
docBlock+=yytext;
BEGIN(DocBlock);
}
-<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endmanonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
+<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
docBlock+=yytext;
if (&yytext[4]==docBlockName)
{
@@ -6207,6 +6267,7 @@ static void parseCompounds(Entry *rt)
yyFileName = ce->fileName;
//setContext();
yyLineNr = ce->startLine ;
+ yyColNr = ce->startColumn ;
insideObjC = ce->lang==SrcLangExt_ObjC;
//printf("---> Inner block starts at line %d objC=%d\n",yyLineNr,insideObjC);
//current->reset();
diff --git a/src/settings.h b/src/settings.h
new file mode 100644
index 0000000..bd73352
--- /dev/null
+++ b/src/settings.h
@@ -0,0 +1,4 @@
+#ifndef SETTINGS_H
+#define SETTINGS_H
+#define USE_SQLITE3 0
+#endif
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
new file mode 100644
index 0000000..c50ea75
--- /dev/null
+++ b/src/sqlite3gen.cpp
@@ -0,0 +1,1361 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2012 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 <stdlib.h>
+#include <stdio.h>
+#include "settings.h"
+#include "message.h"
+
+#if USE_SQLITE3
+
+#include "qtbc.h"
+#include "sqlite3gen.h"
+#include "doxygen.h"
+#include "config.h"
+#include "util.h"
+#include "docparser.h"
+#include "language.h"
+
+#include "arguments.h"
+#include "classlist.h"
+#include "filedef.h"
+#include "namespacedef.h"
+#include "filename.h"
+
+#include <qdir.h>
+#include <string.h>
+#include <sqlite3.h>
+
+//#define DBG_CTX(x) printf x
+#define DBG_CTX(x) do { } while(0)
+
+//////////////////////////////////////////////////////
+const char *i_q_includes="INSERT OR REPLACE INTO includes "
+ "( refid, local, name ) "
+ "VALUES "
+ "(:refid,:local,:name )" ;
+const char *c_q_includes="SELECT count(*) from includes where refid=:refid and local=:local and name=:name";
+static sqlite3_stmt *i_s_includes=0;
+static sqlite3_stmt *c_s_includes=0;
+//////////////////////////////////////////////////////
+const char *i_q_innerclass="INSERT OR REPLACE INTO innerclass "
+ "( refid, prot, name )"
+ "VALUES "
+ "(:refid,:prot,:name )";
+static sqlite3_stmt *i_s_innerclass=0;
+//////////////////////////////////////////////////////
+const char *i_q_files="INSERT OR REPLACE INTO files "
+ "( name )"
+ "VALUES "
+ "(:name )";
+const char *id_q_files="SELECT id from files where name=:name";
+static sqlite3_stmt *id_s_files=0;
+static sqlite3_stmt *i_s_files=0;
+//////////////////////////////////////////////////////
+const char *i_q_xrefs="INSERT OR REPLACE INTO xrefs "
+ "( src, dst, id_file, line, column )"
+ "VALUES "
+ "(:src,:dst,:id_file,:line,:column )";
+static sqlite3_stmt *i_s_xrefs=0;
+//////////////////////////////////////////////////////
+const char *i_q_memberdef="INSERT OR REPLACE INTO memberdef "
+ "( refid, prot, static, const, explicit, inline, final, sealed, new, optional, required, virt, mutable, initonly, readable, writable, gettable, settable, accessor, addable, removable, raisable, name, type, definition, argsstring, scope, kind, id_bfile, bline, bcolumn, id_file, line, column)"
+ "VALUES "
+ "(:refid,:prot,:static,:const,:explicit,:inline,:final,:sealed,:new,:optional,:required,:virt,:mutable,:initonly,:readable,:writable,:gettable,:settable,:accessor,:addable,:removable,:raisable,:name,:type,:definition,:argsstring,:scope,:kind,:id_bfile,:bline,:bcolumn,:id_file,:line,:column)";
+const char *id_q_memberdef="SELECT id from memberdef where refid=:refid and id is not null";
+static sqlite3_stmt *id_s_memberdef=0;
+static sqlite3_stmt *i_s_memberdef=0;
+//////////////////////////////////////////////////////
+const char *i_q_compounddef="INSERT OR REPLACE INTO compounddef "
+ "( name, kind, prot, refid, id_file, line, column ) "
+ "VALUES "
+ "(:name,:kind,:prot,:refid,:id_file,:line,:column )";
+static sqlite3_stmt *i_s_compounddef=0;
+//////////////////////////////////////////////////////
+const char *i_q_basecompoundref="INSERT OR REPLACE INTO basecompoundref "
+ "( base, derived, refid, prot, virt ) "
+ "VALUES "
+ "(:base,:derived,:refid,:prot,:virt )" ;
+static sqlite3_stmt *i_s_basecompoundref=0;
+//////////////////////////////////////////////////////
+const char *i_q_derivedcompoundref="INSERT OR REPLACE INTO derivedcompoundref "
+ "( refid, prot, virt, base, derived ) "
+ "VALUES "
+ "(:refid,:prot,:virt,:base,:derived )" ;
+static sqlite3_stmt *i_s_derivedcompoundref=0;
+//////////////////////////////////////////////////////
+
+const char * schema_queries[][2] =
+{
+ {
+ "compounddef",
+ "CREATE TABLE IF NOT EXISTS compounddef ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,"
+ "name TEXT NOT NULL,"
+ "kind TEXT NOT NULL,"
+ "prot INTEGER NOT NULL,"
+ "refid TEXT NOT NULL,"
+ "id_file INTEGER NOT NULL,"
+ "line INTEGER NOT NULL,"
+ "column INTEGER NOT NULL)"
+ },
+ {
+ "basecompoundref",
+ "CREATE TABLE IF NOT EXISTS basecompoundref ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
+ "base TEXT NOT NULL,"
+ "derived TEXT NOT NULL,"
+ "refid TEXT NOT NULL,"
+ "prot INTEGER NOT NULL,"
+ "virt INTEGER NOT NULL)"
+ },
+ {
+ "derivedcompoundref",
+ "CREATE TABLE IF NOT EXISTS derivedcompoundref ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
+ "base TEXT NOT NULL,"
+ "derived TEXT NOT NULL,"
+ "refid TEXT NOT NULL,"
+ "prot INTEGER NOT NULL,"
+ "virt INTEGER NOT NULL)"
+ },
+ {
+ "includes",
+ "CREATE TABLE IF NOT EXISTS includes ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
+ "refid TEXT NOT NULL,"
+ "local INTEGER NOT NULL,"
+ "name TEXT NOT NULL)"
+ },
+ {
+ "innerclass",
+ "CREATE TABLE IF NOT EXISTS innerclass ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
+ "refid TEXT NOT NULL,"
+ "prot INTEGER NOT NULL,"
+ "name TEXT NOT NULL)"
+ },
+ {
+ "files",
+ "CREATE TABLE IF NOT EXISTS files ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
+ "name TEXT NOT NULL)"
+ },
+ {
+ "xrefs",
+ "CREATE TABLE IF NOT EXISTS xrefs ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
+ "src TEXT NOT NULL, "
+ "dst TEXT NOT NULL, "
+ "id_file INTEGER NOT NULL, "
+ "line INTEGER, "
+ "column INTEGER)"
+ },
+ {
+ "memberdef",
+ "CREATE TABLE IF NOT EXISTS memberdef ("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
+ "name TEXT NOT NULL,"
+ "definition TEXT,"
+ "type TEXT,"
+ "argsstring TEXT,"
+ "scope TEXT,"
+ "prot INTEGER NOT NULL,"
+ "static INTEGER NOT NULL,"
+ "const INTEGER,"
+ "explicit INTEGER,"
+ "inline INTEGER,"
+ "final INTEGER,"
+ "sealed INTEGER,"
+ "new INTEGER,"
+ "optional INTEGER,"
+ "required INTEGER,"
+ "virt INTEGER,"
+ "mutable INTEGER,"
+ "initonly INTEGER,"
+ "readable INTEGER,"
+ "writable INTEGER,"
+ "gettable INTEGER,"
+ "settable INTEGER,"
+ "accessor INTEGER,"
+ "addable INTEGER,"
+ "removable INTEGER,"
+ "raisable INTEGER,"
+ "kind INTEGER,"
+ "refid TEXT NOT NULL,"
+ "id_bfile INTEGER,"
+ "bline INTEGER,"
+ "bcolumn INTEGER,"
+ "id_file INTEGER NOT NULL,"
+ "line INTEGER NOT NULL,"
+ "column INTEGER NOT NULL)"
+ },
+};
+
+
+class TextGeneratorSqlite3Impl : public TextGeneratorIntf
+{
+ public:
+ TextGeneratorSqlite3Impl(StringList &l) : l(l) {
+ l.setAutoDelete(TRUE);
+ }
+ void writeString(const char * /*s*/,bool /*keepSpaces*/) const
+ {
+ }
+ void writeBreak(int) const
+ {
+ DBG_CTX(("writeBreak\n"));
+ }
+ void writeLink(const char * /*extRef*/,const char *file,
+ const char *anchor,const char * /*text*/
+ ) const
+ {
+ QCString *rs=new QCString(file);
+ if (anchor)
+ {
+ rs->append("_1").append(anchor);
+ }
+ l.append(rs);
+ }
+ private:
+ StringList &l;
+ // the list is filled by linkifyText and consumed by the caller
+};
+
+static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def);
+
+
+static void bindTextParameter(sqlite3_stmt *stmt,const char *name,const char *value)
+{
+ int idx = sqlite3_bind_parameter_index(stmt, name);
+ sqlite3_bind_text(id_s_files, idx, value, -1, SQLITE_STATIC);
+}
+
+static void bindIntParameter(sqlite3_stmt *stmt,const char *name,int value)
+{
+ int idx = sqlite3_bind_parameter_index(stmt, name);
+ sqlite3_bind_int(stmt, idx, value);
+}
+
+static int step(sqlite3 *db, sqlite3_stmt *stmt,bool getRowId=FALSE)
+{
+ int id=-1;
+ int rc = sqlite3_step(stmt);
+ if (rc!=SQLITE_DONE && rc!=SQLITE_ROW)
+ {
+ msg("failed count files: %s\n", sqlite3_errmsg(db));
+ }
+ if (getRowId) id = sqlite3_column_int(stmt, 0);
+ sqlite3_reset(stmt);
+ return id;
+}
+
+#if 0
+static QCString memberOutputFileBase(MemberDef *md)
+{
+ //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //if (inlineGroupedClasses && md->getClassDef() && md->getClassDef()->partOfGroups()!=0)
+ // return md->getClassDef()->getXmlOutputFileBase();
+ //else
+ // return md->getOutputFileBase();
+ return md->getOutputFileBase();
+}
+#endif
+
+static int insertFile(sqlite3 *db, const char* name)
+{
+ int id=-1;
+ if (name==0) return -1;
+ // see if it's already in DB
+
+ bindTextParameter(id_s_files,":name",name);
+ id=step(db,i_s_files,TRUE);
+ if (id==0)
+ {
+ // insert it
+ bindTextParameter(i_s_files,":name",name);
+
+ step(db,i_s_files);
+ id=sqlite3_last_insert_rowid(db);
+ }
+ return id;
+}
+
+static void insertMemberReference(sqlite3 *db, const char*src, const char*dst, const char *file, int line, int column)
+{
+#if 0
+ QCString scope = dst->getScopeString();
+ QCString src_name = src->name();
+ QCString dst_name = dst->name();
+ if (!dst->getScopeString().isEmpty() && dst->getScopeString()!=def->name())
+ {
+ dst_name.prepend(scope+getLanguageSpecificSeparator(dst->getLanguage()));
+ }
+ if (!src->getScopeString().isEmpty() && src->getScopeString()!=def->name())
+ {
+ src_name.prepend(scope+getLanguageSpecificSeparator(src->getLanguage()));
+ }
+#endif
+ //
+ bindTextParameter(i_s_xrefs,":src",src);
+ bindTextParameter(i_s_xrefs,":dst",dst);
+
+ int id_file = insertFile(db,file);
+
+ bindIntParameter(i_s_xrefs,":id_file",id_file);
+ bindIntParameter(i_s_xrefs,":line",line);
+ bindIntParameter(i_s_xrefs,":column",column);
+
+ step(db,i_s_xrefs);
+}
+
+static void insertMemberReference(sqlite3 *db, MemberDef *src, MemberDef *dst, const char*floc)
+{
+ if (dst->getStartBodyLine()!=-1 && dst->getBodyDef())
+ {
+ char file[4096] = { 0 };
+ int line=0,column=0;
+ if (floc)
+ {
+ sscanf(floc,"%[^:]:%d:%d",file,&line,&column);
+ }
+ insertMemberReference(db,src->anchor().data(),dst->anchor().data(),file,line,column);
+ }
+}
+
+static void stripQualifiers(QCString &typeStr)
+{
+ bool done=FALSE;
+ while (!done)
+ {
+ if (typeStr.stripPrefix("static "));
+ else if (typeStr.stripPrefix("virtual "));
+ else if (typeStr.stripPrefix("volatile "));
+ else if (typeStr=="virtual") typeStr="";
+ else done=TRUE;
+ }
+}
+
+////////////////////////////////////////////
+static void writeInnerClasses(sqlite3*db,const ClassSDict *cl)
+{
+ if (!cl) return;
+
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ if (!cd->isHidden() && cd->name().find('@')==-1) // skip anonymous scopes
+ {
+ bindTextParameter(i_s_innerclass,":refid",cd->getOutputFileBase());
+ bindIntParameter(i_s_innerclass,":prot",cd->protection());
+ bindTextParameter(i_s_innerclass,":name",cd->name());
+ step(db,i_s_innerclass);
+ }
+ }
+}
+
+static void writeInnerNamespaces(sqlite3 * /*db*/,const NamespaceSDict *nl)
+{
+ if (nl)
+ {
+ NamespaceSDict::Iterator nli(*nl);
+ NamespaceDef *nd;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ if (!nd->isHidden() && nd->name().find('@')==-1) // skip anonymouse scopes
+ {
+// t << " <innernamespace refid=\"" << nd->getOutputFileBase()
+// << "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;
+ }
+ }
+ }
+}
+
+static void writeTemplateArgumentList(sqlite3* /*db*/,
+ ArgumentList * /*al*/,
+ Definition * /*scope*/,
+ FileDef * /*fileScope*/,
+ int /*indent*/)
+{
+#if 0
+ QCString indentStr;
+ indentStr.fill(' ',indent);
+ if (al)
+ {
+ t << indentStr << "<templateparamlist>" << endl;
+ ArgumentListIterator ali(*al);
+ Argument *a;
+ for (ali.toFirst();(a=ali.current());++ali)
+ {
+ t << indentStr << " <param>" << endl;
+ if (!a->type.isEmpty())
+ {
+ t << indentStr << " <type>";
+ linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->type);
+ t << "</type>" << endl;
+ }
+ if (!a->name.isEmpty())
+ {
+ t << indentStr << " <declname>" << a->name << "</declname>" << endl;
+ t << indentStr << " <defname>" << a->name << "</defname>" << endl;
+ }
+ if (!a->defval.isEmpty())
+ {
+ t << indentStr << " <defval>";
+ linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a->defval);
+ t << "</defval>" << endl;
+ }
+ t << indentStr << " </param>" << endl;
+ }
+ t << indentStr << "</templateparamlist>" << endl;
+ }
+#endif
+}
+
+static void writeTemplateList(sqlite3*db,ClassDef *cd)
+{
+ writeTemplateArgumentList(db,cd->templateArguments(),cd,0,4);
+}
+
+static void generateSqlite3Section(sqlite3*db,
+ Definition *d,
+ MemberList *ml,const char * /*kind*/,const char * /*header*/=0,
+ const char * /*documentation*/=0)
+{
+ if (ml==0) return;
+ MemberListIterator mli(*ml);
+ MemberDef *md;
+ int count=0;
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ // namespace members are also inserted in the file scope, but
+ // to prevent this duplication in the XML output, we filter those here.
+ if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ {
+ count++;
+ }
+ }
+ if (count==0) return; // empty list
+#if 0
+
+ t << " <sectiondef kind=\"" << kind << "\">" << endl;
+ if (header)
+ {
+ t << " <header>" << convertToXML(header) << "</header>" << endl;
+ }
+ if (documentation)
+ {
+ t << " <description>";
+ writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
+ t << "</description>" << endl;
+ }
+#endif
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ // namespace members are also inserted in the file scope, but
+ // to prevent this duplication in the XML output, we filter those here.
+ //if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ {
+ generateSqlite3ForMember(db,md,d);
+ }
+ }
+ //t << " </sectiondef>" << endl;
+}
+
+static int prepareStatements(sqlite3 *db)
+{
+ int rc;
+ rc = sqlite3_prepare_v2(db,id_q_memberdef,-1,&id_s_memberdef,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n", id_q_memberdef, sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db,id_q_files,-1,&id_s_files,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n", id_q_files, sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db,i_q_files,-1,&i_s_files,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n",i_q_files,sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db,i_q_xrefs,-1,&i_s_xrefs,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n", i_q_xrefs, sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db, i_q_innerclass, -1, &i_s_innerclass, 0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n", i_q_innerclass, sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db,i_q_memberdef,-1,&i_s_memberdef,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n",i_q_memberdef,sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db,i_q_compounddef,-1,&i_s_compounddef,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n",i_q_compounddef,sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db,i_q_basecompoundref,-1,&i_s_basecompoundref,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n",i_q_basecompoundref,sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db,i_q_derivedcompoundref,-1,&i_s_derivedcompoundref,0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n",i_q_derivedcompoundref,sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db, i_q_includes, -1, &i_s_includes, 0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n", i_q_includes, sqlite3_errmsg(db));
+ return -1;
+ }
+ rc = sqlite3_prepare_v2(db, c_q_includes, -1, &c_s_includes, 0);
+ if (rc!=SQLITE_OK)
+ {
+ msg("prepare failed for %s\n%s\n", c_q_includes, sqlite3_errmsg(db));
+ return -1;
+ }
+ return 0;
+}
+
+static void beginTransaction(sqlite3 *db)
+{
+ char * sErrMsg = 0;
+ sqlite3_exec(db, "BEGIN TRANSACTION", NULL, NULL, &sErrMsg);
+}
+
+static void endTransaction(sqlite3 *db)
+{
+ char * sErrMsg = 0;
+ sqlite3_exec(db, "END TRANSACTION", NULL, NULL, &sErrMsg);
+}
+
+static void pragmaTuning(sqlite3 *db)
+{
+ char * sErrMsg = 0;
+ sqlite3_exec(db, "PRAGMA synchronous = OFF", NULL, NULL, &sErrMsg);
+ sqlite3_exec(db, "PRAGMA journal_mode = MEMORY", NULL, NULL, &sErrMsg);
+}
+
+static void initializeSchema(sqlite3* db)
+{
+ int rc;
+ sqlite3_stmt *stmt = 0;
+
+ msg("Initializing DB schema...\n");
+ for (unsigned int k = 0; k < sizeof(schema_queries) / sizeof(schema_queries[0]); k++)
+ {
+ //const char *tname = schema_queries[k][0];
+ const char *q = schema_queries[k][1];
+ // create table
+ rc = sqlite3_prepare_v2(db, q, -1, &stmt, 0);
+ if (rc != SQLITE_OK)
+ {
+ msg("failed to prepare query: %s\n\t%s\n", q, sqlite3_errmsg(db));
+ exit(-1);
+ }
+ rc = sqlite3_step(stmt);
+ if (rc != SQLITE_DONE)
+ {
+ msg("failed to execute query: %s\n\t%s\n", q, sqlite3_errmsg(db));
+ exit(-1);
+ }
+ sqlite3_finalize(stmt);
+
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+static void generateSqlite3ForNamespace(sqlite3 *db, NamespaceDef *nd)
+{
+ // + contained class definitions
+ // + contained namespace definitions
+ // + member groups
+ // + normal members
+ // + brief desc
+ // + detailed desc
+ // + location
+ // - files containing (parts of) the namespace definition
+
+ if (nd->isReference() || nd->isHidden()) return; // skip external references
+#if 0
+ ti << " <compound refid=\"" << nd->getOutputFileBase()
+ << "\" kind=\"namespace\"" << "><name>"
+ << convertToXML(nd->name()) << "</name>" << endl;
+
+ QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString fileName=outputDirectory+"/"+nd->getOutputFileBase()+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+
+ writeXMLHeader(t);
+ t << " <compounddef id=\""
+ << nd->getOutputFileBase() << "\" kind=\"namespace\">" << endl;
+ t << " <compoundname>";
+ writeXMLString(t,nd->name());
+ t << "</compoundname>" << endl;
+#endif
+ writeInnerClasses(db,nd->getClassSDict());
+ writeInnerNamespaces(db,nd->getNamespaceSDict());
+
+ if (nd->getMemberGroupSDict())
+ {
+ MemberGroupSDict::Iterator mgli(*nd->getMemberGroupSDict());
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateSqlite3Section(db,nd,mg->members(),"user-defined",mg->header(),
+ mg->documentation());
+ }
+ }
+
+ QListIterator<MemberList> mli(nd->getMemberLists());
+ MemberList *ml;
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_declarationLists)!=0)
+ {
+ generateSqlite3Section(db,nd,ml,"user-defined");//g_xmlSectionMapper.find(ml->listType()));
+ }
+ }
+#if 0
+ generateXMLSection(nd,ti,t,&nd->decDefineMembers,"define");
+ generateXMLSection(nd,ti,t,&nd->decProtoMembers,"prototype");
+ generateXMLSection(nd,ti,t,&nd->decTypedefMembers,"typedef");
+ generateXMLSection(nd,ti,t,&nd->decEnumMembers,"enum");
+ generateXMLSection(nd,ti,t,&nd->decFuncMembers,"func");
+ generateXMLSection(nd,ti,t,&nd->decVarMembers,"var");
+
+ t << " <briefdescription>" << endl;
+ writeXMLDocBlock(t,nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription());
+ t << " </briefdescription>" << endl;
+ t << " <detaileddescription>" << endl;
+ writeXMLDocBlock(t,nd->docFile(),nd->docLine(),nd,0,nd->documentation());
+ t << " </detaileddescription>" << endl;
+ t << " <location file=\""
+ << nd->getDefFileName() << "\" line=\""
+ << nd->getDefLine() << "\"" << " column=\""
+ << nd->getDefColumn() << "\"/>" << endl ;
+ t << " </compounddef>" << endl;
+ t << "</doxygen>" << endl;
+
+ ti << " </compound>" << endl;
+#endif
+}
+
+
+static void generateSqlite3ForFile(sqlite3 *db, FileDef *fd)
+{
+ // + includes files
+ // + includedby files
+ // + include graph
+ // + included by graph
+ // + contained class definitions
+ // + contained namespace definitions
+ // + member groups
+ // + normal members
+ // + brief desc
+ // + detailed desc
+ // + source code
+ // + location
+ // - number of lines
+
+ if (fd->isReference()) return; // skip external references
+#if 0
+ ti << " <compound refid=\"" << fd->getOutputFileBase()
+ << "\" kind=\"file\"><name>" << convertToXML(fd->name())
+ << "</name>" << endl;
+
+ QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml";
+ QFile f(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
+
+ writeXMLHeader(t);
+ t << " <compounddef id=\""
+ << fd->getOutputFileBase() << "\" kind=\"file\">" << endl;
+ t << " <compoundname>";
+ writeXMLString(t,fd->name());
+ t << "</compoundname>" << endl;
+
+ IncludeInfo *inc;
+
+ if (fd->includeFileList())
+ {
+ QListIterator<IncludeInfo> ili1(*fd->includeFileList());
+ for (ili1.toFirst();(inc=ili1.current());++ili1)
+ {
+ t << " <includes";
+ if (inc->fileDef && !inc->fileDef->isReference()) // TODO: support external references
+ {
+ t << " refid=\"" << inc->fileDef->getOutputFileBase() << "\"";
+ }
+ t << " local=\"" << (inc->local ? "yes" : "no") << "\">";
+ t << inc->includeName;
+ t << "</includes>" << endl;
+ }
+ }
+
+ if (fd->includedByFileList())
+ {
+ QListIterator<IncludeInfo> ili2(*fd->includedByFileList());
+ for (ili2.toFirst();(inc=ili2.current());++ili2)
+ {
+ t << " <includedby";
+ if (inc->fileDef && !inc->fileDef->isReference()) // TODO: support external references
+ {
+ t << " refid=\"" << inc->fileDef->getOutputFileBase() << "\"";
+ }
+ t << " local=\"" << (inc->local ? "yes" : "no") << "\">";
+ t << inc->includeName;
+ t << "</includedby>" << endl;
+ }
+ }
+
+ DotInclDepGraph incDepGraph(fd,FALSE);
+ if (!incDepGraph.isTrivial())
+ {
+ t << " <incdepgraph>" << endl;
+ incDepGraph.writeXML(t);
+ t << " </incdepgraph>" << endl;
+ }
+
+ DotInclDepGraph invIncDepGraph(fd,TRUE);
+ if (!invIncDepGraph.isTrivial())
+ {
+ t << " <invincdepgraph>" << endl;
+ invIncDepGraph.writeXML(t);
+ t << " </invincdepgraph>" << endl;
+ }
+#endif
+ if (fd->getClassSDict())
+ {
+ writeInnerClasses(db,fd->getClassSDict());
+ }
+ if (fd->getNamespaceSDict())
+ {
+ writeInnerNamespaces(db,fd->getNamespaceSDict());
+ }
+
+ if (fd->getMemberGroupSDict())
+ {
+ MemberGroupSDict::Iterator mgli(*fd->getMemberGroupSDict());
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateSqlite3Section(db,fd,mg->members(),"user-defined",mg->header(),
+ mg->documentation());
+ }
+ }
+
+ QListIterator<MemberList> mli(fd->getMemberLists());
+ MemberList *ml;
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_declarationLists)!=0)
+ {
+ generateSqlite3Section(db,fd,ml,"user-defined");//g_xmlSectionMapper.find(ml->listType()));
+ }
+ }
+#if 0
+ generateXMLSection(fd,ti,t,fd->decDefineMembers,"define");
+ generateXMLSection(fd,ti,t,fd->decProtoMembers,"prototype");
+ generateXMLSection(fd,ti,t,fd->decTypedefMembers,"typedef");
+ generateXMLSection(fd,ti,t,fd->decEnumMembers,"enum");
+ generateXMLSection(fd,ti,t,fd->decFuncMembers,"func");
+ generateXMLSection(fd,ti,t,fd->decVarMembers,"var");
+#endif
+#if 0
+ t << " <briefdescription>" << endl;
+ writeXMLDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription());
+ t << " </briefdescription>" << endl;
+ t << " <detaileddescription>" << endl;
+ writeXMLDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation());
+ t << " </detaileddescription>" << endl;
+ if (Config_getBool("XML_PROGRAMLISTING"))
+ {
+ t << " <programlisting>" << endl;
+ writeXMLCodeBlock(t,fd);
+ t << " </programlisting>" << endl;
+ }
+ t << " <location file=\"" << fd->getDefFileName() << "\"/>" << endl;
+ t << " </compounddef>" << endl;
+ t << "</doxygen>" << endl;
+
+ ti << " </compound>" << endl;
+#endif
+}
+
+
+
+
+static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
+{
+ // + declaration/definition arg lists
+ // + reimplements
+ // + reimplementedBy
+ // + exceptions
+ // + const/volatile specifiers
+ // - examples
+ // + source definition
+ // + source references
+ // + source referenced by
+ // - body code
+ // + template arguments
+ // (templateArguments(), definitionTemplateParameterLists())
+ // - call graph
+
+ // enum values are written as part of the enum
+ if (md->memberType()==MemberType_EnumValue) return;
+ if (md->isHidden()) return;
+ //if (md->name().at(0)=='@') return; // anonymous member
+
+ // group members are only visible in their group
+ //if (def->definitionType()!=Definition::TypeGroup && md->getGroupDef()) return;
+ QCString memType;
+#if 0
+ // member
+ idx = sqlite3_bind_parameter_index(stmt, ":refid");
+ sqlite3_bind_text(stmt, idx, memberOutputFileBase(md).data(),-1,SQLITE_TRANSIENT);
+
+ idx = sqlite3_bind_parameter_index(stmt,":kind");
+ sqlite3_bind_int(stmt, idx, md->memberType());
+
+ idx = sqlite3_bind_parameter_index(stmt, ":name");
+ sqlite3_bind_text(stmt, idx, md->name().data(),-1,SQLITE_TRANSIENT);
+#endif
+ // memberdef
+ bindTextParameter(i_s_memberdef,":refid",md->anchor());
+ bindIntParameter(i_s_memberdef,":kind",md->memberType());
+ bindIntParameter(i_s_memberdef,":prot",md->protection());
+ bindIntParameter(i_s_memberdef,":static",md->isStatic());
+
+ bool isFunc=FALSE;
+ switch (md->memberType())
+ {
+ case MemberType_Function: // fall through
+ case MemberType_Signal: // fall through
+ case MemberType_Friend: // fall through
+ case MemberType_DCOP: // fall through
+ case MemberType_Slot:
+ isFunc=TRUE;
+ break;
+ default:
+ break;
+ }
+ if (isFunc)
+ {
+ LockingPtr<ArgumentList> al = md->argumentList();
+ if (al!=0 && al->constSpecifier)
+ {
+ bindIntParameter(i_s_memberdef,":const",al->constSpecifier);
+ }
+
+ bindIntParameter(i_s_memberdef,":explicit",md->isExplicit());
+ bindIntParameter(i_s_memberdef,":inline",md->isInline());
+ bindIntParameter(i_s_memberdef,":final",md->isFinal());
+ bindIntParameter(i_s_memberdef,":sealed",md->isSealed());
+ bindIntParameter(i_s_memberdef,":new",md->isNew());
+ bindIntParameter(i_s_memberdef,":optional",md->isOptional());
+ bindIntParameter(i_s_memberdef,":required",md->isRequired());
+ bindIntParameter(i_s_memberdef,":virt",md->virtualness());
+ }
+ // place in the arguments and linkify the arguments
+
+ if (md->memberType() == MemberType_Variable)
+ {
+ bindIntParameter(i_s_memberdef,":mutable",md->isMutable());
+ bindIntParameter(i_s_memberdef,":initonly",md->isInitonly());
+ }
+ else if (md->memberType() == MemberType_Property)
+ {
+ bindIntParameter(i_s_memberdef,":readable",md->isReadable());
+ bindIntParameter(i_s_memberdef,":writable",md->isWritable());
+ bindIntParameter(i_s_memberdef,":gettable",md->isGettable());
+ bindIntParameter(i_s_memberdef,":settable",md->isSettable());
+
+ if (md->isAssign() || md->isCopy() || md->isRetain())
+ {
+ int accessor = md->isAssign() ? md->isAssign() :
+ (md->isCopy() ? md->isCopy() : md->isRetain()) ;
+
+ bindIntParameter(i_s_memberdef,":accessor",accessor);
+ }
+ }
+ else if (md->memberType() == MemberType_Event)
+ {
+ bindIntParameter(i_s_memberdef,":addable",md->isAddable());
+ bindIntParameter(i_s_memberdef,":removable",md->isRemovable());
+ bindIntParameter(i_s_memberdef,":raisable",md->isRaisable());
+ }
+
+ if (md->memberType()!=MemberType_Define &&
+ md->memberType()!=MemberType_Enumeration
+ )
+ {
+ QCString typeStr = md->typeString();
+ stripQualifiers(typeStr);
+ StringList l;
+ linkifyText(TextGeneratorSqlite3Impl(l),def,md->getBodyDef(),md,typeStr);
+ if (typeStr.data())
+ {
+ bindTextParameter(i_s_memberdef,":type",typeStr);
+ }
+
+ if (md->definition())
+ {
+ bindTextParameter(i_s_memberdef,":definition",md->definition());
+ }
+
+ if (md->argsString())
+ {
+ bindTextParameter(i_s_memberdef,":argsstring",md->argsString());
+ }
+ }
+
+ bindTextParameter(i_s_memberdef,":name",md->name());
+
+ if (md->memberType() == MemberType_Property)
+ {
+ if (md->isReadable())
+ {
+ DBG_CTX(("<read>\n"));
+ }
+ if (md->isWritable())
+ {
+ DBG_CTX(("<write>\n"));
+ }
+ }
+#if 0
+ if (md->memberType()==MemberType_Variable && md->bitfieldString())
+ {
+ QCString bitfield = md->bitfieldString();
+ if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
+ t << " <bitfield>" << bitfield << "</bitfield>" << endl;
+ }
+
+ MemberDef *rmd = md->reimplements();
+ if (rmd)
+ {
+ t << " <reimplements refid=\""
+ << memberOutputFileBase(rmd) << "_1" << rmd->anchor() << "\">"
+ << convertToXML(rmd->name()) << "</reimplements>" << endl;
+ }
+ LockingPtr<MemberList> rbml = md->reimplementedBy();
+ if (rbml!=0)
+ {
+ MemberListIterator mli(*rbml);
+ for (mli.toFirst();(rmd=mli.current());++mli)
+ {
+ t << " <reimplementedby refid=\""
+ << memberOutputFileBase(rmd) << "_1" << rmd->anchor() << "\">"
+ << convertToXML(rmd->name()) << "</reimplementedby>" << endl;
+ }
+ }
+#endif
+ if (isFunc) //function
+ {
+ LockingPtr<ArgumentList> declAl = md->declArgumentList();
+ LockingPtr<ArgumentList> defAl = md->argumentList();
+ if (declAl!=0 && declAl->count()>0)
+ {
+ ArgumentListIterator declAli(*declAl);
+ ArgumentListIterator defAli(*defAl);
+ Argument *a;
+ for (declAli.toFirst();(a=declAli.current());++declAli)
+ {
+ Argument *defArg = defAli.current();
+ DBG_CTX(("<param>\n"));
+ if (!a->attrib.isEmpty())
+ {
+ DBG_CTX(("<attributes>:%s\n",a->attrib.data()));
+ }
+ if (!a->type.isEmpty())
+ {
+ StringList l;
+ linkifyText(TextGeneratorSqlite3Impl(l),def,md->getBodyDef(),md,a->type);
+
+ QCString *s=l.first();
+ while (s)
+ {
+ insertMemberReference(db,md->anchor().data(),s->data(),def->getDefFileName().data(),md->getDefLine(),1);
+ s=l.next();
+ }
+ }
+ if (!a->name.isEmpty())
+ {
+ DBG_CTX(("<declname>%s\n",a->name.data()));
+ }
+ if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
+ {
+ DBG_CTX(("<defname>%s\n",defArg->name.data()));
+ }
+ if (!a->array.isEmpty())
+ {
+ DBG_CTX(("<array>%s",a->array.data()));
+ }
+ if (!a->defval.isEmpty())
+ {
+ StringList l;
+ linkifyText(TextGeneratorSqlite3Impl(l),def,md->getBodyDef(),md,a->defval);
+ }
+ if (defArg) ++defAli;
+ }
+ }
+ }
+ else if (md->memberType()==MemberType_Define &&
+ md->argsString()) // define
+ {
+ if (md->argumentList()->count()==0) // special case for "foo()" to
+ // disguish it from "foo".
+ {
+ DBG_CTX(("no params\n"));
+ }
+ else
+ {
+ ArgumentListIterator ali(*md->argumentList());
+ Argument *a;
+ for (ali.toFirst();(a=ali.current());++ali)
+ {
+ DBG_CTX(("<param><defname>%s\n",a->type.data()));
+ }
+ }
+ }
+
+
+ // Extract references from initializer
+ // avoid that extremely large tables are written to the output.
+ // todo: it's better to adhere to MAX_INITIALIZER_LINES.
+ // drm_mod_register_buffer,
+ if (!md->initializer().isEmpty() && md->initializer().length()<2000)
+ {
+ StringList l;
+ linkifyText(TextGeneratorSqlite3Impl(l),def,md->getBodyDef(),md,md->initializer());
+ QCString *s=l.first();
+ while (s)
+ {
+ DBG_CTX(("initializer:%s %s %s %d\n",
+ md->anchor().data(),
+ s->data(),
+ md->getBodyDef()->getDefFileName().data(),
+ md->getStartBodyLine()));
+ insertMemberReference(db,md->anchor().data(),s->data(),md->getBodyDef()->getDefFileName().data(),md->getStartBodyLine(),1);
+ s=l.next();
+ }
+ }
+
+#if 0
+ if (md->excpString())
+ {
+ linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->excpString());
+ }
+#endif
+ if ( md->getScopeString() )
+ {
+ bindTextParameter(i_s_memberdef,":scope",md->getScopeString());
+ }
+
+ // File location
+ if (md->getDefLine() != -1)
+ {
+ int id_file = insertFile(db,md->getDefFileName());
+ if (id_file!=-1)
+ {
+ bindIntParameter(i_s_memberdef,":id_file",id_file);
+ bindIntParameter(i_s_memberdef,":line",md->getDefLine());
+ bindIntParameter(i_s_memberdef,":column",md->getDefColumn());
+
+ if (md->getStartBodyLine()!=-1)
+ {
+ int id_bfile = insertFile(db,md->getBodyDef()->absFilePath());
+ if (id_bfile == -1) exit(-1);
+ bindIntParameter(i_s_memberdef,":id_ibfile",id_bfile);
+ bindIntParameter(i_s_memberdef,":bline",md->getStartBodyLine());
+
+ // XXX implement getStartBodyColumn
+ bindIntParameter(i_s_memberdef,":bcolumn",1);
+ }
+ }
+ }
+
+
+ step(db,i_s_memberdef);
+ /*int id_src =*/ sqlite3_last_insert_rowid(db);
+
+ // + cross-references
+ // The cross-references in initializers only work when both the src and dst
+ // are defined.
+ LockingPtr<MemberSDict> mdict = md->getReferencesMembers();
+ // references
+ if (mdict!=0)
+ {
+ MemberSDict::IteratorDict mdi(*mdict);
+ MemberDef *rmd;
+ for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ {
+ insertMemberReference(db,md,rmd,mdi.currentKey());
+ }
+ }
+
+ mdict = md->getReferencedByMembers();
+ // referencedby
+ if (mdict!=0)
+ {
+ MemberSDict::IteratorDict mdi(*mdict);
+ MemberDef *rmd;
+ for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ {
+ insertMemberReference(db,rmd,md,mdi.currentKey());
+ }
+ }
+}
+
+static void generateSqlite3ForClass(sqlite3 *db, ClassDef *cd)
+{
+ // + brief description
+ // + detailed description
+ // + template argument list(s)
+ // - include file
+ // + member groups
+ // + inheritance diagram
+ // + list of direct super classes
+ // + list of direct sub classes
+ // + list of inner classes
+ // + collaboration diagram
+ // + list of all members
+ // + user defined member sections
+ // + standard member sections
+ // + detailed member documentation
+ // - examples using the class
+
+ if (cd->isReference()) return; // skip external references.
+ if (cd->isHidden()) return; // skip hidden classes.
+ if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
+ if (cd->templateMaster()!=0) return; // skip generated template instances.
+
+ msg("Generating Sqlite3 output for class %s\n",cd->name().data());
+
+ //int idx,rc;
+ //sqlite3_stmt *stmt ;
+
+ // + compounddef
+ //stmt = i_s_compounddef;
+
+ bindTextParameter(i_s_compounddef,":name",cd->name());
+ bindTextParameter(i_s_compounddef,":kind",cd->compoundTypeString());
+ bindIntParameter(i_s_compounddef,":prot",cd->protection());
+ bindTextParameter(i_s_compounddef,":refid",cd->getOutputFileBase());
+
+ int id_file = insertFile(db,cd->getDefFileName().data());
+ bindIntParameter(i_s_compounddef,":id_file",id_file);
+ bindIntParameter(i_s_compounddef,":line",cd->getDefLine());
+ bindIntParameter(i_s_compounddef,":column",cd->getDefColumn());
+
+ step(db,i_s_compounddef);
+ sqlite3_int64 id_compound=0 ;
+ id_compound = sqlite3_last_insert_rowid(db);
+
+ // + basecompoundref
+ if (cd->baseClasses())
+ {
+ BaseClassListIterator bcli(*cd->baseClasses());
+ BaseClassDef *bcd;
+ for (bcli.toFirst();(bcd=bcli.current());++bcli)
+ {
+ bindTextParameter(i_s_basecompoundref,":refid",bcd->classDef->getOutputFileBase());
+ bindIntParameter(i_s_basecompoundref,":prot",bcd->prot);
+ bindIntParameter(i_s_basecompoundref,":virt",bcd->virt);
+
+ if (!bcd->templSpecifiers.isEmpty())
+ {
+ bindTextParameter(i_s_basecompoundref,":base",insertTemplateSpecifierInScope(bcd->classDef->name(),bcd->templSpecifiers));
+ }
+ else
+ {
+ bindTextParameter(i_s_basecompoundref,":base",bcd->classDef->displayName());
+ }
+ bindTextParameter(i_s_basecompoundref,":derived",cd->displayName());
+ step(db,i_s_basecompoundref);
+ }
+ }
+
+ // + derivedcompoundref
+ if (cd->subClasses())
+ {
+ BaseClassListIterator bcli(*cd->subClasses());
+ BaseClassDef *bcd;
+ for (bcli.toFirst();(bcd=bcli.current());++bcli)
+ {
+ bindTextParameter(i_s_derivedcompoundref,":base",cd->displayName());
+ bindTextParameter(i_s_derivedcompoundref,":dervied",bcd->classDef->displayName());
+ bindTextParameter(i_s_derivedcompoundref,":refid",bcd->classDef->getOutputFileBase());
+ bindIntParameter(i_s_derivedcompoundref,":prot",bcd->prot);
+ bindIntParameter(i_s_derivedcompoundref,":virt",bcd->virt);
+ step(db,i_s_derivedcompoundref);
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ // INCLUDEINFO
+ IncludeInfo *ii=cd->includeInfo();
+ if (ii)
+ {
+ QCString nm = ii->includeName;
+ if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
+ if (!nm.isEmpty())
+ {
+ bindTextParameter(c_s_includes,":refid",ii->fileDef->getOutputFileBase());
+ bindIntParameter(c_s_includes,":local",ii->local);
+ bindTextParameter(c_s_includes,":name",nm);
+ int count=step(db,c_s_includes,TRUE);
+ if ( count==0 )
+ {
+ bindTextParameter(i_s_includes,":refid",ii->fileDef->getOutputFileBase());
+ bindIntParameter(i_s_includes,":local",ii->local);
+ bindTextParameter(i_s_includes,":name",nm);
+ step(db,i_s_includes);
+ }
+ }
+ }
+ ///////////////////////////////////////////////////////////////////
+ writeInnerClasses(db,cd->getClassSDict());
+ writeTemplateList(db,cd);
+
+ if (cd->getMemberGroupSDict())
+ {
+ MemberGroupSDict::Iterator mgli(*cd->getMemberGroupSDict());
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ generateSqlite3Section(db,cd,mg->members(),"user-defined",mg->header(),
+ mg->documentation());
+ }
+ }
+
+ QListIterator<MemberList> mli(cd->getMemberLists());
+ MemberList *ml;
+ for (mli.toFirst();(ml=mli.current());++mli)
+ {
+ if ((ml->listType()&MemberListType_detailedLists)==0)
+ {
+ generateSqlite3Section(db,cd,ml,"user-defined");//g_xmlSectionMapper.find(ml->listType()));
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+void generateSqlite3()
+{
+ // + classes
+ // + namespaces
+ // + files
+ // - groups
+ // - related pages
+ // - examples
+ //QCString outputDirectory = Config_getString("SQLITE3_OUTPUT");
+ QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
+ QDir sqlite3Dir(outputDirectory);
+ sqlite3 *db;
+ sqlite3_initialize();
+ int rc = sqlite3_open_v2(outputDirectory+"/doxygen_sqlite3.db", &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
+ if (rc != SQLITE_OK)
+ {
+ sqlite3_close(db);
+ msg("database open failed: %s\n", "doxygen_sqlite3.db");
+ exit(-1);
+ }
+ beginTransaction(db);
+ pragmaTuning(db);
+
+ initializeSchema(db);
+ if ( -1 == prepareStatements(db) )
+ {
+ err("sqlite generator: prepareStatements failed!");
+ return;
+ }
+
+ // + classes
+ ClassSDict::Iterator cli(*Doxygen::classSDict);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ msg("Generating Sqlite3 output for class %s\n",cd->name().data());
+ generateSqlite3ForClass(db,cd);
+ }
+
+ // + namespaces
+ NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict);
+ NamespaceDef *nd;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ msg("Generating Sqlite3 output for namespace %s\n",nd->name().data());
+ generateSqlite3ForNamespace(db,nd);
+ }
+
+ // + files
+ FileNameListIterator fnli(*Doxygen::inputNameList);
+ FileName *fn;
+ for (;(fn=fnli.current());++fnli)
+ {
+ FileNameIterator fni(*fn);
+ FileDef *fd;
+ for (;(fd=fni.current());++fni)
+ {
+ msg("Generating Sqlite3 output for file %s\n",fd->name().data());
+ generateSqlite3ForFile(db,fd);
+ }
+ }
+ endTransaction(db);
+}
+
+#else // USE_SQLITE3
+void generateSqlite3()
+{
+ err("Error: sqlite3 support has not been compiled in!");
+}
+#endif
+
diff --git a/src/sqlite3gen.h b/src/sqlite3gen.h
new file mode 100644
index 0000000..689f1da
--- /dev/null
+++ b/src/sqlite3gen.h
@@ -0,0 +1,23 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2012 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 SQLITE3GEN_H
+#define SQLITE3GEN_H
+
+void generateSqlite3();
+
+#endif
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 1e0ef4f..8739c99 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -1399,11 +1399,11 @@ void TagFileParser::addIncludes()
}
}
-void parseTagFile(Entry *root,const char *fullName,const char *tagName)
+void parseTagFile(Entry *root,const char *fullName)
{
QFileInfo fi(fullName);
if (!fi.exists()) return;
- TagFileParser handler( tagName );
+ TagFileParser handler( fullName ); // tagName
handler.setFileName(fullName);
TagFileErrorHandler errorHandler;
QFile xmlFile( fullName );
diff --git a/src/tagreader.h b/src/tagreader.h
index 7b29b01..73619db 100644
--- a/src/tagreader.h
+++ b/src/tagreader.h
@@ -21,6 +21,6 @@
class Entry;
-void parseTagFile(Entry *root,const char *fullPathName,const char *fileName);
+void parseTagFile(Entry *root,const char *fullPathName);
#endif
diff --git a/src/tclscanner.l b/src/tclscanner.l
index e8bf77d..b91d7c4 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -1651,7 +1651,7 @@ static void tcl_codify_link(QCString name)
if (tcl.memberdef)
{
myDef->addSourceReferencedBy(tcl.memberdef);
- tcl.memberdef->addSourceReferences(myDef);
+ tcl.memberdef->addSourceReferences(myDef,NULL);
}
}
else if (tcl_keyword(myName)) // check keyword
diff --git a/src/translator_lv.h b/src/translator_lv.h
new file mode 100644
index 0000000..60b82f8
--- /dev/null
+++ b/src/translator_lv.h
@@ -0,0 +1,2002 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2012 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 TRANSLATOR_LV_H
+#define TRANSLATOR_LV_H
+
+/*!
+ When defining a translator class for the new language, follow
+ the description in the documentation. One of the steps says
+ that you should copy the translator_en.h (this) file to your
+ translator_xx.h new file. Your new language should use the
+ Translator class as the base class. This means that you need to
+ implement exactly the same (pure virtual) methods as the
+ TranslatorEnglish does. Because of this, it is a good idea to
+ start with the copy of TranslatorEnglish and replace the strings
+ one by one.
+
+ It is not necessary to include "translator.h" or
+ "translator_adapter.h" here. The files are included in the
+ language.cpp correctly. Not including any of the mentioned
+ files frees the maintainer from thinking about whether the
+ first, the second, or both files should be included or not, and
+ why. This holds namely for localized translators because their
+ base class is changed occasionaly to adapter classes when the
+ Translator class changes the interface, or back to the
+ Translator class (by the local maintainer) when the localized
+ translator is made up-to-date again.
+*/
+
+/* Translation from English to Latvian by Lauris Bukšis-Haberkorns
+ * (lauris@nix.lv)
+ * -------------------------------------------
+ * Project start : 24.Sept.2012
+ * Last Doxygen version covered : 1.8.2
+ */
+
+class TranslatorLatvian : public Translator
+{
+ public:
+
+ // --- Language control methods -------------------
+
+ /*! Used for identification of the language. The identification
+ * should not be translated. It should be replaced by the name
+ * of the language in English using lower-case characters only
+ * (e.g. "czech", "japanese", "russian", etc.). It should be equal to
+ * the identification used in language.cpp.
+ */
+ virtual QCString idLanguage()
+ { return "latvian"; }
+
+ /*! Used to get the LaTeX command(s) for the language support.
+ * This method should return string with commands that switch
+ * LaTeX to the desired language. For example
+ * <pre>"\\usepackage[german]{babel}\n"
+ * </pre>
+ * or
+ * <pre>"\\usepackage{polski}\n"
+ * "\\usepackage[latin2]{inputenc}\n"
+ * "\\usepackage[T1]{fontenc}\n"
+ * </pre>
+ */
+ virtual QCString latexLanguageSupportCommand()
+ {
+ return "\\usepackage[LV]{fontenc}\n"
+ "\\usepackage[latvian]{babel}\n";
+ }
+
+ /*! return the language charset. This will be used
+ when transcoding the translatable strings in this file to UTF-8 */
+ virtual QCString idLanguageCharset()
+ {
+ return "iso-8859-13";
+ }
+
+ // --- Language translation methods -------------------
+
+ /*! used in the compound documentation before a list of related functions. */
+ virtual QCString trRelatedFunctions()
+ { return "Saistītās funkcijas"; }
+
+ /*! subscript for the related functions. */
+ virtual QCString trRelatedSubscript()
+ { return "(Šīs nav elementu funkcijas.)"; }
+
+ /*! header that is put before the detailed description of files, classes and namespaces. */
+ virtual QCString trDetailedDescription()
+ { return "Detalizēts apraksts"; }
+
+ /*! header that is put before the list of typedefs. */
+ virtual QCString trMemberTypedefDocumentation()
+ { return "Elementa Typedef dokumentācija"; }
+
+ /*! header that is put before the list of enumerations. */
+ virtual QCString trMemberEnumerationDocumentation()
+ { return "Elementa uzskaitījumliterāļa dokumentācija"; }
+
+ /*! header that is put before the list of member functions. */
+ virtual QCString trMemberFunctionDocumentation()
+ { return "Elementa funkcijas dokumentācija"; }
+
+ /*! header that is put before the list of member attributes. */
+ virtual QCString trMemberDataDocumentation()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Lauka dokumentācija";
+ }
+ else
+ {
+ return "Elementa datu dokumentācija";
+ }
+ }
+
+ /*! this is the text of a link put after brief descriptions. */
+ virtual QCString trMore()
+ { return "vairāk..."; }
+
+ /*! put in the class documentation */
+ virtual QCString trListOfAllMembers()
+ { return "Visu elementu saraksts"; }
+
+ /*! used as the title of the "list of all members" page of a class */
+ virtual QCString trMemberList()
+ { return "Elementu saraksts"; }
+
+ /*! this is the first part of a sentence that is followed by a class name */
+ virtual QCString trThisIsTheListOfAllMembers()
+ { return "Šis ir pilns elementu saraksts klasei "; }
+
+ /*! this is the remainder of the sentence after the class name */
+ virtual QCString trIncludingInheritedMembers()
+ { return ", ieskaitot mantotos elementus."; }
+
+ /*! this is put at the author sections at the bottom of man pages.
+ * parameter s is name of the project name.
+ */
+ virtual QCString trGeneratedAutomatically(const char *s)
+ { QCString result="Automātiski ģenerēts izmantojot Doxygen";
+ if (s) result+=(QCString)" priekš "+s;
+ result+=" no pirmkoda.";
+ return result;
+ }
+
+ /*! put after an enum name in the list of all members */
+ virtual QCString trEnumName()
+ { return "uzskaitījuma nosaukums"; }
+
+ /*! put after an enum value in the list of all members */
+ virtual QCString trEnumValue()
+ { return "uzskaitījuma vērtība"; }
+
+ /*! put after an undocumented member in the list of all members */
+ virtual QCString trDefinedIn()
+ { return "definēts"; }
+
+ // quick reference sections
+
+ /*! This is put above each page as a link to the list of all groups of
+ * compounds or files (see the \\group command).
+ */
+ virtual QCString trModules()
+ { return "Moduļi"; }
+
+ /*! This is put above each page as a link to the class hierarchy */
+ virtual QCString trClassHierarchy()
+ { return "Klašu hierarhija"; }
+
+ /*! This is put above each page as a link to the list of annotated classes */
+ virtual QCString trCompoundList()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datu struktūras";
+ }
+ else
+ {
+ return "Klašu saraksts";
+ }
+ }
+
+ /*! This is put above each page as a link to the list of documented files */
+ virtual QCString trFileList()
+ { return "Failu saraksts"; }
+
+ /*! This is put above each page as a link to all members of compounds. */
+ virtual QCString trCompoundMembers()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datu lauki";
+ }
+ else
+ {
+ return "Klases elementi";
+ }
+ }
+
+ /*! This is put above each page as a link to all members of files. */
+ virtual QCString trFileMembers()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Globālie";
+ }
+ else
+ {
+ return "Faila elementi";
+ }
+ }
+
+ /*! This is put above each page as a link to all related pages. */
+ virtual QCString trRelatedPages()
+ { return "Saistītās lapas"; }
+
+ /*! This is put above each page as a link to all examples. */
+ virtual QCString trExamples()
+ { return "Piemēri"; }
+
+ /*! This is put above each page as a link to the search engine. */
+ virtual QCString trSearch()
+ { return "Meklēt"; }
+
+ /*! This is an introduction to the class hierarchy. */
+ virtual QCString trClassHierarchyDescription()
+ { return "Šis mantojamības saraksts ir sakārtots aptuveni, "
+ "bet ne pilnībā, alfabēta secībā:";
+ }
+
+ /*! This is an introduction to the list with all files. */
+ virtual QCString trFileListDescription(bool extractAll)
+ {
+ QCString result="Šeit ir visu ";
+ if (!extractAll) result+="dokumentēto ";
+ result+="failu saraksts ar īsu aprakstu:";
+ return result;
+ }
+
+ /*! This is an introduction to the annotated compound list. */
+ virtual QCString trCompoundListDescription()
+ {
+
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Šeit ir visas datu struktūras ar īsu aprakstu:";
+ }
+ else
+ {
+ return "Šeit ir visas klases, struktūras, "
+ "apvienojumi un interfeisi ar īsu aprakstu:";
+ }
+ }
+
+ /*! This is an introduction to the page with all class members. */
+ virtual QCString trCompoundMembersDescription(bool extractAll)
+ {
+ QCString result="Šeit ir visu ";
+ if (!extractAll)
+ {
+ result+="dokumentēto ";
+ }
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ result+="struktūru un apvienojumu lauku";
+ }
+ else
+ {
+ result+="klases elementu";
+ }
+ result+=" saraksts ar saitēm uz ";
+ if (!extractAll)
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ result+="struktūru/apvienojumu dokumentāciju katram laukam:";
+ }
+ else
+ {
+ result+="klases dokumentāciju katram elementam:";
+ }
+ }
+ else
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ result+="struktūrām/apvienojumiem, kam tie pieder:";
+ }
+ else
+ {
+ result+="klasēm, kam tie pieder:";
+ }
+ }
+ return result;
+ }
+
+ /*! This is an introduction to the page with all file members. */
+ virtual QCString trFileMembersDescription(bool extractAll)
+ {
+ QCString result="Šeit ir visu ";
+ if (!extractAll) result+="dokumentēto ";
+
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ result+="funkciju, mainīgo, definīciju, uzskaitījumliterāļu un typedefs";
+ }
+ else
+ {
+ result+="faila elementu";
+ }
+ result+=" saraksts ar saitēm uz ";
+ if (extractAll)
+ result+="failiem, kam tie pieder:";
+ else
+ result+="dokumentāciju:";
+ return result;
+ }
+
+ /*! This is an introduction to the page with the list of all examples */
+ virtual QCString trExamplesDescription()
+ { return "Šeit ir visu piemēru saraksts:"; }
+
+ /*! This is an introduction to the page with the list of related pages */
+ virtual QCString trRelatedPagesDescription()
+ { return "Here is a list of all related documentation pages:"; }
+
+ /*! This is an introduction to the page with the list of class/file groups */
+ virtual QCString trModulesDescription()
+ { return "Šeit ir visu moduļu saraksts:"; }
+
+ // index titles (the project name is prepended for these)
+
+ /*! This is used in HTML as the title of index.html. */
+ virtual QCString trDocumentation()
+ { return "Dokumentācija"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all groups.
+ */
+ virtual QCString trModuleIndex()
+ { return "Moduļu indekss"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * class hierarchy.
+ */
+ virtual QCString trHierarchicalIndex()
+ { return "Hierarhijas indekss"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index.
+ */
+ virtual QCString trCompoundIndex()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datu struktūru indess";
+ }
+ else
+ {
+ return "Klašu indekss";
+ }
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * list of all files.
+ */
+ virtual QCString trFileIndex()
+ { return "Failu indekss"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all groups.
+ */
+ virtual QCString trModuleDocumentation()
+ { return "Moduļa dokumentācija"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all classes, structs and unions.
+ */
+ virtual QCString trClassDocumentation()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datu struktūras dokomentācija";
+ }
+ else
+ {
+ return "Klases dokumentācija";
+ }
+ }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all files.
+ */
+ virtual QCString trFileDocumentation()
+ { return "Faila dokumentācija"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all examples.
+ */
+ virtual QCString trExampleDocumentation()
+ { return "Piemēri"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all related pages.
+ */
+ virtual QCString trPageDocumentation()
+ { return "Lapas dokumentācija"; }
+
+ /*! This is used in LaTeX as the title of the document */
+ virtual QCString trReferenceManual()
+ { return "Rokasgrāmata"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of defines
+ */
+ virtual QCString trDefines()
+ { return "Makro"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of function prototypes
+ */
+ virtual QCString trFuncProtos()
+ { return "Funkciju prototipi"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of typedefs
+ */
+ virtual QCString trTypedefs()
+ { return "Typedefs"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of enumerations
+ */
+ virtual QCString trEnumerations()
+ { return "Uzskaitījumi"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) functions
+ */
+ virtual QCString trFunctions()
+ { return "Funkcijas"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
+ virtual QCString trVariables()
+ { return "Mainīgie"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
+ virtual QCString trEnumerationValues()
+ { return "Uzskaitījumliterāļi"; }
+
+ /*! This is used in the documentation of a file before the list of
+ * documentation blocks for defines
+ */
+ virtual QCString trDefineDocumentation()
+ { return "Makro definīcijas dokumentācija"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for function prototypes
+ */
+ virtual QCString trFunctionPrototypeDocumentation()
+ { return "Funkcijas prototipu dokumentācija"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for typedefs
+ */
+ virtual QCString trTypedefDocumentation()
+ { return "Typedef dokumentācija"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration types
+ */
+ virtual QCString trEnumerationTypeDocumentation()
+ { return "Uzskaitījumliterāļa tipa dokumentācija"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for functions
+ */
+ virtual QCString trFunctionDocumentation()
+ { return "Funkcijas dokumentācija"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for variables
+ */
+ virtual QCString trVariableDocumentation()
+ { return "Mainīgo dokumentācija"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds
+ */
+ virtual QCString trCompounds()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datu struktūras";
+ }
+ else
+ {
+ return "Klases";
+ }
+ }
+
+ /*! This is used in the standard footer of each page and indicates when
+ * the page was generated
+ */
+ virtual QCString trGeneratedAt(const char *date,const char *projName)
+ {
+ QCString result=(QCString)"Ģenerēts "+date;
+ if (projName) result+=(QCString)" projektam "+projName;
+ result+=(QCString)" ar";
+ return result;
+ }
+ /*! This is part of the sentence used in the standard footer of each page.
+ */
+ virtual QCString trWrittenBy()
+ {
+ return "uzrakstījis";
+ }
+
+ /*! this text is put before a class diagram */
+ virtual QCString trClassDiagram(const char *clName)
+ {
+ return (QCString)"Mantojamības diagramma klasei "+clName+":";
+ }
+
+ /*! this text is generated when the \\internal command is used. */
+ virtual QCString trForInternalUseOnly()
+ { return "Tikai iekšējai lietošanai."; }
+
+ /*! this text is generated when the \\warning command is used. */
+ virtual QCString trWarning()
+ { return "Brīdinājums"; }
+
+ /*! this text is generated when the \\version command is used. */
+ virtual QCString trVersion()
+ { return "Versija"; }
+
+ /*! this text is generated when the \\date command is used. */
+ virtual QCString trDate()
+ { return "Datums"; }
+
+ /*! this text is generated when the \\return command is used. */
+ virtual QCString trReturns()
+ { return "Atgriež"; }
+
+ /*! this text is generated when the \\sa command is used. */
+ virtual QCString trSeeAlso()
+ { return "Skatīties arī"; }
+
+ /*! this text is generated when the \\param command is used. */
+ virtual QCString trParameters()
+ { return "Parametri"; }
+
+ /*! this text is generated when the \\exception command is used. */
+ virtual QCString trExceptions()
+ { return "Izņēmumi"; }
+
+ /*! this text is used in the title page of a LaTeX document. */
+ virtual QCString trGeneratedBy()
+ { return "Ģenerēts ar"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used as the title of page containing all the index of all namespaces. */
+ virtual QCString trNamespaceList()
+ { return "Nosaukumvietu saraksts"; }
+
+ /*! used as an introduction to the namespace list */
+ virtual QCString trNamespaceListDescription(bool extractAll)
+ {
+ QCString result="Šeit ir visas ";
+ if (!extractAll) result+="dokumentētās ";
+ result+="nosaukumvietas ar īsu aprakstu:";
+ return result;
+ }
+
+ /*! used in the class documentation as a header before the list of all
+ * friends of a class
+ */
+ virtual QCString trFriends()
+ { return "Draugi"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990405
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in the class documentation as a header before the list of all
+ * related classes
+ */
+ virtual QCString trRelatedFunctionDocumentation()
+ { return "Draugu un saistīto funkciju dokumentācija"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990425
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used as the title of the HTML page of a class/struct/union */
+ virtual QCString trCompoundReference(const char *clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=(QCString)clName;
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" klases"; break;
+ case ClassDef::Struct: result+=" struktūras"; break;
+ case ClassDef::Union: result+=" apvienojuma"; break;
+ case ClassDef::Interface: result+=" interfeisa"; break;
+ case ClassDef::Protocol: result+=" protokola"; break;
+ case ClassDef::Category: result+=" kategorijas"; break;
+ case ClassDef::Exception: result+=" izņēmuma"; break;
+ }
+ if (isTemplate) result+=" veidnes";
+ result+=" apraksts";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a file */
+ virtual QCString trFileReference(const char *fileName)
+ {
+ QCString result=fileName;
+ result+=" faila apraksts";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a namespace */
+ virtual QCString trNamespaceReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" nosaukumvietas apraksts";
+ return result;
+ }
+
+ virtual QCString trPublicMembers()
+ { return "Publiskās elementa funkcijas"; }
+ virtual QCString trPublicSlots()
+ { return "Publiskās spraugas"; }
+ virtual QCString trSignals()
+ { return "Signāli"; }
+ virtual QCString trStaticPublicMembers()
+ { return "Statiskās publiskās elementa funkcijas"; }
+ virtual QCString trProtectedMembers()
+ { return "Aizsargātās elementa funkcijas"; }
+ virtual QCString trProtectedSlots()
+ { return "Aizsargātās spraugas"; }
+ virtual QCString trStaticProtectedMembers()
+ { return "Statiskās aizsargātās elementa funkcijas"; }
+ virtual QCString trPrivateMembers()
+ { return "Privātās elementa funkcijas"; }
+ virtual QCString trPrivateSlots()
+ { return "Privātās spraugas"; }
+ virtual QCString trStaticPrivateMembers()
+ { return "Statiskās privātās elementa funkcijas"; }
+
+ /*! this function is used to produce a comma-separated list of items.
+ * use generateMarker(i) to indicate where item i should be put.
+ */
+ virtual QCString trWriteList(int numEntries)
+ {
+ QCString result;
+ int i;
+ // the inherits list contain `numEntries' classes
+ for (i=0;i<numEntries;i++)
+ {
+ // use generateMarker to generate placeholders for the class links!
+ result+=generateMarker(i); // generate marker for entry i in the list
+ // (order is left to right)
+
+ if (i!=numEntries-1) // not the last entry, so we need a separator
+ {
+ if (i<numEntries-2) // not the fore last entry
+ result+=", ";
+ else // the fore last entry
+ result+=", un ";
+ }
+ }
+ return result;
+ }
+
+ /*! used in class documentation to produce a list of base classes,
+ * if class diagrams are disabled.
+ */
+ virtual QCString trInheritsList(int numEntries)
+ {
+ return "Manto no "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in class documentation to produce a list of super classes,
+ * if class diagrams are disabled.
+ */
+ virtual QCString trInheritedByList(int numEntries)
+ {
+ return "Tiek mantots "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are hidden by this one.
+ */
+ virtual QCString trReimplementedFromList(int numEntries)
+ {
+ return "Pārimplementēts no "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in member documentation blocks to produce a list of
+ * all member that overwrite the implementation of this member.
+ */
+ virtual QCString trReimplementedInList(int numEntries)
+ {
+ return "Pārimplementēts "+trWriteList(numEntries)+".";
+ }
+
+ /*! This is put above each page as a link to all members of namespaces. */
+ virtual QCString trNamespaceMembers()
+ { return "Nosaukumvietas elementi"; }
+
+ /*! This is an introduction to the page with all namespace members */
+ virtual QCString trNamespaceMemberDescription(bool extractAll)
+ {
+ QCString result="Šeit ir visi ";
+ if (!extractAll) result+="dokumentētie ";
+ result+="nosaukumvietas elementi ar saitēm uz ";
+ if (extractAll)
+ result+="nosaukumvieta dokumentāciju katram elementam:";
+ else
+ result+="nosaukumvietu, kam tie pieder:";
+ return result;
+ }
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all namespaces.
+ */
+ virtual QCString trNamespaceIndex()
+ { return "Nosaukumvietu indekss"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all namespaces.
+ */
+ virtual QCString trNamespaceDocumentation()
+ { return "Nosaukumvietas dokumentācija"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990522
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in the documentation before the list of all
+ * namespaces in a file.
+ */
+ virtual QCString trNamespaces()
+ { return "Nosaukumvietas"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990728
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is put at the bottom of a class documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
+ bool single)
+ { // single is true implies a single file
+ QCString result=(QCString)"Šī";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="s klases"; break;
+ case ClassDef::Struct: result+="s struktūras"; break;
+ case ClassDef::Union: result+=" apvienojuma"; break;
+ case ClassDef::Interface: result+=" interfeisa"; break;
+ case ClassDef::Protocol: result+=" protokola"; break;
+ case ClassDef::Category: result+="s kategorijas"; break;
+ case ClassDef::Exception: result+=" izņēmuma"; break;
+ }
+ result+=" dokumentācijas tika ģenerēta no šāda fail";
+ if (single) result+="a:"; else result+="iem:";
+ return result;
+ }
+
+ /*! This is in the (quick) index as a link to the alphabetical compound
+ * list.
+ */
+ virtual QCString trAlphabeticalList()
+ { return "Alfabētiskais saraksts"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990901
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the heading text for the retval command. */
+ virtual QCString trReturnValues()
+ { return "Atgriežamās vērtības"; }
+
+ /*! This is in the (quick) index as a link to the main page (index.html)
+ */
+ virtual QCString trMainPage()
+ { return "Sākumlapa"; }
+
+ /*! This is used in references to page that are put in the LaTeX
+ * documentation. It should be an abbreviation of the word page.
+ */
+ virtual QCString trPageAbbreviation()
+ { return "lpp."; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991003
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDefinedAtLineInSourceFile()
+ {
+ return "Definēts līnijā @0 failā @1.";
+ }
+ virtual QCString trDefinedInSourceFile()
+ {
+ return "Definēts failā @0.";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991205
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDeprecated()
+ {
+ return "Novecojusi";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.0.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! this text is put before a collaboration diagram */
+ virtual QCString trCollaborationDiagram(const char *clName)
+ {
+ return (QCString)"Sadarbības diagramma klasei "+clName+":";
+ }
+ /*! this text is put before an include dependency graph */
+ virtual QCString trInclDepGraph(const char *fName)
+ {
+ return (QCString)"Include dependency graph for "+fName+":";
+ }
+ /*! header that is put before the list of constructor/destructors. */
+ virtual QCString trConstructorDocumentation()
+ {
+ return "Konstruktora un destruktora dokumentācija";
+ }
+ /*! Used in the file documentation to point to the corresponding sources. */
+ virtual QCString trGotoSourceCode()
+ {
+ return "Iet uz šī faila pirmkodu.";
+ }
+ /*! Used in the file sources to point to the corresponding documentation. */
+ virtual QCString trGotoDocumentation()
+ {
+ return "Ietu uz šī faila dokumentāciju.";
+ }
+ /*! Text for the \\pre command */
+ virtual QCString trPrecondition()
+ {
+ return "Pirmsnosacījums";
+ }
+ /*! Text for the \\post command */
+ virtual QCString trPostcondition()
+ {
+ return "Pēcnosacījums";
+ }
+ /*! Text for the \\invariant command */
+ virtual QCString trInvariant()
+ {
+ return "Invariants";
+ }
+ /*! Text shown before a multi-line variable/enum initialization */
+ virtual QCString trInitialValue()
+ {
+ return "Sākotnējā vērtība:";
+ }
+ /*! Text used the source code in the file index */
+ virtual QCString trCode()
+ {
+ return "pirmkods";
+ }
+ virtual QCString trGraphicalHierarchy()
+ {
+ return "Grafiska klases hierarhija";
+ }
+ virtual QCString trGotoGraphicalHierarchy()
+ {
+ return "Iet uz grafisku klases hierarhiju";
+ }
+ virtual QCString trGotoTextualHierarchy()
+ {
+ return "Iet uz tekstuālu klases hierarhiju";
+ }
+ virtual QCString trPageIndex()
+ {
+ return "Lapas indekss";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.0
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trNote()
+ {
+ return "Piezīme";
+ }
+ virtual QCString trPublicTypes()
+ {
+ return "Publiskie tipi";
+ }
+ virtual QCString trPublicAttribs()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datu lauki";
+ }
+ else
+ {
+ return "Publiskie atribūti";
+ }
+ }
+ virtual QCString trStaticPublicAttribs()
+ {
+ return "Statiskie publiskie atribūti";
+ }
+ virtual QCString trProtectedTypes()
+ {
+ return "Aizsargātie tipi";
+ }
+ virtual QCString trProtectedAttribs()
+ {
+ return "Aizsargātie atribūti";
+ }
+ virtual QCString trStaticProtectedAttribs()
+ {
+ return "Statiskie aizsargātie atribūti";
+ }
+ virtual QCString trPrivateTypes()
+ {
+ return "Privātie tipi";
+ }
+ virtual QCString trPrivateAttribs()
+ {
+ return "Privātie atribūti";
+ }
+ virtual QCString trStaticPrivateAttribs()
+ {
+ return "Statiskie privātie atribūti";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a \\todo item */
+ virtual QCString trTodo()
+ {
+ return "Jāizdara";
+ }
+ /*! Used as the header of the todo list */
+ virtual QCString trTodoList()
+ {
+ return "Darāmo darbu saraksts";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.4
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trReferencedBy()
+ {
+ return "Atsauces no";
+ }
+ virtual QCString trRemarks()
+ {
+ return "Piebildes";
+ }
+ virtual QCString trAttention()
+ {
+ return "Uzmanību";
+ }
+ virtual QCString trInclByDepGraph()
+ {
+ return "Šis grafs rāda kuri faili tieši vai "
+ "netieši iekļauj šo failu:";
+ }
+ virtual QCString trSince()
+ {
+ return "Kopš";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! title of the graph legend page */
+ virtual QCString trLegendTitle()
+ {
+ return "Grafika leģenda";
+ }
+ /*! 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
+ "This page explains how to interpret the graphs that are generated "
+ "by doxygen.<p>\n"
+ "Consider the following example:\n"
+ "\\code\n"
+ "/*! Invisible class because of truncation */\n"
+ "class Invisible { };\n\n"
+ "/*! Truncated class, inheritance relation is hidden */\n"
+ "class Truncated : public Invisible { };\n\n"
+ "/* Class not documented with doxygen comments */\n"
+ "class Undocumented { };\n\n"
+ "/*! Class that is inherited using public inheritance */\n"
+ "class PublicBase : public Truncated { };\n\n"
+ "/*! A template class */\n"
+ "template<class T> class Templ { };\n\n"
+ "/*! Class that is inherited using protected inheritance */\n"
+ "class ProtectedBase { };\n\n"
+ "/*! Class that is inherited using private inheritance */\n"
+ "class PrivateBase { };\n\n"
+ "/*! Class that is used by the Inherited class */\n"
+ "class Used { };\n\n"
+ "/*! Super class that inherits a number of other classes */\n"
+ "class Inherited : public PublicBase,\n"
+ " protected ProtectedBase,\n"
+ " private PrivateBase,\n"
+ " public Undocumented,\n"
+ " public Templ<int>\n"
+ "{\n"
+ " private:\n"
+ " Used *m_usedClass;\n"
+ "};\n"
+ "\\endcode\n"
+ "This will result in the following graph:"
+ "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center></p>\n"
+ "<p>\n"
+ "The boxes in the above graph have the following meaning:\n"
+ "</p>\n"
+ "<ul>\n"
+ "<li>%A filled gray box represents the struct or class for which the "
+ "graph is generated.</li>\n"
+ "<li>%A box with a black border denotes a documented struct or class.</li>\n"
+ "<li>%A box with a grey border denotes an undocumented struct or class.</li>\n"
+ "<li>%A box with a red border denotes a documented struct or class for"
+ "which not all inheritance/containment relations are shown. %A graph is "
+ "truncated if it does not fit within the specified boundaries.</li>\n"
+ "</ul>\n"
+ "<p>\n"
+ "The arrows have the following meaning:\n"
+ "</p>\n"
+ "<ul>\n"
+ "<li>%A dark blue arrow is used to visualize a public inheritance "
+ "relation between two classes.</li>\n"
+ "<li>%A dark green arrow is used for protected inheritance.</li>\n"
+ "<li>%A dark red arrow is used for private inheritance.</li>\n"
+ "<li>%A purple dashed arrow is used if a class is contained or used "
+ "by another class. The arrow is labeled with the variable(s) "
+ "through which the pointed class or struct is accessible.</li>\n"
+ "<li>%A yellow dashed arrow denotes a relation between a template instance and "
+ "the template class it was instantiated from. The arrow is labeled with "
+ "the template parameters of the instance.</li>\n"
+ "</ul>\n";
+ }
+ /*! text for the link to the legend page */
+ virtual QCString trLegend()
+ {
+ return "leģenda";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a test item */
+ virtual QCString trTest()
+ {
+ return "Testi";
+ }
+ /*! Used as the header of the test list */
+ virtual QCString trTestList()
+ {
+ return "Testu saraksts";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for KDE-2 IDL methods */
+ virtual QCString trDCOPMethods()
+ {
+ return "DCOP elementu funkcijas";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for IDL properties */
+ virtual QCString trProperties()
+ {
+ return "Rekvizīti";
+ }
+ /*! Used as a section header for IDL property documentation */
+ virtual QCString trPropertyDocumentation()
+ {
+ return "Rekvizītu dokumentācija";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.4
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used for Java classes in the summary section of Java packages */
+ virtual QCString trClasses()
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Datu struktūras";
+ }
+ else
+ {
+ return "Klases";
+ }
+ }
+ /*! Used as the title of a Java package */
+ virtual QCString trPackage(const char *name)
+ {
+ return (QCString)"Pakotne "+name;
+ }
+ /*! Title of the package index page */
+ virtual QCString trPackageList()
+ {
+ return "Pakotņu saraksts";
+ }
+ /*! The description of the package index page */
+ virtual QCString trPackageListDescription()
+ {
+ return "Here are the packages with brief descriptions (if available):";
+ }
+ /*! The link name in the Quick links header for each page */
+ virtual QCString trPackages()
+ {
+ return "Pakotnes";
+ }
+ /*! Text shown before a multi-line define */
+ virtual QCString trDefineValue()
+ {
+ return "Vērtība:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a \\bug item */
+ virtual QCString trBug()
+ {
+ return "Kļūda";
+ }
+ /*! Used as the header of the bug list */
+ virtual QCString trBugList()
+ {
+ return "Kļūdu saraksts";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! 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
+ * ------------------------------------------------------
+ * DEFAULT_CHARSET 1 (x01)
+ * SYMBOL_CHARSET 2 (x02)
+ * OEM_CHARSET 255 (xFF)
+ * ANSI_CHARSET 0 (x00) 1252
+ * RUSSIAN_CHARSET 204 (xCC) 1251
+ * EE_CHARSET 238 (xEE) 1250
+ * GREEK_CHARSET 161 (xA1) 1253
+ * TURKISH_CHARSET 162 (xA2) 1254
+ * BALTIC_CHARSET 186 (xBA) 1257
+ * HEBREW_CHARSET 177 (xB1) 1255
+ * ARABIC _CHARSET 178 (xB2) 1256
+ * SHIFTJIS_CHARSET 128 (x80) 932
+ * HANGEUL_CHARSET 129 (x81) 949
+ * GB2313_CHARSET 134 (x86) 936
+ * CHINESEBIG5_CHARSET 136 (x88) 950
+ * </pre>
+ *
+ */
+ virtual QCString trRTFansicp()
+ {
+ return "1257";
+ }
+
+
+ /*! Used as ansicpg for RTF fcharset
+ * \see trRTFansicp() for a table of possible values.
+ */
+ virtual QCString trRTFCharSet()
+ {
+ return "186";
+ }
+
+ /*! Used as header RTF general index */
+ virtual QCString trRTFGeneralIndex()
+ {
+ return "Indekss";
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trClass(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Klase" : "klase"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trFile(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Fail" : "fail"));
+ if (singular) result+="s"; else result+="i";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trNamespace(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Nosaukumvieta" : "nosaukumvieta"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trGroup(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Grupa" : "grupa"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trPage(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Lapa" : "lapa"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trMember(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Element" : "element"));
+ if (singular) result+="s"; else result+="i";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trGlobal(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Globāl" : "globāl"));
+ if (singular) result+="ais"; else result+="ie";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.7
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is generated when the \\author command is used and
+ * for the author section in man pages. */
+ virtual QCString trAuthor(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Autor" : "autor"));
+ if (singular) result+="s"; else result+="i";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.11
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is put before the list of members referenced by a member
+ */
+ virtual QCString trReferences()
+ {
+ return "Atsauces";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.13
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are implemented by this one.
+ */
+ virtual QCString trImplementedFromList(int numEntries)
+ {
+ return "Īsteno "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in member documentation blocks to produce a list of
+ * all members that implement this abstract member.
+ */
+ virtual QCString trImplementedInList(int numEntries)
+ {
+ return "Īstenots "+trWriteList(numEntries)+".";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.16
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in RTF documentation as a heading for the Table
+ * of Contents.
+ */
+ virtual QCString trRTFTableOfContents()
+ {
+ return "Satura rādītājs";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.17
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as the header of the list of item that have been
+ * flagged deprecated
+ */
+ virtual QCString trDeprecatedList()
+ {
+ return "Novecojušo saraksts";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.18
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a header for declaration section of the events found in
+ * a C# program
+ */
+ virtual QCString trEvents()
+ {
+ return "Notikumi";
+ }
+ /*! Header used for the documentation section of a class' events. */
+ virtual QCString trEventDocumentation()
+ {
+ return "Notikumu dokumentācija";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a heading for a list of Java class types with package scope.
+ */
+ virtual QCString trPackageTypes()
+ {
+ return "Pakas tipi";
+ }
+ /*! Used as a heading for a list of Java class functions with package
+ * scope.
+ */
+ virtual QCString trPackageMembers()
+ {
+ return "Pakas funkcijas";
+ }
+ /*! Used as a heading for a list of static Java class functions with
+ * package scope.
+ */
+ virtual QCString trStaticPackageMembers()
+ {
+ return "Statiskās pakas funkcijas";
+ }
+ /*! Used as a heading for a list of Java class variables with package
+ * scope.
+ */
+ virtual QCString trPackageAttribs()
+ {
+ return "Pakas atribūti";
+ }
+ /*! Used as a heading for a list of static Java class variables with
+ * package scope.
+ */
+ virtual QCString trStaticPackageAttribs()
+ {
+ return "Statiskie pakas atribūti";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used in the quick index of a class/file/namespace member list page
+ * to link to the unfiltered list of all members.
+ */
+ virtual QCString trAll()
+ {
+ return "Visi";
+ }
+ /*! Put in front of the call graph for a function. */
+ virtual QCString trCallGraph()
+ {
+ return "Šeit ir visu funkciju izsaugumu grafs:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! When the search engine is enabled this text is put in the header
+ * of each page before the field where one can enter the text to search
+ * for.
+ */
+ virtual QCString trSearchForIndex()
+ {
+ return "Meklēt";
+ }
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ {
+ return "Meklēšanas rezultāti";
+ }
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
+ {
+ return "Netika atrasts neviens dokuments.";
+ }
+ else if (numDocuments==1)
+ {
+ return "Atrasts <b>1</b> dokuments.";
+ }
+ else
+ {
+ return "Atrasti <b>$num</b> Dokumenti. "
+ "Sākumā attēlo tos, kas atbilst visprecīzāk.";
+ }
+ }
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ {
+ return "Atbilst meklētajam:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return filename + " pirmkoda fails";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Direktoriju struktūra"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Direktorijas dokumentācija"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of an HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Direktorijas"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Šī direktoriju hierarhija ir aptuveni, "
+ "bet ne pilnībā, alfabēta secībā:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result="Direktorijas "; result+=dirName; result+=" atsauce"; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Direktorija" : "direktorija"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is added to the documentation when the \\overload command
+ * is used for a overloaded function.
+ */
+ virtual QCString trOverloadText()
+ {
+ return "Šī ir elementa pārslogota funkcija, kas "
+ "parādīta tikai informātīvo nolūkos. Tā atšķiras no iepriekšapraksītās "
+ "funkcijas tikai ar parametriem, ko tā saņem.";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used to introduce a caller (or called-by) graph */
+ virtual QCString trCallerGraph()
+ {
+ return "Šeit ir šīs funkcijas izsaukuma grafs:";
+ }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration values
+ */
+ virtual QCString trEnumerationValueDocumentation()
+ { return "Uzskaitījumliterāļa dokumentācija"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.5.4 (mainly for Fortran)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! header that is put before the list of member subprograms (Fortran). */
+ virtual QCString trMemberFunctionDocumentationFortran()
+ { return "Elementa funckijas/apakšrutīnas dokumentācija"; }
+
+ /*! This is put above each page as a link to the list of annotated data types (Fortran). */
+ virtual QCString trCompoundListFortran()
+ { return "Datu tipu saraksts"; }
+
+ /*! This is put above each page as a link to all members of compounds (Fortran). */
+ virtual QCString trCompoundMembersFortran()
+ { return "Datu lauki"; }
+
+ /*! This is an introduction to the annotated compound list (Fortran). */
+ virtual QCString trCompoundListDescriptionFortran()
+ { return "Šeit ir visu datu tipu saraksts ar īsu aprakstu:"; }
+
+ /*! This is an introduction to the page with all data types (Fortran). */
+ virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
+ {
+ QCString result="Šeit ir visu ";
+ if (!extractAll)
+ {
+ result+="dokumentēto ";
+ }
+ result+="datu tipu saraksts";
+ result+=" ar saitēm uz ";
+ if (!extractAll)
+ {
+ result+="datu struktūras dokumentāciju katram elementam:";
+ }
+ else
+ {
+ result+="datu tipiem, kam tie pieder:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index (Fortran).
+ */
+ virtual QCString trCompoundIndexFortran()
+ { return "Datu tipu indekss"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all data types (Fortran).
+ */
+ virtual QCString trTypeDocumentation()
+ { return "Datu tipa dokumentācija"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) subprograms (Fortran).
+ */
+ virtual QCString trSubprograms()
+ { return "Funkcijas/Apakšrutīnas"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for subprograms (Fortran)
+ */
+ virtual QCString trSubprogramDocumentation()
+ { return "Funkcijas/Apakšrutīnas dokumentācija"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds (Fortran)
+ */
+ virtual QCString trDataTypes()
+ { return "Datu tipi"; }
+
+ /*! used as the title of page containing all the index of all modules (Fortran). */
+ virtual QCString trModulesList()
+ { return "Moduļu saraksts"; }
+
+ /*! used as an introduction to the modules list (Fortran) */
+ virtual QCString trModulesListDescription(bool extractAll)
+ {
+ QCString result="Šeit ir visu ";
+ if (!extractAll) result+="dokumentēto ";
+ result+="moduļu saraksts ar īsu aprakstu:";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a module/type (Fortran) */
+ virtual QCString trCompoundReferenceFortran(const char *clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=(QCString)clName;
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" moduļa"; break;
+ case ClassDef::Struct: result+=" tipa"; break;
+ case ClassDef::Union: result+=" apvienojuma"; break;
+ case ClassDef::Interface: result+=" interfeisa"; break;
+ case ClassDef::Protocol: result+=" protokola"; break;
+ case ClassDef::Category: result+=" kategorijas"; break;
+ case ClassDef::Exception: result+=" izņēmuma"; break;
+ }
+ if (isTemplate) result+=" sagataves";
+ result+=" atsauce";
+ return result;
+ }
+ /*! used as the title of the HTML page of a module (Fortran) */
+ virtual QCString trModuleReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" moduļu atsauce";
+ return result;
+ }
+
+ /*! This is put above each page as a link to all members of modules. (Fortran) */
+ virtual QCString trModulesMembers()
+ { return "Moduļa elementi"; }
+
+ /*! This is an introduction to the page with all modules members (Fortran) */
+ virtual QCString trModulesMemberDescription(bool extractAll)
+ {
+ QCString result="Šeit ir visu ";
+ if (!extractAll) result+="dokumentēto ";
+ result+="moduļa elementu saraksts ar saitēm uz ";
+ if (extractAll)
+ {
+ result+="moduļa dokumentāciju katram elementam:";
+ }
+ else
+ {
+ result+="moduļiem, kuriem tie pieder:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all modules (Fortran).
+ */
+ virtual QCString trModulesIndex()
+ { return "Moduļu indekss"; }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trModule(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Modu" : "modu"));
+ if (singular) result+="lis"; else result+="ļi";
+ return result;
+ }
+
+ /*! This is put at the bottom of a module documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType,
+ bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Dokumentācija š";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="im modulim"; break;
+ case ClassDef::Struct: result+="im tipam"; break;
+ case ClassDef::Union: result+="im apvienojumam"; break;
+ case ClassDef::Interface: result+="im interfeisam"; break;
+ case ClassDef::Protocol: result+="im protokolam"; break;
+ case ClassDef::Category: result+="ai kategorijai"; break;
+ case ClassDef::Exception: result+="im izņēmumam"; break;
+ }
+ result+=" tika ģenerēta no fail";
+ if (single) result+="a:"; else result+="iem:";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trType(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Tip" : "tip"));
+ if (singular) result+="s"; else result+="i";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trSubprogram(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Apakšprogramma" : "apakšprogramma"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+ /*! C# Type Constraint list */
+ virtual QCString trTypeConstraints()
+ {
+ return "Tipa ierobežojumi";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.0 (mainly for the new search engine)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! directory relation for \a name */
+ virtual QCString trDirRelation(const char *name)
+ {
+ return QCString(name)+" relācija";
+ }
+
+ /*! Loading message shown when loading search results */
+ virtual QCString trLoading()
+ {
+ return "Tiek veikta ielāde...";
+ }
+
+ /*! Label used for search results in the global namespace */
+ virtual QCString trGlobalNamespace()
+ {
+ return "Global Namespace";
+ }
+
+ /*! Message shown while searching */
+ virtual QCString trSearching()
+ {
+ return "Meklē...";
+ }
+
+ /*! Text shown when no search results are found */
+ virtual QCString trNoMatches()
+ {
+ return "Nav atbilstību";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.3 (missing items for the directory pages)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! introduction text for the directory dependency graph */
+ virtual QCString trDirDependency(const char *name)
+ {
+ return (QCString)"Direktoriju atkarību grafs priekš "+name;
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the first column mentions the
+ * source file that has a relation to another file.
+ */
+ virtual QCString trFileIn(const char *name)
+ {
+ return (QCString)"File in "+name;
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the second column mentions the
+ * destination file that is included.
+ */
+ virtual QCString trIncludesFileIn(const char *name)
+ {
+ return (QCString)"Includes file in "+name;
+ }
+
+ /** Compiles a date string.
+ * @param year Year in 4 digits
+ * @param month Month of the year: 1=January
+ * @param day Day of the Month: 1..31
+ * @param dayOfWeek Day of the week: 1=Monday..7=Sunday
+ * @param hour Hour of the day: 0..23
+ * @param minutes Minutes in the hour: 0..59
+ * @param seconds Seconds within the minute: 0..59
+ * @param includeTime Include time in the result string?
+ */
+ virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
+ int hour,int minutes,int seconds,
+ bool includeTime)
+ {
+ static const char *days[] = { "Pirm","Otr","Tr","Cet","Piekt","Sest","Sv" };
+ static const char *months[] = { "Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sept","Okt","Nov","Dec" };
+ QCString sdate;
+ sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
+ sdate+=stime;
+ }
+ return sdate;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.7.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Header for the page with bibliographic citations */
+ virtual QCString trCiteReferences()
+ { return "Bibliogrāfiskās atsauces"; }
+
+ /*! Text for copyright paragraph */
+ virtual QCString trCopyright()
+ { return "Autortiesības"; }
+
+ /*! Header for the graph showing the directory dependencies */
+ virtual QCString trDirDepGraph(const char *name)
+ { return QCString("Atkarību grafs direktorijai ")+name+":"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Detail level selector shown for hierarchical indices */
+ virtual QCString trDetailLevel()
+ { return "detalizācijas līmenis"; }
+
+ /*! Section header for list of template parameters */
+ virtual QCString trTemplateParameters()
+ { return "Sagataves parametri"; }
+
+ /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
+ virtual QCString trAndMore(const QCString &number)
+ { return "un vēl "+number+"..."; }
+
+ /*! Used file list for a Java enum */
+ virtual QCString trEnumGeneratedFromFiles(bool single)
+ { QCString result = "Dokumentācija šim uzskaitījumliterālim tika ģenerēta no sekojoš";
+ if (single) result+="a"; else result += "iem";
+ result+=" fail";
+ if (single) result+="a"; else result += "iem";
+ result+=":";
+ return result;
+ }
+
+ /*! Header of a Java enum page (Java enums are represented as classes). */
+ virtual QCString trEnumReference(const char *name)
+ { return QCString(name)+" uzskaitījumliterāļa atsauce"; }
+
+ /*! Used for a section containing inherited members */
+ virtual QCString trInheritedFrom(const char *members,const char *what)
+ { return QCString(members)+" manto no "+what; }
+
+ /*! Header of the sections with inherited members specific for the
+ * base class(es)
+ */
+ virtual QCString trAdditionalInheritedMembers()
+ { return "Papildus mantotie elementi"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "iespējotu" : "atspējotu";
+ return "uzklikšķināt, lai "+opt+" paneļu sinhronizāciju";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ {
+ return "Nodrošina kategorija @1.";
+ }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ {
+ return "Paplašina klasi @1.";
+ }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ {
+ return "Klases metodes";
+ }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ {
+ return "Instances metodes";
+ }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ {
+ return "Metožu dokumentācija";
+ }
+
+ /*! Used as the title of the design overview picture created for the
+ * VHDL output.
+ */
+ virtual QCString trDesignOverview()
+ {
+ return "Dizaina pārskats";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+
+};
+
+#endif
diff --git a/src/util.cpp b/src/util.cpp
index 8e26261..bfce13d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6166,9 +6166,12 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
if (tagInfo)
{
pd->setReference(tagInfo->tagName);
+ pd->setFileName(tagInfo->fileName);
+ }
+ else
+ {
+ pd->setFileName(convertNameToFile(pd->name(),FALSE,TRUE));
}
-
- pd->setFileName(convertNameToFile(pd->name(),FALSE,TRUE));
//printf("Appending page `%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pd);
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index 5806149..0fd9185 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -1573,7 +1573,7 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString
{
setParameterList(memberDef);
}
- int iLine=countLines();
+ /*int iLine=*/countLines();
vhdlcodeYYrestart( vhdlcodeYYin );
BEGIN( Bases );
vhdlcodeYYlex();
@@ -1588,7 +1588,7 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString
delete g_sourceFileDef;
g_sourceFileDef=0;
}
- assert(g_yyLineNr==iLine);
+
return;
}
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 3024747..296031d 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -2901,18 +2901,18 @@ void assignBinding(VhdlConfNode * conf)
entBind=conf->binding;
QCString conf2=VhdlDocGen::parseForBinding(entBind,arcBind);
- if (conf2=="configuration")
+ if (qstricmp(conf2,"configuration")==0)
{
QList<VhdlConfNode> confList = getVhdlConfiguration();
VhdlConfNode* vconf;
- bool found=false;
+ // bool found=false;
for (uint iter=0;iter<confList.count(); iter++)
{
vconf= (VhdlConfNode *)confList.at(iter);
QCString n=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),0);
if (n==entBind)
{
- found=true;
+ // found=true;
entBind=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),1);
QCString a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0);
QCString e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1);
@@ -2922,18 +2922,22 @@ void assignBinding(VhdlConfNode * conf)
break;
}
}
- if (!found)
+ }
+ else // conf2!=configuration
+ {
+ QCString a,c,e;
+ if (conf->isInlineConf)
{
- err("error: %s%s",conf->binding.data()," could not be found");
+ c=conf->confVhdl;
+ e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),0);
}
- //return;
- }// if
- else
- { // find entity work.entname(arch?)
- QCString a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0);
- QCString e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1);
- a=e+"::"+a;
- archClass= VhdlDocGen::findVhdlClass(a.data());//Doxygen::classSDict->find(a.data());
+ else
+ {
+ a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0);
+ e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1);
+ c=e+"::"+a;
+ }
+ archClass= VhdlDocGen::findVhdlClass(c.data());//Doxygen::classSDict->find(a.data());
entClass= VhdlDocGen::findVhdlClass(e.data()); //Doxygen::classSDict->find(e.data());
}
@@ -2942,7 +2946,7 @@ void assignBinding(VhdlConfNode * conf)
if (!archClass)
{
- err("\n error:architecture %s not found ! ",conf->confVhdl.data());
+ // err("\n error:architecture %s not found ! ",conf->confVhdl.data());
return;
}
@@ -2951,27 +2955,30 @@ void assignBinding(VhdlConfNode * conf)
all=allOt.lower()=="all" ;
others= allOt.lower()=="others";
- for (;(cur=eli.current());++eli){
-
+ for (;(cur=eli.current());++eli)
+ {
if (cur->exception.lower()==label || conf->isInlineConf)
{
QCString sign,archy;
if (all || others)
+ {
archy=VhdlDocGen::getIndexWord(conf->arch.data(),1);
+ }
else
+ {
archy=conf->arch;
-
+ }
QCString inst1=VhdlDocGen::getIndexWord(archy.data(),0).lower();
QCString comp=VhdlDocGen::getIndexWord(archy.data(),1).lower();
QStringList ql=QStringList::split(",",inst1);
- for(uint j=0;j<ql.count();j++)
+ for (uint j=0;j<ql.count();j++)
{
QCString archy1,sign1;
- if(all || others)
+ if (all || others)
{
archy1=VhdlDocGen::getIndexWord(conf->arch.data(),1);
sign1=cur->type;
@@ -2998,12 +3005,10 @@ void assignBinding(VhdlConfNode * conf)
}
}// for
}
- }//for
+ }//for each element in instList
}//assignBinding
-
-
/*
// file foo.vhd
@@ -3016,7 +3021,7 @@ void assignBinding(VhdlConfNode * conf)
// ........
// end architecture
- */
+*/
void VhdlDocGen::computeVhdlComponentRelations()
{
@@ -3027,7 +3032,9 @@ void VhdlDocGen::computeVhdlComponentRelations()
{
VhdlConfNode* conf= (VhdlConfNode *)confList.at(iter);
if (!(conf->isInlineConf || conf->isLeaf))
+ {
continue;
+ }
assignBinding(conf);
}
@@ -3038,7 +3045,9 @@ void VhdlDocGen::computeVhdlComponentRelations()
for (eli.toFirst();(cur=eli.current());++eli)
{
if (cur->stat ) // was bind
+ {
continue;
+ }
if (cur->includeName=="entity" || cur->includeName=="component" )
{
@@ -3055,10 +3064,13 @@ void VhdlDocGen::computeVhdlComponentRelations()
ClassDef *cd=Doxygen::classSDict->find(inst);
ClassDef *ar=Doxygen::classSDict->find(cur->args);
- if (cd==0) continue;
+ if (cd==0)
+ {
+ continue;
+ }
- if (classEntity==0)
- err("error: %s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
+ // if (classEntity==0)
+ // err("error: %s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
addInstance(classEntity,ar,cd,cur);
}
@@ -3103,7 +3115,7 @@ static void addInstance(ClassDef* classEntity, ClassDef* ar,
ferr:
QCString uu=cur->name;
MemberDef *md=new MemberDef(
- ar->getDefFileName(), cur->startLine,
+ ar->getDefFileName(), cur->startLine,cur->startColumn,
n1,uu,uu, 0,
Public, Normal, cur->stat,Member,
MemberType_Variable,
@@ -3129,6 +3141,7 @@ ferr:
FileDef *fd=ar->getFileDef();
md->setBodyDef(fd);
+#if 0
QCString info="Info: Elaborating entity "+n1;
fd=ar->getFileDef();
info+=" for hierarchy ";
@@ -3137,6 +3150,8 @@ ferr:
label.replace(epr,":");
info+=label;
fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data());
+#endif
+
ar->insertMember(md);
}
@@ -3158,8 +3173,7 @@ void VhdlDocGen::writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDe
void VhdlDocGen::writeRecUnitDocu(
const MemberDef *md,
OutputList& ol,
- QCString largs
- )
+ QCString largs)
{
QStringList ql=QStringList::split("#",largs,FALSE);
@@ -3430,6 +3444,43 @@ QList<FlowChart> FlowChart::flowList;
static QMap<QCString,int> keyMap;
#endif
+void alignText(QCString & q)
+{
+ if (q.length()<=80) return;
+
+ if (q.length()>200)
+ {
+ q.resize(200);
+ }
+
+ q.append(" ...");
+
+ QRegExp reg("[\\s|]");
+ QCString str(q.data());
+ QCString temp;
+
+ while (str.length()>80)
+ {
+ int j=str.findRev(reg,80);
+ if (j<=0)
+ {
+ temp+=str;
+ q=temp;
+ return;
+ }
+ else
+ {
+ QCString qcs=str.left(j);
+ temp+=qcs+"\\";
+ temp+="n";
+ str.remove(0,j);
+ }
+ }//while
+
+ q=temp+str;
+// #endif
+}
+
void FlowChart::printNode(const FlowChart* flo)
{
if (flo==0) return;
@@ -3518,7 +3569,7 @@ void FlowChart::colTextNodes()
{
flno->text+=flo->text;
flowList.remove(flo);
- if (j>0)j=j-1;
+ if (j>0) j=j-1;
}
found=TRUE;
}
@@ -3644,10 +3695,13 @@ void FlowChart::buildCommentNodes(FTextStream & t)
// comment between function/process .. begin is linked to start node
to=flowList.at(0);
}
- else
- {
- to=flowList.at(j+1);
- }
+ else
+ {
+ if (j>0 && flowList.at(j-1)->line==fll->line)
+ to=flowList.at(j-1);
+ else
+ to=flowList.at(j+1);
+ }
t << getNodeName(fll->id);
t << "[shape=none, label=<\n";
t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
@@ -3725,7 +3779,7 @@ FlowChart::FlowChart(int typ,const char * t,const char* ex,const char* lab)
if (typ & (START_NO | END_NO | VARIABLE_NO))
{
- stamp=-1;
+ stamp=0;
}
id=nodeCounter++;
@@ -3754,10 +3808,7 @@ void FlowChart::addFlowChart(int type,const char* text,const char* exp, const ch
FlowChart *fl=new FlowChart(type,typeString.data(),expression.data(),label);
-#ifdef DEBUGFLOW
- VhdlContainer* vc= getVhdlCont();
- fl->line=vc->yyLineNr;
-#endif
+ fl->line=getVhdlCont()->yyLineNr;
if (type & (START_NO | VARIABLE_NO))
{
@@ -3931,6 +3982,9 @@ void FlowChart::writeShape(FTextStream &t,const FlowChart* fl)
}
if (dec)
{
+ QCString exp=fl->exp;
+ alignText(exp);
+
t << " [shape=diamond,style=filled,color=\"";
t << flowCol.decisionNode;
t << "\",label=\" ";
@@ -3939,11 +3993,11 @@ void FlowChart::writeShape(FTextStream &t,const FlowChart* fl)
if (fl->label)
{
- kl+=fl->label+":"+fl->exp+var;
+ kl+=fl->label+":"+exp+var;
}
else
{
- kl+=fl->exp+var;
+ kl+=exp+var;
}
FlowChart::alignCommentNode(t,kl);
@@ -4274,6 +4328,14 @@ void FlowChart::writeFlowLinks(FTextStream &t)
}
else if (kind & WHEN_NO)
{
+ // default value
+ if (qstricmp(fll->text.simplifyWhiteSpace().data(),"others")==0)
+ {
+ writeEdge(t,fll,flowList.at(j+1),2);
+ continue;
+ }
+
+
writeEdge(t,fll,flowList.at(j+1),0);
int u=findNode(j,stamp,WHEN_NO);
int v=findNode(j,stamp-1,END_CASE);
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index e6a720c..03c37e6 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -259,6 +259,11 @@ class VhdlDocGen
static void writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDef *mdef);
};
+//-------------------------------------------------------------------------------------------------------------------
+//-------------- VHDL Flowcharts -------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------------------------
+
+
//#define DEBUGFLOW
class FlowChart
@@ -333,9 +338,7 @@ private:
int stamp;
int type;
-#ifdef DEBUGFLOW
int line;
-#endif
QCString label;
QCString text;
diff --git a/src/vhdlparser.y b/src/vhdlparser.y
index 776ac7e..785451b 100644
--- a/src/vhdlparser.y
+++ b/src/vhdlparser.y
@@ -726,7 +726,6 @@ subprog_spec : t_FUNCTION designator
subprog_spec_2 t_RETURN mark
{
tempEntry=current;
- current->bodyLine=getParsedLine(t_FUNCTION);
current->type=$6;
newEntry();
@@ -940,7 +939,7 @@ relation: relation t_LESym relation { $$=$1+" <= "+$3; }
relation: relation t_GESym relation { $$=$1+" >= "+$3; }
relation: relation t_LTSym relation { $$=$1+" < "+$3; }
relation: relation t_GTSym relation { $$=$1+" > "+$3; }
-relation: relation t_EQSym relation { $$=$1+" == "+$3; }
+relation: relation t_EQSym relation { $$=$1+" = "+$3; }
relation: relation t_NESym relation { $$=$1+" != "+$3; }
relation: relation t_Slash relation { $$=$1+" / "+$3; }
relation: relation t_QNEQU relation { $$=$1+" ?/= "+$3; }
@@ -1569,7 +1568,14 @@ procs_stat1: procs_stat1_5
current->startLine=s_str.yyLineNr;
current->bodyLine=s_str.yyLineNr;
}
- t_PROCESS procs_stat1_1 procs_stat1_2 t_BEGIN seq_stats t_END
+ t_PROCESS procs_stat1_1 procs_stat1_2
+ {
+ if ($5.data())
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,$5.data(),0);
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ }
+ t_BEGIN seq_stats t_END
+
procs_stat1_3 t_Semicolon
{
$5.stripPrefix($4.data());
@@ -1663,8 +1669,9 @@ case_stat : lable t_CASE choice_stat expr
}
t_IS case_stat_alternative case_stat_1 t_END t_CASE choice_stat_1 t_Semicolon
{
- FlowChart::addFlowChart(FlowChart::END_CASE,0,0);
FlowChart::moveToPrevLevel();
+
+ FlowChart::addFlowChart(FlowChart::END_CASE,0,0);
}
case_stat : t_CASE error t_END t_CASE choice_stat_1 t_Semicolon { $$=""; }
@@ -1675,7 +1682,7 @@ case_stat_alternative : t_WHEN choices t_Arrow
{
QCString t="when ";
t+=$2+"=> ";
- FlowChart::addFlowChart(FlowChart::WHEN_NO,0,t);
+ FlowChart::addFlowChart(FlowChart::WHEN_NO,$2.data(),t);
}
seq_stats { $$=""; FlowChart::moveToPrevLevel(); }
@@ -1697,10 +1704,9 @@ if_stat_2 : t_ELSE
{
FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
}
- seq_stats
- {
- $$=""; FlowChart::moveToPrevLevel();
- }
+ seq_stats { $$=""; }
+
+
if_stat_1 : /* empty */ { $$=""; }
@@ -2242,8 +2248,8 @@ extern YYSTYPE vhdlScanYYlval;
void vhdlScanYYerror(const char* /*str*/)
{
- // fprintf(stderr,"\n<---error at line %d : [ %s] in file : %s ---->",s_str.yyLineNr,s_str.qstr.data(),s_str.fileName);
- // exit(0);
+ // fprintf(stderr,"\n<---error at line %d : [ %s] in file : %s ---->",s_str.yyLineNr,s_str.qstr.data(),s_str.fileName);
+ // exit(0);
}
void vhdlParse()
@@ -2321,7 +2327,7 @@ static QCString popLabel(QCString & q)
static void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf)
{
- VhdlConfNode* co;
+ VhdlConfNode* co=0;
QCString ent,arch,lab;
QCString l=genLabels;
ent=a;
@@ -2338,7 +2344,9 @@ static void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool i
{
VhdlConfNode* vc=configL.last();
level=vc->level;
- if (level<levelCounter)
+ if (levelCounter==0)
+ pushLabel(forL,ent);
+ else if (level<levelCounter)
{
if (!isLeaf)
{
@@ -2439,7 +2447,7 @@ static void addProto(const char *s1,const char *s2,const char *s3,
static void createFunction(const QCString &impure,int spec,
const QCString &fname)
{
- int it=0;
+
current->spec=spec;
current->section=Entry::FUNCTION_SEC;
@@ -2458,17 +2466,15 @@ static void createFunction(const QCString &impure,int spec,
{
current->name=impure;
current->exception="";
- it=t_PROCEDURE;
}
else
{
current->name=fname;
- it=t_FUNCTION;
}
if (spec==VhdlDocGen::PROCESS)
{
- it=t_PROCESS;
+
current->args=fname;
current->name=impure;
VhdlDocGen::deleteAllChars(current->args,' ');
@@ -2485,8 +2491,9 @@ static void createFunction(const QCString &impure,int spec,
return;
}
- current->startLine=getParsedLine(it);
- current->bodyLine=getParsedLine(it);
+ current->startLine=s_str.iLine;
+ current->bodyLine=s_str.iLine;
+
}
static void addVhdlType(const QCString &name,int startLine,int section,int spec,
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l
index 54ad209..f844bc1 100644
--- a/src/vhdlscanner.l
+++ b/src/vhdlscanner.l
@@ -543,7 +543,7 @@ BR [ \t\n\r]
. { /* unknown characters */ }
-<*>{BR}*"--!"[^{}\n][^\n]*\n/{B}*"--!" { // multi line comment
+<*>{BR}*"--!"[^{}\n]*[^\n]*\n/{B}*"--!" { // multi line comment
if (iDocLine==-1) iDocLine=yyLineNr;
QCString qc(vhdlScanYYtext);
int len=qc.contains('\n')+yyLineNr-1;
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 23382e8..dcc40e1 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -283,6 +283,11 @@ void XmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::XmlOnly:
m_t << s->text();
break;
+ case DocVerbatim::DocbookOnly:
+ m_t << "<docbookonly>";
+ filter(s->text());
+ m_t << "</docbookonly>";
+ break;
case DocVerbatim::Dot:
m_t << "<dot>";
filter(s->text());
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index b04fb5a..3f86e53 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -221,59 +221,6 @@ class TextGeneratorXMLImpl : public TextGeneratorIntf
FTextStream &m_t;
};
-/** Helper class representing a stack of objects stored by value */
-template<class T> class ValStack
-{
- public:
- ValStack() : m_values(10), m_sp(0), m_size(10) {}
- virtual ~ValStack() {}
- ValStack(const ValStack<T> &s)
- {
- m_values=s.m_values.copy();
- m_sp=s.m_sp;
- m_size=s.m_size;
- }
- ValStack &operator=(const ValStack<T> &s)
- {
- m_values=s.m_values.copy();
- m_sp=s.m_sp;
- m_size=s.m_size;
- return *this;
- }
- void push(T v)
- {
- m_sp++;
- if (m_sp>=m_size)
- {
- m_size+=10;
- m_values.resize(m_size);
- }
- m_values[m_sp]=v;
- }
- T pop()
- {
- ASSERT(m_sp!=0);
- return m_values[m_sp--];
- }
- T& top()
- {
- ASSERT(m_sp!=0);
- return m_values[m_sp];
- }
- bool isEmpty()
- {
- return m_sp==0;
- }
- uint count() const
- {
- return m_sp;
- }
-
- private:
- QArray<T> m_values;
- int m_sp;
- int m_size;
-};
/** Generator for producing XML formatted source code. */
class XMLCodeGenerator : public CodeOutputInterface
@@ -979,7 +926,8 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
{
t << " <location file=\""
<< md->getDefFileName() << "\" line=\""
- << md->getDefLine() << "\"";
+ << md->getDefLine() << "\"" << " column=\""
+ << md->getDefColumn() << "\"" ;
if (md->getStartBodyLine()!=-1)
{
FileDef *bodyDef = md->getBodyDef();
@@ -1434,7 +1382,8 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti)
}
t << " <location file=\""
<< cd->getDefFileName() << "\" line=\""
- << cd->getDefLine() << "\"";
+ << cd->getDefLine() << "\"" << " column=\""
+ << cd->getDefColumn() << "\"" ;
if (cd->getStartBodyLine()!=-1)
{
FileDef *bodyDef = cd->getBodyDef();
@@ -1526,9 +1475,10 @@ static void generateXMLForNamespace(NamespaceDef *nd,FTextStream &ti)
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,nd->docFile(),nd->docLine(),nd,0,nd->documentation());
t << " </detaileddescription>" << endl;
- t << " <location file=\""
- << nd->getDefFileName() << "\" line=\""
- << nd->getDefLine() << "\"/>" << endl;
+ t << " <location file=\""
+ << nd->getDefFileName() << "\" line=\""
+ << nd->getDefLine() << "\"" << " column=\""
+ << nd->getDefColumn() << "\"/>" << endl ;
t << " </compounddef>" << endl;
t << "</doxygen>" << endl;
@@ -1885,7 +1835,6 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
void generateXML()
{
-
// + classes
// + namespaces
// + files
@@ -1894,42 +1843,6 @@ void generateXML()
// - examples
QCString outputDirectory = Config_getString("XML_OUTPUT");
- if (outputDirectory.isEmpty())
- {
- outputDirectory=QDir::currentDirPath().utf8();
- }
- else
- {
- QDir dir(outputDirectory);
- if (!dir.exists())
- {
- dir.setPath(QDir::currentDirPath());
- if (!dir.mkdir(outputDirectory))
- {
- err("error: tag XML_OUTPUT: Output directory `%s' does not "
- "exist and cannot be created\n",outputDirectory.data());
- exit(1);
- }
- else if (!Config_getBool("QUIET"))
- {
- err("notice: Output directory `%s' does not exist. "
- "I have created it for you.\n", outputDirectory.data());
- }
- dir.cd(outputDirectory);
- }
- outputDirectory=dir.absPath().utf8();
- }
-
- QDir dir(outputDirectory);
- if (!dir.exists())
- {
- dir.setPath(QDir::currentDirPath());
- if (!dir.mkdir(outputDirectory))
- {
- err("Cannot create directory %s\n",outputDirectory.data());
- return;
- }
- }
QDir xmlDir(outputDirectory);
createSubDirs(xmlDir);
QCString fileName=outputDirectory+"/index.xsd";
diff --git a/winbuild/Doxygen.vcproj b/winbuild/Doxygen.vcproj
index 7a0e734..6057756 100644
--- a/winbuild/Doxygen.vcproj
+++ b/winbuild/Doxygen.vcproj
@@ -1195,6 +1195,14 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\src\docbookgen.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\docbookvisitor.cpp"
+ >
+ </File>
+ <File
RelativePath="..\src\docparser.cpp"
>
<FileConfiguration
@@ -3159,6 +3167,10 @@
>
</File>
<File
+ RelativePath="..\src\sqlite3gen.cpp"
+ >
+ </File>
+ <File
RelativePath="..\src\tagreader.cpp"
>
<FileConfiguration
@@ -3666,6 +3678,14 @@
>
</File>
<File
+ RelativePath="..\src\docbookgen.h"
+ >
+ </File>
+ <File
+ RelativePath="..\src\docbookvisitor.h"
+ >
+ </File>
+ <File
RelativePath="..\src\docparser.h"
>
</File>