Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
5bd970b1
Commit
5bd970b1
authored
May 08, 2005
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release-1.4.2-20050508
parent
4a8c2f5c
Changes
59
Show whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
1222 additions
and
465 deletions
+1222
-465
INSTALL
INSTALL
+2
-2
README
README
+2
-2
VERSION
VERSION
+1
-1
config.doc
doc/config.doc
+11
-2
install.doc
doc/install.doc
+1
-1
language.doc
doc/language.doc
+3
-3
translator_report.txt
doc/translator_report.txt
+3
-32
example.tag
examples/example.tag
+2
-1
build.sh
packages/rpm/build.sh
+21
-0
doxygen.spec
packages/rpm/doxygen.spec
+6
-9
qcache.h
qtools/qcache.h
+1
-1
scstring.cpp
qtools/scstring.cpp
+15
-0
scstring.h
qtools/scstring.h
+1
-0
classdef.cpp
src/classdef.cpp
+36
-1
code.l
src/code.l
+8
-0
commentscan.l
src/commentscan.l
+15
-1
config.l
src/config.l
+11
-1
definition.cpp
src/definition.cpp
+6
-3
docparser.cpp
src/docparser.cpp
+19
-3
doctokenizer.l
src/doctokenizer.l
+1
-1
doxygen.cpp
src/doxygen.cpp
+155
-23
doxygen.h
src/doxygen.h
+2
-0
doxytag.l
src/doxytag.l
+246
-11
entry.h
src/entry.h
+1
-0
filedef.cpp
src/filedef.cpp
+29
-1
filedef.h
src/filedef.h
+2
-4
groupdef.cpp
src/groupdef.cpp
+11
-1
htags.cpp
src/htags.cpp
+176
-0
htags.h
src/htags.h
+28
-0
htmlgen.cpp
src/htmlgen.cpp
+6
-2
htmlgen.h
src/htmlgen.h
+2
-1
index.cpp
src/index.cpp
+92
-185
language.cpp
src/language.cpp
+6
-0
latexgen.cpp
src/latexgen.cpp
+2
-1
latexgen.h
src/latexgen.h
+1
-1
libdoxygen.pro.in
src/libdoxygen.pro.in
+2
-0
mangen.cpp
src/mangen.cpp
+2
-1
mangen.h
src/mangen.h
+1
-1
memberdef.cpp
src/memberdef.cpp
+35
-12
memberdef.h
src/memberdef.h
+1
-0
namespacedef.cpp
src/namespacedef.cpp
+3
-0
outputgen.h
src/outputgen.h
+2
-1
outputlist.cpp
src/outputlist.cpp
+13
-0
outputlist.h
src/outputlist.h
+6
-2
pagedef.cpp
src/pagedef.cpp
+29
-0
pagedef.h
src/pagedef.h
+3
-0
rtfgen.cpp
src/rtfgen.cpp
+3
-1
rtfgen.h
src/rtfgen.h
+1
-1
scanner.l
src/scanner.l
+1
-5
search.php
src/search.php
+17
-15
search_php.h
src/search_php.h
+17
-15
searchindex.cpp
src/searchindex.cpp
+15
-13
translator_en.h
src/translator_en.h
+2
-2
translator_hu.h
src/translator_hu.h
+1
-1
translator_za.h
src/translator_za.h
+67
-62
util.cpp
src/util.cpp
+67
-36
util.h
src/util.h
+3
-0
xmlgen.cpp
src/xmlgen.cpp
+3
-3
Doxygen.dsp
wintools/Doxygen.dsp
+4
-0
No files found.
INSTALL
View file @
5bd970b1
DOXYGEN Version 1.4.2-20050
421
DOXYGEN Version 1.4.2-20050
508
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (
21 April
2005)
Dimitri van Heesch (
08 May
2005)
README
View file @
5bd970b1
DOXYGEN Version 1.4.2_20050
421
DOXYGEN Version 1.4.2_20050
508
Please read INSTALL for compilation instructions.
...
...
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (
21 April
2005)
Dimitri van Heesch (dimitri@stack.nl) (
08 May
2005)
VERSION
View file @
5bd970b1
1.4.2-20050
421
1.4.2-20050
508
doc/config.doc
View file @
5bd970b1
...
...
@@ -205,6 +205,7 @@ followed by the descriptions of the tags grouped by category.
\
refitem
cfg_toc_expand
TOC_EXPAND
\
refitem
cfg_treeview_width
TREEVIEW_WIDTH
\
refitem
cfg_uml_look
UML_LOOK
\
refitem
cfg_use_htags
USE_HTAGS
\
refitem
cfg_use_windows_encoding
USE_WINDOWS_ENCODING
\
refitem
cfg_verbatim_headers
VERBATIM_HEADERS
\
refitem
cfg_warn_format
WARN_FORMAT
...
...
@@ -907,6 +908,14 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
which
an
include
is
specified
.
Set
to
NO
to
disable
this
.
\
sa
Section
\
ref
cmdclass
"
\\
class"
.
\
anchor
cfg_use_htags
<
dt
>\
c
USE_HTAGS
<
dd
>
\
addindex
USE_HTAGS
If
the
\
c
USE_HTAGS
tag
is
set
to
\
c
YES
then
the
references
to
source
code
will
point
to
the
HTML
generated
by
the
htags
(
1
)
tool
instead
of
doxygen
built
-
in
source
browser
.
The
htags
tool
is
part
of
GNU
's global source
tagging system (see http://www.gnu.org/software/global/global.html)
</dl>
\section alphabetical_index Alphabetical index options
...
...
@@ -1479,7 +1488,7 @@ EXTRA_PACKAGES = times
gcc
).
The
argument
of
the
tag
is
a
list
of
macros
of
the
form
:
<
code
>
name
</
code
>
or
<
code
>
name
=
definition
</
code
>
(
no
spaces
).
If
the
definition
and
the
"="
are
omitted
,
"=1"
is
assumed
.
To
prevent
a macro definition from being undefined via #undef or recursively expanded
a
macro
definition
from
being
undefined
via
\
#
undef
or
recursively
expanded
use
the
:=
operator
instead
of
the
=
operator
.
\
anchor
cfg_expand_as_defined
...
...
@@ -1659,7 +1668,7 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\
addindex
DIRECTORY_GRAPH
If
the
\
c
DIRECTORY_GRAPH
,
\
c
SHOW_DIRECTORIES
and
\
c
HAVE_DOT
options
are
set
to
\
c
YES
then
doxygen
will
show
the
dependencies
a
directory
has
on
other
directories
in a graphical way. The dependency relations are determined by the #include
in
a
graphical
way
.
The
dependency
relations
are
determined
by
the
\
#
include
relations
between
the
files
in
the
directories
.
\
anchor
cfg_dot_image_format
...
...
doc/install.doc
View file @
5bd970b1
...
...
@@ -56,7 +56,7 @@ tools should be installed.
<A HREF="http://www.trolltech.com/products/qt.html">Qt</A>
\latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly
\addindex Qt
version 2 or higher.
version
3.
2 or higher.
This is needed to build the GUI front-end doxywizard.
<li>A \f$\mbox{\LaTeX}\f$ distribution: for instance
<a href="http://www.tug.org/interest.html#free">teTeX 1.0</a>
...
...
doc/language.doc
View file @
5bd970b1
...
...
@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile).
Currently (version 1.4.2-20050
410
), 31 languages
Currently (version 1.4.2-20050
508
), 31 languages
are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
...
...
@@ -54,7 +54,7 @@ when the translator was updated.
<td>Afrikaans</td>
<td>Johan Prinsloo</td>
<td>johan at zippysnoek dot com</td>
<td>
1.3.9
</td>
<td>
up-to-date
</td>
</tr>
<tr bgcolor="#ffffff">
<td>Brazilian Portuguese</td>
...
...
@@ -263,7 +263,7 @@ when the translator was updated.
\hline
\hline
Afrikaans & Johan Prinsloo & {\tt\tiny johan@zippysnoek.com} &
1.3.9
\\
Afrikaans & Johan Prinsloo & {\tt\tiny johan@zippysnoek.com} &
up-to-date
\\
\hline
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny jun-chino@uol.com.br} & up-to-date \\
\hline
...
...
doc/translator_report.txt
View file @
5bd970b1
(1.4.2-20050
410
)
(1.4.2-20050
508
)
Doxygen supports the following 31 languages (sorted alphabetically):
...
...
@@ -8,7 +8,7 @@ German, Greek, Hungarian, Indonesian, Italian, Japanese (+En), Korean
(+En), Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
Of them, 1
2 translators are up-to-date, 19
translators are based on
Of them, 1
3 translators are up-to-date, 18
translators are based on
some adapter class, and 2 are English based.
----------------------------------------------------------------------
...
...
@@ -17,6 +17,7 @@ alphabetically). This means that they derive from the Translator class
and they implement all 192 of the required methods. Anyway, there
still may be some details listed even for them:
TranslatorAfrikaans
TranslatorBrazilian -- Remove the obsolete methods (never used).
TranslatorCroatian
TranslatorCzech
...
...
@@ -46,7 +47,6 @@ must be implemented to become up-to-date:
TranslatorNorwegian 1.3.9 7 methods to implement
TranslatorJapanese 1.3.9 7 methods to implement
TranslatorDanish 1.3.9 7 methods to implement
TranslatorAfrikaans 1.3.9 7 methods to implement
TranslatorSpanish 1.3.8 8 methods to implement
TranslatorLithuanian 1.3.8 8 methods to implement
TranslatorChinesetraditional 1.3.8 8 methods to implement
...
...
@@ -70,35 +70,6 @@ Details for translators (classes sorted alphabetically):
TranslatorAfrikaans (TranslatorAdapter_1_3_9) 7 methods to implement
-------------------
Implements 185 of the required methods.
Missing methods (should be implemented):
virtual QCString trOverloadText()
virtual QCString trDirIndex()
virtual QCString trDirDocumentation()
virtual QCString trDirectories()
virtual QCString trDirDescription()
virtual QCString trDirReference(const char * dirName)
virtual QCString trDir(bool first_capital, bool singular)
Obsolete methods (should be removed, never used):
virtual QCString trHeaderFilesDescription()
virtual QCString trField(bool first_capital, bool singular)
virtual QCString trPackageDocumentation()
virtual QCString trSources()
virtual QCString trReimplementedForInternalReasons()
virtual QCString trInterfaces()
virtual QCString trHeaderFiles()
virtual QCString trBugsAndLimitations()
virtual QCString trEnumerationValueDocumentation()
virtual QCString trNoDescriptionAvailable()
TranslatorBrazilian (Translator)
-------------------
...
...
examples/example.tag
View file @
5bd970b1
<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?>
<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'
?>
<tagfile>
<compound
kind=
"class"
>
<name>
Test
</name>
...
...
@@ -6,6 +6,7 @@
<member
kind=
"function"
>
<type>
void
</type>
<name>
example
</name>
<anchorfile>
class_test.html
</anchorfile>
<anchor>
a0
</anchor>
<arglist>
()
</arglist>
</member>
...
...
packages/rpm/build.sh
0 → 100644
View file @
5bd970b1
#!/bin/bash
set
-e
[
$(
whoami
)
==
"root"
]
||
{
echo
"Don't I need to be root to make RPM packages ?"
}
RPMBUILDPLACE
=
/usr/src/RPM/
cp
doxygen.spec
$RPMBUILDPLACE
/SPECS
ls
*
.patch
&&
{
cp
*
.patch
$RPMBUILDPLACE
/SOURCES
}
cp
../../../doxygen
*
.gz
$RPMBUILDPLACE
/SOURCES
urpmi
--auto
rpm-build libqt3-devel flex tetex-latex dvips
rpm
-ba
SPECS/doxygen.spec
packages/rpm/doxygen.spec
View file @
5bd970b1
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.4.2
_20050421
Version: 1.4.2
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
Patch: doxygen-1.2.7-redhat.patch
Patch1: doxygen-1.2.12-qt2.patch
Group: Development/Tools
License: GPL
Url: http://www.stack.nl/~dimitri/doxygen/index.html
Prefix: %{_prefix}
BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl
BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl
, /usr/bin/latex, /usr/bin/dvips
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
...
...
@@ -24,7 +22,7 @@ source files.
Summary: A GUI for creating and editing configuration files.
Group: User Interface/X
Requires: %{name} = %{version}
BuildPrereq: qt
-devel => 2.3.0
BuildPrereq: qt
3-devel => 2.3.0, flex
Requires: qt >= 2.3.0
%description doxywizard
...
...
@@ -33,11 +31,9 @@ are used by doxygen.
%prep
%setup -q
%patch -p1 -b .redhat
%patch1 -p1 -b .qt2
%build
QTDIR="" && . /etc/profile.d/qt.sh
QTDIR="" && . /etc/profile.d/qt
*
.sh
export OLD_PO_FILE_INPUT=yes
./configure --prefix %{_prefix} --shared --release --with-doxywizard
...
...
@@ -57,6 +53,7 @@ rm -rf ${RPM_BUILD_ROOT}
%doc LANGUAGE.HOWTO README examples html
%{_bindir}/doxygen
%{_bindir}/doxytag
%doc /usr/man/man1/*
%files doxywizard
%defattr(-,root,root)
...
...
qtools/qcache.h
View file @
5bd970b1
...
...
@@ -101,7 +101,7 @@ public:
bool
remove
(
const
char
*
k
)
{
return
QGCache
::
remove_other
(
k
);
}
type
*
take
(
const
char
*
k
)
{
return
(
type
*
)
QGCache
::
take_
ascii
(
k
);
}
{
return
(
type
*
)
QGCache
::
take_
other
(
k
);
}
type
*
find
(
const
char
*
k
,
bool
ref
=
TRUE
)
const
{
return
(
type
*
)
QGCache
::
find_other
(
k
,
ref
);}
type
*
operator
[](
const
char
*
k
)
const
...
...
qtools/scstring.cpp
View file @
5bd970b1
...
...
@@ -643,6 +643,21 @@ void SCString::msg_index( uint index )
#endif
}
bool
SCString
::
stripPrefix
(
const
char
*
prefix
)
{
if
(
prefix
==
0
)
return
FALSE
;
uint
plen
=
qstrlen
(
prefix
);
if
(
m_data
&&
qstrncmp
(
prefix
,
m_data
,
plen
)
==
0
)
// prefix matches
{
uint
len
=
qstrlen
(
m_data
);
uint
newlen
=
len
-
plen
+
1
;
qmemmove
(
m_data
,
m_data
+
plen
,
newlen
);
resize
(
newlen
);
return
TRUE
;
}
return
FALSE
;
}
//---------------------------------------------------------------------------
void
*
qmemmove
(
void
*
dst
,
const
void
*
src
,
uint
len
)
...
...
qtools/scstring.h
View file @
5bd970b1
...
...
@@ -64,6 +64,7 @@ public:
int
contains
(
char
c
,
bool
cs
=
TRUE
)
const
;
int
contains
(
const
char
*
str
,
bool
cs
=
TRUE
)
const
;
int
contains
(
const
QRegExp
&
)
const
;
bool
stripPrefix
(
const
char
*
prefix
);
SCString
left
(
uint
len
)
const
;
SCString
right
(
uint
len
)
const
;
...
...
src/classdef.cpp
View file @
5bd970b1
...
...
@@ -1034,6 +1034,30 @@ void ClassDef::writeDocumentation(OutputList &ol)
addGroupListToTitle
(
ol
,
this
);
endTitle
(
ol
,
getOutputFileBase
(),
name
());
{
ol
.
pushGeneratorState
();
ol
.
disableAllBut
(
OutputGenerator
::
Html
);
ol
.
writeString
(
"<!-- doxytag: class=<"
);
ol
.
docify
(
name
());
ol
.
writeString
(
"> -->"
);
if
(
m_inherits
->
count
()
>
0
)
{
BaseClassListIterator
bli
(
*
m_inherits
);
ol
.
writeString
(
"<!-- doxytag: inherits=<"
);
BaseClassDef
*
bcd
=
0
;
bool
first
=
TRUE
;
for
(
bli
.
toFirst
();(
bcd
=
bli
.
current
());
++
bli
)
{
if
(
!
first
)
ol
.
writeString
(
","
);
ol
.
docify
(
bcd
->
classDef
->
name
());
first
=
FALSE
;
}
ol
.
writeString
(
"> -->"
);
}
ol
.
popGeneratorState
();
}
if
(
Config_getBool
(
"SEARCHENGINE"
))
{
Doxygen
::
searchIndex
->
setCurrentDoc
(
pageTitle
,
getOutputFileBase
());
...
...
@@ -1543,6 +1567,8 @@ void ClassDef::writeMemberPages(OutputList &ol)
void
ClassDef
::
writeQuickMemberLinks
(
OutputList
&
ol
,
MemberDef
*
currentMd
)
const
{
static
bool
createSubDirs
=
Config_getBool
(
"CREATE_SUBDIRS"
);
ol
.
writeString
(
" <div class=
\"
navtab
\"
>
\n
"
);
ol
.
writeString
(
" <table>
\n
"
);
...
...
@@ -1569,6 +1595,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol
.
writeString
(
"<a class=
\"
qindex
\"
"
);
}
ol
.
writeString
(
"href=
\"
"
);
if
(
createSubDirs
)
ol
.
writeString
(
"../../"
);
ol
.
writeString
(
md
->
getOutputFileBase
()
+
Doxygen
::
htmlFileExtension
+
"#"
+
md
->
anchor
());
ol
.
writeString
(
"
\"
>"
);
ol
.
writeString
(
md
->
name
());
...
...
@@ -2141,8 +2168,16 @@ void ClassDef::mergeMembers()
if
(
srcCd
==
dstCd
||
dstCd
->
isBaseClass
(
srcCd
,
TRUE
))
// member is in the same or a base class
{
#ifdef NEWMATCH
found
=
matchArguments2
(
srcMd
->
getOuterScope
(),
srcMd
->
getFileDef
(),
srcMd
->
argumentList
(),
dstMd
->
getOuterScope
(),
dstMd
->
getFileDef
(),
dstMd
->
argumentList
(),
TRUE
);
#else
found
=
matchArguments
(
srcMd
->
argumentList
(),
dstMd
->
argumentList
());
#endif
//printf(" Yes, matching (%s<->%s): %d\n",
// argListToString(srcMd->argumentList()).data(),
// argListToString(dstMd->argumentList()).data(),
...
...
src/code.l
View file @
5bd970b1
...
...
@@ -461,6 +461,11 @@ static void startCodeLine()
g_insideBody = FALSE;
g_searchingForBody = TRUE;
g_realScope = d->name().copy();
g_type.resize(0);
g_name.resize(0);
g_args.resize(0);
g_parmType.resize(0);
g_parmName.resize(0);
//printf("Real scope: `%s'\n",g_realScope.data());
g_bodyCurlyCount = 0;
QCString lineAnchor;
...
...
@@ -2260,6 +2265,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_theCallContext.pushScope();
}
g_args.resize(0);
g_parmType.resize(0);
g_parmName.resize(0);
}
}
/*
...
...
@@ -2427,6 +2434,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<MemberCall2,FuncCall>{OPERATOR} { // operator
if (strcmp(yytext,"*") && strcmp(yytext,"&")) // typically a pointer or reference
{
// not a * or &
g_parmType.resize(0);g_parmName.resize(0);
}
g_code->codify(yytext);
...
...
src/commentscan.l
View file @
5bd970b1
...
...
@@ -545,6 +545,19 @@ static void addSection()
//-----------------------------------------------------------------------------
// strip trailing whitespace (excluding newlines) from string s
static void stripTrailingWhiteSpace(QCString &s)
{
uint len = s.length();
int i = (int)len-1;
char c;
while (i>=0 && ((c = s.at(i))==' ' || c=='\t' || c=='\r')) i--;
if (i!=(int)len-1)
{
s.resize(i+2); // string upto and including char at pos i and \0 terminator
}
}
// selects the output to write to
static inline void setOutput(OutputContext ctx)
{
...
...
@@ -610,6 +623,7 @@ static inline void setOutput(OutputContext ctx)
switch(inContext)
{
case OutputDoc:
stripTrailingWhiteSpace(current->doc);
if (current->docFile.isEmpty())
{
current->docFile = yyFileName;
...
...
@@ -842,7 +856,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
addOutput(yytext[2]);
}
<Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command)
if (inContext)
if (inContext
==OutputBrief
)
{
setOutput(OutputDoc);
}
...
...
src/config.l
View file @
5bd970b1
...
...
@@ -1935,6 +1935,15 @@ void Config::create()
TRUE
);
cb->addDependency("SOURCE_BROWSER");
cb = addBool(
"USE_HTAGS",
"If the USE_HTAGS tag is set to YES then the references to source code \n"
"will point to the HTML generated by the htags(1) tool instead of doxygen \n"
"built-in source browser. The htags tool is part of GNU's global source \n"
"tagging system (see http://www.gnu.org/software/global/global.html) \n",
FALSE
);
cb->addDependency("SOURCE_BROWSER");
cb = addBool(
"VERBATIM_HEADERS",
"If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n"
...
...
@@ -1942,6 +1951,7 @@ void Config::create()
"which an include is specified. Set to NO to disable this. \n",
TRUE
);
//-----------------------------------------------------------------------------------------------
addInfo( "Index","configuration options related to the alphabetical class index");
//-----------------------------------------------------------------------------------------------
...
...
src/definition.cpp
View file @
5bd970b1
...
...
@@ -31,6 +31,7 @@
#include "groupdef.h"
#include "pagedef.h"
#include "section.h"
#include "htags.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
...
...
@@ -368,7 +369,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
{
QCString
lineStr
,
anchorStr
;
lineStr
.
sprintf
(
"%d"
,
m_startBodyLine
);
anchorStr
.
sprintf
(
"l%05d"
,
m_startBodyLine
);
anchorStr
.
sprintf
(
Htags
::
useHtags
?
"%d"
:
"l%05d"
,
m_startBodyLine
);
ol
.
newParagraph
();
if
(
lineMarkerPos
<
fileMarkerPos
)
// line marker before file marker
{
...
...
@@ -584,9 +585,11 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
bool
Definition
::
hasDocumentation
()
const
{
static
bool
extractAll
=
Config_getBool
(
"EXTRACT_ALL"
);
static
bool
sourceBrowser
=
Config_getBool
(
"SOURCE_BROWSER"
);
return
!
m_doc
.
isEmpty
()
||
// has detailed docs
!
m_brief
.
isEmpty
()
||
// has brief description
extractAll
;
// extract everything
extractAll
||
// extract everything
(
sourceBrowser
&&
m_startBodyLine
!=-
1
&&
m_bodyDef
);
// link to definition
}
void
Definition
::
addSourceReferencedBy
(
MemberDef
*
md
)
...
...
@@ -783,7 +786,7 @@ void Definition::writePathFragment(OutputList &ol) const
else
{
ol
.
writeString
(
" "
);
ol
.
writeString
(
"
/
"
);
ol
.
writeString
(
"
»
"
);
ol
.
writeString
(
" "
);
}
}
...
...
src/docparser.cpp
View file @
5bd970b1
...
...
@@ -866,6 +866,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
//printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE);
if
(
member
&&
member
->
isLinkable
())
// member link
{
if
(
member
->
isObjCMethod
())
{
bool
localLink
=
g_memberDef
?
member
->
getClassDef
()
==
g_memberDef
->
getClassDef
()
:
FALSE
;
name
=
member
->
objCMethodName
(
localLink
,
g_inSeeBlock
);
}
children
.
append
(
new
DocLinkedWord
(
parent
,
name
,
member
->
getReference
(),
...
...
@@ -929,7 +934,11 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
}
else
// normal non-linkable word
{
children
.
append
(
new
DocWord
(
parent
,
g_token
->
name
));
if
(
g_token
->
name
.
at
(
0
)
==
'#'
)
{
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: explicit link request to '%s' could not be resolved"
,
name
.
data
());
}
children
.
append
(
new
DocWord
(
parent
,
name
));
}
}
...
...
@@ -1914,7 +1923,6 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
ASSERT
(
!
target
.
isEmpty
());
m_relPath
=
g_relPath
;
SectionInfo
*
sec
=
Doxygen
::
sectionDict
[
target
];
//printf("DocRef::DocRef(target=%s) sec=%p\n",target.data(),sec);
if
(
sec
)
// ref to section or anchor
{
m_text
=
sec
->
title
;
...
...
@@ -1943,7 +1951,15 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
((
GroupDef
*
)
compound
)
->
groupTitle
()
/* with title */
)
{
m_text
=
((
GroupDef
*
)
compound
)
->
groupTitle
();
// use group's title as l
m_text
=
((
GroupDef
*
)
compound
)
->
groupTitle
();
// use group's title as link
}
else
if
(
compound
->
definitionType
()
==
Definition
::
TypeMember
&&
((
MemberDef
*
)
compound
)
->
isObjCMethod
())
{
// Objective C Method
MemberDef
*
member
=
(
MemberDef
*
)
compound
;
bool
localLink
=
g_memberDef
?
member
->
getClassDef
()
==
g_memberDef
->
getClassDef
()
:
FALSE
;
m_text
=
member
->
objCMethodName
(
localLink
,
g_inSeeBlock
);
}
m_file
=
compound
->
getOutputFileBase
();
...
...
src/doctokenizer.l
View file @
5bd970b1
...
...
@@ -331,7 +331,7 @@ HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*
{ID}
{FUNCARG}?
REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*
({ID}(":")?)
{FUNCARG}?
%option noyywrap
%option yylineno
...
...
src/doxygen.cpp
View file @
5bd970b1
...
...
@@ -66,6 +66,7 @@
#include "cmdmapper.h"
#include "searchindex.h"
#include "parserintf.h"
#include "htags.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
...
...
@@ -231,6 +232,7 @@ static void addRelatedPage(Entry *root)
);
if
(
pd
)
{
#if 0
Definition *ctx = 0;
// find the page's context
...
...
@@ -255,6 +257,7 @@ static void addRelatedPage(Entry *root)
ctx=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
}
pd->setOuterScope(ctx);
#endif
pd
->
addSectionsToDefinition
(
root
->
anchors
);
//pi->context = ctx;
}
...
...
@@ -1454,7 +1457,7 @@ static MemberDef *addVariableToClass(
def
=
qualScope
+
scopeSeparator
+
name
+
root
->
args
;
}
}
if
(
def
.
left
(
7
)
==
"static "
)
def
=
def
.
right
(
def
.
length
()
-
7
);
def
.
stripPrefix
(
"static "
);
// see if the member is already found in the same scope
// (this may be the case for a static member that is initialized
...
...
@@ -1600,7 +1603,7 @@ static MemberDef *addVariableToFile(
def
=
name
+
root
->
args
;
}
}
if
(
def
.
left
(
7
)
==
"static "
)
def
=
def
.
right
(
def
.
length
()
-
7
);
def
.
stripPrefix
(
"static "
);
MemberName
*
mn
=
Doxygen
::
functionNameSDict
[
name
];
if
(
mn
)
...
...
@@ -2085,7 +2088,9 @@ static void addMethodToClass(Entry *root,ClassDef *cd,
md
->
setMemberSpecifiers
(
root
->
memSpec
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
bool
ambig
;
md
->
setBodyDef
(
findFileDef
(
Doxygen
::
inputNameDict
,
root
->
fileName
,
ambig
));
FileDef
*
fd
=
findFileDef
(
Doxygen
::
inputNameDict
,
root
->
fileName
,
ambig
);
md
->
setBodyDef
(
fd
);
md
->
setFileDef
(
fd
);
//md->setScopeTemplateArguments(root->tArgList);
md
->
addSectionsToDefinition
(
root
->
anchors
);
QCString
def
;
...
...
@@ -2306,12 +2311,23 @@ static void buildFunctionList(Entry *root)
QCString
nsName
,
rnsName
;
if
(
mnd
)
nsName
=
mnd
->
name
().
copy
();
if
(
rnd
)
rnsName
=
rnd
->
name
().
copy
();
#ifdef NEWMATCH
bool
ambig
;
FileDef
*
rfd
=
findFileDef
(
Doxygen
::
inputNameDict
,
root
->
fileName
,
ambig
);
#else
NamespaceSDict
*
unl
=
mfd
?
mfd
->
getUsedNamespaces
()
:
0
;
SDict
<
Definition
>
*
ucl
=
mfd
?
mfd
->
getUsedClasses
()
:
0
;
#endif
//printf("matching arguments for %s%s %s%s\n",
// md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
if
(
#ifdef NEWMATCH
matchArguments2
(
md
->
getOuterScope
(),
mfd
,
md
->
argumentList
(),
rnd
?
rnd
:
Doxygen
::
globalScope
,
rfd
,
root
->
argList
,
FALSE
)
#else
matchArguments
(
md
->
argumentList
(),
root
->
argList
,
0
,
nsName
,
FALSE
,
unl
,
ucl
)
#endif
)
{
GroupDef
*
gd
=
0
;
...
...
@@ -2361,6 +2377,7 @@ static void buildFunctionList(Entry *root)
else
if
(
!
md
->
documentation
().
isEmpty
()
&&
!
root
->
doc
.
isEmpty
()
&&
mnd
==
rnd
)
{
warn
(
root
->
docFile
,
root
->
docLine
,
"Warning: member %s: ignoring the detailed description found here, since another one was found at line %d of file %s!"
,
md
->
name
().
data
(),
md
->
docLine
(),
md
->
docFile
().
data
());
//printf("md->docs=[%s] root->docs=[%s]\n",md->documentation().data(),root->doc.data());
}
if
(
md
->
briefDescription
().
isEmpty
()
&&
!
root
->
brief
.
isEmpty
())
...
...
@@ -2583,13 +2600,23 @@ static void findFriends()
//printf("Checking for matching arguments
// mmd->isRelated()=%d mmd->isFriend()=%d mmd->isFunction()=%d\n",
// mmd->isRelated(),mmd->isFriend(),mmd->isFunction());
#ifndef NEWMATCH
NamespaceDef
*
nd
=
mmd
->
getNamespaceDef
();
#endif
if
((
mmd
->
isFriend
()
||
(
mmd
->
isRelated
()
&&
mmd
->
isFunction
()))
&&
#ifdef NEWMATCH
matchArguments2
(
mmd
->
getOuterScope
(),
mmd
->
getFileDef
(),
mmd
->
argumentList
(),
fmd
->
getOuterScope
(),
fmd
->
getFileDef
(),
fmd
->
argumentList
(),
TRUE
)
#else
matchArguments
(
mmd
->
argumentList
(),
fmd
->
argumentList
(),
mmd
->
getClassDef
()
->
name
(),
nd
?
nd
->
name
().
data
()
:
0
)
#endif
)
// if the member is related and the arguments match then the
// function is actually a friend.
{
...
...
@@ -2702,7 +2729,14 @@ static void transferFunctionDocumentation()
// mdef, mdef ? mdef->name().data() : "",
// mdec, mdec ? mdec->name().data() : "");
if
(
mdef
&&
mdec
&&
#ifdef NEWMATCH
matchArguments2
(
mdef
->
getOuterScope
(),
mdef
->
getFileDef
(),
mdef
->
argumentList
(),
mdec
->
getOuterScope
(),
mdec
->
getFileDef
(),
mdec
->
argumentList
(),
TRUE
)
#else
matchArguments
(
mdef
->
argumentList
(),
mdec
->
argumentList
())
#endif
)
/* match found */
{
//printf("Found member %s: definition in %s (doc=`%s') and declaration in %s (doc=`%s')\n",
...
...
@@ -2837,7 +2871,14 @@ static void transferFunctionReferences()
mdef
=
md
;
}
if
(
mdef
&&
mdec
&&
#ifdef NEWMATCH
matchArguments2
(
mdef
->
getOuterScope
(),
mdef
->
getFileDef
(),
mdef
->
argumentList
(),
mdec
->
getOuterScope
(),
mdec
->
getFileDef
(),
mdec
->
argumentList
(),
TRUE
)
#else
matchArguments
(
mdef
->
argumentList
(),
mdec
->
argumentList
())
#endif
)
/* match found */
{
MemberSDict
*
defDict
=
mdef
->
getReferencesMembers
();
...
...
@@ -2923,7 +2964,14 @@ static void transferRelatedFunctionDocumentation()
{
//printf(" Member found: related=`%d'\n",rmd->isRelated());
if
(
rmd
->
isRelated
()
&&
// related function
#ifdef NEWMATCH
matchArguments2
(
md
->
getOuterScope
(),
md
->
getFileDef
(),
md
->
argumentList
(),
rmd
->
getOuterScope
(),
rmd
->
getFileDef
(),
rmd
->
argumentList
(),
TRUE
)
#else
matchArguments
(
md
->
argumentList
(),
rmd
->
argumentList
())
// match argument lists
#endif
)
{
//printf(" Found related member `%s'\n",md->name().data());
...
...
@@ -3962,23 +4010,37 @@ static void addMemberDocs(Entry *root,
MemberDef
*
md
,
const
char
*
funcDecl
,
ArgumentList
*
al
,
bool
over_load
,
NamespaceSDict
*
nl
NamespaceSDict
*
#ifndef NEWMATCH
nl
#endif
)
{
//printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s' memSpec=%d\n",
// root->parent->name.data(),md->name().data(),md->argsString(),funcDecl,root->memSpec);
QCString
fDecl
=
funcDecl
;
// strip extern specifier
if
(
fDecl
.
left
(
7
)
==
"extern "
)
fDecl
=
fDecl
.
right
(
fDecl
.
length
()
-
7
);
fDecl
.
stripPrefix
(
"extern "
);
md
->
setDefinition
(
fDecl
);
md
->
enableCallGraph
(
root
->
callGraph
);
ClassDef
*
cd
=
md
->
getClassDef
();
NamespaceDef
*
nd
=
md
->
getNamespaceDef
();
QCString
fullName
;
if
(
cd
)
fullName
=
cd
->
name
();
else
if
(
nd
)
fullName
=
nd
->
name
();
if
(
cd
)
fullName
=
cd
->
name
();
else
if
(
nd
)
fullName
=
nd
->
name
();
if
(
!
fullName
.
isEmpty
())
fullName
+=
"::"
;
fullName
+=
md
->
name
();
bool
ambig
;
FileDef
*
rfd
=
findFileDef
(
Doxygen
::
inputNameDict
,
root
->
fileName
,
ambig
);
#ifdef NEWMATCH
// TODO determine scope based on root not md
Definition
*
rscope
=
md
->
getOuterScope
();
#endif
if
(
al
)
{
//printf("merging arguments (1)\n");
...
...
@@ -3986,12 +4048,20 @@ static void addMemberDocs(Entry *root,
}
else
{
if
(
matchArguments
(
md
->
argumentList
(),
root
->
argList
,
if
(
#ifdef NEWMATCH
matchArguments2
(
md
->
getOuterScope
(),
md
->
getFileDef
(),
md
->
argumentList
(),
rscope
,
rfd
,
root
->
argList
,
TRUE
)
#else
matchArguments
(
md
->
argumentList
(),
root
->
argList
,
cd
?
cd
->
name
().
data
()
:
0
,
nd
?
nd
->
name
().
data
()
:
0
,
TRUE
,
nl
)
#endif
)
{
//printf("merging arguments (2)\n");
...
...
@@ -4064,16 +4134,14 @@ static void addMemberDocs(Entry *root,
//{
// md->setBody(root->body);
//}
bool
ambig
;
FileDef
*
fd
=
findFileDef
(
Doxygen
::
inputNameDict
,
root
->
fileName
,
ambig
);
if
(
fd
)
if
(
rfd
)
{
if
((
md
->
getStartBodyLine
()
==-
1
&&
root
->
bodyLine
!=-
1
)
||
(
md
->
isVariable
()
&&
!
root
->
explicitExternal
))
{
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setBodyDef
(
fd
);
md
->
setBodyDef
(
r
fd
);
}
md
->
setRefItems
(
root
->
sli
);
...
...
@@ -4176,10 +4244,22 @@ static bool findGlobalMember(Entry *root,
Debug
::
print
(
Debug
::
FindMembers
,
0
,
"4. Try to add member `%s' to scope `%s'
\n
"
,
md
->
name
().
data
(),
namespaceName
.
data
());
QCString
nsName
=
nd
?
nd
->
name
().
data
()
:
""
;
#ifdef NEW_MATCH
NamespaceDef
*
rnd
=
0
;
if
(
!
namespaceName
.
isEmpty
())
rnd
=
Doxygen
::
namespaceSDict
[
namespaceName
];
#endif
bool
matching
=
(
md
->
argumentList
()
==
0
&&
root
->
argList
->
count
()
==
0
)
||
md
->
isVariable
()
||
md
->
isTypedef
()
||
/* in case of function pointers */
#ifdef NEW_MATCH
matchArguments2
(
md
->
getOuterScope
(),
md
->
getFileDef
(),
md
->
argumentList
(),
rnd
?
rnd
:
Doxygen
::
globalScope
,
fd
,
root
->
argList
,
FALSE
);
#else
matchArguments
(
md
->
argumentList
(),
root
->
argList
,
0
,
nsName
,
FALSE
,
nl
,
cl
);
#endif
// for static members we also check if the comment block was found in
// the same file. This is needed because static members with the same
...
...
@@ -4709,7 +4789,6 @@ static void findMember(Entry *root,
className
.
data
(),
namespaceName
.
data
()
);
//#define NEWMATCH
#ifdef NEWMATCH
bool
matching
=
...
...
@@ -5054,6 +5133,10 @@ static void findMember(Entry *root,
}
}
}
bool
ambig
;
FileDef
*
fd
=
findFileDef
(
Doxygen
::
inputNameDict
,
root
->
fileName
,
ambig
);
if
((
mn
=
Doxygen
::
memberNameSDict
[
funcName
])
==
0
)
{
mn
=
new
MemberName
(
funcName
);
...
...
@@ -5064,8 +5147,15 @@ static void findMember(Entry *root,
MemberDef
*
rmd
=
mn
->
first
();
while
(
rmd
&&
newMember
)
// see if we got another member with matching arguments
{
newMember
=
newMember
&&
#ifdef NEWMATCH
!
matchArguments2
(
rmd
->
getOuterScope
(),
rmd
->
getFileDef
(),
rmd
->
argumentList
(),
cd
,
fd
,
root
->
argList
,
TRUE
);
#else
!
matchArguments
(
rmd
->
argumentList
(),
root
->
argList
,
className
,
namespaceName
);
#endif
if
(
newMember
)
rmd
=
mn
->
next
();
}
if
(
!
newMember
&&
rmd
)
// member already exists as rmd -> add docs
...
...
@@ -5117,10 +5207,17 @@ static void findMember(Entry *root,
while
(
rmd
&&
!
found
)
// see if we got another member with matching arguments
{
// check for matching argument lists
if
(
matchArguments
(
rmd
->
argumentList
(),
if
(
#ifdef NEWMATCH
matchArguments2
(
rmd
->
getOuterScope
(),
rmd
->
getFileDef
(),
rmd
->
argumentList
(),
cd
,
fd
,
root
->
argList
,
TRUE
)
#else
matchArguments
(
rmd
->
argumentList
(),
root
->
argList
,
className
,
namespaceName
)
#endif
)
{
found
=
TRUE
;
...
...
@@ -5139,8 +5236,6 @@ static void findMember(Entry *root,
// entry
{
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
bool
ambig
;
FileDef
*
fd
=
findFileDef
(
Doxygen
::
inputNameDict
,
root
->
fileName
,
ambig
);
md
->
setBodyDef
(
fd
);
}
...
...
@@ -5729,6 +5824,13 @@ static void findEnumDocumentation(Entry *root)
}
md
->
addSectionsToDefinition
(
root
->
anchors
);
GroupDef
*
gd
=
md
->
getGroupDef
();
if
(
gd
==
0
&&
root
->
groups
->
first
()
!=
0
)
// member not grouped but out-of-line documentation is
{
addMemberToGroups
(
root
,
md
);
}
found
=
TRUE
;
}
}
...
...
@@ -5740,6 +5842,7 @@ static void findEnumDocumentation(Entry *root)
}
else
// enum outside class
{
//printf("Enum outside class: %s grpId=%d\n",name.data(),root->mGrpId);
MemberDef
*
md
;
MemberName
*
mn
=
Doxygen
::
functionNameSDict
[
name
];
if
(
mn
&&
(
md
=
mn
->
getFirst
()))
...
...
@@ -5750,6 +5853,13 @@ static void findEnumDocumentation(Entry *root)
md
->
setInbodyDocumentation
(
root
->
inbodyDocs
,
root
->
inbodyFile
,
root
->
inbodyLine
);
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
GroupDef
*
gd
=
md
->
getGroupDef
();
if
(
gd
==
0
&&
root
->
groups
->
first
()
!=
0
)
// member not grouped but out-of-line documentation is
{
addMemberToGroups
(
root
,
md
);
}
found
=
TRUE
;
}
}
...
...
@@ -5845,7 +5955,16 @@ static void computeMemberRelations()
// argListToString(bmd->argumentList()).data(),
// argListToString(md->argumentList()).data()
// );
if
(
matchArguments
(
bmd
->
argumentList
(),
md
->
argumentList
())
)
if
(
#ifdef NEWMATCH
matchArguments2
(
bmd
->
getOuterScope
(),
bmd
->
getFileDef
(),
bmd
->
argumentList
(),
md
->
getOuterScope
(),
md
->
getFileDef
(),
md
->
argumentList
(),
TRUE
)
#else
matchArguments
(
bmd
->
argumentList
(),
md
->
argumentList
())
#endif
)
{
//printf(" match found!\n");
if
(
mcd
&&
bmcd
&&
...
...
@@ -8705,6 +8824,16 @@ void generateOutput()
RTFGenerator
::
init
();
}
if
(
Config_getBool
(
"USE_HTAGS"
))
{
Htags
::
useHtags
=
TRUE
;
QCString
htmldir
=
Config_getString
(
"HTML_OUTPUT"
);
if
(
!
Htags
::
execute
(
htmldir
))
err
(
"Error: USE_HTAGS is YES but htags(1) failed.
\n
"
);
if
(
!
Htags
::
loadFilemap
(
htmldir
))
err
(
"Error: htags(1) ended normally but failed to load the filemap.
\n
"
);
}
/**************************************************************************
* Generate documentation *
**************************************************************************/
...
...
@@ -8777,7 +8906,10 @@ void generateOutput()
generateExampleDocs
();
msg
(
"Generating file sources...
\n
"
);
if
(
!
Htags
::
useHtags
)
{
generateFileSources
();
}
transferFunctionReferences
();
msg
(
"Generating file documentation...
\n
"
);
...
...
src/doxygen.h
View file @
5bd970b1
...
...
@@ -123,4 +123,6 @@ void readConfiguration(int argc, char **argv);
void
parseInput
();
void
generateOutput
();
#define NEWMATCH
#endif
src/doxytag.l
View file @
5bd970b1
...
...
@@ -91,6 +91,7 @@ static QCString memberRef;
static QCString memberName;
static QCString memberArgs;
static QCString className;
static QCString baseName;
static QCString docBaseLink;
static QCString docAnchor;
static QCString docRefName;
...
...
@@ -119,6 +120,7 @@ static void addClass(const char *clName)
{
if (classDict[clName]==0)
{
//printf("addClass(%s)\n",clName);
ClassDef *cd=new ClassDef;
cd->name=clName;
cd->fileName=yyFileName;
...
...
@@ -149,13 +151,22 @@ static void addBases(const char *clName)
static void addMember(const char *memName,const char *memRef,const char *memArgs)
{
//printf("addMember(%s,%s,%s)\n",memName,memRef,memArgs);
ClassDef *cd=classList.last();
if (cd)
{
MemberDef *md;
md=new MemberDef;
md->name=memName;
md->anchor=memRef;
md->args=memArgs;
cd->memberList.append(md);
}
else
{
//printf("Warning: found member %s %s but not class was found to insert it!\n",
// memName,memArgs);
}
}
static void addReference()
...
...
@@ -214,12 +225,25 @@ QCString unhtmlify(const char *str)
%x CheckConstructor
%x SkipPreformated
%x Qt3ReadType
%x Qt3ReadAnchor
%x Qt3ReadName
%x Qt3ReadOperator
%x Qt3ReadArgs
%x DoxReadAnchor
%x DoxReadName
%x DoxReadArgs
%x DoxClassName
%x DoxClassBase
%%
<Start>^"<li>" {
BEGIN( SearchClassFile );
}
<Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x+
<Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x
<Start>"</table><h1 align=\"center\">" | // Qt-4
<Start>^"<h1 align=center>" { // Qt variant
BEGIN( ReadClassName );
}
...
...
@@ -233,6 +257,207 @@ QCString unhtmlify(const char *str)
<Start>^"<h3 class=\"fn\">"/[a-z_A-Z0-9] { // needed due to inconsistency in the Qt docs
BEGIN( CheckConstructor );
}
/* --------------------------------------------------- */
/* Qt member extraction rules */
<Start>^"<h3 class=fn>" {
BEGIN( Qt3ReadType );
}
<Start>^"<h3 class=fn><a name=\"" { // Qt-3.3+ html file
BEGIN( Qt3ReadAnchor );
}
<Start>^"<h3 class=\"fn\"><a name=\"" { // Qt-4 html file
BEGIN( Qt3ReadAnchor );
}
<Qt3ReadType>"<a name=\"" {
BEGIN( Qt3ReadAnchor );
}
<Qt3ReadType>.
<Qt3ReadAnchor>[~a-z_A-Z0-9\-\[\]*+%\^&|!]+ {
memberRef = yytext;
}
<Qt3ReadAnchor>"\"></a>" {
BEGIN( Qt3ReadName );
}
<Qt3ReadAnchor>. {
BEGIN( Start );
}
<Qt3ReadName>[a-z_A-Z0-9]+"::operator" {
memberName="operator";
BEGIN(Qt3ReadOperator);
}
<Qt3ReadOperator>[+\-*/%\^&|~!=\[\]]+ { memberName+=yytext; }
<Qt3ReadOperator>"<" { memberName+="<"; }
<Qt3ReadOperator>">" { memberName+=">"; }
<Qt3ReadOperator>"new" { memberName+=" new"; }
<Qt3ReadOperator>"delete" { memberName+=" delete"; }
<Qt3ReadOperator>"()" { memberName+="()"; BEGIN( Qt3ReadArgs ); }
<Qt3ReadOperator>. { unput(*yytext); BEGIN( Qt3ReadArgs ); }
<Qt3ReadName>[a-z_A-Z0-9]+"::"[~a-z_A-Z0-9]+ {
memberName=yytext;
memberName=memberName.mid(memberName.find("::")+2);
BEGIN(Qt3ReadArgs);
}
<Qt3ReadName>.
<Qt3ReadArgs>[ \t]*"(" {
memberArgs+="(";
}
<Qt3ReadArgs>"&" { memberArgs+="&"; }
<Qt3ReadArgs>"<" { memberArgs+="<"; }
<Qt3ReadArgs>">" { memberArgs+=">"; }
<Qt3ReadArgs>" " { memberArgs+=" "; }
<Qt3ReadArgs>"</h3>" {
addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0);
BEGIN(Start);
}
<Qt3ReadArgs>"<"[^>]+">"
<Qt3ReadArgs>")" {
memberArgs+=")";
addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0);
BEGIN(Start);
}
<Qt3ReadArgs>[a-z_A-Z0-9]+ { memberArgs+=yytext; }
<Qt3ReadArgs>. { memberArgs+=*yytext; }
/* --------------------------------------------------- */
/* Doxygen class extraction rules */
<Start>"<!-- doxytag: class=<" {
className.resize(0);
BEGIN(DoxClassName);
}
<DoxClassName>[^&>]+ {
className=yytext;
addClass(className);
}
<DoxClassName>"<" {
className+="<";
}
<DoxClassName>">" {
className+=">";
}
<DoxClassName>"&" {
className+="&";
}
<DoxClassName>. {
className+=*yytext;
}
<DoxClassName>"> -->" {
BEGIN(Start);
}
/* --------------------------------------------------- */
/* Doxygen inheritance extraction rules */
<Start>"<!-- doxytag: inherits=<" {
bases.clear();
baseName.resize(0);
BEGIN(DoxClassBase);
}
<DoxClassBase>[^&,>]+ {
baseName+=yytext;
}
<DoxClassBase>"," {
bases.append(baseName);
baseName.resize(0);
}
<DoxClassBase>"<" {
baseName+="<";
}
<DoxClassBase>">" {
baseName+=">";
}
<DoxClassBase>"&" {
baseName+="&";
}
<DoxClassBase>. {
baseName+=*yytext;
}
<DoxClassBase>"> -->" {
bases.append(baseName);
baseName.resize(0);
addBases(className);
BEGIN(Start);
}
/* --------------------------------------------------- */
/* Doxygen member extraction rules */
<Start>"<!-- doxytag: member=<" {
memberName.resize(0);
BEGIN(DoxReadName);
}
<DoxReadName>[^&>]+ {
memberName+=yytext;
}
<DoxReadName>"<" {
memberName+="<";
}
<DoxReadName>">" {
memberName+=">";
}
<DoxReadName>"&" {
memberName+="&";
}
<DoxReadName>. {
memberName+=*yytext;
}
<DoxReadName>"> ref=<" {
memberName=memberName.mid(memberName.find("::")+2);
memberRef.resize(0);
BEGIN(DoxReadAnchor);
}
<DoxReadAnchor>[^&>]+ {
memberRef+=yytext;
}
<DoxReadAnchor>"<" {
memberRef+="<";
}
<DoxReadAnchor>">" {
memberRef+=">";
}
<DoxReadAnchor>"&" {
memberRef+="&";
}
<DoxReadAnchor>. {
memberRef+=*yytext;
}
<DoxReadAnchor>"> args=<" {
memberArgs.resize(0);
BEGIN(DoxReadArgs);
}
<DoxReadArgs>[^&>]+ {
memberArgs+=yytext;
}
<DoxReadArgs>"<" {
memberArgs+="<";
}
<DoxReadArgs>">" {
memberArgs+=">";
}
<DoxReadArgs>"&" {
memberArgs+="&";
}
<DoxReadArgs>. {
memberArgs+=*yytext;
}
<DoxReadArgs>"> -->" {
addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0);
BEGIN(Start);
}
/** --------------------------------------------------- */
<Start>"<pre>" {
BEGIN( SkipPreformated );
}
...
...
@@ -353,7 +578,8 @@ QCString unhtmlify(const char *str)
{
classFile=yyFileName;
}
BEGIN( ReadMemberRef );
//BEGIN( ReadMemberRef );
BEGIN( Start );
}
<ReadMemberRef>[a-z_A-Z0-9]+ {
memberRef=yytext;
...
...
@@ -410,6 +636,8 @@ QCString unhtmlify(const char *str)
// addClass(className);
//}
addMember(memberName,memberRef,memberArgs);
memberName.resize(0);
memberRef.resize(0);
memberArgs.resize(0);
if (*yytext=='<')
BEGIN( SkipHTMLTag);
...
...
@@ -446,7 +674,7 @@ void parse(QCString &s)
void parseFile(QFileInfo &fi)
{
fprintf(stderr,
"Parsing file %s...\n",fi.fileName().data());
printf(
"Parsing file %s...\n",fi.fileName().data());
QFile f;
f.setName(fi.absFilePath());
if (f.open(IO_ReadOnly))
...
...
@@ -650,8 +878,15 @@ int main(int argc,char **argv)
t << " <filename>" << convertToXML(cd->fileName) << "</filename>" << endl;
MemberDef *md=cd->memberList.first();
while (md)
{
if (md->anchor.right(5)=="-enum")
{
t << " <member kind=\"enum\">" << endl;
}
else
{
t << " <member kind=\"function\">" << endl;
}
t << " <name>" << convertToXML(md->name) << "</name>" << endl;
t << " <anchor>" << convertToXML(md->anchor) << "</anchor>" << endl;
t << " <arglist>" << convertToXML(md->args) << "</arglist>" << endl;
...
...
src/entry.h
View file @
5bd970b1
...
...
@@ -87,6 +87,7 @@ struct Argument
QCString
attrib
;
/*!< Argument's attribute (IDL only) */
QCString
type
;
/*!< Argument's type */
QCString
canType
;
/*!< Cached value of canonical type (after type resolution). Empty initially. */
QCString
name
;
/*!< Argument's name (may be empty) */
QCString
array
;
/*!< Argument's array specifier (may be empty) */
QCString
defval
;
/*!< Argument's default value (may be empty) */
...
...
src/filedef.cpp
View file @
5bd970b1
...
...
@@ -32,7 +32,7 @@
#include "docparser.h"
#include "ftvhelp.h"
#include "searchindex.h"
//#include "xml
.h"
#include "htags
.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
...
...
@@ -583,6 +583,8 @@ void FileDef::writeMemberPages(OutputList &ol)
void
FileDef
::
writeQuickMemberLinks
(
OutputList
&
ol
,
MemberDef
*
currentMd
)
const
{
static
bool
createSubDirs
=
Config_getBool
(
"CREATE_SUBDIRS"
);
ol
.
writeString
(
" <div class=
\"
navtab
\"
>
\n
"
);
ol
.
writeString
(
" <table>
\n
"
);
...
...
@@ -604,6 +606,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol
.
writeString
(
"<a class=
\"
qindex
\"
"
);
}
ol
.
writeString
(
"href=
\"
"
);
if
(
createSubDirs
)
ol
.
writeString
(
"../../"
);
ol
.
writeString
(
md
->
getOutputFileBase
()
+
Doxygen
::
htmlFileExtension
+
"#"
+
md
->
anchor
());
ol
.
writeString
(
"
\"
>"
);
ol
.
writeString
(
md
->
localName
());
...
...
@@ -1254,3 +1257,28 @@ void FileDef::acquireFileVersion()
}
QCString
FileDef
::
getSourceFileBase
()
const
{
if
(
Htags
::
useHtags
)
{
return
Htags
::
path2URL
(
filepath
);
}
else
{
return
convertNameToFile
(
diskname
+
"-source"
);
}
}
/*! Returns the name of the verbatim copy of this file (if any). */
QCString
FileDef
::
includeName
()
const
{
if
(
Htags
::
useHtags
)
{
return
Htags
::
path2URL
(
filepath
);
}
else
{
return
convertNameToFile
(
diskname
+
"-source"
);
}
}
src/filedef.h
View file @
5bd970b1
...
...
@@ -86,12 +86,10 @@ class FileDef : public Definition
QCString
getFileBase
()
const
{
return
diskname
;
}
QCString
getSourceFileBase
()
const
{
return
convertNameToFile
(
diskname
+
"-source"
);
}
QCString
getSourceFileBase
()
const
;
/*! Returns the name of the verbatim copy of this file (if any). */
QCString
includeName
()
const
{
return
convertNameToFile
(
diskname
+
"-source"
);
}
QCString
includeName
()
const
;
/*! Returns the absolute path including the file name. */
QCString
absFilePath
()
const
{
return
filepath
;
}
...
...
src/groupdef.cpp
View file @
5bd970b1
...
...
@@ -218,7 +218,14 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly)
md
->
getOuterScope
()
->
definitionType
()
==
Definition
::
TypeFile
);
if
(
srcMd
->
isFunction
()
&&
md
->
isFunction
()
&&
#ifdef NEWMATCH
matchArguments2
(
srcMd
->
getOuterScope
(),
srcMd
->
getFileDef
(),
srcMd
->
argumentList
(),
md
->
getOuterScope
(),
md
->
getFileDef
(),
md
->
argumentList
(),
TRUE
)
&&
#else
matchArguments
(
srcMd
->
argumentList
(),
md
->
argumentList
())
&&
#endif
sameScope
)
{
...
...
@@ -754,6 +761,8 @@ void GroupDef::writeMemberPages(OutputList &ol)
void
GroupDef
::
writeQuickMemberLinks
(
OutputList
&
ol
,
MemberDef
*
currentMd
)
const
{
static
bool
createSubDirs
=
Config_getBool
(
"CREATE_SUBDIRS"
);
ol
.
writeString
(
" <div class=
\"
navtab
\"
>
\n
"
);
ol
.
writeString
(
" <table>
\n
"
);
...
...
@@ -775,6 +784,7 @@ void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol
.
writeString
(
"<a class=
\"
qindex
\"
"
);
}
ol
.
writeString
(
"href=
\"
"
);
if
(
createSubDirs
)
ol
.
writeString
(
"../../"
);
ol
.
writeString
(
md
->
getOutputFileBase
()
+
Doxygen
::
htmlFileExtension
+
"#"
+
md
->
anchor
());
ol
.
writeString
(
"
\"
>"
);
ol
.
writeString
(
md
->
localName
());
...
...
@@ -878,7 +888,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
(
gd
=
Doxygen
::
groupSDict
[
g
->
groupname
])
&&
g
->
pri
>=
pri
)
{
if
(
fgd
&&
g
->
pri
==
pri
)
if
(
fgd
&&
g
d
!=
fgd
&&
g
->
pri
==
pri
)
{
warn
(
root
->
fileName
.
data
(),
root
->
startLine
,
"Warning: Member %s found in multiple %s groups! "
...
...
src/htags.cpp
0 → 100644
View file @
5bd970b1
/******************************************************************************
*
* Copyright (C) 1997-2005 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include <stdio.h>
#include <qdir.h>
#include <qdict.h>
#include "qtbc.h"
#include "htags.h"
#include "util.h"
#include "message.h"
#include "config.h"
bool
Htags
::
useHtags
=
FALSE
;
static
QDir
g_inputDir
;
static
QDict
<
QCString
>
g_symbolDict
(
10007
);
/*! constructs command line of htags(1) and executes it.
* \retval TRUE success
* \retval FALSE an error has occured.
*/
bool
Htags
::
execute
(
const
QCString
&
htmldir
)
{
static
QStrList
&
inputSource
=
Config_getList
(
"INPUT"
);
static
bool
quiet
=
Config_getBool
(
"QUIET"
);
static
bool
warnings
=
Config_getBool
(
"WARNINGS"
);
static
QCString
htagsOptions
=
""
;
//Config_getString("HTAGS_OPTIONS");
static
QCString
projectName
=
Config_getString
(
"PROJECT_NAME"
);
static
QCString
projectNumber
=
Config_getString
(
"PROJECT_NUMBER"
);
QCString
cwd
=
convertToQCString
(
QDir
::
currentDirPath
());
if
(
inputSource
.
isEmpty
())
{
g_inputDir
.
setPath
(
cwd
);
}
else
if
(
inputSource
.
count
()
==
1
)
{
g_inputDir
.
setPath
(
inputSource
.
first
());
if
(
!
g_inputDir
.
exists
())
err
(
"Error: Cannot find directory %s. "
"Check the value of the INPUT tag in the configuration file.
\n
"
,
inputSource
.
first
()
);
}
else
{
err
(
"Error: If you use USE_HTAGS then INPUT should specific a single directory.
\n
"
);
return
FALSE
;
}
/*
* Construct command line for htags(1).
*/
QCString
commandLine
=
" -g -s -a -n"
;
if
(
!
quiet
)
commandLine
+=
"-v "
;
if
(
warnings
)
commandLine
+=
"-w "
;
if
(
!
htagsOptions
.
isEmpty
())
{
commandLine
+=
' '
;
commandLine
+=
htagsOptions
;
}
if
(
!
projectName
.
isEmpty
())
{
commandLine
+=
"-t
\"
"
;
commandLine
+=
projectName
;
if
(
!
projectNumber
.
isEmpty
())
{
commandLine
+=
'-'
;
commandLine
+=
projectNumber
;
}
commandLine
+=
"
\"
"
;
}
commandLine
+=
"
\"
"
+
htmldir
+
"
\"
"
;
QCString
oldDir
=
convertToQCString
(
QDir
::
currentDirPath
());
QDir
::
setCurrent
(
g_inputDir
.
absPath
());
//printf("CommandLine=[%s]\n",commandLine.data());
bool
result
=
iSystem
(
"htags"
,
commandLine
,
FALSE
)
==
0
;
QDir
::
setCurrent
(
oldDir
);
return
result
;
}
/*! load filemap and make index.
* \param htmlDir of HTML directory generated by htags(1).
* \retval TRUE success
* \retval FALSE error
*/
bool
Htags
::
loadFilemap
(
const
QCString
&
htmlDir
)
{
QCString
fileMapName
=
htmlDir
+
"/HTML/FILEMAP"
;
QCString
fileMap
;
QFileInfo
fi
(
fileMapName
);
/*
* Construct FILEMAP dictionary using QDict.
*
* In FILEMAP, URL includes 'html' suffix but we cut it off according
* to the method of FileDef class.
*
* FILEMAP format:
* <NAME>\t<HREF>.html\n
* QDICT:
* dict[<NAME>] = <HREF>
*/
if
(
fi
.
exists
()
&&
fi
.
isReadable
())
{
QFile
f
(
fileMapName
);
const
int
maxlen
=
8192
;
QCString
line
(
maxlen
+
1
);
line
.
at
(
maxlen
)
=
'\0'
;
if
(
f
.
open
(
IO_ReadOnly
))
{
while
(
f
.
readLine
(
line
.
data
(),
maxlen
)
>
0
)
{
//printf("Read line: %s",line.data());
int
sep
=
line
.
find
(
'\t'
);
if
(
sep
!=-
1
)
{
QCString
key
=
line
.
left
(
sep
).
stripWhiteSpace
();
QCString
value
=
line
.
mid
(
sep
+
1
).
stripWhiteSpace
();
int
ext
=
value
.
findRev
(
'.'
);
if
(
ext
!=-
1
)
value
=
value
.
left
(
ext
);
// strip extension
g_symbolDict
.
setAutoDelete
(
TRUE
);
g_symbolDict
.
insert
(
key
,
new
QCString
(
value
));
//printf("Key/Value=(%s,%s)\n",key.data(),value.data());
}
}
return
TRUE
;
}
else
{
err
(
"Error: file %s cannot be opened
\n
"
,
fileMapName
.
data
());
}
}
return
FALSE
;
}
/*! convert path name into the url in the hypertext generated by htags.
* \param path path name
* \returns URL NULL: not found.
*/
QCString
Htags
::
path2URL
(
const
QCString
&
path
)
{
QCString
url
,
symName
=
path
;
QCString
dir
=
convertToQCString
(
g_inputDir
.
absPath
());
int
dl
=
dir
.
length
();
if
((
int
)
symName
.
length
()
>
dl
+
1
)
{
symName
=
symName
.
mid
(
dl
+
1
);
}
if
(
!
symName
.
isEmpty
())
{
QCString
*
result
=
g_symbolDict
[
symName
];
//printf("path2URL=%s symName=%s result=%p\n",path.data(),symName.data(),result);
if
(
result
)
{
url
=
"HTML/"
+
*
result
;
}
}
return
url
;
}
src/htags.h
0 → 100644
View file @
5bd970b1
/******************************************************************************
*
* Copyright (C) 1997-2005 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef HTAGS_H
#define HTAGS_H
class
QCString
;
struct
Htags
{
static
bool
useHtags
;
static
bool
loadFilemap
(
const
QCString
&
htmldir
);
static
QCString
path2URL
(
const
QCString
&
path
);
static
bool
execute
(
const
QCString
&
htmldir
);
};
#endif
/* HTAGS_H */
src/htmlgen.cpp
View file @
5bd970b1
...
...
@@ -599,9 +599,13 @@ void HtmlGenerator::writeStyleInfo(int part)
}
void
HtmlGenerator
::
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
anchor
,
const
char
*
name
)
const
char
*
anchor
,
const
char
*
name
,
const
char
*
args
)
{
t
<<
"<a class=
\"
anchor
\"
name=
\"
"
<<
anchor
<<
"
\"
doxytag=
\"
"
<<
name
<<
"
\"
></a>"
;
t
<<
"<a class=
\"
anchor
\"
name=
\"
"
<<
anchor
<<
"
\"
></a>"
;
t
<<
"<!-- doxytag: member=<"
<<
name
<<
"> ref=<"
<<
anchor
<<
"> args=<"
;
docify
(
args
);
t
<<
"> -->"
;
}
void
HtmlGenerator
::
endDoxyAnchor
(
const
char
*
,
const
char
*
)
...
...
src/htmlgen.h
View file @
5bd970b1
...
...
@@ -136,7 +136,8 @@ class HtmlGenerator : public OutputGenerator
void
startMemberDoc
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
endMemberDoc
(
bool
);
void
startDoxyAnchor
(
const
char
*
fName
,
const
char
*
manName
,
const
char
*
anchor
,
const
char
*
name
);
const
char
*
anchor
,
const
char
*
name
,
const
char
*
args
);
void
endDoxyAnchor
(
const
char
*
fName
,
const
char
*
anchor
);
void
startCodeAnchor
(
const
char
*
label
)
{
t
<<
"<a name=
\"
"
<<
label
<<
"
\"
></a>"
;
}
void
endCodeAnchor
()
{
}
...
...
src/index.cpp
View file @
5bd970b1
...
...
@@ -232,19 +232,6 @@ void endFile(OutputList &ol,bool)
ol
.
pushGeneratorState
();
ol
.
disableAllBut
(
OutputGenerator
::
Html
);
ol
.
writeFooter
();
// write the footer
//if (Config_getString("HTML_FOOTER").isEmpty())
//{
// ol.parseText(theTranslator->trGeneratedAt(
// dateToString(TRUE),
// Config_getString("PROJECT_NAME")
// ));
//}
//ol.writeFooter(1,external); // write the link to the picture
//if (Config_getString("HTML_FOOTER").isEmpty())
//{
// parseText(ol,theTranslator->trWrittenBy());
//}
//ol.writeFooter(2,external); // end the footer
ol
.
popGeneratorState
();
ol
.
endFile
();
}
...
...
@@ -1160,52 +1147,6 @@ void writeAnnotatedClassList(OutputList &ol)
//----------------------------------------------------------------------------
// OBSOLETE
//void writePackageList(OutputList &ol)
//{
// bool &generateHtml = Config_getBool("GENERATE_HTML") ;
// bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
// bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
// ol.startIndexList();
// PackageSDict::Iterator pdi(Doxygen::packageDict);
// PackageDef *pd;
// for (;(pd=pdi.current());++pdi)
// {
// if (!pd->isReference())
// {
// //ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name());
// ol.startIndexKey();
// ol.writeObjectLink(0,pd->getOutputFileBase(),0,pd->name());
// ol.endIndexKey();
// bool hasBrief = !pd->briefDescription().isEmpty();
// ol.startIndexValue(hasBrief);
// if (hasBrief)
// {
// //ol.docify(" (");
// parseDoc(ol,
// pd->getDefFileName(),pd->getDefLine(),
// pd,0,
// abbreviate(pd->briefDescription(),pd->name()));
// //ol.docify(")");
// }
// ol.endIndexValue(pd->getOutputFileBase(),hasBrief);
//
// //ol.writeEndAnnoItem(pd->getOutputFileBase());
// if (hasHtmlHelp)
// {
// HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase());
// }
// if (hasFtvHelp)
// {
// FTVHelp::getInstance()->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name());
// }
// }
// }
// ol.endIndexList();
//}
//----------------------------------------------------------------------------
// write an alphabetical index of all class with a header for each letter
void
writeAlphabeticalClassList
(
OutputList
&
ol
)
{
...
...
@@ -1458,57 +1399,6 @@ void writeAnnotatedIndex(OutputList &ol)
//----------------------------------------------------------------------------
//void writePackageIndex(OutputList &ol)
//{
// bool &generateHtml = Config_getBool("GENERATE_HTML") ;
// bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
// bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
//
// if (documentedPackages==0) return;
//
// ol.pushGeneratorState();
// ol.disable(OutputGenerator::Man);
// startFile(ol,"packages",0,"Package Index");
// startTitle(ol,0);
// QCString title = theTranslator->trPackageList();
// QCString htmlHelpTitle = title;
// QCString ftvHelpTitle = title;
// if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
// parseText(ol,title);
// endTitle(ol,0,0);
// ol.startTextBlock();
// HtmlHelp *htmlHelp = 0;
// FTVHelp *ftvHelp = 0;
// if (hasHtmlHelp)
// {
// htmlHelp = HtmlHelp::getInstance();
// htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"packages");
// htmlHelp->incContentsDepth();
// }
// if (hasFtvHelp)
// {
// ftvHelp = FTVHelp::getInstance();
// ftvHelp->addContentsItem(TRUE,0,"packages",0,ftvHelpTitle);
// ftvHelp->incContentsDepth();
// }
// parseText(ol,theTranslator->trPackageListDescription());
// ol.endTextBlock();
// writePackageList(ol);
// if (hasHtmlHelp)
// {
// htmlHelp->decContentsDepth();
// }
// if (hasFtvHelp)
// {
// ftvHelp->decContentsDepth();
// }
//
// endFile(ol);
// ol.popGeneratorState();
//}
//----------------------------------------------------------------------------
void
writeMemberList
(
OutputList
&
ol
,
bool
useSections
,
ClassMemberHighlight
filter
,
char
sectionFilter
)
{
...
...
@@ -2413,17 +2303,74 @@ void countRelatedPages(int &docPages,int &indexPages)
PageDef
*
pd
=
0
;
for
(
pdi
.
toFirst
();(
pd
=
pdi
.
current
());
++
pdi
)
{
if
(
!
pd
->
getGroupDef
()
&&
(
!
pd
->
isReference
()
||
Config_getBool
(
"ALLEXTERNALS"
)))
if
(
pd
->
visibleInIndex
())
{
indexPages
++
;
if
(
!
pd
->
isReference
())
docPages
++
;
}
if
(
pd
->
documentedPage
())
{
docPages
++
;
}
}
}
//----------------------------------------------------------------------------
static
void
writeSubPages
(
PageDef
*
pd
)
{
//printf("Write subpages(%s #=%d)\n",pd->name().data(),pd->getSubPages() ? pd->getSubPages()->count() : 0 );
static
bool
generateHtml
=
Config_getBool
(
"GENERATE_HTML"
)
;
static
bool
hasHtmlHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_HTMLHELP"
);
static
bool
hasFtvHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_TREEVIEW"
);
HtmlHelp
*
htmlHelp
=
0
;
if
(
hasHtmlHelp
)
{
htmlHelp
=
HtmlHelp
::
getInstance
();
htmlHelp
->
incContentsDepth
();
}
FTVHelp
*
ftvHelp
=
0
;
if
(
hasFtvHelp
)
{
ftvHelp
=
FTVHelp
::
getInstance
();
ftvHelp
->
incContentsDepth
();
}
PageSDict
*
subPages
=
pd
->
getSubPages
();
if
(
subPages
)
{
PageSDict
::
Iterator
pi
(
*
subPages
);
PageDef
*
subPage
;
for
(
pi
.
toFirst
();(
subPage
=
pi
.
current
());
++
pi
)
{
QCString
pageTitle
;
if
(
subPage
->
title
().
isEmpty
())
pageTitle
=
subPage
->
name
();
else
pageTitle
=
subPage
->
title
();
bool
hasSubPages
=
subPage
->
hasSubPages
();
if
(
hasHtmlHelp
)
{
htmlHelp
->
addContentsItem
(
hasSubPages
,
pageTitle
,
subPage
->
getOutputFileBase
());
}
if
(
hasFtvHelp
)
{
ftvHelp
->
addContentsItem
(
hasSubPages
,
subPage
->
getReference
(),
subPage
->
getOutputFileBase
(),
0
,
pageTitle
);
}
writeSubPages
(
subPage
);
}
}
if
(
hasHtmlHelp
)
{
htmlHelp
->
decContentsDepth
();
}
if
(
hasFtvHelp
)
{
ftvHelp
->
decContentsDepth
();
}
}
void
writePageIndex
(
OutputList
&
ol
)
{
...
...
@@ -2441,9 +2388,9 @@ void writePageIndex(OutputList &ol)
ol
.
startTextBlock
();
HtmlHelp
*
htmlHelp
=
0
;
FTVHelp
*
ftvHelp
=
0
;
bool
&
generateHtml
=
Config_getBool
(
"GENERATE_HTML"
)
;
bool
hasHtmlHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_HTMLHELP"
);
bool
hasFtvHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_TREEVIEW"
);
static
bool
generateHtml
=
Config_getBool
(
"GENERATE_HTML"
)
;
static
bool
hasHtmlHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_HTMLHELP"
);
static
bool
hasFtvHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_TREEVIEW"
);
if
(
hasHtmlHelp
)
{
htmlHelp
=
HtmlHelp
::
getInstance
();
...
...
@@ -2463,8 +2410,7 @@ void writePageIndex(OutputList &ol)
PageDef
*
pd
=
0
;
for
(
pdi
.
toFirst
();(
pd
=
pdi
.
current
());
++
pdi
)
{
if
(
!
pd
->
getGroupDef
()
&&
(
!
pd
->
isReference
()
||
Config_getBool
(
"ALLEXTERNALS"
)))
if
(
pd
->
visibleInIndex
())
{
QCString
pageTitle
;
...
...
@@ -2473,6 +2419,8 @@ void writePageIndex(OutputList &ol)
else
pageTitle
=
pd
->
title
();
bool
hasSubPages
=
pd
->
hasSubPages
();
ol
.
writeIndexItem
(
pd
->
getReference
(),
pd
->
getOutputFileBase
(),
pageTitle
);
if
(
pd
->
isReference
())
{
...
...
@@ -2481,8 +2429,15 @@ void writePageIndex(OutputList &ol)
ol
.
endTypewriter
();
}
ol
.
writeString
(
"
\n
"
);
if
(
hasHtmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
pageTitle
,
pd
->
getOutputFileBase
());
if
(
hasFtvHelp
)
ftvHelp
->
addContentsItem
(
FALSE
,
pd
->
getReference
(),
pd
->
getOutputFileBase
(),
0
,
pageTitle
);
if
(
hasHtmlHelp
)
{
htmlHelp
->
addContentsItem
(
hasSubPages
,
pageTitle
,
pd
->
getOutputFileBase
());
}
if
(
hasFtvHelp
)
{
ftvHelp
->
addContentsItem
(
hasSubPages
,
pd
->
getReference
(),
pd
->
getOutputFileBase
(),
0
,
pageTitle
);
}
writeSubPages
(
pd
);
}
}
endIndexHierarchy
(
ol
,
0
);
...
...
@@ -3018,62 +2973,6 @@ void writeDirHierarchy(OutputList &ol)
//----------------------------------------------------------------------------
#if 0
void writeGroupList(OutputList &ol)
{
bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_TREEVIEW");
HtmlHelp *htmlHelp = 0;
FTVHelp *ftvHelp = 0;
if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
if (hasFtvHelp) ftvHelp = FTVHelp::getInstance();
ol.startDescription();
GroupListIterator gli(Doxygen::groupList);
GroupDef *gd;
for (;(gd=gli.current());++gli)
{
//printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
//if (gd->countMembers()>0)
//{
if (gd->hasDocumentation())
{
ol.startDescItem();
ol.startTextLink(gd->getOutputFileBase(),0);
parseText(ol,gd->groupTitle());
ol.endTextLink();
ol.endDescItem();
parseDoc(ol,
gd->briefFile(),gd->briefLine(),
gd,0,gd->briefDescription());
ol.newParagraph();
//}
const char *docFile = 0;
if (gd->hasDocumentation()) docFile = gd->getOutputFileBase();
if (hasHtmlHelp)
{
htmlHelp = HtmlHelp::getInstance();
if (!Config::instance()->get(""))
{
htmlHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
}
}
if (hasFtvHelp)
{
ftvHelp = FTVHelp::getInstance();
if (!Config::instance()->get(""))
{
ftvHelp->addContentsItem(FALSE,gd->groupTitle(),docFile);
}
}
}
}
ol.endDescription();
}
#endif
//----------------------------------------------------------------------------
void
writeGroupIndex
(
OutputList
&
ol
)
{
if
(
documentedGroups
==
0
)
return
;
...
...
@@ -3220,16 +3119,24 @@ void writeIndex(OutputList &ol)
if
(
Config_getBool
(
"GENERATE_TREEVIEW"
))
indexName
=
"main"
;
ol
.
startFile
(
indexName
,
0
,
title
);
if
(
Doxygen
::
mainPage
)
{
bool
&
generateHtml
=
Config_getBool
(
"GENERATE_HTML"
)
;
bool
hasHtmlHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_HTMLHELP"
);
bool
hasFtvHelp
=
generateHtml
&&
Config_getBool
(
"GENERATE_TREEVIEW"
);
if
(
hasHtmlHelp
)
{
HtmlHelp
::
getInstance
()
->
addContentsItem
(
FALSE
,
title
,
indexName
);
HtmlHelp
::
getInstance
()
->
addContentsItem
(
Doxygen
::
mainPage
->
hasSubPages
()
,
title
,
indexName
);
}
if
(
hasFtvHelp
)
{
FTVHelp
::
getInstance
()
->
addContentsItem
(
FALSE
,
0
,
indexName
,
0
,
title
);
FTVHelp
::
getInstance
()
->
addContentsItem
(
Doxygen
::
mainPage
->
hasSubPages
(),
0
,
indexName
,
0
,
title
);
}
if
(
Doxygen
::
mainPage
->
hasSubPages
())
{
writeSubPages
(
Doxygen
::
mainPage
);
}
}
if
(
!
Config_getBool
(
"DISABLE_INDEX"
))
ol
.
writeQuickLinks
(
TRUE
,
HLI_Main
);
...
...
src/language.cpp
View file @
5bd970b1
...
...
@@ -332,6 +332,12 @@ bool setTranslator(const char *langName)
theTranslator
=
new
TranslatorLithuanian
;
}
#endif
#ifdef LANG_ZA
else
if
(
L_EQUAL
(
"afrikaans"
))
{
theTranslator
=
new
TranslatorAfrikaans
;
}
#endif
#endif // ENGLISH_ONLY
else
// use the default language (i.e. english)
{
...
...
src/latexgen.cpp
View file @
5bd970b1
...
...
@@ -1133,7 +1133,8 @@ void LatexGenerator::endMemberDoc(bool)
}
void
LatexGenerator
::
startDoxyAnchor
(
const
char
*
fName
,
const
char
*
,
const
char
*
anchor
,
const
char
*
)
const
char
*
anchor
,
const
char
*
,
const
char
*
)
{
if
(
Config_getBool
(
"PDF_HYPERLINKS"
))
{
...
...
src/latexgen.h
View file @
5bd970b1
...
...
@@ -129,7 +129,7 @@ class LatexGenerator : public OutputGenerator
void
lineBreak
()
{
t
<<
"
\\
par
\n
"
;
}
void
startMemberDoc
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
endMemberDoc
(
bool
);
void
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
endDoxyAnchor
(
const
char
*
,
const
char
*
);
void
startCodeAnchor
(
const
char
*
)
{}
void
endCodeAnchor
()
{}
...
...
src/libdoxygen.pro.in
View file @
5bd970b1
...
...
@@ -47,6 +47,7 @@ HEADERS = bufstr.h \
formula.h \
ftvhelp.h \
groupdef.h \
htags.h \
htmlattrib.h \
htmldocvisitor.h \
htmlgen.h \
...
...
@@ -150,6 +151,7 @@ SOURCES = ce_lex.cpp \
formula.cpp \
ftvhelp.cpp \
groupdef.cpp \
htags.cpp \
htmldocvisitor.cpp \
htmlgen.cpp \
htmlhelp.cpp \
...
...
src/mangen.cpp
View file @
5bd970b1
...
...
@@ -372,7 +372,8 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c
}
void
ManGenerator
::
startDoxyAnchor
(
const
char
*
,
const
char
*
manName
,
const
char
*
,
const
char
*
name
)
const
char
*
,
const
char
*
name
,
const
char
*
)
{
// something to be done?
if
(
!
Config_getBool
(
"MAN_LINKS"
)
)
...
...
src/mangen.h
View file @
5bd970b1
...
...
@@ -139,7 +139,7 @@ class ManGenerator : public OutputGenerator
void
writeChar
(
char
c
);
void
startMemberDoc
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
endMemberDoc
(
bool
);
void
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
endDoxyAnchor
(
const
char
*
,
const
char
*
)
{}
void
startCodeAnchor
(
const
char
*
)
{}
void
endCodeAnchor
()
{}
...
...
src/memberdef.cpp
View file @
5bd970b1
...
...
@@ -333,10 +333,10 @@ MemberDef::MemberDef(const char *df,int dl,
m_hasCallGraph
=
FALSE
;
initLines
=
0
;
type
=
t
;
if
(
mt
==
Typedef
&&
type
.
left
(
8
)
==
"typedef "
)
type
=
type
.
mid
(
8
);
if
(
type
.
left
(
7
)
==
"struct "
)
type
=
type
.
right
(
type
.
length
()
-
7
);
if
(
type
.
left
(
6
)
==
"class "
)
type
=
type
.
right
(
type
.
length
()
-
6
);
if
(
type
.
left
(
6
)
==
"union "
)
type
=
type
.
right
(
type
.
length
()
-
6
);
if
(
mt
==
Typedef
)
type
.
stripPrefix
(
"typedef "
);
type
.
stripPrefix
(
"struct "
);
type
.
stripPrefix
(
"class "
);
type
.
stripPrefix
(
"union "
);
type
=
removeRedundantWhiteSpace
(
type
);
args
=
a
;
...
...
@@ -637,7 +637,7 @@ bool MemberDef::isLinkableInProject() const
//printf("in a namespace but namespace not linkable!\n");
return
FALSE
;
// in namespace but namespace not linkable
}
if
(
!
group
&&
!
nspace
&&
!
related
&&
fileDef
&&
!
fileDef
->
isLinkableInProject
())
if
(
!
group
&&
!
nspace
&&
!
related
&&
!
classDef
&&
fileDef
&&
!
fileDef
->
isLinkableInProject
())
{
//printf("in a file but file not linkable!\n");
return
FALSE
;
// in file (and not in namespace) but file not linkable
...
...
@@ -685,6 +685,10 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *,
QCString
n
=
name
();
if
(
classDef
&&
gd
)
n
.
prepend
(
classDef
->
name
()
+
sep
);
else
if
(
nspace
&&
(
gd
||
fd
))
n
.
prepend
(
nspace
->
name
()
+
sep
);
if
(
isObjCMethod
())
{
if
(
isStatic
())
ol
.
docify
(
"+ "
);
else
ol
.
docify
(
"- "
);
}
if
(
!
onlyText
)
// write link
{
ol
.
writeObjectLink
(
getReference
(),
getOutputFileBase
(),
anchor
(),
n
);
...
...
@@ -717,7 +721,7 @@ ClassDef *MemberDef::getClassDefOfAnonymousType()
// strip `static' keyword from ltype
//if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7);
// strip `friend' keyword from ltype
if
(
ltype
.
left
(
7
)
==
"friend "
)
ltype
=
ltype
.
right
(
ltype
.
length
()
-
7
);
ltype
.
stripPrefix
(
"friend "
);
static
QRegExp
r
(
"@[0-9]+"
);
int
l
,
i
=
r
.
match
(
ltype
,
0
,
&
l
);
//printf("ltype=`%s' i=%d\n",ltype.data(),i);
...
...
@@ -943,7 +947,8 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
QCString
doxyName
=
name
().
copy
();
if
(
!
cname
.
isEmpty
())
doxyName
.
prepend
(
cname
+
"::"
);
ol
.
startDoxyAnchor
(
cfname
,
cname
,
anchor
(),
doxyName
);
QCString
doxyArgs
=
argsString
();
ol
.
startDoxyAnchor
(
cfname
,
cname
,
anchor
(),
doxyName
,
doxyArgs
);
ol
.
pushGeneratorState
();
ol
.
disable
(
OutputGenerator
::
Man
);
...
...
@@ -973,7 +978,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
QCString
ltype
(
type
);
if
(
mtype
==
Typedef
)
ltype
.
prepend
(
"typedef "
);
// strip `friend' keyword from ltype
if
(
ltype
.
left
(
7
)
==
"friend "
)
ltype
=
ltype
.
right
(
ltype
.
length
()
-
7
);
ltype
.
stripPrefix
(
"friend "
);
static
QRegExp
r
(
"@[0-9]+"
);
bool
endAnonScopeNeeded
=
FALSE
;
...
...
@@ -1308,6 +1313,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
QCString
doxyName
=
name
().
copy
();
// prepend scope if there is any. TODO: make this optional for C only docs
if
(
scopeName
)
doxyName
.
prepend
((
QCString
)
scopeName
+
"::"
);
QCString
doxyArgs
=
argsString
();
QCString
ldef
=
definition
();
//printf("member `%s' def=`%s'\n",name().data(),ldef.data());
...
...
@@ -1340,7 +1346,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
if
(
vmd
->
isEnumerate
()
&&
ldef
.
mid
(
i
,
l
)
==
vmd
->
name
())
{
ol
.
startDoxyAnchor
(
cfname
,
cname
,
memAnchor
,
doxyName
);
ol
.
startDoxyAnchor
(
cfname
,
cname
,
memAnchor
,
doxyName
,
doxyArgs
);
ol
.
startMemberDoc
(
cname
,
name
(),
memAnchor
,
name
());
linkifyText
(
TextGeneratorOLImpl
(
ol
),
container
,
getBodyDef
(),
name
(),
ldef
.
left
(
i
));
vmd
->
writeEnumDeclaration
(
ol
,
getClassDef
(),
getNamespaceDef
(),
getFileDef
(),
getGroupDef
());
...
...
@@ -1352,7 +1358,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if
(
!
found
)
// anonymous compound
{
//printf("Anonymous compound `%s'\n",cname.data());
ol
.
startDoxyAnchor
(
cfname
,
cname
,
memAnchor
,
doxyName
);
ol
.
startDoxyAnchor
(
cfname
,
cname
,
memAnchor
,
doxyName
,
doxyArgs
);
ol
.
startMemberDoc
(
cname
,
name
(),
memAnchor
,
name
());
// strip anonymous compound names from definition
int
si
=
ldef
.
find
(
' '
),
pi
,
ei
=
i
+
l
;
...
...
@@ -1370,7 +1376,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else
// not an enum value
{
ol
.
startDoxyAnchor
(
cfname
,
cname
,
memAnchor
,
doxyName
);
ol
.
startDoxyAnchor
(
cfname
,
cname
,
memAnchor
,
doxyName
,
doxyArgs
);
ol
.
startMemberDoc
(
cname
,
name
(),
memAnchor
,
name
());
ClassDef
*
cd
=
getClassDef
();
...
...
@@ -1678,7 +1684,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
//ol.writeListItem();
ol
.
startDescTableTitle
();
// this enables emphasis!
ol
.
startDoxyAnchor
(
cfname
,
cname
,
fmd
->
anchor
(),
fmd
->
name
());
ol
.
startDoxyAnchor
(
cfname
,
cname
,
fmd
->
anchor
(),
fmd
->
name
()
,
fmd
->
argsString
()
);
first
=
FALSE
;
//ol.startEmphasis();
ol
.
docify
(
fmd
->
name
());
...
...
@@ -2396,3 +2402,20 @@ void MemberDef::setTagInfo(TagInfo *ti)
}
}
QCString
MemberDef
::
objCMethodName
(
bool
localLink
,
bool
showStatic
)
const
{
QCString
qm
;
if
(
showStatic
)
{
if
(
isStatic
())
qm
=
"+ "
;
else
qm
=
"- "
;
}
qm
+=
name
();
if
(
!
localLink
)
// link to method of same class
{
qm
+=
" ("
;
qm
+=
classDef
->
name
();
qm
+=
")"
;
}
return
qm
;
}
src/memberdef.h
View file @
5bd970b1
...
...
@@ -106,6 +106,7 @@ class MemberDef : public Definition
int
getGroupStartLine
()
const
{
return
groupStartLine
;
}
bool
getGroupHasDocs
()
const
{
return
groupHasDocs
;
}
QCString
qualifiedName
();
QCString
objCMethodName
(
bool
localLink
,
bool
showStatic
)
const
;
// direct kind info
Protection
protection
()
const
{
return
prot
;
}
...
...
src/namespacedef.cpp
View file @
5bd970b1
...
...
@@ -434,6 +434,8 @@ void NamespaceDef::writeMemberPages(OutputList &ol)
void
NamespaceDef
::
writeQuickMemberLinks
(
OutputList
&
ol
,
MemberDef
*
currentMd
)
const
{
static
bool
createSubDirs
=
Config_getBool
(
"CREATE_SUBDIRS"
);
ol
.
writeString
(
" <div class=
\"
navtab
\"
>
\n
"
);
ol
.
writeString
(
" <table>
\n
"
);
...
...
@@ -455,6 +457,7 @@ void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) co
ol
.
writeString
(
"<a class=
\"
qindex
\"
"
);
}
ol
.
writeString
(
"href=
\"
"
);
if
(
createSubDirs
)
ol
.
writeString
(
"../../"
);
ol
.
writeString
(
md
->
getOutputFileBase
()
+
Doxygen
::
htmlFileExtension
+
"#"
+
md
->
anchor
());
ol
.
writeString
(
"
\"
>"
);
ol
.
writeString
(
md
->
localName
());
...
...
src/outputgen.h
View file @
5bd970b1
...
...
@@ -323,7 +323,8 @@ class OutputGenerator : public BaseOutputDocInterface
const
char
*
,
const
char
*
)
=
0
;
virtual
void
endMemberDoc
(
bool
)
=
0
;
virtual
void
startDoxyAnchor
(
const
char
*
fName
,
const
char
*
manName
,
const
char
*
anchor
,
const
char
*
name
)
=
0
;
const
char
*
anchor
,
const
char
*
name
,
const
char
*
args
)
=
0
;
virtual
void
endDoxyAnchor
(
const
char
*
fileName
,
const
char
*
anchor
)
=
0
;
virtual
void
writeLatexSpacing
()
=
0
;
virtual
void
writeStartAnnoItem
(
const
char
*
type
,
const
char
*
file
,
...
...
src/outputlist.cpp
View file @
5bd970b1
...
...
@@ -258,6 +258,18 @@ void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4),a1,a2,a3,a4)
} \
}
// five arguments
#define FORALL5(a1,a2,a3,a4,a5,p1,p2,p3,p4,p5) \
void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4,a5),a1,a2,a3,a4,a5) \
{ \
OutputGenerator *og=outputs->first(); \
while (og) \
{ \
if (og->isEnabled()) (og->*func)(p1,p2,p3,p4,p5); \
og=outputs->next(); \
} \
}
// now instantiate only the ones we need.
FORALL1
(
const
char
*
a1
,
a1
)
...
...
@@ -293,6 +305,7 @@ FORALL3(uchar a1,uchar a2,uchar a3,a1,a2,a3)
FORALL4
(
SectionTypes
a1
,
const
char
*
a2
,
const
char
*
a3
,
const
char
*
a4
,
a1
,
a2
,
a3
,
a4
)
FORALL4
(
const
char
*
a1
,
const
char
*
a2
,
const
char
*
a3
,
const
char
*
a4
,
a1
,
a2
,
a3
,
a4
)
FORALL4
(
const
char
*
a1
,
const
char
*
a2
,
const
char
*
a3
,
int
a4
,
a1
,
a2
,
a3
,
a4
)
FORALL5
(
const
char
*
a1
,
const
char
*
a2
,
const
char
*
a3
,
const
char
*
a4
,
const
char
*
a5
,
a1
,
a2
,
a3
,
a4
,
a5
)
//--------------------------------------------------------------------------
src/outputlist.h
View file @
5bd970b1
...
...
@@ -31,6 +31,8 @@
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3),arg1,arg2,arg3)
#define FORALLPROTO4(arg1,arg2,arg3,arg4) \
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4),arg1,arg2,arg3,arg4)
#define FORALLPROTO5(arg1,arg2,arg3,arg4,arg5) \
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4,arg5),arg1,arg2,arg3,arg4,arg5)
class
ClassDiagram
;
class
DotClassGraph
;
...
...
@@ -217,8 +219,9 @@ class OutputList : public OutputDocInterface
void
endMemberDoc
(
bool
hasArgs
)
{
forall
(
&
OutputGenerator
::
endMemberDoc
,
hasArgs
);
}
void
startDoxyAnchor
(
const
char
*
fName
,
const
char
*
manName
,
const
char
*
anchor
,
const
char
*
name
)
{
forall
(
&
OutputGenerator
::
startDoxyAnchor
,
fName
,
manName
,
anchor
,
name
);
}
const
char
*
anchor
,
const
char
*
name
,
const
char
*
args
)
{
forall
(
&
OutputGenerator
::
startDoxyAnchor
,
fName
,
manName
,
anchor
,
name
,
args
);
}
void
endDoxyAnchor
(
const
char
*
fn
,
const
char
*
anchor
)
{
forall
(
&
OutputGenerator
::
endDoxyAnchor
,
fn
,
anchor
);
}
void
startCodeAnchor
(
const
char
*
label
)
...
...
@@ -423,6 +426,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO4
(
SectionTypes
,
const
char
*
,
const
char
*
,
const
char
*
);
FORALLPROTO4
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
FORALLPROTO4
(
const
char
*
,
const
char
*
,
const
char
*
,
bool
);
FORALLPROTO5
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
OutputList
(
const
OutputList
&
ol
);
QList
<
OutputGenerator
>
*
outputs
;
...
...
src/pagedef.cpp
View file @
5bd970b1
...
...
@@ -5,6 +5,7 @@
#include "util.h"
#include "outputlist.h"
#include "doxygen.h"
#include "language.h"
PageDef
::
PageDef
(
const
char
*
f
,
int
l
,
const
char
*
n
,
...
...
@@ -77,6 +78,9 @@ void PageDef::writeDocumentation(OutputList &ol)
{
ol
.
startSection
(
si
->
label
,
si
->
title
,
si
->
type
);
ol
.
docify
(
si
->
title
);
stringToSearchIndex
(
getOutputFileBase
(),
theTranslator
->
trPage
(
TRUE
,
TRUE
)
+
" "
+
si
->
title
,
si
->
title
);
ol
.
endSection
(
si
->
label
,
si
->
type
);
}
ol
.
startTextBlock
();
...
...
@@ -117,4 +121,29 @@ void PageDef::writeDocumentation(OutputList &ol)
}
}
bool
PageDef
::
visibleInIndex
()
const
{
return
// not part of a group
!
getGroupDef
()
&&
// not an externally defined page
(
!
isReference
()
||
Config_getBool
(
"ALLEXTERNALS"
))
&&
// not a subpage
(
getOuterScope
()
==
0
||
getOuterScope
()
->
definitionType
()
!=
Definition
::
TypePage
);
}
bool
PageDef
::
documentedPage
()
const
{
return
// not part of a group
!
getGroupDef
()
&&
// not an externally defined page
!
isReference
();
}
bool
PageDef
::
hasSubPages
()
const
{
return
subPageDict
->
count
()
>
0
;
}
src/pagedef.h
View file @
5bd970b1
...
...
@@ -46,6 +46,9 @@ class PageDef : public Definition
PageSDict
*
getSubPages
()
const
{
return
subPageDict
;
}
void
setFileName
(
const
char
*
name
)
{
m_fileName
=
name
;
}
void
addInnerCompound
(
Definition
*
d
);
bool
visibleInIndex
()
const
;
bool
documentedPage
()
const
;
bool
hasSubPages
()
const
;
private
:
QCString
m_fileName
;
...
...
src/rtfgen.cpp
View file @
5bd970b1
...
...
@@ -1384,7 +1384,9 @@ void RTFGenerator::endMemberDoc(bool)
}
void
RTFGenerator
::
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
)
const
char
*
,
const
char
*
,
const
char
*
)
{
DBG_RTF
(
t
<<
"{
\\
comment startDoxyAnchor}"
<<
endl
)
}
...
...
src/rtfgen.h
View file @
5bd970b1
...
...
@@ -138,7 +138,7 @@ class RTFGenerator : public OutputGenerator
void
lineBreak
();
void
startMemberDoc
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
endMemberDoc
(
bool
);
void
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
startDoxyAnchor
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
endDoxyAnchor
(
const
char
*
,
const
char
*
);
void
startCodeAnchor
(
const
char
*
)
{};
void
endCodeAnchor
()
{};
...
...
src/scanner.l
View file @
5bd970b1
...
...
@@ -95,12 +95,9 @@ static int memberGroupId = DOX_NOGROUP;
static QCString memberGroupHeader;
static QCString memberGroupDocs;
static bool isTypedef;
//static char afterDocTerminator;
static int tmpDocType;
static QCString sectionLabel;
static QCString sectionTitle;
//static SectionInfo::SectionType
// sectionType;
static QCString funcPtrType;
static QCString templateStr;
static QCString aliasName;
...
...
@@ -127,7 +124,6 @@ static QCString *copyArgString;
static QCString fullArgString;
static ArgumentList *currentArgumentList;
//static QCString *currentTemplateSpec;
static char lastCopyArgChar;
static QCString *pCopyRoundString;
static QCString *pCopyCurlyString;
...
...
@@ -688,7 +684,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
%x PrototypeExc
%x PrototypeSkipLine
/**
new
comment parsing states */
/** comment parsing states */
%x DocLine
%x DocBlock
...
...
src/search.php
View file @
5bd970b1
...
...
@@ -21,24 +21,26 @@ function readHeader($file)
function
computeIndex
(
$word
)
{
$lword
=
strtolower
(
$word
);
$l
=
strlen
(
$lword
);
for
(
$i
=
0
;
$i
<
$l
;
$i
++
)
{
$c
=
ord
(
$lword
{
$i
});
$v
=
((
$v
&
0xfc00
)
^
(
$v
<<
6
)
^
$c
)
&
0xffff
;
}
return
$v
;
// Fast string hashing
//$lword = strtolower($word);
//$l = strlen($lword);
//for ($i=0;$i<$l;$i++)
//{
// $c = ord($lword{$i});
// $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
//}
//return $v;
//if (strlen($word)<2) return -1;
// Simple hashing that allows for substring search
if
(
strlen
(
$word
)
<
2
)
return
-
1
;
// high char of the index
//
$hi = ord($word{0});
//
if ($hi==0) return -1;
$hi
=
ord
(
$word
{
0
});
if
(
$hi
==
0
)
return
-
1
;
// low char of the index
//
$lo = ord($word{1});
//
if ($lo==0) return -1;
$lo
=
ord
(
$word
{
1
});
if
(
$lo
==
0
)
return
-
1
;
// return index
//
return $hi*256+$lo;
return
$hi
*
256
+
$lo
;
}
function
search
(
$file
,
$word
,
&
$statsList
)
...
...
@@ -48,7 +50,7 @@ function search($file,$word,&$statsList)
{
fseek
(
$file
,
$index
*
4
+
4
);
// 4 bytes per entry, skip header
$index
=
readInt
(
$file
);
if
(
$index
)
// found words matching
first two characters
if
(
$index
)
// found words matching
the hash key
{
$start
=
sizeof
(
$statsList
);
$count
=
$start
;
...
...
src/search_php.h
View file @
5bd970b1
...
...
@@ -21,24 +21,26 @@
"
\n
"
"function computeIndex($word)
\n
"
"{
\n
"
" $lword = strtolower($word);
\n
"
" $l = strlen($lword);
\n
"
" for ($i=0;$i<$l;$i++)
\n
"
" {
\n
"
" $c = ord($lword{$i});
\n
"
" $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
\n
"
" }
\n
"
" return $v;
\n
"
" // Fast string hashing
\n
"
" //$lword = strtolower($word);
\n
"
" //$l = strlen($lword);
\n
"
" //for ($i=0;$i<$l;$i++)
\n
"
" //{
\n
"
" // $c = ord($lword{$i});
\n
"
" // $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
\n
"
" //}
\n
"
" //return $v;
\n
"
"
\n
"
" //if (strlen($word)<2) return -1;
\n
"
" // Simple hashing that allows for substring search
\n
"
" if (strlen($word)<2) return -1;
\n
"
" // high char of the index
\n
"
"
//
$hi = ord($word{0});
\n
"
"
//
if ($hi==0) return -1;
\n
"
" $hi = ord($word{0});
\n
"
" if ($hi==0) return -1;
\n
"
" // low char of the index
\n
"
"
//
$lo = ord($word{1});
\n
"
"
//
if ($lo==0) return -1;
\n
"
" $lo = ord($word{1});
\n
"
" if ($lo==0) return -1;
\n
"
" // return index
\n
"
"
//
return $hi*256+$lo;
\n
"
" return $hi*256+$lo;
\n
"
"}
\n
"
"
\n
"
"function search($file,$word,&$statsList)
\n
"
...
...
@@ -48,7 +50,7 @@
" {
\n
"
" fseek($file,$index*4+4); // 4 bytes per entry, skip header
\n
"
" $index = readInt($file);
\n
"
" if ($index) // found words matching
first two characters
\n
"
" if ($index) // found words matching
the hash key
\n
"
" {
\n
"
" $start=sizeof($statsList);
\n
"
" $count=$start;
\n
"
...
...
src/searchindex.cpp
View file @
5bd970b1
...
...
@@ -80,20 +80,22 @@ static int charsToIndex(const char *word)
{
if
(
word
==
0
)
return
-
1
;
register
ushort
h
=
0
;
const
char
*
k
=
word
;
ushort
mask
=
0xfc00
;
while
(
*
k
)
{
h
=
(
h
&
mask
)
^
(
h
<<
6
)
^
(
*
k
++
);
}
// Fast string hashing algorithm
//register ushort h=0;
//const char *k = word;
//ushort mask=0xfc00;
//while ( *k )
//{
// h = (h&mask)^(h<<6)^(*k++);
//}
//return h;
//
uint c1=word[0];
//if (c1==0) return -1
;
//uint c2=word[1]
;
//if (c2==0) return -1
;
//return c1*256+c2
;
return
h
;
//
Simple hashing that allows for substring searching
uint
c1
=
word
[
0
]
;
if
(
c1
==
0
)
return
-
1
;
uint
c2
=
word
[
1
]
;
if
(
c2
==
0
)
return
-
1
;
return
c1
*
256
+
c2
;
}
void
SearchIndex
::
addWord
(
const
char
*
word
,
bool
hiPriority
)
...
...
src/translator_en.h
View file @
5bd970b1
...
...
@@ -471,7 +471,7 @@ class TranslatorEnglish : public Translator
* list of (global) variables
*/
virtual
QCString
trEnumerationValues
()
{
return
"Enumerat
ion values
"
;
}
{
return
"Enumerat
or
"
;
}
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
...
...
@@ -501,7 +501,7 @@ class TranslatorEnglish : public Translator
* of documentation blocks for enumeration values
*/
virtual
QCString
trEnumerationValueDocumentation
()
{
return
"Enumerat
ion Value
Documentation"
;
}
{
return
"Enumerat
or
Documentation"
;
}
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
...
...
src/translator_hu.h
View file @
5bd970b1
...
...
@@ -56,7 +56,7 @@ class TranslatorHungarian : public Translator
*/
virtual
QCString
latexLanguageSupportCommand
()
{
return
""
;
return
"
\\
usepackage{t1enc}
\n\\
usepackage[latin2]{inputenc}
\n\\
usepackage[magyar]{babel}
\n
"
;
}
/*! return the language charset. This will be used for the HTML output */
...
...
src/translator_za.h
View file @
5bd970b1
...
...
@@ -26,7 +26,7 @@
#ifndef TRANSLATOR_ZA_H
#define TRANSLATOR_ZA_H
class
TranslatorAfrikaans
:
public
Translator
Adapter_1_3_9
class
TranslatorAfrikaans
:
public
Translator
{
public
:
...
...
@@ -178,10 +178,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual
QCString
trFileList
()
{
return
"Leër Lys"
;
}
/*! This is put above each page as a link to the list of all verbatim headers */
virtual
QCString
trHeaderFiles
()
{
return
"Kop Leër"
;
}
/*! This is put above each page as a link to all members of compounds. */
virtual
QCString
trCompoundMembers
()
{
...
...
@@ -314,10 +310,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
return
result
;
}
/*! This is an introduction to the page with the list of all header files. */
virtual
QCString
trHeaderFilesDescription
()
{
return
"Die kop leers waaruit die API bestaan:"
;
}
/*! This is an introduction to the page with the list of all examples */
virtual
QCString
trExamplesDescription
()
{
return
"'n Lys van alle voorbeelde:"
;
}
...
...
@@ -330,15 +322,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual
QCString
trModulesDescription
()
{
return
"'n Lys van alle modules:"
;
}
/*! This sentences is used in the annotated class/file lists if no brief
* description is given.
*/
virtual
QCString
trNoDescriptionAvailable
()
{
return
"Geen beskrywings beskikbaar"
;
}
// index titles (the project name is prepended for these)
/*! This is used in HTML as the title of index.html. */
virtual
QCString
trDocumentation
()
{
return
"Dokumentasie"
;
}
...
...
@@ -485,12 +468,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual
QCString
trEnumerationTypeDocumentation
()
{
return
"Enumeration Type Dokumentasie"
;
}
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual
QCString
trEnumerationValueDocumentation
()
{
return
"Enumeration Waarde Dokumentasie"
;
}
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
...
...
@@ -545,18 +522,10 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
virtual
QCString
trForInternalUseOnly
()
{
return
"Slegs vir interne gebruik."
;
}
/*! this text is generated when the \\reimp command is used. */
virtual
QCString
trReimplementedForInternalReasons
()
{
return
"Hergeimplimenteer vir interne redes; die API word nie beinvloed nie."
;
}
/*! this text is generated when the \\warning command is used. */
virtual
QCString
trWarning
()
{
return
"Waarskuwing"
;
}
/*! this text is generated when the \\bug command is used. */
virtual
QCString
trBugsAndLimitations
()
{
return
"Bugs and beperkings"
;
}
/*! this text is generated when the \\version command is used. */
virtual
QCString
trVersion
()
{
return
"Weergawe"
;
}
...
...
@@ -794,8 +763,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
case
ClassDef
:
:
Union
:
result
+=
"union"
;
break
;
case
ClassDef
:
:
Interface
:
result
+=
"intervlak"
;
break
;
case
ClassDef
:
:
Protocol
:
result
+=
"protokol"
;
break
;
case
ClassDef
:
:
Category
:
result
+=
"
category
"
;
break
;
case
ClassDef
:
:
Exception
:
result
+=
"e
xception
"
;
break
;
case
ClassDef
:
:
Category
:
result
+=
"
kategorie
"
;
break
;
case
ClassDef
:
:
Exception
:
result
+=
"e
ksepsie
"
;
break
;
}
result
+=
" is gegenereer vanaf die volgende leër"
;
if
(
single
)
result
+=
":"
;
else
result
+=
"s:"
;
...
...
@@ -831,10 +800,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
virtual
QCString
trSources
()
{
return
"Bronne"
;
}
virtual
QCString
trDefinedAtLineInSourceFile
()
{
return
"Gedefinieër by lyn @0 van leër @1."
;
...
...
@@ -1141,11 +1106,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual
QCString
trInterfaces
()
{
return
"Intervlake"
;
}
/*! Used for Java classes in the summary section of Java packages */
virtual
QCString
trClasses
()
{
...
...
@@ -1178,11 +1138,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
{
return
"Pakkette"
;
}
/*! Used as a chapter title for Latex & RTF output */
virtual
QCString
trPackageDocumentation
()
{
return
"Pakket Dokumentasie"
;
}
/*! Text shown before a multi-line define */
virtual
QCString
trDefineValue
()
{
...
...
@@ -1319,17 +1274,6 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
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
trField
(
bool
first_capital
,
bool
singular
)
{
QCString
result
((
first_capital
?
"Veld"
:
"veld"
));
if
(
!
singular
)
result
+=
"e"
;
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.
...
...
@@ -1521,8 +1465,8 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
}
else
{
return
"Die soektog het <b>$num</b> do
c
umente gevind na gelang van jou navraag. "
"Be
gin met beste resulta
te."
;
return
"Die soektog het <b>$num</b> do
k
umente gevind na gelang van jou navraag. "
"Be
ste resultate eers
te."
;
}
}
/*! This string is put before the list of matched words, for each search
...
...
@@ -1544,6 +1488,67 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_3_9
return
filename
+
" Bron kode Leër"
;
}
//////////////////////////////////////////////////////////////////////////
// new since 1.3.9
//////////////////////////////////////////////////////////////////////////
/*! This is used as the name of the chapter containing the directory
* hierarchy.
*/
virtual
QCString
trDirIndex
()
{
return
"Directory Hiërargie"
;
}
/*! This is used as the name of the chapter containing the documentation
* of the directories.
*/
virtual
QCString
trDirDocumentation
()
{
return
"Directory Documentasie"
;
}
/*! This is used as the title of the directory index and also in the
* Quick links of a HTML page, to link to the directory hierarchy.
*/
virtual
QCString
trDirectories
()
{
return
"Directories"
;
}
/*! This returns a sentences that introduces the directory hierarchy.
* and the fact that it is sorted alphabetically per level
*/
virtual
QCString
trDirDescription
()
{
return
"Hierdie directory hiërargie is min of meer alfabeties "
"gesorteer:"
;
}
/*! 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
=
dirName
;
result
+=
" Directory Verwysing"
;
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
?
"Director"
:
"director"
));
if
(
singular
)
result
+=
"y"
;
else
result
+=
"ies"
;
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
"Hierdie is 'n oorlaaide lede funksie, "
"vertoon vir volledigheid. Dit verskil slegs van die bogegewe "
"funksie in die argument(e) wat dit aanvaar."
;
}
};
#endif
...
...
src/util.cpp
View file @
5bd970b1
...
...
@@ -46,6 +46,7 @@
#include "reflist.h"
#include "pagedef.h"
#include "debug.h"
#include "searchindex.h"
#if !defined(_WIN32) || defined(__CYGWIN__)
#include <unistd.h>
...
...
@@ -622,18 +623,9 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe
ip
--
;
}
type
=
type
.
left
(
ip
+
1
);
if
(
type
.
left
(
6
)
==
"const "
)
// strip leading "const"
{
type
=
type
.
mid
(
6
);
}
if
(
type
.
left
(
7
)
==
"struct "
)
// strip leading "struct"
{
type
=
type
.
mid
(
7
);
}
else
if
(
type
.
left
(
6
)
==
"union "
)
// or strip leading "union"
{
type
=
type
.
mid
(
6
);
}
type
.
stripPrefix
(
"const "
);
// strip leading "const"
type
.
stripPrefix
(
"struct "
);
// strip leading "struct"
type
.
stripPrefix
(
"union "
);
// strip leading "union"
type
=
type
.
stripWhiteSpace
();
// strip leading and trailing whitespace
MemberDef
*
memTypeDef
=
0
;
ClassDef
*
result
=
getResolvedClassRec
(
md
->
getOuterScope
(),
...
...
@@ -1243,7 +1235,12 @@ ClassDef *getResolvedClass(Definition *scope,
{
scope
=
Doxygen
::
globalScope
;
}
//printf("getResolvedClass(%s,%s)\n",scope?scope->name().data():"<global>",n);
//printf("getResolvedClass(scope=%s,file=%s,name=%s,mayUnlinkable=%d)\n",
// scope?scope->name().data():"<global>",
// fileScope?fileScope->name().data():"<none>",
// n,
// mayBeUnlinkable
// );
ClassDef
*
result
=
getResolvedClassRec
(
scope
,
fileScope
,
n
,
pTypeDef
,
pTemplSpec
);
if
(
!
mayBeUnlinkable
&&
result
&&
!
result
->
isLinkable
())
{
...
...
@@ -1251,7 +1248,6 @@ ClassDef *getResolvedClass(Definition *scope,
}
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
// n,result?result->name().data():"<none>");
return
result
;
}
...
...
@@ -2281,8 +2277,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
QCString
dstAType
=
trimTemplateSpecifiers
(
namespaceName
,
className
,
dstA
->
type
);
QCString
srcAName
=
srcA
->
name
.
stripWhiteSpace
();
QCString
dstAName
=
dstA
->
name
.
stripWhiteSpace
();
if
(
srcAType
.
left
(
6
)
==
"class "
)
srcAType
=
srcAType
.
right
(
srcAType
.
length
()
-
6
);
if
(
dstAType
.
left
(
6
)
==
"class "
)
dstAType
=
dstAType
.
right
(
dstAType
.
length
()
-
6
);
srcAType
.
stripPrefix
(
"class "
);
dstAType
.
stripPrefix
(
"class "
);
// allow distingishing "const A" from "const B" even though
// from a syntactic point of view they would be two names of the same
...
...
@@ -2651,22 +2647,21 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
stripIrrelevantConstVolatile
(
type
);
// strip leading keywords
if
(
type
.
left
(
6
)
==
"class "
)
type
=
type
.
right
(
type
.
length
()
-
6
);
else
if
(
type
.
left
(
7
)
==
"struct "
)
type
=
type
.
right
(
type
.
length
()
-
7
);
else
if
(
type
.
left
(
6
)
==
"union "
)
type
=
type
.
right
(
type
.
length
()
-
6
);
else
if
(
type
.
left
(
5
)
==
"enum "
)
type
=
type
.
right
(
type
.
length
()
-
5
);
else
if
(
type
.
left
(
9
)
==
"typename "
)
type
=
type
.
right
(
type
.
length
()
-
9
);
type
.
stripPrefix
(
"class "
);
type
.
stripPrefix
(
"struct "
);
type
.
stripPrefix
(
"union "
);
type
.
stripPrefix
(
"enum "
);
type
.
stripPrefix
(
"typename "
);
static
QRegExp
id
(
"[a-z_A-Z][:a-z_A-Z0-9]*"
);
QCString
canType
;
int
i
,
p
=
0
,
l
;
while
((
i
=
id
.
match
(
type
,
p
,
&
l
))
!=-
1
)
// foreach identifier in the type
{
canType
+=
type
.
mid
(
p
,
i
-
p
);
QCString
word
=
type
.
mid
(
i
,
l
);
ClassDef
*
cd
=
getResolvedClass
(
d
,
fs
,
word
);
ClassDef
*
cd
=
getResolvedClass
(
d
,
fs
,
word
,
0
,
0
,
TRUE
);
//printf("word %s => %s\n",word.data(),cd?cd->qualifiedName().data():"<none>");
if
(
cd
)
{
...
...
@@ -2676,9 +2671,18 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
{
QCString
resolvedType
=
resolveTypeDef
(
d
,
word
);
if
(
resolvedType
.
isEmpty
())
{
int
i
=
word
.
findRev
(
"::"
);
if
(
i
!=-
1
)
// strip scope if it cannot be resolved anyway
// TODO is this robust enough?
{
canType
+=
word
.
mid
(
i
+
2
);
}
else
{
canType
+=
word
;
}
}
else
{
canType
+=
resolvedType
;
...
...
@@ -2687,7 +2691,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
p
=
i
+
l
;
}
canType
+=
type
.
right
(
type
.
length
()
-
p
);
//printf("result = %s
\n"
,canType.data());
//printf("result = %s
->%s\n",type.data()
,canType.data());
return
removeRedundantWhiteSpace
(
canType
);
}
...
...
@@ -2697,11 +2701,11 @@ static bool matchArgument2(
Definition
*
dstScope
,
FileDef
*
dstFileScope
,
const
Argument
*
dstA
)
{
//printf("
match argument start `%s|%s' <-> `%s|%s' using nsp=%p class=%p
\n",
// src
A->type.data(),srcA->name.data()
,
//
dstA->type.data(),dstA->nam
e.data(),
//
usingNamespaces
,
//
usingClasses
);
//printf("
>> match argument: %s::`%s|%s' (%s) <-> %s::`%s|%s' (%s)
\n",
// src
Scope ? srcScope->name().data() : ""
,
//
srcA->type.data(),srcA->name.data(),srcA->canTyp
e.data(),
//
dstScope ? dstScope->name().data() : ""
,
//
dstA->type.data(),dstA->name.data(),dstA->canType.data()
);
if
(
srcA
->
array
!=
dstA
->
array
)
// nomatch for char[] against char
{
...
...
@@ -2709,16 +2713,28 @@ static bool matchArgument2(
return
FALSE
;
}
QCString
canonicalSrcType
=
extractCanonicalType
(
srcScope
,
srcFileScope
,
srcA
);
QCString
canonicalDstType
=
extractCanonicalType
(
dstScope
,
dstFileScope
,
dstA
);
if
(
srcA
->
canType
.
isEmpty
())
{
Argument
*
thatSrcA
=
(
Argument
*
)
srcA
;
// since canType is a cached value
// of type we do not really change the argument, but the
// compiler does know that.
thatSrcA
->
canType
=
extractCanonicalType
(
srcScope
,
srcFileScope
,
srcA
);
}
if
(
dstA
->
canType
.
isEmpty
())
{
Argument
*
thatDstA
=
(
Argument
*
)
dstA
;
thatDstA
->
canType
=
extractCanonicalType
(
dstScope
,
dstFileScope
,
dstA
);
}
if
(
canonicalSrcType
==
canonicalDst
Type
)
if
(
srcA
->
canType
==
dstA
->
can
Type
)
{
MATCH
return
TRUE
;
}
else
{
//printf(" Canonical types do not match [%s]<->[%s]\n",
// srcA->canType.data(),dstA->canType.data());
NOMATCH
return
FALSE
;
}
...
...
@@ -3545,11 +3561,11 @@ QCString linkToText(const char *link,bool isFileName)
* 3) "memberName(...)" a specific (overloaded) function or define
* with name memberName
* 4) "::name a global variable or define
* 4) "
#memberName
member variable, global variable or define
* 4) "
\#memberName
member variable, global variable or define
* 5) ("ScopeName::")+"memberName()"
* 6) ("ScopeName::")+"memberName(...)"
* 7) ("ScopeName::")+"memberName"
* instead of :: the # symbol may also be used.
* instead of :: the
\
# symbol may also be used.
*/
bool
generateRef
(
OutputDocInterface
&
od
,
const
char
*
scName
,
...
...
@@ -5373,5 +5389,20 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s)
return
s
.
mid
(
li
,
bi
-
li
);
}
void
stringToSearchIndex
(
const
QCString
&
docBaseUrl
,
const
QCString
&
title
,
const
QCString
&
str
,
bool
priority
,
const
QCString
&
anchor
)
{
static
bool
searchEngine
=
Config_getBool
(
"SEARCHENGINE"
);
if
(
searchEngine
)
{
Doxygen
::
searchIndex
->
setCurrentDoc
(
title
,
docBaseUrl
,
anchor
);
static
QRegExp
wordPattern
(
"[a-z_A-Z][a-z_A-Z0-9]*"
);
int
i
,
p
=
0
,
l
;
while
((
i
=
wordPattern
.
match
(
str
,
p
,
&
l
))
!=-
1
)
{
Doxygen
::
searchIndex
->
addWord
(
str
.
mid
(
i
,
l
),
priority
);
p
=
i
+
l
;
}
}
}
src/util.h
View file @
5bd970b1
...
...
@@ -231,6 +231,9 @@ QCString stripPath(const char *s);
bool
containsWord
(
const
QCString
&
s
,
const
QCString
&
word
);
bool
findAndRemoveWord
(
QCString
&
s
,
const
QCString
&
word
);
QCString
stripLeadingAndTrailingEmptyLines
(
const
QCString
&
s
);
void
stringToSearchIndex
(
const
QCString
&
docUrlBase
,
const
QCString
&
title
,
const
QCString
&
str
,
bool
priority
=
FALSE
,
const
QCString
&
anchor
=
""
);
#endif
src/xmlgen.cpp
View file @
5bd970b1
...
...
@@ -483,9 +483,9 @@ static void stripQualifiers(QCString &typeStr)
bool
done
=
FALSE
;
while
(
!
done
)
{
if
(
typeStr
.
left
(
7
)
==
"static "
)
typeStr
=
typeStr
.
mid
(
7
);
else
if
(
typeStr
.
left
(
8
)
==
"virtual "
)
typeStr
=
typeStr
.
mid
(
8
);
else
if
(
typeStr
.
left
(
9
)
==
"volatile "
)
typeStr
=
typeStr
.
mid
(
9
);
if
(
typeStr
.
stripPrefix
(
"static "
)
);
else
if
(
typeStr
.
stripPrefix
(
"virtual "
)
);
else
if
(
typeStr
.
stripPrefix
(
"volatile "
)
);
else
done
=
TRUE
;
}
}
...
...
wintools/Doxygen.dsp
View file @
5bd970b1
...
...
@@ -201,6 +201,10 @@ SOURCE=..\src\groupdef.cpp
# End Source File
# Begin Source File
SOURCE=..\src\htags.cpp
# End Source File
# Begin Source File
SOURCE=..\src\htmldocvisitor.cpp
# End Source File
# Begin Source File
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment