Commit d8197176 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.1.4

parent 3e33c509
DOXYGEN Version 1.1.3-20000528
DOXYGEN Version 1.1.4
CONTENTS
--------
......@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.3-20000528.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.3-20000528.src.tar # unpack it
gunzip doxygen-1.1.4.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.4.src.tar # unpack it
2. Run the configure script:
......@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (28 May 2000)
Dimitri van Heesch (04 June 2000)
DOXYGEN Version 1.1.3-20000528
DOXYGEN Version 1.1.4
Please read INSTALL for compilation instructions.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (28 May 2000)
Dimitri van Heesch (04 June 2000)
1.1.3-20000528
1.1.4
The configgen tool is used to:
- generate the parser for the configuration file based on
the templates config_templ.h and config_templ.l
- generate the GUI frontend "doxywizard" for creating a configuration
file based on the templates doxywizard_templ.h and doxywizard_templ.cpp
If you want to add a new configuration option to doxygen,
then you should add a new entry the init() function in configgen.cpp
After that you can do a "make install" in this directory to update
the config.l and config.h in doxygen's source directory.
-Dimitri
......@@ -622,6 +622,39 @@ void checkConfig()
#endif
s=Config::includePath.next();
}
// check dot path
if (!Config::dotPath.isEmpty())
{
if (Config::dotPath.find('\\')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='\\')
{
Config::dotPath+='\\';
}
}
else if (Config::dotPath.find('/')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='/')
{
Config::dotPath+='/';
}
}
#if defined(_WIN32)
QFileInfo dp(Config::dotPath+"dot.exe");
#else
QFileInfo dp(Config::dotPath+"dot");
#endif
if (!dp.exists() || !dp.isFile())
{
err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data());
}
}
else // make sure the string is empty but not null!
{
Config::dotPath="";
}
// check input
if (Config::inputSources.count()==0)
{
......@@ -646,13 +679,13 @@ void checkConfig()
// add default pattern if needed
if (Config::filePatternList.isEmpty())
{
Config::filePatternList="*";
Config::filePatternList.append("*");
}
// add default pattern if needed
if (Config::examplePatternList.isEmpty())
{
Config::examplePatternList="*";
Config::examplePatternList.append("*");
}
// add default pattern if needed
......@@ -676,18 +709,23 @@ void checkConfig()
err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1);
}
else if (Config::cgiURL.left(7)!="http://")
else if (Config::cgiURL.left(7)!="http://" &&
Config::cgiURL.left(8)!="https://"
)
{
err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http://).\n");
"start with http:// or https://).\n");
exit(1);
}
// check documentation URL
if (Config::docURL.isEmpty())
{
Config::docURL = Config::outputDir.copy().prepend("file://")+"html";
Config::docURL = Config::outputDir.copy().prepend("file://").append("html");
}
else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
else if (Config::docURL.left(7)!="http://" &&
Config::docURL.left(8)!="https://" &&
Config::docURL.left(7)!="file://"
)
{
err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n");
......
......@@ -1486,6 +1486,15 @@ void init()
"will graphical hierarchy of all classes instead of a textual one. \n"
);
addDependency("gfxHierarchyFlag","haveDotFlag");
ConfigString::add("dotPath",
"DOT_PATH",
"",
"path to the dot tool",
"This tag can be used to specify the path where the dot tool can be found. \n"
"If left blank, it is assumed the dot tool can be found on the path. \n",
ConfigString::Dir
);
addDependency("dotPath","haveDotFlag");
//-----------------------------------------------------------------------------------------------
ConfigInfo::add( "Search","Configuration::addtions related to the search engine ");
......@@ -1555,12 +1564,4 @@ void init()
addDependency("extDocPathList","searchEngineFlag");
// The IMAGE_PATTERNS tag is now officially obsolete.
//-----------------------------------------------------------------------------------------------
//ConfigInfo::add("not used");
//-----------------------------------------------------------------------------------------------
//ConfigList::add("imagePatternList",
// "IMAGE_PATTERNS",
// "",
// "list of image paths",
// "dont know\n");
}
......@@ -74,6 +74,7 @@ documentation:
<li> \refitem cmdfbrclose \f]
<li> \refitem cmdfile \file
<li> \refitem cmdfn \fn
<li> \refitem cmdhideinitializer \hideinitializer
<li> \refitem cmdhtmlonly \htmlonly
<li> \refitem cmdif \if
<li> \refitem cmdimage \image
......@@ -100,11 +101,13 @@ documentation:
<li> \refitem cmdretval \retval
<li> \refitem cmdsa \sa
<li> \refitem cmdsection \section
<li> \refitem cmdshowinitializer \showinitializer
<li> \refitem cmdskip \skip
<li> \refitem cmdskipline \skipline
<li> \refitem cmdstruct \struct
<li> \refitem cmdsubsection \subsection
<li> \refitem cmdthrow \throw
<li> \refitem cmdtodo \todo
<li> \refitem cmdtypedef \typedef
<li> \refitem cmdunion \union
<li> \refitem cmduntil \until
......@@ -300,6 +303,17 @@ Doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdvar "\\var" and \ref cmdtypedef "\\typedef".
<hr>
\subsection cmdhideinitializer \hideinitializer
\addindex \hideinitializer
By default the value of a define and the initializer of a variable
are displayed unless they are longer than 30 lines. By putting
this command in a comment block of a define or variable, the
initializer always hidden.
\sa section \ref cmdshowinitializer "\\showinitializer".
<hr>
\subsection cmdingroup \ingroup (<groupname> [<groupname> <groupname>])
......@@ -452,6 +466,17 @@ Public/Protected/Private/... section.
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
<hr>
\subsection cmdshowinitializer \showinitializer
\addindex \showinitializer
By default the value of a define and the initializer of a variable
are only displayed if they are less than 30 lines long. By putting
this command in a comment block of a define or variable, the
initializer is shown unconditionally.
\sa section \ref cmdhideinitializer "\\hideinitializer".
<hr>
\subsection cmdstruct \struct <name> [<header-file>] [<header-name>]
......@@ -757,6 +782,13 @@ Public/Protected/Private/... section.
\par Note:
the tag \\throws is a synonym for this tag.
<hr>
\subsection cmdtodo \todo ( one line todo description )
\addindex \todo
Adds a TODO item to the documentation. The item will also be added
to a TODO list. Both instances of the item will be cross-referenced.
<hr>
\subsection cmdversion \version { version number }
......
......@@ -137,6 +137,8 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_tagfiles TAGFILES
<li> \refitem cfg_verbatim_headers VERBATIM_HEADERS
<li> \refitem cfg_warnings WARNINGS
<li> \refitem cfg_warn_format WARN_FORMAT
<li> \refitem cfg_warn_if_undocumented WARN_IF_UNDOCUMENTED
\htmlonly
</ul>
</multicol>
......@@ -182,23 +184,6 @@ followed by the descriptions of the tags grouped by category.
The default language is English, other supported languages are:
Dutch, French, Italian, Czech, Swedish, German and Japanese.
\anchor cfg_quiet
<dt>\c QUIET <dd>
\addindex QUIET
The \c QUIET tag can be used to turn on/off the messages that are generated
to standard output by doxygen. Possible values are \c YES and \c NO,
where \c YES implies that the messages are off.
If left blank \c NO is used.
\anchor cfg_warnings
<dt>\c WARNINGS <dd>
\addindex WARNINGS
The \c WARNINGS tag can be used to turn on/off the warning messages that are
generated to standard error by doxygen. Possible values are \c YES and \c NO,
where \c YES implies that the warnings are on. If left blank \c NO is used.
\b Tip: Turn warnings on while writing the documentation.
\anchor cfg_disable_index
<dt>\c DISABLE_INDEX <dd>
\addindex DISABLE_INDEX
......@@ -248,14 +233,6 @@ followed by the descriptions of the tags grouped by category.
the file and class documentation (similar to JavaDoc).
Set to NO to disable this.
\anchor cfg_internal_docs
<dt>\c INTERNAL_DOCS <dd>
\addindex INTERNAL_DOCS
The \c INTERNAL_DOCS tag determines if documentation
that is typed after a \\internal command is included. If the tag is set
to \c NO (the default) then the documentation will be excluded.
Set it to \c YES to include the internal documentation.
\anchor cfg_repeat_brief
<dt>\c REPEAT_BRIEF <dd>
\addindex REPEAT_BRIEF
......@@ -288,6 +265,14 @@ followed by the descriptions of the tags grouped by category.
only done if one of the specified strings matches the left-hand part of the
path.
\anchor cfg_internal_docs
<dt>\c INTERNAL_DOCS <dd>
\addindex INTERNAL_DOCS
The \c INTERNAL_DOCS tag determines if documentation
that is typed after a \\internal command is included. If the tag is set
to \c NO (the default) then the documentation will be excluded.
Set it to \c YES to include the internal documentation.
\anchor cfg_class_diagrams
<dt>\c CLASS_DIAGRAMS <dd>
\addindex CLASS_DIAGRAMS
......@@ -382,6 +367,43 @@ followed by the descriptions of the tags grouped by category.
</dl>
\subsection messages_input Options related to warning and progress messages
\anchor cfg_quiet
<dl>
<dt>\c QUIET <dd>
\addindex QUIET
The \c QUIET tag can be used to turn on/off the messages that are generated
to standard output by doxygen. Possible values are \c YES and \c NO,
where \c YES implies that the messages are off.
If left blank \c NO is used.
\anchor cfg_warnings
<dt>\c WARNINGS <dd>
\addindex WARNINGS
The \c WARNINGS tag can be used to turn on/off the warning messages that are
generated to standard error by doxygen. Possible values are \c YES and \c NO,
where \c YES implies that the warnings are on. If left blank \c NO is used.
\b Tip: Turn warnings on while writing the documentation.
\anchor cfg_warn_if_undocumented
<dt>\c WARN_IF_UNDOCUMENTED <dd>
\addindex WARN_IF_UNDOCUMENTED
If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
for undocumented members. If EXTRACT_ALL is set to YES then this flag will
automatically be disabled.
\anchor cfg_warn_format
<dt>\c WARN_FORMAT <dd>
\addindex WARN_FORMAT
The WARN_FORMAT tag determines the format of the warning messages that
doxygen can produce. The string should contain the $file, $line, and $text
tags, which will be replaced by the file and line number from which the
warning originated and the warning text.
</dl>
\subsection config_input Input related options
\anchor cfg_input
<dl>
......@@ -464,6 +486,33 @@ followed by the descriptions of the tags grouped by category.
</dl>
\subsection alphabetical_index Alphabetical index options
\anchor cfg_alphabetical_index
<dl>
<dt>\c ALPHABETICAL_INDEX <dd>
\addindex ALPHABETICAL_INDEX
If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index
of all compounds will be generated. Enable this if the project contains
a lot of classes, structs, unions or interfaces.
\anchor cfg_cols_in_alpha_index
<dt>\c COLS_IN_ALPHA_INDEX <dd>
\addindex COLS_IN_ALPHA_INDEX
If the alphabetical index is enabled
(see \c ALPHABETICAL_INDEX) then the \c COLS_IN_ALPHA_INDEX tag can be
used to specify the number of columns in which this list will be split (can be a number in the range [1..20])
\anchor cfg_ignore_prefix
<dt>\c IGNORE_PREFIX <dd>
\addindex IGNORE_PREFIX
In case all classes in a project start with a common prefix, all classes will
be put under the same header in the alphabetical index.
The \c IGNORE_PREFIX tag can be used to specify a prefix
(or a list of prefixes) that should be ignored while generating the index
headers.
</dl>
\subsection html_output HTML related options
\anchor cfg_generate_html
<dl>
......@@ -595,33 +644,6 @@ FONT.charliteral { color: #008080 }
(which basically renders \c doxysearch obsolete on Windows).
The HTML workshop also contains a viewer for compressed HTML files.
</dl>
\subsection alphabetical_index Alphabetical index options
\anchor cfg_alphabetical_index
<dl>
<dt>\c ALPHABETICAL_INDEX <dd>
\addindex ALPHABETICAL_INDEX
If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index
of all compounds will be generated. Enable this if the project contains
a lot of classes, structs, unions or interfaces.
\anchor cfg_cols_in_alpha_index
<dt>\c COLS_IN_ALPHA_INDEX <dd>
\addindex COLS_IN_ALPHA_INDEX
If the alphabetical index is enabled
(see \c ALPHABETICAL_INDEX) then the \c COLS_IN_ALPHA_INDEX tag can be
used to specify the number of columns in which this list will be split (can be a number in the range [1..20])
\anchor cfg_ignore_prefix
<dt>\c IGNORE_PREFIX <dd>
\addindex IGNORE_PREFIX
In case all classes in a project start with a common prefix, all classes will
be put under the same header in the alphabetical index.
The \c IGNORE_PREFIX tag can be used to specify a prefix
(or a list of prefixes) that should be ignored while generating the index
headers.
</dl>
\subsection latex_output LaTeX related options
\anchor cfg_generate_latex
......@@ -940,6 +962,12 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
If the \c GRAPHICAL_HIERARCHY and \c HAVE_DOT tags are set to \c YES then
doxygen will graphical hierarchy of all classes instead of a textual one.
\anchor cfg_dot_path
<dt>\c DOT_PATH <dd>
\addindex DOT_PATH
This tag can be used to specify the path where the dot tool can be found.
If left blank, it is assumed the dot tool can be found on the path.
</dl>
\subsection config_search Search engine options
\anchor cfg_searchengine
......
......@@ -485,10 +485,10 @@ block if you prefer C style
comments. Note that the members of the group should be
physcially inside the member group's body.
Before the opening marker of a block a separate comment block should be
Before the opening marker of a block a separate comment block may be
placed. This block should contain the \ref cmdname "@name"
(or \ref cmdname "\name") command and is used to specify the header
of the group. Optionally, the comment block may contain more
of the group. Optionally, the comment block may also contain more
detailed information about the group.
Nesting of member groups is not allowed.
......@@ -866,6 +866,8 @@ PREDEFINED = DECLARE_REGISTRY_RESOURCEID=// \
"STDMETHOD(a)=HRESULT a" \
"ATL_NO_VTABLE= "\
"__declspec(a)= "\
BEGIN_CONNECTION_POINT_MAP=/* \
END_CONNECTION_POINT_MAP=*///
\endverbatim
As you can see doxygen's preprocessor is quite powerful, but if you want
......
......@@ -2,10 +2,8 @@
class Test
{
public:
/** @name Group1
*/
//@{
/** Function 1 in group 1. Details. */
/** Same documentation for both members. Details */
void func1InGroup1();
void func2InGroup1();
//@}
......@@ -30,3 +28,13 @@ void Test::func2InGroup2() {}
void Test::func1InGroup2() {}
//@}
/*! \file
* docs for this file
*/
//@{
//! one description for all members of this group
#define A 1
#define B 2
void glob_func();
//@}
Name: doxygen
Version: 1.1.3-20000528
Version: 1.1.4
Summary: documentation system for C, C++ and IDL
Release: 1
Source0: doxygen-%{version}.src.tar.gz
......
......@@ -131,29 +131,60 @@ void ClassDef::insertSuperClass(ClassDef *cd,Protection p,
inheritedBy->inSort(new BaseClassDef(cd,p,s,t));
}
void ClassDef::addMemberToGroup(MemberDef *md,int groupId)
void ClassDef::addMemberListToGroup(MemberList *ml)
{
if (groupId!=-1)
MemberListIterator mli(*ml);
MemberDef *md;
for (;(md=mli.current());++mli)
{
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
int groupId=md->getMemberGroupId();
if (groupId!=-1)
{
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
}
}
void ClassDef::addMembersToMemberGroup()
{
addMemberListToGroup(&pubTypes);
addMemberListToGroup(&pubMembers);
addMemberListToGroup(&pubAttribs);
addMemberListToGroup(&pubSlots);
addMemberListToGroup(&signals);
addMemberListToGroup(&pubStaticMembers);
addMemberListToGroup(&pubStaticAttribs);
addMemberListToGroup(&proTypes);
addMemberListToGroup(&proMembers);
addMemberListToGroup(&proAttribs);
addMemberListToGroup(&proSlots);
addMemberListToGroup(&proStaticMembers);
addMemberListToGroup(&proStaticAttribs);
addMemberListToGroup(&priTypes);
addMemberListToGroup(&priMembers);
addMemberListToGroup(&priAttribs);
addMemberListToGroup(&priSlots);
addMemberListToGroup(&priStaticMembers);
addMemberListToGroup(&priStaticAttribs);
addMemberListToGroup(&friends);
addMemberListToGroup(&related);
}
// adds new member definition to the class
void ClassDef::insertMember(MemberDef *md,int groupId)
void ClassDef::insertMember(MemberDef *md)
{
//printf("adding %s::%s\n",name().data(),md->name().data());
if (!isReference())
......@@ -402,7 +433,7 @@ void ClassDef::insertMember(MemberDef *md,int groupId)
/*************************************************/
// Note: this must be done AFTER inserting the member in the
// regular groups
addMemberToGroup(md,groupId);
//addMemberToGroup(md,groupId);
}
......@@ -422,26 +453,26 @@ void ClassDef::insertMember(MemberDef *md,int groupId)
}
void ClassDef::computeMemberGroups()
{
MemberNameInfoListIterator mnili(*allMemberNameInfoList);
MemberNameInfo *mni;
for (;(mni=mnili.current());++mnili)
{
MemberNameInfoIterator mnii(*mni);
MemberInfo *mi;
for (mnii.toFirst();(mi=mnii.current());++mnii)
{
MemberDef *md=mi->memberDef;
MemberGroup *mg = md->getMemberGroup();
if (mg && memberGroupDict->find(mg->groupId())==0)
{
memberGroupDict->insert(mg->groupId(),mg);
memberGroupList->append(mg);
}
}
}
}
//void ClassDef::computeMemberGroups()
//{
// MemberNameInfoListIterator mnili(*allMemberNameInfoList);
// MemberNameInfo *mni;
// for (;(mni=mnili.current());++mnili)
// {
// MemberNameInfoIterator mnii(*mni);
// MemberInfo *mi;
// for (mnii.toFirst();(mi=mnii.current());++mnii)
// {
// MemberDef *md=mi->memberDef;
// MemberGroup *mg = md->getMemberGroup();
// if (mg && memberGroupDict->find(mg->groupId())==0)
// {
// memberGroupDict->insert(mg->groupId(),mg);
// memberGroupList->append(mg);
// }
// }
// }
//}
// compute the anchors for all members
void ClassDef::computeAnchors()
......@@ -539,8 +570,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
pageTitle+=pageType+" Reference";
startFile(ol,fileName,pageTitle);
startTitle(ol,getOutputFileBase());
//ol.docify(name()+" "+pageType.right(pageType.length()-1)+" ");
//parseText(ol,theTranslator->trReference());
parseText(ol,theTranslator->trCompoundReference(name(),compType));
endTitle(ol,getOutputFileBase(),name());
......@@ -1131,8 +1160,8 @@ void ClassDef::writeMemberList(OutputList &ol)
memberWritten=TRUE;
}
if ((protect!=Public || md->isStatic() || virt!=Normal ||
md->isFriend() || md->isRelated() ||
(md->isInline() && Config::inlineInfoFlag)
md->isFriend() || md->isRelated() ||
md->getMemberSpecifiers()!=0
)
&& memberWritten)
{
......@@ -1145,6 +1174,8 @@ void ClassDef::writeMemberList(OutputList &ol)
{
if (Config::inlineInfoFlag && md->isInline())
sl.append("inline");
if (md->isExplicit()) sl.append("explicit");
if (md->isMutable()) sl.append("mutable");
if (protect==Protected) sl.append("protected");
else if (protect==Private) sl.append("private");
if (virt==Virtual) sl.append("virtual");
......
......@@ -68,8 +68,7 @@ class ClassDef : public Definition
//void setIncludeName(const char *n_) { incName=n_; }
MemberNameInfoList *memberNameInfoList() { return allMemberNameInfoList; }
MemberNameInfoDict *memberNameInfoDict() { return allMemberNameInfoDict; }
void insertMember(MemberDef *,int grpId);
void addMemberToGroup(MemberDef *,int grpId);
void insertMember(MemberDef *);
void insertUsedFile(const char *);
void computeAnchors();
void computeMemberGroups();
......@@ -121,10 +120,12 @@ class ClassDef : public Definition
bool visited;
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
protected:
void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
void addMemberListToGroup(MemberList *);
private:
QCString fileName; // HTML containing the class docs
......
......@@ -1002,10 +1002,10 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
<SkipCxxComment>. {
g_code->codify(yytext);
}
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*"//@"[{}]{B}*\n)?{B}*"/*"[*!]/[^/*] {
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)?{B}*"/*"[*!]/[^/*] {
g_yyLineNr+=QCString(yytext).contains('\n');
}
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*"//@"[{}]{B}*\n)? {
<RemoveSpecialCComment>"*/"{B}*\n({B}*\n)*({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n)? {
g_yyLineNr+=QCString(yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
......@@ -1046,7 +1046,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
endFontClass();
}
}
<*>\n({B}*"//@"[{}]{B}*\n) { // remove one-line group marker
<*>\n({B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n) { // remove one-line group marker
if (Config::stripCommentsFlag)
{
g_yyLineNr+=((QCString)yytext).contains('\n');
......@@ -1063,7 +1063,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
endFontClass();
}
}
<*>^{B}*"//@"[{}]{B}*\n { // remove one-line group marker
<*>^{B}*(("//@"[{}])|("/*@"[{}]"*/")){B}*\n { // remove one-line group marker
if (Config::stripCommentsFlag)
{
g_yyLineNr++;
......
......@@ -112,6 +112,7 @@ struct Config
static bool collGraphFlag; // collaboration graph
static bool includeGraphFlag; // include graph
static bool gfxHierarchyFlag; // flag to enable graphical hierarchy
static QCString dotPath; // path to the dot tool
static bool searchEngineFlag; // generate search engine flag
static QCString cgiName; // the name of the CGI binary
static QCString cgiURL; // the absolute URL to the CGI binary
......
......@@ -147,6 +147,7 @@ bool Config::classGraphFlag = TRUE;
bool Config::collGraphFlag = TRUE;
bool Config::includeGraphFlag = TRUE;
bool Config::gfxHierarchyFlag = TRUE;
QCString Config::dotPath;
bool Config::searchEngineFlag = FALSE;
QCString Config::cgiName = "search.cgi";
QCString Config::cgiURL;
......@@ -287,6 +288,7 @@ static int yyread(char *buf,int max_size)
<Start>"COLLABORATION_GRAPH"[ \t]*"=" { BEGIN(GetBool); b=&Config::collGraphFlag; }
<Start>"INCLUDE_GRAPH"[ \t]*"=" { BEGIN(GetBool); b=&Config::includeGraphFlag; }
<Start>"GRAPHICAL_HIERARCHY"[ \t]*"=" { BEGIN(GetBool); b=&Config::gfxHierarchyFlag; }
<Start>"DOT_PATH"[ \t]*"=" { BEGIN(GetString); s=&Config::dotPath; s->resize(0); }
<Start>"SEARCHENGINE"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchEngineFlag; }
<Start>"CGI_NAME"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiName; s->resize(0); }
<Start>"CGI_URL"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiURL; s->resize(0); }
......@@ -573,6 +575,7 @@ void dumpConfig()
printf("collGraphFlag=`%d'\n",Config::collGraphFlag);
printf("includeGraphFlag=`%d'\n",Config::includeGraphFlag);
printf("gfxHierarchyFlag=`%d'\n",Config::gfxHierarchyFlag);
printf("dotPath=`%s'\n",Config::dotPath.data());
printf("# Configuration::addtions related to the search engine \n");
printf("searchEngineFlag=`%d'\n",Config::searchEngineFlag);
printf("cgiName=`%s'\n",Config::cgiName.data());
......@@ -673,6 +676,7 @@ void Config::init()
Config::collGraphFlag = TRUE;
Config::includeGraphFlag = TRUE;
Config::gfxHierarchyFlag = TRUE;
Config::dotPath.resize(0);
Config::searchEngineFlag = FALSE;
Config::cgiName = "search.cgi";
Config::cgiURL.resize(0);
......@@ -1724,6 +1728,16 @@ void writeTemplateConfig(QFile *f,bool sl)
writeBoolValue(t,Config::gfxHierarchyFlag);
t << "\n";
if (!sl)
{
t << "\n";
t << "# This tag can be used to specify the path where the dot tool can be found. \n";
t << "# If left blank, it is assumed the dot tool can be found on the path. \n";
t << "\n";
}
t << "DOT_PATH = ";
writeStringValue(t,Config::dotPath);
t << "\n";
if (!sl)
{
t << "\n";
}
......@@ -1978,6 +1992,7 @@ void substituteEnvironmentVars()
substEnvVarsInStrList( Config::tagFileList );
substEnvVarsInString( Config::genTagFile );
substEnvVarsInString( Config::perlPath );
substEnvVarsInString( Config::dotPath );
substEnvVarsInString( Config::cgiName );
substEnvVarsInString( Config::cgiURL );
substEnvVarsInString( Config::docURL );
......@@ -2187,6 +2202,39 @@ void checkConfig()
#endif
s=Config::includePath.next();
}
// check dot path
if (!Config::dotPath.isEmpty())
{
if (Config::dotPath.find('\\')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='\\')
{
Config::dotPath+='\\';
}
}
else if (Config::dotPath.find('/')!=-1)
{
if (Config::dotPath.at(Config::dotPath.length()-1)!='/')
{
Config::dotPath+='/';
}
}
#if defined(_WIN32)
QFileInfo dp(Config::dotPath+"dot.exe");
#else
QFileInfo dp(Config::dotPath+"dot");
#endif
if (!dp.exists() || !dp.isFile())
{
err("Warning: the dot tool could not be found at %s\n",Config::dotPath.data());
}
}
else // make sure the string is empty but not null!
{
Config::dotPath="";
}
// check input
if (Config::inputSources.count()==0)
{
......@@ -2211,13 +2259,13 @@ void checkConfig()
// add default pattern if needed
if (Config::filePatternList.isEmpty())
{
Config::filePatternList="*";
Config::filePatternList.append("*");
}
// add default pattern if needed
if (Config::examplePatternList.isEmpty())
{
Config::examplePatternList="*";
Config::examplePatternList.append("*");
}
// add default pattern if needed
......@@ -2241,18 +2289,23 @@ void checkConfig()
err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1);
}
else if (Config::cgiURL.left(7)!="http://")
else if (Config::cgiURL.left(7)!="http://" &&
Config::cgiURL.left(8)!="https://"
)
{
err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http://).\n");
"start with http:// or https://).\n");
exit(1);
}
// check documentation URL
if (Config::docURL.isEmpty())
{
Config::docURL = Config::outputDir.copy().prepend("file://")+"html";
Config::docURL = Config::outputDir.copy().prepend("file://").append("html");
}
else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
else if (Config::docURL.left(7)!="http://" &&
Config::docURL.left(8)!="https://" &&
Config::docURL.left(7)!="file://"
)
{
err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n");
......
......@@ -22,6 +22,7 @@
#include "doxygen.h"
#include "message.h"
#include "util.h"
#include "config.h"
#include <qdir.h>
#include <qfile.h>
......@@ -32,7 +33,6 @@
const int maxImageWidth=1024;
const int maxImageHeight=1024;
/*! mapping from protection levels to color names */
static char *edgeColorMap[] =
{
......@@ -575,8 +575,9 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
t << "}" << endl;
f.close();
QCString dotCmd;
dotCmd.sprintf("dot -Tgif \"%s\" -o \"%s\"",dotName.data(),gifName.data());
QCString dotCmd(4096);
dotCmd.sprintf("%sdot -Tgif \"%s\" -o \"%s\"",
Config::dotPath.data(),dotName.data(),gifName.data());
//printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if (system(dotCmd)!=0)
{
......@@ -584,7 +585,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
out << "</table>" << endl;
return;
}
dotCmd.sprintf("dot -Timap \"%s\" -o \"%s\"",dotName.data(),mapName.data());
dotCmd.sprintf("%sdot -Timap \"%s\" -o \"%s\"",
Config::dotPath.data(),dotName.data(),mapName.data());
//printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data());
if (system(dotCmd)!=0)
{
......@@ -975,9 +977,10 @@ static void findMaximalDotGraph(DotNode *root,
{
writeDotGraph(root,format,baseName,lrRank,renderParents,curDistance);
QCString dotCmd;
QCString dotCmd(4096);
// create annotated dot file
dotCmd.sprintf("dot -Tdot \"%s.dot\" -o \"%s_tmp.dot\"",baseName.data(),baseName.data());
dotCmd.sprintf("%sdot -Tdot \"%s.dot\" -o \"%s_tmp.dot\"",
Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{
err("Problems running dot. Check your installation!\n");
......@@ -1066,15 +1069,17 @@ void DotClassGraph::writeGraph(QTextStream &out,
if (format==GIF) // run dot to create a .gif image
{
QCString dotCmd;
dotCmd.sprintf("dot -Tgif \"%s.dot\" -o \"%s.gif\"",baseName.data(),baseName.data());
QCString dotCmd(4096);
dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"",
Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{
err("Error: Problems running dot. Check your installation!\n");
return;
}
// run dot again to create an image map
dotCmd.sprintf("dot -Timap \"%s.dot\" -o \"%s.map\"",baseName.data(),baseName.data());
dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"",
Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{
err("Error: Problems running dot. Check your installation!\n");
......@@ -1090,7 +1095,8 @@ void DotClassGraph::writeGraph(QTextStream &out,
else if (format==EPS) // run dot to create a .eps image
{
QCString dotCmd;
dotCmd.sprintf("dot -Tps \"%s.dot\" -o \"%s.eps\"",baseName.data(),baseName.data());
dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"",
Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{
err("Error: Problems running dot. Check your installation!\n");
......@@ -1221,16 +1227,17 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
{
// run dot to create a .gif image
QCString dotCmd;
dotCmd.sprintf("dot -Tgif \"%s.dot\" -o \"%s.gif\"",baseName.data(),baseName.data());
dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"",
Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{
err("Problems running dot. Check your installation!\n");
return;
}
//printf("dot -Tgif %s.dot -o %s.gif",baseName.data(),baseName.data());
// run dot again to create an image map
dotCmd.sprintf("dot -Timap \"%s.dot\" -o \"%s.map\"",baseName.data(),baseName.data());
dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"",
Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{
err("Problems running dot. Check your installation!\n");
......@@ -1249,7 +1256,8 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
// run dot to create a .eps image
QCString dotCmd;
dotCmd.sprintf("dot -Tps \"%s.dot\" -o \"%s.eps\"",baseName.data(),baseName.data());
dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"",
Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0)
{
err("Problems running dot. Check your installation!\n");
......
This diff is collapsed.
......@@ -69,8 +69,9 @@ Entry::Entry(const Entry &e)
mGrpId = e.mGrpId;
bodyLine = e.bodyLine;
endBodyLine = e.endBodyLine;
inLine = e.inLine;
memSpec = e.memSpec;
initializer = e.initializer;
initLines = e.initLines;
sublist = new QList<Entry>;
sublist->setAutoDelete(TRUE);
extends = new QList<BaseInfo>;
......@@ -207,6 +208,7 @@ void Entry::reset()
scopeSpec.resize(0);
memberSpec.resize(0);
initializer.resize(0);
initLines = -1;
startLine = 1;
bodyLine = -1;
endBodyLine = -1;
......@@ -217,7 +219,7 @@ void Entry::reset()
slot = FALSE;
stat = FALSE;
proto = FALSE;
inLine = FALSE;
memSpec = 0;
subGrouping = TRUE;
protection = Public;
sublist->clear();
......
......@@ -46,7 +46,7 @@ struct Argument
docs=a.docs.copy();
array=a.array.copy();
}
/* Assignment of an argument (does a deep copy of all strings). */
/*! Assignment of an argument (does a deep copy of all strings). */
Argument &operator=(const Argument &a)
{
if (this!=&a)
......@@ -144,6 +144,12 @@ class Entry
MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000
};
enum MemberSpecifier
{
Inline = 0x1,
Explicit = 0x2,
Mutable = 0x4
};
Entry();
Entry(const Entry &);
......@@ -159,7 +165,8 @@ class Entry
bool slot; // a Qt slot ?
bool stat; // static ?
bool proto; // prototype ?
bool inLine; // inline ?
int memSpec; // member specifiers
int initLines; // define/variable initializer lines to show
bool subGrouping; // automatically group class members?
Specifier virt; // virtualness of the entry
Entry *parent; // parent node in the tree
......
......@@ -269,7 +269,10 @@ void FileDef::writeDocumentation(OutputList &ol)
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
mg->writeDeclarations(ol,0,0,this,0);
if (mg->header()!="[NOHEADER]")
{
mg->writeDeclarations(ol,0,0,this,0);
}
}
allMemberList.writeDeclarations(ol,0,0,this,0,0,0);
......@@ -439,44 +442,75 @@ void FileDef::writeSource(OutputList &ol)
/*! Adds a member \a md to the member group with id \a groupId.
*/
void FileDef::addMemberToGroup(MemberDef *md,int groupId)
void FileDef::addMemberListToGroup(MemberList *ml,
bool (MemberDef::*func)() const)
{
if (groupId!=-1)
MemberListIterator mli(*ml);
MemberDef *md;
for (;(md=mli.current());++mli)
{
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
int groupId=md->getMemberGroupId();
if ((md->*func)() && groupId!=-1)
{
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
}
}
void FileDef::addMembersToMemberGroup()
{
addMemberListToGroup(&allMemberList,&MemberDef::isDefine);
addMemberListToGroup(&allMemberList,&MemberDef::isTypedef);
addMemberListToGroup(&allMemberList,&MemberDef::isEnumerate);
addMemberListToGroup(&allMemberList,&MemberDef::isEnumValue);
addMemberListToGroup(&allMemberList,&MemberDef::isFunction);
addMemberListToGroup(&allMemberList,&MemberDef::isVariable);
}
/*! Adds member definition \a md to the list of all members of this file */
void FileDef::insertMember(MemberDef *md,int groupId)
void FileDef::insertMember(MemberDef *md)
{
allMemberList.append(md);
switch(md->memberType())
{
case MemberDef::Variable: varMembers.inSort(md); break;
case MemberDef::Function: funcMembers.inSort(md); break;
case MemberDef::Typedef: typedefMembers.inSort(md); break;
case MemberDef::Enumeration: enumMembers.inSort(md); break;
case MemberDef::EnumValue: enumValMembers.inSort(md); break;
case MemberDef::Prototype: protoMembers.inSort(md); break;
case MemberDef::Define: defineMembers.inSort(md); break;
case MemberDef::Variable:
varMembers.inSort(md);
break;
case MemberDef::Function:
funcMembers.inSort(md);
break;
case MemberDef::Typedef:
typedefMembers.inSort(md);
break;
case MemberDef::Enumeration:
enumMembers.inSort(md);
break;
case MemberDef::EnumValue:
enumValMembers.inSort(md);
break;
case MemberDef::Prototype:
protoMembers.inSort(md);
break;
case MemberDef::Define:
defineMembers.inSort(md);
break;
default:
err("FileDef::insertMembers(): unexpected member insert in file!\n");
}
addMemberToGroup(md,groupId);
//addMemberToGroup(md,groupId);
}
/*! Adds compound definition \a cd to the list of all compounds of this file */
......
......@@ -110,8 +110,7 @@ class FileDef : public Definition
void writeDocumentation(OutputList &ol);
void writeSource(OutputList &ol);
friend void generatedFileNames();
void insertMember(MemberDef *md,int groupId);
void addMemberToGroup(MemberDef *md,int groupId);
void insertMember(MemberDef *md);
void insertClass(ClassDef *cd);
void insertNamespace(NamespaceDef *nd);
void computeAnchors();
......@@ -127,8 +126,12 @@ class FileDef : public Definition
QList<IncludeInfo> *includeFileList() const { return includeList; }
QDict<IncludeInfo> *includeFileDict() const { return includeDict; }
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
private:
MemberList allMemberList;
MemberList defineMembers;
......
......@@ -91,28 +91,49 @@ void GroupDef::addNamespace(const NamespaceDef *def)
namespaceList->append(def);
}
void GroupDef::addMemberToGroup(MemberDef *md,int groupId)
void GroupDef::addMemberListToGroup(MemberList *ml,
bool (MemberDef::*func)() const)
{
if (groupId!=-1)
if (ml==0) return;
MemberListIterator mli(*ml);
MemberDef *md;
for (;(md=mli.current());++mli)
{
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
int groupId=md->getMemberGroupId();
if ((md->*func)() && groupId!=-1)
{
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
}
}
void GroupDef::insertMember(MemberDef *md,int groupId)
void GroupDef::addMembersToMemberGroup()
{
addMemberListToGroup(allMemberList,&MemberDef::isDefine);
addMemberListToGroup(allMemberList,&MemberDef::isTypedef);
addMemberListToGroup(allMemberList,&MemberDef::isEnumerate);
addMemberListToGroup(allMemberList,&MemberDef::isEnumValue);
addMemberListToGroup(allMemberList,&MemberDef::isFunction);
addMemberListToGroup(allMemberList,&MemberDef::isSlot);
addMemberListToGroup(allMemberList,&MemberDef::isSignal);
addMemberListToGroup(allMemberList,&MemberDef::isVariable);
}
void GroupDef::insertMember(MemberDef *md)
{
QCString funcDecl=md->name()+md->argsString();
if (allMemberDict->find(funcDecl)==0)
......@@ -131,7 +152,7 @@ void GroupDef::insertMember(MemberDef *md,int groupId)
default:
err("FileDef::insertMembers(): unexpected member insert in file!\n");
}
addMemberToGroup(md,groupId);
//addMemberToGroup(md,groupId);
}
}
......@@ -432,7 +453,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
GroupDef *mgd = md->groupDef();
if (mgd==0)
{
gd->insertMember(md,root->mGrpId);
gd->insertMember(md);
md->setGroupDef(gd);
}
else if (mgd!=gd)
......
......@@ -47,8 +47,7 @@ class GroupDef : public Definition
void addClass(const ClassDef *def);
void addNamespace(const NamespaceDef *def);
void addGroup(const GroupDef *def);
void insertMember(MemberDef *def,int groupId);
void addMemberToGroup(MemberDef *def,int groupId);
void insertMember(MemberDef *def);
void writeDocumentation(OutputList &ol);
int countMembers() const;
bool isLinkableInProject()
......@@ -60,8 +59,13 @@ class GroupDef : public Definition
return isLinkableInProject() || isReference();
}
void computeAnchors();
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
private:
QCString title; // title of the group
QCString fileName; // base name of the generated file
......
......@@ -853,37 +853,18 @@ void HtmlGenerator::writeGraphicalHierarchy(DotGfxHierarchyTable &g)
g.writeGraph(t,Config::htmlOutputDir);
}
void HtmlGenerator::startMemberGroupHeader()
void HtmlGenerator::startMemberGroupHeader(bool)
{
//t << "<tr><td colspan=2><img src=\"null.gif\" height=8></td></tr>" << endl;
//t << "<tr><td colspan=2>" << endl;
//t << " <div class=\"in\">" << endl;
//t << " <table border=0 cellspacing=0 cellpadding=0>" << endl;
//t << " <tr><td colspan=3 class=\"groupLine\"><img src=\"null.gif\" height=1></td></tr>" << endl;
//t << " <tr>" << endl;
//t << " <td class=\"groupLine\"><img src=\"null.gif\" width=1></td>" << endl;
//t << " <td><div class=\"groupHeader\">&nbsp;&nbsp;";
t << "<tr><td colspan=\"2\"><div class=\"groupHeader\">";
}
void HtmlGenerator::endMemberGroupHeader()
{
//t << "&nbsp;&nbsp;</div></td>" << endl;
//t << " <td class=\"groupLine\"><img src=\"null.gif\" width=1></td>" << endl;
//t << " </tr>" << endl;
//t << " <tr><td colspan=3 class=\"groupLine\"><img src=\"null.gif\" height=1></td></tr>" << endl;
//t << " </table>" << endl;
//t << " </div>" << endl;
//t << "</tr>" << endl;
//t << "<tr><td colspan=2><img src=\"null.gif\" height=4></td></tr>" << endl;
t << "</div></td></tr>" << endl;
}
void HtmlGenerator::startMemberGroupDocs()
{
//t << "<tr><td colspan=2><img src=\"null.gif\" height=4></td></tr>" << endl;
t << "<tr><td colspan=\"2\"><div class=\"groupText\">";
}
......
......@@ -98,7 +98,7 @@ class HtmlGenerator : public OutputGenerator
void endMemberList();
void startMemberItem(int);
void startMemberGroupHeader();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
void startMemberGroupDocs();
void endMemberGroupDocs();
......
......@@ -1534,10 +1534,21 @@ void writeIndex(OutputList &ol)
int defLine =
mainPage ? mainPage->defLine : 1;
QCString title;
if (!mainPage || mainPage->title.isEmpty())
ol.startFile("index","Main Index",FALSE);
{
title = "Main Index";
}
else
ol.startFile("index",mainPage->title,FALSE);
{
title = mainPage->title;
}
ol.startFile("index",title,FALSE);
if (Config::generateHtml && Config::htmlHelpFlag)
{
HtmlHelp::getInstance()->addContentsItem(title,"index");
}
if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE);
ol.startTitleHead(0);
......
......@@ -855,28 +855,30 @@ void LatexGenerator::startMemberDoc(const char *clname,
const char *,
const char *title)
{
t << "\\index{";
if (clname)
if (memname && memname[0]!='@')
{
t << clname << "@{";
docify(clname);
t << "}!";
}
t << escapeLabelName(memname) << "@{";
docify(memname);
t << "}}" << endl;
t << "\\index{" << escapeLabelName(memname) << "@{";
docify(memname);
t << "}";
if (clname)
{
t << "!" << clname << "@{";
docify(clname);
t << "}";
t << "\\index{";
if (clname)
{
t << clname << "@{";
docify(clname);
t << "}!";
}
t << escapeLabelName(memname) << "@{";
docify(memname);
t << "}}" << endl;
t << "\\index{" << escapeLabelName(memname) << "@{";
docify(memname);
t << "}";
if (clname)
{
t << "!" << clname << "@{";
docify(clname);
t << "}";
}
t << "}" << endl;
}
t << "}" << endl;
//
if (Config::compactLatexFlag) t << "\\paragraph"; else t << "\\subsubsection";
if (Config::pdfHyperFlag && title) t << "[" << filterTitle(title) << "]";
t << "{\\setlength{\\rightskip}{0pt plus 5cm}";
......@@ -956,10 +958,28 @@ void LatexGenerator::writeSection(const char *lab,const char *title,bool sub)
}
}
void LatexGenerator::writeSectionRef(const char *,const char *lab,
const char *)
void LatexGenerator::writeSectionRef(const char *fileName,const char *lab,
const char *text)
{
t << "\\ref{" << lab << "}";
if (text && Config::pdfHyperFlag)
{
t << "\\hyperlink{";
if (lab) t << lab;
t << "}{";
docify(text);
t << "}";
}
else
{
if (strcmp(lab,text)!=0) // lab!=text
{
t << "{\\bf " << text << " (\\ref " << lab << ")}}";
}
else
{
t << "\\ref{" << lab << "}";
}
}
}
void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
......@@ -1265,9 +1285,10 @@ void LatexGenerator::writeImage(const char *name,const char *w,const char *h)
t << "}}" << endl;
}
void LatexGenerator::startMemberGroupHeader()
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
t << "\\begin{Indent}{\\bf ";
if (hasHeader) t << "\\begin{Indent}";
t << "{\\bf ";
}
void LatexGenerator::endMemberGroupHeader()
......@@ -1289,9 +1310,10 @@ void LatexGenerator::startMemberGroup()
{
}
void LatexGenerator::endMemberGroup(bool)
void LatexGenerator::endMemberGroup(bool hasHeader)
{
t << "\\end{Indent}" << endl;
if (hasHeader)t << "\\end{Indent}";
t << endl;
}
void LatexGenerator::startDotGraph()
......
......@@ -95,7 +95,7 @@ class LatexGenerator : public OutputGenerator
void startMemberItem(int);
void endMemberItem(bool);
void startMemberGroupHeader();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
void startMemberGroupDocs();
void endMemberGroupDocs();
......
......@@ -385,7 +385,7 @@ void ManGenerator::endMemberList()
}
}
void ManGenerator::startMemberGroupHeader()
void ManGenerator::startMemberGroupHeader(bool)
{
t << "\n.PP\n.RI \"\\fB";
}
......
......@@ -95,7 +95,7 @@ class ManGenerator : public OutputGenerator
void startMemberItem(int);
void endMemberItem(bool);
void startMemberGroupHeader();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
void startMemberGroupDocs();
void endMemberGroupDocs();
......
......@@ -212,15 +212,17 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al,bool br=TRUE)
* Members can be function/variables/enums/etc. inside a class or inside a
* file.
*
* \param t A string representing the type of the member.
* \param n A string representing the name of the member.
* \param a A string representing the arguments of the member.
* \param p The type of protection of the member, possible values are:
* \c Public, \c Protected, \c Private.
* \param v The `virtualness' of the member, possible values are:
* \c Normal, \c Virtual, \c Pure.
* \param s A boolean that is true if the member is static.
* \param r A boolean that is true if the member is only related.
* \param df File containing the definition of this member.
* \param dl Line at which the member definition was found.
* \param t A string representing the type of the member.
* \param n A string representing the name of the member.
* \param a A string representing the arguments of the member.
* \param p The type of protection of the member, possible values are:
* \c Public, \c Protected, \c Private.
* \param v The `virtualness' of the member, possible values are:
* \c Normal, \c Virtual, \c Pure.
* \param s A boolean that is true if the member is static.
* \param r A boolean that is true if the member is only related.
* \param mt The kind of member. See #MemberDef::MemberType for a list of
* all types.
*/
......@@ -241,6 +243,7 @@ MemberDef::MemberDef(const char *df,int dl,
memDef=0;
memDec=0;
group=0;
grpId=-1;
exampleList=0;
exampleDict=0;
enumFields=0;
......@@ -262,13 +265,14 @@ MemberDef::MemberDef(const char *df,int dl,
eUsed=FALSE;
proto=FALSE;
annScope=FALSE;
inLine=FALSE;
memSpec=FALSE;
annMemb=0;
annUsed=FALSE;
annShown=FALSE;
annEnumType=0;
indDepth=0;
section=0;
maxInitLines=defMaxInitLines;
docEnumValues=FALSE;
// copy function template arguments (if any)
if (tal)
......@@ -442,19 +446,6 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd,
{
Definition *d;
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd;
//if (mg)
// ol.writeObjectLink(0,mg->getOutputFileBase(),
// anchor(),name());
//else if (cd)
// ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),
// anchor(),name());
//else if (nd)
// ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),
// anchor(),name());
//else if (fd)
// ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),
// anchor(),name());
//else
ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),anchor(),name());
}
......@@ -749,7 +740,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.docify(excpString());
}
if (!init.isEmpty() && initLines==0) // add initializer
if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer
{
if (!isDefine())
{
......@@ -955,7 +946,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName();
linkifyText(ol,scopeName,name(),def);
writeDefArgumentList(ol,cd,scopeName,this);
if (!init.isEmpty() && initLines==0) // add initializer
if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer
{
if (!isDefine())
{
......@@ -986,7 +977,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (isStatic() || protection()!=Public ||
virt!=Normal || isSignal() || isFriend() ||
isRelated() || isSlot() ||
(isInline() && Config::inlineInfoFlag)
getMemberSpecifiers()!=0
)
{
// write the member specifier list
......@@ -1000,6 +991,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
if (Config::inlineInfoFlag && isInline())
sl.append("inline");
if (isExplicit()) sl.append("explicit");
if (isMutable()) sl.append("mutable");
if (isStatic()) sl.append("static");
if (protection()==Protected) sl.append("protected");
else if (protection()==Private) sl.append("private");
......@@ -1340,7 +1333,6 @@ bool MemberDef::isLinkableInProject()
{
return !name().isEmpty() && name().at(0)!='@' &&
((hasDocumentation() && !isReference())
/* || (memberGroup && memberGroup->isLinkableInProject())*/
) &&
(prot!=Private || Config::extractPrivateFlag || isFriend()) && // not a private class member
(classDef!=0 || Config::extractPrivateFlag || !isStatic()); // not a private file/namespace member
......@@ -1381,3 +1373,9 @@ void MemberDef::setMemberGroup(MemberGroup *grp)
{
memberGroup = grp;
}
bool MemberDef::visibleMemberGroup(bool hideNoHeader)
{
return memberGroup!=0 &&
(!hideNoHeader || memberGroup->header()!="[NOHEADER]");
}
......@@ -55,8 +55,8 @@ class MemberDef : public Definition
enum
{
maxInitLines = 30 // maximum number of lines shown for member
// initialization
defMaxInitLines = 30 // default maximum number of lines shown for member
// initializer
};
MemberDef(const char *defFileName,int defLine,
......@@ -93,21 +93,24 @@ class MemberDef : public Definition
FileDef *getFileDec() { return fileDec; }
bool isRelated() const { return related; }
bool isStatic() const { return stat; }
bool isInline() const { return inLine; }
bool isInline() const { return (memSpec&Entry::Inline)!=0; }
bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; }
bool isMutable() const { return (memSpec&Entry::Mutable)!=0; }
MemberList *getSectionList() const { return section; }
void setMemberType(MemberType t) { mtype=t; }
void setDefinition(const char *d) { def=d; }
//void setDefFile(const char *f) { defFile=f; }
//void setDefLine(int l) { defLine=l; }
void setFileDef(FileDef *fd) { fileDef=fd; }
void setFileDec(FileDef *fd) { fileDec=fd; }
void setAnchor(const char *a) { anc=a; }
void setProtection(Protection p) { prot=p; }
void setInline(bool in) { inLine=in; }
void setMemberSpecifiers(int s) { memSpec=s; }
int getMemberSpecifiers() { return memSpec; }
void mergeMemberSpecifiers(int s) { memSpec|=s; }
void setInitializer(const char *i) { init=i;
init=init.stripWhiteSpace();
initLines=init.contains('\n');
}
void setMaxInitLines(int lines) { if (lines!=-1) maxInitLines=lines; }
void setMemberClass(ClassDef *cd) { classDef=cd; }
void setSectionList(MemberList *sl) { section=sl; }
void makeRelated() { related=TRUE; }
......@@ -143,10 +146,6 @@ class MemberDef : public Definition
bool hasExamples();
ExampleList *getExampleList() const { return exampleList; }
// prototype related members
//void setDecFile(const char *f) { declFile=f; }
//void setDecLine(int l) { defLine=l; }
// convenience members
bool isSignal() const { return mtype==Signal; }
bool isSlot() const { return mtype==Slot; }
......@@ -162,10 +161,6 @@ class MemberDef : public Definition
void setPrototype(bool p) { proto=p; }
bool isPrototype() const { return proto; }
// tag file related members
//void setReference(const char *r) { external=r; }
//bool isReference() { return !external.isEmpty(); }
// argument related members
ArgumentList *argumentList() const { return argList; }
void setArgumentList(ArgumentList *al)
......@@ -186,6 +181,8 @@ class MemberDef : public Definition
// member group related members
void setMemberGroup(MemberGroup *grp);
MemberGroup *getMemberGroup() const { return memberGroup; }
void setMemberGroupId(int id) { grpId=id; }
int getMemberGroupId() const { return grpId; }
void setFromAnnonymousScope(bool b) { annScope=b; }
void setFromAnnonymousMember(MemberDef *m) { annMemb=m; }
......@@ -193,6 +190,8 @@ class MemberDef : public Definition
bool annonymousDeclShown() { return annUsed; }
void setIndentDepth( int i) { indDepth=i; }
int indentDepth() { return indDepth; }
bool visibleMemberGroup(bool hideNoHeader);
private:
ClassDef *classDef; // member of or related to
......@@ -225,7 +224,7 @@ class MemberDef : public Definition
Protection prot; // protection type [Public/Protected/Private]
bool related; // is this a member that is only related to a class
bool stat; // is it a static function?
bool inLine; // is it an inline function?
int memSpec; // The specifiers present for this member
MemberType mtype; // returns the kind of member
bool eUsed; // is the enumerate already placed in a list
bool proto; // is it a prototype;
......@@ -234,13 +233,14 @@ class MemberDef : public Definition
bool annUsed;
bool annShown;
int indDepth;
int maxInitLines; // when the initializer will be displayed
MemberList *section; // declation list containing this member
MemberDef *annMemb;
ArgumentList *argList; // argument list of this member
ArgumentList *tArgList; // template argument list of function template
ArgumentList *scopeTAL; // template argument list of class template
ArgumentList *membTAL; // template argument list of class template
//int grpId; // group id
int grpId; // group id
//QCString grpHeader; // group header
MemberGroup *memberGroup; // group's member definition
......
......@@ -53,7 +53,9 @@ MemberGroup::~MemberGroup()
void MemberGroup::insertMember(MemberDef *md)
{
//printf("MemberGroup::insertMember(%s)\n",md->name().data());
//printf("MemberGroup::insertMember memberList=%p count=%d"
// " member section list: %p\n",memberList,memberList->count(),
// md->getSectionList());
if (inSameSection && memberList->count()>0 &&
memberList->first()->getSectionList()!=md->getSectionList())
{
......@@ -97,11 +99,11 @@ void MemberGroup::addToDeclarationSection()
}
}
int MemberGroup::countDecMembers()
int MemberGroup::countDecMembers(bool sectionPerType)
{
if (numDeclMembers==-1) /* number of member not cached */
{
memberList->countDecMembers(TRUE,TRUE);
memberList->countDecMembers(TRUE,TRUE,sectionPerType);
numDeclMembers = memberList->totalCount();
}
return numDeclMembers;
......
......@@ -52,7 +52,7 @@ class MemberGroup /* : public Definition */
QCString documentation() { return doc; }
bool allMembersInSameSection() { return inSameSection; }
void addToDeclarationSection();
int countDecMembers();
int countDecMembers(bool sectionPerType);
void distributeMemberGroupDocumentation();
private:
......
......@@ -44,7 +44,7 @@ int MemberList::compareItems(GCI item1, GCI item2)
return strcmp(c1->name(),c2->name());
}
void MemberList::countDecMembers(bool inGroup,bool countSubGroups)
void MemberList::countDecMembers(bool inGroup,bool countSubGroups,bool sectionPerType)
{
//printf("----- countDecMembers ----\n");
varCnt=funcCnt=enumCnt=enumValCnt=typeCnt=protoCnt=defCnt=friendCnt=0;
......@@ -64,7 +64,7 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups)
md->hasDocumentedEnumValues()
)
) &&
inGroup==(md->getMemberGroup()!=0) &&
inGroup==md->visibleMemberGroup(sectionPerType) &&
!(inGroup && md->protection()==Private && !Config::extractPrivateFlag)
)
{
......@@ -82,6 +82,7 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups)
case MemberDef::Prototype: protoCnt++,m_count++; break;
case MemberDef::Define: if (Config::extractAllFlag ||
md->argsString() ||
!md->initializer().isEmpty() ||
md->hasDocumentation()
) defCnt++,m_count++;
break;
......@@ -98,7 +99,7 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups)
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
int mgCount = mg->countDecMembers();
int mgCount = mg->countDecMembers(sectionPerType);
//printf("memberGroupList adding %d inGroup=%d\n",mgCount,inGroup);
m_count+=mgCount;
}
......@@ -155,21 +156,20 @@ void MemberList::writePlainDeclarations(OutputList &ol,
bool inGroup,bool countSubGroups
)
{
bool sectionPerType = !inGroup && (fd || nd || gd);
//printf("----- writePlainDeclaration() ----\n");
countDecMembers(inGroup,countSubGroups);
countDecMembers(inGroup,countSubGroups,sectionPerType);
if (totalCount()==0) return; // no members in this list
//printf("----> writePlainDeclaration() inGroup=%d totalCount()=%d\n",inGroup,totalCount());
ol.pushGeneratorState();
//int prevGroupId = -1;
bool sectionPerType = !inGroup && (fd || nd || gd);
if (!sectionPerType) ol.startMemberList();
MemberDef *md;
if (defineCount()>0)
{
//printf("There are %d defines\n",defineCount());
if (sectionPerType)
{
ol.startMemberHeader();
......@@ -183,8 +183,10 @@ void MemberList::writePlainDeclarations(OutputList &ol,
//printf("md->isDefined()=%d inGroup=%d md->getMemberGroup()=%p\n",
// md->isDefine(),inGroup,md->getMemberGroup());
if (md->isDefine() &&
(md->argsString() || md->hasDocumentation() || Config::extractAllFlag) &&
inGroup==(md->getMemberGroup()!=0)
(md->argsString() || md->hasDocumentation() ||
!md->initializer().isEmpty() ||
Config::extractAllFlag) &&
inGroup==md->visibleMemberGroup(sectionPerType)
)
{
md->writeDeclaration(ol,cd,nd,fd,gd,inGroup);
......@@ -209,7 +211,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()); ++mli )
{
if (md->isPrototype() && inGroup==(md->getMemberGroup()!=0))
if (md->isPrototype() && inGroup==md->visibleMemberGroup(sectionPerType))
{
md->writeDeclaration(ol,cd,nd,fd,gd,inGroup);
}
......@@ -234,7 +236,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()) ; ++mli )
{
if (md->isTypedef() && inGroup==(md->getMemberGroup()!=0))
if (md->isTypedef() && inGroup==md->visibleMemberGroup(sectionPerType))
{
md->writeDeclaration(ol,cd,nd,fd,gd,inGroup);
}
......@@ -263,7 +265,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
type=type.stripWhiteSpace(); // TODO: is this really needed?
// filter out enums that are in a group iff inGroup holds
if (md->isEnumerate() && inGroup==(md->getMemberGroup()!=0) /*&& (hasDocs || !Config::hideMemberFlag)*/)
if (md->isEnumerate() && inGroup==md->visibleMemberGroup(sectionPerType) /*&& (hasDocs || !Config::hideMemberFlag)*/)
{
// filter out invisible enums
if ( !Config::hideMemberFlag || // do not hide undocumented members or
......@@ -409,7 +411,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (
( md->isFunction() || md->isSignal() || md->isSlot()) &&
( !md->isRelated() || md->memberClass() ) &&
inGroup==(md->getMemberGroup()!=0)
inGroup==md->visibleMemberGroup(sectionPerType)
)
{
md->writeDeclaration(ol,cd,nd,fd,gd,inGroup);
......@@ -424,7 +426,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()) ; ++mli )
{
if (md->isFriend() && inGroup==(md->getMemberGroup()!=0))
if (md->isFriend() && inGroup==md->visibleMemberGroup(sectionPerType))
{
QCString type=md->typeString();
//printf("Friend: type=%s name=%s\n",type.data(),md->name().data());
......@@ -479,7 +481,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()) ; ++mli )
{
if (md->isVariable() && inGroup==(md->getMemberGroup()!=0))
if (md->isVariable() && inGroup==md->visibleMemberGroup(sectionPerType))
{
md->writeDeclaration(ol,cd,nd,fd,gd,inGroup);
}
......@@ -495,7 +497,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
for ( ; (md=mli.current()) ; ++mli )
{
if (md->fromAnnonymousScope() && !md->annonymousDeclShown()
&& inGroup==(md->getMemberGroup()!=0))
&& inGroup==md->visibleMemberGroup(sectionPerType))
{
//printf("annonymous compound members\n");
md->setFromAnnonymousScope(FALSE);
......@@ -518,13 +520,14 @@ void MemberList::writeDeclarations(OutputList &ol,
{
//printf("MemberList::writeDeclaration(title=`%s',subtitle=`%s')\n",title,subtitle);
//printf("----- writeDeclaration() ----\n");
countDecMembers(FALSE,countSubGroups); // count member not in group
bool sectionPerType = !inGroup && (fd || nd || gd);
countDecMembers(FALSE,countSubGroups,sectionPerType); // count member not in group
int normalMembers = totalCount();
int ingroupMembers = 0;
//printf("Normal members %d\n",normalMembers);
if (inGroup)
{
countDecMembers(TRUE,countSubGroups); // count member inside group
countDecMembers(TRUE,countSubGroups,sectionPerType); // count member inside group
ingroupMembers = totalCount();
}
int totalMembers = normalMembers + ingroupMembers;
......@@ -551,13 +554,13 @@ void MemberList::writeDeclarations(OutputList &ol,
if (memberGroupList)
{
//printf("MemberList::writeDeclarations()\n");
MemberGroupListIterator mgli(*memberGroupList);
MemberGroup *mg;
while ((mg=mgli.current()))
{
ol.startMemberGroupHeader();
if (mg->header()!="[NOHEADER]")
bool hasHeader=mg->header()!="[NOHEADER]";
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
{
parseText(ol,mg->header());
}
......@@ -566,14 +569,13 @@ void MemberList::writeDeclarations(OutputList &ol,
{
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
parseDoc(ol,"<generated>",1,
0,0,mg->documentation());
parseDoc(ol,"<generated>",1,0,0,mg->documentation());
ol.endMemberGroupDocs();
}
ol.startMemberGroup();
mg->writePlainDeclarations(ol,cd,nd,fd,gd);
++mgli;
ol.endMemberGroup(mgli.current()==0);
ol.endMemberGroup(hasHeader);
}
}
//printf("----- end writeDeclaration() ----\n");
......@@ -593,10 +595,11 @@ void MemberList::writeDocumentation(OutputList &ol,
void MemberList::addMemberGroup(MemberGroup *mg)
{
//printf("MemberList::addMemberGroup(%p)\n",mg);
if (memberGroupList==0)
{
memberGroupList=new MemberGroupList;
}
memberGroupList->append(mg);
}
......@@ -41,7 +41,7 @@ class MemberList : public QList<MemberDef>
int protoCount() const { return protoCnt; }
int defineCount() const { return defCnt; }
int friendCount() const { return friendCnt; }
void countDecMembers(bool inGroup,bool countSubGroups);
void countDecMembers(bool inGroup,bool countSubGroups,bool sectionPerType);
void countDocMembers();
int totalCount() const
{ return //varCnt+funcCnt+enumCnt+enumValCnt+typeCnt+
......
......@@ -78,28 +78,44 @@ void NamespaceDef::insertClass(ClassDef *cd)
}
}
void NamespaceDef::addMemberToGroup(MemberDef *md,int groupId)
void NamespaceDef::addMemberListToGroup(MemberList *ml,
bool (MemberDef::*func)() const)
{
if (groupId!=-1)
MemberListIterator mli(*ml);
MemberDef *md;
for (;(md=mli.current());++mli)
{
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
int groupId=md->getMemberGroupId();
if ((md->*func)() && groupId!=-1)
{
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
QCString *pGrpHeader = memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId];
if (pGrpHeader)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
MemberGroup *mg = memberGroupDict->find(groupId);
if (mg==0)
{
mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupDict->insert(groupId,mg);
memberGroupList->append(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
mg->insertMember(md);
md->setMemberGroup(mg);
}
}
}
void NamespaceDef::insertMember(MemberDef *md,int groupId)
void NamespaceDef::addMembersToMemberGroup()
{
addMemberListToGroup(&allMemberList,&MemberDef::isTypedef);
addMemberListToGroup(&allMemberList,&MemberDef::isEnumerate);
addMemberListToGroup(&allMemberList,&MemberDef::isEnumValue);
addMemberListToGroup(&allMemberList,&MemberDef::isFunction);
addMemberListToGroup(&allMemberList,&MemberDef::isVariable);
}
void NamespaceDef::insertMember(MemberDef *md)
{
//memList->append(md);
allMemberList.append(md);
......@@ -115,7 +131,7 @@ void NamespaceDef::insertMember(MemberDef *md,int groupId)
default:
err("NamespaceDef::insertMembers(): unexpected member inserted in namespace!\n");
}
addMemberToGroup(md,groupId);
//addMemberToGroup(md,groupId);
}
void NamespaceDef::computeAnchors()
......
......@@ -39,33 +39,18 @@ class NamespaceDef : public Definition
NamespaceDef(const char *defFileName,int defLine,
const char *name,const char *ref=0);
~NamespaceDef();
//QCString namespaceFile() const { return fileName; }
QCString getOutputFileBase() const { return fileName; }
void insertUsedFile(const char *fname);
void writeDocumentation(OutputList &ol);
void insertClass(ClassDef *cd);
void insertMember(MemberDef *md,int groupId);
void addMemberToGroup(MemberDef *md,int groupId);
void insertMember(MemberDef *md);
void computeAnchors();
int countMembers();
void addUsingDirective(NamespaceDef *nd);
NamespaceList *getUsedNamespaces() const { return usingDirList; }
void addUsingDeclaration(ClassDef *cd);
ClassList *getUsedClasses() const { return usingDeclList; }
//const char *getReference() { return reference; }
//bool isVisible()
//{
// return !getReference() && hasDocumentation() &&
// !name().isEmpty() && name().at(0)!='@';
//}
//bool isVisibleExt()
//{
// return (getReference() || hasDocumentation()) &&
// !name().isEmpty() && name().at(0)!='@';
//}
bool isLinkableInProject()
{
int i = name().findRev("::");
......@@ -77,8 +62,12 @@ class NamespaceDef : public Definition
{
return isLinkableInProject() || isReference();
}
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
private:
//QCString reference;
QCString fileName;
......
......@@ -103,7 +103,7 @@ class OutputGenerator
virtual void endMemberList() = 0;
virtual void startMemberItem(int) = 0;
virtual void endMemberItem(bool) = 0;
virtual void startMemberGroupHeader() = 0;
virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0;
virtual void endMemberGroupDocs() = 0;
......
......@@ -164,8 +164,8 @@ class OutputList
{ forall(&OutputGenerator::startMemberItem,i1); }
void endMemberItem(bool b2)
{ forall(&OutputGenerator::endMemberItem,b2); }
void startMemberGroupHeader()
{ forall(&OutputGenerator::startMemberGroupHeader); }
void startMemberGroupHeader(bool b)
{ forall(&OutputGenerator::startMemberGroupHeader,b); }
void endMemberGroupHeader()
{ forall(&OutputGenerator::endMemberGroupHeader); }
void startMemberGroupDocs()
......
......@@ -760,8 +760,7 @@ Define *newDefine()
void addDefine()
{
//bool ambig;
//FileDef *fd=findFileDef(&inputNameDict,g_yyFileName,ambig);
//printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data());
MemberDef *md=new MemberDef(
g_yyFileName,g_yyLineNr,
"#define",g_defName,g_defArgsStr,0,
......@@ -789,7 +788,7 @@ void addDefine()
functionNameDict.insert(g_defName,mn);
}
mn->append(md);
if (g_yyFileDef) g_yyFileDef->insertMember(md,-1);
if (g_yyFileDef) g_yyFileDef->insertMember(md);
//Define *d;
//if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine());
......
......@@ -46,20 +46,24 @@ static ListItemInfo listItemInfo[indentLevels];
static QCString formatBmkStr(const char *name)
{
QCString result=name;
int i=0;
char c;
while ((c=result.at(i))!=0)
if (!result.isEmpty())
{
switch(c)
char c;
char *p=result.data();
while ((c=*p))
{
case '.':
case ':':
result.at(i)='_';
break;
default:
break;
switch(c)
{
case '.':
// fall through
case ':':
*p='_';
break;
default:
break;
}
p++;
}
i++;
}
return result;
}
......@@ -1146,18 +1150,16 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
t << "}" << endl;
// make an index entry
addToIndex(name,NULL);
addToIndex(name,0);
if (fileName)
if (name)
{
// doxygen expects different anchors for pdf and if "FULL PATHS"
writeAnchor(fileName,0);
writeAnchor(0,name);
}
else
if (Config::rtfHyperFlag && fileName)
{
// make a bookmark for referencing
writeAnchor(0,name);
writeAnchor(fileName,0);
}
}
}
......@@ -1193,8 +1195,11 @@ void RTFGenerator::startMemberDoc(const char *clname,
const char *)
{
t << "{\\comment startMemberDoc}" << endl;
addToIndex(memname,clname);
addToIndex(clname,memname);
if (memname && memname[0]!='@')
{
addToIndex(memname,clname);
addToIndex(clname,memname);
}
//t << Rtf_Style_Reset << Rtf_Style_ListBullet1;
t << Rtf_Style_Reset << Rtf_Style_Heading4;
//styleStack.push(Rtf_Style_Heading4);
......@@ -1352,7 +1357,7 @@ void RTFGenerator::startDescList()
{
t << "{\\comment (startDescList)}" << endl;
t << "{";
///*if (!m_omitParagraph)*/ newParagraph();
newParagraph();
}
void RTFGenerator::endDescTitle()
......@@ -2027,11 +2032,11 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
return TRUE;
}
void RTFGenerator::startMemberGroupHeader()
void RTFGenerator::startMemberGroupHeader(bool hasHeader)
{
t << "{\\comment startMemberGroupHeader}" << endl;
t << "{" << endl;
incrementIndentLevel();
if (hasHeader) incrementIndentLevel();
t << Rtf_Style_Reset << Rtf_Style_GroupHeader;
}
......@@ -2061,10 +2066,10 @@ void RTFGenerator::startMemberGroup()
t << Rtf_Style_Reset << Rtf_BList_DepthStyle() << endl;
}
void RTFGenerator::endMemberGroup(bool)
void RTFGenerator::endMemberGroup(bool hasHeader)
{
t << "{\\comment endMemberGroup}" << endl;
decrementIndentLevel();
if (hasHeader) decrementIndentLevel();
t << "}";
}
......@@ -197,7 +197,7 @@ class RTFGenerator : public OutputGenerator
void endInclDepGraph(DotInclDepGraph &);
void writeGraphicalHierarchy(DotGfxHierarchyTable &) {}
void startMemberGroupHeader();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
void startMemberGroupDocs();
void endMemberGroupDocs();
......
/******************************************************************************
/*****************************************************************************
*
*
*
......@@ -840,7 +840,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
else
{
result=fileName;
if (result.left(5)!="http:")
if (result.left(5)!="http:" && result.left(6)!="https:")
{
warn(yyFileName,yyLineNr,
"Warning: image file %s is not found in IMAGE_PATH: "
......@@ -1523,7 +1523,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->docify(", ");
}
}
<DocScan>{CMD}"param"/{BN} {
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"param"/{BN} {
endArgumentList();
if (!inParamBlock)
{
......@@ -1543,7 +1543,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
BEGIN(DocParam);
}
<DocScan>{CMD}"retval"/{BN} {
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"retval"/{BN} {
endArgumentList();
if (!inRetValBlock)
{
......@@ -1563,7 +1563,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
}
BEGIN(DocParam);
}
<DocScan>{CMD}("exception"|"throw")s?/{BN} {
<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}("exception"|"throw")s?/{BN} {
endArgumentList();
if (!inExceptionBlock)
{
......@@ -1602,7 +1602,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->startDescTableData();
BEGIN(DocScan);
}
<DocScan>{CMD}"section "{ID}"\n" {
<DocScan>{CMD}"section "{ID}"\n" {
QCString secName=&yytext[9]; // skip "\section "
secName=secName.left(secName.length()-1); // remove \n
//printf("SectionName %s found\n",secName.data());
......@@ -1624,7 +1624,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->writeAnchor(sec->fileName,sec->label);
}
}
<DocScan>{CMD}"ref" {
<DocScan>{CMD}"ref" {
BEGIN(DocRefName);
}
<DocScan>{CMD}"refitem" {
......@@ -1809,12 +1809,16 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
warn(yyFileName,yyLineNr,"Warning: \\endcode without <PRE> or \\code "
"in the documentation.");
}
<DocScan>{SCOPEMASK}"("[a-z_A-Z0-9,:\<\> \t\*\&]+")" {
<DocScan>{ID}"<"[^>\ \t\n]*">"("::"{ID})+"("?[a-z_A-Z0-9,:\<\> \t\*\&]*")"? {
generateRef(*outDoc,className,yytext,inSeeBlock);
}
<DocScan>{SCOPEMASK}"("[a-z_A-Z0-9,:\<\> \t\*\&]+")" {
generateRef(*outDoc,className,yytext,inSeeBlock);
}
<DocScan>{SCOPEMASK}("()")? {
generateRef(*outDoc,className,yytext,inSeeBlock);
}
<DocScan>{SCOPEMASK}(("()")?) {
generateRef(*outDoc,className,yytext,inSeeBlock);
}
<DocScan>({SCOPEMASK}"::")?"operator()("[a-z_A-Z0-9,\<\> \t\*\&]*")" {
QCString oName=yytext;
generateRef(*outDoc,className,
......@@ -1825,7 +1829,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
generateRef(*outDoc,className,
removeRedundantWhiteSpace(oName),inSeeBlock);
}
<DocScan>("http:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); }
<DocScan>("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); }
<DocScan>[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); }
<DocScan>{FILEMASK} {
generateFileRef(*outDoc,yytext);
......@@ -2292,7 +2296,13 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
current->virt = Virtual;
lineCount();
}
<FindMembers>{B}*"inline"{BN}+ { current->inLine = TRUE;
<FindMembers>{B}*"inline"{BN}+ { current->memSpec|=Entry::Inline;
lineCount();
}
<FindMembers>{B}*"mutable"{BN}+ { current->memSpec|=Entry::Mutable;
lineCount();
}
<FindMembers>{B}*"explicit"{BN}+ { current->memSpec|=Entry::Explicit;
lineCount();
}
<FindMembers>{B}*"import"{BN}+ { // IDL import keyword
......@@ -3620,7 +3630,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
if( *yytext == '{' )
{
if (current_root->section & Entry::COMPOUND_MASK)
previous->inLine = TRUE;
previous->memSpec = previous->memSpec | Entry::Inline;
//addToBody(yytext);
curlyCount=0;
BEGIN( SkipCurly ) ;
......@@ -4618,6 +4628,12 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<ClassDoc,LineDoc,Doc,JavaDoc>{CMD}"nosubgrouping"/[^a-z_A-Z0-9] {
current->subGrouping = FALSE;
}
<ClassDoc,LineDoc,Doc,JavaDoc>{CMD}"showinitializer"/[^a-z_A-Z0-9] {
current->initLines = 100000; // ON
}
<ClassDoc,LineDoc,Doc,JavaDoc>{CMD}"hideinitializer"/[^a-z_A-Z0-9] {
current->initLines = 0; // OFF
}
<GroupName>{ID} {
current->groups->append(
new QCString(yytext)
......
......@@ -119,21 +119,21 @@ static void addMember(const char *name,const char *anchor,const char *args)
if (cd) // member of a class
{
md->setMemberClass(cd);
cd->insertMember(md,-1); /* TODO: store group info */
cd->insertMember(md);
mnd=&memberNameDict;
mnl=&memberNameList;
}
else if (nd) // member of a namespace
{
md->setNamespace(nd);
nd->insertMember(md,-1); /* TODO: store group info */
nd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
else // member of a file
{
md->setFileDef(fd);
fd->insertMember(md,-1); /* TODO: store group info */
fd->insertMember(md);
mnd=&functionNameDict;
mnl=&functionNameList;
}
......
......@@ -463,6 +463,10 @@ QCString argListToString(ArgumentList *al)
{
result+= a->type;
}
if (!a->defval.isEmpty())
{
result+="="+a->defval;
}
a = al->next();
if (a) result+=",";
}
......@@ -1062,6 +1066,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
stripIrrelevantConstVolatile(srcAType);
stripIrrelevantConstVolatile(dstAType);
if (srcA->array!=dstA->array) return FALSE;
if (srcAType!=dstAType) // check if the argument only differs on name
{
//printf("scope=`%s': `%s' <=> `%s'\n",className.data(),srcAType.data(),dstAType.data());
......@@ -1256,8 +1261,6 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
{
//printf("mergeArguments `%s', `%s'\n",
// argListToString(srcAl).data(),argListToString(dstAl).data());
//printArgList(srcAl);printf(" <=> ");
//printArgList(dstAl);printf("\n");
if (srcAl==0 || dstAl==0 || srcAl->count()!=dstAl->count())
{
......@@ -1795,6 +1798,15 @@ bool generateRef(OutputList &ol,const char *scName,
}
//printf("scope=`%s' name=`%s' arg=`%s' linkText=`%s'\n",
// scopeStr.data(),nameStr.data(),argsStr.data(),linkText.data());
// strip template specifier
// TODO: match against the correct partial template instantiation
int templPos=nameStr.find('<');
if (templPos!=-1 && nameStr.find("operator")==-1)
{
int endTemplPos=nameStr.findRev('>');
nameStr=nameStr.left(templPos)+nameStr.right(nameStr.length()-endTemplPos-1);
}
MemberDef *md = 0;
ClassDef *cd = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment