Commit 5b3f3dc6 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.5.7.1-20081225

parent b2ff175f
DOXYGEN Version 1.5.7.1-20081206
DOXYGEN Version 1.5.7.1-20081225
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (06 December 2008)
Dimitri van Heesch (25 December 2008)
DOXYGEN Version 1.5.7.1_20081206
DOXYGEN Version 1.5.7.1_20081225
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (06 December 2008)
Dimitri van Heesch (dimitri@stack.nl) (25 December 2008)
......@@ -270,6 +270,7 @@ int main(int argc,char **argv)
// check and finialize the configuration
checkConfiguration();
adjustConfiguration();
// parse the files
parseInput();
......
......@@ -111,7 +111,7 @@ Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--flex name] [--bison name] [--make name]
[--dot name] [--platform target] [--prefix dir] [--docdir dir]
[--install name] [--english-only] [----enable-langs list]
[--with-doxywizard]
[--with-doxywizard] [--with-doxyapp]
Options:
......@@ -145,6 +145,7 @@ Options:
[default: $f_langs]
--with-doxywizard Build the GUI frontend for doxygen. This
requires Qt 3.3.x
--with-doxyapp Example showing how to embed doxygen in an application.
EOF
test "$f_error" = y && exit 1
......
......@@ -127,14 +127,14 @@ documentation:
\refitem cmdparam \\param
\refitem cmdpost \\post
\refitem cmdpre \\pre
\refitem cmd_php_only \\private (PHP only)
\refitem cmd_php_only \\privatesection (PHP only)
\refitem cmdprivate \\private
\refitem cmdprivate \\privatesection
\refitem cmdproperty \\property
\refitem cmd_php_only \\protected (PHP only)
\refitem cmd_php_only \\protectedsection (PHP only)
\refitem cmdprotected \\protected
\refitem cmdprotected \\protectedsection
\refitem cmdprotocol \\protocol
\refitem cmd_php_only \\public (PHP only)
\refitem cmd_php_only \\publicsection (PHP only)
\refitem cmdpublic \\public
\refitem cmdpublic \\publicsection
\refitem cmdref \\ref
\refitem cmdrelates \\relates
\refitem cmdrelatesalso \\relatesalso
......@@ -575,6 +575,10 @@ doxygen. Unrecognized commands are treated as normal text.
is represented as a real member of the class.
This can be useful when the programming language does not support
the concept of member functions natively (e.g. C).
It is also possible to use this command together with
\ref cmdpublic "\\public", \ref cmdprotected "\\protected" or
\ref cmdprivate "\\private".
The file \c manual.c in the example directory shows how to use this command.
\htmlonly
......@@ -582,8 +586,9 @@ doxygen. Unrecognized commands are treated as normal text.
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
\sa section \ref cmdextends "\\extends" and section
\ref cmdmemberof "\\memberof"
\sa sections \ref cmdextends "\\extends", \ref cmdimplements "\\implements",
\ref cmdpublic "\\public", \ref cmdprotected "\\protected" and
\ref cmdprivate "\\private".
<hr>
\section cmdname \\name (header)
......@@ -682,6 +687,25 @@ doxygen. Unrecognized commands are treated as normal text.
\ref cmdsubsection "\\subsection", and section
\ref cmdref "\\ref".
<hr>
\section cmdprivate \\private
\addindex \\private
\addindex \\privatesection
Indicates that the member documented in the comment block is private,
i.e., should only be accessed by other members in the same class.
Note that Doxygen automatically detects the protection level of members
in object-oriented languages. This command is intended for use only when
the language does not support the concept of protection level natively
(e.g. C, PHP 4).
For starting a section of private members, in a way similar to the
"private:" class marker in C++, use \\privatesection.
\sa sections \ref cmdmemberof "\\memberof", \ref cmdpublic "\\public",
and \ref cmdprotected "\\protected".
<hr>
\section cmdproperty \\property (qualified property name)
......@@ -692,6 +716,26 @@ doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdfn "\\fn" and \ref cmdvar "\\var".
<hr>
\section cmdprotected \\protected
\addindex \\protected
\addindex \\protectedsection
Indicates that the member documented in the comment block is protected,
i.e., should only be accessed by other members in the same or derived
classes.
Note that Doxygen automatically detects the protection level of members
in object-oriented languages. This command is intended for use only when
the language does not support the concept of protection level natively
(e.g. C, PHP 4).
For starting a section of protected members, in a way similar to the
"protected:" class marker in C++, use \\protectedsection.
\sa sections \ref cmdmemberof "\\memberof", \ref cmdpublic "\\public",
and \ref cmdprivate "\\private".
<hr>
\section cmdprotocol \\protocol <name> [<header-file>] [<header-name>]
......@@ -702,6 +746,25 @@ doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdclass "\\class".
<hr>
\section cmdpublic \\public
\addindex \\public
\addindex \\publicsection
Indicates that the member documented in the comment block is public,
i.e., can be accessed by any other class or function.
Note that Doxygen automatically detects the protection level of members
in object-oriented languages. This command is intended for use only when
the language does not support the concept of protection level natively
(e.g. C, PHP 4).
For starting a section of public members, in a way similar to the
"public:" class marker in C++, use \\publicsection.
\sa sections \ref cmdmemberof "\\memberof", \ref cmdprotected "\\protected"
and \ref cmdprivate "\\private".
<hr>
\section cmdrelates \\relates <name>
......@@ -2369,18 +2432,6 @@ class Receiver
character has to be escaped in some cases, because it is used to
prevent auto-linking to word that is also a documented class or struct.
<hr>
\section cmd_php_only PHP only commands
For PHP files there are a number of additional commands, that can be
used inside classes to make members public, private, or protected even
though the language itself doesn't support this notion.
To mark a single item use one of \\private, \\protected, \\public.
For starting a section with a certain protection level use one of:
\\privatesection, \\protectedsection, \\publicsection.
The latter commands are similar to
"private:", "protected:", and "public:" in C++.
<h2>\htmlonly <center> --- \endhtmlonly
Commands included for Qt compatibility
\htmlonly --- </center>\endhtmlonly</h2>
......
......@@ -238,7 +238,8 @@ If you want to document the members of a file, struct, union, class, or enum,
and you want to put the documentation for these members inside the compound,
it is sometimes desired to place the documentation block after the member
instead of before. For this purpose you have to put an additional \< marker
in the comment block. Note that this also works for the parameters of a function.
in the comment block. Note that this also works for the parameters
of a function.
Here are some examples:
\verbatim
......@@ -271,6 +272,14 @@ or
int var; ///< Brief description after the member
\endverbatim
For functions one can use \@param to document the parameters
and then use <code>[in]</code>, <code>[out]</code>, <code>[in,out]</code>
to document the direction. For inline documentation this is also possible
by starting with the direction attribute, e.g.
\verbatim
void foo(int v /**< [in] docs for input parameter v. */);
\endverbatim
Note that these blocks have the same structure and meaning as the
special comment blocks in the previous section
only the \< indicates that the member is
......@@ -287,7 +296,8 @@ Here is an example of the use of these comment blocks:
They cannot be used to document files, classes, unions, structs,
groups, namespaces and enums themselves. Furthermore, the structural
commands mentioned in the next section
(like <code>\\class</code>) are ignored inside these comment blocks.
(like <code>\\class</code>) are not allowed
inside these comment blocks.
\section structuralcommands Documentation at other places
......
......@@ -420,10 +420,10 @@ Just follow these steps:
at two places in the script:
<ol>
<li>After the <code>f_langs=</code> is statement, in lower case.
<li>In the string that following <code>@allowed=</code> in upper case.
<li>In the string that following <code>\@allowed=</code> in upper case.
</ol>
The rerun the configure script such that is generates src/lang_cfg.h.
This file should now contain a #define for your language code.
This file should now contain a \#define for your language code.
<li>Edit language.cpp:
Add a
\verbatim
......
......@@ -34,7 +34,6 @@ The following output formats are \e directly supported by doxygen:
Word 97. If you have success with other programs, please let me know.
<dt><b>XML</b>
<dd>Generated if \c GENERATE_XML is set to \c YES in the configuration file.<p>
Note that the XML output is still under development.
<dt><b>Qt Help Project (.qhp)</b>
<dd>Generated if \c GENERATE_QHP is set to \c YES in the configuration file.
</dl>
......
......@@ -277,7 +277,6 @@ QCString ClassDef::getMemberListFileName() const
QCString ClassDef::displayName() const
{
static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
QCString n;
......@@ -285,11 +284,7 @@ QCString ClassDef::displayName() const
{
n = VhdlDocGen::getClassName(this);
}
else if (hideScopeNames)
{
n=m_impl->className;
}
else
else
{
n=qualifiedNameWithTemplateParameters();
}
......@@ -1450,9 +1445,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
LayoutDocEntry *lde;
......@@ -1544,154 +1536,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
}
}
#else // old fixed layout
//printf("Class %s brief=`%s' doc=`%s'\n",name().data(),briefDescription().data(),documentation().data());
//ol.startTextBlock();
// write brief description
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeBriefDescription(ol,exampleFlag);
}
writeIncludeFiles(ol);
writeInheritanceGraph(ol);
writeCollaborationGraph(ol);
writeAllMembersLink(ol);
//ol.endTextBlock();
// write detailed description if the user wants it near the top
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,pageType,exampleFlag);
}
///////////////////////////////////////////////////////////////////////////
//// Member declarations + brief descriptions
///////////////////////////////////////////////////////////////////////////
startMemberDeclarations(ol);
// write member groups
writeMemberGroups(ol);
// public types
writeMemberDeclarations(ol,MemberList::pubTypes,theTranslator->trPublicTypes());
// public methods
writeMemberDeclarations(ol,MemberList::pubSlots,theTranslator->trPublicSlots());
writeMemberDeclarations(ol,MemberList::signals,theTranslator->trSignals());
writeMemberDeclarations(ol,MemberList::dcopMethods,theTranslator->trDCOPMethods());
writeMemberDeclarations(ol,MemberList::pubMethods,theTranslator->trPublicMembers());
writeMemberDeclarations(ol,MemberList::pubStaticMethods,theTranslator->trStaticPublicMembers());
// public attribs
writeMemberDeclarations(ol,MemberList::pubAttribs,theTranslator->trPublicAttribs());
writeMemberDeclarations(ol,MemberList::pubStaticAttribs,theTranslator->trStaticPublicAttribs());
// protected types
writeMemberDeclarations(ol,MemberList::proTypes,theTranslator->trProtectedTypes());
// protected methods
writeMemberDeclarations(ol,MemberList::proSlots,theTranslator->trProtectedSlots());
writeMemberDeclarations(ol,MemberList::proMethods,theTranslator->trProtectedMembers());
writeMemberDeclarations(ol,MemberList::proStaticMethods,theTranslator->trStaticProtectedMembers());
// protected attribs
writeMemberDeclarations(ol,MemberList::proAttribs,theTranslator->trProtectedAttribs());
writeMemberDeclarations(ol,MemberList::proStaticAttribs,theTranslator->trStaticProtectedAttribs());
// package types
writeMemberDeclarations(ol,MemberList::pacTypes,theTranslator->trPackageTypes());
// package methods
writeMemberDeclarations(ol,MemberList::pacMethods,theTranslator->trPackageMembers());
writeMemberDeclarations(ol,MemberList::pacStaticMethods,theTranslator->trStaticPackageMembers());
// package attribs
writeMemberDeclarations(ol,MemberList::pacAttribs,theTranslator->trPackageAttribs());
writeMemberDeclarations(ol,MemberList::pacStaticAttribs,theTranslator->trStaticPackageAttribs());
// package
writeMemberDeclarations(ol,MemberList::properties,theTranslator->trProperties());
// events
writeMemberDeclarations(ol,MemberList::events,theTranslator->trEvents());
if (Config_getBool("EXTRACT_PRIVATE"))
{
// private types
writeMemberDeclarations(ol,MemberList::priTypes,theTranslator->trPrivateTypes());
// private members
writeMemberDeclarations(ol,MemberList::priSlots,theTranslator->trPrivateSlots());
writeMemberDeclarations(ol,MemberList::priMethods,theTranslator->trPrivateMembers());
writeMemberDeclarations(ol,MemberList::priStaticMethods,theTranslator->trStaticPrivateMembers());
// private attribs
writeMemberDeclarations(ol,MemberList::priAttribs,theTranslator->trPrivateAttribs());
writeMemberDeclarations(ol,MemberList::priStaticAttribs,theTranslator->trStaticPrivateAttribs());
}
// friends
writeMemberDeclarations(ol,MemberList::friends,theTranslator->trFriends());
// related functions
writeMemberDeclarations(ol,MemberList::related,theTranslator->trRelatedFunctions(),
theTranslator->trRelatedSubscript()
);
writeNestedClasses(ol);
endMemberDeclarations(ol);
// write detailed description
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,pageType,exampleFlag);
}
///////////////////////////////////////////////////////////////////////////
//// Member definitions + detailed documentation
///////////////////////////////////////////////////////////////////////////
startMemberDocumentation(ol);
writeMemberDocumentation(ol,MemberList::typedefMembers,theTranslator->trMemberTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::enumMembers,theTranslator->trMemberEnumerationDocumentation());
writeMemberDocumentation(ol,MemberList::constructors,theTranslator->trConstructorDocumentation());
if (fortranOpt)
{
writeMemberDocumentation(ol,MemberList::functionMembers,theTranslator->trMemberFunctionDocumentationFortran());
}
else
{
writeMemberDocumentation(ol,MemberList::functionMembers,theTranslator->trMemberFunctionDocumentation());
}
writeMemberDocumentation(ol,MemberList::relatedMembers,theTranslator->trRelatedFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::variableMembers,theTranslator->trMemberDataDocumentation());
writeMemberDocumentation(ol,MemberList::propertyMembers,theTranslator->trPropertyDocumentation());
writeMemberDocumentation(ol,MemberList::eventMembers,theTranslator->trEventDocumentation());
endMemberDocumentation(ol);
/////////////////////////////////////////////////////////////////////
//ol.startTextBlock();
// write the list of used files (not for man pages)
showUsedFiles(ol);
// write Author section (Man only)
writeAuthorSection(ol);
//ol.endTextBlock();
/////////////////////////////////////////////////////////////////////
//---------------------------------------- end flexible part -------------------------------
#endif
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
writeDocAnchorsToTagFile();
......@@ -3154,30 +2998,34 @@ QCString ClassDef::qualifiedNameWithTemplateParameters(
QList<ArgumentList> *actualParams) const
{
static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
//printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data());
QCString scName;
Definition *d=getOuterScope();
if (d)
if (!hideScopeNames)
{
if (d->definitionType()==Definition::TypeClass)
{
ClassDef *cd=(ClassDef *)d;
scName = cd->qualifiedNameWithTemplateParameters(actualParams);
}
else
Definition *d=getOuterScope();
if (d)
{
scName = d->qualifiedName();
if (d->definitionType()==Definition::TypeClass)
{
ClassDef *cd=(ClassDef *)d;
scName = cd->qualifiedNameWithTemplateParameters(actualParams);
}
else
{
scName = d->qualifiedName();
}
}
}
QCString scopeSeparator;
if (optimizeOutputJava)
scopeSeparator=".";
else
scopeSeparator="::";
QCString scopeSeparator;
if (optimizeOutputJava)
scopeSeparator=".";
else
scopeSeparator="::";
if (!scName.isEmpty()) scName+=scopeSeparator;
scName+=localName();
if (!scName.isEmpty()) scName+=scopeSeparator;
}
scName+=m_impl->className;
ArgumentList *al=0;
bool isSpecialization = localName().find('<')!=-1;
if (templateArguments())
......
......@@ -2441,7 +2441,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_code->codify(yytext);
}
<SkipVerbString>\n {
g_code->codify(yytext);
codifyLines(yytext);
}
<Body>":" {
g_code->codify(yytext);
......
......@@ -61,6 +61,8 @@ static QStack<CondCtx> g_condStack;
static QCString g_blockName;
static int g_lastCommentContext;
static bool g_inSpecialComment;
static bool g_inRoseComment;
static int g_javaBlock;
static QCString g_aliasString;
static int g_blockCount;
......@@ -331,6 +333,7 @@ void replaceComment(int offset);
g_blockHeadCol=g_col;
copyToOutput("/**",3);
replaceAliases(yytext+i);
g_inRoseComment=TRUE;
BEGIN(SComment);
}
<Scan>"//"/.*\n { /* one line C++ comment */
......@@ -364,9 +367,17 @@ void replaceComment(int offset);
BEGIN(CComment);
}
}
<CComment>[ \t]+"{@code" {
copyToOutput(" @code",6);
g_lastCommentContext = YY_START;
g_javaBlock=1;
g_blockName=&yytext[1];
BEGIN(VerbatimCode);
}
<CComment,ReadLine>[\\@]("dot"|"code"|"msc")/[^a-z_A-Z0-9] { /* start of a verbatim block */
copyToOutput(yytext,yyleng);
g_lastCommentContext = YY_START;
g_javaBlock=0;
g_blockName=&yytext[1];
BEGIN(VerbatimCode);
}
......@@ -404,6 +415,31 @@ void replaceComment(int offset);
BEGIN(g_lastCommentContext);
}
}
<VerbatimCode>"{" {
if (g_javaBlock==0)
{
REJECT;
}
else
{
g_javaBlock++;
}
}
<VerbatimCode>"}" {
if (g_javaBlock==0)
{
REJECT;
}
else
{
g_javaBlock--;
if (g_javaBlock==0)
{
copyToOutput(" @endcode ",10);
BEGIN(g_lastCommentContext);
}
}
}
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc") { /* end of verbatim block */
copyToOutput(yytext,yyleng);
if (&yytext[4]==g_blockName)
......@@ -417,7 +453,7 @@ void replaceComment(int offset);
copyToOutput(yytext,yyleng);
}
}
<Verbatim,VerbatimCode>[^@\/\\\n]* { /* any character not a backslash or new line */
<Verbatim,VerbatimCode>[^@\/\\\n{}]* { /* any character not a backslash or new line or } */
copyToOutput(yytext,yyleng);
}
<Verbatim,VerbatimCode>\n { /* new line in verbatim block */
......@@ -552,19 +588,34 @@ void replaceComment(int offset);
BEGIN(ReadLine);
}
<SComment>^[ \t]*"//##"/.*\n {
replaceComment(0);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
if (!g_inRoseComment)
{
REJECT;
}
else
{
replaceComment(0);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
}
}
<SComment>\n[ \t]*"//##"/.*\n {
replaceComment(1);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
if (!g_inRoseComment)
{
REJECT;
}
else
{
replaceComment(1);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
}
}
<SComment>\n { /* end of special comment */
copyToOutput(" */",3);
copyToOutput(yytext,yyleng);
g_inSpecialComment=FALSE;
g_inRoseComment=FALSE;
BEGIN(Scan);
}
<ReadLine>[^\\@\n]*/\n {
......
......@@ -540,7 +540,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
item->listAnchor = anchorLabel;
docEntry->addSpecialListItem(listName,itemId);
QCString cmdString;
cmdString.sprintf("\\xrefitem %s %d\n",listName,itemId);
cmdString.sprintf("\\xrefitem %s %d.",listName,itemId);
if (inBody)
{
docEntry->inbodyDocs += cmdString;
......@@ -1237,6 +1237,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
{
current->name=current->name.left(current->name.length()-5);
}
current->type.resize(0);
BEGIN(GroupDocArg2);
}
<GroupDocArg1>"\\"{B}*"\n" { // line continuation
......@@ -2411,6 +2412,11 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
commentScanYYlex();
setOutput( OutputDoc );
if (YY_START==OverloadParam) // comment ended with \overload
{
addOutput(getOverloadDocs());
}
if (!guards.isEmpty())
{
warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!");
......@@ -2431,8 +2437,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
}
Debug::print(Debug::CommentScan,0,
"brief=[%s]\ndocs=[%s]\n===========\n",
current->brief.data(),current->doc.data()
"brief=[%s]\ndocs=[%s]\ninbody=[%s]\n===========\n",
current->brief.data(),current->doc.data(),current->inbodyDocs.data()
);
checkFormula();
......
......@@ -97,7 +97,7 @@ static int yyread(char *buf,int max_size)
%}
B [ \t]
ID ([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
%option nounput
%option noyywrap
......
......@@ -58,13 +58,14 @@ class DefinitionImpl
QList<ListItemInfo> *xrefListItems;
GroupList *partOfGroups;
DocInfo *details; // not exported
BriefInfo *brief; // not exported
BodyInfo *body; // not exported
DocInfo *details; // not exported
DocInfo *inbodyDocs; // not exported
BriefInfo *brief; // not exported
BodyInfo *body; // not exported
QCString docSignatures;
QCString localName; // local (unqualified) name of the definition
// in the future m_name should become m_localName
// in the future m_name should become m_localName
QCString qualifiedName;
QCString ref; // reference to external documentation
......@@ -82,7 +83,7 @@ class DefinitionImpl
DefinitionImpl::DefinitionImpl()
: sectionDict(0), sourceRefByDict(0), sourceRefsDict(0),
xrefListItems(0), partOfGroups(0),
details(0), brief(0), body(0),
details(0), inbodyDocs(0), brief(0), body(0),
outerScope(0)
{
}
......@@ -97,6 +98,7 @@ DefinitionImpl::~DefinitionImpl()
delete brief;
delete details;
delete body;
delete inbodyDocs;
}
void DefinitionImpl::init(const char *df,int dl,
......@@ -121,17 +123,18 @@ void DefinitionImpl::init(const char *df,int dl,
}
//printf("m_localName=%s\n",m_localName.data());
brief = 0;
details = 0;
body = 0;
sourceRefByDict=0;
sourceRefsDict=0;
sectionDict=0,
outerScope=Doxygen::globalScope;
partOfGroups=0;
xrefListItems=0;
hidden = FALSE;
isArtificial = FALSE;
brief = 0;
details = 0;
body = 0;
inbodyDocs = 0;
sourceRefByDict = 0;
sourceRefsDict = 0;
sectionDict = 0,
outerScope = Doxygen::globalScope;
partOfGroups = 0;
xrefListItems = 0;
hidden = FALSE;
isArtificial = FALSE;
}
//-----------------------------------------------------------------------------------------
......@@ -305,26 +308,6 @@ void Definition::setName(const char *name)
{
if (name==0) return;
m_name = name;
#if 0
makeResident();
if (m_isSymbol)
{
removeFromMap(this);
}
if (m_name!="<globalScope>")
{
//extractNamespaceName(m_name,m_localName,ns);
m_impl->localName=stripScope(m_name);
}
else
{
m_impl->localName=m_name;
}
if (m_isSymbol)
{
addToMap(m_name,this);
}
#endif
}
void Definition::addSectionsToDefinition(QList<SectionInfo> *anchorList)
......@@ -494,6 +477,31 @@ void Definition::setBriefDescription(const char *b,const char *briefFile,int bri
_setBriefDescription(b,briefFile,briefLine);
}
void Definition::_setInbodyDocumentation(const char *doc,const char *inbodyFile,int inbodyLine)
{
if (m_impl->inbodyDocs==0)
{
m_impl->inbodyDocs = new DocInfo;
}
if (m_impl->inbodyDocs->doc.isEmpty()) // fresh inbody docs
{
m_impl->inbodyDocs->doc = doc;
m_impl->inbodyDocs->file = inbodyFile;
m_impl->inbodyDocs->line = inbodyLine;
}
else // another inbody documentation fragment, append this to the end
{
m_impl->inbodyDocs->doc += QCString("\n\n")+doc;
}
}
void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine)
{
if (d==0) return;
makeResident();
_setInbodyDocumentation(d,inbodyFile,inbodyLine);
}
/*! Reads a fragment of code from file \a fileName starting at
* line \a startLine and ending at line \a endLine (inclusive). The fragment is
* stored in \a result. If FALSE is returned the code fragment could not be
......@@ -903,8 +911,9 @@ bool Definition::hasDocumentation() const
//static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
makeResident();
bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs
(m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description
(m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs
(m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description
(m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty()) || // has inbody docs
extractAll //|| // extract everything
// (sourceBrowser && m_impl->body &&
// m_impl->body->startLine!=-1 && m_impl->body->fileDef)
......@@ -916,8 +925,9 @@ bool Definition::hasUserDocumentation() const
{
makeResident();
bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) ||
(m_impl->brief && !m_impl->brief->doc.isEmpty());
(m_impl->details && !m_impl->details->doc.isEmpty()) ||
(m_impl->brief && !m_impl->brief->doc.isEmpty()) ||
(m_impl->inbodyDocs && !m_impl->inbodyDocs->doc.isEmpty());
return hasDocs;
}
......@@ -1204,6 +1214,8 @@ QCString Definition::symbolName() const
return m_symbolName;
}
//----------------------
QCString Definition::documentation() const
{
makeResident();
......@@ -1222,6 +1234,8 @@ QCString Definition::docFile() const
return m_impl->details ? m_impl->details->file : QCString("<"+m_name+">");
}
//----------------------
QCString Definition::briefDescription() const
{
makeResident();
......@@ -1266,6 +1280,29 @@ QCString Definition::briefFile() const
return m_impl->brief ? m_impl->brief->file : QCString("<"+m_name+">");
}
//----------------------
QCString Definition::inbodyDocumentation() const
{
makeResident();
return m_impl->inbodyDocs ? m_impl->inbodyDocs->doc : QCString("");
}
int Definition::inbodyLine() const
{
makeResident();
return m_impl->inbodyDocs ? m_impl->inbodyDocs->line : 1;
}
QCString Definition::inbodyFile() const
{
makeResident();
return m_impl->inbodyDocs ? m_impl->inbodyDocs->file : QCString("<"+m_name+">");
}
//----------------------
QCString Definition::getDefFileName() const
{
makeResident();
......@@ -1405,6 +1442,7 @@ void Definition::flushToDisk() const
marshalItemInfoList (Doxygen::symbolStorage,m_impl->xrefListItems);
marshalGroupList (Doxygen::symbolStorage,m_impl->partOfGroups);
marshalDocInfo (Doxygen::symbolStorage,m_impl->details);
marshalDocInfo (Doxygen::symbolStorage,m_impl->inbodyDocs);
marshalBriefInfo (Doxygen::symbolStorage,m_impl->brief);
marshalBodyInfo (Doxygen::symbolStorage,m_impl->body);
marshalQCString (Doxygen::symbolStorage,m_impl->docSignatures);
......@@ -1436,6 +1474,7 @@ void Definition::loadFromDisk() const
m_impl->xrefListItems = unmarshalItemInfoList (Doxygen::symbolStorage);
m_impl->partOfGroups = unmarshalGroupList (Doxygen::symbolStorage);
m_impl->details = unmarshalDocInfo (Doxygen::symbolStorage);
m_impl->inbodyDocs = unmarshalDocInfo (Doxygen::symbolStorage);
m_impl->brief = unmarshalBriefInfo (Doxygen::symbolStorage);
m_impl->body = unmarshalBodyInfo (Doxygen::symbolStorage);
m_impl->docSignatures = unmarshalQCString (Doxygen::symbolStorage);
......
......@@ -156,6 +156,16 @@ class Definition : public DefinitionIntf, public LockableObj
/*! Returns the line number at which the brief description was found. */
int briefLine() const;
/*! Returns the documentation found inside the body of a member */
QCString inbodyDocumentation() const;
/*! Returns the file in which the in body documentation was found */
QCString inbodyFile() const;
/*! Returns the line at which the first in body documentation
part was found */
int inbodyLine() const;
/*! Returns the file in which the brief description was found.
* This can differ from getDefFileName().
*/
......@@ -255,6 +265,12 @@ class Definition : public DefinitionIntf, public LockableObj
*/
void setBriefDescription(const char *b,const char *briefFile,int briefLine);
/*! Set the documentation that was found inside the body of an item.
* If there was already some documentation set, the new documentation
* will be appended.
*/
void setInbodyDocumentation(const char *d,const char *docFile,int docLine);
/*! Sets the tag file id via which this definition was imported. */
void setReference(const char *r);
......@@ -318,6 +334,7 @@ class Definition : public DefinitionIntf, public LockableObj
const QCString &text,MemberSDict *members,bool);
void _setBriefDescription(const char *b,const char *briefFile,int briefLine);
void _setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace,bool atTop);
void _setInbodyDocumentation(const char *d,const char *docFile,int docLine);
bool _docsAlreadyAdded(const QString &doc);
DefinitionImpl *m_impl; // internal structure holding all private data
QCString m_name;
......
......@@ -343,9 +343,6 @@ void DirDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Directory));
LayoutDocEntry *lde;
......@@ -410,35 +407,6 @@ void DirDef::writeDocumentation(OutputList &ol)
}
}
#else
// write brief or details (if DETAILS_AT_TOP)
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
else if (!briefDescription().isEmpty())
{
writeBriefDescription(ol);
}
writeDirectoryGraph(ol);
startMemberDeclarations(ol);
writeSubDirList(ol);
writeFileList(ol);
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
#endif
//---------------------------------------- end flexible part -------------------------------
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
......
......@@ -290,7 +290,7 @@ CMD ("\\"|"@")
WS [ \t\r\n]
NONWS [^ \t\r\n]
BLANK [ \t\r]
ID [a-z_A-Z][a-z_A-Z0-9]*
ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
MAILADR [a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+
OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
LISTITEM {BLANK}*{OPTSTARS}"-"("#")?{WS}
......@@ -773,7 +773,7 @@ REFWORD ("#"|"::")?({ID}{TEMPLPART}?("."|"#"|"::"|"-"|"/"))*({ID}(":")?){FUNCA
<St_XRefItem>" " {
BEGIN(St_XRefItem2);
}
<St_XRefItem2>[0-9]+{WS} {
<St_XRefItem2>[0-9]+"." {
QString numStr=yytext;
numStr=numStr.left(yyleng-1);
g_token->id=numStr.toInt();
......
......@@ -587,7 +587,8 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList *ml,ClassDef
if (mma->getClassDef() == scope)
{
t << prot << " " << convertLabel(mma->name());
if (!mma->isObjCMethod() && mma->isFunction()) t << "()";
if (!mma->isObjCMethod() &&
(mma->isFunction() || mma->isSlot() || mma->isSignal())) t << "()";
t << "\\l";
}
}
......@@ -2323,7 +2324,7 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance)
MemberDef *rmd;
for (;(rmd=mri.current());++mri)
{
if (rmd->isFunction())
if (rmd->isFunction() || rmd->isSlot() || rmd->isSignal())
{
QCString uniqueId;
uniqueId=rmd->getReference()+"$"+
......
This diff is collapsed.
......@@ -71,7 +71,7 @@ struct LookupInfo
QCString resolvedType;
};
extern QCString spaces;
extern QCString g_spaces;
/*! \brief This class serves as a namespace for global variables used by doxygen.
*
......@@ -130,11 +130,14 @@ class Doxygen
static bool userComments;
static IndexList indexList;
static int subpageNestingLevel;
static QCString spaces;
};
void initDoxygen();
void readConfiguration(int argc, char **argv);
void checkConfiguration();
void adjustConfiguration();
void searchInputFiles(StringList &inputFiles);
void parseInput();
void generateOutput();
void readAliases();
......
......@@ -530,9 +530,6 @@ void FileDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::File));
LayoutDocEntry *lde;
......@@ -627,62 +624,6 @@ void FileDef::writeDocumentation(OutputList &ol)
}
}
#else
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
else
{
writeBriefDescription(ol);
}
writeIncludeFiles(ol);
writeIncludeGraph(ol);
writeIncludedByGraph(ol);
writeSourceLink(ol);
startMemberDeclarations(ol);
writeNamespaceDeclarations(ol);
writeClassDeclarations(ol);
writeMemberGroups(ol);
writeMemberDeclarations(ol,MemberList::decDefineMembers,theTranslator->trDefines());
writeMemberDeclarations(ol,MemberList::decTypedefMembers,theTranslator->trTypedefs());
writeMemberDeclarations(ol,MemberList::decEnumMembers,theTranslator->trEnumerations());
writeMemberDeclarations(ol,MemberList::decFuncMembers,
fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
theTranslator->trFunctions()) ;
writeMemberDeclarations(ol,MemberList::decVarMembers,theTranslator->trVariables());
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
startMemberDocumentation(ol);
writeMemberDocumentation(ol,MemberList::docDefineMembers,theTranslator->trDefineDocumentation());
writeMemberDocumentation(ol,MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
writeMemberDocumentation(ol,MemberList::docFuncMembers,theTranslator->trFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::docVarMembers,theTranslator->trVariableDocumentation());
endMemberDocumentation(ol);
// write Author section (Man only)
writeAuthorSection(ol);
#endif
//---------------------------------------- end flexible part -------------------------------
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
......@@ -1056,6 +997,7 @@ void FileDef::addIncludedUsingDirectives()
{
if (ii->fileDef && ii->fileDef!=this)
{
// add using directives
NamespaceSDict *unl = ii->fileDef->usingDirList;
if (unl)
{
......@@ -1073,6 +1015,25 @@ void FileDef::addIncludedUsingDirectives()
}
}
}
// add using declarations
SDict<Definition> *udl = ii->fileDef->usingDeclList;
if (udl)
{
SDict<Definition>::Iterator udi(*udl);
Definition *d;
for (udi.toLast();(d=udi.current());--udi)
{
//printf("Adding using declaration %s\n",d->name().data());
if (usingDeclList==0)
{
usingDeclList = new SDict<Definition>(17);
}
if (usingDeclList->find(d->qualifiedName())==0)
{
usingDeclList->prepend(d->qualifiedName(),d);
}
}
}
}
}
}
......
......@@ -345,10 +345,10 @@ static void addDocCrossReference(MemberDef *src, MemberDef *dst)
//-------------------------------------------------------------------------------
/**
searches for definition of a type
@param memberName the name of the type
@param tname the name of the type
@param moduleName name of enclosing module or null, if global entry
@param cd the entry, if found or null
@param useList array of data of USE-statement
@param useDict dictionary of data of USE-statement
@returns true, if type is found
*/
static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName,
......
......@@ -204,7 +204,7 @@ SEPARATE [:, \t]
ID [a-z_A-Z%]+{IDSYM}*
PP_ID {ID}
LABELID [a-z_A-Z]+[a-z_A-Z0-9\-]*
SUBPROG (subroutine|function)
SUBPROG (subroutine|function|block)
B [ \t]
BS [ \t]*
BS_ [ \t]+
......
......@@ -747,6 +747,7 @@ void FTVHelp::generateTreeView(QString* OutString)
else
{
QTextStream t(&f);
t.setEncoding(QTextStream::UnicodeUTF8);
t << *OutString << endl;
f.close();
}
......
......@@ -500,7 +500,7 @@ void GroupDef::computeAnchors()
void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
|| !documentation().isEmpty()
|| !documentation().isEmpty() || !inbodyDocumentation().isEmpty()
)
{
if (pageDict->count()!=countMembers()) // not only pages -> classical layout
......@@ -513,25 +513,25 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.startGroupHeader();
ol.parseText(title);
ol.endGroupHeader();
}
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
// write separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString("\n\n");
ol.popGeneratorState();
}
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
// write separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString("\n\n");
ol.popGeneratorState();
}
// write detailed documentation
......@@ -539,6 +539,12 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
}
// write inbody documentation
if (!inbodyDocumentation().isEmpty())
{
ol.parseDoc(inbodyFile(),inbodyLine(),this,0,inbodyDocumentation()+"\n",TRUE,FALSE);
}
}
}
......@@ -729,7 +735,7 @@ void GroupDef::writePageDocumentation(OutputList &ol)
ol.endSection(si->label,SectionInfo::Subsection);
}
ol.startTextBlock();
ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation(),TRUE,FALSE);
ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE);
ol.endTextBlock();
}
}
......@@ -822,9 +828,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Group));
LayoutDocEntry *lde;
......@@ -930,78 +933,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
}
#else
bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
else
{
writeBriefDescription(ol);
}
writeGroupGraph(ol);
startMemberDeclarations(ol);
writeFiles(ol);
writeNamespaces(ol);
writeNestedGroups(ol);
writeDirs(ol);
writeClasses(ol);
writeMemberGroups(ol);
writeMemberDeclarations(ol,MemberList::decDefineMembers,theTranslator->trDefines());
writeMemberDeclarations(ol,MemberList::decTypedefMembers,theTranslator->trTypedefs());
writeMemberDeclarations(ol,MemberList::decEnumMembers,theTranslator->trEnumerations());
writeMemberDeclarations(ol,MemberList::decEnumValMembers,theTranslator->trEnumerationValues());
writeMemberDeclarations(ol,MemberList::decFuncMembers,
fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
theTranslator->trFunctions());
writeMemberDeclarations(ol,MemberList::decVarMembers,theTranslator->trVariables());
writeMemberDeclarations(ol,MemberList::decSignalMembers,theTranslator->trSignals());
writeMemberDeclarations(ol,MemberList::decPubSlotMembers,theTranslator->trPublicSlots());
writeMemberDeclarations(ol,MemberList::decProSlotMembers,theTranslator->trProtectedSlots());
writeMemberDeclarations(ol,MemberList::decPriSlotMembers,theTranslator->trPrivateSlots());
writeMemberDeclarations(ol,MemberList::decEventMembers,theTranslator->trEvents());
writeMemberDeclarations(ol,MemberList::decPropMembers,theTranslator->trProperties());
writeMemberDeclarations(ol,MemberList::decFriendMembers,theTranslator->trFriends());
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
startMemberDocumentation(ol);
writePageDocumentation(ol);
writeMemberDocumentation(ol,MemberList::docDefineMembers,theTranslator->trDefineDocumentation());
writeMemberDocumentation(ol,MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumValMembers,theTranslator->trEnumerationValueDocumentation());
writeMemberDocumentation(ol,MemberList::docFuncMembers,fortranOpt?theTranslator->trSubprogramDocumentation():theTranslator->trFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::docVarMembers,theTranslator->trVariableDocumentation());
writeMemberDocumentation(ol,MemberList::docSignalMembers,theTranslator->trSignals()); // todo: add trSignalDocumentation()
writeMemberDocumentation(ol,MemberList::docPubSlotMembers,theTranslator->trPublicSlots()); // todo: add trSlotDocumentation()
writeMemberDocumentation(ol,MemberList::docProSlotMembers,theTranslator->trProtectedSlots()); // todo: add trSlotDocumentation()
writeMemberDocumentation(ol,MemberList::docPriSlotMembers,theTranslator->trPrivateSlots()); // todo: add trSlotDocumentation()
writeMemberDocumentation(ol,MemberList::docEventMembers,theTranslator->trEvents()); // todo: add trEventDocumentation()
writeMemberDocumentation(ol,MemberList::docPropMembers,theTranslator->trProperties()); // todo: add trPropertyDocumentation()
writeMemberDocumentation(ol,MemberList::docFriendMembers,theTranslator->trFriends()); // todo: add trFriendDocumentation()
endMemberDocumentation(ol);
#endif
//---------------------------------------- end flexible part -------------------------------
endFile(ol);
......
This diff is collapsed.
......@@ -1519,15 +1519,16 @@ void addClassMemberNameToIndex(MemberDef *md)
static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
ClassDef *cd=0;
if (vhdlOpt && (VhdlDocGen::isRecord(md) || VhdlDocGen::isUnit(md)))
{
VhdlDocGen::adjustRecordMember(md);
}
if (md->isLinkableInProject() &&
(cd=md->getClassDef()) &&
cd->isLinkableInProject() &&
cd->templateMaster()==0)
{
if (vhdlOpt && (VhdlDocGen::isRecord(md) || VhdlDocGen::isUnit(md)))
{
VhdlDocGen::adjustRecordMember(md);
}
QCString n = md->name();
int index = getPrefixIndex(n);
int letter = tolower(n.at(index)) & 0x7f;
......
......@@ -76,6 +76,8 @@ class IndexList : public IndexIntf
IndexList() { m_intfs.setAutoDelete(TRUE); }
void addIndex(IndexIntf *intf)
{ m_intfs.append(intf); }
// IndexIntf implementation
void initialize()
{ foreach(&IndexIntf::initialize); }
void finalize()
......
......@@ -1321,7 +1321,7 @@ void LatexGenerator::codify(const char *str)
case 0x0c: break; // remove ^L
case '\t': spacesToNextTabStop =
tabSize - (col%tabSize);
t << spaces.left(spacesToNextTabStop);
t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
case '\n': t << '\n'; col=0; break;
......
......@@ -464,6 +464,8 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandlerKind(this,LayoutDocEntry::FileIncludedByGraph,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/sourcelink",
new StartElementHandlerKind(this,LayoutDocEntry::FileSourceLink,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("file/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("file/memberdecl/classes",
......@@ -533,6 +535,8 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/groupgraph",
new StartElementHandlerKind(this,LayoutDocEntry::GroupGraph,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/memberdecl",
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("group/memberdecl/classes",
......
......@@ -30,7 +30,6 @@
" <collaborationgraph visible=\"$COLLABORATION_GRAPH\"/>\n"
" <allmemberslink visible=\"yes\"/>\n"
" <memberdecl>\n"
" <membergroups visible=\"yes\"/>\n"
" <nestedclasses visible=\"yes\" title=\"\"/>\n"
" <publictypes title=\"\"/>\n"
" <publicslots title=\"\"/>\n"
......@@ -60,6 +59,7 @@
" <privatestaticattributes title=\"\"/>\n"
" <friends title=\"\"/>\n"
" <related title=\"\" subtitle=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n"
" <detaileddescription title=\"\"/>\n"
" <memberdef>\n"
......@@ -82,11 +82,11 @@
" <memberdecl>\n"
" <nestednamespaces visible=\"yes\" title=\"\"/>\n"
" <classes visible=\"yes\" title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" <typedefs title=\"\"/>\n"
" <enums title=\"\"/>\n"
" <functions title=\"\"/>\n"
" <variables title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n"
" <detaileddescription title=\"\"/>\n"
" <memberdef>\n"
......@@ -113,6 +113,7 @@
" <enums title=\"\"/>\n"
" <functions title=\"\"/>\n"
" <variables title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n"
" <detaileddescription title=\"\"/>\n"
" <memberdef>\n"
......@@ -148,6 +149,7 @@
" <events title=\"\"/>\n"
" <properties title=\"\"/>\n"
" <friends title=\"\"/>\n"
" <membergroups visible=\"yes\"/>\n"
" </memberdecl>\n"
" <detaileddescription title=\"\"/>\n"
" <memberdef>\n"
......
......@@ -30,7 +30,6 @@
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<allmemberslink visible="yes"/>
<memberdecl>
<membergroups visible="yes"/>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<publicslots title=""/>
......@@ -60,6 +59,7 @@
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
......@@ -82,11 +82,11 @@
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<membergroups visible="yes"/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
......@@ -113,6 +113,7 @@
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
......@@ -148,6 +149,7 @@
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
......
......@@ -31,9 +31,9 @@
int main(int argc,char **argv)
{
initDoxygen();
readConfiguration(argc,argv);
checkConfiguration();
adjustConfiguration();
parseInput();
generateOutput();
return 0;
......
......@@ -304,7 +304,7 @@ void ManGenerator::codify(const char *str)
{
case '\t': spacesToNextTabStop =
Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
t << spaces.left(spacesToNextTabStop);
t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
case '\n': t << "\n"; firstCol=TRUE; col=0; break;
......
......@@ -296,6 +296,27 @@ static void writeTemplatePrefix(OutputList &ol,ArgumentList *al)
ol.docify("> ");
}
QCString extractDirection(QCString &docs)
{
QRegExp re("\\[[^\\]]+\\]"); // [...]
int l=0;
if (re.match(docs,0,&l)==0)
{
int inPos = docs.find("in", 1,FALSE);
int outPos = docs.find("out",1,FALSE);
bool input = inPos!=-1 && inPos<l;
bool output = outPos!=-1 && outPos<l;
if (input || output) // in,out attributes
{
docs = docs.mid(l); // strip attributes
if (input && output) return "[in,out]";
else if (input) return "[in]";
else if (output) return "[out]";
}
}
return QCString();
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
......@@ -380,9 +401,9 @@ class MemberDefImpl
QCString cachedResolvedType;
// inbody documentation
int inbodyLine;
QCString inbodyFile;
QCString inbodyDocs;
//int inbodyLine;
//QCString inbodyFile;
//QCString inbodyDocs;
// documentation inheritance
MemberDef *docProvider;
......@@ -547,7 +568,7 @@ void MemberDefImpl::init(Definition *def,
docsForDefinition = TRUE;
isTypedefValCached = FALSE;
cachedTypedefValue = 0;
inbodyLine = -1;
//inbodyLine = -1;
implOnly=FALSE;
groupMember = 0;
hasDocumentedParams = FALSE;
......@@ -828,7 +849,9 @@ bool MemberDef::isLinkableInProject() const
//printf("in a namespace but namespace not linkable!\n");
return FALSE; // in namespace but namespace not linkable
}
if (!m_impl->group && !m_impl->nspace && !m_impl->related && !m_impl->classDef && m_impl->fileDef && !m_impl->fileDef->isLinkableInProject())
if (!m_impl->group && !m_impl->nspace &&
!m_impl->related && !m_impl->classDef &&
m_impl->fileDef && !m_impl->fileDef->isLinkableInProject())
{
//printf("in a file but file not linkable!\n");
return FALSE; // in file (and not in namespace) but file not linkable
......@@ -1548,7 +1571,8 @@ bool MemberDef::isDetailedSectionLinkable() const
bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
{
bool groupFilter = getGroupDef()==0 || inGroup;
static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES");
bool groupFilter = getGroupDef()==0 || inGroup || separateMemPages;
bool fileFilter = getNamespaceDef()==0 || !inFile;
bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter &&
......@@ -1950,22 +1974,23 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
/* write detailed description */
if (!detailed.isEmpty() || !m_impl->inbodyDocs.isEmpty())
if (!detailed.isEmpty() ||
!inbodyDocumentation().isEmpty())
{
ol.parseDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE);
if (!m_impl->inbodyDocs.isEmpty())
if (!inbodyDocumentation().isEmpty())
{
ol.newParagraph();
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_impl->inbodyDocs+"\n",TRUE,FALSE);
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE);
}
}
else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
!Config_getBool("BRIEF_MEMBER_DESC")))
{
if (!m_impl->inbodyDocs.isEmpty())
if (!inbodyDocumentation().isEmpty())
{
ol.newParagraph();
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,m_impl->inbodyDocs+"\n",TRUE,FALSE);
ol.parseDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE);
}
}
......@@ -1975,6 +2000,29 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// defArgList?defArgList->hasDocumentation():-1);
if (docArgList!=0 && docArgList->hasDocumentation())
{
QCString paramDocs;
ArgumentListIterator ali(*docArgList);
Argument *a;
// convert the parameter documentation into a list of @param commands
for (ali.toFirst();(a=ali.current());++ali)
{
if (a->hasDocumentation())
{
QCString direction = extractDirection(a->docs);
paramDocs+="@param"+direction+" "+a->name+" "+a->docs;
}
}
// feed the result to the documentation parser
ol.parseDoc(
docFile(),docLine(),
getOuterScope()?getOuterScope():container,
this, // memberDef
paramDocs, // docStr
TRUE, // indexWords
FALSE // isExample
);
#if 0 // old, now obsolete way to add parameter documentation
//printf("***** argumentList is documented\n");
ol.startParamList(BaseOutputDocInterface::Param,theTranslator->trParameters()+": ");
ol.writeDescItem();
......@@ -1988,6 +2036,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startDescTableTitle();
ol.docify(a->name);
ol.endDescTableTitle();
QCString doc = a->docs+"\n";
ol.startDescTableData();
ol.parseDoc(docFile(),docLine(),
getOuterScope()?getOuterScope():container,
......@@ -2001,6 +2050,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
ol.endDescTable();
ol.endParamList();
#endif
}
// For enum, we also write the documented enum values
......@@ -2013,6 +2063,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
MemberDef *fmd=fmdl->first();
while (fmd)
{
//printf("Enum: isLinkable()=%d\n",fmd->isLinkable());
if (fmd->isLinkable())
{
if (first)
......@@ -2237,7 +2288,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write call graph
if ((m_impl->hasCallGraph || Config_getBool("CALL_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT")
&& (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
)
{
DotCallGraph callGraph(this,FALSE);
......@@ -2253,7 +2304,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
if ((m_impl->hasCallerGraph || Config_getBool("CALLER_GRAPH"))
&& isFunction() && Config_getBool("HAVE_DOT")
&& (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
)
{
DotCallGraph callerGraph(this, TRUE);
......@@ -2390,17 +2441,17 @@ bool MemberDef::hasDocumentation() const
{
makeResident();
return Definition::hasDocumentation() ||
!m_impl->inbodyDocs.isEmpty() ||
(m_impl->mtype==Enumeration && m_impl->docEnumValues) || // has enum values
(m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments
}
#if 0
bool MemberDef::hasUserDocumentation() const
{
bool hasDocs = Definition::hasUserDocumentation() ||
(m_impl->inbodyDocs && !m_impl->inbodyDocs.isEmpty());
bool hasDocs = Definition::hasUserDocumentation();
return hasDocs;
}
#endif
void MemberDef::setMemberGroup(MemberGroup *grp)
......@@ -2929,6 +2980,7 @@ bool MemberDef::protectionVisible() const
(m_impl->prot==Package && Config_getBool("EXTRACT_PACKAGE"));
}
#if 0
void MemberDef::setInbodyDocumentation(const char *docs,
const char *docFile,int docLine)
{
......@@ -2938,6 +2990,7 @@ void MemberDef::setInbodyDocumentation(const char *docs,
m_impl->inbodyLine = docLine;
m_impl->inbodyFile = docFile;
}
#endif
bool MemberDef::isObjCMethod() const
{
......@@ -3380,6 +3433,7 @@ bool MemberDef::hasDocumentedReturnType() const
return m_impl->hasDocumentedReturnType;
}
#if 0
int MemberDef::inbodyLine() const
{
makeResident();
......@@ -3397,6 +3451,7 @@ const QCString &MemberDef::inbodyDocumentation() const
makeResident();
return m_impl->inbodyDocs;
}
#endif
ClassDef *MemberDef::relatedAlso() const
{
......@@ -3842,9 +3897,6 @@ void MemberDef::flushToDisk() const
marshalObjPointer (Doxygen::symbolStorage,m_impl->cachedTypedefValue);
marshalQCString (Doxygen::symbolStorage,m_impl->cachedTypedefTemplSpec);
marshalQCString (Doxygen::symbolStorage,m_impl->cachedResolvedType);
marshalInt (Doxygen::symbolStorage,m_impl->inbodyLine);
marshalQCString (Doxygen::symbolStorage,m_impl->inbodyFile);
marshalQCString (Doxygen::symbolStorage,m_impl->inbodyDocs);
marshalObjPointer (Doxygen::symbolStorage,m_impl->docProvider);
marshalQCString (Doxygen::symbolStorage,m_impl->explicitOutputFileBase);
marshalBool (Doxygen::symbolStorage,m_impl->implOnly);
......@@ -3942,9 +3994,6 @@ void MemberDef::loadFromDisk() const
m_impl->cachedTypedefValue = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->cachedTypedefTemplSpec = unmarshalQCString (Doxygen::symbolStorage);
m_impl->cachedResolvedType = unmarshalQCString (Doxygen::symbolStorage);
m_impl->inbodyLine = unmarshalInt (Doxygen::symbolStorage);
m_impl->inbodyFile = unmarshalQCString (Doxygen::symbolStorage);
m_impl->inbodyDocs = unmarshalQCString (Doxygen::symbolStorage);
m_impl->docProvider = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->explicitOutputFileBase = unmarshalQCString (Doxygen::symbolStorage);
m_impl->implOnly = unmarshalBool (Doxygen::symbolStorage);
......@@ -3969,6 +4018,7 @@ void MemberDef::loadFromDisk() const
void MemberDef::makeResident() const
{
if (Doxygen::symbolCache==0) return;
if (m_cacheHandle==-1) // not yet in cache
{
MemberDef *victim = 0;
......
......@@ -172,7 +172,7 @@ class MemberDef : public Definition
bool isLinkableInProject() const;
bool isLinkable() const;
bool hasDocumentation() const; // overrides hasDocumentation in definition.h
bool hasUserDocumentation() const; // overrides hasUserDocumentation
//bool hasUserDocumentation() const; // overrides hasUserDocumentation
bool isBriefSectionVisible() const;
bool isDetailedSectionVisible(bool inGroup,bool inFile) const;
bool isDetailedSectionLinkable() const;
......@@ -182,9 +182,9 @@ class MemberDef : public Definition
MemberDef *reimplements() const;
LockingPtr<MemberList> reimplementedBy() const;
int inbodyLine() const;
QCString inbodyFile() const;
const QCString &inbodyDocumentation() const;
//int inbodyLine() const;
//QCString inbodyFile() const;
//const QCString &inbodyDocumentation() const;
ClassDef *relatedAlso() const;
......@@ -269,7 +269,7 @@ class MemberDef : public Definition
void insertReimplementedBy(MemberDef *md);
// in-body documentation
void setInbodyDocumentation(const char *docs,const char *file,int line);
//void setInbodyDocumentation(const char *docs,const char *file,int line);
void setRelatedAlso(ClassDef *cd);
......
......@@ -217,7 +217,6 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
case MemberDef::Enumeration:
{
if (first) ol.startMemberList(),first=FALSE;
int enumVars=0;
MemberListIterator vmli(*this);
MemberDef *vmd;
......@@ -240,6 +239,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here
{
//printf("Enum!!\n");
if (first) ol.startMemberList(),first=FALSE;
ol.startMemberItem(0);
ol.writeString("enum ");
ol.insertMemberAlign();
......@@ -279,6 +280,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
case MemberDef::EnumValue:
{
if (!m_inGroup) return;
printf("EnumValue!\n");
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
}
......@@ -360,7 +363,6 @@ void MemberList::writeDeclarations(OutputList &ol,
writePlainDeclarations(ol,cd,nd,fd,gd);
}
//printf("memberGroupList=%p\n",memberGroupList);
if (memberGroupList)
{
......
......@@ -414,9 +414,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
#define NEW_LAYOUT
#ifdef NEW_LAYOUT // new flexible layout
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace));
LayoutDocEntry *lde;
......@@ -503,59 +500,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
}
}
#else // old fixed layout
bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
//ol.startTextBlock();
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeBriefDescription(ol);
}
//ol.endTextBlock();
startMemberDeclarations(ol);
writeClassDeclarations(ol);
writeNamespaceDeclarations(ol);
writeMemberGroups(ol);
writeMemberDeclarations(ol,MemberList::decDefineMembers,theTranslator->trDefines());
writeMemberDeclarations(ol,MemberList::decTypedefMembers,theTranslator->trTypedefs());
writeMemberDeclarations(ol,MemberList::decEnumMembers,theTranslator->trEnumerations());
writeMemberDeclarations(ol,MemberList::decFuncMembers,
fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
theTranslator->trFunctions());
writeMemberDeclarations(ol,MemberList::decVarMembers,theTranslator->trVariables());
endMemberDeclarations(ol);
if (!Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDescription(ol,theTranslator->trDetailedDescription());
}
startMemberDocumentation(ol);
writeMemberDocumentation(ol,MemberList::docDefineMembers,theTranslator->trDefineDocumentation());
writeMemberDocumentation(ol,MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation());
writeMemberDocumentation(ol,MemberList::docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
writeMemberDocumentation(ol,MemberList::docFuncMembers,fortranOpt?theTranslator->trSubprogramDocumentation():theTranslator->trFunctionDocumentation());
writeMemberDocumentation(ol,MemberList::docVarMembers,theTranslator->trVariableDocumentation());
endMemberDocumentation(ol);
writeAuthorSection(ol);
#endif
//---------------------------------------- end flexible part -------------------------------
endFile(ol);
......
......@@ -167,7 +167,7 @@ void PageDef::writePageDocumentation(OutputList &ol)
docLine(), // startLine
this, // context
0, // memberdef
documentation(), // docStr
documentation()+inbodyDocumentation(), // docStr
TRUE, // index words
FALSE // not an example
);
......
......@@ -2005,7 +2005,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCComment,SkipVerbatim>. {
outputChar(*yytext);
}
<CopyCComment>[^*a-z_A-Z]+ {
<CopyCComment>[^*a-z_A-Z\n]+ {
g_defLitText+=yytext;
g_defText+=escapeAt(yytext);
}
......@@ -2017,7 +2017,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<CopyCComment>\n {
g_yyLineNr++;
g_defLitText+=yytext;
g_defText+=yytext;
g_defText+=' ';
}
<RemoveCComment>"*/" { BEGIN(g_lastCContext); }
<RemoveCComment>"//"
......
......@@ -1754,7 +1754,7 @@ void RTFGenerator::codify(const char *str)
switch(c)
{
case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
t << spaces.left(spacesToNextTabStop);
t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
case '\n': newParagraph();
......
......@@ -2509,7 +2509,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
*pCopyRoundGString+=yytext;
}
}
<GCopyRound>[^"'()\n]+ {
<GCopyRound>[^"'()\n/]+ {
*pCopyRoundGString+=yytext;
}
<GCopyRound>. {
......@@ -4323,10 +4323,10 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->spec |= Entry::Template;
current->tArgLists->append(al);
currentArgumentList = al;
//current->name+="<";
templateStr="<";
current->name += "<";
fullArgString = templateStr;
copyArgString = &current->args;
copyArgString = &current->name;
currentArgumentContext = ClassVar;
BEGIN( ReadTempArgs );
}
......@@ -4880,12 +4880,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
//printf("Start doc block at %d\n",yyLineNr);
removeSlashes=(yytext[1]=='/');
tmpDocType=-1;
#if 0
if (YY_START!=SkipCurly)
{
current->doc.resize(0);
}
#endif
if (!current->doc.isEmpty())
{
current->doc+="\n\n";
......@@ -4895,16 +4889,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->docLine = yyLineNr;
current->docFile = yyFileName;
}
//
lastDocContext = YY_START;
if (current_root->section & Entry::SCOPE_MASK)
{
current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
}
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
......@@ -4915,16 +4904,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->briefLine = yyLineNr;
current->briefFile = yyFileName;
}
#if 0
if (!docBlockInBody)
{
current->doc.resize(0);
if (docBlockAutoBrief)
{
current->brief.resize(0);
}
}
#endif
startCommentBlock(FALSE);
BEGIN( DocBlock );
}
......@@ -4936,10 +4915,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
if (current_root->section & Entry::SCOPE_MASK)
{
current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
}
current->docLine = yyLineNr;
current->docFile = yyFileName;
......@@ -4952,37 +4927,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->briefLine = yyLineNr;
current->briefFile = yyFileName;
}
#if 0
if (!docBlockInBody)
{
current->doc.resize(0);
if (docBlockAutoBrief)
{
current->brief.resize(0);
}
}
#endif
startCommentBlock(FALSE);
BEGIN( DocBlock );
}
<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"//!" {
#if 0
if (YY_START!=SkipCurly)
{
current->brief.resize(0);
current->briefFile=yyFileName;
current->briefLine=yyLineNr;
}
#endif
tmpDocType=-1;
lastDocContext = YY_START;
if (current_root->section & Entry::SCOPE_MASK)
{
current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
}
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
......@@ -4992,23 +4945,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
BEGIN( DocLine );
}
<FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"///"/[^/] {
#if 0
if (YY_START!=SkipCurly)
{
current->brief.resize(0);
current->briefFile=yyFileName;
current->briefLine=yyLineNr;
}
#endif
tmpDocType=-1;
lastDocContext = YY_START;
if (current_root->section & Entry::SCOPE_MASK)
{
current->inside = current_root->name+"::";
//if (current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupInside = current->inside.copy();
//}
}
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
......
......@@ -393,6 +393,7 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
{
MemberNameIterator mni(*mn);
MemberDef *tmd=0;
int minDist=-1;
for (;(tmd=mni.current());++mni)
{
//printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
......@@ -400,12 +401,11 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
// tmd->getOuterScope()->name().data(), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
{
// look if resScope is visible within tmd->getOuterScope()
Definition *d = tmd->getOuterScope();
while (d && d!=resScope) d=d->getOuterScope();
if (d)
int dist=isAccessibleFrom(resScope,0,tmd);
if (dist!=-1 && (md==0 || dist<minDist))
{
md=tmd;
md = tmd;
minDist = dist;
}
}
}
......@@ -771,6 +771,7 @@ bool accessibleViaUsingClass(const SDict<Definition> *cl,
const QCString &explicitScopePart=""
)
{
//printf("accessibleViaUsingClass(%p)\n",cl);
if (cl) // see if the class was imported via a using statement
{
SDict<Definition>::Iterator cli(*cl);
......@@ -2110,6 +2111,7 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t
QCString transcodeCharacterStringToUTF8(const QCString &input)
{
bool error=FALSE;
static QCString inputEncoding = Config_getString("INPUT_ENCODING");
const char *outputEncoding = "UTF-8";
if (inputEncoding.isEmpty() || qstricmp(inputEncoding,outputEncoding)==0) return input;
......@@ -2121,27 +2123,30 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
{
err("Error: unsupported character conversion: '%s'->'%s'\n",
inputEncoding.data(),outputEncoding);
exit(1);
error=TRUE;
}
size_t iLeft=inputSize;
size_t oLeft=outputSize;
const char *inputPtr = input.data();
char *outputPtr = output.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
if (!error)
{
outputSize-=oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
}
else
{
err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
inputEncoding.data(),outputEncoding);
exit(1);
size_t iLeft=inputSize;
size_t oLeft=outputSize;
const char *inputPtr = input.data();
char *outputPtr = output.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
outputSize-=oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
}
else
{
err("Error: failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n",
inputEncoding.data(),outputEncoding,input.data());
error=TRUE;
}
}
portable_iconv_close(cd);
return output;
return error ? input : output;
}
/*! reads a file with name \a name and returns it as a string. If \a filter
......@@ -5440,7 +5445,16 @@ QCString substituteTemplateArgumentsInString(
++formAli,actArg=actualArgs->next()
)
{
//printf("formArg->type=%s\n",formArg->type.data());
if (formArg->type.left(6)=="class " && formArg->name.isEmpty())
{
formArg->name = formArg->type.mid(6);
formArg->type = "class";
}
if (formArg->type.left(9)=="typename " && formArg->name.isEmpty())
{
formArg->name = formArg->type.mid(9);
formArg->type = "typename";
}
if (formArg->type=="class" || formArg->type=="typename" || formArg->type.left(8)=="template")
{
//printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n",
......@@ -5453,7 +5467,7 @@ QCString substituteTemplateArgumentsInString(
result += actArg->type+" ";
}
else // for case where the actual arg is something like "unsigned int"
// the "int" part is in actArg->name.
// the "int" part is in actArg->name.
{
result += actArg->type+" "+actArg->name+" ";
}
......@@ -5481,7 +5495,7 @@ QCString substituteTemplateArgumentsInString(
result+=name.right(name.length()-p);
//printf(" Inheritance relation %s -> %s\n",
// name.data(),result.data());
return result;
return result.stripWhiteSpace();
}
......
......@@ -587,47 +587,57 @@ static void addOneTextLine(QCString& ss )
/* start command character */
/* -------------- VHDL SECTION -----------------------------------*/
B [ \t]
CR [\r\n]
BR [ \t\n\r]
LETTER [a-zA-Z_0-9]
NAME {LETTER}[a-zA-Z0-9_.]*
FUNCNAME [a-zA-Z"][*+\-_a-zA-Z0-9"\/=<>]*
DIGITS [0-9]+|[0-9]+"."[0-9]+|[0-9]+"#"[0-9_a-fA-F\+\.]+"#"
COMMENT "--"[^\n]*
LABELID [a-z_A-Z][^\;]*";"({B}*{COMMENT})*
PROTO [ (]*
TEXTT "--"[^\/\@\*\#][^\n]*
PROC ("function"|"procedure")
ENDE ({BR}*("end"){BR}*{PROC}*{BR}*[;]{1})
ENDEFF ("if"|"case"|"loop"|"generate"){BR}*[;]
ENDE3 ({BR}*("end"){BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;])|{ENDE}
ENDFUNC {B}*"end"{BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;]
FUNCIMPURE "impure"|"pure"
FUNCPROC ^{B}*{FUNCIMPURE}*{BR}*("function"|"procedure"){B}*
ARCHITECTURE ("architecture"){BR}+{NAME}{BR}*("of")
B [ \t]
CR [\r\n]
BR [ \t\n\r]
DIGIT [0-9]
LOWER_CASE_LETTER [a-z]
UPPER_CASE_LETTER [A-Z]
LETTER [a-zA-Z_0-9]
SPACE_CHARACTER [ \t]
SPECIAL_CHARACTER [#&'()*+,\-\./:;<=>_|]
OTHER_SPECIAL_CHARACTER [~!$§%?@\[\\\]^{}]
BASIC_GRAPHIC_CHARACTER {UPPER_CASE_LETTER}|{DIGIT}|{SPECIAL_CHARACTER}|{SPACE_CHARACTER}
GRAPHIC_CHARACTER {BASIC_GRAPHIC_CHARACTER}|{LOWER_CASE_LETTER}|{OTHER_SPECIAL_CHARACTER}
NAME {LETTER}[a-zA-Z0-9_.]*
STRING_LITERAL \"{GRAPHIC_CHARACTER}*\"
FUNCNAME [a-zA-Z"][*+\-_a-zA-Z0-9"\/=<>]*
DIGITS [0-9]+|[0-9]+"."[0-9]+|[0-9]+"#"[0-9_a-fA-F\+\.]+"#"
COMMENT "--"[^\n]*
LABELID [a-z_A-Z][^\;]*";"({B}*{COMMENT})*
PROTO [ (]*
TEXTT "--"[^\/\@\*\#][^\n]*
PROC ("function"|"procedure")
ENDE ({BR}*("end"){BR}*{PROC}*{BR}*[;]{1})
ENDEFF ("if"|"case"|"loop"|"generate"){BR}*[;]
ENDE3 ({BR}*("end"){BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;])|{ENDE}
ENDFUNC {B}*"end"{BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;]
FUNCIMPURE "impure"|"pure"
FUNCPROC ^{B}*{FUNCIMPURE}*{BR}*("function"|"procedure"){B}*
ARCHITECTURE ("architecture"){BR}+{NAME}{BR}*("of")
/* Removed due to bug 538239
POST "postponed"
PROCESS ({BR}*{FUNCNAME}{B}*[:]{BR}*({POST}{BR}+)?("process"){BR}*{PROTO})|("process"){BR}*("("){BR}*{PROTO}|[^a-zA-Z]("process"){CR}|[^a-zA-Z]("process"){BR}+("is")
*/
PROCESS ({B}*{FUNCNAME}{B}*:{BR}*)?({B}*("postponed"){BR}+)?{B}*("process"){BR}*{PROTO}
PROCESS ({B}*{FUNCNAME}{B}*:{BR}*)?({B}*("postponed"){BR}+)?{B}*("process"){BR}*{PROTO}
ENDPROCESS ("end"){BR}*("postponed")*("process"){BR}*{FUNCNAME}*{BR}*[;]
LIBUSE ^{B}*("use"|"library"){BR}+
ENTITY ^{B}*("component"|"entity"|"package"){BR}+
PBODY ("package"){B}+("body"){BR}+{NAME}
SHARED ("shared"){BR}+("variable")
SIGTYPES ^{B}*({SHARED}|"alias"|"file"|"group"|"subtype"|"type"|"constant"|"attribute"|"signal"|"units"){BR}+
CONFIG ("configuration"){BR}+{NAME}{BR}*("of"){BR}+{NAME}{BR}+"is"
ENDPROCESS ("end"){BR}*("postponed")*("process"){BR}*{FUNCNAME}*{BR}*[;]
LIBUSE ^{B}*("use"|"library"){BR}+
ENTITY ^{B}*("component"|"entity"|"package"){BR}+
PBODY ("package"){B}+("body"){BR}+{NAME}
SHARED ("shared"){BR}+("variable")
SIGTYPES ^{B}*({SHARED}|"alias"|"file"|"group"|"subtype"|"type"|"constant"|"attribute"|"signal"|"units"){BR}+
CONFIG ("configuration"){BR}+{NAME}{BR}*("of"){BR}+{NAME}{BR}+"is"
ALLTYPESMAP {B}*[_a-zA-ZA_Z0-9.() ]*{B}*
MAPCOMPONENT ({ALLTYPESMAP}{BR}*[:]{BR}*("component"|"configuration")*{ALLTYPESMAP}{BR}*{TEXTT}*{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
MAPCOMPONENT1 ({ALLTYPESMAP}{BR}*[:]{BR}*("entity"){BR}*{ALLTYPESMAP}{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
ALLTYPESMAP {B}*[_a-zA-ZA_Z0-9.() ]*{B}*
MAPCOMPONENT ({ALLTYPESMAP}{BR}*[:]{BR}*("component"|"configuration")*{ALLTYPESMAP}{BR}*{TEXTT}*{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
MAPCOMPONENT1 ({ALLTYPESMAP}{BR}*[:]{BR}*("entity"){BR}*{ALLTYPESMAP}{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
BRACEOPEN [(]{1}
BRACECLOSE [)]{1}
BRACEOPEN [(]{1}
BRACECLOSE [)]{1}
ALLID [^;()\t ]
ALLID [^;()\t ]
%option noyywrap
......@@ -1470,6 +1480,15 @@ ALLID [^;()\t ]
lineCount();
}
<*>{STRING_LITERAL} {
// Make sure string literals get transfered to the output
// We have to match these because the comment characters (--)
// can exist inside a string literal.
// We shouldn't have to call lineCount because newlines
// are not allowed inside string literals
addText(yytext,yyleng);
}
/*
<*>{BR}*"--!"{B}*"@}" { // end group
if (current)
......
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