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
d8197176
Commit
d8197176
authored
Jun 04, 2000
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release-1.1.4
parent
3e33c509
Changes
47
Show whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
1035 additions
and
618 deletions
+1035
-618
INSTALL
INSTALL
+4
-4
README
README
+2
-2
VERSION
VERSION
+1
-1
README
addon/configgen/README
+13
-0
config_templ.l
addon/configgen/config_templ.l
+44
-6
configgen.cpp
addon/configgen/configgen.cpp
+9
-8
commands.doc
doc/commands.doc
+32
-0
config.doc
doc/config.doc
+80
-52
starting.doc
doc/starting.doc
+4
-2
memgrp.cpp
examples/memgrp.cpp
+11
-3
doxygen.spec
packages/rpm/doxygen.spec
+1
-1
classdef.cpp
src/classdef.cpp
+69
-38
classdef.h
src/classdef.h
+3
-2
code.l
src/code.l
+4
-4
config.h
src/config.h
+1
-0
config.l
src/config.l
+59
-6
dot.cpp
src/dot.cpp
+22
-14
doxygen.cpp
src/doxygen.cpp
+299
-223
entry.cpp
src/entry.cpp
+4
-2
entry.h
src/entry.h
+9
-2
filedef.cpp
src/filedef.cpp
+56
-22
filedef.h
src/filedef.h
+5
-2
groupdef.cpp
src/groupdef.cpp
+36
-15
groupdef.h
src/groupdef.h
+6
-2
htmlgen.cpp
src/htmlgen.cpp
+1
-20
htmlgen.h
src/htmlgen.h
+1
-1
index.cpp
src/index.cpp
+13
-2
latexgen.cpp
src/latexgen.cpp
+49
-27
latexgen.h
src/latexgen.h
+1
-1
mangen.cpp
src/mangen.cpp
+1
-1
mangen.h
src/mangen.h
+1
-1
memberdef.cpp
src/memberdef.cpp
+25
-27
memberdef.h
src/memberdef.h
+16
-16
membergroup.cpp
src/membergroup.cpp
+5
-3
membergroup.h
src/membergroup.h
+1
-1
memberlist.cpp
src/memberlist.cpp
+27
-24
memberlist.h
src/memberlist.h
+1
-1
namespacedef.cpp
src/namespacedef.cpp
+30
-14
namespacedef.h
src/namespacedef.h
+5
-16
outputgen.h
src/outputgen.h
+1
-1
outputlist.h
src/outputlist.h
+2
-2
pre.l
src/pre.l
+2
-3
rtfgen.cpp
src/rtfgen.cpp
+31
-26
rtfgen.h
src/rtfgen.h
+1
-1
scanner.l
src/scanner.l
+30
-14
tag.l
src/tag.l
+3
-3
util.cpp
src/util.cpp
+14
-2
No files found.
INSTALL
View file @
d8197176
DOXYGEN Version 1.1.
3-20000528
DOXYGEN Version 1.1.
4
CONTENTS
--------
...
...
@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.
3-20000528
.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.
3-20000528
.src.tar # unpack it
gunzip doxygen-1.1.
4
.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.
4
.src.tar # unpack it
2. Run the configure script:
...
...
@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (
28 May
2000)
Dimitri van Heesch (
04 June
2000)
README
View file @
d8197176
DOXYGEN Version 1.1.
3-20000528
DOXYGEN Version 1.1.
4
Please read INSTALL for compilation instructions.
...
...
@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (
28 May
2000)
Dimitri van Heesch (
04 June
2000)
VERSION
View file @
d8197176
1.1.
3-20000528
1.1.
4
addon/configgen/README
0 → 100644
View file @
d8197176
The configgen tool is used to:
- generate the parser for the configuration file based on
the templates config_templ.h and config_templ.l
- generate the GUI frontend "doxywizard" for creating a configuration
file based on the templates doxywizard_templ.h and doxywizard_templ.cpp
If you want to add a new configuration option to doxygen,
then you should add a new entry the init() function in configgen.cpp
After that you can do a "make install" in this directory to update
the config.l and config.h in doxygen's source directory.
-Dimitri
addon/configgen/config_templ.l
View file @
d8197176
...
...
@@ -622,6 +622,39 @@ void checkConfig()
#endif
s=Config::includePath.next();
}
// check dot path
if (!Config::dotPath.isEmpty())
{
if (Config::dotPath.find('\\')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='\\')
{
Config::dotPath+='\\';
}
}
else if (Config::dotPath.find('/')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='/')
{
Config::dotPath+='/';
}
}
#if defined(_WIN32)
QFileInfo dp(Config::dotPath+"dot.exe");
#else
QFileInfo dp(Config::dotPath+"dot");
#endif
if (!dp.exists() || !dp.isFile())
{
err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data());
}
}
else // make sure the string is empty but not null!
{
Config::dotPath="";
}
// check input
if (Config::inputSources.count()==0)
{
...
...
@@ -646,13 +679,13 @@ void checkConfig()
// add default pattern if needed
if (Config::filePatternList.isEmpty())
{
Config::filePatternList
="*"
;
Config::filePatternList
.append("*")
;
}
// add default pattern if needed
if (Config::examplePatternList.isEmpty())
{
Config::examplePatternList
="*"
;
Config::examplePatternList
.append("*")
;
}
// add default pattern if needed
...
...
@@ -676,18 +709,23 @@ void checkConfig()
err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1);
}
else if (Config::cgiURL.left(7)!="http://")
else if (Config::cgiURL.left(7)!="http://" &&
Config::cgiURL.left(8)!="https://"
)
{
err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http://).\n");
"start with http://
or https://
).\n");
exit(1);
}
// check documentation URL
if (Config::docURL.isEmpty())
{
Config::docURL = Config::outputDir.copy().prepend("file://")
+"html"
;
Config::docURL = Config::outputDir.copy().prepend("file://")
.append("html")
;
}
else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
else if (Config::docURL.left(7)!="http://" &&
Config::docURL.left(8)!="https://" &&
Config::docURL.left(7)!="file://"
)
{
err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n");
...
...
addon/configgen/configgen.cpp
View file @
d8197176
...
...
@@ -1486,6 +1486,15 @@ void init()
"will graphical hierarchy of all classes instead of a textual one.
\n
"
);
addDependency
(
"gfxHierarchyFlag"
,
"haveDotFlag"
);
ConfigString
::
add
(
"dotPath"
,
"DOT_PATH"
,
""
,
"path to the dot tool"
,
"This tag can be used to specify the path where the dot tool can be found.
\n
"
"If left blank, it is assumed the dot tool can be found on the path.
\n
"
,
ConfigString
::
Dir
);
addDependency
(
"dotPath"
,
"haveDotFlag"
);
//-----------------------------------------------------------------------------------------------
ConfigInfo
::
add
(
"Search"
,
"Configuration::addtions related to the search engine "
);
...
...
@@ -1555,12 +1564,4 @@ void init()
addDependency
(
"extDocPathList"
,
"searchEngineFlag"
);
// The IMAGE_PATTERNS tag is now officially obsolete.
//-----------------------------------------------------------------------------------------------
//ConfigInfo::add("not used");
//-----------------------------------------------------------------------------------------------
//ConfigList::add("imagePatternList",
// "IMAGE_PATTERNS",
// "",
// "list of image paths",
// "dont know\n");
}
doc/commands.doc
View file @
d8197176
...
...
@@ -74,6 +74,7 @@ documentation:
<li> \refitem cmdfbrclose \f]
<li> \refitem cmdfile \file
<li> \refitem cmdfn \fn
<li> \refitem cmdhideinitializer \hideinitializer
<li> \refitem cmdhtmlonly \htmlonly
<li> \refitem cmdif \if
<li> \refitem cmdimage \image
...
...
@@ -100,11 +101,13 @@ documentation:
<li> \refitem cmdretval \retval
<li> \refitem cmdsa \sa
<li> \refitem cmdsection \section
<li> \refitem cmdshowinitializer \showinitializer
<li> \refitem cmdskip \skip
<li> \refitem cmdskipline \skipline
<li> \refitem cmdstruct \struct
<li> \refitem cmdsubsection \subsection
<li> \refitem cmdthrow \throw
<li> \refitem cmdtodo \todo
<li> \refitem cmdtypedef \typedef
<li> \refitem cmdunion \union
<li> \refitem cmduntil \until
...
...
@@ -300,6 +303,17 @@ Doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdvar "\\var" and \ref cmdtypedef "\\typedef".
<hr>
\subsection cmdhideinitializer \hideinitializer
\addindex \hideinitializer
By default the value of a define and the initializer of a variable
are displayed unless they are longer than 30 lines. By putting
this command in a comment block of a define or variable, the
initializer always hidden.
\sa section \ref cmdshowinitializer "\\showinitializer".
<hr>
\subsection cmdingroup \ingroup (<groupname> [<groupname> <groupname>])
...
...
@@ -452,6 +466,17 @@ Public/Protected/Private/... section.
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
<hr>
\subsection cmdshowinitializer \showinitializer
\addindex \showinitializer
By default the value of a define and the initializer of a variable
are only displayed if they are less than 30 lines long. By putting
this command in a comment block of a define or variable, the
initializer is shown unconditionally.
\sa section \ref cmdhideinitializer "\\hideinitializer".
<hr>
\subsection cmdstruct \struct <name> [<header-file>] [<header-name>]
...
...
@@ -757,6 +782,13 @@ Public/Protected/Private/... section.
\par Note:
the tag \\throws is a synonym for this tag.
<hr>
\subsection cmdtodo \todo ( one line todo description )
\addindex \todo
Adds a TODO item to the documentation. The item will also be added
to a TODO list. Both instances of the item will be cross-referenced.
<hr>
\subsection cmdversion \version { version number }
...
...
doc/config.doc
View file @
d8197176
...
...
@@ -137,6 +137,8 @@ followed by the descriptions of the tags grouped by category.
<
li
>
\
refitem
cfg_tagfiles
TAGFILES
<
li
>
\
refitem
cfg_verbatim_headers
VERBATIM_HEADERS
<
li
>
\
refitem
cfg_warnings
WARNINGS
<
li
>
\
refitem
cfg_warn_format
WARN_FORMAT
<
li
>
\
refitem
cfg_warn_if_undocumented
WARN_IF_UNDOCUMENTED
\
htmlonly
</
ul
>
</
multicol
>
...
...
@@ -182,23 +184,6 @@ followed by the descriptions of the tags grouped by category.
The
default
language
is
English
,
other
supported
languages
are
:
Dutch
,
French
,
Italian
,
Czech
,
Swedish
,
German
and
Japanese
.
\
anchor
cfg_quiet
<
dt
>\
c
QUIET
<
dd
>
\
addindex
QUIET
The
\
c
QUIET
tag
can
be
used
to
turn
on
/
off
the
messages
that
are
generated
to
standard
output
by
doxygen
.
Possible
values
are
\
c
YES
and
\
c
NO
,
where
\
c
YES
implies
that
the
messages
are
off
.
If
left
blank
\
c
NO
is
used
.
\
anchor
cfg_warnings
<
dt
>\
c
WARNINGS
<
dd
>
\
addindex
WARNINGS
The
\
c
WARNINGS
tag
can
be
used
to
turn
on
/
off
the
warning
messages
that
are
generated
to
standard
error
by
doxygen
.
Possible
values
are
\
c
YES
and
\
c
NO
,
where
\
c
YES
implies
that
the
warnings
are
on
.
If
left
blank
\
c
NO
is
used
.
\
b
Tip
:
Turn
warnings
on
while
writing
the
documentation
.
\
anchor
cfg_disable_index
<
dt
>\
c
DISABLE_INDEX
<
dd
>
\
addindex
DISABLE_INDEX
...
...
@@ -248,14 +233,6 @@ followed by the descriptions of the tags grouped by category.
the
file
and
class
documentation
(
similar
to
JavaDoc
).
Set
to
NO
to
disable
this
.
\
anchor
cfg_internal_docs
<
dt
>\
c
INTERNAL_DOCS
<
dd
>
\
addindex
INTERNAL_DOCS
The
\
c
INTERNAL_DOCS
tag
determines
if
documentation
that
is
typed
after
a
\\
internal
command
is
included
.
If
the
tag
is
set
to
\
c
NO
(
the
default
)
then
the
documentation
will
be
excluded
.
Set
it
to
\
c
YES
to
include
the
internal
documentation
.
\
anchor
cfg_repeat_brief
<
dt
>\
c
REPEAT_BRIEF
<
dd
>
\
addindex
REPEAT_BRIEF
...
...
@@ -288,6 +265,14 @@ followed by the descriptions of the tags grouped by category.
only
done
if
one
of
the
specified
strings
matches
the
left
-
hand
part
of
the
path
.
\
anchor
cfg_internal_docs
<
dt
>\
c
INTERNAL_DOCS
<
dd
>
\
addindex
INTERNAL_DOCS
The
\
c
INTERNAL_DOCS
tag
determines
if
documentation
that
is
typed
after
a
\\
internal
command
is
included
.
If
the
tag
is
set
to
\
c
NO
(
the
default
)
then
the
documentation
will
be
excluded
.
Set
it
to
\
c
YES
to
include
the
internal
documentation
.
\
anchor
cfg_class_diagrams
<
dt
>\
c
CLASS_DIAGRAMS
<
dd
>
\
addindex
CLASS_DIAGRAMS
...
...
@@ -382,6 +367,43 @@ followed by the descriptions of the tags grouped by category.
</
dl
>
\
subsection
messages_input
Options
related
to
warning
and
progress
messages
\
anchor
cfg_quiet
<
dl
>
<
dt
>\
c
QUIET
<
dd
>
\
addindex
QUIET
The
\
c
QUIET
tag
can
be
used
to
turn
on
/
off
the
messages
that
are
generated
to
standard
output
by
doxygen
.
Possible
values
are
\
c
YES
and
\
c
NO
,
where
\
c
YES
implies
that
the
messages
are
off
.
If
left
blank
\
c
NO
is
used
.
\
anchor
cfg_warnings
<
dt
>\
c
WARNINGS
<
dd
>
\
addindex
WARNINGS
The
\
c
WARNINGS
tag
can
be
used
to
turn
on
/
off
the
warning
messages
that
are
generated
to
standard
error
by
doxygen
.
Possible
values
are
\
c
YES
and
\
c
NO
,
where
\
c
YES
implies
that
the
warnings
are
on
.
If
left
blank
\
c
NO
is
used
.
\
b
Tip
:
Turn
warnings
on
while
writing
the
documentation
.
\
anchor
cfg_warn_if_undocumented
<
dt
>\
c
WARN_IF_UNDOCUMENTED
<
dd
>
\
addindex
WARN_IF_UNDOCUMENTED
If
WARN_IF_UNDOCUMENTED
is
set
to
YES
,
then
doxygen
will
generate
warnings
for
undocumented
members
.
If
EXTRACT_ALL
is
set
to
YES
then
this
flag
will
automatically
be
disabled
.
\
anchor
cfg_warn_format
<
dt
>\
c
WARN_FORMAT
<
dd
>
\
addindex
WARN_FORMAT
The
WARN_FORMAT
tag
determines
the
format
of
the
warning
messages
that
doxygen
can
produce
.
The
string
should
contain
the
$
file
,
$
line
,
and
$
text
tags
,
which
will
be
replaced
by
the
file
and
line
number
from
which
the
warning
originated
and
the
warning
text
.
</
dl
>
\
subsection
config_input
Input
related
options
\
anchor
cfg_input
<
dl
>
...
...
@@ -464,6 +486,33 @@ followed by the descriptions of the tags grouped by category.
</
dl
>
\
subsection
alphabetical_index
Alphabetical
index
options
\
anchor
cfg_alphabetical_index
<
dl
>
<
dt
>\
c
ALPHABETICAL_INDEX
<
dd
>
\
addindex
ALPHABETICAL_INDEX
If
the
\
c
ALPHABETICAL_INDEX
tag
is
set
to
\
c
YES
,
an
alphabetical
index
of
all
compounds
will
be
generated
.
Enable
this
if
the
project
contains
a
lot
of
classes
,
structs
,
unions
or
interfaces
.
\
anchor
cfg_cols_in_alpha_index
<
dt
>\
c
COLS_IN_ALPHA_INDEX
<
dd
>
\
addindex
COLS_IN_ALPHA_INDEX
If
the
alphabetical
index
is
enabled
(
see
\
c
ALPHABETICAL_INDEX
)
then
the
\
c
COLS_IN_ALPHA_INDEX
tag
can
be
used
to
specify
the
number
of
columns
in
which
this
list
will
be
split
(
can
be
a
number
in
the
range
[
1..20
])
\
anchor
cfg_ignore_prefix
<
dt
>\
c
IGNORE_PREFIX
<
dd
>
\
addindex
IGNORE_PREFIX
In
case
all
classes
in
a
project
start
with
a
common
prefix
,
all
classes
will
be
put
under
the
same
header
in
the
alphabetical
index
.
The
\
c
IGNORE_PREFIX
tag
can
be
used
to
specify
a
prefix
(
or
a
list
of
prefixes
)
that
should
be
ignored
while
generating
the
index
headers
.
</
dl
>
\
subsection
html_output
HTML
related
options
\
anchor
cfg_generate_html
<
dl
>
...
...
@@ -595,33 +644,6 @@ FONT.charliteral { color: #008080 }
(which basically renders \c doxysearch obsolete on Windows).
The HTML workshop also contains a viewer for compressed HTML files.
</dl>
\subsection alphabetical_index Alphabetical index options
\anchor cfg_alphabetical_index
<dl>
<dt>\c ALPHABETICAL_INDEX <dd>
\addindex ALPHABETICAL_INDEX
If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index
of all compounds will be generated. Enable this if the project contains
a lot of classes, structs, unions or interfaces.
\anchor cfg_cols_in_alpha_index
<dt>\c COLS_IN_ALPHA_INDEX <dd>
\addindex COLS_IN_ALPHA_INDEX
If the alphabetical index is enabled
(see \c ALPHABETICAL_INDEX) then the \c COLS_IN_ALPHA_INDEX tag can be
used to specify the number of columns in which this list will be split (can be a number in the range [1..20])
\anchor cfg_ignore_prefix
<dt>\c IGNORE_PREFIX <dd>
\addindex IGNORE_PREFIX
In case all classes in a project start with a common prefix, all classes will
be put under the same header in the alphabetical index.
The \c IGNORE_PREFIX tag can be used to specify a prefix
(or a list of prefixes) that should be ignored while generating the index
headers.
</dl>
\subsection latex_output LaTeX related options
\anchor cfg_generate_latex
...
...
@@ -940,6 +962,12 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
If the \c GRAPHICAL_HIERARCHY and \c HAVE_DOT tags are set to \c YES then
doxygen will graphical hierarchy of all classes instead of a textual one.
\anchor cfg_dot_path
<dt>\c DOT_PATH <dd>
\addindex DOT_PATH
This tag can be used to specify the path where the dot tool can be found.
If left blank, it is assumed the dot tool can be found on the path.
</dl>
\subsection config_search Search engine options
\anchor cfg_searchengine
...
...
doc/starting.doc
View file @
d8197176
...
...
@@ -485,10 +485,10 @@ block if you prefer C style
comments. Note that the members of the group should be
physcially inside the member group's body.
Before the opening marker of a block a separate comment block
should
be
Before the opening marker of a block a separate comment block
may
be
placed. This block should contain the \ref cmdname "@name"
(or \ref cmdname "\name") command and is used to specify the header
of the group. Optionally, the comment block may contain more
of the group. Optionally, the comment block may
also
contain more
detailed information about the group.
Nesting of member groups is not allowed.
...
...
@@ -866,6 +866,8 @@ PREDEFINED = DECLARE_REGISTRY_RESOURCEID=// \
"STDMETHOD(a)=HRESULT a" \
"ATL_NO_VTABLE= "\
"__declspec(a)= "\
BEGIN_CONNECTION_POINT_MAP=/* \
END_CONNECTION_POINT_MAP=*///
\endverbatim
As you can see doxygen's preprocessor is quite powerful, but if you want
...
...
examples/memgrp.cpp
View file @
d8197176
...
...
@@ -2,10 +2,8 @@
class
Test
{
public
:
/** @name Group1
*/
//@{
/**
Function 1 in group 1. Details.
*/
/**
Same documentation for both members. Details
*/
void
func1InGroup1
();
void
func2InGroup1
();
//@}
...
...
@@ -30,3 +28,13 @@ void Test::func2InGroup2() {}
void
Test
::
func1InGroup2
()
{}
//@}
/*! \file
* docs for this file
*/
//@{
//! one description for all members of this group
#define A 1
#define B 2
void
glob_func
();
//@}
packages/rpm/doxygen.spec
View file @
d8197176
Name: doxygen
Version: 1.1.
3-20000528
Version: 1.1.
4
Summary: documentation system for C, C++ and IDL
Release: 1
Source0: doxygen-%{version}.src.tar.gz
...
...
src/classdef.cpp
View file @
d8197176
...
...
@@ -131,8 +131,13 @@ void ClassDef::insertSuperClass(ClassDef *cd,Protection p,
inheritedBy
->
inSort
(
new
BaseClassDef
(
cd
,
p
,
s
,
t
));
}
void
ClassDef
::
addMember
ToGroup
(
MemberDef
*
md
,
int
groupId
)
void
ClassDef
::
addMember
ListToGroup
(
MemberList
*
ml
)
{
MemberListIterator
mli
(
*
ml
);
MemberDef
*
md
;
for
(;(
md
=
mli
.
current
());
++
mli
)
{
int
groupId
=
md
->
getMemberGroupId
();
if
(
groupId
!=-
1
)
{
QCString
*
pGrpHeader
=
memberHeaderDict
[
groupId
];
...
...
@@ -150,10 +155,36 @@ void ClassDef::addMemberToGroup(MemberDef *md,int groupId)
md
->
setMemberGroup
(
mg
);
}
}
}
}
void
ClassDef
::
addMembersToMemberGroup
()
{
addMemberListToGroup
(
&
pubTypes
);
addMemberListToGroup
(
&
pubMembers
);
addMemberListToGroup
(
&
pubAttribs
);
addMemberListToGroup
(
&
pubSlots
);
addMemberListToGroup
(
&
signals
);
addMemberListToGroup
(
&
pubStaticMembers
);
addMemberListToGroup
(
&
pubStaticAttribs
);
addMemberListToGroup
(
&
proTypes
);
addMemberListToGroup
(
&
proMembers
);
addMemberListToGroup
(
&
proAttribs
);
addMemberListToGroup
(
&
proSlots
);
addMemberListToGroup
(
&
proStaticMembers
);
addMemberListToGroup
(
&
proStaticAttribs
);
addMemberListToGroup
(
&
priTypes
);
addMemberListToGroup
(
&
priMembers
);
addMemberListToGroup
(
&
priAttribs
);
addMemberListToGroup
(
&
priSlots
);
addMemberListToGroup
(
&
priStaticMembers
);
addMemberListToGroup
(
&
priStaticAttribs
);
addMemberListToGroup
(
&
friends
);
addMemberListToGroup
(
&
related
);
}
// adds new member definition to the class
void
ClassDef
::
insertMember
(
MemberDef
*
md
,
int
groupId
)
void
ClassDef
::
insertMember
(
MemberDef
*
md
)
{
//printf("adding %s::%s\n",name().data(),md->name().data());
if
(
!
isReference
())
...
...
@@ -402,7 +433,7 @@ void ClassDef::insertMember(MemberDef *md,int groupId)
/*************************************************/
// Note: this must be done AFTER inserting the member in the
// regular groups
addMemberToGroup
(
md
,
groupId
);
//
addMemberToGroup(md,groupId);
}
...
...
@@ -422,26 +453,26 @@ void ClassDef::insertMember(MemberDef *md,int groupId)
}
void
ClassDef
::
computeMemberGroups
()
{
MemberNameInfoListIterator
mnili
(
*
allMemberNameInfoList
);
MemberNameInfo
*
mni
;
for
(;(
mni
=
mnili
.
current
());
++
mnili
)
{
MemberNameInfoIterator
mnii
(
*
mni
);
MemberInfo
*
mi
;
for
(
mnii
.
toFirst
();(
mi
=
mnii
.
current
());
++
mnii
)
{
MemberDef
*
md
=
mi
->
memberDef
;
MemberGroup
*
mg
=
md
->
getMemberGroup
();
if
(
mg
&&
memberGroupDict
->
find
(
mg
->
groupId
())
==
0
)
{
memberGroupDict
->
insert
(
mg
->
groupId
(),
mg
);
memberGroupList
->
append
(
mg
);
}
}
}
}
//
void ClassDef::computeMemberGroups()
//
{
//
MemberNameInfoListIterator mnili(*allMemberNameInfoList);
//
MemberNameInfo *mni;
//
for (;(mni=mnili.current());++mnili)
//
{
//
MemberNameInfoIterator mnii(*mni);
//
MemberInfo *mi;
//
for (mnii.toFirst();(mi=mnii.current());++mnii)
//
{
//
MemberDef *md=mi->memberDef;
//
MemberGroup *mg = md->getMemberGroup();
//
if (mg && memberGroupDict->find(mg->groupId())==0)
//
{
//
memberGroupDict->insert(mg->groupId(),mg);
//
memberGroupList->append(mg);
//
}
//
}
//
}
//
}
// compute the anchors for all members
void
ClassDef
::
computeAnchors
()
...
...
@@ -539,8 +570,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
pageTitle
+=
pageType
+
" Reference"
;
startFile
(
ol
,
fileName
,
pageTitle
);
startTitle
(
ol
,
getOutputFileBase
());
//ol.docify(name()+" "+pageType.right(pageType.length()-1)+" ");
//parseText(ol,theTranslator->trReference());
parseText
(
ol
,
theTranslator
->
trCompoundReference
(
name
(),
compType
));
endTitle
(
ol
,
getOutputFileBase
(),
name
());
...
...
@@ -1132,7 +1161,7 @@ void ClassDef::writeMemberList(OutputList &ol)
}
if
((
protect
!=
Public
||
md
->
isStatic
()
||
virt
!=
Normal
||
md
->
isFriend
()
||
md
->
isRelated
()
||
(
md
->
isInline
()
&&
Config
::
inlineInfoFlag
)
md
->
getMemberSpecifiers
()
!=
0
)
&&
memberWritten
)
{
...
...
@@ -1145,6 +1174,8 @@ void ClassDef::writeMemberList(OutputList &ol)
{
if
(
Config
::
inlineInfoFlag
&&
md
->
isInline
())
sl
.
append
(
"inline"
);
if
(
md
->
isExplicit
())
sl
.
append
(
"explicit"
);
if
(
md
->
isMutable
())
sl
.
append
(
"mutable"
);
if
(
protect
==
Protected
)
sl
.
append
(
"protected"
);
else
if
(
protect
==
Private
)
sl
.
append
(
"private"
);
if
(
virt
==
Virtual
)
sl
.
append
(
"virtual"
);
...
...
src/classdef.h
View file @
d8197176
...
...
@@ -68,8 +68,7 @@ class ClassDef : public Definition
//void setIncludeName(const char *n_) { incName=n_; }
MemberNameInfoList
*
memberNameInfoList
()
{
return
allMemberNameInfoList
;
}
MemberNameInfoDict
*
memberNameInfoDict
()
{
return
allMemberNameInfoDict
;
}
void
insertMember
(
MemberDef
*
,
int
grpId
);
void
addMemberToGroup
(
MemberDef
*
,
int
grpId
);
void
insertMember
(
MemberDef
*
);
void
insertUsedFile
(
const
char
*
);
void
computeAnchors
();
void
computeMemberGroups
();
...
...
@@ -121,10 +120,12 @@ class ClassDef : public Definition
bool
visited
;
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
protected
:
void
addUsedInterfaceClasses
(
MemberDef
*
md
,
const
char
*
typeStr
);
void
addMemberListToGroup
(
MemberList
*
);
private
:
QCString
fileName
;
// HTML containing the class docs
...
...
src/code.l
View file @
d8197176
...
...
@@ -1002,10 +1002,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
<SkipCxxComment>. {
g_code->codify(yytext);
}
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*
"//@"[{}]
{B}*\n)?{B}*"/*"[*!]/[^/*] {
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*
(("//@"[{}])|("/*@"[{}]"*/"))
{B}*\n)?{B}*"/*"[*!]/[^/*] {
g_yyLineNr+=QCString(yytext).contains('\n');
}
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*
"//@"[{}]
{B}*\n)? {
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*
(("//@"[{}])|("/*@"[{}]"*/"))
{B}*\n)? {
g_yyLineNr+=QCString(yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
...
...
@@ -1046,7 +1046,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
endFontClass();
}
}
<*>\n({B}*
"//@"[{}]
{B}*\n) { // remove one-line group marker
<*>\n({B}*
(("//@"[{}])|("/*@"[{}]"*/"))
{B}*\n) { // remove one-line group marker
if (Config::stripCommentsFlag)
{
g_yyLineNr+=((QCString)yytext).contains('\n');
...
...
@@ -1063,7 +1063,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
endFontClass();
}
}
<*>^{B}*
"//@"[{}]{B}*\n
{ // remove one-line group marker
<*>^{B}*
(("//@"[{}])|("/*@"[{}]"*/")){B}*\n
{ // remove one-line group marker
if (Config::stripCommentsFlag)
{
g_yyLineNr++;
...
...
src/config.h
View file @
d8197176
...
...
@@ -112,6 +112,7 @@ struct Config
static
bool
collGraphFlag
;
// collaboration graph
static
bool
includeGraphFlag
;
// include graph
static
bool
gfxHierarchyFlag
;
// flag to enable graphical hierarchy
static
QCString
dotPath
;
// path to the dot tool
static
bool
searchEngineFlag
;
// generate search engine flag
static
QCString
cgiName
;
// the name of the CGI binary
static
QCString
cgiURL
;
// the absolute URL to the CGI binary
...
...
src/config.l
View file @
d8197176
...
...
@@ -147,6 +147,7 @@ bool Config::classGraphFlag = TRUE;
bool Config::collGraphFlag = TRUE;
bool Config::includeGraphFlag = TRUE;
bool Config::gfxHierarchyFlag = TRUE;
QCString Config::dotPath;
bool Config::searchEngineFlag = FALSE;
QCString Config::cgiName = "search.cgi";
QCString Config::cgiURL;
...
...
@@ -287,6 +288,7 @@ static int yyread(char *buf,int max_size)
<Start>"COLLABORATION_GRAPH"[ \t]*"=" { BEGIN(GetBool); b=&Config::collGraphFlag; }
<Start>"INCLUDE_GRAPH"[ \t]*"=" { BEGIN(GetBool); b=&Config::includeGraphFlag; }
<Start>"GRAPHICAL_HIERARCHY"[ \t]*"=" { BEGIN(GetBool); b=&Config::gfxHierarchyFlag; }
<Start>"DOT_PATH"[ \t]*"=" { BEGIN(GetString); s=&Config::dotPath; s->resize(0); }
<Start>"SEARCHENGINE"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchEngineFlag; }
<Start>"CGI_NAME"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiName; s->resize(0); }
<Start>"CGI_URL"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiURL; s->resize(0); }
...
...
@@ -573,6 +575,7 @@ void dumpConfig()
printf("collGraphFlag=`%d'\n",Config::collGraphFlag);
printf("includeGraphFlag=`%d'\n",Config::includeGraphFlag);
printf("gfxHierarchyFlag=`%d'\n",Config::gfxHierarchyFlag);
printf("dotPath=`%s'\n",Config::dotPath.data());
printf("# Configuration::addtions related to the search engine \n");
printf("searchEngineFlag=`%d'\n",Config::searchEngineFlag);
printf("cgiName=`%s'\n",Config::cgiName.data());
...
...
@@ -673,6 +676,7 @@ void Config::init()
Config::collGraphFlag = TRUE;
Config::includeGraphFlag = TRUE;
Config::gfxHierarchyFlag = TRUE;
Config::dotPath.resize(0);
Config::searchEngineFlag = FALSE;
Config::cgiName = "search.cgi";
Config::cgiURL.resize(0);
...
...
@@ -1724,6 +1728,16 @@ void writeTemplateConfig(QFile *f,bool sl)
writeBoolValue(t,Config::gfxHierarchyFlag);
t << "\n";
if (!sl)
{
t << "\n";
t << "# This tag can be used to specify the path where the dot tool can be found. \n";
t << "# If left blank, it is assumed the dot tool can be found on the path. \n";
t << "\n";
}
t << "DOT_PATH = ";
writeStringValue(t,Config::dotPath);
t << "\n";
if (!sl)
{
t << "\n";
}
...
...
@@ -1978,6 +1992,7 @@ void substituteEnvironmentVars()
substEnvVarsInStrList( Config::tagFileList );
substEnvVarsInString( Config::genTagFile );
substEnvVarsInString( Config::perlPath );
substEnvVarsInString( Config::dotPath );
substEnvVarsInString( Config::cgiName );
substEnvVarsInString( Config::cgiURL );
substEnvVarsInString( Config::docURL );
...
...
@@ -2187,6 +2202,39 @@ void checkConfig()
#endif
s=Config::includePath.next();
}
// check dot path
if (!Config::dotPath.isEmpty())
{
if (Config::dotPath.find('\\')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='\\')
{
Config::dotPath+='\\';
}
}
else if (Config::dotPath.find('/')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='/')
{
Config::dotPath+='/';
}
}
#if defined(_WIN32)
QFileInfo dp(Config::dotPath+"dot.exe");
#else
QFileInfo dp(Config::dotPath+"dot");
#endif
if (!dp.exists() || !dp.isFile())
{
err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data());
}
}
else // make sure the string is empty but not null!
{
Config::dotPath="";
}
// check input
if (Config::inputSources.count()==0)
{
...
...
@@ -2211,13 +2259,13 @@ void checkConfig()
// add default pattern if needed
if (Config::filePatternList.isEmpty())
{
Config::filePatternList
="*"
;
Config::filePatternList
.append("*")
;
}
// add default pattern if needed
if (Config::examplePatternList.isEmpty())
{
Config::examplePatternList
="*"
;
Config::examplePatternList
.append("*")
;
}
// add default pattern if needed
...
...
@@ -2241,18 +2289,23 @@ void checkConfig()
err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1);
}
else if (Config::cgiURL.left(7)!="http://")
else if (Config::cgiURL.left(7)!="http://" &&
Config::cgiURL.left(8)!="https://"
)
{
err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http://).\n");
"start with http://
or https://
).\n");
exit(1);
}
// check documentation URL
if (Config::docURL.isEmpty())
{
Config::docURL = Config::outputDir.copy().prepend("file://")
+"html"
;
Config::docURL = Config::outputDir.copy().prepend("file://")
.append("html")
;
}
else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
else if (Config::docURL.left(7)!="http://" &&
Config::docURL.left(8)!="https://" &&
Config::docURL.left(7)!="file://"
)
{
err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n");
...
...
src/dot.cpp
View file @
d8197176
...
...
@@ -22,6 +22,7 @@
#include "doxygen.h"
#include "message.h"
#include "util.h"
#include "config.h"
#include <qdir.h>
#include <qfile.h>
...
...
@@ -32,7 +33,6 @@
const
int
maxImageWidth
=
1024
;
const
int
maxImageHeight
=
1024
;
/*! mapping from protection levels to color names */
static
char
*
edgeColorMap
[]
=
{
...
...
@@ -575,8 +575,9 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
t
<<
"}"
<<
endl
;
f
.
close
();
QCString
dotCmd
;
dotCmd
.
sprintf
(
"dot -Tgif
\"
%s
\"
-o
\"
%s
\"
"
,
dotName
.
data
(),
gifName
.
data
());
QCString
dotCmd
(
4096
);
dotCmd
.
sprintf
(
"%sdot -Tgif
\"
%s
\"
-o
\"
%s
\"
"
,
Config
::
dotPath
.
data
(),
dotName
.
data
(),
gifName
.
data
());
//printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if
(
system
(
dotCmd
)
!=
0
)
{
...
...
@@ -584,7 +585,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
out
<<
"</table>"
<<
endl
;
return
;
}
dotCmd
.
sprintf
(
"dot -Timap
\"
%s
\"
-o
\"
%s
\"
"
,
dotName
.
data
(),
mapName
.
data
());
dotCmd
.
sprintf
(
"%sdot -Timap
\"
%s
\"
-o
\"
%s
\"
"
,
Config
::
dotPath
.
data
(),
dotName
.
data
(),
mapName
.
data
());
//printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data());
if
(
system
(
dotCmd
)
!=
0
)
{
...
...
@@ -975,9 +977,10 @@ static void findMaximalDotGraph(DotNode *root,
{
writeDotGraph
(
root
,
format
,
baseName
,
lrRank
,
renderParents
,
curDistance
);
QCString
dotCmd
;
QCString
dotCmd
(
4096
)
;
// create annotated dot file
dotCmd
.
sprintf
(
"dot -Tdot
\"
%s.dot
\"
-o
\"
%s_tmp.dot
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotCmd
.
sprintf
(
"%sdot -Tdot
\"
%s.dot
\"
-o
\"
%s_tmp.dot
\"
"
,
Config
::
dotPath
.
data
(),
baseName
.
data
(),
baseName
.
data
());
if
(
system
(
dotCmd
)
!=
0
)
{
err
(
"Problems running dot. Check your installation!
\n
"
);
...
...
@@ -1066,15 +1069,17 @@ void DotClassGraph::writeGraph(QTextStream &out,
if
(
format
==
GIF
)
// run dot to create a .gif image
{
QCString
dotCmd
;
dotCmd
.
sprintf
(
"dot -Tgif
\"
%s.dot
\"
-o
\"
%s.gif
\"
"
,
baseName
.
data
(),
baseName
.
data
());
QCString
dotCmd
(
4096
);
dotCmd
.
sprintf
(
"%sdot -Tgif
\"
%s.dot
\"
-o
\"
%s.gif
\"
"
,
Config
::
dotPath
.
data
(),
baseName
.
data
(),
baseName
.
data
());
if
(
system
(
dotCmd
)
!=
0
)
{
err
(
"Error: Problems running dot. Check your installation!
\n
"
);
return
;
}
// run dot again to create an image map
dotCmd
.
sprintf
(
"dot -Timap
\"
%s.dot
\"
-o
\"
%s.map
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotCmd
.
sprintf
(
"%sdot -Timap
\"
%s.dot
\"
-o
\"
%s.map
\"
"
,
Config
::
dotPath
.
data
(),
baseName
.
data
(),
baseName
.
data
());
if
(
system
(
dotCmd
)
!=
0
)
{
err
(
"Error: Problems running dot. Check your installation!
\n
"
);
...
...
@@ -1090,7 +1095,8 @@ void DotClassGraph::writeGraph(QTextStream &out,
else
if
(
format
==
EPS
)
// run dot to create a .eps image
{
QCString
dotCmd
;
dotCmd
.
sprintf
(
"dot -Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotCmd
.
sprintf
(
"%sdot -Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
Config
::
dotPath
.
data
(),
baseName
.
data
(),
baseName
.
data
());
if
(
system
(
dotCmd
)
!=
0
)
{
err
(
"Error: Problems running dot. Check your installation!
\n
"
);
...
...
@@ -1221,16 +1227,17 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
{
// run dot to create a .gif image
QCString
dotCmd
;
dotCmd
.
sprintf
(
"dot -Tgif
\"
%s.dot
\"
-o
\"
%s.gif
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotCmd
.
sprintf
(
"%sdot -Tgif
\"
%s.dot
\"
-o
\"
%s.gif
\"
"
,
Config
::
dotPath
.
data
(),
baseName
.
data
(),
baseName
.
data
());
if
(
system
(
dotCmd
)
!=
0
)
{
err
(
"Problems running dot. Check your installation!
\n
"
);
return
;
}
//printf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data());
// run dot again to create an image map
dotCmd
.
sprintf
(
"dot -Timap
\"
%s.dot
\"
-o
\"
%s.map
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotCmd
.
sprintf
(
"%sdot -Timap
\"
%s.dot
\"
-o
\"
%s.map
\"
"
,
Config
::
dotPath
.
data
(),
baseName
.
data
(),
baseName
.
data
());
if
(
system
(
dotCmd
)
!=
0
)
{
err
(
"Problems running dot. Check your installation!
\n
"
);
...
...
@@ -1249,7 +1256,8 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
// run dot to create a .eps image
QCString
dotCmd
;
dotCmd
.
sprintf
(
"dot -Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotCmd
.
sprintf
(
"%sdot -Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
Config
::
dotPath
.
data
(),
baseName
.
data
(),
baseName
.
data
());
if
(
system
(
dotCmd
)
!=
0
)
{
err
(
"Problems running dot. Check your installation!
\n
"
);
...
...
src/doxygen.cpp
View file @
d8197176
...
...
@@ -85,7 +85,6 @@ StringDict excludeNameDict(1009); // sections
FileNameDict
includeNameDict
(
1009
);
// include names
FileNameDict
exampleNameDict
(
1009
);
// examples
FileNameDict
imageNameDict
(
257
);
// images
//DefineDict defineDict(10007); // all defines
StringDict
typedefDict
(
1009
);
// all typedefs
GroupDict
groupDict
(
257
);
// all groups
FormulaDict
formulaDict
(
1009
);
// all formulas
...
...
@@ -125,7 +124,6 @@ void clearAll()
includeNameDict
.
clear
();
exampleNameDict
.
clear
();
imageNameDict
.
clear
();
//defineDict.clear();
typedefDict
.
clear
();
groupDict
.
clear
();
formulaDict
.
clear
();
...
...
@@ -153,7 +151,7 @@ int documentedIncludeFiles;
QTextStream
tagFile
;
void
addMemberDocs
(
Entry
*
root
,
MemberDef
*
md
,
const
char
*
funcDecl
,
static
void
addMemberDocs
(
Entry
*
root
,
MemberDef
*
md
,
const
char
*
funcDecl
,
ArgumentList
*
al
,
bool
over_load
,
NamespaceList
*
nl
=
0
);
const
char
idMask
[]
=
"[A-Za-z_][A-Za-z_0-9]*"
;
...
...
@@ -173,7 +171,7 @@ const char *getOverloadDocs()
//----------------------------------------------------------------------------
void
buildGroupList
(
Entry
*
root
)
static
void
buildGroupList
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
GROUPDOC_SEC
&&
!
root
->
name
.
isEmpty
())
{
...
...
@@ -240,7 +238,7 @@ void buildGroupList(Entry *root)
//----------------------------------------------------------------------
void
buildFileList
(
Entry
*
root
)
static
void
buildFileList
(
Entry
*
root
)
{
if
(((
root
->
section
==
Entry
::
FILEDOC_SEC
)
||
((
root
->
section
&
Entry
::
FILE_MASK
)
&&
Config
::
extractAllFlag
))
&&
...
...
@@ -419,7 +417,7 @@ static bool addNamespace(Entry *root,ClassDef *cd)
//----------------------------------------------------------------------
// build a list of all classes mentioned in the documentation
// and all classes that have a documentation block before their definition.
void
buildClassList
(
Entry
*
root
)
static
void
buildClassList
(
Entry
*
root
)
{
if
(
((
root
->
section
&
Entry
::
COMPOUNDDOC_MASK
)
||
...
...
@@ -605,7 +603,7 @@ void buildClassList(Entry *root)
//----------------------------------------------------------------------
// build a list of all namespaces mentioned in the documentation
// and all namespaces that have a documentation block before their definition.
void
buildNamespaceList
(
Entry
*
root
)
static
void
buildNamespaceList
(
Entry
*
root
)
{
if
(
(
root
->
section
==
Entry
::
NAMESPACE_SEC
)
||
...
...
@@ -698,7 +696,7 @@ void buildNamespaceList(Entry *root)
//----------------------------------------------------------------------
void
findUsingDirectives
(
Entry
*
root
)
static
void
findUsingDirectives
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
USINGDIR_SEC
)
{
...
...
@@ -964,6 +962,8 @@ static MemberDef *addVariableToClass(
md
->
setIndentDepth
(
indentDepth
);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setInitializer
(
root
->
initializer
);
md
->
setMaxInitLines
(
root
->
initLines
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
//if (root->mGrpId!=-1)
//{
// printf("memberdef %s in memberGroup %d\n",name.data(),root->mGrpId);
...
...
@@ -986,7 +986,7 @@ static MemberDef *addVariableToClass(
memberNameList
.
inSort
(
mn
);
// add the member to the class
}
cd
->
insertMember
(
md
,
root
->
mGrpId
);
cd
->
insertMember
(
md
);
//TODO: insert FileDef instead of filename strings.
cd
->
insertUsedFile
(
root
->
fileName
);
...
...
@@ -1030,6 +1030,8 @@ static MemberDef *addVariableToFile(
md
->
setIndentDepth
(
indentDepth
);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setInitializer
(
root
->
initializer
);
md
->
setMaxInitLines
(
root
->
initLines
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
bool
ambig
;
FileDef
*
fd
=
findFileDef
(
&
inputNameDict
,
root
->
fileName
,
ambig
);
md
->
setBodyDef
(
fd
);
...
...
@@ -1050,7 +1052,7 @@ static MemberDef *addVariableToFile(
}
if
(
nd
&&
!
nd
->
name
().
isEmpty
()
&&
nd
->
name
().
at
(
0
)
!=
'@'
)
{
nd
->
insertMember
(
md
,
root
->
mGrpId
);
nd
->
insertMember
(
md
);
md
->
setNamespace
(
nd
);
}
else
...
...
@@ -1058,7 +1060,7 @@ static MemberDef *addVariableToFile(
// find file definition
if
(
fd
)
{
fd
->
insertMember
(
md
,
root
->
mGrpId
);
fd
->
insertMember
(
md
);
md
->
setFileDef
(
fd
);
}
}
...
...
@@ -1290,13 +1292,13 @@ nextMember:
// Searches the Entry tree for Function sections.
// If found they are stored in their class or in the global list.
void
buildMemberList
(
Entry
*
root
)
static
void
buildMemberList
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
FUNCTION_SEC
)
{
Debug
::
print
(
Debug
::
Functions
,
0
,
"FUNCTION_SEC:
\n
"
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #targs=%d #mtargs=%d mGrpId=%d
\n
"
,
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #targs=%d #mtargs=%d mGrpId=%d
memSpec=%d
\n
"
,
root
->
type
.
data
(),
root
->
parent
->
name
.
data
(),
root
->
name
.
data
(),
...
...
@@ -1307,7 +1309,8 @@ void buildMemberList(Entry *root)
root
->
bodyLine
,
root
->
tArgList
?
(
int
)
root
->
tArgList
->
count
()
:
-
1
,
root
->
mtArgList
?
(
int
)
root
->
mtArgList
->
count
()
:
-
1
,
root
->
mGrpId
root
->
mGrpId
,
root
->
memSpec
);
bool
isFriend
=
root
->
type
.
find
(
"friend "
)
!=-
1
;
...
...
@@ -1376,7 +1379,8 @@ void buildMemberList(Entry *root)
md
->
setDocumentation
(
root
->
doc
);
md
->
setBriefDescription
(
root
->
brief
);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setInline
(
root
->
inLine
);
md
->
setMemberSpecifiers
(
root
->
memSpec
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
bool
ambig
;
md
->
setBodyDef
(
findFileDef
(
&
inputNameDict
,
root
->
fileName
,
ambig
));
//md->setScopeTemplateArguments(root->tArgList);
...
...
@@ -1463,7 +1467,7 @@ void buildMemberList(Entry *root)
}
// add member to the class cd
cd
->
insertMember
(
md
,
root
->
mGrpId
);
cd
->
insertMember
(
md
);
// add file to list of used files
cd
->
insertUsedFile
(
root
->
fileName
);
...
...
@@ -1487,6 +1491,7 @@ void buildMemberList(Entry *root)
//MemberDef *fmd;
if
((
mn
=
functionNameDict
[
root
->
name
]))
{
//printf("--> function %s already found!\n",root->name.data());
MemberDef
*
md
=
mn
->
first
();
while
(
md
&&
!
found
)
{
...
...
@@ -1494,13 +1499,14 @@ void buildMemberList(Entry *root)
FileDef
*
fd
=
md
->
getFileDef
();
QCString
nsName
=
nd
?
nd
->
name
().
data
()
:
""
;
//printf("namespace `%s'\n",nsName.data());
if
(
(
nd
||
(
fd
&&
fd
->
absFilePath
()
==
root
->
fileName
))
&&
if
(
matchArguments
(
md
->
argumentList
(),
root
->
argList
,
0
,
nsName
)
)
{
// function already found in the same file, one is probably
// a prototype.
found
=
TRUE
;
found
=
nd
||
fd
->
absFilePath
()
==
root
->
fileName
;
mergeArguments
(
root
->
argList
,
md
->
argumentList
());
if
(
!
md
->
documentation
()
&&
!
root
->
doc
.
isEmpty
())
{
md
->
setDocumentation
(
root
->
doc
);
...
...
@@ -1515,11 +1521,6 @@ void buildMemberList(Entry *root)
bool
ambig
;
md
->
setBodyDef
(
findFileDef
(
&
inputNameDict
,
root
->
fileName
,
ambig
));
}
//if (root->mGrpId!=-1 && md->getMemberGroup()==0)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
md
->
addSectionsToDefinition
(
root
->
anchors
);
}
md
=
mn
->
next
();
...
...
@@ -1548,7 +1549,8 @@ void buildMemberList(Entry *root)
FileDef
*
fd
=
findFileDef
(
&
inputNameDict
,
root
->
fileName
,
ambig
);
md
->
setBodyDef
(
fd
);
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
setInline
(
root
->
inLine
);
md
->
setMemberSpecifiers
(
root
->
memSpec
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
QCString
def
;
if
(
!
root
->
type
.
isEmpty
())
{
...
...
@@ -1602,7 +1604,7 @@ void buildMemberList(Entry *root)
if
(
nd
&&
!
nd
->
name
().
isEmpty
()
&&
nd
->
name
().
at
(
0
)
!=
'@'
)
{
nd
->
insertMember
(
md
,
root
->
mGrpId
);
nd
->
insertMember
(
md
);
md
->
setNamespace
(
nd
);
}
else
...
...
@@ -1616,7 +1618,7 @@ void buildMemberList(Entry *root)
if
(
fd
)
{
// add member to the file
fd
->
insertMember
(
md
,
root
->
mGrpId
);
fd
->
insertMember
(
md
);
md
->
setFileDef
(
fd
);
}
}
...
...
@@ -1662,7 +1664,7 @@ void buildMemberList(Entry *root)
//----------------------------------------------------------------------
void
findFriends
()
static
void
findFriends
()
{
//printf("findFriends()\n");
MemberNameListIterator
fnli
(
functionNameList
);
...
...
@@ -1723,7 +1725,7 @@ void findFriends()
//----------------------------------------------------------------------
void
transferFunctionDocumentation
()
static
void
transferFunctionDocumentation
()
{
//printf("transferFunctionDocumentation()\n");
...
...
@@ -1774,11 +1776,15 @@ void transferFunctionDocumentation()
mdec
->
setBodySegment
(
mdef
->
getStartBodyLine
(),
mdef
->
getEndBodyLine
());
mdec
->
setBodyDef
(
mdef
->
getFileDef
());
}
mdec
->
mergeMemberSpecifiers
(
mdef
->
getMemberSpecifiers
());
mdef
->
mergeMemberSpecifiers
(
mdec
->
getMemberSpecifiers
());
}
}
}
void
transferRelatedFunctionDocumentation
()
//----------------------------------------------------------------------
static
void
transferRelatedFunctionDocumentation
()
{
// find match between function declaration and definition for
// related functions
...
...
@@ -1976,7 +1982,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
//----------------------------------------------------------------------
// Computes the base and super classes for each class in the tree
void
computeClassRelations
(
Entry
*
root
)
static
void
computeClassRelations
(
Entry
*
root
)
{
if
(
(
...
...
@@ -2040,7 +2046,7 @@ void computeClassRelations(Entry *root)
//-----------------------------------------------------------------------
// compute the references (anchors in HTML) for each function in the file
void
computeMemberReferences
()
static
void
computeMemberReferences
()
{
ClassDef
*
cd
=
classList
.
first
();
while
(
cd
)
...
...
@@ -2080,15 +2086,15 @@ void computeMemberReferences()
// set the function declaration of the member to `funcDecl'. If the boolean
// over_load is set the standard overload text is added.
void
addMemberDocs
(
Entry
*
root
,
static
void
addMemberDocs
(
Entry
*
root
,
MemberDef
*
md
,
const
char
*
funcDecl
,
ArgumentList
*
al
,
bool
over_load
,
NamespaceList
*
nl
)
{
//printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s'\n",
// root->parent->name.data(),md->name().data(),md->argsString(),funcDecl);
//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
);
...
...
@@ -2152,6 +2158,7 @@ void addMemberDocs(Entry *root,
if
(
md
->
initializer
().
isEmpty
()
&&
!
root
->
initializer
.
isEmpty
())
{
md
->
setInitializer
(
root
->
initializer
);
md
->
setMaxInitLines
(
root
->
initLines
);
}
//if (md->bodyCode().isEmpty() && !root->body.isEmpty()) /* no body yet */
...
...
@@ -2168,15 +2175,15 @@ void addMemberDocs(Entry *root,
}
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
if
(
root
->
inLine
&&
!
md
->
isInline
())
md
->
setInline
(
TRUE
);
md
->
mergeMemberSpecifiers
(
root
->
memSpec
);
md
->
addSectionsToDefinition
(
root
->
anchors
);
addMemberToGroups
(
root
,
md
);
if
(
cd
)
cd
->
insertUsedFile
(
root
->
fileName
);
if
(
root
->
mGrpId
!=-
1
)
{
if
(
md
->
getMemberGroup
()
)
if
(
md
->
getMemberGroup
Id
()
!=-
1
)
{
if
(
md
->
getMemberGroup
()
->
group
Id
()
!=
root
->
mGrpId
)
if
(
md
->
getMemberGroupId
()
!=
root
->
mGrpId
)
{
warn
(
root
->
fileName
,
root
->
startLine
,
...
...
@@ -2188,21 +2195,23 @@ void addMemberDocs(Entry *root,
}
else
// set group id
{
//md->setMemberGroup(memberGroupDict[root->mGrpId]);
if
(
cd
)
cd
->
addMemberToGroup
(
md
,
root
->
mGrpId
);
else
if
(
nd
)
nd
->
addMemberToGroup
(
md
,
root
->
mGrpId
);
else
{
bool
ambig
;
FileDef
*
fd
=
findFileDef
(
&
inputNameDict
,
root
->
fileName
,
ambig
);
if
(
fd
)
{
fd
->
addMemberToGroup
(
md
,
root
->
mGrpId
);
}
}
md
->
setMemberGroupId
(
root
->
mGrpId
);
}
//md->setMemberGroup(memberGroupDict[root->mGrpId]);
// if (cd)
// cd->addMemberToGroup(md,root->mGrpId);
// else if (nd)
// nd->addMemberToGroup(md,root->mGrpId);
// else
// {
// bool ambig;
// FileDef *fd=findFileDef(&inputNameDict,root->fileName,ambig);
// if (fd)
// {
// //fd->addMemberToGroup(md,root->mGrpId);
// }
// }
//}
}
}
...
...
@@ -2360,8 +2369,20 @@ static bool findUnrelatedFunction(Entry *root,
}
if
(
!
found
)
// no match
{
QCString
fullFuncDecl
=
decl
;
if
(
root
->
argList
)
fullFuncDecl
+=
argListToString
(
root
->
argList
);
warn
(
root
->
fileName
,
root
->
startLine
,
"Warning: no matching member found for
\n
%s"
,
decl
);
"Warning: no matching file member found for
\n
%s"
,
fullFuncDecl
.
data
());
if
(
mn
->
count
()
>
0
)
{
warn_cont
(
"Possible candidates:
\n
"
);
md
=
mn
->
first
();
while
(
md
)
{
warn_cont
(
" %s
\n
"
,
md
->
declaration
());
md
=
mn
->
next
();
}
}
}
}
else
// got docs for an undefined member!
...
...
@@ -2373,7 +2394,7 @@ static bool findUnrelatedFunction(Entry *root,
return
TRUE
;
}
void
substituteTemplateArgNames
(
ArgumentList
*
src
,
static
void
substituteTemplateArgNames
(
ArgumentList
*
src
,
const
QCString
&
s
,
ArgumentList
*
tempArgs
,
ArgumentList
*
dst
)
...
...
@@ -2468,16 +2489,16 @@ void substituteTemplateArgNames(ArgumentList *src,
// The boolean overloaded is used to specify whether or not a standard
// overload documentation line should be generated.
void
findMember
(
Entry
*
root
,
QCString
funcDecl
,
QCString
related
,
bool
overloaded
,
static
void
findMember
(
Entry
*
root
,
QCString
funcDecl
,
QCString
related
,
bool
overloaded
,
bool
isFunc
)
{
Debug
::
print
(
Debug
::
FindMembers
,
0
,
"findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,"
"isFunc=%d mGrpId=%d tArgList=%p=
\"
%s
\"
scopeSpec=%s "
"memberSpec=%s
inLine
=%d
\n
"
,
"memberSpec=%s
memSpec
=%d
\n
"
,
root
,
funcDecl
.
data
(),
related
.
data
(),
overloaded
,
isFunc
,
root
->
mGrpId
,
root
->
tArgList
,
tempArgListToString
(
root
->
tArgList
).
data
(),
root
->
scopeSpec
.
data
(),
root
->
memberSpec
.
data
(),
root
->
inLine
root
->
scopeSpec
.
data
(),
root
->
memberSpec
.
data
(),
root
->
memSpec
);
//if (Config::includeSourceFlag && !root->body.isEmpty())
//{
...
...
@@ -2496,22 +2517,40 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
QCString
exceptions
;
bool
isRelated
=
FALSE
;
bool
isFriend
=
FALSE
;
bool
done
;
do
{
done
=
TRUE
;
if
(
funcDecl
.
left
(
7
)
==
"friend "
)
// treat friends as related members
{
funcDecl
=
funcDecl
.
right
(
funcDecl
.
length
()
-
7
);
isFriend
=
TRUE
;
done
=
FALSE
;
}
if
(
funcDecl
.
left
(
7
)
==
"inline "
)
{
funcDecl
=
funcDecl
.
right
(
funcDecl
.
length
()
-
7
);
root
->
inLine
=
TRUE
;
root
->
memSpec
|=
Entry
::
Inline
;
done
=
FALSE
;
}
if
(
funcDecl
.
left
(
9
)
==
"explicit "
)
{
funcDecl
=
funcDecl
.
right
(
funcDecl
.
length
()
-
9
);
root
->
memSpec
|=
Entry
::
Explicit
;
done
=
FALSE
;
}
if
(
funcDecl
.
left
(
8
)
==
"mutable "
)
{
funcDecl
=
funcDecl
.
right
(
funcDecl
.
length
()
-
8
);
root
->
memSpec
|=
Entry
::
Mutable
;
done
=
FALSE
;
}
if
(
funcDecl
.
left
(
8
)
==
"virtual "
)
{
funcDecl
=
funcDecl
.
right
(
funcDecl
.
length
()
-
7
);
root
->
inLine
=
TRU
E
;
done
=
FALS
E
;
}
}
while
(
!
done
);
// delete any ; from the function declaration
int
sep
;
...
...
@@ -2748,6 +2787,9 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
QCString
fullFuncDecl
=
funcDecl
.
copy
();
if
(
isFunc
)
fullFuncDecl
+=
argListToString
(
root
->
argList
);
if
(
funcType
==
"template class"
&&
!
funcTempList
.
isEmpty
())
return
;
// ignore explicit template instantiations
Debug
::
print
(
Debug
::
FindMembers
,
0
,
"findMember() Parse results:
\n
"
" namespaceName=`%s'
\n
"
...
...
@@ -2924,37 +2966,24 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
}
}
if
(
count
==
0
&&
!
(
isFriend
&&
funcType
==
"class"
))
{
warn
(
root
->
fileName
,
root
->
startLine
,
"Warning: no matching
member found for
\n
%s"
,
"Warning: no matching
class member found for
\n
%s"
,
fullFuncDecl
.
data
()
);
#if 0
else if (count>1)
if
(
mn
->
count
()
>
0
)
{
warn("Warning: multiple matching members for\n%s\n",funcDecl.data());
int matchCount=0;
MemberDef *md=mn->first();
while (md)
{
if (md->memberClass() && className==md->memberClass()->name())
matchCount++;
md=mn->next();
}
if (matchCount>0)
{
warn("Possible candidates are:\n");
warn_cont
(
"Possible candidates:
\n
"
);
md
=
mn
->
first
();
while
(
md
)
{
ClassDef
*
cd
=
md
->
memberClass
();
if (cd && className==cd->name())
warn(" %s::%s%s\n",md->memberClass()->name(),
md->name(),md->argsString());
if
(
!
cd
||
cd
->
name
()
==
className
)
warn_cont
(
" %s
\n
"
,
md
->
declaration
());
md
=
mn
->
next
();
}
}
}
#endif
}
else
if
(
overloaded
)
// check if the function belongs to only one class
{
...
...
@@ -2993,24 +3022,16 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
doc
+=
"<p>"
;
doc
+=
root
->
doc
;
md
->
setDocumentation
(
doc
);
//md->setDecFile(root->fileName);
//md->setDecLine(root->startLine);
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
md
->
setPrototype
(
root
->
proto
);
md
->
addSectionsToDefinition
(
root
->
anchors
);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
//md->setBody(root->body);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
bool
ambig
;
FileDef
*
fd
=
findFileDef
(
&
inputNameDict
,
root
->
fileName
,
ambig
);
md
->
setBodyDef
(
fd
);
md
->
setInline
(
root
->
inLine
);
md
->
setMemberSpecifiers
(
root
->
memSpec
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
mn
->
inSort
(
md
);
cd
->
insertMember
(
md
,
root
->
mGrpId
);
cd
->
insertMember
(
md
);
cd
->
insertUsedFile
(
root
->
fileName
);
}
}
...
...
@@ -3116,7 +3137,7 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
md
->
setMemberClass
(
cd
);
md
->
set
Inline
(
root
->
inLine
);
md
->
set
MemberSpecifiers
(
root
->
memSpec
);
md
->
setDefinition
(
funcDecl
);
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
...
...
@@ -3124,8 +3145,9 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
md
->
setDocumentation
(
root
->
doc
);
md
->
setBriefDescription
(
root
->
brief
);
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
mn
->
inSort
(
md
);
cd
->
insertMember
(
md
,
root
->
mGrpId
);
cd
->
insertMember
(
md
);
cd
->
insertUsedFile
(
root
->
fileName
);
if
(
newMemberName
)
{
...
...
@@ -3154,6 +3176,12 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
"be found."
,
funcName
.
data
()
);
}
else
if
(
!
className
.
isEmpty
())
{
warn
(
root
->
fileName
,
root
->
startLine
,
"Warning: member %s of class %s cannot be found"
,
funcName
.
data
(),
className
.
data
());
}
}
}
else
...
...
@@ -3169,13 +3197,13 @@ void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
// find the members corresponding to the different documentation blocks
// that are extracted from the sources.
void
findMemberDocumentation
(
Entry
*
root
)
static
void
findMemberDocumentation
(
Entry
*
root
)
{
int
i
,
l
;
QRegExp
re
(
"([a-zA-Z0-9: ]*
\\
*+[
\\
*]*"
);
Debug
::
print
(
Debug
::
FindMembers
,
0
,
"root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->
inLine
=%d
\n
"
,
root
->
type
.
data
(),
root
->
inside
.
data
(),
root
->
name
.
data
(),
root
->
args
.
data
(),
root
->
section
,
root
->
inLine
"root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->
memSpec
=%d
\n
"
,
root
->
type
.
data
(),
root
->
inside
.
data
(),
root
->
name
.
data
(),
root
->
args
.
data
(),
root
->
section
,
root
->
memSpec
);
bool
isFunc
=
TRUE
;
if
((
i
=
re
.
match
(
root
->
type
,
0
,
&
l
))
!=-
1
)
// func variable/typedef to func ptr
...
...
@@ -3216,8 +3244,8 @@ void findMemberDocumentation(Entry *root)
)
)
&&
(
!
root
->
doc
.
isEmpty
()
||
!
root
->
brief
.
isEmpty
()
||
root
->
bodyLine
!=-
1
/* || root->mGrpId!=-1 || Config::extractAllFlag*/
||
root
->
inLine
root
->
bodyLine
!=-
1
||
(
root
->
memSpec
&
Entry
::
Inline
)
)
)
{
...
...
@@ -3269,7 +3297,7 @@ void findMemberDocumentation(Entry *root)
//----------------------------------------------------------------------
// find and add the enumeration to their classes, namespaces or files
void
findEnums
(
Entry
*
root
)
static
void
findEnums
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
ENUM_SEC
)
// non anonymous enumeration
...
...
@@ -3340,6 +3368,7 @@ void findEnums(Entry *root)
//printf("Enum %s definition at line %d of %s: protection=%d\n",
// root->name.data(),root->bodyLine,root->fileName.data(),root->protection);
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
setMemberGroupId
(
root
->
mGrpId
);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
...
...
@@ -3347,18 +3376,18 @@ void findEnums(Entry *root)
if
(
nd
&&
!
nd
->
name
().
isEmpty
()
&&
nd
->
name
().
at
(
0
)
!=
'@'
)
{
md
->
setDefinition
(
nd
->
name
()
+
"::"
+
name
);
nd
->
insertMember
(
md
,
root
->
mGrpId
);
nd
->
insertMember
(
md
);
md
->
setNamespace
(
nd
);
}
else
if
(
isGlobal
)
{
md
->
setDefinition
(
name
);
fd
->
insertMember
(
md
,
root
->
mGrpId
);
fd
->
insertMember
(
md
);
}
else
if
(
cd
)
{
md
->
setDefinition
(
cd
->
name
()
+
"::"
+
name
);
cd
->
insertMember
(
md
,
root
->
mGrpId
);
cd
->
insertMember
(
md
);
cd
->
insertUsedFile
(
root
->
fileName
);
}
md
->
setDocumentation
(
root
->
doc
);
...
...
@@ -3438,7 +3467,7 @@ void findEnums(Entry *root)
//----------------------------------------------------------------------
// find the documentation blocks for the enumerations
void
findEnumDocumentation
(
Entry
*
root
)
static
void
findEnumDocumentation
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
ENUMDOC_SEC
&&
!
root
->
name
.
isEmpty
()
...
...
@@ -3495,9 +3524,10 @@ void findEnumDocumentation(Entry *root)
md
->
setBriefDescription
(
root
->
brief
);
}
if
(
root
->
mGrpId
!=-
1
&&
md
->
getMemberGroup
()
==
0
)
if
(
root
->
mGrpId
!=-
1
&&
md
->
getMemberGroup
Id
()
==-
1
)
{
cd
->
addMemberToGroup
(
md
,
root
->
mGrpId
);
//cd->addMemberToGroup(md,root->mGrpId);
md
->
setMemberGroupId
(
root
->
mGrpId
);
}
md
->
addSectionsToDefinition
(
root
->
anchors
);
...
...
@@ -3577,7 +3607,7 @@ static void findDEV(const MemberNameList &mnl)
// seach for each enum (member or function) if it has documented enum
// values.
void
findDocumentedEnumValues
()
static
void
findDocumentedEnumValues
()
{
findDEV
(
memberNameList
);
findDEV
(
functionNameList
);
...
...
@@ -3589,7 +3619,7 @@ void findDocumentedEnumValues()
// the members that override the implementation of `m' are searched and
// the member that `m' overrides is searched.
void
computeMemberRelations
()
static
void
computeMemberRelations
()
{
MemberName
*
mn
=
memberNameList
.
first
();
while
(
mn
)
// for each member name
...
...
@@ -3641,7 +3671,7 @@ void computeMemberRelations()
//----------------------------------------------------------------------------
void
computeClassImplUsageRelations
()
static
void
computeClassImplUsageRelations
()
{
ClassDef
*
cd
;
ClassListIterator
cli
(
classList
);
...
...
@@ -3652,15 +3682,15 @@ void computeClassImplUsageRelations()
}
//----------------------------------------------------------------------------
void
computeMemberGroups
()
{
ClassDef
*
cd
;
ClassListIterator
cli
(
classList
);
for
(;(
cd
=
cli
.
current
());
++
cli
)
{
cd
->
computeMemberGroups
();
}
}
//static
void computeMemberGroups()
//
{
//
ClassDef *cd;
//
ClassListIterator cli(classList);
//
for (;(cd=cli.current());++cli)
//
{
//
cd->computeMemberGroups();
//
}
//
}
//----------------------------------------------------------------------------
...
...
@@ -3680,7 +3710,7 @@ void computeClassIntfUsageRelations()
// builds the list of all members for each class
void
buildCompleteMemberLists
()
static
void
buildCompleteMemberLists
()
{
ClassDef
*
cd
;
ClassListIterator
cli
(
classList
);
...
...
@@ -3702,7 +3732,7 @@ void buildCompleteMemberLists()
//----------------------------------------------------------------------------
void
generateFileDocs
()
static
void
generateFileDocs
()
{
if
(
documentedHtmlFiles
==
0
)
return
;
writeFileIndex
(
*
outputList
);
...
...
@@ -3764,7 +3794,7 @@ void generateFileDocs()
// }
//}
void
addSourceReferences
()
static
void
addSourceReferences
()
{
ClassListIterator
cli
(
classList
);
ClassDef
*
cd
=
0
;
...
...
@@ -3789,8 +3819,6 @@ void addSourceReferences()
if
(
fd
&&
cd
&&
cd
->
isLinkableInProject
()
&&
md
->
getStartBodyLine
()
!=-
1
&&
md
->
isLinkableInProject
())
{
//printf("Found member `%s' in file `%s' at line `%d'\n",
// md->name().data(),fd->name().data(),md->getStartBodyLine());
Definition
*
d
=
cd
;
if
(
d
==
0
)
d
=
md
->
getNamespace
();
if
(
d
==
0
)
d
=
md
->
getFileDef
();
...
...
@@ -3825,16 +3853,13 @@ void addSourceReferences()
//----------------------------------------------------------------------------
// generate the documentation of all classes
void
generateClassDocs
()
static
void
generateClassDocs
()
{
// write the installdox script if necessary
if
(
Config
::
generateHtml
&&
(
Config
::
tagFileList
.
count
()
>
0
||
Config
::
searchEngineFlag
))
writeInstallScript
();
msg
(
"Generating index page...
\n
"
);
writeIndex
(
*
outputList
);
msg
(
"Generating annotated compound index...
\n
"
);
writeAnnotatedIndex
(
*
outputList
);
...
...
@@ -3872,7 +3897,7 @@ void generateClassDocs()
//----------------------------------------------------------------------------
void
inheritDocumentation
()
static
void
inheritDocumentation
()
{
MemberNameListIterator
mnli
(
memberNameList
);
MemberName
*
mn
;
...
...
@@ -3905,7 +3930,46 @@ void inheritDocumentation()
//----------------------------------------------------------------------------
void
distributeMemberGroupDocumentation
()
static
void
addMembersToMemberGroup
()
{
// for each class
ClassListIterator
cli
(
classList
);
ClassDef
*
cd
;
for
(
;
(
cd
=
cli
.
current
())
;
++
cli
)
{
cd
->
addMembersToMemberGroup
();
}
// for each file
FileName
*
fn
=
inputNameList
.
first
();
while
(
fn
)
{
FileDef
*
fd
=
fn
->
first
();
while
(
fd
)
{
fd
->
addMembersToMemberGroup
();
fd
=
fn
->
next
();
}
fn
=
inputNameList
.
next
();
}
// for each namespace
NamespaceDef
*
nd
=
namespaceList
.
first
();
while
(
nd
)
{
nd
->
addMembersToMemberGroup
();
nd
=
namespaceList
.
next
();
}
// for each group
GroupDef
*
gd
=
groupList
.
first
();
while
(
gd
)
{
gd
->
addMembersToMemberGroup
();
gd
=
groupList
.
next
();
}
}
//----------------------------------------------------------------------------
static
void
distributeMemberGroupDocumentation
()
{
// for each class
ClassListIterator
cli
(
classList
);
...
...
@@ -3944,7 +4008,7 @@ void distributeMemberGroupDocumentation()
//----------------------------------------------------------------------------
void
findDefineDocumentation
(
Entry
*
root
)
static
void
findDefineDocumentation
(
Entry
*
root
)
{
if
((
root
->
section
==
Entry
::
DEFINEDOC_SEC
||
root
->
section
==
Entry
::
DEFINE_SEC
)
&&
!
root
->
name
.
isEmpty
()
...
...
@@ -3974,19 +4038,17 @@ void findDefineDocumentation(Entry *root)
if
(
md
->
briefDescription
().
isEmpty
())
md
->
setBriefDescription
(
root
->
brief
);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
//if (root->mGrpId!=-1 && md->getMemberGroup()==0)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
bool
ambig
;
md
->
setBodyDef
(
findFileDef
(
&
inputNameDict
,
root
->
fileName
,
ambig
));
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
setMaxInitLines
(
root
->
initLines
);
if
(
root
->
mGrpId
!=-
1
)
md
->
setMemberGroupId
(
root
->
mGrpId
);
addMemberToGroups
(
root
,
md
);
FileDef
*
fd
=
md
->
getFileDef
();
if
(
fd
&&
root
->
mGrpId
!=-
1
)
{
fd
->
addMemberToGroup
(
md
,
root
->
mGrpId
);
}
//
FileDef *fd=md->getFileDef();
//
if (fd && root->mGrpId!=-1)
//
{
//
fd->addMemberToGroup(md,root->mGrpId);
//
}
}
md
=
mn
->
next
();
}
...
...
@@ -4021,11 +4083,12 @@ void findDefineDocumentation(Entry *root)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
if
(
root
->
mGrpId
!=-
1
)
md
->
setMemberGroupId
(
root
->
mGrpId
);
addMemberToGroups
(
root
,
md
);
if
(
root
->
mGrpId
!=-
1
)
{
fd
->
addMemberToGroup
(
md
,
root
->
mGrpId
);
}
//
if (root->mGrpId!=-1)
//
{
//
fd->addMemberToGroup(md,root->mGrpId);
//
}
}
}
md
=
mn
->
next
();
...
...
@@ -4057,7 +4120,7 @@ void findDefineDocumentation(Entry *root)
//----------------------------------------------------------------------------
// create a (sorted) list of separate documentation pages
void
buildPageList
(
Entry
*
root
)
static
void
buildPageList
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
PAGEDOC_SEC
)
{
...
...
@@ -4115,7 +4178,7 @@ void buildPageList(Entry *root)
}
}
void
findMainPage
(
Entry
*
root
)
static
void
findMainPage
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
MAINPAGEDOC_SEC
)
{
...
...
@@ -4145,7 +4208,7 @@ void findMainPage(Entry *root)
//----------------------------------------------------------------------------
void
resolveUserReferences
()
static
void
resolveUserReferences
()
{
QDictIterator
<
SectionInfo
>
sdi
(
sectionDict
);
SectionInfo
*
si
;
...
...
@@ -4185,7 +4248,7 @@ void resolveUserReferences()
// }
//}
void
generatePageDocs
()
static
void
generatePageDocs
()
{
PageInfo
*
pi
=
pageList
.
first
();
while
(
pi
)
...
...
@@ -4217,7 +4280,7 @@ void generatePageDocs()
//----------------------------------------------------------------------------
// create a (sorted) list & dictionary of example pages
void
buildExampleList
(
Entry
*
root
)
static
void
buildExampleList
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
EXAMPLE_SEC
)
{
...
...
@@ -4261,7 +4324,7 @@ void buildExampleList(Entry *root)
//----------------------------------------------------------------------------
// generate the example documentation
void
generateExampleDocs
()
static
void
generateExampleDocs
()
{
outputList
->
disable
(
OutputGenerator
::
Man
);
PageInfo
*
pi
=
exampleList
.
first
();
...
...
@@ -4283,7 +4346,7 @@ void generateExampleDocs()
//----------------------------------------------------------------------------
// generate module pages
void
generateGroupDocs
()
static
void
generateGroupDocs
()
{
GroupListIterator
gli
(
groupList
);
GroupDef
*
gd
;
...
...
@@ -4325,7 +4388,7 @@ void generateGroupDocs()
//----------------------------------------------------------------------------
// generate module pages
void
generateNamespaceDocs
()
static
void
generateNamespaceDocs
()
{
writeNamespaceIndex
(
*
outputList
);
...
...
@@ -4366,7 +4429,7 @@ static QCString fixSlashes(QCString &s)
//----------------------------------------------------------------------------
// generate files for the search engine
void
generateSearchIndex
()
static
void
generateSearchIndex
()
{
if
(
Config
::
searchEngineFlag
&&
Config
::
generateHtml
)
{
...
...
@@ -4478,7 +4541,7 @@ void generateSearchIndex()
//----------------------------------------------------------------------------
// generate the configuration file
void
generateConfigFile
(
const
char
*
configFile
,
bool
shortList
)
static
void
generateConfigFile
(
const
char
*
configFile
,
bool
shortList
)
{
QFile
f
;
bool
fileOpened
=
FALSE
;
...
...
@@ -4524,15 +4587,17 @@ void generateConfigFile(const char *configFile,bool shortList)
//----------------------------------------------------------------------------
// read and parse a tag file
bool
readLineFromFile
(
QFile
&
f
,
QCString
&
s
)
{
char
c
=
0
;
s
.
resize
(
0
);
while
(
!
f
.
atEnd
()
&&
(
c
=
f
.
getch
())
!=
'\n'
)
s
+=
c
;
return
f
.
atEnd
();
}
//static bool readLineFromFile(QFile &f,QCString &s)
//{
// char c=0;
// s.resize(0);
// while (!f.atEnd() && (c=f.getch())!='\n') s+=c;
// return f.atEnd();
//}
//----------------------------------------------------------------------------
void
readTagFile
(
const
char
*
tl
)
static
void
readTagFile
(
const
char
*
tl
)
{
QCString
tagLine
=
tl
;
QCString
fileName
;
...
...
@@ -4571,7 +4636,7 @@ void readTagFile(const char *tl)
// returns TRUE if the name of the file represented by `fi' matches
// one of the file patterns in the `patList' list.
bool
patternMatch
(
QFileInfo
*
fi
,
QStrList
*
patList
)
static
bool
patternMatch
(
QFileInfo
*
fi
,
QStrList
*
patList
)
{
bool
found
=
FALSE
;
if
(
patList
)
...
...
@@ -4579,12 +4644,15 @@ bool patternMatch(QFileInfo *fi,QStrList *patList)
char
*
pattern
=
patList
->
first
();
while
(
pattern
&&
!
found
)
{
//printf("Matching `%s' against pattern `%s'\n",fi->fileName().data(),pattern);
#if defined(_WIN32) // windows
QRegExp
re
(
pattern
,
FALSE
,
TRUE
);
// case insensitive match
#else // unix
QRegExp
re
(
pattern
,
TRUE
,
TRUE
);
// case sensitive match
#endif
found
=
found
||
re
.
match
(
fi
->
fileName
())
!=-
1
||
re
.
match
(
fi
->
filePath
())
!=-
1
;
found
=
found
||
re
.
match
(
fi
->
fileName
())
!=-
1
||
re
.
match
(
fi
->
filePath
())
!=-
1
||
re
.
match
(
fi
->
absFilePath
())
!=-
1
;
pattern
=
patList
->
next
();
}
}
...
...
@@ -4595,7 +4663,7 @@ bool patternMatch(QFileInfo *fi,QStrList *patList)
// reads a file into an array and filters out any 0x00 and 0x06 bytes,
// because these are special for the parser.
void
copyAndFilterFile
(
const
char
*
fileName
,
BufStr
&
dest
)
static
void
copyAndFilterFile
(
const
char
*
fileName
,
BufStr
&
dest
)
{
// try to open file
int
size
=
0
;
...
...
@@ -4652,7 +4720,7 @@ void copyAndFilterFile(const char *fileName,BufStr &dest)
}
//----------------------------------------------------------------------------
void
copyStyleSheet
()
static
void
copyStyleSheet
()
{
if
(
!
Config
::
htmlStyleSheet
.
isEmpty
())
{
...
...
@@ -4687,8 +4755,7 @@ void copyStyleSheet()
// The name of the file is written in front of the file's contents and
// between 0x06 markers
void
readFiles
(
BufStr
&
output
)
static
void
readFiles
(
BufStr
&
output
)
{
QCString
*
s
=
inputFiles
.
first
();
// char *p=output.data();
...
...
@@ -4743,7 +4810,7 @@ void readFiles(BufStr &output)
// The directory is read iff the recusiveFlag is set.
// The contents of all files is append to the input string
int
readDir
(
QFileInfo
*
fi
,
static
int
readDir
(
QFileInfo
*
fi
,
FileNameList
*
fnList
,
FileNameDict
*
fnDict
,
StringDict
*
exclDict
,
...
...
@@ -4756,6 +4823,7 @@ int readDir(QFileInfo *fi,
QDir
dir
((
const
char
*
)
fi
->
absFilePath
());
dir
.
setFilter
(
QDir
::
Files
|
QDir
::
Dirs
);
int
totalSize
=
0
;
//printf("readDir `%s'\n",fi->absFilePath().data());
const
QFileInfoList
*
list
=
dir
.
entryInfoList
();
QFileInfoListIterator
it
(
*
list
);
...
...
@@ -4775,6 +4843,7 @@ int readDir(QFileInfo *fi,
{
totalSize
+=
cfi
->
size
()
+
cfi
->
absFilePath
().
length
()
+
4
;
QCString
name
=
convertToQCString
(
cfi
->
fileName
());
//printf("New file %s\n",name.data());
if
(
fnDict
)
{
FileDef
*
fd
=
new
FileDef
(
cfi
->
dirPath
()
+
"/"
,
name
);
...
...
@@ -4815,44 +4884,44 @@ int readDir(QFileInfo *fi,
//----------------------------------------------------------------------------
// read the file with name `name' into a string.
QCString
readExampleFile
(
const
char
*
name
)
{
QCString
example
;
QFileInfo
fi
(
name
);
if
(
fi
.
exists
())
{
QFile
f
((
const
char
*
)
fi
.
absFilePath
());
if
(
f
.
open
(
IO_ReadOnly
))
{
example
.
resize
(
fi
.
size
()
+
1
);
if
((
int
)
fi
.
size
()
!=
f
.
readBlock
(
example
.
data
(),
fi
.
size
()))
{
err
(
"Error while reading file %s
\n
"
,
fi
.
absFilePath
().
data
());
//exit(1);
return
""
;
}
example
.
at
(
fi
.
size
())
=
'\0'
;
}
else
{
err
(
"Error opening file %s
\n
"
,
fi
.
absFilePath
().
data
());
//exit(1);
return
""
;
}
}
else
{
err
(
"Error: example file %s does not exist
\n
"
,
name
);
exit
(
1
);
}
return
example
;
}
//static
QCString readExampleFile(const char *name)
//
{
//
QCString example;
//
QFileInfo fi(name);
//
if (fi.exists())
//
{
//
QFile f((const char *)fi.absFilePath());
//
if (f.open(IO_ReadOnly))
//
{
//
example.resize(fi.size()+1);
//
if ((int)fi.size()!=f.readBlock(example.data(),fi.size()))
//
{
//
err("Error while reading file %s\n",fi.absFilePath().data());
//
//exit(1);
//
return "";
//
}
//
example.at(fi.size())='\0';
//
}
//
else
//
{
//
err("Error opening file %s\n",fi.absFilePath().data());
//
//exit(1);
//
return "";
//
}
//
}
//
else
//
{
//
err("Error: example file %s does not exist\n",name);
//
exit(1);
//
}
//
return example;
//
}
//----------------------------------------------------------------------------
// read a file or all files in a directory and append their contents to the
// input string. The names of the files are appended to the `fiList' list.
int
readFileOrDirectory
(
const
char
*
s
,
static
int
readFileOrDirectory
(
const
char
*
s
,
FileNameList
*
fnList
,
FileNameDict
*
fnDict
,
StringDict
*
exclDict
,
...
...
@@ -4863,6 +4932,7 @@ int readFileOrDirectory(const char *s,
)
{
QFileInfo
fi
(
s
);
//printf("readFileOrDirectory(%s)\n",s);
int
totalSize
=
0
;
{
if
(
exclDict
==
0
||
exclDict
->
find
(
fi
.
absFilePath
())
==
0
)
...
...
@@ -4876,6 +4946,7 @@ int readFileOrDirectory(const char *s,
totalSize
+=
fi
.
size
()
+
fi
.
absFilePath
().
length
()
+
4
;
//readFile(&fi,fiList,input);
//fiList->inSort(new FileInfo(fi));
QCString
name
=
convertToQCString
(
fi
.
fileName
());
//printf("New file %s\n",name.data());
if
(
fnDict
)
{
FileDef
*
fd
=
new
FileDef
(
fi
.
dirPath
(
TRUE
)
+
"/"
,
name
);
...
...
@@ -4910,7 +4981,7 @@ int readFileOrDirectory(const char *s,
//----------------------------------------------------------------------------
void
readFormulaRepository
()
static
void
readFormulaRepository
()
{
QFile
f
(
Config
::
htmlOutputDir
+
"/formula.repository"
);
if
(
f
.
open
(
IO_ReadOnly
))
// open repository
...
...
@@ -4942,7 +5013,7 @@ void readFormulaRepository()
//----------------------------------------------------------------------------
// print the usage of doxygen
void
usage
(
const
char
*
name
)
static
void
usage
(
const
char
*
name
)
{
msg
(
"Doxygen version %s
\n
Copyright Dimitri van Heesch 1997-2000
\n\n
"
,
versionString
);
msg
(
"You can use doxygen in three ways:
\n\n
"
);
...
...
@@ -4964,7 +5035,7 @@ void usage(const char *name)
// read the argument of option `c' from the comment argument list and
// update the option index `optind'.
const
char
*
getArg
(
int
argc
,
char
**
argv
,
int
&
optind
)
static
const
char
*
getArg
(
int
argc
,
char
**
argv
,
int
&
optind
)
{
char
*
s
=
0
;
if
(
strlen
(
&
argv
[
optind
][
2
])
>
0
)
...
...
@@ -5299,9 +5370,6 @@ int main(int argc,char **argv)
msg
(
"Determining which enums are documented
\n
"
);
findDocumentedEnumValues
();
msg
(
"Computing member groups...
\n
"
);
computeMemberGroups
();
msg
(
"Computing member references...
\n
"
);
computeMemberReferences
();
...
...
@@ -5314,6 +5382,11 @@ int main(int argc,char **argv)
computeClassImplUsageRelations
();
}
msg
(
"Adding members to member groups.
\n
"
);
addMembersToMemberGroup
();
msg
(
"Distributing member group documentation.
\n
"
);
distributeMemberGroupDocumentation
();
msg
(
"Building full member lists recursively...
\n
"
);
buildCompleteMemberLists
();
...
...
@@ -5324,9 +5397,6 @@ int main(int argc,char **argv)
//msg("Determining member group documentation...\n");
//computeMemberGroupDocumentation();
msg
(
"Adding source references...
\n
"
);
addSourceReferences
();
//unrelatedFunctionsUsed=hasUnrelatedFunctions();
if
(
Config
::
inheritDocsFlag
)
...
...
@@ -5335,8 +5405,11 @@ int main(int argc,char **argv)
inheritDocumentation
();
}
msg
(
"Distributing member group documentation.
\n
"
);
distributeMemberGroupDocumentation
();
//msg("Computing member groups...\n");
//computeMemberGroups();
msg
(
"Adding source references...
\n
"
);
addSourceReferences
();
/**************************************************************************
* Generate documentation *
...
...
@@ -5367,6 +5440,9 @@ int main(int argc,char **argv)
msg
(
"Resolving user defined references...
\n
"
);
resolveUserReferences
();
msg
(
"Generating index page...
\n
"
);
writeIndex
(
*
outputList
);
msg
(
"Generating example documentation...
\n
"
);
generateExampleDocs
();
...
...
src/entry.cpp
View file @
d8197176
...
...
@@ -69,8 +69,9 @@ Entry::Entry(const Entry &e)
mGrpId
=
e
.
mGrpId
;
bodyLine
=
e
.
bodyLine
;
endBodyLine
=
e
.
endBodyLine
;
inLine
=
e
.
inLine
;
memSpec
=
e
.
memSpec
;
initializer
=
e
.
initializer
;
initLines
=
e
.
initLines
;
sublist
=
new
QList
<
Entry
>
;
sublist
->
setAutoDelete
(
TRUE
);
extends
=
new
QList
<
BaseInfo
>
;
...
...
@@ -207,6 +208,7 @@ void Entry::reset()
scopeSpec
.
resize
(
0
);
memberSpec
.
resize
(
0
);
initializer
.
resize
(
0
);
initLines
=
-
1
;
startLine
=
1
;
bodyLine
=
-
1
;
endBodyLine
=
-
1
;
...
...
@@ -217,7 +219,7 @@ void Entry::reset()
slot
=
FALSE
;
stat
=
FALSE
;
proto
=
FALSE
;
inLine
=
FALSE
;
memSpec
=
0
;
subGrouping
=
TRUE
;
protection
=
Public
;
sublist
->
clear
();
...
...
src/entry.h
View file @
d8197176
...
...
@@ -46,7 +46,7 @@ struct Argument
docs
=
a
.
docs
.
copy
();
array
=
a
.
array
.
copy
();
}
/* Assignment of an argument (does a deep copy of all strings). */
/*
!
Assignment of an argument (does a deep copy of all strings). */
Argument
&
operator
=
(
const
Argument
&
a
)
{
if
(
this
!=&
a
)
...
...
@@ -144,6 +144,12 @@ class Entry
MEMBERGRP_SEC
=
0x01300000
,
USINGDECL_SEC
=
0x01400000
};
enum
MemberSpecifier
{
Inline
=
0x1
,
Explicit
=
0x2
,
Mutable
=
0x4
};
Entry
();
Entry
(
const
Entry
&
);
...
...
@@ -159,7 +165,8 @@ class Entry
bool
slot
;
// a Qt slot ?
bool
stat
;
// static ?
bool
proto
;
// prototype ?
bool
inLine
;
// inline ?
int
memSpec
;
// member specifiers
int
initLines
;
// define/variable initializer lines to show
bool
subGrouping
;
// automatically group class members?
Specifier
virt
;
// virtualness of the entry
Entry
*
parent
;
// parent node in the tree
...
...
src/filedef.cpp
View file @
d8197176
...
...
@@ -268,9 +268,12 @@ void FileDef::writeDocumentation(OutputList &ol)
MemberGroupListIterator
mgli
(
*
memberGroupList
);
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
if
(
mg
->
header
()
!=
"[NOHEADER]"
)
{
mg
->
writeDeclarations
(
ol
,
0
,
0
,
this
,
0
);
}
}
allMemberList
.
writeDeclarations
(
ol
,
0
,
0
,
this
,
0
,
0
,
0
);
ol
.
endMemberSections
();
...
...
@@ -439,9 +442,15 @@ void FileDef::writeSource(OutputList &ol)
/*! Adds a member \a md to the member group with id \a groupId.
*/
void
FileDef
::
addMemberToGroup
(
MemberDef
*
md
,
int
groupId
)
void
FileDef
::
addMemberListToGroup
(
MemberList
*
ml
,
bool
(
MemberDef
::*
func
)()
const
)
{
if
(
groupId
!=-
1
)
MemberListIterator
mli
(
*
ml
);
MemberDef
*
md
;
for
(;(
md
=
mli
.
current
());
++
mli
)
{
int
groupId
=
md
->
getMemberGroupId
();
if
((
md
->*
func
)()
&&
groupId
!=-
1
)
{
QCString
*
pGrpHeader
=
memberHeaderDict
[
groupId
];
QCString
*
pDocs
=
memberDocDict
[
groupId
];
...
...
@@ -458,25 +467,50 @@ void FileDef::addMemberToGroup(MemberDef *md,int groupId)
md
->
setMemberGroup
(
mg
);
}
}
}
}
void
FileDef
::
addMembersToMemberGroup
()
{
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isDefine
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isTypedef
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isEnumerate
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isEnumValue
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isFunction
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isVariable
);
}
/*! Adds member definition \a md to the list of all members of this file */
void
FileDef
::
insertMember
(
MemberDef
*
md
,
int
groupId
)
void
FileDef
::
insertMember
(
MemberDef
*
md
)
{
allMemberList
.
append
(
md
);
switch
(
md
->
memberType
())
{
case
MemberDef
:
:
Variable
:
varMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Function
:
funcMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Typedef
:
typedefMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Enumeration
:
enumMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
EnumValue
:
enumValMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Prototype
:
protoMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Define
:
defineMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Variable
:
varMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Function
:
funcMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Typedef
:
typedefMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Enumeration
:
enumMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
EnumValue
:
enumValMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Prototype
:
protoMembers
.
inSort
(
md
);
break
;
case
MemberDef
:
:
Define
:
defineMembers
.
inSort
(
md
);
break
;
default
:
err
(
"FileDef::insertMembers(): unexpected member insert in file!
\n
"
);
}
addMemberToGroup
(
md
,
groupId
);
//
addMemberToGroup(md,groupId);
}
/*! Adds compound definition \a cd to the list of all compounds of this file */
...
...
src/filedef.h
View file @
d8197176
...
...
@@ -110,8 +110,7 @@ class FileDef : public Definition
void
writeDocumentation
(
OutputList
&
ol
);
void
writeSource
(
OutputList
&
ol
);
friend
void
generatedFileNames
();
void
insertMember
(
MemberDef
*
md
,
int
groupId
);
void
addMemberToGroup
(
MemberDef
*
md
,
int
groupId
);
void
insertMember
(
MemberDef
*
md
);
void
insertClass
(
ClassDef
*
cd
);
void
insertNamespace
(
NamespaceDef
*
nd
);
void
computeAnchors
();
...
...
@@ -127,8 +126,12 @@ class FileDef : public Definition
QList
<
IncludeInfo
>
*
includeFileList
()
const
{
return
includeList
;
}
QDict
<
IncludeInfo
>
*
includeFileDict
()
const
{
return
includeDict
;
}
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
protected
:
void
addMemberListToGroup
(
MemberList
*
,
bool
(
MemberDef
::*
)()
const
);
private
:
MemberList
allMemberList
;
MemberList
defineMembers
;
...
...
src/groupdef.cpp
View file @
d8197176
...
...
@@ -91,9 +91,16 @@ void GroupDef::addNamespace(const NamespaceDef *def)
namespaceList
->
append
(
def
);
}
void
GroupDef
::
addMemberToGroup
(
MemberDef
*
md
,
int
groupId
)
void
GroupDef
::
addMemberListToGroup
(
MemberList
*
ml
,
bool
(
MemberDef
::*
func
)()
const
)
{
if
(
groupId
!=-
1
)
if
(
ml
==
0
)
return
;
MemberListIterator
mli
(
*
ml
);
MemberDef
*
md
;
for
(;(
md
=
mli
.
current
());
++
mli
)
{
int
groupId
=
md
->
getMemberGroupId
();
if
((
md
->*
func
)()
&&
groupId
!=-
1
)
{
QCString
*
pGrpHeader
=
memberHeaderDict
[
groupId
];
QCString
*
pDocs
=
memberDocDict
[
groupId
];
...
...
@@ -110,9 +117,23 @@ void GroupDef::addMemberToGroup(MemberDef *md,int groupId)
md
->
setMemberGroup
(
mg
);
}
}
}
}
void
GroupDef
::
addMembersToMemberGroup
()
{
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isDefine
);
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isTypedef
);
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isEnumerate
);
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isEnumValue
);
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isFunction
);
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isSlot
);
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isSignal
);
addMemberListToGroup
(
allMemberList
,
&
MemberDef
::
isVariable
);
}
void
GroupDef
::
insertMember
(
MemberDef
*
md
,
int
groupId
)
void
GroupDef
::
insertMember
(
MemberDef
*
md
)
{
QCString
funcDecl
=
md
->
name
()
+
md
->
argsString
();
if
(
allMemberDict
->
find
(
funcDecl
)
==
0
)
...
...
@@ -131,7 +152,7 @@ void GroupDef::insertMember(MemberDef *md,int groupId)
default
:
err
(
"FileDef::insertMembers(): unexpected member insert in file!
\n
"
);
}
addMemberToGroup
(
md
,
groupId
);
//
addMemberToGroup(md,groupId);
}
}
...
...
@@ -432,7 +453,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
GroupDef
*
mgd
=
md
->
groupDef
();
if
(
mgd
==
0
)
{
gd
->
insertMember
(
md
,
root
->
mGrpId
);
gd
->
insertMember
(
md
);
md
->
setGroupDef
(
gd
);
}
else
if
(
mgd
!=
gd
)
...
...
src/groupdef.h
View file @
d8197176
...
...
@@ -47,8 +47,7 @@ class GroupDef : public Definition
void
addClass
(
const
ClassDef
*
def
);
void
addNamespace
(
const
NamespaceDef
*
def
);
void
addGroup
(
const
GroupDef
*
def
);
void
insertMember
(
MemberDef
*
def
,
int
groupId
);
void
addMemberToGroup
(
MemberDef
*
def
,
int
groupId
);
void
insertMember
(
MemberDef
*
def
);
void
writeDocumentation
(
OutputList
&
ol
);
int
countMembers
()
const
;
bool
isLinkableInProject
()
...
...
@@ -60,8 +59,13 @@ class GroupDef : public Definition
return
isLinkableInProject
()
||
isReference
();
}
void
computeAnchors
();
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
protected
:
void
addMemberListToGroup
(
MemberList
*
,
bool
(
MemberDef
::*
)()
const
);
private
:
QCString
title
;
// title of the group
QCString
fileName
;
// base name of the generated file
...
...
src/htmlgen.cpp
View file @
d8197176
...
...
@@ -853,37 +853,18 @@ void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g)
g
.
writeGraph
(
t
,
Config
::
htmlOutputDir
);
}
void
HtmlGenerator
::
startMemberGroupHeader
()
void
HtmlGenerator
::
startMemberGroupHeader
(
bool
)
{
//t << "<tr><td colspan=2><img src=\"null.gif\" height=8></td></tr>" << endl;
//t << "<tr><td colspan=2>" << endl;
//t << " <div class=\"in\">" << endl;
//t << " <table border=0 cellspacing=0 cellpadding=0>" << endl;
//t << " <tr><td colspan=3 class=\"groupLine\"><img src=\"null.gif\" height=1></td></tr>" << endl;
//t << " <tr>" << endl;
//t << " <td class=\"groupLine\"><img src=\"null.gif\" width=1></td>" << endl;
//t << " <td><div class=\"groupHeader\"> ";
t
<<
"<tr><td colspan=
\"
2
\"
><div class=
\"
groupHeader
\"
>"
;
}
void
HtmlGenerator
::
endMemberGroupHeader
()
{
//t << " </div></td>" << endl;
//t << " <td class=\"groupLine\"><img src=\"null.gif\" width=1></td>" << endl;
//t << " </tr>" << endl;
//t << " <tr><td colspan=3 class=\"groupLine\"><img src=\"null.gif\" height=1></td></tr>" << endl;
//t << " </table>" << endl;
//t << " </div>" << endl;
//t << "</tr>" << endl;
//t << "<tr><td colspan=2><img src=\"null.gif\" height=4></td></tr>" << endl;
t
<<
"</div></td></tr>"
<<
endl
;
}
void
HtmlGenerator
::
startMemberGroupDocs
()
{
//t << "<tr><td colspan=2><img src=\"null.gif\" height=4></td></tr>" << endl;
t
<<
"<tr><td colspan=
\"
2
\"
><div class=
\"
groupText
\"
>"
;
}
...
...
src/htmlgen.h
View file @
d8197176
...
...
@@ -98,7 +98,7 @@ class HtmlGenerator : public OutputGenerator
void
endMemberList
();
void
startMemberItem
(
int
);
void
startMemberGroupHeader
();
void
startMemberGroupHeader
(
bool
);
void
endMemberGroupHeader
();
void
startMemberGroupDocs
();
void
endMemberGroupDocs
();
...
...
src/index.cpp
View file @
d8197176
...
...
@@ -1534,10 +1534,21 @@ void writeIndex(OutputList &ol)
int
defLine
=
mainPage
?
mainPage
->
defLine
:
1
;
QCString
title
;
if
(
!
mainPage
||
mainPage
->
title
.
isEmpty
())
ol
.
startFile
(
"index"
,
"Main Index"
,
FALSE
);
{
title
=
"Main Index"
;
}
else
ol
.
startFile
(
"index"
,
mainPage
->
title
,
FALSE
);
{
title
=
mainPage
->
title
;
}
ol
.
startFile
(
"index"
,
title
,
FALSE
);
if
(
Config
::
generateHtml
&&
Config
::
htmlHelpFlag
)
{
HtmlHelp
::
getInstance
()
->
addContentsItem
(
title
,
"index"
);
}
if
(
!
Config
::
noIndexFlag
)
writeQuickLinks
(
ol
,
TRUE
);
ol
.
startTitleHead
(
0
);
...
...
src/latexgen.cpp
View file @
d8197176
...
...
@@ -855,6 +855,8 @@ void LatexGenerator::startMemberDoc(const char *clname,
const
char
*
,
const
char
*
title
)
{
if
(
memname
&&
memname
[
0
]
!=
'@'
)
{
t
<<
"
\\
index{"
;
if
(
clname
)
{
...
...
@@ -876,7 +878,7 @@ void LatexGenerator::startMemberDoc(const char *clname,
t
<<
"}"
;
}
t
<<
"}"
<<
endl
;
//
}
if
(
Config
::
compactLatexFlag
)
t
<<
"
\\
paragraph"
;
else
t
<<
"
\\
subsubsection"
;
if
(
Config
::
pdfHyperFlag
&&
title
)
t
<<
"["
<<
filterTitle
(
title
)
<<
"]"
;
t
<<
"{
\\
setlength{
\\
rightskip}{0pt plus 5cm}"
;
...
...
@@ -956,10 +958,28 @@ void LatexGenerator::writeSection(const char *lab,const char *title,bool sub)
}
}
void
LatexGenerator
::
writeSectionRef
(
const
char
*
,
const
char
*
lab
,
const
char
*
)
void
LatexGenerator
::
writeSectionRef
(
const
char
*
fileName
,
const
char
*
lab
,
const
char
*
text
)
{
if
(
text
&&
Config
::
pdfHyperFlag
)
{
t
<<
"
\\
hyperlink{"
;
if
(
lab
)
t
<<
lab
;
t
<<
"}{"
;
docify
(
text
);
t
<<
"}"
;
}
else
{
if
(
strcmp
(
lab
,
text
)
!=
0
)
// lab!=text
{
t
<<
"{
\\
bf "
<<
text
<<
" (
\\
ref "
<<
lab
<<
")}}"
;
}
else
{
t
<<
"
\\
ref{"
<<
lab
<<
"}"
;
}
}
}
void
LatexGenerator
::
writeSectionRefItem
(
const
char
*
,
const
char
*
lab
,
...
...
@@ -1265,9 +1285,10 @@ void LatexGenerator::writeImage(const char *name,const char *w,const char *h)
t
<<
"}}"
<<
endl
;
}
void
LatexGenerator
::
startMemberGroupHeader
()
void
LatexGenerator
::
startMemberGroupHeader
(
bool
hasHeader
)
{
t
<<
"
\\
begin{Indent}{
\\
bf "
;
if
(
hasHeader
)
t
<<
"
\\
begin{Indent}"
;
t
<<
"{
\\
bf "
;
}
void
LatexGenerator
::
endMemberGroupHeader
()
...
...
@@ -1289,9 +1310,10 @@ void LatexGenerator::startMemberGroup()
{
}
void
LatexGenerator
::
endMemberGroup
(
bool
)
void
LatexGenerator
::
endMemberGroup
(
bool
hasHeader
)
{
t
<<
"
\\
end{Indent}"
<<
endl
;
if
(
hasHeader
)
t
<<
"
\\
end{Indent}"
;
t
<<
endl
;
}
void
LatexGenerator
::
startDotGraph
()
...
...
src/latexgen.h
View file @
d8197176
...
...
@@ -95,7 +95,7 @@ class LatexGenerator : public OutputGenerator
void
startMemberItem
(
int
);
void
endMemberItem
(
bool
);
void
startMemberGroupHeader
();
void
startMemberGroupHeader
(
bool
);
void
endMemberGroupHeader
();
void
startMemberGroupDocs
();
void
endMemberGroupDocs
();
...
...
src/mangen.cpp
View file @
d8197176
...
...
@@ -385,7 +385,7 @@ void ManGenerator::endMemberList()
}
}
void
ManGenerator
::
startMemberGroupHeader
()
void
ManGenerator
::
startMemberGroupHeader
(
bool
)
{
t
<<
"
\n
.PP
\n
.RI
\"\\
fB"
;
}
...
...
src/mangen.h
View file @
d8197176
...
...
@@ -95,7 +95,7 @@ class ManGenerator : public OutputGenerator
void
startMemberItem
(
int
);
void
endMemberItem
(
bool
);
void
startMemberGroupHeader
();
void
startMemberGroupHeader
(
bool
);
void
endMemberGroupHeader
();
void
startMemberGroupDocs
();
void
endMemberGroupDocs
();
...
...
src/memberdef.cpp
View file @
d8197176
...
...
@@ -212,6 +212,8 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al,bool br=TRUE)
* Members can be function/variables/enums/etc. inside a class or inside a
* file.
*
* \param df File containing the definition of this member.
* \param dl Line at which the member definition was found.
* \param t A string representing the type of the member.
* \param n A string representing the name of the member.
* \param a A string representing the arguments of the member.
...
...
@@ -241,6 +243,7 @@ MemberDef::MemberDef(const char *df,int dl,
memDef
=
0
;
memDec
=
0
;
group
=
0
;
grpId
=-
1
;
exampleList
=
0
;
exampleDict
=
0
;
enumFields
=
0
;
...
...
@@ -262,13 +265,14 @@ MemberDef::MemberDef(const char *df,int dl,
eUsed
=
FALSE
;
proto
=
FALSE
;
annScope
=
FALSE
;
inLine
=
FALSE
;
memSpec
=
FALSE
;
annMemb
=
0
;
annUsed
=
FALSE
;
annShown
=
FALSE
;
annEnumType
=
0
;
indDepth
=
0
;
section
=
0
;
maxInitLines
=
defMaxInitLines
;
docEnumValues
=
FALSE
;
// copy function template arguments (if any)
if
(
tal
)
...
...
@@ -442,19 +446,6 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd,
{
Definition
*
d
;
if
(
cd
)
d
=
cd
;
else
if
(
nd
)
d
=
nd
;
else
if
(
fd
)
d
=
fd
;
else
if
(
gd
)
d
=
gd
;
//if (mg)
// ol.writeObjectLink(0,mg->getOutputFileBase(),
// anchor(),name());
//else if (cd)
// ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),
// anchor(),name());
//else if (nd)
// ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),
// anchor(),name());
//else if (fd)
// ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),
// anchor(),name());
//else
ol
.
writeObjectLink
(
d
->
getReference
(),
d
->
getOutputFileBase
(),
anchor
(),
name
());
}
...
...
@@ -749,7 +740,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol
.
docify
(
excpString
());
}
if
(
!
init
.
isEmpty
()
&&
initLines
==
0
)
// add initializer
if
(
!
init
.
isEmpty
()
&&
initLines
==
0
&&
maxInitLines
>
0
)
// add initializer
{
if
(
!
isDefine
())
{
...
...
@@ -955,7 +946,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol
.
startMemberDocName
();
linkifyText
(
ol
,
scopeName
,
name
(),
def
);
writeDefArgumentList
(
ol
,
cd
,
scopeName
,
this
);
if
(
!
init
.
isEmpty
()
&&
initLines
==
0
)
// add initializer
if
(
!
init
.
isEmpty
()
&&
initLines
==
0
&&
maxInitLines
>
0
)
// add initializer
{
if
(
!
isDefine
())
{
...
...
@@ -986,7 +977,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if
(
isStatic
()
||
protection
()
!=
Public
||
virt
!=
Normal
||
isSignal
()
||
isFriend
()
||
isRelated
()
||
isSlot
()
||
(
isInline
()
&&
Config
::
inlineInfoFlag
)
getMemberSpecifiers
()
!=
0
)
{
// write the member specifier list
...
...
@@ -1000,6 +991,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
if
(
Config
::
inlineInfoFlag
&&
isInline
())
sl
.
append
(
"inline"
);
if
(
isExplicit
())
sl
.
append
(
"explicit"
);
if
(
isMutable
())
sl
.
append
(
"mutable"
);
if
(
isStatic
())
sl
.
append
(
"static"
);
if
(
protection
()
==
Protected
)
sl
.
append
(
"protected"
);
else
if
(
protection
()
==
Private
)
sl
.
append
(
"private"
);
...
...
@@ -1340,7 +1333,6 @@ bool MemberDef::isLinkableInProject()
{
return
!
name
().
isEmpty
()
&&
name
().
at
(
0
)
!=
'@'
&&
((
hasDocumentation
()
&&
!
isReference
())
/* || (memberGroup && memberGroup->isLinkableInProject())*/
)
&&
(
prot
!=
Private
||
Config
::
extractPrivateFlag
||
isFriend
())
&&
// not a private class member
(
classDef
!=
0
||
Config
::
extractPrivateFlag
||
!
isStatic
());
// not a private file/namespace member
...
...
@@ -1381,3 +1373,9 @@ void MemberDef::setMemberGroup(MemberGroup *grp)
{
memberGroup
=
grp
;
}
bool
MemberDef
::
visibleMemberGroup
(
bool
hideNoHeader
)
{
return
memberGroup
!=
0
&&
(
!
hideNoHeader
||
memberGroup
->
header
()
!=
"[NOHEADER]"
);
}
src/memberdef.h
View file @
d8197176
...
...
@@ -55,8 +55,8 @@ class MemberDef : public Definition
enum
{
maxInitLines
=
30
//
maximum number of lines shown for member
// initialization
defMaxInitLines
=
30
// default
maximum number of lines shown for member
// initializer
};
MemberDef
(
const
char
*
defFileName
,
int
defLine
,
...
...
@@ -93,21 +93,24 @@ class MemberDef : public Definition
FileDef
*
getFileDec
()
{
return
fileDec
;
}
bool
isRelated
()
const
{
return
related
;
}
bool
isStatic
()
const
{
return
stat
;
}
bool
isInline
()
const
{
return
inLine
;
}
bool
isInline
()
const
{
return
(
memSpec
&
Entry
::
Inline
)
!=
0
;
}
bool
isExplicit
()
const
{
return
(
memSpec
&
Entry
::
Explicit
)
!=
0
;
}
bool
isMutable
()
const
{
return
(
memSpec
&
Entry
::
Mutable
)
!=
0
;
}
MemberList
*
getSectionList
()
const
{
return
section
;
}
void
setMemberType
(
MemberType
t
)
{
mtype
=
t
;
}
void
setDefinition
(
const
char
*
d
)
{
def
=
d
;
}
//void setDefFile(const char *f) { defFile=f; }
//void setDefLine(int l) { defLine=l; }
void
setFileDef
(
FileDef
*
fd
)
{
fileDef
=
fd
;
}
void
setFileDec
(
FileDef
*
fd
)
{
fileDec
=
fd
;
}
void
setAnchor
(
const
char
*
a
)
{
anc
=
a
;
}
void
setProtection
(
Protection
p
)
{
prot
=
p
;
}
void
setInline
(
bool
in
)
{
inLine
=
in
;
}
void
setMemberSpecifiers
(
int
s
)
{
memSpec
=
s
;
}
int
getMemberSpecifiers
()
{
return
memSpec
;
}
void
mergeMemberSpecifiers
(
int
s
)
{
memSpec
|=
s
;
}
void
setInitializer
(
const
char
*
i
)
{
init
=
i
;
init
=
init
.
stripWhiteSpace
();
initLines
=
init
.
contains
(
'\n'
);
}
void
setMaxInitLines
(
int
lines
)
{
if
(
lines
!=-
1
)
maxInitLines
=
lines
;
}
void
setMemberClass
(
ClassDef
*
cd
)
{
classDef
=
cd
;
}
void
setSectionList
(
MemberList
*
sl
)
{
section
=
sl
;
}
void
makeRelated
()
{
related
=
TRUE
;
}
...
...
@@ -143,10 +146,6 @@ class MemberDef : public Definition
bool
hasExamples
();
ExampleList
*
getExampleList
()
const
{
return
exampleList
;
}
// prototype related members
//void setDecFile(const char *f) { declFile=f; }
//void setDecLine(int l) { defLine=l; }
// convenience members
bool
isSignal
()
const
{
return
mtype
==
Signal
;
}
bool
isSlot
()
const
{
return
mtype
==
Slot
;
}
...
...
@@ -162,10 +161,6 @@ class MemberDef : public Definition
void
setPrototype
(
bool
p
)
{
proto
=
p
;
}
bool
isPrototype
()
const
{
return
proto
;
}
// tag file related members
//void setReference(const char *r) { external=r; }
//bool isReference() { return !external.isEmpty(); }
// argument related members
ArgumentList
*
argumentList
()
const
{
return
argList
;
}
void
setArgumentList
(
ArgumentList
*
al
)
...
...
@@ -186,6 +181,8 @@ class MemberDef : public Definition
// member group related members
void
setMemberGroup
(
MemberGroup
*
grp
);
MemberGroup
*
getMemberGroup
()
const
{
return
memberGroup
;
}
void
setMemberGroupId
(
int
id
)
{
grpId
=
id
;
}
int
getMemberGroupId
()
const
{
return
grpId
;
}
void
setFromAnnonymousScope
(
bool
b
)
{
annScope
=
b
;
}
void
setFromAnnonymousMember
(
MemberDef
*
m
)
{
annMemb
=
m
;
}
...
...
@@ -194,6 +191,8 @@ class MemberDef : public Definition
void
setIndentDepth
(
int
i
)
{
indDepth
=
i
;
}
int
indentDepth
()
{
return
indDepth
;
}
bool
visibleMemberGroup
(
bool
hideNoHeader
);
private
:
ClassDef
*
classDef
;
// member of or related to
FileDef
*
fileDef
;
// member of file definition
...
...
@@ -225,7 +224,7 @@ class MemberDef : public Definition
Protection
prot
;
// protection type [Public/Protected/Private]
bool
related
;
// is this a member that is only related to a class
bool
stat
;
// is it a static function?
bool
inLine
;
// is it an inline function?
int
memSpec
;
// The specifiers present for this member
MemberType
mtype
;
// returns the kind of member
bool
eUsed
;
// is the enumerate already placed in a list
bool
proto
;
// is it a prototype;
...
...
@@ -234,13 +233,14 @@ class MemberDef : public Definition
bool
annUsed
;
bool
annShown
;
int
indDepth
;
int
maxInitLines
;
// when the initializer will be displayed
MemberList
*
section
;
// declation list containing this member
MemberDef
*
annMemb
;
ArgumentList
*
argList
;
// argument list of this member
ArgumentList
*
tArgList
;
// template argument list of function template
ArgumentList
*
scopeTAL
;
// template argument list of class template
ArgumentList
*
membTAL
;
// template argument list of class template
//
int grpId; // group id
int
grpId
;
// group id
//QCString grpHeader; // group header
MemberGroup
*
memberGroup
;
// group's member definition
...
...
src/membergroup.cpp
View file @
d8197176
...
...
@@ -53,7 +53,9 @@ MemberGroup::~MemberGroup()
void
MemberGroup
::
insertMember
(
MemberDef
*
md
)
{
//printf("MemberGroup::insertMember(%s)\n",md->name().data());
//printf("MemberGroup::insertMember memberList=%p count=%d"
// " member section list: %p\n",memberList,memberList->count(),
// md->getSectionList());
if
(
inSameSection
&&
memberList
->
count
()
>
0
&&
memberList
->
first
()
->
getSectionList
()
!=
md
->
getSectionList
())
{
...
...
@@ -97,11 +99,11 @@ void MemberGroup::addToDeclarationSection()
}
}
int
MemberGroup
::
countDecMembers
()
int
MemberGroup
::
countDecMembers
(
bool
sectionPerType
)
{
if
(
numDeclMembers
==-
1
)
/* number of member not cached */
{
memberList
->
countDecMembers
(
TRUE
,
TRUE
);
memberList
->
countDecMembers
(
TRUE
,
TRUE
,
sectionPerType
);
numDeclMembers
=
memberList
->
totalCount
();
}
return
numDeclMembers
;
...
...
src/membergroup.h
View file @
d8197176
...
...
@@ -52,7 +52,7 @@ class MemberGroup /* : public Definition */
QCString
documentation
()
{
return
doc
;
}
bool
allMembersInSameSection
()
{
return
inSameSection
;
}
void
addToDeclarationSection
();
int
countDecMembers
();
int
countDecMembers
(
bool
sectionPerType
);
void
distributeMemberGroupDocumentation
();
private
:
...
...
src/memberlist.cpp
View file @
d8197176
...
...
@@ -44,7 +44,7 @@ int MemberList::compareItems(GCI item1, GCI item2)
return
strcmp
(
c1
->
name
(),
c2
->
name
());
}
void
MemberList
::
countDecMembers
(
bool
inGroup
,
bool
countSubGroups
)
void
MemberList
::
countDecMembers
(
bool
inGroup
,
bool
countSubGroups
,
bool
sectionPerType
)
{
//printf("----- countDecMembers ----\n");
varCnt
=
funcCnt
=
enumCnt
=
enumValCnt
=
typeCnt
=
protoCnt
=
defCnt
=
friendCnt
=
0
;
...
...
@@ -64,7 +64,7 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups)
md
->
hasDocumentedEnumValues
()
)
)
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
)
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
)
&&
!
(
inGroup
&&
md
->
protection
()
==
Private
&&
!
Config
::
extractPrivateFlag
)
)
{
...
...
@@ -82,6 +82,7 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups)
case
MemberDef
:
:
Prototype
:
protoCnt
++
,
m_count
++
;
break
;
case
MemberDef
:
:
Define
:
if
(
Config
::
extractAllFlag
||
md
->
argsString
()
||
!
md
->
initializer
().
isEmpty
()
||
md
->
hasDocumentation
()
)
defCnt
++
,
m_count
++
;
break
;
...
...
@@ -98,7 +99,7 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups)
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
int
mgCount
=
mg
->
countDecMembers
();
int
mgCount
=
mg
->
countDecMembers
(
sectionPerType
);
//printf("memberGroupList adding %d inGroup=%d\n",mgCount,inGroup);
m_count
+=
mgCount
;
}
...
...
@@ -155,21 +156,20 @@ void MemberList::writePlainDeclarations(OutputList &ol,
bool
inGroup
,
bool
countSubGroups
)
{
bool
sectionPerType
=
!
inGroup
&&
(
fd
||
nd
||
gd
);
//printf("----- writePlainDeclaration() ----\n");
countDecMembers
(
inGroup
,
countSubGroups
);
countDecMembers
(
inGroup
,
countSubGroups
,
sectionPerType
);
if
(
totalCount
()
==
0
)
return
;
// no members in this list
//printf("----> writePlainDeclaration() inGroup=%d totalCount()=%d\n",inGroup,totalCount());
ol
.
pushGeneratorState
();
//int prevGroupId = -1;
bool
sectionPerType
=
!
inGroup
&&
(
fd
||
nd
||
gd
);
if
(
!
sectionPerType
)
ol
.
startMemberList
();
MemberDef
*
md
;
if
(
defineCount
()
>
0
)
{
//printf("There are %d defines\n",defineCount());
if
(
sectionPerType
)
{
ol
.
startMemberHeader
();
...
...
@@ -183,8 +183,10 @@ void MemberList::writePlainDeclarations(OutputList &ol,
//printf("md->isDefined()=%d inGroup=%d md->getMemberGroup()=%p\n",
// md->isDefine(),inGroup,md->getMemberGroup());
if
(
md
->
isDefine
()
&&
(
md
->
argsString
()
||
md
->
hasDocumentation
()
||
Config
::
extractAllFlag
)
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
)
(
md
->
argsString
()
||
md
->
hasDocumentation
()
||
!
md
->
initializer
().
isEmpty
()
||
Config
::
extractAllFlag
)
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
)
)
{
md
->
writeDeclaration
(
ol
,
cd
,
nd
,
fd
,
gd
,
inGroup
);
...
...
@@ -209,7 +211,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator
mli
(
*
this
);
for
(
;
(
md
=
mli
.
current
());
++
mli
)
{
if
(
md
->
isPrototype
()
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
))
if
(
md
->
isPrototype
()
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
))
{
md
->
writeDeclaration
(
ol
,
cd
,
nd
,
fd
,
gd
,
inGroup
);
}
...
...
@@ -234,7 +236,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator
mli
(
*
this
);
for
(
;
(
md
=
mli
.
current
())
;
++
mli
)
{
if
(
md
->
isTypedef
()
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
))
if
(
md
->
isTypedef
()
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
))
{
md
->
writeDeclaration
(
ol
,
cd
,
nd
,
fd
,
gd
,
inGroup
);
}
...
...
@@ -263,7 +265,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
type
=
type
.
stripWhiteSpace
();
// TODO: is this really needed?
// filter out enums that are in a group iff inGroup holds
if
(
md
->
isEnumerate
()
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
)
/*&& (hasDocs || !Config::hideMemberFlag)*/
)
if
(
md
->
isEnumerate
()
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
)
/*&& (hasDocs || !Config::hideMemberFlag)*/
)
{
// filter out invisible enums
if
(
!
Config
::
hideMemberFlag
||
// do not hide undocumented members or
...
...
@@ -409,7 +411,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if
(
(
md
->
isFunction
()
||
md
->
isSignal
()
||
md
->
isSlot
())
&&
(
!
md
->
isRelated
()
||
md
->
memberClass
()
)
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
)
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
)
)
{
md
->
writeDeclaration
(
ol
,
cd
,
nd
,
fd
,
gd
,
inGroup
);
...
...
@@ -424,7 +426,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator
mli
(
*
this
);
for
(
;
(
md
=
mli
.
current
())
;
++
mli
)
{
if
(
md
->
isFriend
()
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
))
if
(
md
->
isFriend
()
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
))
{
QCString
type
=
md
->
typeString
();
//printf("Friend: type=%s name=%s\n",type.data(),md->name().data());
...
...
@@ -479,7 +481,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator
mli
(
*
this
);
for
(
;
(
md
=
mli
.
current
())
;
++
mli
)
{
if
(
md
->
isVariable
()
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
))
if
(
md
->
isVariable
()
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
))
{
md
->
writeDeclaration
(
ol
,
cd
,
nd
,
fd
,
gd
,
inGroup
);
}
...
...
@@ -495,7 +497,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
for
(
;
(
md
=
mli
.
current
())
;
++
mli
)
{
if
(
md
->
fromAnnonymousScope
()
&&
!
md
->
annonymousDeclShown
()
&&
inGroup
==
(
md
->
getMemberGroup
()
!=
0
))
&&
inGroup
==
md
->
visibleMemberGroup
(
sectionPerType
))
{
//printf("annonymous compound members\n");
md
->
setFromAnnonymousScope
(
FALSE
);
...
...
@@ -518,13 +520,14 @@ void MemberList::writeDeclarations(OutputList &ol,
{
//printf("MemberList::writeDeclaration(title=`%s',subtitle=`%s')\n",title,subtitle);
//printf("----- writeDeclaration() ----\n");
countDecMembers
(
FALSE
,
countSubGroups
);
// count member not in group
bool
sectionPerType
=
!
inGroup
&&
(
fd
||
nd
||
gd
);
countDecMembers
(
FALSE
,
countSubGroups
,
sectionPerType
);
// count member not in group
int
normalMembers
=
totalCount
();
int
ingroupMembers
=
0
;
//printf("Normal members %d\n",normalMembers);
if
(
inGroup
)
{
countDecMembers
(
TRUE
,
countSubGroups
);
// count member inside group
countDecMembers
(
TRUE
,
countSubGroups
,
sectionPerType
);
// count member inside group
ingroupMembers
=
totalCount
();
}
int
totalMembers
=
normalMembers
+
ingroupMembers
;
...
...
@@ -551,13 +554,13 @@ void MemberList::writeDeclarations(OutputList &ol,
if
(
memberGroupList
)
{
//printf("MemberList::writeDeclarations()\n");
MemberGroupListIterator
mgli
(
*
memberGroupList
);
MemberGroup
*
mg
;
while
((
mg
=
mgli
.
current
()))
{
ol
.
startMemberGroupHeader
();
if
(
mg
->
header
()
!=
"[NOHEADER]"
)
bool
hasHeader
=
mg
->
header
()
!=
"[NOHEADER]"
;
ol
.
startMemberGroupHeader
(
hasHeader
);
if
(
hasHeader
)
{
parseText
(
ol
,
mg
->
header
());
}
...
...
@@ -566,14 +569,13 @@ void MemberList::writeDeclarations(OutputList &ol,
{
//printf("Member group has docs!\n");
ol
.
startMemberGroupDocs
();
parseDoc
(
ol
,
"<generated>"
,
1
,
0
,
0
,
mg
->
documentation
());
parseDoc
(
ol
,
"<generated>"
,
1
,
0
,
0
,
mg
->
documentation
());
ol
.
endMemberGroupDocs
();
}
ol
.
startMemberGroup
();
mg
->
writePlainDeclarations
(
ol
,
cd
,
nd
,
fd
,
gd
);
++
mgli
;
ol
.
endMemberGroup
(
mgli
.
current
()
==
0
);
ol
.
endMemberGroup
(
hasHeader
);
}
}
//printf("----- end writeDeclaration() ----\n");
...
...
@@ -593,10 +595,11 @@ void MemberList::writeDocumentation(OutputList &ol,
void
MemberList
::
addMemberGroup
(
MemberGroup
*
mg
)
{
//printf("MemberList::addMemberGroup(%p)\n",mg);
if
(
memberGroupList
==
0
)
{
memberGroupList
=
new
MemberGroupList
;
}
memberGroupList
->
append
(
mg
);
}
src/memberlist.h
View file @
d8197176
...
...
@@ -41,7 +41,7 @@ class MemberList : public QList<MemberDef>
int
protoCount
()
const
{
return
protoCnt
;
}
int
defineCount
()
const
{
return
defCnt
;
}
int
friendCount
()
const
{
return
friendCnt
;
}
void
countDecMembers
(
bool
inGroup
,
bool
countSubGroups
);
void
countDecMembers
(
bool
inGroup
,
bool
countSubGroups
,
bool
sectionPerType
);
void
countDocMembers
();
int
totalCount
()
const
{
return
//varCnt+funcCnt+enumCnt+enumValCnt+typeCnt+
...
...
src/namespacedef.cpp
View file @
d8197176
...
...
@@ -78,9 +78,15 @@ void NamespaceDef::insertClass(ClassDef *cd)
}
}
void
NamespaceDef
::
addMemberToGroup
(
MemberDef
*
md
,
int
groupId
)
void
NamespaceDef
::
addMemberListToGroup
(
MemberList
*
ml
,
bool
(
MemberDef
::*
func
)()
const
)
{
if
(
groupId
!=-
1
)
MemberListIterator
mli
(
*
ml
);
MemberDef
*
md
;
for
(;(
md
=
mli
.
current
());
++
mli
)
{
int
groupId
=
md
->
getMemberGroupId
();
if
((
md
->*
func
)()
&&
groupId
!=-
1
)
{
QCString
*
pGrpHeader
=
memberHeaderDict
[
groupId
];
QCString
*
pDocs
=
memberDocDict
[
groupId
];
...
...
@@ -97,9 +103,19 @@ void NamespaceDef::addMemberToGroup(MemberDef *md,int groupId)
md
->
setMemberGroup
(
mg
);
}
}
}
}
void
NamespaceDef
::
addMembersToMemberGroup
()
{
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isTypedef
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isEnumerate
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isEnumValue
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isFunction
);
addMemberListToGroup
(
&
allMemberList
,
&
MemberDef
::
isVariable
);
}
void
NamespaceDef
::
insertMember
(
MemberDef
*
md
,
int
groupId
)
void
NamespaceDef
::
insertMember
(
MemberDef
*
md
)
{
//memList->append(md);
allMemberList
.
append
(
md
);
...
...
@@ -115,7 +131,7 @@ void NamespaceDef::insertMember(MemberDef *md,int groupId)
default
:
err
(
"NamespaceDef::insertMembers(): unexpected member inserted in namespace!
\n
"
);
}
addMemberToGroup
(
md
,
groupId
);
//
addMemberToGroup(md,groupId);
}
void
NamespaceDef
::
computeAnchors
()
...
...
src/namespacedef.h
View file @
d8197176
...
...
@@ -39,13 +39,11 @@ class NamespaceDef : public Definition
NamespaceDef
(
const
char
*
defFileName
,
int
defLine
,
const
char
*
name
,
const
char
*
ref
=
0
);
~
NamespaceDef
();
//QCString namespaceFile() const { return fileName; }
QCString
getOutputFileBase
()
const
{
return
fileName
;
}
void
insertUsedFile
(
const
char
*
fname
);
void
writeDocumentation
(
OutputList
&
ol
);
void
insertClass
(
ClassDef
*
cd
);
void
insertMember
(
MemberDef
*
md
,
int
groupId
);
void
addMemberToGroup
(
MemberDef
*
md
,
int
groupId
);
void
insertMember
(
MemberDef
*
md
);
void
computeAnchors
();
int
countMembers
();
void
addUsingDirective
(
NamespaceDef
*
nd
);
...
...
@@ -53,19 +51,6 @@ class NamespaceDef : public Definition
void
addUsingDeclaration
(
ClassDef
*
cd
);
ClassList
*
getUsedClasses
()
const
{
return
usingDeclList
;
}
//const char *getReference() { return reference; }
//bool isVisible()
//{
// return !getReference() && hasDocumentation() &&
// !name().isEmpty() && name().at(0)!='@';
//}
//bool isVisibleExt()
//{
// return (getReference() || hasDocumentation()) &&
// !name().isEmpty() && name().at(0)!='@';
//}
bool
isLinkableInProject
()
{
int
i
=
name
().
findRev
(
"::"
);
...
...
@@ -77,8 +62,12 @@ class NamespaceDef : public Definition
{
return
isLinkableInProject
()
||
isReference
();
}
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
protected
:
void
addMemberListToGroup
(
MemberList
*
,
bool
(
MemberDef
::*
)()
const
);
private
:
//QCString reference;
QCString
fileName
;
...
...
src/outputgen.h
View file @
d8197176
...
...
@@ -103,7 +103,7 @@ class OutputGenerator
virtual
void
endMemberList
()
=
0
;
virtual
void
startMemberItem
(
int
)
=
0
;
virtual
void
endMemberItem
(
bool
)
=
0
;
virtual
void
startMemberGroupHeader
()
=
0
;
virtual
void
startMemberGroupHeader
(
bool
)
=
0
;
virtual
void
endMemberGroupHeader
()
=
0
;
virtual
void
startMemberGroupDocs
()
=
0
;
virtual
void
endMemberGroupDocs
()
=
0
;
...
...
src/outputlist.h
View file @
d8197176
...
...
@@ -164,8 +164,8 @@ class OutputList
{
forall
(
&
OutputGenerator
::
startMemberItem
,
i1
);
}
void
endMemberItem
(
bool
b2
)
{
forall
(
&
OutputGenerator
::
endMemberItem
,
b2
);
}
void
startMemberGroupHeader
()
{
forall
(
&
OutputGenerator
::
startMemberGroupHeader
);
}
void
startMemberGroupHeader
(
bool
b
)
{
forall
(
&
OutputGenerator
::
startMemberGroupHeader
,
b
);
}
void
endMemberGroupHeader
()
{
forall
(
&
OutputGenerator
::
endMemberGroupHeader
);
}
void
startMemberGroupDocs
()
...
...
src/pre.l
View file @
d8197176
...
...
@@ -760,8 +760,7 @@ Define *newDefine()
void addDefine()
{
//bool ambig;
//FileDef *fd=findFileDef(&inputNameDict,g_yyFileName,ambig);
//printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data());
MemberDef *md=new MemberDef(
g_yyFileName,g_yyLineNr,
"#define",g_defName,g_defArgsStr,0,
...
...
@@ -789,7 +788,7 @@ void addDefine()
functionNameDict.insert(g_defName,mn);
}
mn->append(md);
if (g_yyFileDef) g_yyFileDef->insertMember(md
,-1
);
if (g_yyFileDef) g_yyFileDef->insertMember(md);
//Define *d;
//if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine());
...
...
src/rtfgen.cpp
View file @
d8197176
...
...
@@ -46,20 +46,24 @@ static ListItemInfo listItemInfo[indentLevels];
static
QCString
formatBmkStr
(
const
char
*
name
)
{
QCString
result
=
name
;
int
i
=
0
;
if
(
!
result
.
isEmpty
())
{
char
c
;
while
((
c
=
result
.
at
(
i
))
!=
0
)
char
*
p
=
result
.
data
();
while
((
c
=*
p
))
{
switch
(
c
)
{
case
'.'
:
// fall through
case
':'
:
result
.
at
(
i
)
=
'_'
;
*
p
=
'_'
;
break
;
default:
break
;
}
i
++
;
p
++
;
}
}
return
result
;
}
...
...
@@ -1146,18 +1150,16 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
t
<<
"}"
<<
endl
;
// make an index entry
addToIndex
(
name
,
NULL
);
addToIndex
(
name
,
0
);
if
(
fileName
)
if
(
name
)
{
// doxygen expects different anchors for pdf and if "FULL PATHS"
writeAnchor
(
fileName
,
0
);
writeAnchor
(
0
,
name
);
}
else
if
(
Config
::
rtfHyperFlag
&&
fileName
)
{
// make a bookmark for referencing
writeAnchor
(
0
,
name
);
writeAnchor
(
fileName
,
0
);
}
}
}
...
...
@@ -1193,8 +1195,11 @@ void RTFGenerator::startMemberDoc(const char *clname,
const
char
*
)
{
t
<<
"{
\\
comment startMemberDoc}"
<<
endl
;
if
(
memname
&&
memname
[
0
]
!=
'@'
)
{
addToIndex
(
memname
,
clname
);
addToIndex
(
clname
,
memname
);
}
//t << Rtf_Style_Reset << Rtf_Style_ListBullet1;
t
<<
Rtf_Style_Reset
<<
Rtf_Style_Heading4
;
//styleStack.push(Rtf_Style_Heading4);
...
...
@@ -1352,7 +1357,7 @@ void RTFGenerator::startDescList()
{
t
<<
"{
\\
comment (startDescList)}"
<<
endl
;
t
<<
"{"
;
///*if (!m_omitParagraph)*/
newParagraph();
newParagraph
();
}
void
RTFGenerator
::
endDescTitle
()
...
...
@@ -2027,11 +2032,11 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
return
TRUE
;
}
void
RTFGenerator
::
startMemberGroupHeader
()
void
RTFGenerator
::
startMemberGroupHeader
(
bool
hasHeader
)
{
t
<<
"{
\\
comment startMemberGroupHeader}"
<<
endl
;
t
<<
"{"
<<
endl
;
incrementIndentLevel
();
i
f
(
hasHeader
)
i
ncrementIndentLevel
();
t
<<
Rtf_Style_Reset
<<
Rtf_Style_GroupHeader
;
}
...
...
@@ -2061,10 +2066,10 @@ void RTFGenerator::startMemberGroup()
t
<<
Rtf_Style_Reset
<<
Rtf_BList_DepthStyle
()
<<
endl
;
}
void
RTFGenerator
::
endMemberGroup
(
bool
)
void
RTFGenerator
::
endMemberGroup
(
bool
hasHeader
)
{
t
<<
"{
\\
comment endMemberGroup}"
<<
endl
;
decrementIndentLevel
();
if
(
hasHeader
)
decrementIndentLevel
();
t
<<
"}"
;
}
src/rtfgen.h
View file @
d8197176
...
...
@@ -197,7 +197,7 @@ class RTFGenerator : public OutputGenerator
void
endInclDepGraph
(
DotInclDepGraph
&
);
void
writeGraphicalHierarchy
(
DotGfxHierarchyTable
&
)
{}
void
startMemberGroupHeader
();
void
startMemberGroupHeader
(
bool
);
void
endMemberGroupHeader
();
void
startMemberGroupDocs
();
void
endMemberGroupDocs
();
...
...
src/scanner.l
View file @
d8197176
/*****************************************************************************
*
/*****************************************************************************
*
*
*
...
...
@@ -840,7 +840,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
else
{
result=fileName;
if (result.left(5)!="http:")
if (result.left(5)!="http:"
&& result.left(6)!="https:"
)
{
warn(yyFileName,yyLineNr,
"Warning: image file %s is not found in IMAGE_PATH: "
...
...
@@ -1523,7 +1523,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->docify(", ");
}
}
<DocScan>
{CMD}"param"/{BN}
{
<DocScan>
(({B}*"\n"){2,}{B}*)?{CMD}"param"/{BN}
{
endArgumentList();
if (!inParamBlock)
{
...
...
@@ -1543,7 +1543,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
BEGIN(DocParam);
}
<DocScan>{CMD}"retval"/{BN} {
<DocScan>
(({B}*"\n"){2,}{B}*)?
{CMD}"retval"/{BN} {
endArgumentList();
if (!inRetValBlock)
{
...
...
@@ -1563,7 +1563,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
BEGIN(DocParam);
}
<DocScan>{CMD}("exception"|"throw")s?/{BN} {
<DocScan>
(({B}*"\n"){2,}{B}*)?
{CMD}("exception"|"throw")s?/{BN} {
endArgumentList();
if (!inExceptionBlock)
{
...
...
@@ -1809,10 +1809,14 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
warn(yyFileName,yyLineNr,"Warning: \\endcode without <PRE> or \\code "
"in the documentation.");
}
<DocScan>{ID}"<"[^>\ \t\n]*">"("::"{ID})+"("?[a-z_A-Z0-9,:\<\> \t\*\&]*")"? {
generateRef(*outDoc,className,yytext,inSeeBlock);
}
<DocScan>{SCOPEMASK}"("[a-z_A-Z0-9,:\<\> \t\*\&]+")" {
generateRef(*outDoc,className,yytext,inSeeBlock);
}
<DocScan>{SCOPEMASK}(
("()")?) {
<DocScan>{SCOPEMASK}(
"()")? {
generateRef(*outDoc,className,yytext,inSeeBlock);
}
<DocScan>({SCOPEMASK}"::")?"operator()("[a-z_A-Z0-9,\<\> \t\*\&]*")" {
...
...
@@ -1825,7 +1829,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
generateRef(*outDoc,className,
removeRedundantWhiteSpace(oName),inSeeBlock);
}
<DocScan>("http:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); }
<DocScan>("http:"|"
https:"|"
ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); }
<DocScan>[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); }
<DocScan>{FILEMASK} {
generateFileRef(*outDoc,yytext);
...
...
@@ -2292,7 +2296,13 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
current->virt = Virtual;
lineCount();
}
<FindMembers>{B}*"inline"{BN}+ { current->inLine = TRUE;
<FindMembers>{B}*"inline"{BN}+ { current->memSpec|=Entry::Inline;
lineCount();
}
<FindMembers>{B}*"mutable"{BN}+ { current->memSpec|=Entry::Mutable;
lineCount();
}
<FindMembers>{B}*"explicit"{BN}+ { current->memSpec|=Entry::Explicit;
lineCount();
}
<FindMembers>{B}*"import"{BN}+ { // IDL import keyword
...
...
@@ -3620,7 +3630,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
if( *yytext == '{' )
{
if (current_root->section & Entry::COMPOUND_MASK)
previous->
inLine = TRUE
;
previous->
memSpec = previous->memSpec | Entry::Inline
;
//addToBody(yytext);
curlyCount=0;
BEGIN( SkipCurly ) ;
...
...
@@ -4618,6 +4628,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<ClassDoc,LineDoc,Doc,JavaDoc>{CMD}"nosubgrouping"/[^a-z_A-Z0-9] {
current->subGrouping = FALSE;
}
<ClassDoc,LineDoc,Doc,JavaDoc>{CMD}"showinitializer"/[^a-z_A-Z0-9] {
current->initLines = 100000; // ON
}
<ClassDoc,LineDoc,Doc,JavaDoc>{CMD}"hideinitializer"/[^a-z_A-Z0-9] {
current->initLines = 0; // OFF
}
<GroupName>{ID} {
current->groups->append(
new QCString(yytext)
...
...
src/tag.l
View file @
d8197176
...
...
@@ -119,21 +119,21 @@ static void addMember(const char *name,const char *anchor,const char *args)
if (cd) // member of a class
{
md->setMemberClass(cd);
cd->insertMember(md
,-1); /* TODO: store group info */
cd->insertMember(md
);
mnd=&memberNameDict;
mnl=&memberNameList;
}
else if (nd) // member of a namespace
{
md->setNamespace(nd);
nd->insertMember(md
,-1); /* TODO: store group info */
nd->insertMember(md
);
mnd=&functionNameDict;
mnl=&functionNameList;
}
else // member of a file
{
md->setFileDef(fd);
fd->insertMember(md
,-1); /* TODO: store group info */
fd->insertMember(md
);
mnd=&functionNameDict;
mnl=&functionNameList;
}
...
...
src/util.cpp
View file @
d8197176
...
...
@@ -463,6 +463,10 @@ QCString argListToString(ArgumentList *al)
{
result
+=
a
->
type
;
}
if
(
!
a
->
defval
.
isEmpty
())
{
result
+=
"="
+
a
->
defval
;
}
a
=
al
->
next
();
if
(
a
)
result
+=
","
;
}
...
...
@@ -1062,6 +1066,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
stripIrrelevantConstVolatile
(
srcAType
);
stripIrrelevantConstVolatile
(
dstAType
);
if
(
srcA
->
array
!=
dstA
->
array
)
return
FALSE
;
if
(
srcAType
!=
dstAType
)
// check if the argument only differs on name
{
//printf("scope=`%s': `%s' <=> `%s'\n",className.data(),srcAType.data(),dstAType.data());
...
...
@@ -1256,8 +1261,6 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
{
//printf("mergeArguments `%s', `%s'\n",
// argListToString(srcAl).data(),argListToString(dstAl).data());
//printArgList(srcAl);printf(" <=> ");
//printArgList(dstAl);printf("\n");
if
(
srcAl
==
0
||
dstAl
==
0
||
srcAl
->
count
()
!=
dstAl
->
count
())
{
...
...
@@ -1796,6 +1799,15 @@ bool generateRef(OutputList &ol,const char *scName,
//printf("scope=`%s' name=`%s' arg=`%s' linkText=`%s'\n",
// scopeStr.data(),nameStr.data(),argsStr.data(),linkText.data());
// strip template specifier
// TODO: match against the correct partial template instantiation
int
templPos
=
nameStr
.
find
(
'<'
);
if
(
templPos
!=-
1
&&
nameStr
.
find
(
"operator"
)
==-
1
)
{
int
endTemplPos
=
nameStr
.
findRev
(
'>'
);
nameStr
=
nameStr
.
left
(
templPos
)
+
nameStr
.
right
(
nameStr
.
length
()
-
endTemplPos
-
1
);
}
MemberDef
*
md
=
0
;
ClassDef
*
cd
=
0
;
FileDef
*
fd
=
0
;
...
...
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