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
a9f41d99
Commit
a9f41d99
authored
Apr 30, 2003
by
dimitri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release-1.3-20030430
parent
ebd0447b
Changes
36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
575 additions
and
457 deletions
+575
-457
INSTALL
INSTALL
+2
-2
README
README
+2
-2
VERSION
VERSION
+1
-1
config.doc
doc/config.doc
+8
-0
doxygen.spec
packages/rpm/doxygen.spec
+1
-1
classdef.cpp
src/classdef.cpp
+23
-12
classdef.h
src/classdef.h
+7
-0
config.l
src/config.l
+9
-0
docparser.cpp
src/docparser.cpp
+27
-23
docparser.h
src/docparser.h
+4
-1
doctokenizer.h
src/doctokenizer.h
+1
-2
doctokenizer.l
src/doctokenizer.l
+2
-8
dot.cpp
src/dot.cpp
+27
-11
doxygen.cpp
src/doxygen.cpp
+117
-121
doxygen.h
src/doxygen.h
+2
-2
filedef.cpp
src/filedef.cpp
+1
-1
ftvhelp.cpp
src/ftvhelp.cpp
+29
-24
groupdef.cpp
src/groupdef.cpp
+33
-18
groupdef.h
src/groupdef.h
+6
-6
htmldocvisitor.cpp
src/htmldocvisitor.cpp
+6
-11
htmlgen.cpp
src/htmlgen.cpp
+3
-0
index.cpp
src/index.cpp
+52
-55
latexgen.cpp
src/latexgen.cpp
+10
-10
memberdef.cpp
src/memberdef.cpp
+1
-1
membergroup.cpp
src/membergroup.cpp
+1
-1
namespacedef.cpp
src/namespacedef.cpp
+1
-1
page.h
src/page.h
+2
-1
pagedef.cpp
src/pagedef.cpp
+13
-0
pagedef.h
src/pagedef.h
+13
-0
perlmodgen.cpp
src/perlmodgen.cpp
+19
-13
pre.l
src/pre.l
+12
-5
rtfgen.cpp
src/rtfgen.cpp
+12
-12
scanner.l
src/scanner.l
+3
-3
util.cpp
src/util.cpp
+77
-58
util.h
src/util.h
+16
-15
xmlgen.cpp
src/xmlgen.cpp
+32
-36
No files found.
INSTALL
View file @
a9f41d99
DOXYGEN Version 1.3-200304
21
DOXYGEN Version 1.3-200304
30
Please read the installation section of the manual
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
(http://www.doxygen.org/install.html) for instructions.
--------
--------
Dimitri van Heesch (
21
April 2003)
Dimitri van Heesch (
30
April 2003)
README
View file @
a9f41d99
DOXYGEN Version 1.3_200304
21
DOXYGEN Version 1.3_200304
30
Please read INSTALL for compilation instructions.
Please read INSTALL for compilation instructions.
...
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
...
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (
21
April 2003)
Dimitri van Heesch (dimitri@stack.nl) (
30
April 2003)
VERSION
View file @
a9f41d99
1.3-200304
21
1.3-200304
30
doc/config.doc
View file @
a9f41d99
...
@@ -203,6 +203,7 @@ followed by the descriptions of the tags grouped by category.
...
@@ -203,6 +203,7 @@ followed by the descriptions of the tags grouped by category.
\
refitem
cfg_warn_logfile
WARN_LOGFILE
\
refitem
cfg_warn_logfile
WARN_LOGFILE
\
refitem
cfg_warnings
WARNINGS
\
refitem
cfg_warnings
WARNINGS
\
refitem
cfg_xml_dtd
XML_DTD
\
refitem
cfg_xml_dtd
XML_DTD
\
refitem
cfg_xml_output
XML_OUTPUT
\
refitem
cfg_xml_schema
XML_SCHEMA
\
refitem
cfg_xml_schema
XML_SCHEMA
\
endsecreflist
\
endsecreflist
...
@@ -1200,6 +1201,13 @@ EXTRA_PACKAGES = times
...
@@ -1200,6 +1201,13 @@ EXTRA_PACKAGES = times
generate an XML file that captures the structure of
generate an XML file that captures the structure of
the code including all documentation.
the code including all documentation.
\anchor cfg_xml_output
<dt>\c XML_OUTPUT <dd>
\addindex XML_OUTPUT
The \c XML_OUTPUT tag is used to specify where the XML pages will be put.
If a relative path is entered the value of \c OUTPUT_DIRECTORY will be
put in front of it. If left blank \c xml will be used as the default path.
\anchor cfg_xml_schema
\anchor cfg_xml_schema
<dt>\c XML_SCHEMA <dd>
<dt>\c XML_SCHEMA <dd>
\addindex XML_SCHEMA
\addindex XML_SCHEMA
...
...
packages/rpm/doxygen.spec
View file @
a9f41d99
Summary: A documentation system for C/C++.
Summary: A documentation system for C/C++.
Name: doxygen
Name: doxygen
Version: 1.3_200304
21
Version: 1.3_200304
30
Release: 1
Release: 1
Epoch: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
...
...
src/classdef.cpp
View file @
a9f41d99
...
@@ -36,15 +36,6 @@
...
@@ -36,15 +36,6 @@
#include "debug.h"
#include "debug.h"
#include "docparser.h"
#include "docparser.h"
static
QCString
stripExtension
(
const
char
*
fName
)
{
QCString
result
=
fName
;
if
(
result
.
right
(
Doxygen
::
htmlFileExtension
.
length
())
==
Doxygen
::
htmlFileExtension
)
{
result
=
result
.
left
(
result
.
length
()
-
Doxygen
::
htmlFileExtension
.
length
());
}
return
result
;
}
// constructs a new class definition
// constructs a new class definition
ClassDef
::
ClassDef
(
ClassDef
::
ClassDef
(
...
@@ -86,6 +77,7 @@ ClassDef::ClassDef(
...
@@ -86,6 +77,7 @@ ClassDef::ClassDef(
m_nspace
=
0
;
m_nspace
=
0
;
m_fileDef
=
0
;
m_fileDef
=
0
;
m_usesImplClassDict
=
0
;
m_usesImplClassDict
=
0
;
m_usedByImplClassDict
=
0
;
m_usesIntfClassDict
=
0
;
m_usesIntfClassDict
=
0
;
memberGroupSDict
=
new
MemberGroupSDict
;
memberGroupSDict
=
new
MemberGroupSDict
;
memberGroupSDict
->
setAutoDelete
(
TRUE
);
memberGroupSDict
->
setAutoDelete
(
TRUE
);
...
@@ -120,6 +112,7 @@ ClassDef::~ClassDef()
...
@@ -120,6 +112,7 @@ ClassDef::~ClassDef()
delete
m_allMemberNameInfoSDict
;
delete
m_allMemberNameInfoSDict
;
delete
m_exampleSDict
;
delete
m_exampleSDict
;
delete
m_usesImplClassDict
;
delete
m_usesImplClassDict
;
delete
m_usedByImplClassDict
;
delete
m_usesIntfClassDict
;
delete
m_usesIntfClassDict
;
delete
m_incInfo
;
delete
m_incInfo
;
delete
memberGroupSDict
;
delete
memberGroupSDict
;
...
@@ -586,7 +579,7 @@ void ClassDef::distributeMemberGroupDocumentation()
...
@@ -586,7 +579,7 @@ void ClassDef::distributeMemberGroupDocumentation()
void
ClassDef
::
findSectionsInDocumentation
()
void
ClassDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
());
docFindSections
(
documentation
(),
this
,
0
,
docFile
());
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
@@ -2043,17 +2036,35 @@ void ClassDef::addUsedClass(ClassDef *cd,const char *accessName)
...
@@ -2043,17 +2036,35 @@ void ClassDef::addUsedClass(ClassDef *cd,const char *accessName)
m_usesImplClassDict
->
setAutoDelete
(
TRUE
);
m_usesImplClassDict
->
setAutoDelete
(
TRUE
);
}
}
UsesClassDef
*
ucd
=
m_usesImplClassDict
->
find
(
cd
->
name
());
UsesClassDef
*
ucd
=
m_usesImplClassDict
->
find
(
cd
->
name
());
if
(
ucd
==
0
/*|| ucd->templSpecifiers!=templSpec*/
)
if
(
ucd
==
0
)
{
{
ucd
=
new
UsesClassDef
(
cd
);
ucd
=
new
UsesClassDef
(
cd
);
m_usesImplClassDict
->
insert
(
cd
->
name
(),
ucd
);
m_usesImplClassDict
->
insert
(
cd
->
name
(),
ucd
);
//ucd->templSpecifiers = templSpec;
//printf("Adding used class %s to class %s\n",
//printf("Adding used class %s to class %s\n",
// cd->name().data(),name().data());
// cd->name().data(),name().data());
}
}
ucd
->
addAccessor
(
accessName
);
ucd
->
addAccessor
(
accessName
);
}
}
void
ClassDef
::
addUsedByClass
(
ClassDef
*
cd
,
const
char
*
accessName
)
{
if
(
m_usedByImplClassDict
==
0
)
{
m_usedByImplClassDict
=
new
UsesClassDict
(
17
);
m_usedByImplClassDict
->
setAutoDelete
(
TRUE
);
}
UsesClassDef
*
ucd
=
m_usedByImplClassDict
->
find
(
cd
->
name
());
if
(
ucd
==
0
)
{
ucd
=
new
UsesClassDef
(
cd
);
m_usedByImplClassDict
->
insert
(
cd
->
name
(),
ucd
);
//printf("Adding used by class %s to class %s\n",
// cd->name().data(),name().data());
}
ucd
->
addAccessor
(
accessName
);
}
#if 0
#if 0
/*! Builds up a dictionary of all classes that are used by the state of this
/*! Builds up a dictionary of all classes that are used by the state of this
* class (the "implementation").
* class (the "implementation").
...
...
src/classdef.h
View file @
a9f41d99
...
@@ -164,6 +164,11 @@ class ClassDef : public Definition
...
@@ -164,6 +164,11 @@ class ClassDef : public Definition
return
m_usesImplClassDict
;
return
m_usesImplClassDict
;
}
}
UsesClassDict
*
usedByImplementationClasses
()
const
{
return
m_usedByImplClassDict
;
}
UsesClassDict
*
usedInterfaceClasses
()
const
UsesClassDict
*
usedInterfaceClasses
()
const
{
{
return
m_usesIntfClassDict
;
return
m_usesIntfClassDict
;
...
@@ -270,6 +275,7 @@ class ClassDef : public Definition
...
@@ -270,6 +275,7 @@ class ClassDef : public Definition
void
setGroupDefForAllMembers
(
GroupDef
*
g
,
Grouping
::
GroupPri_t
pri
,
const
QCString
&
fileName
,
int
startLine
,
bool
hasDocs
);
void
setGroupDefForAllMembers
(
GroupDef
*
g
,
Grouping
::
GroupPri_t
pri
,
const
QCString
&
fileName
,
int
startLine
,
bool
hasDocs
);
void
addInnerCompound
(
Definition
*
d
);
void
addInnerCompound
(
Definition
*
d
);
void
addUsedClass
(
ClassDef
*
cd
,
const
char
*
accessName
);
void
addUsedClass
(
ClassDef
*
cd
,
const
char
*
accessName
);
void
addUsedByClass
(
ClassDef
*
cd
,
const
char
*
accessName
);
//void initTemplateMapping();
//void initTemplateMapping();
//void setTemplateArgumentMapping(const char *formal,const char *actual);
//void setTemplateArgumentMapping(const char *formal,const char *actual);
//QCString getTemplateArgumentMapping(const char *formal) const;
//QCString getTemplateArgumentMapping(const char *formal) const;
...
@@ -389,6 +395,7 @@ class ClassDef : public Definition
...
@@ -389,6 +395,7 @@ class ClassDef : public Definition
/* classes for the collaboration diagram */
/* classes for the collaboration diagram */
UsesClassDict
*
m_usesImplClassDict
;
UsesClassDict
*
m_usesImplClassDict
;
UsesClassDict
*
m_usedByImplClassDict
;
UsesClassDict
*
m_usesIntfClassDict
;
UsesClassDict
*
m_usesIntfClassDict
;
/*! Template instances that exists of this class, the key in the
/*! Template instances that exists of this class, the key in the
...
...
src/config.l
View file @
a9f41d99
...
@@ -2225,6 +2225,15 @@ void Config::create()
...
@@ -2225,6 +2225,15 @@ void Config::create()
"moment. \n",
"moment. \n",
FALSE
FALSE
);
);
cs = addString(
"XML_OUTPUT",
"The XML_OUTPUT tag is used to specify where the XML pages will be put. \n"
"If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
"put in front of it. If left blank `xml' will be used as the default path. \n"
);
cs->setDefaultValue("xml");
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("GENERATE_XML");
cs = addString(
cs = addString(
"XML_SCHEMA",
"XML_SCHEMA",
"The XML_SCHEMA tag can be used to specify an XML schema, \n"
"The XML_SCHEMA tag can be used to specify an XML schema, \n"
...
...
src/docparser.cpp
View file @
a9f41d99
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include "doxygen.h"
#include "doxygen.h"
#include "debug.h"
#include "debug.h"
#include "util.h"
#include "util.h"
#include "page.h"
#include "page
def
.h"
#include "docparser.h"
#include "docparser.h"
#include "doctokenizer.h"
#include "doctokenizer.h"
...
@@ -447,7 +447,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
...
@@ -447,7 +447,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
FileDef
*
fd
=
0
;
FileDef
*
fd
=
0
;
NamespaceDef
*
nd
=
0
;
NamespaceDef
*
nd
=
0
;
GroupDef
*
gd
=
0
;
GroupDef
*
gd
=
0
;
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
bool
found
=
getDefs
(
bool
found
=
getDefs
(
g_context
.
find
(
'.'
)
==-
1
?
g_context
.
latin1
()
:
""
,
// `find('.') is a hack to detect files
g_context
.
find
(
'.'
)
==-
1
?
g_context
.
latin1
()
:
""
,
// `find('.') is a hack to detect files
name
.
latin1
(),
name
.
latin1
(),
...
@@ -494,11 +494,11 @@ static bool findDocsForMemberOrCompound(const char *commandName,
...
@@ -494,11 +494,11 @@ static bool findDocsForMemberOrCompound(const char *commandName,
*
pDef
=
gd
;
*
pDef
=
gd
;
return
TRUE
;
return
TRUE
;
}
}
p
i
=
Doxygen
::
pageSDict
->
find
(
cmdArg
);
p
d
=
Doxygen
::
pageSDict
->
find
(
cmdArg
);
if
(
p
i
)
// page
if
(
p
d
)
// page
{
{
*
pDoc
=
p
i
->
doc
;
*
pDoc
=
p
d
->
documentation
()
;
*
pDef
=
(
Definition
*
)
pi
;
*
pDef
=
pd
;
return
TRUE
;
return
TRUE
;
}
}
bool
ambig
;
bool
ambig
;
...
@@ -1624,7 +1624,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
...
@@ -1624,7 +1624,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
m_parent
(
parent
),
m_refToSection
(
FALSE
),
m_refToAnchor
(
FALSE
)
m_parent
(
parent
),
m_refToSection
(
FALSE
),
m_refToAnchor
(
FALSE
)
{
{
Definition
*
compound
=
0
;
Definition
*
compound
=
0
;
PageInfo
*
pageInfo
=
0
;
//
PageInfo *pageInfo = 0;
QCString
anchor
;
QCString
anchor
;
ASSERT
(
!
target
.
isEmpty
());
ASSERT
(
!
target
.
isEmpty
());
SectionInfo
*
sec
=
Doxygen
::
sectionDict
[
target
];
SectionInfo
*
sec
=
Doxygen
::
sectionDict
[
target
];
...
@@ -1639,16 +1639,17 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
...
@@ -1639,16 +1639,17 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
m_refToAnchor
=
sec
->
type
==
SectionInfo
::
Anchor
;
m_refToAnchor
=
sec
->
type
==
SectionInfo
::
Anchor
;
m_refToSection
=
sec
->
type
!=
SectionInfo
::
Anchor
;
m_refToSection
=
sec
->
type
!=
SectionInfo
::
Anchor
;
}
}
else
if
(
resolveLink
(
g_context
,
target
,
TRUE
,
&
compound
,
&
pageInfo
,
anchor
))
else
if
(
resolveLink
(
g_context
,
target
,
TRUE
,
&
compound
,
/*&pageInfo,*/
anchor
))
{
{
m_text
=
linkToText
(
target
);
m_text
=
linkToText
(
target
);
m_anchor
=
anchor
;
m_anchor
=
anchor
;
if
(
pageInfo
)
// ref to page
//if (pageInfo) // ref to page
{
//{
m_file
=
pageInfo
->
getOutputFileBase
();
// m_file = pageInfo->getOutputFileBase();
m_ref
=
pageInfo
->
getReference
();
// m_ref = pageInfo->getReference();
}
//}
else
if
(
compound
)
// ref to compound
//else
if
(
compound
)
// ref to compound
{
{
if
(
anchor
.
isEmpty
()
&&
/* compound link */
if
(
anchor
.
isEmpty
()
&&
/* compound link */
compound
->
definitionType
()
==
Definition
::
TypeGroup
&&
/* is group */
compound
->
definitionType
()
==
Definition
::
TypeGroup
&&
/* is group */
...
@@ -1713,7 +1714,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
...
@@ -1713,7 +1714,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
m_parent
(
parent
)
m_parent
(
parent
)
{
{
Definition
*
compound
;
Definition
*
compound
;
PageInfo
*
page
;
//
PageInfo *page;
QCString
anchor
;
QCString
anchor
;
m_refText
=
target
;
m_refText
=
target
;
if
(
!
m_refText
.
isEmpty
()
&&
m_refText
.
at
(
0
)
==
'#'
)
if
(
!
m_refText
.
isEmpty
()
&&
m_refText
.
at
(
0
)
==
'#'
)
...
@@ -1721,7 +1722,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
...
@@ -1721,7 +1722,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
m_refText
=
m_refText
.
right
(
m_refText
.
length
()
-
1
);
m_refText
=
m_refText
.
right
(
m_refText
.
length
()
-
1
);
}
}
if
(
resolveLink
(
g_context
,
stripKnownExtensions
(
target
),
g_inSeeBlock
,
if
(
resolveLink
(
g_context
,
stripKnownExtensions
(
target
),
g_inSeeBlock
,
&
compound
,
&
page
,
anchor
))
&
compound
,
/*&page,*/
anchor
))
{
{
m_anchor
=
anchor
;
m_anchor
=
anchor
;
if
(
compound
)
if
(
compound
)
...
@@ -1729,11 +1730,11 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
...
@@ -1729,11 +1730,11 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
m_file
=
compound
->
getOutputFileBase
();
m_file
=
compound
->
getOutputFileBase
();
m_ref
=
compound
->
getReference
();
m_ref
=
compound
->
getReference
();
}
}
else
if
(
page
)
//
else if (page)
{
//
{
m_file
=
page
->
getOutputFileBase
();
//
m_file = page->getOutputFileBase();
m_ref
=
page
->
getReference
();
//
m_ref = page->getReference();
}
//
}
}
}
else
// oops, bogus target
else
// oops, bogus target
{
{
...
@@ -4742,8 +4743,11 @@ DocNode *validatingParseText(const char *input)
...
@@ -4742,8 +4743,11 @@ DocNode *validatingParseText(const char *input)
return
txt
;
return
txt
;
}
}
void
docFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
mg
,
const
char
*
fileName
)
void
docFindSections
(
const
char
*
input
,
Definition
*
d
,
MemberGroup
*
mg
,
const
char
*
fileName
)
{
{
doctokenizerYYFindSections
(
input
,
pi
,
d
,
mg
,
fileName
);
doctokenizerYYFindSections
(
input
,
d
,
mg
,
fileName
);
}
}
src/docparser.h
View file @
a9f41d99
...
@@ -63,7 +63,10 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
...
@@ -63,7 +63,10 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
DocNode
*
validatingParseText
(
const
char
*
input
);
DocNode
*
validatingParseText
(
const
char
*
input
);
/*! Searches for section and anchor commands in the input */
/*! Searches for section and anchor commands in the input */
void
docFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
m
,
const
char
*
fileName
);
void
docFindSections
(
const
char
*
input
,
Definition
*
d
,
MemberGroup
*
m
,
const
char
*
fileName
);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
src/doctokenizer.h
View file @
a9f41d99
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
#include "htmlattrib.h"
#include "htmlattrib.h"
class
Definition
;
class
Definition
;
class
PageInfo
;
class
MemberGroup
;
class
MemberGroup
;
enum
Tokens
enum
Tokens
...
@@ -110,7 +109,7 @@ extern FILE *doctokenizerYYin;
...
@@ -110,7 +109,7 @@ extern FILE *doctokenizerYYin;
const
char
*
tokToString
(
int
token
);
const
char
*
tokToString
(
int
token
);
// operations on the scanner
// operations on the scanner
void
doctokenizerYYFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
void
doctokenizerYYFindSections
(
const
char
*
input
,
Definition
*
d
,
MemberGroup
*
mg
,
const
char
*
fileName
);
MemberGroup
*
mg
,
const
char
*
fileName
);
void
doctokenizerYYinit
(
const
char
*
input
,
const
char
*
fileName
);
void
doctokenizerYYinit
(
const
char
*
input
,
const
char
*
fileName
);
void
doctokenizerYYcleanup
();
void
doctokenizerYYcleanup
();
...
...
src/doctokenizer.l
View file @
a9f41d99
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include "section.h"
#include "section.h"
#include "membergroup.h"
#include "membergroup.h"
#include "definition.h"
#include "definition.h"
#include "
page
.h"
#include "
doxygen
.h"
#define YY_NEVER_INTERACTIVE 1
#define YY_NEVER_INTERACTIVE 1
...
@@ -45,7 +45,6 @@ static QString g_fileName;
...
@@ -45,7 +45,6 @@ static QString g_fileName;
static bool g_insidePre;
static bool g_insidePre;
// context for section finding phase
// context for section finding phase
static PageInfo *g_pageInfo;
static Definition *g_definition;
static Definition *g_definition;
static MemberGroup *g_memberGroup;
static MemberGroup *g_memberGroup;
static QCString g_secLabel;
static QCString g_secLabel;
...
@@ -217,10 +216,6 @@ static void processSection()
...
@@ -217,10 +216,6 @@ static void processSection()
{
{
file = g_definition->getOutputFileBase();
file = g_definition->getOutputFileBase();
}
}
else if (g_pageInfo)
{
file = g_pageInfo->getOutputFileBase();
}
else
else
{
{
warn(g_fileName,yylineno,"Found section/anchor %s without context\n",g_secLabel.data());
warn(g_fileName,yylineno,"Found section/anchor %s without context\n",g_secLabel.data());
...
@@ -809,14 +804,13 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
...
@@ -809,14 +804,13 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
void doctokenizerYYFindSections(const char *input,
PageInfo *pi,
Definition *d,
void doctokenizerYYFindSections(const char *input,Definition *d,
MemberGroup *mg,const char *fileName)
MemberGroup *mg,const char *fileName)
{
{
if (input==0) return;
if (input==0) return;
g_inputString = input;
g_inputString = input;
//printf("parsing --->`%s'<---\n",input);
//printf("parsing --->`%s'<---\n",input);
g_inputPos = 0;
g_inputPos = 0;
g_pageInfo = pi;
g_definition = d;
g_definition = d;
g_memberGroup = mg;
g_memberGroup = mg;
g_fileName = fileName;
g_fileName = fileName;
...
...
src/dot.cpp
View file @
a9f41d99
...
@@ -1086,31 +1086,47 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
...
@@ -1086,31 +1086,47 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
void
DotClassGraph
::
buildGraph
(
ClassDef
*
cd
,
DotNode
*
n
,
int
distance
,
bool
base
)
void
DotClassGraph
::
buildGraph
(
ClassDef
*
cd
,
DotNode
*
n
,
int
distance
,
bool
base
)
{
{
//printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n",
// cd->name().data(),distance,base);
// ---- Add inheritance relations
// ---- Add inheritance relations
BaseClassListIterator
bcli
(
base
?
*
cd
->
baseClasses
()
:
*
cd
->
subClasses
());
if
(
m_graphType
==
Inheritance
)
BaseClassDef
*
bcd
;
for
(
;
(
bcd
=
bcli
.
current
())
;
++
bcli
)
{
{
//printf("-------- inheritance relation %s->%s templ=`%s'\n",
BaseClassListIterator
bcli
(
base
?
*
cd
->
baseClasses
()
:
*
cd
->
subClasses
());
// cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
BaseClassDef
*
bcd
;
addClass
(
bcd
->
classDef
,
n
,
bcd
->
prot
,
0
,
distance
,
bcd
->
usedName
,
for
(
;
(
bcd
=
bcli
.
current
())
;
++
bcli
)
bcd
->
templSpecifiers
,
base
);
{
//printf("-------- inheritance relation %s->%s templ=`%s'\n",
// cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
addClass
(
bcd
->
classDef
,
n
,
bcd
->
prot
,
0
,
distance
,
bcd
->
usedName
,
bcd
->
templSpecifiers
,
base
);
}
}
}
if
(
m_graphType
!=
Inheritance
)
else
// m_graphType != Inheritance
{
{
ASSERT
(
m_graphType
==
Implementation
);
// ---- Add usage relations
// ---- Add usage relations
UsesClassDict
*
dict
=
UsesClassDict
*
dict
=
m_graphType
==
Implementation
?
cd
->
usedImplementationClasses
()
:
base
?
cd
->
usedImplementationClasses
()
:
cd
->
usedInterfaceClasses
();
cd
->
usedByImplementationClasses
()
;
if
(
dict
)
if
(
dict
)
{
{
UsesClassDictIterator
ucdi
(
*
dict
);
UsesClassDictIterator
ucdi
(
*
dict
);
UsesClassDef
*
ucd
;
UsesClassDef
*
ucd
;
for
(;(
ucd
=
ucdi
.
current
());
++
ucdi
)
for
(;(
ucd
=
ucdi
.
current
());
++
ucdi
)
{
{
//if (base)
//{
// printf("%s uses %s\n",cd->name().data(),ucd->classDef->name().data());
//}
//else
//{
// printf("%s is used by %s\n",cd->name().data(),ucd->classDef->name().data());
//}
//printf("drawing\n");
QCString
label
;
QCString
label
;
QDictIterator
<
void
>
dvi
(
*
ucd
->
accessors
);
QDictIterator
<
void
>
dvi
(
*
ucd
->
accessors
);
const
char
*
s
;
const
char
*
s
;
...
@@ -1128,7 +1144,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
...
@@ -1128,7 +1144,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
}
}
}
}
addClass
(
ucd
->
classDef
,
n
,
EdgeInfo
::
Purple
,
label
,
distance
,
0
,
addClass
(
ucd
->
classDef
,
n
,
EdgeInfo
::
Purple
,
label
,
distance
,
0
,
ucd
->
templSpecifiers
,
base
);
ucd
->
templSpecifiers
,
base
);
}
}
}
}
}
}
...
...
src/doxygen.cpp
View file @
a9f41d99
This diff is collapsed.
Click to expand it.
src/doxygen.h
View file @
a9f41d99
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
class
PageSList
;
class
PageSList
;
class
PageSDict
;
class
PageSDict
;
class
Page
Info
;
class
Page
Def
;
typedef
QList
<
QCString
>
StringList
;
typedef
QList
<
QCString
>
StringList
;
typedef
QDict
<
FileDef
>
FileDict
;
typedef
QDict
<
FileDef
>
FileDict
;
...
@@ -64,7 +64,7 @@ class Doxygen
...
@@ -64,7 +64,7 @@ class Doxygen
static
ClassSDict
hiddenClasses
;
static
ClassSDict
hiddenClasses
;
static
PageSDict
*
exampleSDict
;
static
PageSDict
*
exampleSDict
;
static
PageSDict
*
pageSDict
;
static
PageSDict
*
pageSDict
;
static
Page
Info
*
mainPage
;
static
Page
Def
*
mainPage
;
static
bool
insideMainPage
;
static
bool
insideMainPage
;
static
FileNameDict
*
includeNameDict
;
static
FileNameDict
*
includeNameDict
;
static
FileNameDict
*
exampleNameDict
;
static
FileNameDict
*
exampleNameDict
;
...
...
src/filedef.cpp
View file @
a9f41d99
...
@@ -105,7 +105,7 @@ void FileDef::distributeMemberGroupDocumentation()
...
@@ -105,7 +105,7 @@ void FileDef::distributeMemberGroupDocumentation()
void
FileDef
::
findSectionsInDocumentation
()
void
FileDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
());
docFindSections
(
documentation
(),
this
,
0
,
docFile
());
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
...
src/ftvhelp.cpp
View file @
a9f41d99
...
@@ -5,8 +5,6 @@
...
@@ -5,8 +5,6 @@
* Modified by Dimitri van Heesch (c) 2003
* Modified by Dimitri van Heesch (c) 2003
*
*
* Folder Tree View for offline help on browsers that do not support HTML Help.
* Folder Tree View for offline help on browsers that do not support HTML Help.
* Uses the FTV structure from:
* http://www.geocities.com/Paris/LeftBank/2178/ftexample.html
*/
*/
#include <stdio.h>
#include <stdio.h>
...
@@ -506,30 +504,37 @@ void FTVHelp::generateLink(QTextStream &t,FTVNode *n)
...
@@ -506,30 +504,37 @@ void FTVHelp::generateLink(QTextStream &t,FTVNode *n)
QCString
*
dest
;
QCString
*
dest
;
//printf("FTVHelp::generateLink(ref=%s,file=%s,anchor=%s\n",
//printf("FTVHelp::generateLink(ref=%s,file=%s,anchor=%s\n",
// n->ref.data(),n->file.data(),n->anchor.data());
// n->ref.data(),n->file.data(),n->anchor.data());
if
(
!
n
->
ref
.
isEmpty
())
// link to entity imported via tag file
if
(
n
->
file
.
isEmpty
())
// no link
{
{
t
<<
"<a class=
\"
elRef
\"
"
;
t
<<
"<b>"
<<
n
->
name
<<
"</b>"
;
t
<<
"doxygen=
\"
"
<<
n
->
ref
<<
":"
;
if
((
dest
=
Doxygen
::
tagDestinationDict
[
n
->
ref
]))
t
<<
*
dest
<<
"/"
;
t
<<
"
\"
"
;
}
}
else
// l
ocal link
else
// l
ink into other frame
{
{
t
<<
"<a class=
\"
el
\"
"
;
if
(
!
n
->
ref
.
isEmpty
())
// link to entity imported via tag file
}
{
t
<<
"href=
\"
"
;
t
<<
"<a class=
\"
elRef
\"
"
;
if
(
!
n
->
ref
.
isEmpty
())
t
<<
"doxygen=
\"
"
<<
n
->
ref
<<
":"
;
{
if
((
dest
=
Doxygen
::
tagDestinationDict
[
n
->
ref
]))
t
<<
*
dest
<<
"/"
;
if
((
dest
=
Doxygen
::
tagDestinationDict
[
n
->
ref
]))
t
<<
*
dest
<<
"/"
;
t
<<
"
\"
"
;
}
}
if
(
!
n
->
file
.
isEmpty
())
t
<<
n
->
file
<<
Doxygen
::
htmlFileExtension
;
else
// local link
if
(
!
n
->
anchor
.
isEmpty
())
t
<<
"#"
<<
n
->
anchor
;
{
t
<<
"
\"
target=
\"
basefrm
\"
>"
;
t
<<
"<a class=
\"
el
\"
"
;
t
<<
n
->
name
;
}
t
<<
"</a>"
;
t
<<
"href=
\"
"
;
if
(
!
n
->
ref
.
isEmpty
())
if
(
!
n
->
ref
.
isEmpty
())
{
{
t
<<
" [external]"
;
if
((
dest
=
Doxygen
::
tagDestinationDict
[
n
->
ref
]))
t
<<
*
dest
<<
"/"
;
}
t
<<
n
->
file
<<
Doxygen
::
htmlFileExtension
;
if
(
!
n
->
anchor
.
isEmpty
())
t
<<
"#"
<<
n
->
anchor
;
t
<<
"
\"
target=
\"
basefrm
\"
>"
;
t
<<
n
->
name
;
t
<<
"</a>"
;
if
(
!
n
->
ref
.
isEmpty
())
{
t
<<
" [external]"
;
}
}
}
}
}
...
@@ -634,7 +639,7 @@ void FTVHelp::generateTreeView()
...
@@ -634,7 +639,7 @@ void FTVHelp::generateTreeView()
t
<<
cssfi
.
fileName
();
t
<<
cssfi
.
fileName
();
}
}
t
<<
"
\"
>"
<<
endl
;
t
<<
"
\"
>"
<<
endl
;
t
<<
" <title>T
est
</title>
\n
"
;
t
<<
" <title>T
reeView
</title>
\n
"
;
t
<<
" <style type=
\"
text/css
\"
>
\n
"
;
t
<<
" <style type=
\"
text/css
\"
>
\n
"
;
t
<<
" <!--
\n
"
;
t
<<
" <!--
\n
"
;
t
<<
" .directory { font-size: 10pt; font-weight: bold; }
\n
"
;
t
<<
" .directory { font-size: 10pt; font-weight: bold; }
\n
"
;
...
...
src/groupdef.cpp
View file @
a9f41d99
...
@@ -29,10 +29,11 @@
...
@@ -29,10 +29,11 @@
#include "message.h"
#include "message.h"
#include "membergroup.h"
#include "membergroup.h"
#include "doxygen.h"
#include "doxygen.h"
#include "page.h"
#include "pagedef.h"
#include "docparser.h"
GroupDef
::
GroupDef
(
const
char
*
df
,
int
dl
,
const
char
*
na
,
const
char
*
t
)
:
GroupDef
::
GroupDef
(
const
char
*
df
,
int
dl
,
const
char
*
na
,
const
char
*
t
,
Definition
(
df
,
dl
,
na
)
const
char
*
refFileName
)
:
Definition
(
df
,
dl
,
na
)
{
{
fileList
=
new
FileList
;
fileList
=
new
FileList
;
classSDict
=
new
ClassSDict
(
257
);
classSDict
=
new
ClassSDict
(
257
);
...
@@ -42,7 +43,14 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
...
@@ -42,7 +43,14 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) :
exampleDict
=
new
PageSDict
(
257
);
exampleDict
=
new
PageSDict
(
257
);
allMemberList
=
new
MemberList
;
allMemberList
=
new
MemberList
;
allMemberNameInfoSDict
=
new
MemberNameInfoSDict
(
17
);
allMemberNameInfoSDict
=
new
MemberNameInfoSDict
(
17
);
fileName
=
(
QCString
)
"group_"
+
na
;
if
(
refFileName
)
{
fileName
=
stripExtension
(
refFileName
);
}
else
{
fileName
=
(
QCString
)
"group_"
+
na
;
}
setGroupTitle
(
t
);
setGroupTitle
(
t
);
memberGroupSDict
=
new
MemberGroupSDict
;
memberGroupSDict
=
new
MemberGroupSDict
;
memberGroupSDict
->
setAutoDelete
(
TRUE
);
memberGroupSDict
->
setAutoDelete
(
TRUE
);
...
@@ -106,7 +114,7 @@ void GroupDef::distributeMemberGroupDocumentation()
...
@@ -106,7 +114,7 @@ void GroupDef::distributeMemberGroupDocumentation()
void
GroupDef
::
findSectionsInDocumentation
()
void
GroupDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
());
docFindSections
(
documentation
(),
this
,
0
,
docFile
());
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
@@ -145,16 +153,16 @@ void GroupDef::addNamespace(const NamespaceDef *def)
...
@@ -145,16 +153,16 @@ void GroupDef::addNamespace(const NamespaceDef *def)
namespaceList
->
append
(
def
);
namespaceList
->
append
(
def
);
}
}
void
GroupDef
::
addPage
(
Page
Info
*
def
)
void
GroupDef
::
addPage
(
Page
Def
*
def
)
{
{
//printf("Making page %s part of a group\n",def->name.data());
//printf("Making page %s part of a group\n",def->name.data());
pageDict
->
append
(
def
->
name
,
def
);
pageDict
->
append
(
def
->
name
()
,
def
);
def
->
makePartOfGroup
(
this
);
def
->
makePartOfGroup
(
this
);
}
}
void
GroupDef
::
addExample
(
const
Page
Info
*
def
)
void
GroupDef
::
addExample
(
const
Page
Def
*
def
)
{
{
exampleDict
->
append
(
def
->
name
,
def
);
exampleDict
->
append
(
def
->
name
()
,
def
);
}
}
...
@@ -555,13 +563,13 @@ void GroupDef::writeDocumentation(OutputList &ol)
...
@@ -555,13 +563,13 @@ void GroupDef::writeDocumentation(OutputList &ol)
writeDetailedDocumentation
(
ol
);
writeDetailedDocumentation
(
ol
);
}
}
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
PageSDict
::
Iterator
pdi
(
*
pageDict
);
PageSDict
::
Iterator
pdi
(
*
pageDict
);
for
(
pdi
.
toFirst
();(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
if
(
!
p
i
->
isReference
())
if
(
!
p
d
->
isReference
())
{
{
QCString
pageName
=
p
i
->
getOutputFileBase
();
QCString
pageName
=
p
d
->
getOutputFileBase
();
if
(
!
Config_getString
(
"GENERATE_TAGFILE"
).
isEmpty
())
if
(
!
Config_getString
(
"GENERATE_TAGFILE"
).
isEmpty
())
{
{
...
@@ -569,15 +577,15 @@ void GroupDef::writeDocumentation(OutputList &ol)
...
@@ -569,15 +577,15 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
}
SectionInfo
*
si
=
0
;
SectionInfo
*
si
=
0
;
if
(
!
p
i
->
title
.
isEmpty
()
&&
!
pi
->
name
.
isEmpty
()
&&
if
(
!
p
d
->
title
().
isEmpty
()
&&
!
pd
->
name
()
.
isEmpty
()
&&
(
si
=
Doxygen
::
sectionDict
[
p
i
->
name
])
!=
0
)
(
si
=
Doxygen
::
sectionDict
[
p
d
->
name
()
])
!=
0
)
{
{
ol
.
startSection
(
si
->
label
,
si
->
title
,
SectionInfo
::
Subsection
);
ol
.
startSection
(
si
->
label
,
si
->
title
,
SectionInfo
::
Subsection
);
ol
.
docify
(
si
->
title
);
ol
.
docify
(
si
->
title
);
ol
.
endSection
(
si
->
label
,
SectionInfo
::
Subsection
);
ol
.
endSection
(
si
->
label
,
SectionInfo
::
Subsection
);
}
}
ol
.
startTextBlock
();
ol
.
startTextBlock
();
ol
.
parseDoc
(
p
i
->
defFileName
,
pi
->
defLine
,
0
,
0
,
pi
->
doc
,
FALSE
);
ol
.
parseDoc
(
p
d
->
docFile
(),
pd
->
docLine
(),
0
,
0
,
pd
->
documentation
()
,
FALSE
);
ol
.
endTextBlock
();
ol
.
endTextBlock
();
}
}
}
}
...
@@ -760,7 +768,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
...
@@ -760,7 +768,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
}
}
void
addExampleToGroups
(
Entry
*
root
,
Page
Info
*
eg
)
void
addExampleToGroups
(
Entry
*
root
,
Page
Def
*
eg
)
{
{
QListIterator
<
Grouping
>
gli
(
*
root
->
groups
);
QListIterator
<
Grouping
>
gli
(
*
root
->
groups
);
Grouping
*
g
;
Grouping
*
g
;
...
@@ -778,7 +786,14 @@ void addExampleToGroups(Entry *root,PageInfo *eg)
...
@@ -778,7 +786,14 @@ void addExampleToGroups(Entry *root,PageInfo *eg)
QCString
GroupDef
::
getOutputFileBase
()
const
QCString
GroupDef
::
getOutputFileBase
()
const
{
{
return
convertNameToFile
(
fileName
);
if
(
isReference
())
{
return
fileName
;
}
else
{
return
convertNameToFile
(
fileName
);
}
}
}
void
GroupDef
::
addListReferences
()
void
GroupDef
::
addListReferences
()
...
...
src/groupdef.h
View file @
a9f41d99
...
@@ -36,12 +36,12 @@ class NamespaceList;
...
@@ -36,12 +36,12 @@ class NamespaceList;
class
MemberGroupSDict
;
class
MemberGroupSDict
;
class
MemberNameInfoSDict
;
class
MemberNameInfoSDict
;
class
PageSDict
;
class
PageSDict
;
class
Page
Info
;
class
Page
Def
;
class
GroupDef
:
public
Definition
class
GroupDef
:
public
Definition
{
{
public
:
public
:
GroupDef
(
const
char
*
fileName
,
int
line
,
const
char
*
name
,
const
char
*
title
);
GroupDef
(
const
char
*
fileName
,
int
line
,
const
char
*
name
,
const
char
*
title
,
const
char
*
refFileName
=
0
);
~
GroupDef
();
~
GroupDef
();
DefType
definitionType
()
{
return
TypeGroup
;
}
DefType
definitionType
()
{
return
TypeGroup
;
}
QCString
getOutputFileBase
()
const
;
QCString
getOutputFileBase
()
const
;
...
@@ -53,8 +53,8 @@ class GroupDef : public Definition
...
@@ -53,8 +53,8 @@ class GroupDef : public Definition
void
addNamespace
(
const
NamespaceDef
*
def
);
void
addNamespace
(
const
NamespaceDef
*
def
);
void
addGroup
(
const
GroupDef
*
def
);
void
addGroup
(
const
GroupDef
*
def
);
void
addParentGroup
(
const
GroupDef
*
def
);
void
addParentGroup
(
const
GroupDef
*
def
);
void
addPage
(
Page
Info
*
def
);
// pages in this group
void
addPage
(
Page
Def
*
def
);
// pages in this group
void
addExample
(
const
Page
Info
*
def
);
// examples in this group
void
addExample
(
const
Page
Def
*
def
);
// examples in this group
bool
insertMember
(
MemberDef
*
def
,
bool
docOnly
=
FALSE
);
bool
insertMember
(
MemberDef
*
def
,
bool
docOnly
=
FALSE
);
void
removeMember
(
MemberDef
*
md
);
void
removeMember
(
MemberDef
*
md
);
bool
containsGroup
(
const
GroupDef
*
def
);
// true if def is already a subgroup
bool
containsGroup
(
const
GroupDef
*
def
);
// true if def is already a subgroup
...
@@ -152,8 +152,8 @@ void addClassToGroups(Entry *root,ClassDef *cd);
...
@@ -152,8 +152,8 @@ void addClassToGroups(Entry *root,ClassDef *cd);
void
addNamespaceToGroups
(
Entry
*
root
,
NamespaceDef
*
nd
);
void
addNamespaceToGroups
(
Entry
*
root
,
NamespaceDef
*
nd
);
void
addGroupToGroups
(
Entry
*
root
,
GroupDef
*
subGroup
);
void
addGroupToGroups
(
Entry
*
root
,
GroupDef
*
subGroup
);
void
addMemberToGroups
(
Entry
*
root
,
MemberDef
*
md
);
void
addMemberToGroups
(
Entry
*
root
,
MemberDef
*
md
);
void
addPageToGroups
(
Entry
*
root
,
Page
Info
*
pi
);
void
addPageToGroups
(
Entry
*
root
,
Page
Def
*
pd
);
void
addExampleToGroups
(
Entry
*
root
,
Page
Info
*
eg
);
void
addExampleToGroups
(
Entry
*
root
,
Page
Def
*
eg
);
#endif
#endif
src/htmldocvisitor.cpp
View file @
a9f41d99
...
@@ -263,23 +263,18 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
...
@@ -263,23 +263,18 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
void
HtmlDocVisitor
::
visit
(
DocFormula
*
f
)
void
HtmlDocVisitor
::
visit
(
DocFormula
*
f
)
{
{
if
(
m_hide
)
return
;
if
(
m_hide
)
return
;
if
(
f
->
text
().
at
(
0
)
==
'\\'
)
m_t
<<
"<p><center>"
<<
endl
;
bool
bDisplay
=
f
->
text
().
at
(
0
)
==
'\\'
;
m_t
<<
"<img align="
;
if
(
bDisplay
)
m_t
<<
"<p class=formulaDsp>"
<<
endl
;
#if !defined(_WIN32)
m_t
<<
"<img class=formula"
m_t
<<
"
\"
top
\"
"
;
// assume Unix users use Netscape 4.x which does
<<
(
bDisplay
?
"Dsp"
:
"Inl"
);
// not seem to support align == "middle" :-((
#else
m_t
<<
"
\"
middle
\"
"
;
// assume Windows users use IE or HtmlHelp which on
// displays formulas nicely with align == "middle"
#endif
m_t
<<
" alt=
\"
"
;
m_t
<<
" alt=
\"
"
;
filterQuotedCdataAttr
(
f
->
text
());
filterQuotedCdataAttr
(
f
->
text
());
m_t
<<
"
\"
"
;
m_t
<<
"
\"
"
;
/// @todo cache image dimensions on formula generation and give height/width
/// @todo cache image dimensions on formula generation and give height/width
/// for faster preloading and better rendering of the page
/// for faster preloading and better rendering of the page
m_t
<<
" src=
\"
"
<<
f
->
name
()
<<
".png
\"
>"
;
m_t
<<
" src=
\"
"
<<
f
->
name
()
<<
".png
\"
>"
;
if
(
f
->
text
().
at
(
0
)
==
'\\'
)
if
(
bDisplay
)
m_t
<<
endl
<<
"<
/center><
p>"
<<
endl
;
m_t
<<
endl
<<
"<p>"
<<
endl
;
else
else
m_t
<<
" "
;
m_t
<<
" "
;
}
}
...
...
src/htmlgen.cpp
View file @
a9f41d99
...
@@ -88,6 +88,9 @@ static const char *defaultStyleSheet =
...
@@ -88,6 +88,9 @@ static const char *defaultStyleSheet =
" margin-top : 2px;
\n
"
" margin-top : 2px;
\n
"
" margin-bottom : 2px
\n
"
" margin-bottom : 2px
\n
"
"}
\n
"
"}
\n
"
"p.formulaDsp { text-align: center; }
\n
"
"img.formulaDsp { }
\n
"
"img.formulaInl { vertical-align: middle; }
\n
"
"span.keyword { color: #008000 }
\n
"
"span.keyword { color: #008000 }
\n
"
"span.keywordtype { color: #604020 }
\n
"
"span.keywordtype { color: #604020 }
\n
"
"span.keywordflow { color: #e08000 }
\n
"
"span.keywordflow { color: #e08000 }
\n
"
...
...
src/index.cpp
View file @
a9f41d99
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include "htmlhelp.h"
#include "htmlhelp.h"
#include "ftvhelp.h"
#include "ftvhelp.h"
#include "dot.h"
#include "dot.h"
#include "page.h"
#include "page
def
.h"
//#include "packagedef.h"
//#include "packagedef.h"
int
annotatedClasses
;
int
annotatedClasses
;
...
@@ -2080,22 +2080,22 @@ void writeExampleIndex(OutputList &ol)
...
@@ -2080,22 +2080,22 @@ void writeExampleIndex(OutputList &ol)
ol
.
endTextBlock
();
ol
.
endTextBlock
();
ol
.
startItemList
();
ol
.
startItemList
();
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
exampleSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
exampleSDict
);
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
for
(
pdi
.
toFirst
();(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
ol
.
writeListItem
();
ol
.
writeListItem
();
QCString
n
=
p
i
->
getOutputFileBase
();
QCString
n
=
p
d
->
getOutputFileBase
();
if
(
!
p
i
->
title
.
isEmpty
())
if
(
!
p
d
->
title
()
.
isEmpty
())
{
{
ol
.
writeObjectLink
(
0
,
n
,
0
,
p
i
->
title
);
ol
.
writeObjectLink
(
0
,
n
,
0
,
p
d
->
title
()
);
if
(
hasHtmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
p
i
->
title
,
n
);
if
(
hasHtmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
p
d
->
title
()
,
n
);
if
(
hasFtvHelp
)
ftvHelp
->
addContentsItem
(
FALSE
,
p
i
->
getReference
(),
n
,
0
,
pi
->
title
);
if
(
hasFtvHelp
)
ftvHelp
->
addContentsItem
(
FALSE
,
p
d
->
getReference
(),
n
,
0
,
pd
->
title
()
);
}
}
else
else
{
{
ol
.
writeObjectLink
(
0
,
n
,
0
,
p
i
->
name
);
ol
.
writeObjectLink
(
0
,
n
,
0
,
p
d
->
name
()
);
if
(
hasHtmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
p
i
->
name
,
n
);
if
(
hasHtmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
p
d
->
name
()
,
n
);
if
(
hasFtvHelp
)
ftvHelp
->
addContentsItem
(
FALSE
,
p
i
->
getReference
(),
n
,
0
,
pi
->
name
);
if
(
hasFtvHelp
)
ftvHelp
->
addContentsItem
(
FALSE
,
p
d
->
getReference
(),
n
,
0
,
pd
->
name
()
);
}
}
ol
.
writeString
(
"
\n
"
);
ol
.
writeString
(
"
\n
"
);
}
}
...
@@ -2118,13 +2118,13 @@ void countRelatedPages(int &docPages,int &indexPages)
...
@@ -2118,13 +2118,13 @@ void countRelatedPages(int &docPages,int &indexPages)
{
{
docPages
=
indexPages
=
0
;
docPages
=
indexPages
=
0
;
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
for
(
pdi
.
toFirst
();(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
if
(
!
p
i
->
getGroupDef
()
&&
(
!
pi
->
isReference
()
||
Config_getBool
(
"ALLEXTERNALS"
)))
if
(
!
p
d
->
getGroupDef
()
&&
(
!
pd
->
isReference
()
||
Config_getBool
(
"ALLEXTERNALS"
)))
{
{
indexPages
++
;
indexPages
++
;
if
(
!
p
i
->
isReference
())
docPages
++
;
if
(
!
p
d
->
isReference
())
docPages
++
;
}
}
}
}
}
}
...
@@ -2183,33 +2183,28 @@ void writePageIndex(OutputList &ol)
...
@@ -2183,33 +2183,28 @@ void writePageIndex(OutputList &ol)
ol
.
endTextBlock
();
ol
.
endTextBlock
();
startIndexHierarchy
(
ol
,
0
);
startIndexHierarchy
(
ol
,
0
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
for
(
pdi
.
toFirst
();(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
if
(
!
p
i
->
getGroupDef
()
&&
(
!
pi
->
isReference
()
||
Config_getBool
(
"ALLEXTERNALS"
)))
if
(
!
p
d
->
getGroupDef
()
&&
(
!
pd
->
isReference
()
||
Config_getBool
(
"ALLEXTERNALS"
)))
{
{
QCString
page
Name
,
page
Title
;
QCString
pageTitle
;
if
(
Config_getBool
(
"CASE_SENSE_NAMES"
))
if
(
pd
->
title
().
isEmpty
(
))
page
Name
=
pi
->
name
.
copy
();
page
Title
=
pd
->
name
();
else
else
page
Name
=
pi
->
name
.
lower
();
page
Title
=
pd
->
title
();
if
(
pi
->
title
.
isEmpty
())
ol
.
writeIndexItem
(
pd
->
getReference
(),
pd
->
getOutputFileBase
(),
pageTitle
);
pageTitle
=
pi
->
name
;
if
(
pd
->
isReference
())
else
pageTitle
=
pi
->
title
;
ol
.
writeIndexItem
(
pi
->
getReference
(),
pi
->
getOutputFileBase
(),
pageTitle
);
if
(
pi
->
isReference
())
{
{
ol
.
startTypewriter
();
ol
.
startTypewriter
();
ol
.
docify
(
" [external]"
);
ol
.
docify
(
" [external]"
);
ol
.
endTypewriter
();
ol
.
endTypewriter
();
}
}
ol
.
writeString
(
"
\n
"
);
ol
.
writeString
(
"
\n
"
);
if
(
hasHtmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
pageTitle
,
p
ageName
);
if
(
hasHtmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
pageTitle
,
p
d
->
getOutputFileBase
()
);
if
(
hasFtvHelp
)
ftvHelp
->
addContentsItem
(
FALSE
,
p
i
->
getReference
(),
pi
->
getOutputFileBase
(),
0
,
pageTitle
);
if
(
hasFtvHelp
)
ftvHelp
->
addContentsItem
(
FALSE
,
p
d
->
getReference
(),
pd
->
getOutputFileBase
(),
0
,
pageTitle
);
}
}
}
}
endIndexHierarchy
(
ol
,
0
);
endIndexHierarchy
(
ol
,
0
);
...
@@ -2344,13 +2339,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
...
@@ -2344,13 +2339,13 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
// write pages
// write pages
PageSDict
::
Iterator
pli
(
*
gd
->
pageDict
);
PageSDict
::
Iterator
pli
(
*
gd
->
pageDict
);
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
for
(
pli
.
toFirst
();(
p
i
=
pli
.
current
());
++
pli
)
for
(
pli
.
toFirst
();(
p
d
=
pli
.
current
());
++
pli
)
{
{
SectionInfo
*
si
=
0
;
SectionInfo
*
si
=
0
;
if
(
!
p
i
->
name
.
isEmpty
())
si
=
Doxygen
::
sectionDict
[
pi
->
name
];
if
(
!
p
d
->
name
().
isEmpty
())
si
=
Doxygen
::
sectionDict
[
pd
->
name
()
];
if
(
htmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
if
(
htmlHelp
)
htmlHelp
->
addContentsItem
(
FALSE
,
convertToHtml
(
p
i
->
title
),
convertToHtml
(
p
d
->
title
()
),
gd
->
getOutputFileBase
(),
gd
->
getOutputFileBase
(),
si
?
si
->
label
.
data
()
:
0
si
?
si
->
label
.
data
()
:
0
);
);
...
@@ -2358,7 +2353,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
...
@@ -2358,7 +2353,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
gd
->
getReference
(),
gd
->
getReference
(),
gd
->
getOutputFileBase
(),
gd
->
getOutputFileBase
(),
si
?
si
->
label
.
data
()
:
0
,
si
?
si
->
label
.
data
()
:
0
,
convertToHtml
(
p
i
->
title
)
convertToHtml
(
p
d
->
title
()
)
);
);
}
}
...
@@ -2549,18 +2544,18 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
...
@@ -2549,18 +2544,18 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
}
}
PageSDict
::
Iterator
eli
(
*
(
gd
->
exampleDict
));
PageSDict
::
Iterator
eli
(
*
(
gd
->
exampleDict
));
Page
Info
*
pi
=
eli
.
toFirst
();
Page
Def
*
pd
=
eli
.
toFirst
();
while
(
p
i
)
while
(
p
d
)
{
{
if
(
htmlHelp
)
if
(
htmlHelp
)
{
{
htmlHelp
->
addContentsItem
(
FALSE
,
p
i
->
getReference
(),
pi
->
getOutputFileBase
());
htmlHelp
->
addContentsItem
(
FALSE
,
p
d
->
getReference
(),
pd
->
getOutputFileBase
());
}
}
if
(
ftvHelp
)
if
(
ftvHelp
)
{
{
ftvHelp
->
addContentsItem
(
FALSE
,
p
i
->
getReference
(),
pi
->
getOutputFileBase
(),
0
,
pi
->
name
);
ftvHelp
->
addContentsItem
(
FALSE
,
p
d
->
getReference
(),
pd
->
getOutputFileBase
(),
0
,
pd
->
name
()
);
}
}
p
i
=++
eli
;
p
d
=++
eli
;
}
}
if
(
htmlHelp
)
htmlHelp
->
decContentsDepth
();
if
(
htmlHelp
)
htmlHelp
->
decContentsDepth
();
...
@@ -2710,18 +2705,18 @@ void writeIndex(OutputList &ol)
...
@@ -2710,18 +2705,18 @@ void writeIndex(OutputList &ol)
ol
.
disableAllBut
(
OutputGenerator
::
Html
);
ol
.
disableAllBut
(
OutputGenerator
::
Html
);
QCString
defFileName
=
QCString
defFileName
=
Doxygen
::
mainPage
?
Doxygen
::
mainPage
->
defFileName
.
data
()
:
"<generated>"
;
Doxygen
::
mainPage
?
Doxygen
::
mainPage
->
getDefFileName
()
.
data
()
:
"<generated>"
;
int
defLine
=
int
defLine
=
Doxygen
::
mainPage
?
Doxygen
::
mainPage
->
defLine
:
1
;
Doxygen
::
mainPage
?
Doxygen
::
mainPage
->
getDefLine
()
:
1
;
QCString
title
;
QCString
title
;
if
(
!
Doxygen
::
mainPage
||
Doxygen
::
mainPage
->
title
.
isEmpty
())
if
(
!
Doxygen
::
mainPage
||
Doxygen
::
mainPage
->
title
()
.
isEmpty
())
{
{
title
=
theTranslator
->
trMainPage
();
title
=
theTranslator
->
trMainPage
();
}
}
else
else
{
{
title
=
substitute
(
Doxygen
::
mainPage
->
title
,
"%"
,
""
);
title
=
substitute
(
Doxygen
::
mainPage
->
title
()
,
"%"
,
""
);
}
}
QCString
indexName
=
"index"
;
QCString
indexName
=
"index"
;
...
@@ -2742,9 +2737,9 @@ void writeIndex(OutputList &ol)
...
@@ -2742,9 +2737,9 @@ void writeIndex(OutputList &ol)
if
(
!
Config_getBool
(
"DISABLE_INDEX"
))
writeQuickLinks
(
ol
,
TRUE
);
if
(
!
Config_getBool
(
"DISABLE_INDEX"
))
writeQuickLinks
(
ol
,
TRUE
);
ol
.
startTitleHead
(
0
);
ol
.
startTitleHead
(
0
);
if
(
Doxygen
::
mainPage
&&
!
Doxygen
::
mainPage
->
title
.
isEmpty
())
if
(
Doxygen
::
mainPage
&&
!
Doxygen
::
mainPage
->
title
()
.
isEmpty
())
{
{
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
Doxygen
::
mainPage
->
title
,
FALSE
);
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
Doxygen
::
mainPage
->
title
()
,
FALSE
);
}
}
else
else
{
{
...
@@ -2764,21 +2759,22 @@ void writeIndex(OutputList &ol)
...
@@ -2764,21 +2759,22 @@ void writeIndex(OutputList &ol)
{
{
Doxygen
::
insideMainPage
=
TRUE
;
Doxygen
::
insideMainPage
=
TRUE
;
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
Doxygen
::
mainPage
->
doc
,
FALSE
,
Doxygen
::
mainPage
->
sectionDict
);
Doxygen
::
mainPage
->
documentation
(),
FALSE
/*,Doxygen::mainPage->sectionDict*/
);
if
(
!
Config_getString
(
"GENERATE_TAGFILE"
).
isEmpty
())
if
(
!
Config_getString
(
"GENERATE_TAGFILE"
).
isEmpty
())
{
{
Doxygen
::
tagFile
<<
" <compound kind=
\"
page
\"
>"
<<
endl
Doxygen
::
tagFile
<<
" <compound kind=
\"
page
\"
>"
<<
endl
<<
" <filename>"
<<
" <filename>"
<<
convertToXML
(
Doxygen
::
mainPage
->
fileName
)
<<
convertToXML
(
Doxygen
::
mainPage
->
getOutputFileBase
()
)
<<
"</filename>"
<<
"</filename>"
<<
endl
<<
endl
<<
" <title>"
<<
" <title>"
<<
convertToXML
(
Doxygen
::
mainPage
->
title
)
<<
convertToXML
(
Doxygen
::
mainPage
->
title
()
)
<<
"</title>"
<<
"</title>"
<<
endl
<<
endl
<<
" <name>"
<<
" <name>"
<<
convertToXML
(
Doxygen
::
mainPage
->
name
)
<<
convertToXML
(
Doxygen
::
mainPage
->
name
()
)
<<
"</name>"
<<
"</name>"
<<
endl
;
<<
endl
;
...
@@ -2820,9 +2816,9 @@ void writeIndex(OutputList &ol)
...
@@ -2820,9 +2816,9 @@ void writeIndex(OutputList &ol)
if
(
Doxygen
::
mainPage
)
if
(
Doxygen
::
mainPage
)
{
{
ol
.
startIndexSection
(
isMainPage
);
ol
.
startIndexSection
(
isMainPage
);
if
(
!
Doxygen
::
mainPage
->
title
.
isEmpty
())
if
(
!
Doxygen
::
mainPage
->
title
()
.
isEmpty
())
{
{
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
Doxygen
::
mainPage
->
title
,
FALSE
);
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
Doxygen
::
mainPage
->
title
()
,
FALSE
);
}
}
else
else
{
{
...
@@ -2927,7 +2923,7 @@ void writeIndex(OutputList &ol)
...
@@ -2927,7 +2923,7 @@ void writeIndex(OutputList &ol)
{
{
Doxygen
::
insideMainPage
=
TRUE
;
Doxygen
::
insideMainPage
=
TRUE
;
ol
.
disable
(
OutputGenerator
::
Man
);
ol
.
disable
(
OutputGenerator
::
Man
);
startFile
(
ol
,
Doxygen
::
mainPage
->
name
,
0
,
Doxygen
::
mainPage
->
title
);
startFile
(
ol
,
Doxygen
::
mainPage
->
name
(),
0
,
Doxygen
::
mainPage
->
title
()
);
//SectionInfo *si=0;
//SectionInfo *si=0;
//if (!Doxygen::mainPage->title.isEmpty() && !Doxygen::mainPage->name.isEmpty() &&
//if (!Doxygen::mainPage->title.isEmpty() && !Doxygen::mainPage->name.isEmpty() &&
// (si=Doxygen::sectionDict[Doxygen::mainPage->name])!=0)
// (si=Doxygen::sectionDict[Doxygen::mainPage->name])!=0)
...
@@ -2938,7 +2934,8 @@ void writeIndex(OutputList &ol)
...
@@ -2938,7 +2934,8 @@ void writeIndex(OutputList &ol)
//}
//}
ol
.
startTextBlock
();
ol
.
startTextBlock
();
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
ol
.
parseDoc
(
defFileName
,
defLine
,
0
,
0
,
Doxygen
::
mainPage
->
doc
,
FALSE
,
Doxygen
::
mainPage
->
sectionDict
);
Doxygen
::
mainPage
->
documentation
(),
FALSE
/*,Doxygen::mainPage->sectionDict*/
);
ol
.
endTextBlock
();
ol
.
endTextBlock
();
endFile
(
ol
);
endFile
(
ol
);
ol
.
enable
(
OutputGenerator
::
Man
);
ol
.
enable
(
OutputGenerator
::
Man
);
...
...
src/latexgen.cpp
View file @
a9f41d99
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#include "language.h"
#include "language.h"
#include "version.h"
#include "version.h"
#include "dot.h"
#include "dot.h"
#include "page.h"
#include "page
def
.h"
#include "docparser.h"
#include "docparser.h"
#include "latexdocvisitor.h"
#include "latexdocvisitor.h"
...
@@ -747,15 +747,15 @@ void LatexGenerator::endIndexSection(IndexSections is)
...
@@ -747,15 +747,15 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
{
t
<<
"}
\n
"
;
t
<<
"}
\n
"
;
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
exampleSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
exampleSDict
);
Page
Info
*
pi
=
pdi
.
toFirst
();
Page
Def
*
pd
=
pdi
.
toFirst
();
if
(
p
i
)
if
(
p
d
)
{
{
t
<<
"
\\
input{"
<<
p
i
->
getOutputFileBase
()
<<
"}
\n
"
;
t
<<
"
\\
input{"
<<
p
d
->
getOutputFileBase
()
<<
"}
\n
"
;
}
}
for
(
++
pdi
;(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
++
pdi
;(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
if
(
compactLatex
)
t
<<
"
\\
input"
;
else
t
<<
"
\\
include"
;
if
(
compactLatex
)
t
<<
"
\\
input"
;
else
t
<<
"
\\
include"
;
t
<<
"{"
<<
p
i
->
getOutputFileBase
()
<<
"}
\n
"
;
t
<<
"{"
<<
p
d
->
getOutputFileBase
()
<<
"}
\n
"
;
}
}
}
}
break
;
break
;
...
@@ -763,14 +763,14 @@ void LatexGenerator::endIndexSection(IndexSections is)
...
@@ -763,14 +763,14 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
{
t
<<
"}
\n
"
;
t
<<
"}
\n
"
;
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
Page
Info
*
pi
=
pdi
.
toFirst
();
Page
Def
*
pd
=
pdi
.
toFirst
();
bool
first
=
TRUE
;
bool
first
=
TRUE
;
for
(
pdi
.
toFirst
();(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
if
(
!
p
i
->
getGroupDef
()
&&
!
pi
->
isReference
())
if
(
!
p
d
->
getGroupDef
()
&&
!
pd
->
isReference
())
{
{
if
(
compactLatex
||
first
)
t
<<
"
\\
input"
;
else
t
<<
"
\\
include"
;
if
(
compactLatex
||
first
)
t
<<
"
\\
input"
;
else
t
<<
"
\\
include"
;
t
<<
"{"
<<
p
i
->
getOutputFileBase
()
<<
"}
\n
"
;
t
<<
"{"
<<
p
d
->
getOutputFileBase
()
<<
"}
\n
"
;
first
=
FALSE
;
first
=
FALSE
;
}
}
}
}
...
...
src/memberdef.cpp
View file @
a9f41d99
...
@@ -1985,6 +1985,6 @@ void MemberDef::setDeclArgumentList(ArgumentList *al)
...
@@ -1985,6 +1985,6 @@ void MemberDef::setDeclArgumentList(ArgumentList *al)
void
MemberDef
::
findSectionsInDocumentation
()
void
MemberDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
());
docFindSections
(
documentation
(),
this
,
0
,
docFile
());
}
}
src/membergroup.cpp
View file @
a9f41d99
...
@@ -217,7 +217,7 @@ void MemberGroup::addListReferences(Definition *def)
...
@@ -217,7 +217,7 @@ void MemberGroup::addListReferences(Definition *def)
void
MemberGroup
::
findSectionsInDocumentation
()
void
MemberGroup
::
findSectionsInDocumentation
()
{
{
docFindSections
(
doc
,
0
,
0
,
this
,
m_docFile
);
docFindSections
(
doc
,
0
,
this
,
m_docFile
);
memberList
->
findSectionsInDocumentation
();
memberList
->
findSectionsInDocumentation
();
}
}
src/namespacedef.cpp
View file @
a9f41d99
...
@@ -65,7 +65,7 @@ void NamespaceDef::distributeMemberGroupDocumentation()
...
@@ -65,7 +65,7 @@ void NamespaceDef::distributeMemberGroupDocumentation()
void
NamespaceDef
::
findSectionsInDocumentation
()
void
NamespaceDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
());
docFindSections
(
documentation
(),
this
,
0
,
docFile
());
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
...
src/page.h
View file @
a9f41d99
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
*
*
*/
*/
#if 0
#include "sortdict.h"
#include "sortdict.h"
#include "config.h"
#include "config.h"
#include "docparser.h"
#include "docparser.h"
...
@@ -127,4 +128,4 @@ class PageSDict : public SDict<PageInfo>
...
@@ -127,4 +128,4 @@ class PageSDict : public SDict<PageInfo>
return stricmp(((PageInfo *)i1)->name,((PageInfo *)i2)->name);
return stricmp(((PageInfo *)i1)->name,((PageInfo *)i2)->name);
}
}
};
};
#endif
src/pagedef.cpp
View file @
a9f41d99
#include "pagedef.h"
#include "pagedef.h"
#include "groupdef.h"
#include "docparser.h"
PageDef
::
PageDef
(
const
char
*
f
,
int
l
,
const
char
*
n
,
PageDef
::
PageDef
(
const
char
*
f
,
int
l
,
const
char
*
n
,
...
@@ -12,3 +14,14 @@ PageDef::PageDef(const char *f,int l,const char *n,
...
@@ -12,3 +14,14 @@ PageDef::PageDef(const char *f,int l,const char *n,
PageDef
::~
PageDef
()
PageDef
::~
PageDef
()
{
{
}
}
void
PageDef
::
findSectionsInDocumentation
()
{
docFindSections
(
documentation
(),
this
,
0
,
docFile
());
}
GroupDef
*
PageDef
::
getGroupDef
()
const
{
return
partOfGroups
()
?
partOfGroups
()
->
getFirst
()
:
0
;
}
src/pagedef.h
View file @
a9f41d99
...
@@ -29,9 +29,21 @@ class PageDef : public Definition
...
@@ -29,9 +29,21 @@ class PageDef : public Definition
PageDef
(
const
char
*
f
,
int
l
,
const
char
*
n
,
const
char
*
d
,
const
char
*
t
);
PageDef
(
const
char
*
f
,
int
l
,
const
char
*
n
,
const
char
*
d
,
const
char
*
t
);
~
PageDef
();
~
PageDef
();
DefType
definitionType
()
{
return
TypePage
;
}
DefType
definitionType
()
{
return
TypePage
;
}
bool
isLinkableInProject
()
const
{
return
hasDocumentation
()
&&
!
isReference
();
}
bool
isLinkable
()
const
{
return
isLinkableInProject
()
||
isReference
();
}
// functions to get a uniform interface with Definitions
// functions to get a uniform interface with Definitions
QCString
getOutputFileBase
()
const
{
return
m_fileName
;
}
QCString
getOutputFileBase
()
const
{
return
m_fileName
;
}
void
findSectionsInDocumentation
();
QCString
title
()
const
{
return
m_title
;
}
GroupDef
*
getGroupDef
()
const
;
void
setFileName
(
const
char
*
name
)
{
m_fileName
=
name
;
}
#if 0
#if 0
bool isReference() const { return !reference.isEmpty(); }
bool isReference() const { return !reference.isEmpty(); }
...
@@ -126,6 +138,7 @@ class PageDef : public Definition
...
@@ -126,6 +138,7 @@ class PageDef : public Definition
private
:
private
:
QCString
m_fileName
;
QCString
m_fileName
;
QCString
m_title
;
QCString
m_title
;
GroupDef
*
m_inGroup
;
};
};
class
PageSDict
:
public
SDict
<
PageDef
>
class
PageSDict
:
public
SDict
<
PageDef
>
...
...
src/perlmodgen.cpp
View file @
a9f41d99
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include "docparser.h"
#include "docparser.h"
#include "message.h"
#include "message.h"
#include "doxygen.h"
#include "doxygen.h"
#include "page.h"
#include "page
def
.h"
#include <qdir.h>
#include <qdir.h>
#include <qstack.h>
#include <qstack.h>
...
@@ -1344,7 +1344,7 @@ public:
...
@@ -1344,7 +1344,7 @@ public:
void
generatePerlModForNamespace
(
NamespaceDef
*
nd
);
void
generatePerlModForNamespace
(
NamespaceDef
*
nd
);
void
generatePerlModForFile
(
FileDef
*
fd
);
void
generatePerlModForFile
(
FileDef
*
fd
);
void
generatePerlModForGroup
(
GroupDef
*
gd
);
void
generatePerlModForGroup
(
GroupDef
*
gd
);
void
generatePerlModForPage
(
Page
Info
*
pi
);
void
generatePerlModForPage
(
Page
Def
*
pi
);
bool
createOutputFile
(
QFile
&
f
,
const
char
*
s
);
bool
createOutputFile
(
QFile
&
f
,
const
char
*
s
);
bool
createOutputDir
(
QDir
&
perlModDir
);
bool
createOutputDir
(
QDir
&
perlModDir
);
...
@@ -1908,10 +1908,10 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd)
...
@@ -1908,10 +1908,10 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd)
{
{
m_output
.
openList
(
"pages"
);
m_output
.
openList
(
"pages"
);
PageSDict
::
Iterator
pli
(
*
pl
);
PageSDict
::
Iterator
pli
(
*
pl
);
Page
Info
*
pi
;
Page
Def
*
pd
;
for
(
pli
.
toFirst
();(
p
i
=
pli
.
current
());
++
pli
)
for
(
pli
.
toFirst
();(
p
d
=
pli
.
current
());
++
pli
)
m_output
.
openHash
()
m_output
.
openHash
()
.
addFieldQuotedString
(
"title"
,
p
i
->
title
)
.
addFieldQuotedString
(
"title"
,
p
d
->
title
()
)
.
closeHash
();
.
closeHash
();
m_output
.
closeList
();
m_output
.
closeList
();
}
}
...
@@ -1947,22 +1947,22 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd)
...
@@ -1947,22 +1947,22 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd)
m_output
.
closeHash
();
m_output
.
closeHash
();
}
}
void
PerlModGenerator
::
generatePerlModForPage
(
Page
Info
*
pi
)
void
PerlModGenerator
::
generatePerlModForPage
(
Page
Def
*
pd
)
{
{
// + name
// + name
// + title
// + title
// + documentation
// + documentation
if
(
p
i
->
isReference
())
return
;
if
(
p
d
->
isReference
())
return
;
m_output
.
openHash
()
m_output
.
openHash
()
.
addFieldQuotedString
(
"name"
,
p
i
->
name
);
.
addFieldQuotedString
(
"name"
,
p
d
->
name
()
);
SectionInfo
*
si
=
Doxygen
::
sectionDict
.
find
(
p
i
->
name
);
SectionInfo
*
si
=
Doxygen
::
sectionDict
.
find
(
p
d
->
name
()
);
if
(
si
)
if
(
si
)
m_output
.
addFieldQuotedString
(
"title"
,
si
->
title
);
m_output
.
addFieldQuotedString
(
"title"
,
si
->
title
);
addPerlModDocBlock
(
m_output
,
"detailed"
,
p
i
->
defFileName
,
pi
->
defLine
,
0
,
0
,
pi
->
doc
);
addPerlModDocBlock
(
m_output
,
"detailed"
,
p
d
->
docFile
(),
pd
->
docLine
(),
0
,
0
,
pd
->
documentation
()
);
m_output
.
closeHash
();
m_output
.
closeHash
();
}
}
...
@@ -2007,16 +2007,22 @@ bool PerlModGenerator::generatePerlModOutput()
...
@@ -2007,16 +2007,22 @@ bool PerlModGenerator::generatePerlModOutput()
GroupSDict
::
Iterator
gli
(
Doxygen
::
groupSDict
);
GroupSDict
::
Iterator
gli
(
Doxygen
::
groupSDict
);
GroupDef
*
gd
;
GroupDef
*
gd
;
for
(;(
gd
=
gli
.
current
());
++
gli
)
for
(;(
gd
=
gli
.
current
());
++
gli
)
{
generatePerlModForGroup
(
gd
);
generatePerlModForGroup
(
gd
);
}
m_output
.
closeList
();
m_output
.
closeList
();
m_output
.
openList
(
"pages"
);
m_output
.
openList
(
"pages"
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageInfo
*
pi
=
0
;
PageDef
*
pd
=
0
;
for
(
pdi
.
toFirst
();(
pi
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
pd
=
pdi
.
current
());
++
pdi
)
generatePerlModForPage
(
pi
);
{
generatePerlModForPage
(
pd
);
}
if
(
Doxygen
::
mainPage
)
if
(
Doxygen
::
mainPage
)
{
generatePerlModForPage
(
Doxygen
::
mainPage
);
generatePerlModForPage
(
Doxygen
::
mainPage
);
}
m_output
.
closeList
();
m_output
.
closeList
();
m_output
.
closeHash
().
add
(
";
\n
1;
\n
"
);
m_output
.
closeHash
().
add
(
";
\n
1;
\n
"
);
...
...
src/pre.l
View file @
a9f41d99
...
@@ -560,7 +560,11 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
...
@@ -560,7 +560,11 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int
}
}
else
else
{
{
if (g_nospaces)
if (hash && substArg.isEmpty())
{
resExpr+="@E"; // empty argument will be remove later on
}
else if (g_nospaces)
{
{
resExpr+=substArg;
resExpr+=substArg;
}
}
...
@@ -715,10 +719,9 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
...
@@ -715,10 +719,9 @@ static void expandExpression(QCString &expr,QCString *rest,int pos)
}
}
}
}
/*! replaces all occurrences of @@ in \a s by @
/*! replaces all occurrences of @@@@ in \a s by @@
* and removes all occurrences of @@E.
* All identifiers found are replaced by 0L
* All identifiers found are replaced by 0L
* \par assumption:
* \a s only contains pairs of @@'s.
*/
*/
QCString removeIdsAndMarkers(const char *s)
QCString removeIdsAndMarkers(const char *s)
{
{
...
@@ -731,12 +734,16 @@ QCString removeIdsAndMarkers(const char *s)
...
@@ -731,12 +734,16 @@ QCString removeIdsAndMarkers(const char *s)
{
{
while ((c=*p))
while ((c=*p))
{
{
if (c=='@') // replace @@ with @
if (c=='@') // replace @@ with @
and remove @E
{
{
if (*(p+1)=='@')
if (*(p+1)=='@')
{
{
result+=c;
result+=c;
}
}
else if (*(p+1)=='E')
{
// skip
}
p+=2;
p+=2;
}
}
else if (isdigit(c)) // number
else if (isdigit(c)) // number
...
...
src/rtfgen.cpp
View file @
a9f41d99
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include "language.h"
#include "language.h"
#include "dot.h"
#include "dot.h"
#include "version.h"
#include "version.h"
#include "page.h"
#include "page
def
.h"
#include "rtfstyle.h"
#include "rtfstyle.h"
#include "rtfdocvisitor.h"
#include "rtfdocvisitor.h"
#include "docparser.h"
#include "docparser.h"
...
@@ -585,13 +585,13 @@ void RTFGenerator::endIndexSection(IndexSections is)
...
@@ -585,13 +585,13 @@ void RTFGenerator::endIndexSection(IndexSections is)
break
;
break
;
case
isMainPage
:
case
isMainPage
:
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
if
(
!
Doxygen
::
mainPage
||
Doxygen
::
mainPage
->
title
.
isEmpty
())
if
(
!
Doxygen
::
mainPage
||
Doxygen
::
mainPage
->
title
()
.
isEmpty
())
{
{
t
<<
"{
\\
tc
\\
v "
<<
theTranslator
->
trMainPage
()
<<
"}"
<<
endl
;
t
<<
"{
\\
tc
\\
v "
<<
theTranslator
->
trMainPage
()
<<
"}"
<<
endl
;
}
}
else
else
{
{
t
<<
"{
\\
tc
\\
v "
<<
substitute
(
Doxygen
::
mainPage
->
title
,
"%"
,
""
)
<<
"}"
<<
endl
;
t
<<
"{
\\
tc
\\
v "
<<
substitute
(
Doxygen
::
mainPage
->
title
()
,
"%"
,
""
)
<<
"}"
<<
endl
;
}
}
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
if
(
Config_getBool
(
"GENERATE_TREEVIEW"
))
t
<<
"main"
;
else
t
<<
"index"
;
if
(
Config_getBool
(
"GENERATE_TREEVIEW"
))
t
<<
"main"
;
else
t
<<
"index"
;
...
@@ -767,20 +767,20 @@ void RTFGenerator::endIndexSection(IndexSections is)
...
@@ -767,20 +767,20 @@ void RTFGenerator::endIndexSection(IndexSections is)
//t << "}\n";
//t << "}\n";
t
<<
"{
\\
tc
\\
v "
<<
theTranslator
->
trExampleDocumentation
()
<<
"}"
<<
endl
;
t
<<
"{
\\
tc
\\
v "
<<
theTranslator
->
trExampleDocumentation
()
<<
"}"
<<
endl
;
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
exampleSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
exampleSDict
);
Page
Info
*
pi
=
pdi
.
toFirst
();
Page
Def
*
pd
=
pdi
.
toFirst
();
if
(
p
i
)
if
(
p
d
)
{
{
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
t
<<
p
i
->
getOutputFileBase
();
t
<<
p
d
->
getOutputFileBase
();
t
<<
".rtf
\"
\\\\
*MERGEFORMAT}{
\\
fldrslt includedstuff}}
\n
"
;
t
<<
".rtf
\"
\\\\
*MERGEFORMAT}{
\\
fldrslt includedstuff}}
\n
"
;
}
}
for
(
++
pdi
;(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
++
pdi
;(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
beginRTFSection
();
beginRTFSection
();
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
t
<<
p
i
->
getOutputFileBase
();
t
<<
p
d
->
getOutputFileBase
();
t
<<
".rtf
\"
\\\\
*MERGEFORMAT}{
\\
fldrslt includedstuff}}
\n
"
;
t
<<
".rtf
\"
\\\\
*MERGEFORMAT}{
\\
fldrslt includedstuff}}
\n
"
;
}
}
}
}
...
@@ -789,15 +789,15 @@ void RTFGenerator::endIndexSection(IndexSections is)
...
@@ -789,15 +789,15 @@ void RTFGenerator::endIndexSection(IndexSections is)
{
{
t
<<
"{
\\
tc
\\
v "
<<
theTranslator
->
trPageDocumentation
()
<<
"}"
<<
endl
;
t
<<
"{
\\
tc
\\
v "
<<
theTranslator
->
trPageDocumentation
()
<<
"}"
<<
endl
;
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
Page
Info
*
pi
=
pdi
.
toFirst
();
Page
Def
*
pd
=
pdi
.
toFirst
();
bool
first
=
TRUE
;
bool
first
=
TRUE
;
for
(
pdi
.
toFirst
();(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
if
(
!
p
i
->
getGroupDef
()
&&
!
pi
->
isReference
())
if
(
!
p
d
->
getGroupDef
()
&&
!
pd
->
isReference
())
{
{
if
(
first
)
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
if
(
first
)
t
<<
"
\\
par "
<<
rtf_Style_Reset
<<
endl
;
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
t
<<
"{
\\
field
\\
fldedit{
\\
*
\\
fldinst INCLUDETEXT
\"
"
;
t
<<
p
i
->
getOutputFileBase
();
t
<<
p
d
->
getOutputFileBase
();
t
<<
".rtf
\"
\\\\
*MERGEFORMAT}{
\\
fldrslt includedstuff}}
\n
"
;
t
<<
".rtf
\"
\\\\
*MERGEFORMAT}{
\\
fldrslt includedstuff}}
\n
"
;
first
=
FALSE
;
first
=
FALSE
;
}
}
...
...
src/scanner.l
View file @
a9f41d99
...
@@ -484,7 +484,7 @@ static int yyread(char *buf,int max_size)
...
@@ -484,7 +484,7 @@ static int yyread(char *buf,int max_size)
/* start command character */
/* start command character */
CMD ("\\"|"@")
CMD ("\\"|"@")
SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"latexonly"|"htmlonly"|"{"|"verbatim"|"dotfile"|"defgroup"|"addtogroup"|"weakgroup")|("<"{PRE}">")
SECTIONCMD {CMD}("image"|"author"|"internal"|"version"|"date"|"deprecated"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note"|"remark"[s]?|"todo"|"test"|"xrefitem"|"ingroup"|"latexonly"|"htmlonly"|"{"|"verbatim"|"dotfile"|"defgroup"|"addtogroup"|"weakgroup"
|"class"|"namespace"|"union"|"struct"|"fn"|"var"|"typedef"|"def"|"overload"
)|("<"{PRE}">")
BN [ \t\n\r]
BN [ \t\n\r]
BL [ \t\r]*"\n"
BL [ \t\r]*"\n"
B [ \t]
B [ \t]
...
@@ -1895,11 +1895,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
...
@@ -1895,11 +1895,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastStringContext=YY_START;
lastStringContext=YY_START;
BEGIN( CopyString );
BEGIN( CopyString );
}
}
<ReadBody,ReadNSBody>"/*"{B}*
{ current->program += yytext ;
<ReadBody,ReadNSBody>"/*"{B}* { current->program += yytext ;
lastContext = ReadBody ;
lastContext = ReadBody ;
BEGIN( Comment ) ;
BEGIN( Comment ) ;
}
}
<ReadBody,ReadNSBody>"/*"{BL}
{ current->program += yytext ;
<ReadBody,ReadNSBody>"/*"{BL} { current->program += yytext ;
++yyLineNr ;
++yyLineNr ;
lastContext = ReadBody ;
lastContext = ReadBody ;
BEGIN( Comment ) ;
BEGIN( Comment ) ;
...
...
src/util.cpp
View file @
a9f41d99
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include "version.h"
#include "version.h"
#include "groupdef.h"
#include "groupdef.h"
#include "reflist.h"
#include "reflist.h"
#include "page.h"
#include "page
def
.h"
#ifndef _WIN32
#ifndef _WIN32
#include <unistd.h>
#include <unistd.h>
...
@@ -809,10 +809,10 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
...
@@ -809,10 +809,10 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
// word.data(),scopeName.data(),searchName.data()
// word.data(),scopeName.data(),searchName.data()
// );
// );
// check if `word' is a documented class name
// check if `word' is a documented class name
if
(
!
word
.
isEmpty
()
&&
if
(
//
!word.isEmpty() &&
!
(
isdigit
(
word
.
at
(
0
))
||
word
.
at
(
0
)
==
'-'
)
&&
//
!(isdigit(word.at(0)) || word.at(0)=='-') &&
// do not try to link digits
//
// do not try to link digits
// (saves a lot of time for large arrays)
//
// (saves a lot of time for large arrays)
!
rightScopeMatch
(
word
,
searchName
)
&&
!
rightScopeMatch
(
word
,
searchName
)
&&
!
rightScopeMatch
(
scopeName
,
word
)
!
rightScopeMatch
(
scopeName
,
word
)
)
)
...
@@ -822,10 +822,14 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
...
@@ -822,10 +822,14 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
bool
found
=
FALSE
;
bool
found
=
FALSE
;
do
// for each scope (starting with full scope and going to empty scope)
do
// for each scope (starting with full scope and going to empty scope)
{
{
QCString
fullName
=
word
.
copy
();
QCString
fullName
=
word
;
replaceNamespaceAliases
(
fullName
,
fullName
.
length
());
if
(
scopeOffset
>
0
)
if
(
scopeOffset
>
0
)
{
{
fullName
.
prepend
(
scopeName
.
left
(
scopeOffset
)
+
"::"
);
QCString
prefix
=
scopeName
.
left
(
scopeOffset
);
replaceNamespaceAliases
(
prefix
,
scopeOffset
);
fullName
.
prepend
(
prefix
+
"::"
);
}
}
//printf("Trying class %s\n",fullName.data());
//printf("Trying class %s\n",fullName.data());
...
@@ -1406,6 +1410,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName)
...
@@ -1406,6 +1410,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName)
if
(
i1
!=-
1
&&
i2
==-
1
)
// only t1 has a scope
if
(
i1
!=-
1
&&
i2
==-
1
)
// only t1 has a scope
{
{
QCString
scope
=
t1
.
left
(
i1
);
QCString
scope
=
t1
.
left
(
i1
);
replaceNamespaceAliases
(
scope
,
i1
);
int
so
=
nsName
.
length
();
int
so
=
nsName
.
length
();
do
do
...
@@ -1432,6 +1437,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName)
...
@@ -1432,6 +1437,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2,const QCString &nsName)
else
if
(
i1
==-
1
&&
i2
!=-
1
)
// only t2 has a scope
else
if
(
i1
==-
1
&&
i2
!=-
1
)
// only t2 has a scope
{
{
QCString
scope
=
t2
.
left
(
i2
);
QCString
scope
=
t2
.
left
(
i2
);
replaceNamespaceAliases
(
scope
,
i2
);
int
so
=
nsName
.
length
();
int
so
=
nsName
.
length
();
do
do
...
@@ -2644,17 +2650,17 @@ bool resolveLink(/* in */ const char *scName,
...
@@ -2644,17 +2650,17 @@ bool resolveLink(/* in */ const char *scName,
/* in */
const
char
*
lr
,
/* in */
const
char
*
lr
,
/* in */
bool
inSeeBlock
,
/* in */
bool
inSeeBlock
,
/* out */
Definition
**
resContext
,
/* out */
Definition
**
resContext
,
/* out
*/
PageInfo
**
resPageInfo
,
/* out
PageInfo **resPageInfo,*/
/* out */
QCString
&
resAnchor
/* out */
QCString
&
resAnchor
)
)
{
{
*
resContext
=
0
;
*
resContext
=
0
;
*
resPageInfo
=
0
;
//
*resPageInfo=0;
QCString
linkRef
=
lr
;
QCString
linkRef
=
lr
;
FileDef
*
fd
;
FileDef
*
fd
;
GroupDef
*
gd
;
GroupDef
*
gd
;
Page
Info
*
pi
;
Page
Def
*
pd
;
ClassDef
*
cd
;
ClassDef
*
cd
;
NamespaceDef
*
nd
;
NamespaceDef
*
nd
;
bool
ambig
;
bool
ambig
;
...
@@ -2662,25 +2668,25 @@ bool resolveLink(/* in */ const char *scName,
...
@@ -2662,25 +2668,25 @@ bool resolveLink(/* in */ const char *scName,
{
{
return
FALSE
;
return
FALSE
;
}
}
else
if
((
p
i
=
Doxygen
::
pageSDict
->
find
(
linkRef
)))
// link to a page
else
if
((
p
d
=
Doxygen
::
pageSDict
->
find
(
linkRef
)))
// link to a page
{
{
GroupDef
*
gd
=
p
i
->
getGroupDef
();
GroupDef
*
gd
=
p
d
->
getGroupDef
();
if
(
gd
)
if
(
gd
)
{
{
SectionInfo
*
si
=
0
;
SectionInfo
*
si
=
0
;
if
(
!
p
i
->
name
.
isEmpty
())
si
=
Doxygen
::
sectionDict
[
pi
->
name
];
if
(
!
p
d
->
name
().
isEmpty
())
si
=
Doxygen
::
sectionDict
[
pd
->
name
()
];
*
resContext
=
gd
;
*
resContext
=
gd
;
if
(
si
)
resAnchor
=
si
->
label
;
if
(
si
)
resAnchor
=
si
->
label
;
}
}
else
else
{
{
*
res
PageInfo
=
pi
;
*
res
Context
=
pd
;
}
}
return
TRUE
;
return
TRUE
;
}
}
else
if
((
p
i
=
Doxygen
::
exampleSDict
->
find
(
linkRef
)))
// link to an example
else
if
((
p
d
=
Doxygen
::
exampleSDict
->
find
(
linkRef
)))
// link to an example
{
{
*
res
PageInfo
=
pi
;
*
res
Context
=
pd
;
return
TRUE
;
return
TRUE
;
}
}
else
if
((
gd
=
Doxygen
::
groupSDict
[
linkRef
]))
// link to a group
else
if
((
gd
=
Doxygen
::
groupSDict
[
linkRef
]))
// link to a group
...
@@ -2726,21 +2732,22 @@ bool generateLink(OutputDocInterface &od,const char *clName,
...
@@ -2726,21 +2732,22 @@ bool generateLink(OutputDocInterface &od,const char *clName,
{
{
//printf("generateLink(clName=%s,lr=%s,lr=%s)\n",clName,lr,lt);
//printf("generateLink(clName=%s,lr=%s,lr=%s)\n",clName,lr,lt);
Definition
*
compound
;
Definition
*
compound
;
PageInfo
*
pageInfo
;
//PageDef *pageDef=0
;
QCString
anchor
,
linkText
=
linkToText
(
lt
);
QCString
anchor
,
linkText
=
linkToText
(
lt
);
//printf("generateLink linkText=%s\n",linkText.data());
//printf("generateLink linkText=%s\n",linkText.data());
if
(
resolveLink
(
clName
,
lr
,
inSeeBlock
,
&
compound
,
&
pageInfo
,
anchor
))
if
(
resolveLink
(
clName
,
lr
,
inSeeBlock
,
&
compound
,
/*&pageInfo,*/
anchor
))
{
{
if
(
pageInfo
)
// link to page
//if (pageInfo) // link to page
{
//{
od
.
writeObjectLink
(
pageInfo
->
getReference
(),
// od.writeObjectLink(pageInfo->getReference(),
pageInfo
->
getOutputFileBase
(),
anchor
,
linkText
);
// pageInfo->getOutputFileBase(),anchor,linkText);
if
(
!
pageInfo
->
isReference
())
// if (!pageInfo->isReference())
{
// {
writePageRef
(
od
,
pageInfo
->
getOutputFileBase
(),
anchor
);
// writePageRef(od,pageInfo->getOutputFileBase(),anchor);
}
// }
}
//}
else
if
(
compound
)
// link to compound
//else
if
(
compound
)
// link to compound
{
{
if
(
lt
==
0
&&
anchor
.
isEmpty
()
&&
/* compound link */
if
(
lt
==
0
&&
anchor
.
isEmpty
()
&&
/* compound link */
compound
->
definitionType
()
==
Definition
::
TypeGroup
/* is group */
compound
->
definitionType
()
==
Definition
::
TypeGroup
/* is group */
...
@@ -3594,7 +3601,7 @@ found:
...
@@ -3594,7 +3601,7 @@ found:
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
Page
Info
*
addRelatedPage
(
const
char
*
name
,
const
QCString
&
ptitle
,
Page
Def
*
addRelatedPage
(
const
char
*
name
,
const
QCString
&
ptitle
,
const
QCString
&
doc
,
const
QCString
&
doc
,
QList
<
QCString
>
*
/*anchors*/
,
QList
<
QCString
>
*
/*anchors*/
,
const
char
*
fileName
,
int
startLine
,
const
char
*
fileName
,
int
startLine
,
...
@@ -3603,12 +3610,12 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
...
@@ -3603,12 +3610,12 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
TagInfo
*
tagInfo
TagInfo
*
tagInfo
)
)
{
{
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
//printf("addRelatedPage(name=%s gd=%p)\n",name,gd);
//printf("addRelatedPage(name=%s gd=%p)\n",name,gd);
if
((
p
i
=
Doxygen
::
pageSDict
->
find
(
name
))
&&
!
tagInfo
)
if
((
p
d
=
Doxygen
::
pageSDict
->
find
(
name
))
&&
!
tagInfo
)
{
{
// append documentation block to the page.
// append documentation block to the page.
p
i
->
doc
+=
"
\n\n
"
+
doc
;
p
d
->
setDocumentation
(
pd
->
documentation
()
+
"
\n\n
"
+
doc
,
fileName
,
startLine
)
;
//printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pi,name);
//printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pi,name);
}
}
else
// new page
else
// new page
...
@@ -3620,43 +3627,30 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
...
@@ -3620,43 +3627,30 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
baseName
=
baseName
.
left
(
baseName
.
length
()
-
Doxygen
::
htmlFileExtension
.
length
());
baseName
=
baseName
.
left
(
baseName
.
length
()
-
Doxygen
::
htmlFileExtension
.
length
());
QCString
title
=
ptitle
.
stripWhiteSpace
();
QCString
title
=
ptitle
.
stripWhiteSpace
();
p
i
=
new
PageInfo
(
fileName
,
startLine
,
baseName
,
doc
,
title
);
p
d
=
new
PageDef
(
fileName
,
startLine
,
baseName
,
doc
,
title
);
if
(
sli
)
pd
->
setRefItems
(
sli
);
{
if
(
pi
->
xrefListItems
==
0
)
{
pi
->
xrefListItems
=
new
QList
<
ListItemInfo
>
;
pi
->
xrefListItems
->
setAutoDelete
(
TRUE
);
}
QListIterator
<
ListItemInfo
>
slii
(
*
sli
);
ListItemInfo
*
lii
;
for
(
slii
.
toFirst
();(
lii
=
slii
.
current
());
++
slii
)
{
pi
->
xrefListItems
->
append
(
new
ListItemInfo
(
*
lii
));
}
}
if
(
tagInfo
)
if
(
tagInfo
)
{
{
p
i
->
reference
=
tagInfo
->
tagName
;
p
d
->
setReference
(
tagInfo
->
tagName
)
;
}
}
QCString
pageName
;
QCString
pageName
;
if
(
Config_getBool
(
"CASE_SENSE_NAMES"
))
if
(
Config_getBool
(
"CASE_SENSE_NAMES"
))
pageName
=
p
i
->
name
.
copy
();
pageName
=
p
d
->
name
();
else
else
pageName
=
p
i
->
name
.
lower
();
pageName
=
p
d
->
name
()
.
lower
();
//setFileNameForSections(anchors,pageName,pi);
//setFileNameForSections(anchors,pageName,pi);
p
i
->
fileName
=
pageName
;
p
d
->
setFileName
(
pageName
)
;
//pi->addSections(anchors);
//pi->addSections(anchors);
//printf("Appending page `%s'\n",baseName.data());
//printf("Appending page `%s'\n",baseName.data());
Doxygen
::
pageSDict
->
append
(
baseName
,
p
i
);
Doxygen
::
pageSDict
->
append
(
baseName
,
p
d
);
if
(
gd
)
gd
->
addPage
(
p
i
);
if
(
gd
)
gd
->
addPage
(
p
d
);
if
(
!
p
i
->
title
.
isEmpty
())
if
(
!
p
d
->
title
()
.
isEmpty
())
{
{
//outputList->writeTitle(pi->name,pi->title);
//outputList->writeTitle(pi->name,pi->title);
...
@@ -3666,16 +3660,16 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
...
@@ -3666,16 +3660,16 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
{
{
file
=
gd
->
getOutputFileBase
();
file
=
gd
->
getOutputFileBase
();
}
}
else
if
(
p
i
->
getGroupDef
())
else
if
(
p
d
->
getGroupDef
())
{
{
file
=
p
i
->
getGroupDef
()
->
getOutputFileBase
().
copy
();
file
=
p
d
->
getGroupDef
()
->
getOutputFileBase
().
copy
();
}
}
else
else
{
{
file
=
pageName
;
file
=
pageName
;
}
}
SectionInfo
*
si
=
new
SectionInfo
(
SectionInfo
*
si
=
new
SectionInfo
(
file
,
p
i
->
name
,
pi
->
title
,
SectionInfo
::
Page
,
pi
->
reference
);
file
,
p
d
->
name
(),
pd
->
title
(),
SectionInfo
::
Page
,
pd
->
getReference
()
);
//printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n",
//printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n",
// si->label.data(),si->definition?si->definition->name().data():"<none>",
// si->label.data(),si->definition?si->definition->name().data():"<none>",
// si->fileName.data());
// si->fileName.data());
...
@@ -3684,7 +3678,7 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
...
@@ -3684,7 +3678,7 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
Doxygen
::
sectionDict
.
insert
(
pageName
,
si
);
Doxygen
::
sectionDict
.
insert
(
pageName
,
si
);
}
}
}
}
return
p
i
;
return
p
d
;
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
...
@@ -4161,5 +4155,30 @@ QCString rtfFormatBmkStr(const char *name)
...
@@ -4161,5 +4155,30 @@ QCString rtfFormatBmkStr(const char *name)
return
*
tag
;
return
*
tag
;
}
}
QCString
stripExtension
(
const
char
*
fName
)
{
QCString
result
=
fName
;
if
(
result
.
right
(
Doxygen
::
htmlFileExtension
.
length
())
==
Doxygen
::
htmlFileExtension
)
{
result
=
result
.
left
(
result
.
length
()
-
Doxygen
::
htmlFileExtension
.
length
());
}
return
result
;
}
void
replaceNamespaceAliases
(
QCString
&
scope
,
int
i
)
{
//printf("replaceNamespaceAliases(%s,%d)\n",scope.data(),i);
while
(
i
>
0
)
{
QCString
*
s
=
Doxygen
::
namespaceAliasDict
[
scope
.
left
(
i
)];
if
(
s
)
{
scope
=*
s
+
scope
.
right
(
scope
.
length
()
-
i
);
i
=
s
->
length
();
}
i
=
scope
.
findRev
(
"::"
,
i
-
1
);
}
//printf("replaceNamespaceAliases() result=%s\n",scope.data());
}
src/util.h
View file @
a9f41d99
...
@@ -47,7 +47,7 @@ class Definition;
...
@@ -47,7 +47,7 @@ class Definition;
struct
TagInfo
;
struct
TagInfo
;
class
MemberNameInfoSDict
;
class
MemberNameInfoSDict
;
struct
ListItemInfo
;
struct
ListItemInfo
;
class
Page
Info
;
class
Page
Def
;
//--------------------------------------------------------------------
//--------------------------------------------------------------------
...
@@ -96,19 +96,18 @@ bool getDefs(const QCString &scopeName,
...
@@ -96,19 +96,18 @@ bool getDefs(const QCString &scopeName,
bool
resolveRef
(
/* in */
const
char
*
scName
,
bool
resolveRef
(
/* in */
const
char
*
scName
,
/* in */
const
char
*
name
,
/* in */
const
char
*
name
,
/* in */
bool
inSeeBlock
,
/* in */
bool
inSeeBlock
,
/* out */
Definition
**
resContext
,
/* out */
Definition
**
resContext
,
/* out */
MemberDef
**
resMember
/* out */
MemberDef
**
resMember
);
);
bool
resolveLink
(
/* in */
const
char
*
scName
,
bool
resolveLink
(
/* in */
const
char
*
scName
,
/* in */
const
char
*
lr
,
/* in */
const
char
*
lr
,
/* in */
bool
inSeeBlock
,
/* in */
bool
inSeeBlock
,
/* out */
Definition
**
resContext
,
/* out */
Definition
**
resContext
,
/* out */
PageInfo
**
resPageInfo
,
/* out */
QCString
&
resAnchor
/* out */
QCString
&
resAnchor
);
);
bool
generateRef
(
OutputDocInterface
&
od
,
const
char
*
,
bool
generateRef
(
OutputDocInterface
&
od
,
const
char
*
,
const
char
*
,
bool
inSeeBlock
,
const
char
*
=
0
);
const
char
*
,
bool
inSeeBlock
,
const
char
*
=
0
);
...
@@ -184,7 +183,7 @@ int getScopeFragment(const QCString &s,int p,int *l);
...
@@ -184,7 +183,7 @@ int getScopeFragment(const QCString &s,int p,int *l);
int
filterCRLF
(
char
*
buf
,
int
len
);
int
filterCRLF
(
char
*
buf
,
int
len
);
void
addRefItem
(
const
QList
<
ListItemInfo
>
*
sli
,
const
char
*
prefix
,
void
addRefItem
(
const
QList
<
ListItemInfo
>
*
sli
,
const
char
*
prefix
,
const
char
*
name
,
const
char
*
title
,
const
char
*
args
=
0
);
const
char
*
name
,
const
char
*
title
,
const
char
*
args
=
0
);
Page
Info
*
addRelatedPage
(
const
char
*
name
,
const
QCString
&
ptitle
,
Page
Def
*
addRelatedPage
(
const
char
*
name
,
const
QCString
&
ptitle
,
const
QCString
&
doc
,
QList
<
QCString
>
*
anchors
,
const
QCString
&
doc
,
QList
<
QCString
>
*
anchors
,
const
char
*
fileName
,
int
startLine
,
const
char
*
fileName
,
int
startLine
,
const
QList
<
ListItemInfo
>
*
sli
,
const
QList
<
ListItemInfo
>
*
sli
,
...
@@ -198,6 +197,8 @@ void filterLatexString(QTextStream &t,const char *str,
...
@@ -198,6 +197,8 @@ void filterLatexString(QTextStream &t,const char *str,
bool
insideItem
=
FALSE
);
bool
insideItem
=
FALSE
);
QCString
rtfFormatBmkStr
(
const
char
*
name
);
QCString
rtfFormatBmkStr
(
const
char
*
name
);
QCString
linkToText
(
const
char
*
link
);
QCString
linkToText
(
const
char
*
link
);
QCString
stripExtension
(
const
char
*
fName
);
void
replaceNamespaceAliases
(
QCString
&
scope
,
int
i
);
#endif
#endif
src/xmlgen.cpp
View file @
a9f41d99
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "outputgen.h"
#include "outputgen.h"
#include "dot.h"
#include "dot.h"
#include "code.h"
#include "code.h"
#include "page.h"
#include "page
def
.h"
#include "filename.h"
#include "filename.h"
#include "version.h"
#include "version.h"
#include "xmldocvisitor.h"
#include "xmldocvisitor.h"
...
@@ -840,8 +840,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
...
@@ -840,8 +840,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
<<
"
\"
kind=
\"
"
<<
cd
->
compoundTypeString
()
<<
"
\"
kind=
\"
"
<<
cd
->
compoundTypeString
()
<<
"
\"
><name>"
<<
convertToXML
(
cd
->
name
())
<<
"</name>"
<<
endl
;
<<
"
\"
><name>"
<<
convertToXML
(
cd
->
name
())
<<
"</name>"
<<
endl
;
QCString
outputDirectory
=
Config_getString
(
"
OUTPUT_DIRECTORY
"
);
QCString
outputDirectory
=
Config_getString
(
"
XML_OUTPUT
"
);
QCString
fileName
=
outputDirectory
+
"/
xml/
"
+
cd
->
getOutputFileBase
()
+
".xml"
;
QCString
fileName
=
outputDirectory
+
"/"
+
cd
->
getOutputFileBase
()
+
".xml"
;
QFile
f
(
fileName
);
QFile
f
(
fileName
);
if
(
!
f
.
open
(
IO_WriteOnly
))
if
(
!
f
.
open
(
IO_WriteOnly
))
{
{
...
@@ -1031,8 +1031,8 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
...
@@ -1031,8 +1031,8 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
<<
"
\"
kind=
\"
namespace
\"
"
<<
"><name>"
<<
"
\"
kind=
\"
namespace
\"
"
<<
"><name>"
<<
convertToXML
(
nd
->
name
())
<<
"</name>"
<<
endl
;
<<
convertToXML
(
nd
->
name
())
<<
"</name>"
<<
endl
;
QCString
outputDirectory
=
Config_getString
(
"
OUTPUT_DIRECTORY
"
);
QCString
outputDirectory
=
Config_getString
(
"
XML_OUTPUT
"
);
QCString
fileName
=
outputDirectory
+
"/
xml/
"
+
nd
->
getOutputFileBase
()
+
".xml"
;
QCString
fileName
=
outputDirectory
+
"/"
+
nd
->
getOutputFileBase
()
+
".xml"
;
QFile
f
(
fileName
);
QFile
f
(
fileName
);
if
(
!
f
.
open
(
IO_WriteOnly
))
if
(
!
f
.
open
(
IO_WriteOnly
))
{
{
...
@@ -1122,8 +1122,8 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
...
@@ -1122,8 +1122,8 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
<<
"
\"
kind=
\"
file
\"
><name>"
<<
convertToXML
(
fd
->
name
())
<<
"
\"
kind=
\"
file
\"
><name>"
<<
convertToXML
(
fd
->
name
())
<<
"</name>"
<<
endl
;
<<
"</name>"
<<
endl
;
QCString
outputDirectory
=
Config_getString
(
"
OUTPUT_DIRECTORY
"
);
QCString
outputDirectory
=
Config_getString
(
"
XML_OUTPUT
"
);
QCString
fileName
=
outputDirectory
+
"/
xml/
"
+
fd
->
getOutputFileBase
()
+
".xml"
;
QCString
fileName
=
outputDirectory
+
"/"
+
fd
->
getOutputFileBase
()
+
".xml"
;
QFile
f
(
fileName
);
QFile
f
(
fileName
);
if
(
!
f
.
open
(
IO_WriteOnly
))
if
(
!
f
.
open
(
IO_WriteOnly
))
{
{
...
@@ -1255,8 +1255,8 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
...
@@ -1255,8 +1255,8 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
ti
<<
" <compound refid=
\"
"
<<
gd
->
getOutputFileBase
()
ti
<<
" <compound refid=
\"
"
<<
gd
->
getOutputFileBase
()
<<
"
\"
kind=
\"
group
\"
><name>"
<<
convertToXML
(
gd
->
name
())
<<
"</name>"
<<
endl
;
<<
"
\"
kind=
\"
group
\"
><name>"
<<
convertToXML
(
gd
->
name
())
<<
"</name>"
<<
endl
;
QCString
outputDirectory
=
Config_getString
(
"
OUTPUT_DIRECTORY
"
);
QCString
outputDirectory
=
Config_getString
(
"
XML_OUTPUT
"
);
QCString
fileName
=
outputDirectory
+
"/
xml/
"
+
gd
->
getOutputFileBase
()
+
".xml"
;
QCString
fileName
=
outputDirectory
+
"/"
+
gd
->
getOutputFileBase
()
+
".xml"
;
QFile
f
(
fileName
);
QFile
f
(
fileName
);
if
(
!
f
.
open
(
IO_WriteOnly
))
if
(
!
f
.
open
(
IO_WriteOnly
))
{
{
...
@@ -1309,11 +1309,11 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
...
@@ -1309,11 +1309,11 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
if
(
pl
)
if
(
pl
)
{
{
PageSDict
::
Iterator
pli
(
*
pl
);
PageSDict
::
Iterator
pli
(
*
pl
);
Page
Info
*
pi
;
Page
Def
*
pd
;
for
(
pli
.
toFirst
();(
p
i
=
pli
.
current
());
++
pli
)
for
(
pli
.
toFirst
();(
p
d
=
pli
.
current
());
++
pli
)
{
{
t
<<
" <innerpage refid=
\"
"
<<
p
i
->
getOutputFileBase
()
t
<<
" <innerpage refid=
\"
"
<<
p
d
->
getOutputFileBase
()
<<
"
\"
>"
<<
convertToXML
(
p
i
->
title
)
<<
"</innerpage>"
<<
endl
;
<<
"
\"
>"
<<
convertToXML
(
p
d
->
title
()
)
<<
"</innerpage>"
<<
endl
;
}
}
}
}
...
@@ -1356,22 +1356,23 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
...
@@ -1356,22 +1356,23 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
ti
<<
" </compound>"
<<
endl
;
ti
<<
" </compound>"
<<
endl
;
}
}
static
void
generateXMLForPage
(
Page
Info
*
pi
,
QTextStream
&
ti
)
static
void
generateXMLForPage
(
Page
Def
*
pd
,
QTextStream
&
ti
)
{
{
// + name
// + name
// + title
// + title
// + documentation
// + documentation
if
(
p
i
->
isReference
())
return
;
if
(
p
d
->
isReference
())
return
;
QCString
pageName
=
p
i
->
getOutputFileBase
();
QCString
pageName
=
p
d
->
getOutputFileBase
();
if
(
pageName
==
"index"
)
pageName
=
"indexpage"
;
// to prevent overwriting the generated index page.
if
(
pageName
==
"index"
)
pageName
=
"indexpage"
;
// to prevent overwriting the generated index page.
ti
<<
" <compound refid=
\"
"
<<
pageName
ti
<<
" <compound refid=
\"
"
<<
pageName
<<
"
\"
kind=
\"
page
\"
><name>"
<<
convertToXML
(
pi
->
name
)
<<
"</name>"
<<
endl
;
<<
"
\"
kind=
\"
page
\"
><name>"
<<
convertToXML
(
pd
->
name
())
<<
"</name>"
<<
endl
;
QCString
outputDirectory
=
Config_getString
(
"
OUTPUT_DIRECTORY
"
);
QCString
outputDirectory
=
Config_getString
(
"
XML_OUTPUT
"
);
QCString
fileName
=
outputDirectory
+
"/
xml/
"
+
pageName
+
".xml"
;
QCString
fileName
=
outputDirectory
+
"/"
+
pageName
+
".xml"
;
QFile
f
(
fileName
);
QFile
f
(
fileName
);
if
(
!
f
.
open
(
IO_WriteOnly
))
if
(
!
f
.
open
(
IO_WriteOnly
))
{
{
...
@@ -1384,14 +1385,15 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti)
...
@@ -1384,14 +1385,15 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti)
writeXMLHeader
(
t
);
writeXMLHeader
(
t
);
t
<<
" <compounddef id=
\"
"
<<
pageName
;
t
<<
" <compounddef id=
\"
"
<<
pageName
;
t
<<
"
\"
kind=
\"
page
\"
>"
<<
endl
;
t
<<
"
\"
kind=
\"
page
\"
>"
<<
endl
;
t
<<
" <compoundname>"
<<
convertToXML
(
pi
->
name
)
<<
"</compoundname>"
<<
endl
;
t
<<
" <compoundname>"
<<
convertToXML
(
pd
->
name
())
SectionInfo
*
si
=
Doxygen
::
sectionDict
.
find
(
pi
->
name
);
<<
"</compoundname>"
<<
endl
;
SectionInfo
*
si
=
Doxygen
::
sectionDict
.
find
(
pd
->
name
());
if
(
si
)
if
(
si
)
{
{
t
<<
" <title>"
<<
si
->
title
<<
"</title>"
<<
endl
;
t
<<
" <title>"
<<
convertToXML
(
si
->
title
)
<<
"</title>"
<<
endl
;
}
}
t
<<
" <detaileddescription>"
<<
endl
;
t
<<
" <detaileddescription>"
<<
endl
;
writeXMLDocBlock
(
t
,
p
i
->
defFileName
,
pi
->
defLine
,
0
,
0
,
pi
->
doc
);
writeXMLDocBlock
(
t
,
p
d
->
docFile
(),
pd
->
docLine
(),
0
,
0
,
pd
->
documentation
()
);
t
<<
" </detaileddescription>"
<<
endl
;
t
<<
" </detaileddescription>"
<<
endl
;
t
<<
" </compounddef>"
<<
endl
;
t
<<
" </compounddef>"
<<
endl
;
t
<<
"</doxygen>"
<<
endl
;
t
<<
"</doxygen>"
<<
endl
;
...
@@ -1410,7 +1412,7 @@ void generateXML()
...
@@ -1410,7 +1412,7 @@ void generateXML()
// + related pages
// + related pages
// - examples
// - examples
QCString
outputDirectory
=
Config_getString
(
"
OUTPUT_DIRECTORY
"
);
QCString
outputDirectory
=
Config_getString
(
"
XML_OUTPUT
"
);
if
(
outputDirectory
.
isEmpty
())
if
(
outputDirectory
.
isEmpty
())
{
{
outputDirectory
=
QDir
::
currentDirPath
();
outputDirectory
=
QDir
::
currentDirPath
();
...
@@ -1423,7 +1425,7 @@ void generateXML()
...
@@ -1423,7 +1425,7 @@ void generateXML()
dir
.
setPath
(
QDir
::
currentDirPath
());
dir
.
setPath
(
QDir
::
currentDirPath
());
if
(
!
dir
.
mkdir
(
outputDirectory
))
if
(
!
dir
.
mkdir
(
outputDirectory
))
{
{
err
(
"Error: tag
OUTPUT_DIRECTORY
: Output directory `%s' does not "
err
(
"Error: tag
XML_OUTPUT
: Output directory `%s' does not "
"exist and cannot be created
\n
"
,
outputDirectory
.
data
());
"exist and cannot be created
\n
"
,
outputDirectory
.
data
());
exit
(
1
);
exit
(
1
);
}
}
...
@@ -1447,14 +1449,8 @@ void generateXML()
...
@@ -1447,14 +1449,8 @@ void generateXML()
return
;
return
;
}
}
}
}
QDir
xmlDir
(
outputDirectory
+
"/xml"
);
QDir
xmlDir
(
outputDirectory
);
if
(
!
xmlDir
.
exists
()
&&
!
xmlDir
.
mkdir
(
outputDirectory
+
"/xml"
))
QCString
fileName
=
outputDirectory
+
"/index.xml"
;
{
err
(
"Could not create xml directory in %s
\n
"
,
outputDirectory
.
data
());
return
;
}
QCString
fileName
=
outputDirectory
+
"/xml/index.xml"
;
QFile
f
(
fileName
);
QFile
f
(
fileName
);
if
(
!
f
.
open
(
IO_WriteOnly
))
if
(
!
f
.
open
(
IO_WriteOnly
))
{
{
...
@@ -1494,10 +1490,10 @@ void generateXML()
...
@@ -1494,10 +1490,10 @@ void generateXML()
generateXMLForGroup
(
gd
,
t
);
generateXMLForGroup
(
gd
,
t
);
}
}
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
Page
Info
*
pi
=
0
;
Page
Def
*
pd
=
0
;
for
(
pdi
.
toFirst
();(
p
i
=
pdi
.
current
());
++
pdi
)
for
(
pdi
.
toFirst
();(
p
d
=
pdi
.
current
());
++
pdi
)
{
{
generateXMLForPage
(
p
i
,
t
);
generateXMLForPage
(
p
d
,
t
);
}
}
if
(
Doxygen
::
mainPage
)
if
(
Doxygen
::
mainPage
)
{
{
...
...
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