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
f3e7209f
Commit
f3e7209f
authored
Nov 28, 2002
by
dimitri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release-1.3-rc1-20021128
parent
e952dab5
Changes
50
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
1331 additions
and
865 deletions
+1331
-865
INSTALL
INSTALL
+2
-2
README
README
+2
-2
VERSION
VERSION
+1
-1
commands.doc
doc/commands.doc
+2
-1
faq.doc
doc/faq.doc
+2
-1
maintainers.txt
doc/maintainers.txt
+0
-1
doxygen.spec
packages/rpm/doxygen.spec
+1
-1
classdef.cpp
src/classdef.cpp
+37
-1
classdef.h
src/classdef.h
+1
-0
classlist.cpp
src/classlist.cpp
+1
-1
cmdmapper.cpp
src/cmdmapper.cpp
+3
-0
cmdmapper.h
src/cmdmapper.h
+30
-27
docparser.cpp
src/docparser.cpp
+310
-243
docparser.h
src/docparser.h
+11
-2
doctokenizer.h
src/doctokenizer.h
+29
-15
doctokenizer.l
src/doctokenizer.l
+155
-10
doxygen.cpp
src/doxygen.cpp
+79
-18
filedef.cpp
src/filedef.cpp
+19
-1
filedef.h
src/filedef.h
+1
-0
groupdef.cpp
src/groupdef.cpp
+20
-3
groupdef.h
src/groupdef.h
+1
-0
htmldocvisitor.cpp
src/htmldocvisitor.cpp
+4
-2
htmlgen.cpp
src/htmlgen.cpp
+1
-1
htmlgen.h
src/htmlgen.h
+3
-1
latexdocvisitor.cpp
src/latexdocvisitor.cpp
+3
-1
latexgen.cpp
src/latexgen.cpp
+28
-169
latexgen.h
src/latexgen.h
+3
-1
mangen.cpp
src/mangen.cpp
+20
-8
mangen.h
src/mangen.h
+3
-1
memberdef.cpp
src/memberdef.cpp
+30
-7
memberdef.h
src/memberdef.h
+6
-3
membergroup.cpp
src/membergroup.cpp
+18
-8
membergroup.h
src/membergroup.h
+4
-1
memberlist.cpp
src/memberlist.cpp
+20
-1
memberlist.h
src/memberlist.h
+1
-0
namespacedef.cpp
src/namespacedef.cpp
+19
-0
namespacedef.h
src/namespacedef.h
+1
-0
outputgen.h
src/outputgen.h
+3
-1
outputlist.h
src/outputlist.h
+6
-2
page.h
src/page.h
+6
-0
rtfdocvisitor.cpp
src/rtfdocvisitor.cpp
+1
-0
rtfgen.cpp
src/rtfgen.cpp
+1
-1
rtfgen.h
src/rtfgen.h
+3
-1
scanner.l
src/scanner.l
+108
-63
section.h
src/section.h
+9
-3
tagreader.cpp
src/tagreader.cpp
+11
-30
translator_de.h
src/translator_de.h
+288
-218
util.cpp
src/util.cpp
+12
-10
xmldocvisitor.cpp
src/xmldocvisitor.cpp
+3
-1
xmlgen.cpp
src/xmlgen.cpp
+9
-1
No files found.
INSTALL
View file @
f3e7209f
DOXYGEN Version 1.3-rc1
DOXYGEN Version 1.3-rc1
-20021128
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 (
15
November 2002)
Dimitri van Heesch (
28
November 2002)
README
View file @
f3e7209f
DOXYGEN Version 1.3_rc1
DOXYGEN Version 1.3_rc1
_20021128
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) (
15
November 2002)
Dimitri van Heesch (dimitri@stack.nl) (
28
November 2002)
VERSION
View file @
f3e7209f
1.3-rc1
1.3-rc1
-20021128
doc/commands.doc
View file @
f3e7209f
...
@@ -376,7 +376,8 @@ doxygen. Unrecognized commands are treated as normal text.
...
@@ -376,7 +376,8 @@ doxygen. Unrecognized commands are treated as normal text.
\addindex \\internal
\addindex \\internal
This command writes the message `For internal use only' to the output and
This command writes the message `For internal use only' to the output and
all text \e after a \c \\internal command is ignored.
all text \e after a \c \\internal command until the end of the
comment block is ignored.
You can use \ref cfg_internal_docs "INTERNAL_DOCS" in the config file
You can use \ref cfg_internal_docs "INTERNAL_DOCS" in the config file
to show or hide the internal documentation.
to show or hide the internal documentation.
...
...
doc/faq.doc
View file @
f3e7209f
...
@@ -229,7 +229,8 @@ generator -> gen
...
@@ -229,7 +229,8 @@ generator -> gen
\endverbatim
\endverbatim
At the time I was looking into lex and yacc, where a lot of things start with
At the time I was looking into lex and yacc, where a lot of things start with
"yy", so the "y" slipped in and made things pronounceable.
"yy", so the "y" slipped in and made things pronounceable
(the proper pronouncement is Docs-ee-gen, so with a long "e").
<li><b>What was the reason to develop doxygen?</b>
<li><b>What was the reason to develop doxygen?</b>
...
...
doc/maintainers.txt
View file @
f3e7209f
...
@@ -37,7 +37,6 @@ Xavier Outhier: xouthier@yahoo.fr
...
@@ -37,7 +37,6 @@ Xavier Outhier: xouthier@yahoo.fr
German
German
Jens Seidel: jensseidel@users.sf.net
Jens Seidel: jensseidel@users.sf.net
Jens Breitenstein: Jens.Breitenstein@tlc.de
Greek
Greek
Harry Kalogirou: harkal@rainbow.cs.unipi.gr
Harry Kalogirou: harkal@rainbow.cs.unipi.gr
...
...
packages/rpm/doxygen.spec
View file @
f3e7209f
Summary: A documentation system for C/C++.
Summary: A documentation system for C/C++.
Name: doxygen
Name: doxygen
Version: 1.3_rc1
Version: 1.3_rc1
_20021128
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 @
f3e7209f
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include "dot.h"
#include "dot.h"
#include "defargs.h"
#include "defargs.h"
#include "debug.h"
#include "debug.h"
#include "docparser.h"
static
QCString
stripExtension
(
const
char
*
fName
)
static
QCString
stripExtension
(
const
char
*
fName
)
{
{
...
@@ -553,6 +554,41 @@ void ClassDef::distributeMemberGroupDocumentation()
...
@@ -553,6 +554,41 @@ void ClassDef::distributeMemberGroupDocumentation()
}
}
}
}
void
ClassDef
::
findSectionsInDocumentation
()
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
mg
->
findSectionsInDocumentation
();
}
pubTypes
.
findSectionsInDocumentation
();
pubMethods
.
findSectionsInDocumentation
();
pubAttribs
.
findSectionsInDocumentation
();
pubSlots
.
findSectionsInDocumentation
();
signals
.
findSectionsInDocumentation
();
dcopMethods
.
findSectionsInDocumentation
();
pubStaticMethods
.
findSectionsInDocumentation
();
pubStaticAttribs
.
findSectionsInDocumentation
();
proTypes
.
findSectionsInDocumentation
();
proMethods
.
findSectionsInDocumentation
();
proAttribs
.
findSectionsInDocumentation
();
proSlots
.
findSectionsInDocumentation
();
proStaticMethods
.
findSectionsInDocumentation
();
proStaticAttribs
.
findSectionsInDocumentation
();
priTypes
.
findSectionsInDocumentation
();
priMethods
.
findSectionsInDocumentation
();
priAttribs
.
findSectionsInDocumentation
();
priSlots
.
findSectionsInDocumentation
();
priStaticMethods
.
findSectionsInDocumentation
();
priStaticAttribs
.
findSectionsInDocumentation
();
friends
.
findSectionsInDocumentation
();
related
.
findSectionsInDocumentation
();
properties
.
findSectionsInDocumentation
();
events
.
findSectionsInDocumentation
();
}
// add a file name to the used files set
// add a file name to the used files set
void
ClassDef
::
insertUsedFile
(
const
char
*
f
)
void
ClassDef
::
insertUsedFile
(
const
char
*
f
)
...
@@ -1558,7 +1594,7 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
...
@@ -1558,7 +1594,7 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
}
}
}
}
ol
.
docify
(
" {"
);
ol
.
docify
(
" {"
);
ol
.
endMemberItem
(
FALSE
);
ol
.
endMemberItem
();
// write user defined member groups
// write user defined member groups
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
...
...
src/classdef.h
View file @
f3e7209f
...
@@ -259,6 +259,7 @@ class ClassDef : public Definition
...
@@ -259,6 +259,7 @@ class ClassDef : public Definition
bool
addExample
(
const
char
*
anchor
,
const
char
*
name
,
const
char
*
file
);
bool
addExample
(
const
char
*
anchor
,
const
char
*
name
,
const
char
*
file
);
void
addMembersToMemberGroup
();
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
void
distributeMemberGroupDocumentation
();
void
findSectionsInDocumentation
();
void
setNamespace
(
NamespaceDef
*
nd
)
{
m_nspace
=
nd
;
}
void
setNamespace
(
NamespaceDef
*
nd
)
{
m_nspace
=
nd
;
}
void
setTemplateArguments
(
ArgumentList
*
al
);
void
setTemplateArguments
(
ArgumentList
*
al
);
void
mergeMembers
();
void
mergeMembers
();
...
...
src/classlist.cpp
View file @
f3e7209f
...
@@ -112,7 +112,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
...
@@ -112,7 +112,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
ol
.
docify
(
cd
->
localName
());
ol
.
docify
(
cd
->
localName
());
ol
.
endBold
();
ol
.
endBold
();
}
}
ol
.
endMemberItem
(
FALSE
);
ol
.
endMemberItem
();
if
(
!
cd
->
briefDescription
().
isEmpty
())
if
(
!
cd
->
briefDescription
().
isEmpty
())
{
{
ol
.
startMemberDescription
();
ol
.
startMemberDescription
();
...
...
src/cmdmapper.cpp
View file @
f3e7209f
...
@@ -74,6 +74,9 @@ CommandMap cmdMap[] =
...
@@ -74,6 +74,9 @@ CommandMap cmdMap[] =
{
"sa"
,
CMD_SA
},
{
"sa"
,
CMD_SA
},
{
"secreflist"
,
CMD_SECREFLIST
},
{
"secreflist"
,
CMD_SECREFLIST
},
{
"section"
,
CMD_SECTION
},
{
"section"
,
CMD_SECTION
},
{
"subsection"
,
CMD_SUBSECTION
},
{
"subsubsection"
,
CMD_SUBSUBSECTION
},
{
"paragraph"
,
CMD_PARAGRAPH
},
{
"see"
,
CMD_SA
},
{
"see"
,
CMD_SA
},
{
"since"
,
CMD_SINCE
},
{
"since"
,
CMD_SINCE
},
{
"skip"
,
CMD_SKIP
},
{
"skip"
,
CMD_SKIP
},
...
...
src/cmdmapper.h
View file @
f3e7209f
...
@@ -73,33 +73,36 @@ enum CommandType
...
@@ -73,33 +73,36 @@ enum CommandType
CMD_RETVAL
=
39
|
SIMPLESECT_BIT
,
CMD_RETVAL
=
39
|
SIMPLESECT_BIT
,
CMD_SA
=
40
|
SIMPLESECT_BIT
,
CMD_SA
=
40
|
SIMPLESECT_BIT
,
CMD_SECTION
=
41
,
CMD_SECTION
=
41
,
CMD_SINCE
=
42
|
SIMPLESECT_BIT
,
CMD_SUBSECTION
=
42
,
CMD_SKIP
=
43
,
CMD_SUBSUBSECTION
=
43
,
CMD_SKIPLINE
=
44
,
CMD_PARAGRAPH
=
44
,
CMD_STARTCODE
=
45
,
CMD_SINCE
=
45
|
SIMPLESECT_BIT
,
CMD_JAVALINK
=
46
,
CMD_SKIP
=
46
,
CMD_TEST
=
47
|
SIMPLESECT_BIT
,
CMD_SKIPLINE
=
47
,
CMD_TODO
=
48
|
SIMPLESECT_BIT
,
CMD_STARTCODE
=
48
,
CMD_UNTIL
=
49
,
CMD_JAVALINK
=
49
,
CMD_VERBATIM
=
50
,
CMD_TEST
=
50
|
SIMPLESECT_BIT
,
CMD_VERBINCLUDE
=
51
,
CMD_TODO
=
51
|
SIMPLESECT_BIT
,
CMD_VERSION
=
52
|
SIMPLESECT_BIT
,
CMD_UNTIL
=
52
,
CMD_WARNING
=
53
|
SIMPLESECT_BIT
,
CMD_VERBATIM
=
53
,
CMD_BSLASH
=
54
,
CMD_VERBINCLUDE
=
54
,
CMD_AT
=
55
,
CMD_VERSION
=
55
|
SIMPLESECT_BIT
,
CMD_LESS
=
56
,
CMD_WARNING
=
56
|
SIMPLESECT_BIT
,
CMD_GREATER
=
57
,
CMD_BSLASH
=
57
,
CMD_AMP
=
58
,
CMD_AT
=
58
,
CMD_DOLLAR
=
59
,
CMD_LESS
=
59
,
CMD_HASH
=
60
,
CMD_GREATER
=
60
,
CMD_PERCENT
=
61
,
CMD_AMP
=
61
,
CMD_LINEBREAK
=
62
,
CMD_DOLLAR
=
62
,
CMD_FORMULA
=
63
,
CMD_HASH
=
63
,
CMD_SECREFLIST
=
64
,
CMD_PERCENT
=
64
,
CMD_ENDSECREFLIST
=
65
,
CMD_LINEBREAK
=
65
,
CMD_LANGSWITCH
=
66
,
CMD_FORMULA
=
66
,
CMD_AUTHORS
=
67
|
SIMPLESECT_BIT
,
CMD_SECREFLIST
=
67
,
CMD_INTERNALREF
=
68
CMD_ENDSECREFLIST
=
68
,
CMD_LANGSWITCH
=
69
,
CMD_AUTHORS
=
70
|
SIMPLESECT_BIT
,
CMD_INTERNALREF
=
71
};
};
enum
HtmlTagType
enum
HtmlTagType
...
...
src/docparser.cpp
View file @
f3e7209f
This diff is collapsed.
Click to expand it.
src/docparser.h
View file @
f3e7209f
...
@@ -30,6 +30,9 @@
...
@@ -30,6 +30,9 @@
class
DocNode
;
class
DocNode
;
class
MemberDef
;
class
MemberDef
;
class
PageInfo
;
class
Definition
;
class
MemberGroup
;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
@@ -55,6 +58,9 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
...
@@ -55,6 +58,9 @@ 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 */
void
docFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
m
);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
/*! @brief Abstract node interface with type information. */
/*! @brief Abstract node interface with type information. */
...
@@ -200,16 +206,18 @@ class DocLinkedWord : public DocNode
...
@@ -200,16 +206,18 @@ class DocLinkedWord : public DocNode
class
DocURL
:
public
DocNode
class
DocURL
:
public
DocNode
{
{
public
:
public
:
DocURL
(
DocNode
*
parent
,
const
QString
&
url
)
:
DocURL
(
DocNode
*
parent
,
const
QString
&
url
,
bool
isEmail
)
:
m_parent
(
parent
),
m_url
(
url
)
{}
m_parent
(
parent
),
m_url
(
url
)
,
m_isEmail
(
isEmail
)
{}
QString
url
()
const
{
return
m_url
;
}
QString
url
()
const
{
return
m_url
;
}
Kind
kind
()
const
{
return
Kind_URL
;
}
Kind
kind
()
const
{
return
Kind_URL
;
}
DocNode
*
parent
()
const
{
return
m_parent
;
}
DocNode
*
parent
()
const
{
return
m_parent
;
}
void
accept
(
DocVisitor
*
v
)
{
v
->
visit
(
this
);
}
void
accept
(
DocVisitor
*
v
)
{
v
->
visit
(
this
);
}
bool
isEmail
()
const
{
return
m_isEmail
;
}
private
:
private
:
DocNode
*
m_parent
;
DocNode
*
m_parent
;
QString
m_url
;
QString
m_url
;
bool
m_isEmail
;
};
};
/*! @brief Node representing a line break */
/*! @brief Node representing a line break */
...
@@ -912,6 +920,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode
...
@@ -912,6 +920,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode
void
handleInclude
(
const
QString
&
cmdName
,
DocInclude
::
Type
t
);
void
handleInclude
(
const
QString
&
cmdName
,
DocInclude
::
Type
t
);
void
handleLink
(
const
QString
&
cmdName
,
bool
isJavaLink
);
void
handleLink
(
const
QString
&
cmdName
,
bool
isJavaLink
);
void
handleRef
(
const
QString
&
cmdName
);
void
handleRef
(
const
QString
&
cmdName
);
void
handleSection
(
const
QString
&
cmdName
);
int
handleLanguageSwitch
();
int
handleLanguageSwitch
();
private
:
private
:
...
...
src/doctokenizer.h
View file @
f3e7209f
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
#include <qlist.h>
#include <qlist.h>
#include "htmlattrib.h"
#include "htmlattrib.h"
class
Definition
;
class
PageInfo
;
class
MemberGroup
;
enum
Tokens
enum
Tokens
{
{
TK_WORD
=
1
,
TK_WORD
=
1
,
...
@@ -41,17 +45,20 @@ enum Tokens
...
@@ -41,17 +45,20 @@ enum Tokens
RetVal_SimpleSec
=
0x10001
,
RetVal_SimpleSec
=
0x10001
,
RetVal_ListItem
=
0x10002
,
RetVal_ListItem
=
0x10002
,
RetVal_Section
=
0x10003
,
RetVal_Section
=
0x10003
,
RetVal_EndList
=
0x10004
,
RetVal_Subsection
=
0x10004
,
RetVal_EndPre
=
0x10005
,
RetVal_Subsubsection
=
0x10005
,
RetVal_DescData
=
0x10006
,
RetVal_Paragraph
=
0x10006
,
RetVal_DescTitle
=
0x10007
,
RetVal_EndList
=
0x10007
,
RetVal_EndDesc
=
0x10008
,
RetVal_EndPre
=
0x10008
,
RetVal_TableRow
=
0x10009
,
RetVal_DescData
=
0x10009
,
RetVal_TableCell
=
0x1000A
,
RetVal_DescTitle
=
0x1000A
,
RetVal_TableHCell
=
0x1000B
,
RetVal_EndDesc
=
0x1000B
,
RetVal_EndTable
=
0x1000C
,
RetVal_TableRow
=
0x1000C
,
RetVal_Internal
=
0x1000D
,
RetVal_TableCell
=
0x1000D
,
RetVal_SwitchLang
=
0x1000E
RetVal_TableHCell
=
0x1000E
,
RetVal_EndTable
=
0x1000F
,
RetVal_Internal
=
0x10010
,
RetVal_SwitchLang
=
0x10011
};
};
struct
TokenInfo
struct
TokenInfo
...
@@ -89,6 +96,9 @@ struct TokenInfo
...
@@ -89,6 +96,9 @@ struct TokenInfo
// whitespace
// whitespace
QString
chars
;
QString
chars
;
// url
bool
isEMailAddr
;
};
};
// globals
// globals
...
@@ -100,6 +110,8 @@ extern FILE *doctokenizerYYin;
...
@@ -100,6 +110,8 @@ 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
,
MemberGroup
*
mg
);
void
doctokenizerYYinit
(
const
char
*
input
,
const
char
*
fileName
);
void
doctokenizerYYinit
(
const
char
*
input
,
const
char
*
fileName
);
void
doctokenizerYYcleanup
();
void
doctokenizerYYcleanup
();
void
doctokenizerYYpushContext
();
void
doctokenizerYYpushContext
();
...
@@ -119,5 +131,7 @@ void doctokenizerYYsetStateLink();
...
@@ -119,5 +131,7 @@ void doctokenizerYYsetStateLink();
void
doctokenizerYYsetStateRef
();
void
doctokenizerYYsetStateRef
();
void
doctokenizerYYsetStateInternalRef
();
void
doctokenizerYYsetStateInternalRef
();
void
doctokenizerYYsetStateText
();
void
doctokenizerYYsetStateText
();
void
doctokenizerYYsetStateSkipTitle
();
void
doctokenizerYYsetInsidePre
(
bool
b
);
#endif
#endif
src/doctokenizer.l
View file @
f3e7209f
...
@@ -27,16 +27,30 @@
...
@@ -27,16 +27,30 @@
#include "cmdmapper.h"
#include "cmdmapper.h"
#include "config.h"
#include "config.h"
#include "message.h"
#include "message.h"
#include "section.h"
#include "membergroup.h"
#include "definition.h"
#include "page.h"
#define YY_NEVER_INTERACTIVE 1
#define YY_NEVER_INTERACTIVE 1
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// context for tokenizer phase
static int g_commentState;
static int g_commentState;
TokenInfo *g_token = 0;
TokenInfo *g_token = 0;
static int g_inputPos = 0;
static int g_inputPos = 0;
static const char *g_inputString;
static const char *g_inputString;
static QString g_fileName;
static QString g_fileName;
static bool g_insidePre;
// context for section finding phase
static PageInfo *g_pageInfo;
static Definition *g_definition;
static MemberGroup *g_memberGroup;
static QCString g_secLabel;
static QCString g_secTitle;
static SectionInfo::SectionType g_secType;
struct DocLexerContext
struct DocLexerContext
{
{
...
@@ -189,6 +203,41 @@ static void parseHtmlAttribs(const char *att)
...
@@ -189,6 +203,41 @@ static void parseHtmlAttribs(const char *att)
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
static void processSection()
{
//printf("found section/anchor with name `%s'\n",g_secLabel.data());
QCString file;
if (g_memberGroup)
{
file = g_memberGroup->parent()->getOutputFileBase();
}
else if (g_definition)
{
file = g_definition->getOutputFileBase();
}
else if (g_pageInfo)
{
file = g_pageInfo->getOutputFileBase();
}
else
{
warn(g_fileName,yylineno,"Found section/anchor %s without context\n",g_secLabel.data());
}
SectionInfo *si=0;
if ((si=Doxygen::sectionDict.find(g_secLabel))==0)
{
si = new SectionInfo(file,g_secLabel,g_secTitle,g_secType);
Doxygen::sectionDict.insert(g_secLabel,si);
}
else if (!si->generated)
{
warn(g_fileName,yylineno,"Duplicate section/anchor label %s found!\n",
g_secLabel.data());
}
}
//--------------------------------------------------------------------------
#undef YY_INPUT
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
...
@@ -237,14 +286,15 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
...
@@ -237,14 +286,15 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK}
LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
WORD1 [^ \t\n\r\\@<>{}&$#,.]+|"{"|"}"
WORD1 [^ \t\n\r\\@<>
()
{}&$#,.]+|"{"|"}"
WORD2 "."|","
WORD2 "."|","
|"("|")"
WORD1NQ [^ \t\n\r\\@<>{}&$#,."]+
WORD1NQ [^ \t\n\r\\@<>
()
{}&$#,."]+
WORD2NQ "."|","
WORD2NQ "."|","
|"("|")"
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%option noyywrap
%option noyywrap
%option yylineno
%option yylineno
...
@@ -269,6 +319,12 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
...
@@ -269,6 +319,12 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
%x St_Ref2
%x St_Ref2
%x St_IntRef
%x St_IntRef
%x St_Text
%x St_Text
%x St_SkipTitle
%x St_Sections
%s St_SecLabel1
%s St_SecLabel2
%s St_SecTitle
%%
%%
<St_Para>\r /* skip carriage return */
<St_Para>\r /* skip carriage return */
...
@@ -315,12 +371,14 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
...
@@ -315,12 +371,14 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
g_token->name = yytext+1;
g_token->name = yytext+1;
return TK_COMMAND;
return TK_COMMAND;
}
}
<St_Para>("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} {
<St_Para>("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} {
// URL
g_token->name=yytext;
g_token->name=yytext;
g_token->isEMailAddr=FALSE;
return TK_URL;
return TK_URL;
}
}
<St_Para>[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+"."[a-z_A-Z0-9.-]+ {
<St_Para>[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+"."[a-z_A-Z0-9.-]+ {
// Mail address
g_token->name=yytext;
g_token->name=yytext;
g_token->isEMailAddr=TRUE;
return TK_URL;
return TK_URL;
}
}
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
...
@@ -408,9 +466,20 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
...
@@ -408,9 +466,20 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
return TK_COMMAND;
return TK_COMMAND;
}
}
<St_Para>({BLANK}*\n)+{BLANK}*\n {
<St_Para>({BLANK}*\n)+{BLANK}*\n {
if (g_insidePre)
{
/* Inside a <pre>..</pre> blank lines are treated
* as whitespace.
*/
g_token->chars=yytext;
return TK_WHITESPACE;
}
else
{
/* start of a new paragraph */
/* start of a new paragraph */
return TK_NEWPARA;
return TK_NEWPARA;
}
}
}
<St_Code>{CMD}"endcode" {
<St_Code>{CMD}"endcode" {
return RetVal_OK;
return RetVal_OK;
}
}
...
@@ -621,6 +690,56 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
...
@@ -621,6 +690,56 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
}
}
<St_Comment>[^-\n]+ /* inside html comment */
<St_Comment>[^-\n]+ /* inside html comment */
<St_Comment>. /* inside html comment */
<St_Comment>. /* inside html comment */
/* State for skipping title (all chars until the end of the line) */
<St_SkipTitle>.
<St_SkipTitle>\n { return 0; }
/* State for the pass used to find the anchors and sections */
<St_Sections>[^\n@\\]+
<St_Sections>"@@"|"\\\\"
<St_Sections>{CMD}"anchor"{BLANK}+ {
g_secType = SectionInfo::Anchor;
BEGIN(St_SecLabel1);
}
<St_Sections>{CMD}"section"{BLANK}+ {
g_secType = SectionInfo::Section;
BEGIN(St_SecLabel2);
}
<St_Sections>{CMD}"subsection"{BLANK}+ {
g_secType = SectionInfo::Subsection;
BEGIN(St_SecLabel2);
}
<St_Sections>{CMD}"subsubsection"{BLANK}+ {
g_secType = SectionInfo::Subsubsection;
BEGIN(St_SecLabel2);
}
<St_Sections>{CMD}"paragraph"{BLANK}+ {
g_secType = SectionInfo::Paragraph;
BEGIN(St_SecLabel2);
}
<St_Sections>.
<St_Sections>\n
<St_SecLabel1>{LABELID} {
g_secLabel = yytext;
processSection();
BEGIN(St_Sections);
}
<St_SecLabel2>{LABELID}{BLANK}+ {
g_secLabel = yytext;
g_secLabel = g_secLabel.stripWhiteSpace();
BEGIN(St_SecTitle);
}
<St_SecTitle>[^\n]*\n {
g_secTitle = yytext;
g_secTitle = g_secTitle.stripWhiteSpace();
processSection();
BEGIN(St_Sections);
}
/* Generic rules that work for all states */
<*>\n {
<*>\n {
warn(g_fileName,yylineno,"Error: Unexpected new line character");
warn(g_fileName,yylineno,"Error: Unexpected new line character");
}
}
...
@@ -636,11 +755,27 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
...
@@ -636,11 +755,27 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
MemberGroup *mg)
{
if (input==0) return;
g_inputString = input;
//printf("parsing --->`%s'<---\n",input);
g_inputPos = 0;
g_pageInfo = pi;
g_definition = d;
g_memberGroup = mg;
BEGIN(St_Sections);
doctokenizerYYlineno = 1;
doctokenizerYYlex();
}
void doctokenizerYYinit(const char *input,const char *fileName)
void doctokenizerYYinit(const char *input,const char *fileName)
{
{
g_inputString = input;
g_inputString = input;
g_inputPos = 0;
g_inputPos = 0;
g_fileName = fileName;
g_fileName = fileName;
g_insidePre = FALSE;
BEGIN(St_Para);
BEGIN(St_Para);
}
}
...
@@ -718,11 +853,21 @@ void doctokenizerYYsetStateText()
...
@@ -718,11 +853,21 @@ void doctokenizerYYsetStateText()
BEGIN(St_Text);
BEGIN(St_Text);
}
}
void doctokenizerYYsetStateSkipTitle()
{
BEGIN(St_SkipTitle);
}
void doctokenizerYYcleanup()
void doctokenizerYYcleanup()
{
{
yy_delete_buffer( YY_CURRENT_BUFFER );
yy_delete_buffer( YY_CURRENT_BUFFER );
}
}
void doctokenizerYYsetInsidePre(bool b)
{
g_insidePre = b;
}
extern "C" { // some bogus code to keep the compiler happy
extern "C" { // some bogus code to keep the compiler happy
void doctokenizerYYdummy() { yy_flex_realloc(0,0); }
void doctokenizerYYdummy() { yy_flex_realloc(0,0); }
}
}
src/doxygen.cpp
View file @
f3e7209f
...
@@ -1149,7 +1149,7 @@ static MemberDef *addVariableToClass(
...
@@ -1149,7 +1149,7 @@ static MemberDef *addVariableToClass(
/*const QCString &scope,*/
/*const QCString &scope,*/
const
QCString
&
name
,
const
QCString
&
name
,
bool
fromAnnScope
,
bool
fromAnnScope
,
int
indentDepth
,
/*int indentDepth,*/
MemberDef
*
fromAnnMemb
,
MemberDef
*
fromAnnMemb
,
Protection
prot
)
Protection
prot
)
{
{
...
@@ -1236,7 +1236,7 @@ static MemberDef *addVariableToClass(
...
@@ -1236,7 +1236,7 @@ static MemberDef *addVariableToClass(
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
setFromAnonymousScope
(
fromAnnScope
);
md
->
setFromAnonymousScope
(
fromAnnScope
);
md
->
setFromAnonymousMember
(
fromAnnMemb
);
md
->
setFromAnonymousMember
(
fromAnnMemb
);
md
->
setIndentDepth
(
indentDepth
);
//
md->setIndentDepth(indentDepth);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setInitializer
(
root
->
initializer
);
md
->
setInitializer
(
root
->
initializer
);
md
->
setMaxInitLines
(
root
->
initLines
);
md
->
setMaxInitLines
(
root
->
initLines
);
...
@@ -1284,7 +1284,7 @@ static MemberDef *addVariableToFile(
...
@@ -1284,7 +1284,7 @@ static MemberDef *addVariableToFile(
const
QCString
&
scope
,
const
QCString
&
scope
,
const
QCString
&
name
,
const
QCString
&
name
,
bool
fromAnnScope
,
bool
fromAnnScope
,
int
indentDepth
,
/*int indentDepth,*/
MemberDef
*
fromAnnMemb
)
MemberDef
*
fromAnnMemb
)
{
{
Debug
::
print
(
Debug
::
Variables
,
0
,
Debug
::
print
(
Debug
::
Variables
,
0
,
...
@@ -1403,7 +1403,7 @@ static MemberDef *addVariableToFile(
...
@@ -1403,7 +1403,7 @@ static MemberDef *addVariableToFile(
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
addSectionsToDefinition
(
root
->
anchors
);
md
->
setFromAnonymousScope
(
fromAnnScope
);
md
->
setFromAnonymousScope
(
fromAnnScope
);
md
->
setFromAnonymousMember
(
fromAnnMemb
);
md
->
setFromAnonymousMember
(
fromAnnMemb
);
md
->
setIndentDepth
(
indentDepth
);
//
md->setIndentDepth(indentDepth);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setBodySegment
(
root
->
bodyLine
,
root
->
endBodyLine
);
md
->
setInitializer
(
root
->
initializer
);
md
->
setInitializer
(
root
->
initializer
);
md
->
setMaxInitLines
(
root
->
initLines
);
md
->
setMaxInitLines
(
root
->
initLines
);
...
@@ -1661,7 +1661,7 @@ void buildVarList(Entry *root)
...
@@ -1661,7 +1661,7 @@ void buildVarList(Entry *root)
if
(
cd
)
if
(
cd
)
{
{
addVariableToClass
(
root
,
cd
,
MemberDef
::
Friend
,
/*scope,*/
addVariableToClass
(
root
,
cd
,
MemberDef
::
Friend
,
/*scope,*/
root
->
name
,
FALSE
,
0
,
0
,
Public
);
root
->
name
,
FALSE
,
/*0,*/
0
,
Public
);
}
}
}
}
goto
nextMember
;
goto
nextMember
;
...
@@ -1693,44 +1693,51 @@ void buildVarList(Entry *root)
...
@@ -1693,44 +1693,51 @@ void buildVarList(Entry *root)
scope
=
classScope
;
scope
=
classScope
;
if
(
!
scope
.
isEmpty
()
&&
!
name
.
isEmpty
()
&&
(
cd
=
getClass
(
scope
)))
if
(
!
scope
.
isEmpty
()
&&
!
name
.
isEmpty
()
&&
(
cd
=
getClass
(
scope
)))
{
{
// TODO: clean up this mess!
MemberDef
*
md
=
0
;
MemberDef
*
md
=
0
;
// if cd is an annonymous scope we insert the member
// if cd is an annonymous scope we insert the member
// into a non-annonymous scope as well.
// into a non-annonymous scope as well.
int
indentDepth
=
0
;
//
int indentDepth=0;
int
si
=
scope
.
find
(
'@'
);
int
si
=
scope
.
find
(
'@'
);
//int anonyScopes = 0;
bool
added
=
FALSE
;
if
(
si
!=-
1
)
if
(
si
!=-
1
)
{
{
//printf("name=`%s' scope=%s\n",name.data(),scope.data());
QCString
pScope
;
QCString
pScope
;
ClassDef
*
pcd
=
0
;
ClassDef
*
pcd
=
0
;
pScope
=
scope
.
left
(
QMAX
(
si
-
2
,
0
));
pScope
=
scope
.
left
(
QMAX
(
si
-
2
,
0
));
indentDepth
=
scope
.
right
(
scope
.
length
()
-
si
).
contains
(
"::"
)
+
1
;
if
(
!
pScope
.
isEmpty
())
if
(
!
pScope
.
isEmpty
())
pScope
.
prepend
(
annScopePrefix
);
pScope
.
prepend
(
annScopePrefix
);
else
if
(
annScopePrefix
.
length
()
>
2
)
else
if
(
annScopePrefix
.
length
()
>
2
)
pScope
=
annScopePrefix
.
left
(
annScopePrefix
.
length
()
-
2
);
pScope
=
annScopePrefix
.
left
(
annScopePrefix
.
length
()
-
2
);
//printf("pScope=`%s'\n",pScope.data());
if
(
name
.
at
(
0
)
!=
'@'
)
if
(
name
.
at
(
0
)
!=
'@'
)
{
{
if
(
!
pScope
.
isEmpty
()
&&
(
pcd
=
getClass
(
pScope
)))
if
(
!
pScope
.
isEmpty
()
&&
(
pcd
=
getClass
(
pScope
)))
{
{
//Protection p = (Protection)QMAX((int)root->protection,(int)cd->protection());
//Protection p = (Protection)QMAX((int)root->protection,(int)cd->protection());
md
=
addVariableToClass
(
root
,
pcd
,
mtype
,
/*pScope,*/
name
,
TRUE
,
indentDepth
,
0
,
root
->
protection
);
md
=
addVariableToClass
(
root
,
pcd
,
mtype
,
name
,
TRUE
,
0
,
root
->
protection
);
added
=
TRUE
;
}
}
else
// annonymous scope inside namespace or file => put variable in the global scope
else
// annonymous scope inside namespace or file => put variable in the global scope
{
{
//printf("Inserting member in global scope %s!\n",pScope.data());
md
=
addVariableToFile
(
root
,
mtype
,
pScope
,
name
,
TRUE
,
0
);
//md=addVariableToFile(root,mtype,pScope,name,!pScope.isEmpty(),indentDepth,0);
added
=
TRUE
;
md
=
addVariableToFile
(
root
,
mtype
,
pScope
,
name
,
TRUE
,
indentDepth
,
0
);
}
}
}
}
}
}
addVariableToClass
(
root
,
cd
,
mtype
,
/*scope,*/
name
,
FALSE
,
indentDepth
,
md
,
root
->
protection
);
//printf("name=`%s' scope=%s scope.right=%s indentDepth=%d anonyScopes=%d\n",
// name.data(),scope.data(),
// scope.right(scope.length()-si).data(),
// indentDepth,
// anonyScopes);
addVariableToClass
(
root
,
cd
,
mtype
,
name
,
FALSE
,
md
,
root
->
protection
);
}
}
else
if
(
!
name
.
isEmpty
())
// global variable
else
if
(
!
name
.
isEmpty
())
// global variable
{
{
//printf("Inserting member in global scope %s!\n",scope.data());
//printf("Inserting member in global scope %s!\n",scope.data());
addVariableToFile
(
root
,
mtype
,
scope
,
name
,
FALSE
,
0
,
0
);
addVariableToFile
(
root
,
mtype
,
scope
,
name
,
FALSE
,
/*0,*/
0
);
}
}
//if (mtype==MemberDef::Typedef)
//if (mtype==MemberDef::Typedef)
//{
//{
...
@@ -5719,6 +5726,53 @@ static void distributeMemberGroupDocumentation()
...
@@ -5719,6 +5726,53 @@ static void distributeMemberGroupDocumentation()
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
static
void
findSectionsInDocumentation
()
{
// for each class
ClassSDict
::
Iterator
cli
(
Doxygen
::
classSDict
);
ClassDef
*
cd
;
for
(
;
(
cd
=
cli
.
current
())
;
++
cli
)
{
cd
->
findSectionsInDocumentation
();
}
// for each file
FileName
*
fn
=
Doxygen
::
inputNameList
.
first
();
while
(
fn
)
{
FileDef
*
fd
=
fn
->
first
();
while
(
fd
)
{
fd
->
findSectionsInDocumentation
();
fd
=
fn
->
next
();
}
fn
=
Doxygen
::
inputNameList
.
next
();
}
// for each namespace
NamespaceSDict
::
Iterator
nli
(
Doxygen
::
namespaceSDict
);
NamespaceDef
*
nd
;
for
(
;
(
nd
=
nli
.
current
())
;
++
nli
)
{
nd
->
findSectionsInDocumentation
();
}
// for each group
GroupSDict
::
Iterator
gli
(
Doxygen
::
groupSDict
);
GroupDef
*
gd
;
for
(
gli
.
toFirst
();(
gd
=
gli
.
current
());
++
gli
)
{
gd
->
findSectionsInDocumentation
();
}
// for each page
PageSDict
::
Iterator
pdi
(
*
Doxygen
::
pageSDict
);
PageInfo
*
pi
=
0
;
for
(
pdi
.
toFirst
();(
pi
=
pdi
.
current
());
++
pdi
)
{
pi
->
findSectionsInDocumentation
();
}
if
(
Doxygen
::
mainPage
)
Doxygen
::
mainPage
->
findSectionsInDocumentation
();
}
//----------------------------------------------------------------------------
static
void
findDefineDocumentation
(
Entry
*
root
)
static
void
findDefineDocumentation
(
Entry
*
root
)
{
{
if
((
root
->
section
==
Entry
::
DEFINEDOC_SEC
||
if
((
root
->
section
==
Entry
::
DEFINEDOC_SEC
||
...
@@ -5896,8 +5950,10 @@ static void findMainPage(Entry *root)
...
@@ -5896,8 +5950,10 @@ static void findMainPage(Entry *root)
// a page name is a label as well!
// a page name is a label as well!
SectionInfo
*
si
=
new
SectionInfo
(
SectionInfo
*
si
=
new
SectionInfo
(
Doxygen
::
mainPage
->
name
,
Doxygen
::
mainPage
->
title
,
SectionInfo
::
Section
);
indexName
,
si
->
fileName
=
indexName
;
Doxygen
::
mainPage
->
name
,
Doxygen
::
mainPage
->
title
,
SectionInfo
::
Section
);
Doxygen
::
sectionDict
.
insert
(
indexName
,
si
);
Doxygen
::
sectionDict
.
insert
(
indexName
,
si
);
}
}
else
else
...
@@ -7700,8 +7756,10 @@ void parseInput()
...
@@ -7700,8 +7756,10 @@ void parseInput()
msg
(
"Adding source references...
\n
"
);
msg
(
"Adding source references...
\n
"
);
addSourceReferences
();
addSourceReferences
();
msg
(
"Adding todo/test/bug list items...
\n
"
);
msg
(
"Adding todo/test/bug list items...
\n
"
);
addListReferences
();
addListReferences
();
}
}
void
generateOutput
()
void
generateOutput
()
...
@@ -7775,6 +7833,9 @@ void generateOutput()
...
@@ -7775,6 +7833,9 @@ void generateOutput()
msg
(
"Resolving user defined references...
\n
"
);
msg
(
"Resolving user defined references...
\n
"
);
resolveUserReferences
();
resolveUserReferences
();
msg
(
"Finding anchor and section in the documentation...
\n
"
);
findSectionsInDocumentation
();
msg
(
"Generating index page...
\n
"
);
msg
(
"Generating index page...
\n
"
);
writeIndex
(
*
outputList
);
writeIndex
(
*
outputList
);
...
...
src/filedef.cpp
View file @
f3e7209f
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "dot.h"
#include "dot.h"
#include "message.h"
#include "message.h"
#include "code.h"
#include "code.h"
#include "docparser.h"
//#include "xml.h"
//#include "xml.h"
/*! create a new file definition, where \a p is the file path,
/*! create a new file definition, where \a p is the file path,
...
@@ -97,6 +98,23 @@ void FileDef::distributeMemberGroupDocumentation()
...
@@ -97,6 +98,23 @@ void FileDef::distributeMemberGroupDocumentation()
}
}
}
}
void
FileDef
::
findSectionsInDocumentation
()
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
mg
->
findSectionsInDocumentation
();
}
decDefineMembers
.
findSectionsInDocumentation
();
decProtoMembers
.
findSectionsInDocumentation
();
decTypedefMembers
.
findSectionsInDocumentation
();
decEnumMembers
.
findSectionsInDocumentation
();
decFuncMembers
.
findSectionsInDocumentation
();
decVarMembers
.
findSectionsInDocumentation
();
}
void
FileDef
::
writeDetailedDocumentation
(
OutputList
&
ol
)
void
FileDef
::
writeDetailedDocumentation
(
OutputList
&
ol
)
{
{
if
((
!
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"REPEAT_BRIEF"
))
||
if
((
!
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"REPEAT_BRIEF"
))
||
...
@@ -369,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol)
...
@@ -369,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol
.
docify
(
nd
->
displayName
());
ol
.
docify
(
nd
->
displayName
());
ol
.
endBold
();
ol
.
endBold
();
}
}
ol
.
endMemberItem
(
FALSE
);
ol
.
endMemberItem
();
}
}
}
}
if
(
found
)
ol
.
endMemberList
();
if
(
found
)
ol
.
endMemberList
();
...
...
src/filedef.h
View file @
f3e7209f
...
@@ -145,6 +145,7 @@ class FileDef : public Definition
...
@@ -145,6 +145,7 @@ class FileDef : public Definition
void
addMembersToMemberGroup
();
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
void
distributeMemberGroupDocumentation
();
void
findSectionsInDocumentation
();
void
addListReferences
();
void
addListReferences
();
...
...
src/groupdef.cpp
View file @
f3e7209f
...
@@ -104,6 +104,23 @@ void GroupDef::distributeMemberGroupDocumentation()
...
@@ -104,6 +104,23 @@ void GroupDef::distributeMemberGroupDocumentation()
}
}
}
}
void
GroupDef
::
findSectionsInDocumentation
()
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
mg
->
findSectionsInDocumentation
();
}
decDefineMembers
.
findSectionsInDocumentation
();
decProtoMembers
.
findSectionsInDocumentation
();
decTypedefMembers
.
findSectionsInDocumentation
();
decEnumMembers
.
findSectionsInDocumentation
();
decFuncMembers
.
findSectionsInDocumentation
();
decVarMembers
.
findSectionsInDocumentation
();
}
void
GroupDef
::
addFile
(
const
FileDef
*
def
)
void
GroupDef
::
addFile
(
const
FileDef
*
def
)
{
{
if
(
Config_getBool
(
"SORT_MEMBER_DOCS"
))
if
(
Config_getBool
(
"SORT_MEMBER_DOCS"
))
...
@@ -435,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
...
@@ -435,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
{
Doxygen
::
tagFile
<<
" <file>"
<<
convertToXML
(
fd
->
name
())
<<
"</file>"
<<
endl
;
Doxygen
::
tagFile
<<
" <file>"
<<
convertToXML
(
fd
->
name
())
<<
"</file>"
<<
endl
;
}
}
ol
.
endMemberItem
(
FALSE
);
ol
.
endMemberItem
();
if
(
!
fd
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
if
(
!
fd
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
{
{
ol
.
startMemberDescription
();
ol
.
startMemberDescription
();
...
@@ -466,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
...
@@ -466,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
{
Doxygen
::
tagFile
<<
" <namespace>"
<<
convertToXML
(
nd
->
name
())
<<
"</namespace>"
<<
endl
;
Doxygen
::
tagFile
<<
" <namespace>"
<<
convertToXML
(
nd
->
name
())
<<
"</namespace>"
<<
endl
;
}
}
ol
.
endMemberItem
(
FALSE
);
ol
.
endMemberItem
();
if
(
!
nd
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
if
(
!
nd
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
{
{
ol
.
startMemberDescription
();
ol
.
startMemberDescription
();
...
@@ -496,7 +513,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
...
@@ -496,7 +513,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
{
Doxygen
::
tagFile
<<
" <subgroup>"
<<
convertToXML
(
gd
->
name
())
<<
"</subgroup>"
<<
endl
;
Doxygen
::
tagFile
<<
" <subgroup>"
<<
convertToXML
(
gd
->
name
())
<<
"</subgroup>"
<<
endl
;
}
}
ol
.
endMemberItem
(
FALSE
);
ol
.
endMemberItem
();
if
(
!
gd
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
if
(
!
gd
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
{
{
ol
.
startMemberDescription
();
ol
.
startMemberDescription
();
...
...
src/groupdef.h
View file @
f3e7209f
...
@@ -74,6 +74,7 @@ class GroupDef : public Definition
...
@@ -74,6 +74,7 @@ class GroupDef : public Definition
void
addMembersToMemberGroup
();
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
void
distributeMemberGroupDocumentation
();
void
findSectionsInDocumentation
();
void
addListReferences
();
void
addListReferences
();
...
...
src/htmldocvisitor.cpp
View file @
f3e7209f
...
@@ -110,7 +110,9 @@ void HtmlDocVisitor::visit(DocSymbol *s)
...
@@ -110,7 +110,9 @@ void HtmlDocVisitor::visit(DocSymbol *s)
void
HtmlDocVisitor
::
visit
(
DocURL
*
u
)
void
HtmlDocVisitor
::
visit
(
DocURL
*
u
)
{
{
if
(
m_hide
)
return
;
if
(
m_hide
)
return
;
m_t
<<
"<a href=
\"
"
<<
u
->
url
()
<<
"
\"
>"
;
m_t
<<
"<a href=
\"
"
;
if
(
u
->
isEmail
())
m_t
<<
"mailto:"
;
m_t
<<
u
->
url
()
<<
"
\"
>"
;
filter
(
u
->
url
());
filter
(
u
->
url
());
m_t
<<
"</a>"
;
m_t
<<
"</a>"
;
}
}
...
@@ -156,7 +158,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
...
@@ -156,7 +158,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
case
DocStyleChange
:
:
Preformatted
:
case
DocStyleChange
:
:
Preformatted
:
if
(
s
->
enable
())
if
(
s
->
enable
())
{
{
m_t
<<
"<pre"
<<
htmlAttribsToString
(
s
->
attribs
())
<<
">
\n
"
;
m_t
<<
"<pre"
<<
htmlAttribsToString
(
s
->
attribs
())
<<
">"
;
m_insidePre
=
TRUE
;
m_insidePre
=
TRUE
;
}
}
else
else
...
...
src/htmlgen.cpp
View file @
f3e7209f
...
@@ -766,7 +766,7 @@ void HtmlGenerator::startMemberItem(int annoType)
...
@@ -766,7 +766,7 @@ void HtmlGenerator::startMemberItem(int annoType)
}
}
}
}
void
HtmlGenerator
::
endMemberItem
(
bool
)
void
HtmlGenerator
::
endMemberItem
()
{
{
//DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
//DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
if
(
Config_getBool
(
"HTML_ALIGN_MEMBERS"
))
if
(
Config_getBool
(
"HTML_ALIGN_MEMBERS"
))
...
...
src/htmlgen.h
View file @
f3e7209f
...
@@ -94,7 +94,10 @@ class HtmlGenerator : public OutputGenerator
...
@@ -94,7 +94,10 @@ class HtmlGenerator : public OutputGenerator
void
endMemberSubtitle
();
void
endMemberSubtitle
();
void
startMemberList
();
void
startMemberList
();
void
endMemberList
();
void
endMemberList
();
void
startAnonTypeScope
(
int
)
{}
void
endAnonTypeScope
(
int
)
{}
void
startMemberItem
(
int
);
void
startMemberItem
(
int
);
void
endMemberItem
();
void
startMemberGroupHeader
(
bool
);
void
startMemberGroupHeader
(
bool
);
void
endMemberGroupHeader
();
void
endMemberGroupHeader
();
...
@@ -104,7 +107,6 @@ class HtmlGenerator : public OutputGenerator
...
@@ -104,7 +107,6 @@ class HtmlGenerator : public OutputGenerator
void
endMemberGroup
(
bool
);
void
endMemberGroup
(
bool
);
void
insertMemberAlign
();
void
insertMemberAlign
();
void
endMemberItem
(
bool
);
void
startMemberDescription
();
void
startMemberDescription
();
void
endMemberDescription
();
void
endMemberDescription
();
...
...
src/latexdocvisitor.cpp
View file @
f3e7209f
...
@@ -158,7 +158,9 @@ void LatexDocVisitor::visit(DocURL *u)
...
@@ -158,7 +158,9 @@ void LatexDocVisitor::visit(DocURL *u)
if
(
m_hide
)
return
;
if
(
m_hide
)
return
;
if
(
Config_getBool
(
"PDF_HYPERLINKS"
))
if
(
Config_getBool
(
"PDF_HYPERLINKS"
))
{
{
m_t
<<
"
\\
href{"
<<
u
->
url
()
<<
"}"
;
m_t
<<
"
\\
href{"
;
if
(
u
->
isEmail
())
m_t
<<
"mailto:"
;
m_t
<<
u
->
url
()
<<
"}"
;
}
}
m_t
<<
"{
\\
tt "
;
m_t
<<
"{
\\
tt "
;
filter
(
u
->
url
());
filter
(
u
->
url
());
...
...
src/latexgen.cpp
View file @
f3e7209f
...
@@ -1238,59 +1238,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
...
@@ -1238,59 +1238,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
t
<<
"}
\\
label{"
<<
lab
<<
"}"
<<
endl
;
t
<<
"}
\\
label{"
<<
lab
<<
"}"
<<
endl
;
}
}
//void LatexGenerator::writeSectionRef(const char *ref,const char *,
// const char *lab,const char *text)
//{
// if (ref) // external reference
// {
// docify(text);
// }
// else // local reference
// {
// if (text && Config_getBool("PDF_HYPERLINKS"))
// {
// t << "\\hyperlink{";
// if (lab) t << lab;
// t << "}{";
// docify(text);
// t << "}";
// //t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
// }
// else
// {
// if (strcmp(lab,text)!=0) // lab!=text
// {
// // todo: don't hardcode p. here!
// t << "{\\bf ";
// docify(text);
// t << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
// }
// else
// {
// t << "\\ref{" << lab << "}";
// }
// }
// }
//}
//
//void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
// const char *title)
//{
// t << "\\item \\contentsline{section}{";
// docify(title);
// t << "}{\\ref{" << lab << "}}{}" << endl;
//}
//
// TODO: remove this function
//void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
// const char *title)
//{
// startBold();
// docify(title);
// endBold();
// t << " (p.\\,\\pageref{" << lab << "})" << endl;
//}
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void
LatexGenerator
::
docify
(
const
char
*
str
)
void
LatexGenerator
::
docify
(
const
char
*
str
)
...
@@ -1364,38 +1311,38 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d,
...
@@ -1364,38 +1311,38 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d,
d
.
writeFigure
(
t
,
dir
,
fileName
);
d
.
writeFigure
(
t
,
dir
,
fileName
);
}
}
//void LatexGenerator::writeFormula(const char *,const char *text)
//{
// t << text;
//}
void
LatexGenerator
::
start
MemberItem
(
int
annType
)
void
LatexGenerator
::
start
AnonTypeScope
(
int
indent
)
{
{
if
(
!
insideTabbing
)
if
(
indent
==
0
)
{
{
t
<<
"
\\
item "
<<
endl
;
switch
(
annType
)
{
case
0
:
break
;
case
1
:
default
:
t
<<
"
\\
begin{tabbing}"
<<
endl
;
t
<<
"
\\
begin{tabbing}"
<<
endl
;
t
<<
"xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=
\\
kill"
<<
endl
;
t
<<
"xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=xx
\\
=
\\
kill"
<<
endl
;
//printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n");
//printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n");
insideTabbing
=
TRUE
;
insideTabbing
=
TRUE
;
break
;
}
}
}
}
}
void
LatexGenerator
::
end
MemberItem
(
bool
endItem
)
void
LatexGenerator
::
end
AnonTypeScope
(
int
indent
)
{
{
if
(
in
sideTabbing
&&
endItem
)
if
(
in
dent
==
0
)
{
{
t
<<
endl
<<
"
\\
end{tabbing}"
;
t
<<
endl
<<
"
\\
end{tabbing}"
;
//printf("LatexGenerator::endMemberItem() insideTabbing=FALSE\n");
insideTabbing
=
FALSE
;
insideTabbing
=
FALSE
;
}
}
}
void
LatexGenerator
::
startMemberItem
(
int
)
{
//printf("LatexGenerator::startMemberItem(%d)\n",annType);
if
(
!
insideTabbing
)
{
t
<<
"
\\
item "
<<
endl
;
}
}
void
LatexGenerator
::
endMemberItem
()
{
if
(
insideTabbing
)
if
(
insideTabbing
)
{
{
t
<<
"
\\\\
"
;
t
<<
"
\\\\
"
;
...
@@ -1414,95 +1361,20 @@ void LatexGenerator::writeNonBreakableSpace(int)
...
@@ -1414,95 +1361,20 @@ void LatexGenerator::writeNonBreakableSpace(int)
void
LatexGenerator
::
startMemberList
()
void
LatexGenerator
::
startMemberList
()
{
{
if
(
!
insideTabbing
)
if
(
!
insideTabbing
)
{
t
<<
"
\\
begin{CompactItemize}"
<<
endl
;
t
<<
"
\\
begin{CompactItemize}"
<<
endl
;
}
}
}
void
LatexGenerator
::
endMemberList
()
void
LatexGenerator
::
endMemberList
()
{
{
//printf("LatexGenerator::endMemberList(%d)\n",insideTabbing);
if
(
!
insideTabbing
)
if
(
!
insideTabbing
)
{
t
<<
"
\\
end{CompactItemize}"
<<
endl
;
t
<<
"
\\
end{CompactItemize}"
<<
endl
;
}
}
}
//void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
//{
// if (hasCaption)
// {
// t << "\\begin{figure}[H]" << endl;
// t << "\\begin{center}" << endl;
// }
// else
// {
// t << "\\mbox{";
// }
// QCString gfxName = name;
// if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
// // "\\epsfig{file=" << name;
// t << "\\includegraphics";
// if (size) t << "[" << size << "]";
// t << "{" << gfxName << "}";
// if (hasCaption)
// {
// t << "\\caption{";
// }
// else
// {
// t << "}" << endl;
// }
//}
//
//void LatexGenerator::endImage(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "}" << endl;
// t << "\\end{center}" << endl;
// t << "\\end{figure}" << endl;
// }
//}
//
//void LatexGenerator::startDotFile(const char *name,bool hasCaption)
//{
// QCString baseName=name;
// int i;
// if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
// {
// baseName=baseName.right(baseName.length()-i-1);
// }
// QCString outDir = Config_getString("LATEX_OUTPUT");
// writeDotGraphFromFile(name,outDir,baseName,EPS);
// if (hasCaption)
// {
// t << "\\begin{figure}[H]" << endl;
// t << "\\begin{center}" << endl;
// }
// else
// t << "\\mbox{";
// t << "\\includegraphics";
// if( Config_getBool("USE_PDFLATEX") )
// {
// t << "{" << baseName << ".pdf}";
// }
// else
// {
// t << "{" << baseName << ".eps}";
// }
//
// if (hasCaption)
// t << "\\caption{";
// else
// t << "}" << endl;
//}
//
//void LatexGenerator::endDotFile(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "}" << endl;
// t << "\\end{center}" << endl;
// t << "\\end{figure}" << endl;
// }
//}
//
void
LatexGenerator
::
startMemberGroupHeader
(
bool
hasHeader
)
void
LatexGenerator
::
startMemberGroupHeader
(
bool
hasHeader
)
{
{
...
@@ -1615,19 +1487,6 @@ void LatexGenerator::endParamList()
...
@@ -1615,19 +1487,6 @@ void LatexGenerator::endParamList()
t
<<
"
\\
end{Desc}"
<<
endl
;
t
<<
"
\\
end{Desc}"
<<
endl
;
}
}
//void LatexGenerator::startSectionRefList()
//{
// t << "\\footnotesize" << endl;
// t << "\\begin{multicols}{2}" << endl;
// t << "\\begin{CompactList}" << endl;
//}
//void LatexGenerator::endSectionRefList()
//{
// t << "\\end{CompactList}" << endl;
// t << "\\end{multicols}" << endl;
// t << "\\normalsize" << endl;
//}
void
LatexGenerator
::
printDoc
(
DocNode
*
n
)
void
LatexGenerator
::
printDoc
(
DocNode
*
n
)
{
{
...
...
src/latexgen.h
View file @
f3e7209f
...
@@ -102,8 +102,10 @@ class LatexGenerator : public OutputGenerator
...
@@ -102,8 +102,10 @@ class LatexGenerator : public OutputGenerator
void
endMemberSubtitle
()
{}
void
endMemberSubtitle
()
{}
void
startMemberList
();
void
startMemberList
();
void
endMemberList
();
void
endMemberList
();
void
startAnonTypeScope
(
int
);
void
endAnonTypeScope
(
int
);
void
startMemberItem
(
int
);
void
startMemberItem
(
int
);
void
endMemberItem
(
bool
);
void
endMemberItem
();
void
startMemberGroupHeader
(
bool
);
void
startMemberGroupHeader
(
bool
);
void
endMemberGroupHeader
();
void
endMemberGroupHeader
();
...
...
src/mangen.cpp
View file @
f3e7209f
...
@@ -473,21 +473,32 @@ void ManGenerator::endDescItem()
...
@@ -473,21 +473,32 @@ void ManGenerator::endDescItem()
firstCol
=
TRUE
;
firstCol
=
TRUE
;
}
}
void
ManGenerator
::
start
MemberItem
(
int
annType
)
void
ManGenerator
::
start
AnonTypeScope
(
int
indentLevel
)
{
{
if
(
firstCol
&&
!
insideTabbing
)
t
<<
".in +1c
\n
"
;
if
(
indentLevel
==
0
)
t
<<
"
\n
.ti -1c
\n
.RI
\"
"
;
{
firstCol
=
FALS
E
;
insideTabbing
=
TRU
E
;
if
(
annType
!=
0
)
insideTabbing
=
TRUE
;
}
}
}
void
ManGenerator
::
end
MemberItem
(
bool
endItem
)
void
ManGenerator
::
end
AnonTypeScope
(
int
indentLevel
)
{
{
if
(
endItem
)
if
(
indentLevel
==
0
)
{
{
insideTabbing
=
FALSE
;
insideTabbing
=
FALSE
;
t
<<
"
\"\n
.br
\n
.RI
\"
"
;
}
}
}
void
ManGenerator
::
startMemberItem
(
int
)
{
if
(
firstCol
&&
!
insideTabbing
)
t
<<
".in +1c
\n
"
;
t
<<
"
\n
.ti -1c
\n
.RI
\"
"
;
firstCol
=
FALSE
;
}
void
ManGenerator
::
endMemberItem
()
{
t
<<
"
\"\n
.br"
;
t
<<
"
\"\n
.br"
;
}
}
...
@@ -619,5 +630,6 @@ void ManGenerator::printDoc(DocNode *n)
...
@@ -619,5 +630,6 @@ void ManGenerator::printDoc(DocNode *n)
ManDocVisitor
*
visitor
=
new
ManDocVisitor
(
t
,
*
this
);
ManDocVisitor
*
visitor
=
new
ManDocVisitor
(
t
,
*
this
);
n
->
accept
(
visitor
);
n
->
accept
(
visitor
);
delete
visitor
;
delete
visitor
;
firstCol
=
FALSE
;
}
}
src/mangen.h
View file @
f3e7209f
...
@@ -100,8 +100,10 @@ class ManGenerator : public OutputGenerator
...
@@ -100,8 +100,10 @@ class ManGenerator : public OutputGenerator
void
writeListItem
();
void
writeListItem
();
void
startMemberList
();
void
startMemberList
();
void
endMemberList
();
void
endMemberList
();
void
startAnonTypeScope
(
int
);
void
endAnonTypeScope
(
int
);
void
startMemberItem
(
int
);
void
startMemberItem
(
int
);
void
endMemberItem
(
bool
);
void
endMemberItem
();
void
startMemberGroupHeader
(
bool
);
void
startMemberGroupHeader
(
bool
);
void
endMemberGroupHeader
();
void
endMemberGroupHeader
();
...
...
src/memberdef.cpp
View file @
f3e7209f
...
@@ -30,8 +30,14 @@
...
@@ -30,8 +30,14 @@
#include "membergroup.h"
#include "membergroup.h"
#include "groupdef.h"
#include "groupdef.h"
#include "defargs.h"
#include "defargs.h"
#include "docparser.h"
//#include "xml.h"
//#include "xml.h"
//-----------------------------------------------------------------------------
int
MemberDef
::
s_indentLevel
=
0
;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
static
QCString
addTemplateNames
(
const
QCString
&
s
,
const
QCString
&
n
,
const
QCString
&
t
)
static
QCString
addTemplateNames
(
const
QCString
&
s
,
const
QCString
&
n
,
const
QCString
&
t
)
...
@@ -307,7 +313,7 @@ MemberDef::MemberDef(const char *df,int dl,
...
@@ -307,7 +313,7 @@ MemberDef::MemberDef(const char *df,int dl,
annUsed
=
FALSE
;
annUsed
=
FALSE
;
annShown
=
FALSE
;
annShown
=
FALSE
;
annEnumType
=
0
;
annEnumType
=
0
;
indDepth
=
0
;
//
indDepth=0;
section
=
0
;
section
=
0
;
bodyMemb
=
0
;
bodyMemb
=
0
;
explExt
=
FALSE
;
explExt
=
FALSE
;
...
@@ -560,9 +566,11 @@ bool MemberDef::isBriefSectionVisible() const
...
@@ -560,9 +566,11 @@ bool MemberDef::isBriefSectionVisible() const
// 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
// 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
// "", //getFileDef()->name().data(),
// "", //getFileDef()->name().data(),
// argsString());
// argsString());
QCString
*
pMemGrp
=
Doxygen
::
memberDocDict
[
grpId
];
bool
hasDocs
=
hasDocumentation
()
||
bool
hasDocs
=
hasDocumentation
()
||
// part of a documented member group
// part of a documented member group
(
grpId
!=-
1
&&
!
Doxygen
::
memberDocDict
[
grpId
]
->
isEmpty
());
(
grpId
!=-
1
&&
pMemGrp
&&
!
pMemGrp
->
isEmpty
());
// only include static members with file/namespace scope if
// only include static members with file/namespace scope if
// explicitly enabled in the config file
// explicitly enabled in the config file
...
@@ -636,6 +644,7 @@ bool MemberDef::isBriefSectionVisible() const
...
@@ -636,6 +644,7 @@ bool MemberDef::isBriefSectionVisible() const
return
visible
;
return
visible
;
}
}
void
MemberDef
::
writeDeclaration
(
OutputList
&
ol
,
void
MemberDef
::
writeDeclaration
(
OutputList
&
ol
,
ClassDef
*
cd
,
NamespaceDef
*
nd
,
FileDef
*
fd
,
GroupDef
*
gd
,
ClassDef
*
cd
,
NamespaceDef
*
nd
,
FileDef
*
fd
,
GroupDef
*
gd
,
bool
inGroup
bool
inGroup
...
@@ -705,6 +714,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
...
@@ -705,6 +714,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ClassDef
*
annoClassDef
=
getClassDefOfAnonymousType
();
ClassDef
*
annoClassDef
=
getClassDefOfAnonymousType
();
// start a new member declaration
// start a new member declaration
///printf("startMemberItem for %s\n",name().data());
ol
.
startMemberItem
((
annoClassDef
||
annMemb
||
annEnumType
)
?
1
:
0
);
ol
.
startMemberItem
((
annoClassDef
||
annMemb
||
annEnumType
)
?
1
:
0
);
// If there is no detailed description we need to write the anchor here.
// If there is no detailed description we need to write the anchor here.
...
@@ -728,11 +738,10 @@ void MemberDef::writeDeclaration(OutputList &ol,
...
@@ -728,11 +738,10 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol
.
popGeneratorState
();
ol
.
popGeneratorState
();
}
}
//printf("member name=%s indDepth=%d\n",name().data(),indDepth);
if
(
annoClassDef
||
annMemb
)
if
(
annoClassDef
||
annMemb
)
{
{
int
j
;
int
j
;
for
(
j
=
0
;
j
<
indDepth
;
j
++
)
for
(
j
=
0
;
j
<
s_indentLevel
;
j
++
)
{
{
ol
.
writeNonBreakableSpace
(
3
);
ol
.
writeNonBreakableSpace
(
3
);
}
}
...
@@ -752,6 +761,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
...
@@ -752,6 +761,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if
(
ltype
.
left
(
7
)
==
"friend "
)
ltype
=
ltype
.
right
(
ltype
.
length
()
-
7
);
if
(
ltype
.
left
(
7
)
==
"friend "
)
ltype
=
ltype
.
right
(
ltype
.
length
()
-
7
);
static
QRegExp
r
(
"@[0-9]+"
);
static
QRegExp
r
(
"@[0-9]+"
);
bool
endAnonScopeNeeded
=
FALSE
;
int
l
,
i
=
r
.
match
(
ltype
,
0
,
&
l
);
int
l
,
i
=
r
.
match
(
ltype
,
0
,
&
l
);
if
(
i
!=-
1
)
// member has an anonymous type
if
(
i
!=-
1
)
// member has an anonymous type
{
{
...
@@ -761,10 +771,13 @@ void MemberDef::writeDeclaration(OutputList &ol,
...
@@ -761,10 +771,13 @@ void MemberDef::writeDeclaration(OutputList &ol,
if
(
annoClassDef
)
// type is an anonymous compound
if
(
annoClassDef
)
// type is an anonymous compound
{
{
int
ir
=
i
+
l
;
int
ir
=
i
+
l
;
//printf("<<<<<<<<<<<<<<\n");
ol
.
startAnonTypeScope
(
s_indentLevel
++
);
annoClassDef
->
writeDeclaration
(
ol
,
annMemb
,
inGroup
);
annoClassDef
->
writeDeclaration
(
ol
,
annMemb
,
inGroup
);
//printf(">>>>>>>>>>>>>> startMemberItem(2)\n");
ol
.
startMemberItem
(
2
);
ol
.
startMemberItem
(
2
);
int
j
;
int
j
;
for
(
j
=
0
;
j
<
indDepth
;
j
++
)
for
(
j
=
0
;
j
<
s_indentLevel
-
1
;
j
++
)
{
{
ol
.
writeNonBreakableSpace
(
3
);
ol
.
writeNonBreakableSpace
(
3
);
}
}
...
@@ -775,6 +788,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
...
@@ -775,6 +788,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
{
ol
.
docify
(
";"
);
ol
.
docify
(
";"
);
}
}
endAnonScopeNeeded
=
TRUE
;
}
}
else
else
{
{
...
@@ -900,9 +914,11 @@ void MemberDef::writeDeclaration(OutputList &ol,
...
@@ -900,9 +914,11 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol
.
endDoxyAnchor
(
cfname
,
anchor
());
ol
.
endDoxyAnchor
(
cfname
,
anchor
());
}
}
ol
.
endMemberItem
((
annoClassDef
!=
0
&&
indDepth
==
0
)
||
annEnumType
);
//printf("endMember %s annoClassDef=%p annEnumType=%p\n",
// name().data(),annoClassDef,annEnumType);
ol
.
endMemberItem
();
if
(
endAnonScopeNeeded
)
ol
.
endAnonTypeScope
(
--
s_indentLevel
);
//ol.endMemberItem(gId!=-1,gFile,gHeader,annoClassDef || annMemb);
// write brief description
// write brief description
if
(
!
briefDescription
().
isEmpty
()
&&
if
(
!
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
)
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
)
&&
...
@@ -1944,8 +1960,15 @@ void MemberDef::setArgumentList(ArgumentList *al)
...
@@ -1944,8 +1960,15 @@ void MemberDef::setArgumentList(ArgumentList *al)
if
(
defArgList
)
delete
defArgList
;
if
(
defArgList
)
delete
defArgList
;
defArgList
=
al
;
defArgList
=
al
;
}
}
void
MemberDef
::
setDeclArgumentList
(
ArgumentList
*
al
)
void
MemberDef
::
setDeclArgumentList
(
ArgumentList
*
al
)
{
{
if
(
declArgList
)
delete
declArgList
;
if
(
declArgList
)
delete
declArgList
;
declArgList
=
al
;
declArgList
=
al
;
}
}
void
MemberDef
::
findSectionsInDocumentation
()
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
}
src/memberdef.h
View file @
f3e7209f
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "qtbc.h"
#include "qtbc.h"
#include <qlist.h>
#include <qlist.h>
#include <qdict.h>
#include <qdict.h>
#include <qstack.h>
#include "entry.h"
#include "entry.h"
#include "definition.h"
#include "definition.h"
...
@@ -221,8 +222,8 @@ class MemberDef : public Definition
...
@@ -221,8 +222,8 @@ class MemberDef : public Definition
void
setFromAnonymousMember
(
MemberDef
*
m
)
{
annMemb
=
m
;
}
void
setFromAnonymousMember
(
MemberDef
*
m
)
{
annMemb
=
m
;
}
bool
fromAnonymousScope
()
const
{
return
annScope
;
}
bool
fromAnonymousScope
()
const
{
return
annScope
;
}
bool
anonymousDeclShown
()
const
{
return
annUsed
;
}
bool
anonymousDeclShown
()
const
{
return
annUsed
;
}
void
setIndentDepth
(
int
i
)
{
indDepth
=
i
;
}
//
void setIndentDepth( int i) { indDepth=i; }
int
indentDepth
()
{
return
indDepth
;
}
//
int indentDepth() { return indDepth; }
bool
visibleMemberGroup
(
bool
hideNoHeader
);
bool
visibleMemberGroup
(
bool
hideNoHeader
);
MemberDef
*
templateMaster
()
const
{
return
m_templateMaster
;
}
MemberDef
*
templateMaster
()
const
{
return
m_templateMaster
;
}
...
@@ -251,6 +252,7 @@ class MemberDef : public Definition
...
@@ -251,6 +252,7 @@ class MemberDef : public Definition
void
writeEnumDeclaration
(
OutputList
&
typeDecl
,
void
writeEnumDeclaration
(
OutputList
&
typeDecl
,
ClassDef
*
cd
,
NamespaceDef
*
nd
,
FileDef
*
fd
,
GroupDef
*
gd
);
ClassDef
*
cd
,
NamespaceDef
*
nd
,
FileDef
*
fd
,
GroupDef
*
gd
);
void
findSectionsInDocumentation
();
bool
visited
;
bool
visited
;
...
@@ -290,7 +292,7 @@ class MemberDef : public Definition
...
@@ -290,7 +292,7 @@ class MemberDef : public Definition
bool
annScope
;
// member is part of an annoymous scope
bool
annScope
;
// member is part of an annoymous scope
bool
annUsed
;
bool
annUsed
;
bool
annShown
;
bool
annShown
;
int
indDepth
;
// indentation depth for this member if inside an annonymous scope
//
int indDepth; // indentation depth for this member if inside an annonymous scope
int
maxInitLines
;
// when the initializer will be displayed
int
maxInitLines
;
// when the initializer will be displayed
int
userInitLines
;
// result of explicit \hideinitializer or \showinitializer
int
userInitLines
;
// result of explicit \hideinitializer or \showinitializer
MemberList
*
section
;
// declation list containing this member
MemberList
*
section
;
// declation list containing this member
...
@@ -323,6 +325,7 @@ class MemberDef : public Definition
...
@@ -323,6 +325,7 @@ class MemberDef : public Definition
// disable copying of member defs
// disable copying of member defs
MemberDef
(
const
MemberDef
&
);
MemberDef
(
const
MemberDef
&
);
MemberDef
&
operator
=
(
const
MemberDef
&
);
MemberDef
&
operator
=
(
const
MemberDef
&
);
static
int
s_indentLevel
;
};
};
#endif
#endif
src/membergroup.cpp
View file @
f3e7209f
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "scanner.h"
#include "scanner.h"
#include "groupdef.h"
#include "groupdef.h"
#include "doxygen.h"
#include "doxygen.h"
#include "docparser.h"
//static QCString idToName(int id)
//static QCString idToName(int id)
//{
//{
...
@@ -35,7 +36,8 @@
...
@@ -35,7 +36,8 @@
// return result;
// return result;
//}
//}
MemberGroup
::
MemberGroup
(
int
id
,
const
char
*
hdr
,
const
char
*
d
)
/* : Definition(idToName(id)) */
MemberGroup
::
MemberGroup
(
Definition
*
parent
,
int
id
,
const
char
*
hdr
,
const
char
*
d
)
/* : Definition(idToName(id)) */
{
{
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList
=
new
MemberList
;
memberList
=
new
MemberList
;
...
@@ -46,6 +48,7 @@ MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(i
...
@@ -46,6 +48,7 @@ MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(i
inSameSection
=
TRUE
;
inSameSection
=
TRUE
;
inDeclSection
=
0
;
inDeclSection
=
0
;
m_numDecMembers
=
-
1
;
m_numDecMembers
=
-
1
;
m_parent
=
parent
;
//printf("Member group docs=`%s'\n",doc.data());
//printf("Member group docs=`%s'\n",doc.data());
}
}
...
@@ -210,3 +213,10 @@ void MemberGroup::addListReferences(Definition *def)
...
@@ -210,3 +213,10 @@ void MemberGroup::addListReferences(Definition *def)
{
{
memberList
->
addListReferences
(
def
);
memberList
->
addListReferences
(
def
);
}
}
void
MemberGroup
::
findSectionsInDocumentation
()
{
docFindSections
(
doc
,
0
,
0
,
this
);
memberList
->
findSectionsInDocumentation
();
}
src/membergroup.h
View file @
f3e7209f
...
@@ -36,7 +36,7 @@ class Definition;
...
@@ -36,7 +36,7 @@ class Definition;
class
MemberGroup
class
MemberGroup
{
{
public
:
public
:
MemberGroup
(
int
id
,
const
char
*
header
,
const
char
*
docs
);
MemberGroup
(
Definition
*
parent
,
int
id
,
const
char
*
header
,
const
char
*
docs
);
~
MemberGroup
();
~
MemberGroup
();
QCString
header
()
const
{
return
grpHeader
;
}
QCString
header
()
const
{
return
grpHeader
;
}
int
groupId
()
const
{
return
grpId
;
}
int
groupId
()
const
{
return
grpId
;
}
...
@@ -54,6 +54,7 @@ class MemberGroup
...
@@ -54,6 +54,7 @@ class MemberGroup
void
addToDeclarationSection
();
void
addToDeclarationSection
();
int
countDecMembers
(
/*bool sectionPerType*/
);
int
countDecMembers
(
/*bool sectionPerType*/
);
void
distributeMemberGroupDocumentation
();
void
distributeMemberGroupDocumentation
();
void
findSectionsInDocumentation
();
int
varCount
()
const
;
int
varCount
()
const
;
int
funcCount
()
const
;
int
funcCount
()
const
;
int
enumCount
()
const
;
int
enumCount
()
const
;
...
@@ -67,6 +68,7 @@ class MemberGroup
...
@@ -67,6 +68,7 @@ class MemberGroup
void
setInGroup
(
bool
b
);
void
setInGroup
(
bool
b
);
void
addListReferences
(
Definition
*
d
);
void
addListReferences
(
Definition
*
d
);
MemberList
*
members
()
const
{
return
memberList
;
}
MemberList
*
members
()
const
{
return
memberList
;
}
Definition
*
parent
()
const
{
return
m_parent
;
}
private
:
private
:
MemberList
*
memberList
;
// list of all members in the group
MemberList
*
memberList
;
// list of all members in the group
...
@@ -78,6 +80,7 @@ class MemberGroup
...
@@ -78,6 +80,7 @@ class MemberGroup
MemberList
*
inDeclSection
;
MemberList
*
inDeclSection
;
bool
inSameSection
;
bool
inSameSection
;
int
m_numDecMembers
;
int
m_numDecMembers
;
Definition
*
m_parent
;
};
};
class
MemberGroupList
:
public
QList
<
MemberGroup
>
class
MemberGroupList
:
public
QList
<
MemberGroup
>
...
...
src/memberlist.cpp
View file @
f3e7209f
...
@@ -344,7 +344,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
...
@@ -344,7 +344,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol
.
insertMemberAlign
();
ol
.
insertMemberAlign
();
//ol+=typeDecl; // append the enum values.
//ol+=typeDecl; // append the enum values.
md
->
writeEnumDeclaration
(
ol
,
cd
,
nd
,
fd
,
gd
);
md
->
writeEnumDeclaration
(
ol
,
cd
,
nd
,
fd
,
gd
);
ol
.
endMemberItem
(
FALSE
);
ol
.
endMemberItem
();
if
(
!
md
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
if
(
!
md
->
briefDescription
().
isEmpty
()
&&
Config_getBool
(
"BRIEF_MEMBER_DESC"
))
{
{
ol
.
startMemberDescription
();
ol
.
startMemberDescription
();
...
@@ -537,6 +537,25 @@ void MemberList::addListReferences(Definition *def)
...
@@ -537,6 +537,25 @@ void MemberList::addListReferences(Definition *def)
}
}
}
}
void
MemberList
::
findSectionsInDocumentation
()
{
MemberListIterator
mli
(
*
this
);
MemberDef
*
md
;
for
(
;
(
md
=
mli
.
current
())
;
++
mli
)
{
md
->
findSectionsInDocumentation
();
}
if
(
memberGroupList
)
{
MemberGroupListIterator
mgli
(
*
memberGroupList
);
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
mg
->
findSectionsInDocumentation
();
}
}
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
int
MemberSDict
::
compareItems
(
GCI
item1
,
GCI
item2
)
int
MemberSDict
::
compareItems
(
GCI
item1
,
GCI
item2
)
...
...
src/memberlist.h
View file @
f3e7209f
...
@@ -57,6 +57,7 @@ class MemberList : public QList<MemberDef>
...
@@ -57,6 +57,7 @@ class MemberList : public QList<MemberDef>
void
addMemberGroup
(
MemberGroup
*
mg
);
void
addMemberGroup
(
MemberGroup
*
mg
);
void
setInGroup
(
bool
group
)
{
m_inGroup
=
group
;
}
void
setInGroup
(
bool
group
)
{
m_inGroup
=
group
;
}
void
addListReferences
(
Definition
*
def
);
void
addListReferences
(
Definition
*
def
);
void
findSectionsInDocumentation
();
private
:
private
:
int
m_varCnt
,
m_funcCnt
,
m_enumCnt
,
m_enumValCnt
,
m_typeCnt
;
int
m_varCnt
,
m_funcCnt
,
m_enumCnt
,
m_enumValCnt
,
m_typeCnt
;
...
...
src/namespacedef.cpp
View file @
f3e7209f
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "memberlist.h"
#include "memberlist.h"
#include "doxygen.h"
#include "doxygen.h"
#include "message.h"
#include "message.h"
#include "docparser.h"
NamespaceDef
::
NamespaceDef
(
const
char
*
df
,
int
dl
,
NamespaceDef
::
NamespaceDef
(
const
char
*
df
,
int
dl
,
const
char
*
name
,
const
char
*
lref
)
:
const
char
*
name
,
const
char
*
lref
)
:
...
@@ -61,6 +62,24 @@ void NamespaceDef::distributeMemberGroupDocumentation()
...
@@ -61,6 +62,24 @@ void NamespaceDef::distributeMemberGroupDocumentation()
mg
->
distributeMemberGroupDocumentation
();
mg
->
distributeMemberGroupDocumentation
();
}
}
}
}
void
NamespaceDef
::
findSectionsInDocumentation
()
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
{
mg
->
findSectionsInDocumentation
();
}
decDefineMembers
.
findSectionsInDocumentation
();
decProtoMembers
.
findSectionsInDocumentation
();
decTypedefMembers
.
findSectionsInDocumentation
();
decEnumMembers
.
findSectionsInDocumentation
();
decFuncMembers
.
findSectionsInDocumentation
();
decVarMembers
.
findSectionsInDocumentation
();
}
void
NamespaceDef
::
insertUsedFile
(
const
char
*
f
)
void
NamespaceDef
::
insertUsedFile
(
const
char
*
f
)
{
{
if
(
files
.
find
(
f
)
==-
1
)
if
(
files
.
find
(
f
)
==-
1
)
...
...
src/namespacedef.h
View file @
f3e7209f
...
@@ -72,6 +72,7 @@ class NamespaceDef : public Definition
...
@@ -72,6 +72,7 @@ class NamespaceDef : public Definition
}
}
void
addMembersToMemberGroup
();
void
addMembersToMemberGroup
();
void
distributeMemberGroupDocumentation
();
void
distributeMemberGroupDocumentation
();
void
findSectionsInDocumentation
();
virtual
Definition
*
findInnerCompound
(
const
char
*
name
);
virtual
Definition
*
findInnerCompound
(
const
char
*
name
);
void
addInnerCompound
(
Definition
*
d
);
void
addInnerCompound
(
Definition
*
d
);
...
...
src/outputgen.h
View file @
f3e7209f
...
@@ -302,8 +302,10 @@ class OutputGenerator : public BaseOutputDocInterface
...
@@ -302,8 +302,10 @@ class OutputGenerator : public BaseOutputDocInterface
virtual
void
endMemberSubtitle
()
=
0
;
virtual
void
endMemberSubtitle
()
=
0
;
virtual
void
startMemberList
()
=
0
;
virtual
void
startMemberList
()
=
0
;
virtual
void
endMemberList
()
=
0
;
virtual
void
endMemberList
()
=
0
;
virtual
void
startAnonTypeScope
(
int
)
=
0
;
virtual
void
endAnonTypeScope
(
int
)
=
0
;
virtual
void
startMemberItem
(
int
)
=
0
;
virtual
void
startMemberItem
(
int
)
=
0
;
virtual
void
endMemberItem
(
bool
)
=
0
;
virtual
void
endMemberItem
()
=
0
;
virtual
void
startMemberGroupHeader
(
bool
)
=
0
;
virtual
void
startMemberGroupHeader
(
bool
)
=
0
;
virtual
void
endMemberGroupHeader
()
=
0
;
virtual
void
endMemberGroupHeader
()
=
0
;
virtual
void
startMemberGroupDocs
()
=
0
;
virtual
void
startMemberGroupDocs
()
=
0
;
...
...
src/outputlist.h
View file @
f3e7209f
...
@@ -161,10 +161,14 @@ class OutputList : public OutputDocInterface
...
@@ -161,10 +161,14 @@ class OutputList : public OutputDocInterface
{
forall
(
&
OutputGenerator
::
startMemberList
);
}
{
forall
(
&
OutputGenerator
::
startMemberList
);
}
void
endMemberList
()
void
endMemberList
()
{
forall
(
&
OutputGenerator
::
endMemberList
);
}
{
forall
(
&
OutputGenerator
::
endMemberList
);
}
void
startAnonTypeScope
(
int
i1
)
{
forall
(
&
OutputGenerator
::
startAnonTypeScope
,
i1
);
}
void
endAnonTypeScope
(
int
i1
)
{
forall
(
&
OutputGenerator
::
endAnonTypeScope
,
i1
);
}
void
startMemberItem
(
int
i1
)
void
startMemberItem
(
int
i1
)
{
forall
(
&
OutputGenerator
::
startMemberItem
,
i1
);
}
{
forall
(
&
OutputGenerator
::
startMemberItem
,
i1
);
}
void
endMemberItem
(
bool
b2
)
void
endMemberItem
()
{
forall
(
&
OutputGenerator
::
endMemberItem
,
b2
);
}
{
forall
(
&
OutputGenerator
::
endMemberItem
);
}
void
startMemberGroupHeader
(
bool
b
)
void
startMemberGroupHeader
(
bool
b
)
{
forall
(
&
OutputGenerator
::
startMemberGroupHeader
,
b
);
}
{
forall
(
&
OutputGenerator
::
startMemberGroupHeader
,
b
);
}
void
endMemberGroupHeader
()
void
endMemberGroupHeader
()
...
...
src/page.h
View file @
f3e7209f
...
@@ -17,8 +17,10 @@
...
@@ -17,8 +17,10 @@
#include "sortdict.h"
#include "sortdict.h"
#include "config.h"
#include "config.h"
#include "docparser.h"
#include "section.h"
#include "section.h"
#include "doxygen.h"
class
PageInfo
class
PageInfo
{
{
...
@@ -76,6 +78,10 @@ class PageInfo
...
@@ -76,6 +78,10 @@ class PageInfo
}
}
}
}
}
}
void
findSectionsInDocumentation
()
{
docFindSections
(
doc
,
this
,
0
,
0
);
}
void
writeDocAnchorsToTagFile
()
void
writeDocAnchorsToTagFile
()
{
{
...
...
src/rtfdocvisitor.cpp
View file @
f3e7209f
...
@@ -202,6 +202,7 @@ void RTFDocVisitor::visit(DocURL *u)
...
@@ -202,6 +202,7 @@ void RTFDocVisitor::visit(DocURL *u)
m_t
<<
"{
\\
field "
m_t
<<
"{
\\
field "
"{
\\
*
\\
fldinst "
"{
\\
*
\\
fldinst "
"{ HYPERLINK
\\\\
l
\"
"
;
"{ HYPERLINK
\\\\
l
\"
"
;
if
(
u
->
isEmail
())
m_t
<<
"mailto:"
;
m_t
<<
u
->
url
();
m_t
<<
u
->
url
();
m_t
<<
"
\"
}"
m_t
<<
"
\"
}"
"{}"
;
"{}"
;
...
...
src/rtfgen.cpp
View file @
f3e7209f
...
@@ -1722,7 +1722,7 @@ void RTFGenerator::startMemberItem(int)
...
@@ -1722,7 +1722,7 @@ void RTFGenerator::startMemberItem(int)
t
<<
rtf_Style_Reset
<<
rtf_BList_DepthStyle
()
<<
endl
;
// set style to apropriate depth
t
<<
rtf_Style_Reset
<<
rtf_BList_DepthStyle
()
<<
endl
;
// set style to apropriate depth
}
}
void
RTFGenerator
::
endMemberItem
(
bool
)
void
RTFGenerator
::
endMemberItem
()
{
{
DBG_RTF
(
t
<<
"{
\\
comment endMemberItem }"
<<
endl
)
DBG_RTF
(
t
<<
"{
\\
comment endMemberItem }"
<<
endl
)
newParagraph
();
newParagraph
();
...
...
src/rtfgen.h
View file @
f3e7209f
...
@@ -103,8 +103,10 @@ class RTFGenerator : public OutputGenerator
...
@@ -103,8 +103,10 @@ class RTFGenerator : public OutputGenerator
void
endMemberSubtitle
();
void
endMemberSubtitle
();
void
startMemberList
();
void
startMemberList
();
void
endMemberList
();
void
endMemberList
();
void
startAnonTypeScope
(
int
)
{}
void
endAnonTypeScope
(
int
)
{}
void
startMemberItem
(
int
);
void
startMemberItem
(
int
);
void
endMemberItem
(
bool
);
void
endMemberItem
();
//void memberGroupSpacing(bool) {}
//void memberGroupSpacing(bool) {}
//void memberGroupSeparator() {}
//void memberGroupSeparator() {}
void
insertMemberAlign
()
{}
void
insertMemberAlign
()
{}
...
...
src/scanner.l
View file @
f3e7209f
This diff is collapsed.
Click to expand it.
src/section.h
View file @
f3e7209f
...
@@ -29,9 +29,15 @@ class PageInfo;
...
@@ -29,9 +29,15 @@ class PageInfo;
struct
SectionInfo
struct
SectionInfo
{
{
enum
SectionType
{
Page
,
Section
,
Subsection
,
Subsubsection
,
Paragraph
,
Anchor
};
enum
SectionType
{
Page
,
Section
,
Subsection
,
SectionInfo
(
const
char
*
l
,
const
char
*
t
,
SectionType
st
,
const
char
*
r
=
0
)
Subsubsection
,
Paragraph
,
Anchor
{
label
=
l
;
title
=
t
;
type
=
st
;
ref
=
r
;
definition
=
0
;
pageRef
=
0
;
generated
=
FALSE
;
}
};
SectionInfo
(
const
char
*
f
,
const
char
*
l
,
const
char
*
t
,
SectionType
st
,
const
char
*
r
=
0
)
{
label
=
l
;
title
=
t
;
type
=
st
;
ref
=
r
;
definition
=
0
;
pageRef
=
0
;
generated
=
FALSE
;
fileName
=
f
;
}
~
SectionInfo
()
{}
~
SectionInfo
()
{}
QCString
label
;
QCString
label
;
QCString
title
;
QCString
title
;
...
...
src/tagreader.cpp
View file @
f3e7209f
...
@@ -857,27 +857,9 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
...
@@ -857,27 +857,9 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
while
(
s
)
while
(
s
)
{
{
QCString
*
anchorName
=
new
QCString
(
s
);
QCString
*
anchorName
=
new
QCString
(
s
);
//if (anchorName->left(5)=="_todo")
//{
// int todoItemId = todoList.addRefItem();
// char anchorLabel[12];
// sprintf(anchorLabel,"_todo%06d",todoItemId);
// RefItem *item = todoList.getRefItem(todoItemId);
// item->listAnchor = anchorLabel;
//}
//else if (anchorName->left(5)=="_test")
//{
// int testItemId = testList.addRefItem();
// char anchorLabel[12];
// sprintf(anchorLabel,"_test%06d",testItemId);
// RefItem *item = testList.getRefItem(testItemId);
// item->listAnchor = anchorLabel;
//}
//else
//{
if
(
Doxygen
::
sectionDict
.
find
(
*
anchorName
)
==
0
)
if
(
Doxygen
::
sectionDict
.
find
(
*
anchorName
)
==
0
)
{
{
SectionInfo
*
si
=
new
SectionInfo
(
*
anchorName
,
*
anchorName
,
SectionInfo
*
si
=
new
SectionInfo
(
e
->
fileName
,
*
anchorName
,
*
anchorName
,
SectionInfo
::
Anchor
,
m_tagName
);
SectionInfo
::
Anchor
,
m_tagName
);
Doxygen
::
sectionDict
.
insert
(
*
anchorName
,
si
);
Doxygen
::
sectionDict
.
insert
(
*
anchorName
,
si
);
e
->
anchors
->
append
(
anchorName
);
e
->
anchors
->
append
(
anchorName
);
...
@@ -886,7 +868,6 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
...
@@ -886,7 +868,6 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
{
{
err
(
"Duplicate anchor %s found
\n
"
,
anchorName
->
data
());
err
(
"Duplicate anchor %s found
\n
"
,
anchorName
->
data
());
}
}
//}
s
=
l
.
next
();
s
=
l
.
next
();
}
}
}
}
...
...
src/translator_de.h
View file @
f3e7209f
This diff is collapsed.
Click to expand it.
src/util.cpp
View file @
f3e7209f
...
@@ -657,9 +657,10 @@ QCString removeRedundantWhiteSpace(const QCString &s)
...
@@ -657,9 +657,10 @@ QCString removeRedundantWhiteSpace(const QCString &s)
result
+=
", "
;
result
+=
", "
;
}
}
else
if
(
i
>
0
&&
else
if
(
i
>
0
&&
(
isId
(
s
.
at
(
i
))
&&
s
.
at
(
i
-
1
)
==
')'
)
||
(
(
isId
(
s
.
at
(
i
))
&&
s
.
at
(
i
-
1
)
==
')'
)
||
(
s
.
at
(
i
)
==
'\''
&&
s
.
at
(
i
-
1
)
==
' '
)
(
s
.
at
(
i
)
==
'\''
&&
s
.
at
(
i
-
1
)
==
' '
)
)
)
)
{
{
result
+=
' '
;
result
+=
' '
;
result
+=
s
.
at
(
i
);
result
+=
s
.
at
(
i
);
...
@@ -670,7 +671,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
...
@@ -670,7 +671,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
csp
=
0
;
csp
=
0
;
}
}
else
if
(
!
isspace
(
c
)
||
else
if
(
!
isspace
(
c
)
||
(
i
!=
0
&&
i
!=
l
-
1
&&
(
i
>
0
&&
i
<
l
-
1
&&
(
isId
(
s
.
at
(
i
-
1
))
||
s
.
at
(
i
-
1
)
==
')'
||
s
.
at
(
i
-
1
)
==
','
||
s
.
at
(
i
-
1
)
==
'>'
||
s
.
at
(
i
-
1
)
==
']'
)
&&
(
isId
(
s
.
at
(
i
-
1
))
||
s
.
at
(
i
-
1
)
==
')'
||
s
.
at
(
i
-
1
)
==
','
||
s
.
at
(
i
-
1
)
==
'>'
||
s
.
at
(
i
-
1
)
==
']'
)
&&
isId
(
s
.
at
(
i
+
1
))
isId
(
s
.
at
(
i
+
1
))
)
)
...
@@ -3157,7 +3158,7 @@ void addMembersToMemberGroup(MemberList *ml,
...
@@ -3157,7 +3158,7 @@ void addMembersToMemberGroup(MemberList *ml,
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
if
(
mg
==
0
)
if
(
mg
==
0
)
{
{
mg
=
new
MemberGroup
(
groupId
,
*
pGrpHeader
,
pDocs
?
pDocs
->
data
()
:
0
);
mg
=
new
MemberGroup
(
context
,
groupId
,
*
pGrpHeader
,
pDocs
?
pDocs
->
data
()
:
0
);
memberGroupSDict
->
append
(
groupId
,
mg
);
memberGroupSDict
->
append
(
groupId
,
mg
);
}
}
mg
->
insertMember
(
context
,
fmd
);
// insert in member group
mg
->
insertMember
(
context
,
fmd
);
// insert in member group
...
@@ -3178,7 +3179,7 @@ void addMembersToMemberGroup(MemberList *ml,
...
@@ -3178,7 +3179,7 @@ void addMembersToMemberGroup(MemberList *ml,
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
if
(
mg
==
0
)
if
(
mg
==
0
)
{
{
mg
=
new
MemberGroup
(
groupId
,
*
pGrpHeader
,
pDocs
?
pDocs
->
data
()
:
0
);
mg
=
new
MemberGroup
(
context
,
groupId
,
*
pGrpHeader
,
pDocs
?
pDocs
->
data
()
:
0
);
memberGroupSDict
->
append
(
groupId
,
mg
);
memberGroupSDict
->
append
(
groupId
,
mg
);
}
}
md
=
ml
->
take
(
index
);
// remove from member list
md
=
ml
->
take
(
index
);
// remove from member list
...
@@ -3551,20 +3552,21 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
...
@@ -3551,20 +3552,21 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
//outputList->writeTitle(pi->name,pi->title);
//outputList->writeTitle(pi->name,pi->title);
// a page name is a label as well!
// a page name is a label as well!
SectionInfo
*
si
=
new
SectionInfo
(
QCString
file
;
pi
->
name
,
pi
->
title
,
SectionInfo
::
Page
,
pi
->
reference
);
if
(
gd
)
if
(
gd
)
{
{
si
->
fileNam
e
=
gd
->
getOutputFileBase
();
fil
e
=
gd
->
getOutputFileBase
();
}
}
else
if
(
pi
->
getGroupDef
())
else
if
(
pi
->
getGroupDef
())
{
{
si
->
fileNam
e
=
pi
->
getGroupDef
()
->
getOutputFileBase
().
copy
();
fil
e
=
pi
->
getGroupDef
()
->
getOutputFileBase
().
copy
();
}
}
else
else
{
{
si
->
fileNam
e
=
pageName
;
fil
e
=
pageName
;
}
}
SectionInfo
*
si
=
new
SectionInfo
(
file
,
pi
->
name
,
pi
->
title
,
SectionInfo
::
Page
,
pi
->
reference
);
//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());
...
...
src/xmldocvisitor.cpp
View file @
f3e7209f
...
@@ -95,7 +95,9 @@ void XmlDocVisitor::visit(DocSymbol *s)
...
@@ -95,7 +95,9 @@ void XmlDocVisitor::visit(DocSymbol *s)
void
XmlDocVisitor
::
visit
(
DocURL
*
u
)
void
XmlDocVisitor
::
visit
(
DocURL
*
u
)
{
{
if
(
m_hide
)
return
;
if
(
m_hide
)
return
;
m_t
<<
"<ulink url=
\"
"
<<
u
->
url
()
<<
"
\"
>"
;
m_t
<<
"<ulink url=
\"
"
;
if
(
u
->
isEmail
())
m_t
<<
"mailto:"
;
m_t
<<
u
->
url
()
<<
"
\"
>"
;
filter
(
u
->
url
());
filter
(
u
->
url
());
m_t
<<
"</ulink>"
;
m_t
<<
"</ulink>"
;
}
}
...
...
src/xmlgen.cpp
View file @
f3e7209f
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include "version.h"
#include "version.h"
#include "xmldocvisitor.h"
#include "xmldocvisitor.h"
#include "docparser.h"
#include "docparser.h"
#include "language.h"
#include <qdir.h>
#include <qdir.h>
#include <qfile.h>
#include <qfile.h>
...
@@ -56,7 +57,8 @@ static void writeXMLHeader(QTextStream &t)
...
@@ -56,7 +57,8 @@ static void writeXMLHeader(QTextStream &t)
{
{
QCString
dtdName
=
Config_getString
(
"XML_DTD"
);
QCString
dtdName
=
Config_getString
(
"XML_DTD"
);
QCString
schemaName
=
Config_getString
(
"XML_SCHEMA"
);
QCString
schemaName
=
Config_getString
(
"XML_SCHEMA"
);
t
<<
"<?xml version='1.0' encoding='ISO-8859-1' standalone='"
;
t
<<
"<?xml version='1.0' encoding='"
<<
theTranslator
->
idLanguageCharset
()
<<
"' standalone='"
;
if
(
dtdName
.
isEmpty
()
&&
schemaName
.
isEmpty
())
t
<<
"yes"
;
else
t
<<
"no"
;
if
(
dtdName
.
isEmpty
()
&&
schemaName
.
isEmpty
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"'?>"
<<
endl
;
t
<<
"'?>"
<<
endl
;
if
(
!
dtdName
.
isEmpty
())
if
(
!
dtdName
.
isEmpty
())
...
@@ -789,6 +791,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
...
@@ -789,6 +791,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
return
;
return
;
}
}
QTextStream
t
(
&
f
);
QTextStream
t
(
&
f
);
t
.
setEncoding
(
QTextStream
::
Latin1
);
writeXMLHeader
(
t
);
writeXMLHeader
(
t
);
t
<<
" <compounddef id=
\"
"
t
<<
" <compounddef id=
\"
"
...
@@ -975,6 +978,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
...
@@ -975,6 +978,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
return
;
return
;
}
}
QTextStream
t
(
&
f
);
QTextStream
t
(
&
f
);
t
.
setEncoding
(
QTextStream
::
Latin1
);
writeXMLHeader
(
t
);
writeXMLHeader
(
t
);
t
<<
" <compounddef id=
\"
"
t
<<
" <compounddef id=
\"
"
...
@@ -1065,6 +1069,7 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
...
@@ -1065,6 +1069,7 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
return
;
return
;
}
}
QTextStream
t
(
&
f
);
QTextStream
t
(
&
f
);
t
.
setEncoding
(
QTextStream
::
Latin1
);
writeXMLHeader
(
t
);
writeXMLHeader
(
t
);
t
<<
" <compounddef id=
\"
"
t
<<
" <compounddef id=
\"
"
...
@@ -1198,6 +1203,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
...
@@ -1198,6 +1203,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
}
}
QTextStream
t
(
&
f
);
QTextStream
t
(
&
f
);
t
.
setEncoding
(
QTextStream
::
Latin1
);
writeXMLHeader
(
t
);
writeXMLHeader
(
t
);
t
<<
" <compounddef id=
\"
"
t
<<
" <compounddef id=
\"
"
<<
gd
->
getOutputFileBase
()
<<
"
\"
kind=
\"
group
\"
>"
<<
endl
;
<<
gd
->
getOutputFileBase
()
<<
"
\"
kind=
\"
group
\"
>"
<<
endl
;
...
@@ -1312,6 +1318,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti)
...
@@ -1312,6 +1318,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti)
}
}
QTextStream
t
(
&
f
);
QTextStream
t
(
&
f
);
t
.
setEncoding
(
QTextStream
::
Latin1
);
writeXMLHeader
(
t
);
writeXMLHeader
(
t
);
t
<<
" <compounddef id=
\"
"
<<
pageName
;
t
<<
" <compounddef id=
\"
"
<<
pageName
;
t
<<
"
\"
kind=
\"
page
\"
>"
<<
endl
;
t
<<
"
\"
kind=
\"
page
\"
>"
<<
endl
;
...
@@ -1393,6 +1400,7 @@ void generateXML()
...
@@ -1393,6 +1400,7 @@ void generateXML()
return
;
return
;
}
}
QTextStream
t
(
&
f
);
QTextStream
t
(
&
f
);
t
.
setEncoding
(
QTextStream
::
Latin1
);
writeXMLHeader
(
t
);
writeXMLHeader
(
t
);
ClassSDict
::
Iterator
cli
(
Doxygen
::
classSDict
);
ClassSDict
::
Iterator
cli
(
Doxygen
::
classSDict
);
ClassDef
*
cd
;
ClassDef
*
cd
;
...
...
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