Commit 08b4b96e authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.3.6-20040427

parent f08c77a2
DOXYGEN Version 1.3.6-20040413 DOXYGEN Version 1.3.6-20040427
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (13 April 2004) Dimitri van Heesch (27 April 2004)
DOXYGEN Version 1.3.6_20040413 DOXYGEN Version 1.3.6_20040427
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (13 April 2004) Dimitri van Heesch (dimitri@stack.nl) (27 April 2004)
1.3.6-20040413 1.3.6-20040427
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
#include "inputbool.h" #include "inputbool.h"
#include "pagewidget.h" #include "pagewidget.h"
#if QT_VERSION >= 300
#include <qstylefactory.h>
#else
#include <qwindowsstyle.h> #include <qwindowsstyle.h>
#endif
#include <qlayout.h> #include <qlayout.h>
InputBool::InputBool( const QString & text, PageWidget * parent, bool &flag ) InputBool::InputBool( const QString & text, PageWidget * parent, bool &flag )
...@@ -25,9 +29,13 @@ InputBool::InputBool( const QString & text, PageWidget * parent, bool &flag ) ...@@ -25,9 +29,13 @@ InputBool::InputBool( const QString & text, PageWidget * parent, bool &flag )
layout->addWidget(cb); layout->addWidget(cb);
layout->addStretch(10); layout->addStretch(10);
#if QT_VERSION >= 300
QStyle *winStyle = QStyleFactory::create("windows");
#else
QWindowsStyle *winStyle = new QWindowsStyle(); QWindowsStyle *winStyle = new QWindowsStyle();
#endif
cb->setChecked( flag ); cb->setChecked( flag );
cb->setStyle( winStyle ); if (winStyle) cb->setStyle( winStyle );
cb->setMinimumSize( sizeHint() ); cb->setMinimumSize( sizeHint() );
connect( cb, SIGNAL(toggled(bool)), SLOT(setState(bool)) ); connect( cb, SIGNAL(toggled(bool)), SLOT(setState(bool)) );
......
...@@ -397,6 +397,10 @@ echo "using $f_perl"; ...@@ -397,6 +397,10 @@ echo "using $f_perl";
test -f .makeconfig && rm .makeconfig test -f .makeconfig && rm .makeconfig
test -f .tmakeconfig && rm .tmakeconfig test -f .tmakeconfig && rm .tmakeconfig
if test -z $PWD; then
PWD=`pwd`
fi
cat > .makeconfig <<EOF cat > .makeconfig <<EOF
DOXYGEN = $PWD DOXYGEN = $PWD
TMAKEPATH = $PWD/tmake/lib/$f_platform TMAKEPATH = $PWD/tmake/lib/$f_platform
......
...@@ -31,6 +31,6 @@ clean: ...@@ -31,6 +31,6 @@ clean:
language: language.doc language: language.doc
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.py language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.py
python translator.pl python translator.py
FORCE: FORCE:
...@@ -922,9 +922,28 @@ ALIASES = "english=\if english" \ ...@@ -922,9 +922,28 @@ ALIASES = "english=\if english" \
\addindex \\param \addindex \\param
Starts a parameter description for a function parameter with name Starts a parameter description for a function parameter with name
\<parameter-name\>. Followed by a description of the parameter. \<parameter-name\>. Followed by a description of the parameter.
The existence of the parameter is not checked. The existence of the parameter is checked and a warning is given if
The text of the paragraph has no special internal structure. All visual the documentation of this (or any other) parameter is missing or not
enhancement commands may be used inside the paragraph. present in the function declaration or definition.
The \\param command has an optional attribute specifying the direction
of the attribute. Possible values are "in" and "out". Here is an example
for the function memcpy:
\code
/*!
* Copies bytes from a source memory area to a destination memory area,
* where both areas may not overlap.
* @param[out] dest The memory area to copy to.
* @param[in] src The memory area to copy from.
* @param[in] n The number of bytes to copy
*/
void memcpy(void *dest, const void *src, size_t n);
\endcode
If a parameter is both input and output, use [in,out] as an attribute.
The parameter description is a paragraph with no special internal structure.
All visual enhancement commands may be used inside the paragraph.
Multiple adjacent \\param commands will be joined into a single paragraph. Multiple adjacent \\param commands will be joined into a single paragraph.
Each parameter description will start on a new line. Each parameter description will start on a new line.
The \\param description ends when a blank line or some other The \\param description ends when a blank line or some other
......
...@@ -26,8 +26,8 @@ Version: $(VERSION) ...@@ -26,8 +26,8 @@ Version: $(VERSION)
\endif \endif
<h2>Introduction</h2> <h2>Introduction</h2>
Doxygen is a documentation system for C++, C, Java, IDL Doxygen is a documentation system for C++, C, Java, Objective-C, IDL
(Corba and Microsoft flavors) and to some extent Objective-C, PHP, C# and D. (Corba and Microsoft flavors) and to some extent PHP, C# and D.
It can help you in three ways: It can help you in three ways:
<ol> <ol>
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
but is much less tricky and much more flexible. It also solves some but is much less tricky and much more flexible. It also solves some
problems that were not solved by the Perl version. The translator report problems that were not solved by the Perl version. The translator report
content should be more useful for developers. content should be more useful for developers.
2004/02/11 2004/02/11 - Some tuning-up to provide more useful information.
- Some tuning-up to provide more useful information. 2004/04/16 - Added new tokens to the tokenizer (to remove some warnings).
""" """
import os, re, sys, textwrap import os, re, sys, textwrap
...@@ -127,6 +127,8 @@ class Transl: ...@@ -127,6 +127,8 @@ class Transl:
'"': 'dquot', '"': 'dquot',
'.': 'dot', '.': 'dot',
'%': 'perc', '%': 'perc',
'~': 'tilde',
'^': 'caret',
} }
# Regular expression for recognizing identifiers. # Regular expression for recognizing identifiers.
...@@ -180,7 +182,7 @@ class Transl: ...@@ -180,7 +182,7 @@ class Transl:
else: else:
msg = '\aWarning: unknown token "' + tokenStr + '"' msg = '\aWarning: unknown token "' + tokenStr + '"'
msg += '\tfound on line %d' % tokenLineNo msg += '\tfound on line %d' % tokenLineNo
msg += 'in "' + self.fname + '".\n' msg += ' in "' + self.fname + '".\n'
sys.stderr.write(msg) sys.stderr.write(msg)
yield (tokenId, tokenStr, tokenLineNo) yield (tokenId, tokenStr, tokenLineNo)
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3.6_20040413 Version: 1.3.6_20040427
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "qdatastream.h" #include "qdatastream.h"
#include <ctype.h> #include <ctype.h>
// NOT REVISED // NOT REVISED
/*! /*!
\class QGDict qgdict.h \class QGDict qgdict.h
...@@ -87,8 +86,8 @@ public: ...@@ -87,8 +86,8 @@ public:
int QGDict::hashKeyString( const QString &key ) int QGDict::hashKeyString( const QString &key )
{ {
#if defined(CHECK_NULL) #if defined(CHECK_NULL)
if ( key.isNull() ) if ( key.isNull() )
qWarning( "QGDict::hashStringKey: Invalid null key" ); qWarning( "QGDict::hashStringKey: Invalid null key" );
#endif #endif
int i; int i;
register uint h=0; register uint h=0;
......
...@@ -129,8 +129,10 @@ ClassDef::~ClassDef() ...@@ -129,8 +129,10 @@ ClassDef::~ClassDef()
QCString ClassDef::displayName() const QCString ClassDef::displayName() const
{ {
static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
QCString n; QCString n;
if (Config_getBool("HIDE_SCOPE_NAMES")) if (hideScopeNames)
{ {
n=m_className; n=m_className;
} }
...@@ -138,7 +140,7 @@ QCString ClassDef::displayName() const ...@@ -138,7 +140,7 @@ QCString ClassDef::displayName() const
{ {
n=qualifiedNameWithTemplateParameters(); n=qualifiedNameWithTemplateParameters();
} }
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) if (optimizeOutputForJava)
{ {
n=substitute(n,"::","."); n=substitute(n,"::",".");
} }
...@@ -1932,10 +1934,15 @@ bool ClassDef::hasDocumentation() const ...@@ -1932,10 +1934,15 @@ bool ClassDef::hasDocumentation() const
// returns TRUE iff class definition `bcd' represents an (in)direct base // returns TRUE iff class definition `bcd' represents an (in)direct base
// class of class definition `cd'. // class of class definition `cd'.
bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances) bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
{ {
bool found=FALSE; bool found=FALSE;
//printf("isBaseClass(cd=%s) looking for %s\n",cd->name().data(),bcd->name().data()); //printf("isBaseClass(cd=%s) looking for %s\n",cd->name().data(),bcd->name().data());
if (level>256)
{
err("Possible recursive class relation while inside %s and looking for %s\n",name().data(),bcd->name().data());
return FALSE;
}
BaseClassListIterator bcli(*baseClasses()); BaseClassListIterator bcli(*baseClasses());
for ( ; bcli.current() && !found ; ++bcli) for ( ; bcli.current() && !found ; ++bcli)
{ {
...@@ -1945,7 +1952,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances) ...@@ -1945,7 +1952,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances)
if (ccd==bcd) if (ccd==bcd)
found=TRUE; found=TRUE;
else else
found=ccd->isBaseClass(bcd,followInstances); found=ccd->isBaseClass(bcd,followInstances,level+1);
} }
return found; return found;
} }
...@@ -2843,4 +2850,3 @@ MemberDef *ClassDef::getMemberByName(const QCString &name) ...@@ -2843,4 +2850,3 @@ MemberDef *ClassDef::getMemberByName(const QCString &name)
return xmd; return xmd;
} }
...@@ -149,7 +149,7 @@ class ClassDef : public Definition ...@@ -149,7 +149,7 @@ class ClassDef : public Definition
* class. This function will recusively traverse all branches of the * class. This function will recusively traverse all branches of the
* inheritance tree. * inheritance tree.
*/ */
bool isBaseClass(ClassDef *bcd,bool followInstances); bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0);
/*! Returns a sorted dictionary with all template instances found for /*! Returns a sorted dictionary with all template instances found for
* this template class. Returns 0 if not a template or no instances. * this template class. Returns 0 if not a template or no instances.
......
...@@ -1466,6 +1466,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -1466,6 +1466,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
%x ObjCCall %x ObjCCall
%x ObjCMName %x ObjCMName
%x ObjCSkipStr %x ObjCSkipStr
%x OldStyleArgs
%% %%
...@@ -1783,7 +1784,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -1783,7 +1784,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0) if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0)
{ {
ClassDef *ncd=new ClassDef("<code>",1, ClassDef *ncd=new ClassDef("<code>",1,
g_curClassName,ClassDef::Class,0,0,TRUE); g_curClassName,ClassDef::Class,0,0,FALSE);
g_codeClassSDict.append(g_curClassName,ncd); g_codeClassSDict.append(g_curClassName,ncd);
// insert base classes. // insert base classes.
char *s=g_curClassBases.first(); char *s=g_curClassBases.first();
...@@ -2280,7 +2281,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2280,7 +2281,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_code->codify(yytext); g_code->codify(yytext);
endFontClass(); endFontClass();
} }
<MemberCall2,FuncCall>{TYPEKW}/([^a-z_A-Z0-9]) { <MemberCall2,FuncCall,OldStyleArgs>{TYPEKW}/([^a-z_A-Z0-9]) {
addParmType(); addParmType();
g_parmName=yytext; g_parmName=yytext;
startFontClass("keywordtype"); startFontClass("keywordtype");
...@@ -2352,7 +2353,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2352,7 +2353,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
BEGIN( SkipInits ); BEGIN( SkipInits );
} }
} }
<CallEnd>({BN}"const"|"volatile")*{BN}*"{" { <CallEnd,OldStyleArgs>({BN}"const"|"volatile")*{BN}*"{" {
if (g_insideBody) if (g_insideBody)
{ {
g_theVarContext.pushScope(); g_theVarContext.pushScope();
...@@ -2401,6 +2402,28 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -2401,6 +2402,28 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_type.resize(0); g_name.resize(0); g_type.resize(0); g_name.resize(0);
BEGIN( Body ); BEGIN( Body );
} }
<CallEnd>{ID} {
if (g_insideBody || !g_parmType.isEmpty())
{
REJECT;
}
// could be K&R style definition
addParmType();
g_parmName=yytext;
generateClassOrGlobalLink(*g_code,yytext,!g_insideBody);
BEGIN(OldStyleArgs);
}
<OldStyleArgs>{ID} {
addParmType();
g_parmName=yytext;
generateClassOrGlobalLink(*g_code,yytext,!g_insideBody);
}
<OldStyleArgs>[,;] {
g_code->codify(yytext);
g_theVarContext.addVariable(g_parmType,g_parmName);
if (*yytext==';') g_parmType.resize(0);
g_parmName.resize(0);
}
<CallEnd>. { <CallEnd>. {
unput(*yytext); unput(*yytext);
if (!g_insideBody) if (!g_insideBody)
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<xsd:element name="location" type="locationType" minOccurs="0" /> <xsd:element name="location" type="locationType" minOccurs="0" />
<xsd:element name="listofallmembers" type="listofallmembersType" minOccurs="0" /> <xsd:element name="listofallmembers" type="listofallmembersType" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
<xsd:attribute name="kind" type="DoxCompoundKind" /> <xsd:attribute name="kind" type="DoxCompoundKind" />
<xsd:attribute name="prot" type="DoxProtectionKind" /> <xsd:attribute name="prot" type="DoxProtectionKind" />
</xsd:complexType> </xsd:complexType>
...@@ -52,35 +52,55 @@ ...@@ -52,35 +52,55 @@
<xsd:element name="scope" /> <xsd:element name="scope" />
<xsd:element name="name" /> <xsd:element name="name" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="refid" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="prot" type="DoxProtectionKind" /> <xsd:attribute name="prot" type="DoxProtectionKind" />
<xsd:attribute name="virt" type="DoxVirtualKind" /> <xsd:attribute name="virt" type="DoxVirtualKind" />
<xsd:attribute name="ambiguityscope" type="xsd:string" /> <xsd:attribute name="ambiguityscope" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="compoundRefType" mixed="true"> <xsd:complexType name="compoundRefType" mixed="true">
<xsd:attribute name="refid" /> <xsd:simpleContent>
<xsd:attribute name="prot" type="DoxProtectionKind" /> <xsd:extension base="xsd:string">
<xsd:attribute name="virt" type="DoxVirtualKind" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="prot" type="DoxProtectionKind" />
<xsd:attribute name="virt" type="DoxVirtualKind" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="reimplementType" mixed="true"> <xsd:complexType name="reimplementType" mixed="true">
<xsd:attribute name="refid" /> <xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="refid" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="incType" mixed="true"> <xsd:complexType name="incType" mixed="true">
<xsd:attribute name="refid" /> <xsd:simpleContent>
<xsd:attribute name="local" type="DoxBool" /> <xsd:extension base="xsd:string">
<xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="local" type="DoxBool" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="refType" mixed="true"> <xsd:complexType name="refType" mixed="true">
<xsd:attribute name="refid" /> <xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="refid" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="refTextType" mixed="true"> <xsd:complexType name="refTextType" mixed="true">
<xsd:attribute name="refid" /> <xsd:simpleContent>
<xsd:attribute name="kindref" /> <xsd:extension base="xsd:string">
<xsd:attribute name="external" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="kindref" type="DoxRefKind" />
<xsd:attribute name="external" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="sectiondefType"> <xsd:complexType name="sectiondefType">
...@@ -112,7 +132,7 @@ ...@@ -112,7 +132,7 @@
<xsd:element name="referencedby" type="referenceType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="referencedby" type="referenceType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="kind" type="DoxMemberKind" /> <xsd:attribute name="kind" type="DoxMemberKind" />
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
<xsd:attribute name="prot" type="DoxProtectionKind" /> <xsd:attribute name="prot" type="DoxProtectionKind" />
<xsd:attribute name="static" type="DoxBool" /> <xsd:attribute name="static" type="DoxBool" />
<xsd:attribute name="const" type="DoxBool" /> <xsd:attribute name="const" type="DoxBool" />
...@@ -140,7 +160,7 @@ ...@@ -140,7 +160,7 @@
<xsd:element name="detaileddescription" type="descriptionType" minOccurs="0" /> <xsd:element name="detaileddescription" type="descriptionType" minOccurs="0" />
<xsd:element name="initializer" type="linkedTextType" minOccurs="0" /> <xsd:element name="initializer" type="linkedTextType" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
<xsd:attribute name="prot" type="DoxProtectionKind" /> <xsd:attribute name="prot" type="DoxProtectionKind" />
</xsd:complexType> </xsd:complexType>
...@@ -179,20 +199,20 @@ ...@@ -179,20 +199,20 @@
<xsd:element name="link" type="linkType" minOccurs="0" /> <xsd:element name="link" type="linkType" minOccurs="0" />
<xsd:element name="childnode" type="childnodeType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="childnode" type="childnodeType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="childnodeType"> <xsd:complexType name="childnodeType">
<xsd:sequence> <xsd:sequence>
<xsd:element name="edgelabel" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="edgelabel" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="refid" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="relation" type="DoxGraphRelation" /> <xsd:attribute name="relation" type="DoxGraphRelation" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="linkType"> <xsd:complexType name="linkType">
<xsd:attribute name="refid" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="external" use="optional"/> <xsd:attribute name="external" type="DoxBool" use="optional"/>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="listingType"> <xsd:complexType name="listingType">
...@@ -206,9 +226,9 @@ ...@@ -206,9 +226,9 @@
<xsd:element name="highlight" type="highlightType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="highlight" type="highlightType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="lineno" type="xsd:integer" /> <xsd:attribute name="lineno" type="xsd:integer" />
<xsd:attribute name="refid" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="refkind" type="DoxRefKind" /> <xsd:attribute name="refkind" type="DoxRefKind" />
<xsd:attribute name="external" /> <xsd:attribute name="external" type="DoxBool" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="highlightType" mixed="true"> <xsd:complexType name="highlightType" mixed="true">
...@@ -220,14 +240,14 @@ ...@@ -220,14 +240,14 @@
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="referenceType" mixed="true"> <xsd:complexType name="referenceType" mixed="true">
<xsd:attribute name="refid" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="compoundref" use="optional" /> <xsd:attribute name="compoundref" type="xsd:string" use="optional" />
<xsd:attribute name="startline" type="xsd:integer" /> <xsd:attribute name="startline" type="xsd:integer" />
<xsd:attribute name="endline" type="xsd:integer" /> <xsd:attribute name="endline" type="xsd:integer" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="locationType"> <xsd:complexType name="locationType">
<xsd:attribute name="file" /> <xsd:attribute name="file" type="xsd:string" />
<xsd:attribute name="line" type="xsd:integer" /> <xsd:attribute name="line" type="xsd:integer" />
<xsd:attribute name="bodystart" type="xsd:integer" /> <xsd:attribute name="bodystart" type="xsd:integer" />
<xsd:attribute name="bodyend" type="xsd:integer" /> <xsd:attribute name="bodyend" type="xsd:integer" />
...@@ -240,7 +260,7 @@ ...@@ -240,7 +260,7 @@
<xsd:element name="sect2" type="docSect2Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect2" type="docSect2Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="internal" type="docInternalS1Type" minOccurs="0" /> <xsd:element name="internal" type="docInternalS1Type" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docSect2Type" mixed="true"> <xsd:complexType name="docSect2Type" mixed="true">
...@@ -250,7 +270,7 @@ ...@@ -250,7 +270,7 @@
<xsd:element name="sect3" type="docSect3Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect3" type="docSect3Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="internal" type="docInternalS2Type" minOccurs="0" /> <xsd:element name="internal" type="docInternalS2Type" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docSect3Type" mixed="true"> <xsd:complexType name="docSect3Type" mixed="true">
...@@ -260,7 +280,7 @@ ...@@ -260,7 +280,7 @@
<xsd:element name="sect4" type="docSect4Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect4" type="docSect4Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="internal" type="docInternalS3Type" minOccurs="0" /> <xsd:element name="internal" type="docInternalS3Type" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docSect4Type" mixed="true"> <xsd:complexType name="docSect4Type" mixed="true">
...@@ -269,7 +289,7 @@ ...@@ -269,7 +289,7 @@
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="internal" type="docInternalS4Type" minOccurs="0" /> <xsd:element name="internal" type="docInternalS4Type" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docInternalType" mixed="true"> <xsd:complexType name="docInternalType" mixed="true">
...@@ -382,11 +402,11 @@ ...@@ -382,11 +402,11 @@
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docAnchorType" mixed="true"> <xsd:complexType name="docAnchorType" mixed="true">
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docFormulaType" mixed="true"> <xsd:complexType name="docFormulaType" mixed="true">
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docIndexEntryType"> <xsd:complexType name="docIndexEntryType">
...@@ -437,9 +457,9 @@ ...@@ -437,9 +457,9 @@
<xsd:complexType name="docRefTextType" mixed="true"> <xsd:complexType name="docRefTextType" mixed="true">
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
<xsd:attribute name="refid" /> <xsd:attribute name="refid" type="xsd:string" />
<xsd:attribute name="kindref" /> <xsd:attribute name="kindref" type="DoxRefKind" />
<xsd:attribute name="external" /> <xsd:attribute name="external" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docTableType"> <xsd:complexType name="docTableType">
...@@ -488,7 +508,7 @@ ...@@ -488,7 +508,7 @@
<xsd:complexType name="docTocItemType" mixed="true"> <xsd:complexType name="docTocItemType" mixed="true">
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docTocListType"> <xsd:complexType name="docTocListType">
...@@ -506,11 +526,19 @@ ...@@ -506,11 +526,19 @@
<xsd:group name="docParamListGroup"> <xsd:group name="docParamListGroup">
<xsd:sequence> <xsd:sequence>
<xsd:element name="parametername" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="parametername" type="docParamName" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="parameterdescription" type="descriptionType" /> <xsd:element name="parameterdescription" type="descriptionType" />
</xsd:sequence> </xsd:sequence>
</xsd:group> </xsd:group>
<xsd:complexType name="docParamName">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="direction" type="DoxParamDir" use="optional" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="docParamListType"> <xsd:complexType name="docParamListType">
<xsd:sequence> <xsd:sequence>
<xsd:group ref="docParamListGroup" maxOccurs="unbounded" /> <xsd:group ref="docParamListGroup" maxOccurs="unbounded" />
...@@ -523,7 +551,7 @@ ...@@ -523,7 +551,7 @@
<xsd:element name="xreftitle" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="xreftitle" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="xrefdescription" type="descriptionType" /> <xsd:element name="xrefdescription" type="descriptionType" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="id" /> <xsd:attribute name="id" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docCopyType"> <xsd:complexType name="docCopyType">
...@@ -532,7 +560,7 @@ ...@@ -532,7 +560,7 @@
<xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="internal" type="docInternalType" minOccurs="0" /> <xsd:element name="internal" type="docInternalType" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="link" /> <xsd:attribute name="link" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="docCharType"> <xsd:complexType name="docCharType">
...@@ -722,5 +750,13 @@ ...@@ -722,5 +750,13 @@
</xsd:restriction> </xsd:restriction>
</xsd:simpleType> </xsd:simpleType>
<xsd:simpleType name="DoxParamDir">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="in"/>
<xsd:enumeration value="out"/>
<xsd:enumeration value="inout"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema> </xsd:schema>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
" <xsd:element name=\"location\" type=\"locationType\" minOccurs=\"0\" />\n" " <xsd:element name=\"location\" type=\"locationType\" minOccurs=\"0\" />\n"
" <xsd:element name=\"listofallmembers\" type=\"listofallmembersType\" minOccurs=\"0\" />\n" " <xsd:element name=\"listofallmembers\" type=\"listofallmembersType\" minOccurs=\"0\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"kind\" type=\"DoxCompoundKind\" />\n" " <xsd:attribute name=\"kind\" type=\"DoxCompoundKind\" />\n"
" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n" " <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
...@@ -52,35 +52,55 @@ ...@@ -52,35 +52,55 @@
" <xsd:element name=\"scope\" />\n" " <xsd:element name=\"scope\" />\n"
" <xsd:element name=\"name\" />\n" " <xsd:element name=\"name\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n" " <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n"
" <xsd:attribute name=\"virt\" type=\"DoxVirtualKind\" />\n" " <xsd:attribute name=\"virt\" type=\"DoxVirtualKind\" />\n"
" <xsd:attribute name=\"ambiguityscope\" type=\"xsd:string\" />\n" " <xsd:attribute name=\"ambiguityscope\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"compoundRefType\" mixed=\"true\">\n" " <xsd:complexType name=\"compoundRefType\" mixed=\"true\">\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:simpleContent>\n"
" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n" " <xsd:extension base=\"xsd:string\">\n"
" <xsd:attribute name=\"virt\" type=\"DoxVirtualKind\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n"
" <xsd:attribute name=\"virt\" type=\"DoxVirtualKind\" />\n"
" </xsd:extension>\n"
" </xsd:simpleContent>\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"reimplementType\" mixed=\"true\">\n" " <xsd:complexType name=\"reimplementType\" mixed=\"true\">\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:simpleContent>\n"
" <xsd:extension base=\"xsd:string\">\n"
" <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" </xsd:extension>\n"
" </xsd:simpleContent>\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"incType\" mixed=\"true\">\n" " <xsd:complexType name=\"incType\" mixed=\"true\">\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:simpleContent>\n"
" <xsd:attribute name=\"local\" type=\"DoxBool\" />\n" " <xsd:extension base=\"xsd:string\">\n"
" <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"local\" type=\"DoxBool\" />\n"
" </xsd:extension>\n"
" </xsd:simpleContent>\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"refType\" mixed=\"true\">\n" " <xsd:complexType name=\"refType\" mixed=\"true\">\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:simpleContent>\n"
" <xsd:extension base=\"xsd:string\">\n"
" <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" </xsd:extension>\n"
" </xsd:simpleContent>\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"refTextType\" mixed=\"true\">\n" " <xsd:complexType name=\"refTextType\" mixed=\"true\">\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:simpleContent>\n"
" <xsd:attribute name=\"kindref\" />\n" " <xsd:extension base=\"xsd:string\">\n"
" <xsd:attribute name=\"external\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"kindref\" type=\"DoxRefKind\" />\n"
" <xsd:attribute name=\"external\" type=\"xsd:string\" />\n"
" </xsd:extension>\n"
" </xsd:simpleContent>\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"sectiondefType\">\n" " <xsd:complexType name=\"sectiondefType\">\n"
...@@ -112,7 +132,7 @@ ...@@ -112,7 +132,7 @@
" <xsd:element name=\"referencedby\" type=\"referenceType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"referencedby\" type=\"referenceType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"kind\" type=\"DoxMemberKind\" />\n" " <xsd:attribute name=\"kind\" type=\"DoxMemberKind\" />\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n" " <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n"
" <xsd:attribute name=\"static\" type=\"DoxBool\" />\n" " <xsd:attribute name=\"static\" type=\"DoxBool\" />\n"
" <xsd:attribute name=\"const\" type=\"DoxBool\" />\n" " <xsd:attribute name=\"const\" type=\"DoxBool\" />\n"
...@@ -140,7 +160,7 @@ ...@@ -140,7 +160,7 @@
" <xsd:element name=\"detaileddescription\" type=\"descriptionType\" minOccurs=\"0\" />\n" " <xsd:element name=\"detaileddescription\" type=\"descriptionType\" minOccurs=\"0\" />\n"
" <xsd:element name=\"initializer\" type=\"linkedTextType\" minOccurs=\"0\" />\n" " <xsd:element name=\"initializer\" type=\"linkedTextType\" minOccurs=\"0\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n" " <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
...@@ -179,20 +199,20 @@ ...@@ -179,20 +199,20 @@
" <xsd:element name=\"link\" type=\"linkType\" minOccurs=\"0\" />\n" " <xsd:element name=\"link\" type=\"linkType\" minOccurs=\"0\" />\n"
" <xsd:element name=\"childnode\" type=\"childnodeType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"childnode\" type=\"childnodeType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"childnodeType\">\n" " <xsd:complexType name=\"childnodeType\">\n"
" <xsd:sequence>\n" " <xsd:sequence>\n"
" <xsd:element name=\"edgelabel\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n" " <xsd:element name=\"edgelabel\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"relation\" type=\"DoxGraphRelation\" />\n" " <xsd:attribute name=\"relation\" type=\"DoxGraphRelation\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"linkType\">\n" " <xsd:complexType name=\"linkType\">\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"external\" use=\"optional\"/>\n" " <xsd:attribute name=\"external\" type=\"DoxBool\" use=\"optional\"/>\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"listingType\">\n" " <xsd:complexType name=\"listingType\">\n"
...@@ -206,9 +226,9 @@ ...@@ -206,9 +226,9 @@
" <xsd:element name=\"highlight\" type=\"highlightType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"highlight\" type=\"highlightType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"lineno\" type=\"xsd:integer\" />\n" " <xsd:attribute name=\"lineno\" type=\"xsd:integer\" />\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"refkind\" type=\"DoxRefKind\" />\n" " <xsd:attribute name=\"refkind\" type=\"DoxRefKind\" />\n"
" <xsd:attribute name=\"external\" />\n" " <xsd:attribute name=\"external\" type=\"DoxBool\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"highlightType\" mixed=\"true\">\n" " <xsd:complexType name=\"highlightType\" mixed=\"true\">\n"
...@@ -220,14 +240,14 @@ ...@@ -220,14 +240,14 @@
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"referenceType\" mixed=\"true\">\n" " <xsd:complexType name=\"referenceType\" mixed=\"true\">\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"compoundref\" use=\"optional\" />\n" " <xsd:attribute name=\"compoundref\" type=\"xsd:string\" use=\"optional\" />\n"
" <xsd:attribute name=\"startline\" type=\"xsd:integer\" />\n" " <xsd:attribute name=\"startline\" type=\"xsd:integer\" />\n"
" <xsd:attribute name=\"endline\" type=\"xsd:integer\" />\n" " <xsd:attribute name=\"endline\" type=\"xsd:integer\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"locationType\">\n" " <xsd:complexType name=\"locationType\">\n"
" <xsd:attribute name=\"file\" />\n" " <xsd:attribute name=\"file\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"line\" type=\"xsd:integer\" />\n" " <xsd:attribute name=\"line\" type=\"xsd:integer\" />\n"
" <xsd:attribute name=\"bodystart\" type=\"xsd:integer\" />\n" " <xsd:attribute name=\"bodystart\" type=\"xsd:integer\" />\n"
" <xsd:attribute name=\"bodyend\" type=\"xsd:integer\" />\n" " <xsd:attribute name=\"bodyend\" type=\"xsd:integer\" />\n"
...@@ -240,7 +260,7 @@ ...@@ -240,7 +260,7 @@
" <xsd:element name=\"sect2\" type=\"docSect2Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"sect2\" type=\"docSect2Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"internal\" type=\"docInternalS1Type\" minOccurs=\"0\" />\n" " <xsd:element name=\"internal\" type=\"docInternalS1Type\" minOccurs=\"0\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docSect2Type\" mixed=\"true\">\n" " <xsd:complexType name=\"docSect2Type\" mixed=\"true\">\n"
...@@ -250,7 +270,7 @@ ...@@ -250,7 +270,7 @@
" <xsd:element name=\"sect3\" type=\"docSect3Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"sect3\" type=\"docSect3Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"internal\" type=\"docInternalS2Type\" minOccurs=\"0\" />\n" " <xsd:element name=\"internal\" type=\"docInternalS2Type\" minOccurs=\"0\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docSect3Type\" mixed=\"true\">\n" " <xsd:complexType name=\"docSect3Type\" mixed=\"true\">\n"
...@@ -260,7 +280,7 @@ ...@@ -260,7 +280,7 @@
" <xsd:element name=\"sect4\" type=\"docSect4Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"sect4\" type=\"docSect4Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"internal\" type=\"docInternalS3Type\" minOccurs=\"0\" />\n" " <xsd:element name=\"internal\" type=\"docInternalS3Type\" minOccurs=\"0\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docSect4Type\" mixed=\"true\">\n" " <xsd:complexType name=\"docSect4Type\" mixed=\"true\">\n"
...@@ -269,7 +289,7 @@ ...@@ -269,7 +289,7 @@
" <xsd:element name=\"para\" type=\"docParaType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"para\" type=\"docParaType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"internal\" type=\"docInternalS4Type\" minOccurs=\"0\" />\n" " <xsd:element name=\"internal\" type=\"docInternalS4Type\" minOccurs=\"0\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docInternalType\" mixed=\"true\">\n" " <xsd:complexType name=\"docInternalType\" mixed=\"true\">\n"
...@@ -382,11 +402,11 @@ ...@@ -382,11 +402,11 @@
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docAnchorType\" mixed=\"true\">\n" " <xsd:complexType name=\"docAnchorType\" mixed=\"true\">\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docFormulaType\" mixed=\"true\">\n" " <xsd:complexType name=\"docFormulaType\" mixed=\"true\">\n"
" <xsd:attribute name=\"id\" />\n" " <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docIndexEntryType\">\n" " <xsd:complexType name=\"docIndexEntryType\">\n"
...@@ -437,9 +457,9 @@ ...@@ -437,9 +457,9 @@
"\n" "\n"
" <xsd:complexType name=\"docRefTextType\" mixed=\"true\">\n" " <xsd:complexType name=\"docRefTextType\" mixed=\"true\">\n"
" <xsd:group ref=\"docTitleCmdGroup\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:group ref=\"docTitleCmdGroup\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:attribute name=\"refid\" />\n" " <xsd:attribute name=\"refid\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"kindref\" />\n" " <xsd:attribute name=\"kindref\" type=\"DoxRefKind\" />\n"
" <xsd:attribute name=\"external\" />\n" " <xsd:attribute name=\"external\" type=\"xsd:string\" />\n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docTableType\">\n" " <xsd:complexType name=\"docTableType\">\n"
...@@ -488,7 +508,7 @@ ...@@ -488,7 +508,7 @@
"\n" "\n"
" <xsd:complexType name=\"docTocItemType\" mixed=\"true\">\n" " <xsd:complexType name=\"docTocItemType\" mixed=\"true\">\n"
" <xsd:group ref=\"docTitleCmdGroup\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:group ref=\"docTitleCmdGroup\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:attribute name=\"id\" /> \n" " <xsd:attribute name=\"id\" type=\"xsd:string\" /> \n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docTocListType\">\n" " <xsd:complexType name=\"docTocListType\">\n"
...@@ -506,11 +526,19 @@ ...@@ -506,11 +526,19 @@
"\n" "\n"
" <xsd:group name=\"docParamListGroup\">\n" " <xsd:group name=\"docParamListGroup\">\n"
" <xsd:sequence>\n" " <xsd:sequence>\n"
" <xsd:element name=\"parametername\" type=\"xsd:string\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"parametername\" type=\"docParamName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"parameterdescription\" type=\"descriptionType\" />\n" " <xsd:element name=\"parameterdescription\" type=\"descriptionType\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" </xsd:group>\n" " </xsd:group>\n"
"\n" "\n"
" <xsd:complexType name=\"docParamName\">\n"
" <xsd:simpleContent>\n"
" <xsd:extension base=\"xsd:string\">\n"
" <xsd:attribute name=\"direction\" type=\"DoxParamDir\" use=\"optional\" />\n"
" </xsd:extension>\n"
" </xsd:simpleContent>\n"
" </xsd:complexType>\n"
"\n"
" <xsd:complexType name=\"docParamListType\">\n" " <xsd:complexType name=\"docParamListType\">\n"
" <xsd:sequence>\n" " <xsd:sequence>\n"
" <xsd:group ref=\"docParamListGroup\" maxOccurs=\"unbounded\" />\n" " <xsd:group ref=\"docParamListGroup\" maxOccurs=\"unbounded\" />\n"
...@@ -523,7 +551,7 @@ ...@@ -523,7 +551,7 @@
" <xsd:element name=\"xreftitle\" type=\"xsd:string\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"xreftitle\" type=\"xsd:string\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"xrefdescription\" type=\"descriptionType\" />\n" " <xsd:element name=\"xrefdescription\" type=\"descriptionType\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"id\" /> \n" " <xsd:attribute name=\"id\" type=\"xsd:string\" /> \n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docCopyType\">\n" " <xsd:complexType name=\"docCopyType\">\n"
...@@ -532,7 +560,7 @@ ...@@ -532,7 +560,7 @@
" <xsd:element name=\"sect1\" type=\"docSect1Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"sect1\" type=\"docSect1Type\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"internal\" type=\"docInternalType\" minOccurs=\"0\" />\n" " <xsd:element name=\"internal\" type=\"docInternalType\" minOccurs=\"0\" />\n"
" </xsd:sequence>\n" " </xsd:sequence>\n"
" <xsd:attribute name=\"link\" /> \n" " <xsd:attribute name=\"link\" type=\"xsd:string\" /> \n"
" </xsd:complexType>\n" " </xsd:complexType>\n"
"\n" "\n"
" <xsd:complexType name=\"docCharType\">\n" " <xsd:complexType name=\"docCharType\">\n"
...@@ -722,5 +750,13 @@ ...@@ -722,5 +750,13 @@
" </xsd:restriction>\n" " </xsd:restriction>\n"
" </xsd:simpleType>\n" " </xsd:simpleType>\n"
"\n" "\n"
" <xsd:simpleType name=\"DoxParamDir\">\n"
" <xsd:restriction base=\"xsd:string\">\n"
" <xsd:enumeration value=\"in\"/>\n"
" <xsd:enumeration value=\"out\"/>\n"
" <xsd:enumeration value=\"inout\"/>\n"
" </xsd:restriction>\n"
" </xsd:simpleType>\n"
"\n"
"</xsd:schema>\n" "</xsd:schema>\n"
"\n" "\n"
...@@ -76,6 +76,7 @@ static void removeFromMap(Definition *d) ...@@ -76,6 +76,7 @@ static void removeFromMap(Definition *d)
Definition::Definition(const char *df,int dl, Definition::Definition(const char *df,int dl,
const char *name,const char *b, const char *name,const char *b,
const char *d,bool isSymbol) const char *d,bool isSymbol)
: m_reachableDefs(17)
{ {
//QCString ns; //QCString ns;
m_defFileName = df; m_defFileName = df;
...@@ -111,6 +112,8 @@ Definition::Definition(const char *df,int dl, ...@@ -111,6 +112,8 @@ Definition::Definition(const char *df,int dl,
m_docFile=(QCString)"<"+name+">"; m_docFile=(QCString)"<"+name+">";
m_isSymbol = isSymbol; m_isSymbol = isSymbol;
if (m_isSymbol) addToMap(name,this); if (m_isSymbol) addToMap(name,this);
m_reachableDefs.setAutoDelete(TRUE);
m_reachabilityComputed=FALSE;
} }
Definition::~Definition() Definition::~Definition()
...@@ -578,9 +581,10 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) ...@@ -578,9 +581,10 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
bool Definition::hasDocumentation() const bool Definition::hasDocumentation() const
{ {
static bool extractAll = Config_getBool("EXTRACT_ALL");
return !m_doc.isEmpty() || // has detailed docs return !m_doc.isEmpty() || // has detailed docs
!m_brief.isEmpty() || // has brief description !m_brief.isEmpty() || // has brief description
Config_getBool("EXTRACT_ALL"); // extract everything extractAll; // extract everything
} }
void Definition::addSourceReferencedBy(MemberDef *md) void Definition::addSourceReferencedBy(MemberDef *md)
...@@ -640,8 +644,10 @@ void Definition::addInnerCompound(Definition *) ...@@ -640,8 +644,10 @@ void Definition::addInnerCompound(Definition *)
err("Error: Definition::addInnerCompound() called\n"); err("Error: Definition::addInnerCompound() called\n");
} }
QCString Definition::qualifiedName() const QCString Definition::qualifiedName()
{ {
if (!m_qualifiedName.isEmpty()) return m_qualifiedName;
//printf("start Definition::qualifiedName() localName=%s\n",m_localName.data()); //printf("start Definition::qualifiedName() localName=%s\n",m_localName.data());
if (m_outerScope==0) if (m_outerScope==0)
{ {
...@@ -649,17 +655,16 @@ QCString Definition::qualifiedName() const ...@@ -649,17 +655,16 @@ QCString Definition::qualifiedName() const
else return m_localName; else return m_localName;
} }
QCString qualifiedName;
if (m_outerScope->name()=="<globalScope>") if (m_outerScope->name()=="<globalScope>")
{ {
qualifiedName = m_localName.copy(); m_qualifiedName = m_localName.copy();
} }
else else
{ {
qualifiedName = m_outerScope->qualifiedName()+"::"+m_localName; m_qualifiedName = m_outerScope->qualifiedName()+"::"+m_localName;
} }
//printf("end Definition::qualifiedName()=%s\n",qualifiedName.data()); //printf("end Definition::qualifiedName()=%s\n",qualifiedName.data());
return qualifiedName; return m_qualifiedName;
}; };
QCString Definition::localName() const QCString Definition::localName() const
...@@ -756,3 +761,32 @@ QCString Definition::convertNameToFile(const char *name,bool allowDots) const ...@@ -756,3 +761,32 @@ QCString Definition::convertNameToFile(const char *name,bool allowDots) const
} }
} }
void Definition::addReachableDef(Definition *def,int distance)
{
if (m_reachableDefs.find(def->qualifiedName()))
{
m_reachableDefs.insert(def->qualifiedName(),new ReachableDefinition(def,distance));
}
}
void Definition::computeReachability()
{
if (m_reachabilityComputed) return;
addReachableDef(this,0);
Definition *parent = getOuterScope();
int i=1;
while (parent)
{
parent->computeReachability();
QDictIterator<ReachableDefinition> dli(m_reachableDefs);
ReachableDefinition *rd;
for (dli.toFirst();(rd=dli.current());++dli)
{
addReachableDef(rd->def,i);
}
parent=parent->getOuterScope();
i++;
}
m_reachabilityComputed=TRUE;
}
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "qtbc.h" #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qdict.h>
class FileDef; class FileDef;
class OutputList; class OutputList;
...@@ -32,6 +33,14 @@ class GroupDef; ...@@ -32,6 +33,14 @@ class GroupDef;
class GroupList; class GroupList;
struct ListItemInfo; struct ListItemInfo;
struct SectionInfo; struct SectionInfo;
class Definition;
struct ReachableDefinition
{
ReachableDefinition(Definition *d,int dist) : def(d), distance(dist) {}
Definition *def;
int distance;
};
/*! The common base class of all entity definitions found in the sources. */ /*! The common base class of all entity definitions found in the sources. */
class Definition class Definition
...@@ -58,7 +67,7 @@ class Definition ...@@ -58,7 +67,7 @@ class Definition
/*! Returns the base name of the output file that contains this /*! Returns the base name of the output file that contains this
* definition. * definition.
*/ */
virtual QCString qualifiedName() const; virtual QCString qualifiedName();
QCString localName() const; QCString localName() const;
virtual QCString getOutputFileBase() const = 0; virtual QCString getOutputFileBase() const = 0;
/*! Returns the name of the source listing of this file. */ /*! Returns the name of the source listing of this file. */
...@@ -132,6 +141,7 @@ class Definition ...@@ -132,6 +141,7 @@ class Definition
virtual Definition *getOuterScope() const { return m_outerScope; } virtual Definition *getOuterScope() const { return m_outerScope; }
virtual void addInnerCompound(Definition *d); virtual void addInnerCompound(Definition *d);
virtual void setOuterScope(Definition *d) { m_outerScope = d; } virtual void setOuterScope(Definition *d) { m_outerScope = d; }
virtual void computeReachability();
MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; } MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; }
MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; } MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; }
...@@ -139,6 +149,7 @@ class Definition ...@@ -139,6 +149,7 @@ class Definition
void makePartOfGroup(GroupDef *gd); void makePartOfGroup(GroupDef *gd);
GroupList *partOfGroups() const { return m_partOfGroups; } GroupList *partOfGroups() const { return m_partOfGroups; }
QCString convertNameToFile(const char *name,bool allowDots=FALSE) const; QCString convertNameToFile(const char *name,bool allowDots=FALSE) const;
void addReachableDef(Definition *d,int distance);
protected: protected:
int m_startBodyLine; // line number of the start of the definition int m_startBodyLine; // line number of the start of the definition
...@@ -158,6 +169,9 @@ class Definition ...@@ -158,6 +169,9 @@ class Definition
/*! List of groups this definition is part of */ /*! List of groups this definition is part of */
GroupList *m_partOfGroups; GroupList *m_partOfGroups;
// reachability of other definitions from this one
QDict<ReachableDefinition> m_reachableDefs;
bool m_reachabilityComputed;
private: private:
int getXRefListId(const char *listName) const; int getXRefListId(const char *listName) const;
...@@ -181,6 +195,9 @@ class Definition ...@@ -181,6 +195,9 @@ class Definition
QList<ListItemInfo> *m_xrefListItems; QList<ListItemInfo> *m_xrefListItems;
QCString m_symbolName; QCString m_symbolName;
bool m_isSymbol; bool m_isSymbol;
QCString m_qualifiedName;
}; };
class DefinitionList : public QList<Definition> class DefinitionList : public QList<Definition>
......
...@@ -3154,13 +3154,13 @@ endparamlist: ...@@ -3154,13 +3154,13 @@ endparamlist:
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
int DocParamSect::parse(const QString &cmdName) int DocParamSect::parse(const QString &cmdName,Direction d)
{ {
int retval=RetVal_OK; int retval=RetVal_OK;
DBG(("DocParamSect::parse() start\n")); DBG(("DocParamSect::parse() start\n"));
g_nodeStack.push(this); g_nodeStack.push(this);
DocParamList *pl = new DocParamList(this,m_type); DocParamList *pl = new DocParamList(this,m_type,d);
if (m_children.isEmpty()) if (m_children.isEmpty())
{ {
pl->markFirst(); pl->markFirst();
...@@ -3204,7 +3204,9 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t) ...@@ -3204,7 +3204,9 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t)
return (rv!=TK_NEWPARA) ? rv : RetVal_OK; return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
} }
int DocPara::handleParamSection(const QString &cmdName,DocParamSect::Type t) int DocPara::handleParamSection(const QString &cmdName,
DocParamSect::Type t,
int direction=DocParamSect::Unspecified)
{ {
DocParamSect *ps=0; DocParamSect *ps=0;
if (!m_children.isEmpty() && // previous element if (!m_children.isEmpty() && // previous element
...@@ -3219,7 +3221,7 @@ int DocPara::handleParamSection(const QString &cmdName,DocParamSect::Type t) ...@@ -3219,7 +3221,7 @@ int DocPara::handleParamSection(const QString &cmdName,DocParamSect::Type t)
ps=new DocParamSect(this,t); ps=new DocParamSect(this,t);
m_children.append(ps); m_children.append(ps);
} }
int rv=ps->parse(cmdName); int rv=ps->parse(cmdName,(DocParamSect::Direction)direction);
return (rv!=TK_NEWPARA) ? rv : RetVal_OK; return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
} }
...@@ -3738,7 +3740,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3738,7 +3740,7 @@ int DocPara::handleCommand(const QString &cmdName)
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break; break;
case CMD_PARAM: case CMD_PARAM:
retval = handleParamSection(cmdName,DocParamSect::Param); retval = handleParamSection(cmdName,DocParamSect::Param,g_token->paramDir);
break; break;
case CMD_RETVAL: case CMD_RETVAL:
retval = handleParamSection(cmdName,DocParamSect::RetVal); retval = handleParamSection(cmdName,DocParamSect::RetVal);
......
...@@ -909,8 +909,13 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode ...@@ -909,8 +909,13 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode
{ {
Unknown, Param, RetVal, Exception Unknown, Param, RetVal, Exception
}; };
DocParamSect(DocNode *parent,Type t) : m_parent(parent), m_type(t) {} enum Direction
int parse(const QString &cmdName); {
In=1, Out=2, InOut=3, Unspecified=0
};
DocParamSect(DocNode *parent,Type t)
: m_parent(parent), m_type(t) {}
int parse(const QString &cmdName,Direction d);
Kind kind() const { return Kind_ParamSect; } Kind kind() const { return Kind_ParamSect; }
Type type() const { return m_type; } Type type() const { return m_type; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
...@@ -919,6 +924,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode ...@@ -919,6 +924,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode
private: private:
DocNode * m_parent; DocNode * m_parent;
Type m_type; Type m_type;
Direction m_dir;
}; };
/*! Node representing a paragraph in the documentation tree */ /*! Node representing a paragraph in the documentation tree */
...@@ -943,7 +949,8 @@ class DocPara : public CompAccept<DocPara>, public DocNode ...@@ -943,7 +949,8 @@ class DocPara : public CompAccept<DocPara>, public DocNode
int handleHtmlEndTag(const QString &tagName); int handleHtmlEndTag(const QString &tagName);
int handleSimpleSection(DocSimpleSect::Type t); int handleSimpleSection(DocSimpleSect::Type t);
int handleXRefItem(); int handleXRefItem();
int handleParamSection(const QString &cmdName,DocParamSect::Type t); int handleParamSection(const QString &cmdName,DocParamSect::Type t,
int direction);
void handleIncludeOperator(const QString &cmdName,DocIncOperator::Type t); void handleIncludeOperator(const QString &cmdName,DocIncOperator::Type t);
void handleImage(const QString &cmdName); void handleImage(const QString &cmdName);
void handleDotFile(const QString &cmdName); void handleDotFile(const QString &cmdName);
...@@ -965,14 +972,15 @@ class DocPara : public CompAccept<DocPara>, public DocNode ...@@ -965,14 +972,15 @@ class DocPara : public CompAccept<DocPara>, public DocNode
class DocParamList : public DocNode class DocParamList : public DocNode
{ {
public: public:
DocParamList(DocNode *parent,DocParamSect::Type t) DocParamList(DocNode *parent,DocParamSect::Type t,DocParamSect::Direction d)
: m_parent(parent) , m_type(t), m_isFirst(TRUE), m_isLast(TRUE) : m_parent(parent) , m_type(t), m_dir(d), m_isFirst(TRUE), m_isLast(TRUE)
{ m_paragraph=new DocPara(this); } { m_paragraph=new DocPara(this); }
virtual ~DocParamList() { delete m_paragraph; } virtual ~DocParamList() { delete m_paragraph; }
Kind kind() const { return Kind_ParamList; } Kind kind() const { return Kind_ParamList; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
const QStrList &parameters() { return m_params; } const QStrList &parameters() { return m_params; }
DocParamSect::Type type() const { return m_type; } DocParamSect::Type type() const { return m_type; }
DocParamSect::Direction direction() const { return m_dir; }
void markFirst(bool b=TRUE) { m_isFirst=b; } void markFirst(bool b=TRUE) { m_isFirst=b; }
void markLast(bool b=TRUE) { m_isLast=b; } void markLast(bool b=TRUE) { m_isLast=b; }
bool isFirst() const { return m_isFirst; } bool isFirst() const { return m_isFirst; }
...@@ -986,12 +994,13 @@ class DocParamList : public DocNode ...@@ -986,12 +994,13 @@ class DocParamList : public DocNode
int parse(const QString &cmdName); int parse(const QString &cmdName);
private: private:
DocNode * m_parent; DocNode * m_parent;
DocPara * m_paragraph; DocPara * m_paragraph;
QStrList m_params; QStrList m_params;
DocParamSect::Type m_type; DocParamSect::Type m_type;
bool m_isFirst; DocParamSect::Direction m_dir;
bool m_isLast; bool m_isFirst;
bool m_isLast;
}; };
/*! @brief Node representing an item of a auto list */ /*! @brief Node representing an item of a auto list */
......
...@@ -98,6 +98,10 @@ struct TokenInfo ...@@ -98,6 +98,10 @@ struct TokenInfo
// url // url
bool isEMailAddr; bool isEMailAddr;
// param attributes
enum ParamDir { In=1, Out=2, InOut=3, Unspecified=0 };
ParamDir paramDir;
}; };
// globals // globals
......
...@@ -288,6 +288,8 @@ LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))? ...@@ -288,6 +288,8 @@ LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))?
SPCMD1 {CMD}[a-z_A-Z0-9]+ SPCMD1 {CMD}[a-z_A-Z0-9]+
SPCMD2 {CMD}[\\@<>&$#%~] SPCMD2 {CMD}[\\@<>&$#%~]
SPCMD3 {CMD}form#[0-9]+ SPCMD3 {CMD}form#[0-9]+
INOUT "in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in")
PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]"
TEMPCHAR [a-z_A-Z0-9,: \t\*\&] TEMPCHAR [a-z_A-Z0-9,: \t\*\&]
FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&] FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&]
SCOPESEP "::"|"#"|"." SCOPESEP "::"|"#"|"."
...@@ -391,8 +393,35 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -391,8 +393,35 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_Para>{SPCMD1} | <St_Para>{SPCMD1} |
<St_Para>{SPCMD2} { /* special command */ <St_Para>{SPCMD2} { /* special command */
g_token->name = yytext+1; g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
return TK_COMMAND; return TK_COMMAND;
} }
<St_Para>{PARAMIO} { /* param [in,out] command */
g_token->name = "param";
QString s(yytext);
bool isIn = s.find("in")!=-1;
bool isOut = s.find("out")!=-1;
if (isIn)
{
if (isOut)
{
g_token->paramDir=TokenInfo::InOut;
}
else
{
g_token->paramDir=TokenInfo::In;
}
}
else if (isOut)
{
g_token->paramDir=TokenInfo::Out;
}
else
{
g_token->paramDir=TokenInfo::Unspecified;
}
return TK_COMMAND;
}
<St_Para>("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} { // URL <St_Para>("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} { // URL
g_token->name=yytext; g_token->name=yytext;
g_token->isEMailAddr=FALSE; g_token->isEMailAddr=FALSE;
...@@ -567,6 +596,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -567,6 +596,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_TitleN>{SPCMD1} | <St_TitleN>{SPCMD1} |
<St_TitleN>{SPCMD2} { /* special command */ <St_TitleN>{SPCMD2} { /* special command */
g_token->name = yytext+1; g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
return TK_COMMAND; return TK_COMMAND;
} }
<St_TitleN>{WORD1} | <St_TitleN>{WORD1} |
...@@ -592,6 +622,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -592,6 +622,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_TitleQ>{SPCMD1} | <St_TitleQ>{SPCMD1} |
<St_TitleQ>{SPCMD2} { /* special command */ <St_TitleQ>{SPCMD2} { /* special command */
g_token->name = yytext+1; g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
return TK_COMMAND; return TK_COMMAND;
} }
<St_TitleQ>{WORD1NQ} | <St_TitleQ>{WORD1NQ} |
...@@ -663,6 +694,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -663,6 +694,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_Ref2>{SPCMD1} | <St_Ref2>{SPCMD1} |
<St_Ref2>{SPCMD2} { /* special command */ <St_Ref2>{SPCMD2} { /* special command */
g_token->name = yytext+1; g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
return TK_COMMAND; return TK_COMMAND;
} }
<St_Ref2>{WORD1NQ} | <St_Ref2>{WORD1NQ} |
......
...@@ -1217,24 +1217,9 @@ static void findUsingDeclarations(Entry *root) ...@@ -1217,24 +1217,9 @@ static void findUsingDeclarations(Entry *root)
// the possible scopes in which the using statement was found, starting // the possible scopes in which the using statement was found, starting
// with the most inner scope and going to the most outer scope (i.e. // with the most inner scope and going to the most outer scope (i.e.
// file scope). // file scope).
// int scopeOffset = scName.length();
// do MemberDef *mtd=0;
// { usingCd = getResolvedClass(nd,fd,root->name,&mtd);
// QCString scope=scopeOffset>0 ?
// scName.left(scopeOffset)+"::" : QCString();
// //printf("Trying with scope=`%s'\n",scope.data());
// usingCd = getClass(scope+root->name);
// if (scopeOffset==0)
// {
// scopeOffset=-1;
// }
// else if ((scopeOffset=scName.findRev("::",scopeOffset-1))==-1)
// {
// scopeOffset=0;
// }
// } while (scopeOffset>=0 && usingCd==0);
usingCd = getResolvedClass(nd,fd,root->name);
//printf("%s -> %p\n",root->name.data(),usingCd); //printf("%s -> %p\n",root->name.data(),usingCd);
if (usingCd==0) // definition not in the input => add an artificial class if (usingCd==0) // definition not in the input => add an artificial class
...@@ -1248,8 +1233,20 @@ static void findUsingDeclarations(Entry *root) ...@@ -1248,8 +1233,20 @@ static void findUsingDeclarations(Entry *root)
usingCd->setClassIsArtificial(); usingCd->setClassIsArtificial();
} }
// add the namespace the correct scope if (mtd) // add the typedef to the correct scope
if (usingCd) {
if (nd)
{
//printf("Inside namespace %s\n",nd->name().data());
nd->addUsingDeclaration(mtd);
}
else if (fd)
{
//printf("Inside file %s\n",nd->name().data());
fd->addUsingDeclaration(mtd);
}
}
else if (usingCd) // add the class to the correct scope
{ {
if (nd) if (nd)
{ {
...@@ -1623,20 +1620,23 @@ static MemberDef *addVariableToFile( ...@@ -1623,20 +1620,23 @@ static MemberDef *addVariableToFile(
return md; return md;
} }
if (nd==0 && md->isExplicit()!=root->explicitExternal) // TODO: rethink why we would need this!
{ //if (nd==0 && md->isExplicit()!=root->explicitExternal)
// merge ingroup specifiers //{
if (md->getGroupDef()==0 && root->groups->first()) // // merge ingroup specifiers
{ // if (md->getGroupDef()==0 && root->groups->first())
//GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()]; // {
//md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty()); // //GroupDef *gd=Doxygen::groupSDict[root->groups->first()->groupname.data()];
addMemberToGroups(root,md); // //md->setGroupDef(gd, root->groups->first()->pri, root->fileName, root->startLine, !root->doc.isEmpty());
} // addMemberToGroups(root,md);
else if (md->getGroupDef()!=0 && root->groups->count()==0) // }
{ // else if (md->getGroupDef()!=0 && root->groups->count()==0)
root->groups->append(new Grouping(md->getGroupDef()->name(), md->getGroupPri())); // {
} // // enabling has the result that an ungrouped, undocumented external variable is put
} // // in a group if the definition is documented and grouped!
// //root->groups->append(new Grouping(md->getGroupDef()->name(), md->getGroupPri()));
// }
//}
} }
} }
// new global variable, enum value or typedef // new global variable, enum value or typedef
...@@ -1668,10 +1668,6 @@ static MemberDef *addVariableToFile( ...@@ -1668,10 +1668,6 @@ static MemberDef *addVariableToFile(
md->enableCallGraph(root->callGraph); md->enableCallGraph(root->callGraph);
md->setExplicitExternal(root->explicitExternal); md->setExplicitExternal(root->explicitExternal);
addMemberToGroups(root,md); addMemberToGroups(root,md);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
md->setRefItems(root->sli); md->setRefItems(root->sli);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
...@@ -2286,8 +2282,8 @@ static void buildFunctionList(Entry *root) ...@@ -2286,8 +2282,8 @@ static void buildFunctionList(Entry *root)
QCString nsName,rnsName; QCString nsName,rnsName;
if (nd) nsName = nd->name().copy(); if (nd) nsName = nd->name().copy();
if (rnd) rnsName = rnd->name().copy(); if (rnd) rnsName = rnd->name().copy();
NamespaceSDict *unl = fd ? fd->getUsedNamespaces() : 0; NamespaceSDict *unl = fd ? fd->getUsedNamespaces() : 0;
ClassSDict *ucl = fd ? fd->getUsedClasses() : 0; SDict<Definition> *ucl = fd ? fd->getUsedClasses() : 0;
//printf("matching arguments for %s%s %s%s\n", //printf("matching arguments for %s%s %s%s\n",
// md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data()); // md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
if ( if (
...@@ -2968,32 +2964,34 @@ static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name) ...@@ -2968,32 +2964,34 @@ static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name)
if (result && result!=cd) return result; if (result && result!=cd) return result;
} }
} }
ClassSDict *cl = nd->getUsedClasses(); SDict<Definition> *cl = nd->getUsedClasses();
if (cl) if (cl)
{ {
ClassSDict::Iterator cli(*cl); SDict<Definition>::Iterator cli(*cl);
ClassDef *ucd; Definition *ucd;
for (cli.toFirst(); (ucd=cli.current()) ; ++cli) for (cli.toFirst(); (ucd=cli.current()) ; ++cli)
{ {
if (rightScopeMatch(ucd->name(),name)) if (ucd->definitionType()==Definition::TypeClass &&
rightScopeMatch(ucd->name(),name))
{ {
return ucd; return (ClassDef *)ucd;
} }
} }
} }
// TODO: check any inbetween namespaces as well! // TODO: check any inbetween namespaces as well!
if (fd) // and in the global namespace if (fd) // and in the global namespace
{ {
ClassSDict *cl = fd->getUsedClasses(); SDict<Definition> *cl = fd->getUsedClasses();
if (cl) if (cl)
{ {
ClassSDict::Iterator cli(*cl); SDict<Definition>::Iterator cli(*cl);
ClassDef *ucd; Definition *ucd;
for (cli.toFirst(); (ucd=cli.current()); ++cli) for (cli.toFirst(); (ucd=cli.current()); ++cli)
{ {
if (rightScopeMatch(ucd->name(),name)) if (ucd->definitionType()==Definition::TypeClass &&
rightScopeMatch(ucd->name(),name))
{ {
return ucd; return (ClassDef *)ucd;
} }
} }
} }
...@@ -3020,16 +3018,17 @@ static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name) ...@@ -3020,16 +3018,17 @@ static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name)
} }
} }
} }
ClassSDict *cl = fd->getUsedClasses(); SDict<Definition> *cl = fd->getUsedClasses();
if (cl) if (cl)
{ {
ClassSDict::Iterator cli(*cl); SDict<Definition>::Iterator cli(*cl);
ClassDef *ucd; Definition *ucd;
for (cli.toFirst(); (ucd=cli.current()) ; ++cli) for (cli.toFirst(); (ucd=cli.current()) ; ++cli)
{ {
if (rightScopeMatch(ucd->name(),name)) if (ucd->definitionType()==Definition::TypeClass &&
rightScopeMatch(ucd->name(),name))
{ {
return ucd; return (ClassDef *)ucd;
} }
} }
} }
...@@ -4139,8 +4138,8 @@ static bool findGlobalMember(Entry *root, ...@@ -4139,8 +4138,8 @@ static bool findGlobalMember(Entry *root,
// namespaceName.data(),nd ? nd->name().data() : "<none>"); // namespaceName.data(),nd ? nd->name().data() : "<none>");
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
//printf("File %s\n",fd ? fd->name().data() : "<none>"); //printf("File %s\n",fd ? fd->name().data() : "<none>");
NamespaceSDict *nl = fd ? fd->getUsedNamespaces() : 0; NamespaceSDict *nl = fd ? fd->getUsedNamespaces() : 0;
ClassSDict *cl = fd ? fd->getUsedClasses() : 0; SDict<Definition> *cl = fd ? fd->getUsedClasses() : 0;
//printf("NamespaceList %p\n",nl); //printf("NamespaceList %p\n",nl);
// search in the list of namespaces that are imported via a // search in the list of namespaces that are imported via a
...@@ -4676,14 +4675,14 @@ static void findMember(Entry *root, ...@@ -4676,14 +4675,14 @@ static void findMember(Entry *root,
} }
} }
ClassSDict *cl = new ClassSDict(17); SDict<Definition> *cl = new SDict<Definition>(17);
if (nd) if (nd)
{ {
ClassSDict *ncl = nd->getUsedClasses(); SDict<Definition> *ncl = nd->getUsedClasses();
if (ncl) if (ncl)
{ {
ClassSDict::Iterator csdi(*ncl); SDict<Definition>::Iterator csdi(*ncl);
ClassDef *ncd; Definition *ncd;
for (csdi.toFirst();(ncd=csdi.current());++csdi) for (csdi.toFirst();(ncd=csdi.current());++csdi)
{ {
cl->append(ncd->qualifiedName(),ncd); cl->append(ncd->qualifiedName(),ncd);
...@@ -4692,11 +4691,11 @@ static void findMember(Entry *root, ...@@ -4692,11 +4691,11 @@ static void findMember(Entry *root,
} }
if (fd) if (fd)
{ {
ClassSDict *fcl = fd->getUsedClasses(); SDict<Definition> *fcl = fd->getUsedClasses();
if (fcl) if (fcl)
{ {
ClassSDict::Iterator csdi(*fcl); SDict<Definition>::Iterator csdi(*fcl);
ClassDef *fcd; Definition *fcd;
for (csdi.toFirst();(fcd=csdi.current());++csdi) for (csdi.toFirst();(fcd=csdi.current());++csdi)
{ {
cl->append(fcd->qualifiedName(),fcd); cl->append(fcd->qualifiedName(),fcd);
......
...@@ -681,15 +681,15 @@ void FileDef::addUsingDirective(NamespaceDef *nd) ...@@ -681,15 +681,15 @@ void FileDef::addUsingDirective(NamespaceDef *nd)
} }
} }
void FileDef::addUsingDeclaration(ClassDef *cd) void FileDef::addUsingDeclaration(Definition *d)
{ {
if (usingDeclList==0) if (usingDeclList==0)
{ {
usingDeclList = new ClassSDict; usingDeclList = new SDict<Definition>(17);
} }
if (usingDeclList->find(cd->qualifiedName())==0) if (usingDeclList->find(d->qualifiedName())==0)
{ {
usingDeclList->append(cd->qualifiedName(),cd); usingDeclList->append(d->qualifiedName(),d);
} }
} }
...@@ -1053,8 +1053,8 @@ void FileDef::combineUsingRelations() ...@@ -1053,8 +1053,8 @@ void FileDef::combineUsingRelations()
// add used classes of namespace nd to this namespace // add used classes of namespace nd to this namespace
if (nd->getUsedClasses()) if (nd->getUsedClasses())
{ {
ClassSDict::Iterator cli(*nd->getUsedClasses()); SDict<Definition>::Iterator cli(*nd->getUsedClasses());
ClassDef *ucd; Definition *ucd;
for (cli.toFirst();(ucd=cli.current());++cli) for (cli.toFirst();(ucd=cli.current());++cli)
{ {
//printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data()); //printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data());
......
...@@ -134,8 +134,8 @@ class FileDef : public Definition ...@@ -134,8 +134,8 @@ class FileDef : public Definition
void addUsingDirective(NamespaceDef *nd); void addUsingDirective(NamespaceDef *nd);
NamespaceSDict *getUsedNamespaces() const { return usingDirList; } NamespaceSDict *getUsedNamespaces() const { return usingDirList; }
void addUsingDeclaration(ClassDef *cd); void addUsingDeclaration(Definition *def);
ClassSDict *getUsedClasses() const { return usingDeclList; } SDict<Definition> *getUsedClasses() const { return usingDeclList; }
void combineUsingRelations(); void combineUsingRelations();
bool generateSourceFile() const; bool generateSourceFile() const;
...@@ -188,7 +188,7 @@ class FileDef : public Definition ...@@ -188,7 +188,7 @@ class FileDef : public Definition
QDict<IncludeInfo> *includedByDict; QDict<IncludeInfo> *includedByDict;
QList<IncludeInfo> *includedByList; QList<IncludeInfo> *includedByList;
NamespaceSDict *usingDirList; NamespaceSDict *usingDirList;
ClassSDict *usingDeclList; SDict<Definition> *usingDeclList;
//DefineList *defineList; //DefineList *defineList;
QCString path; QCString path;
QCString filepath; QCString filepath;
......
...@@ -189,12 +189,12 @@ void HtmlDocVisitor::visit(DocVerbatim *s) ...@@ -189,12 +189,12 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
switch(s->type()) switch(s->type())
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "<pre class=\"fragment\"><div>"; m_t << "<pre><div class=\"fragment\">";
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile()); parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
m_t << "</div></pre>"; m_t << "</div></pre>";
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
m_t << "<pre class=\"fragment\"><div>"; m_t << "<pre><div class=\"fragment\">";
filter(s->text()); filter(s->text());
m_t << "</div></pre>"; m_t << "</div></pre>";
break; break;
...@@ -246,16 +246,16 @@ void HtmlDocVisitor::visit(DocInclude *inc) ...@@ -246,16 +246,16 @@ void HtmlDocVisitor::visit(DocInclude *inc)
switch(inc->type()) switch(inc->type())
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "<pre class=\"fragment\"><div>"; m_t << "<pre><div class=\"fragment\">";
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile()); parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
m_t << "</div></pre>"; m_t << "</div></pre>";
case DocInclude::IncWithLines: case DocInclude::IncWithLines:
{ {
m_t << "<div class=\"fragment\"><pre>"; m_t << "<pre><div class=\"fragment\">";
QFileInfo cfi( inc->file() ); QFileInfo cfi( inc->file() );
FileDef fd( cfi.dirPath(), cfi.fileName() ); FileDef fd( cfi.dirPath(), cfi.fileName() );
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd); parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd);
m_t << "</pre></div>"; m_t << "</div></pre>";
} }
break; break;
break; break;
...@@ -265,7 +265,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) ...@@ -265,7 +265,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
m_t << inc->text(); m_t << inc->text();
break; break;
case DocInclude::VerbInclude: case DocInclude::VerbInclude:
m_t << "<pre class=\"fragment\"><div>"; m_t << "<pre><div class=\"fragment\">";
filter(inc->text()); filter(inc->text());
m_t << "</div></pre>"; m_t << "</div></pre>";
break; break;
...@@ -278,7 +278,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op) ...@@ -278,7 +278,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
// op->type(),op->isFirst(),op->isLast(),op->text().data()); // op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst()) if (op->isFirst())
{ {
if (!m_hide) m_t << "<pre class=\"fragment\"><div>"; if (!m_hide) m_t << "<pre><div class=\"fragment\">";
pushEnabled(); pushEnabled();
m_hide=TRUE; m_hide=TRUE;
} }
...@@ -868,7 +868,25 @@ void HtmlDocVisitor::visitPost(DocParamSect *) ...@@ -868,7 +868,25 @@ void HtmlDocVisitor::visitPost(DocParamSect *)
void HtmlDocVisitor::visitPre(DocParamList *pl) void HtmlDocVisitor::visitPre(DocParamList *pl)
{ {
if (m_hide) return; if (m_hide) return;
m_t << " <tr><td valign=top><em>"; m_t << " <tr><td>";
if (pl->direction()!=DocParamSect::Unspecified)
{
m_t << "<tt>[";
if (pl->direction()==DocParamSect::In)
{
m_t << "in";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "out";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
m_t << "]</tt>&nbsp;";
}
m_t << "</td><td valign=top><em>";
QStrListIterator li(pl->parameters()); QStrListIterator li(pl->parameters());
const char *s; const char *s;
bool first=TRUE; bool first=TRUE;
......
...@@ -888,7 +888,25 @@ void LatexDocVisitor::visitPost(DocParamSect *) ...@@ -888,7 +888,25 @@ void LatexDocVisitor::visitPost(DocParamSect *)
void LatexDocVisitor::visitPre(DocParamList *pl) void LatexDocVisitor::visitPre(DocParamList *pl)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "\\item[{\\em "; m_t << "\\item[";
if (pl->direction()!=DocParamSect::Unspecified)
{
m_t << "\\mbox{";
if (pl->direction()==DocParamSect::In)
{
m_t << "$\\leftarrow$";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "$\\rightarrow$";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "$\\leftrightarrow$";
}
m_t << "} ";
}
m_t << "{\\em ";
QStrListIterator li(pl->parameters()); QStrListIterator li(pl->parameters());
const char *s; const char *s;
bool first=TRUE; bool first=TRUE;
......
...@@ -2226,7 +2226,7 @@ bool MemberDef::isObjCMethod() const ...@@ -2226,7 +2226,7 @@ bool MemberDef::isObjCMethod() const
return FALSE; return FALSE;
} }
QCString MemberDef::qualifiedName() const QCString MemberDef::qualifiedName()
{ {
if (isObjCMethod()) if (isObjCMethod())
{ {
......
...@@ -99,7 +99,7 @@ class MemberDef : public Definition ...@@ -99,7 +99,7 @@ class MemberDef : public Definition
const char *getGroupFileName() const { return groupFileName; } const char *getGroupFileName() const { return groupFileName; }
int getGroupStartLine() const { return groupStartLine; } int getGroupStartLine() const { return groupStartLine; }
bool getGroupHasDocs() const { return groupHasDocs; } bool getGroupHasDocs() const { return groupHasDocs; }
QCString qualifiedName() const; QCString qualifiedName();
// direct kind info // direct kind info
Protection protection() const { return prot; } Protection protection() const { return prot; }
......
...@@ -36,7 +36,7 @@ NamespaceDef::NamespaceDef(const char *df,int dl, ...@@ -36,7 +36,7 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
fileName+=name; fileName+=name;
classSDict = new ClassSDict(17); classSDict = new ClassSDict(17);
namespaceSDict = new NamespaceSDict(17); namespaceSDict = new NamespaceSDict(17);
m_innerCompounds = new SDict<Definition>(17); m_innerCompounds = new SDict<Definition>(257);
usingDirList = 0; usingDirList = 0;
usingDeclList = 0; usingDeclList = 0;
setReference(lref); setReference(lref);
...@@ -399,15 +399,15 @@ void NamespaceDef::addUsingDirective(NamespaceDef *nd) ...@@ -399,15 +399,15 @@ void NamespaceDef::addUsingDirective(NamespaceDef *nd)
} }
} }
void NamespaceDef::addUsingDeclaration(ClassDef *cd) void NamespaceDef::addUsingDeclaration(Definition *d)
{ {
if (usingDeclList==0) if (usingDeclList==0)
{ {
usingDeclList = new ClassSDict; usingDeclList = new SDict<Definition>(17);
} }
if (usingDeclList->find(cd->qualifiedName())==0) if (usingDeclList->find(d->qualifiedName())==0)
{ {
usingDeclList->append(cd->qualifiedName(),cd); usingDeclList->append(d->qualifiedName(),d);
} }
} }
...@@ -480,8 +480,8 @@ void NamespaceDef::combineUsingRelations() ...@@ -480,8 +480,8 @@ void NamespaceDef::combineUsingRelations()
// add used classes of namespace nd to this namespace // add used classes of namespace nd to this namespace
if (nd->getUsedClasses()) if (nd->getUsedClasses())
{ {
ClassSDict::Iterator cli(*nd->getUsedClasses()); SDict<Definition>::Iterator cli(*nd->getUsedClasses());
ClassDef *ucd; Definition *ucd;
for (cli.toFirst();(ucd=cli.current());++cli) for (cli.toFirst();(ucd=cli.current());++cli)
{ {
//printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data()); //printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data());
......
...@@ -55,8 +55,8 @@ class NamespaceDef : public Definition ...@@ -55,8 +55,8 @@ class NamespaceDef : public Definition
int countMembers(); int countMembers();
void addUsingDirective(NamespaceDef *nd); void addUsingDirective(NamespaceDef *nd);
NamespaceSDict *getUsedNamespaces() const { return usingDirList; } NamespaceSDict *getUsedNamespaces() const { return usingDirList; }
void addUsingDeclaration(ClassDef *cd); void addUsingDeclaration(Definition *def);
ClassSDict *getUsedClasses() const { return usingDeclList; } SDict<Definition> *getUsedClasses() const { return usingDeclList; }
void combineUsingRelations(); void combineUsingRelations();
QCString displayName() const; QCString displayName() const;
...@@ -118,7 +118,7 @@ class NamespaceDef : public Definition ...@@ -118,7 +118,7 @@ class NamespaceDef : public Definition
NamespaceSDict *usingDirList; NamespaceSDict *usingDirList;
ClassSDict *usingDeclList; SDict<Definition> *usingDeclList;
SDict<Definition> *m_innerCompounds; SDict<Definition> *m_innerCompounds;
MemberList allMemberList; MemberList allMemberList;
......
...@@ -232,7 +232,7 @@ void PerlModOutput::iaddQuoted(const char *s) ...@@ -232,7 +232,7 @@ void PerlModOutput::iaddQuoted(const char *s)
} }
} }
inline void PerlModOutput::iaddField(const char *s) void PerlModOutput::iaddField(const char *s)
{ {
continueBlock(); continueBlock();
m_stream->add(s); m_stream->add(s);
......
...@@ -491,7 +491,7 @@ static void prependScope() ...@@ -491,7 +491,7 @@ static void prependScope()
/*! Returns TRUE iff the current entry could be a K&R style C function */ /*! Returns TRUE iff the current entry could be a K&R style C function */
static bool checkForKnRstyleC() static bool checkForKnRstyleC()
{ {
if (((QCString)yyFileName).right(2)!=".c") return FALSE; // must be a C file if (((QCString)yyFileName).right(2).lower()!=".c") return FALSE; // must be a C file
if (!current->argList) return FALSE; if (!current->argList) return FALSE;
ArgumentListIterator ali(*current->argList); ArgumentListIterator ali(*current->argList);
Argument *a; Argument *a;
...@@ -3575,12 +3575,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3575,12 +3575,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
<ClassVar>"<" { current->name += *yytext; <ClassVar>"<" { current->name += *yytext;
sharpCount=1; sharpCount=1;
roundCount=0;
lastSkipSharpContext = YY_START; lastSkipSharpContext = YY_START;
specName = &current->name; specName = &current->name;
BEGIN ( Specialization ); BEGIN ( Specialization );
} }
<Bases>"<" { <Bases>"<" {
sharpCount=1; sharpCount=1;
roundCount=0;
lastSkipSharpContext = YY_START; lastSkipSharpContext = YY_START;
if (insideObjC) // start of protocol list if (insideObjC) // start of protocol list
{ {
...@@ -3594,17 +3596,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] ...@@ -3594,17 +3596,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
} }
} }
<Specialization>"<" { *specName += *yytext; <Specialization>"<" { *specName += *yytext;
sharpCount++; if (roundCount==0) sharpCount++;
} }
<Specialization>">" { <Specialization>">" {
*specName += *yytext; *specName += *yytext;
if (--sharpCount<=0) if (roundCount==0 && --sharpCount<=0)
BEGIN(lastSkipSharpContext); BEGIN(lastSkipSharpContext);
} }
<Specialization>{BN}+ { lineCount(); *specName +=' '; } <Specialization>{BN}+ { lineCount(); *specName +=' '; }
<Specialization>"<<" { *specName += yytext; } <Specialization>"<<" { *specName += yytext; }
<Specialization>">>" { *specName += yytext; } <Specialization>">>" { *specName += yytext; }
<Specialization>"typename"{BN}+ { lineCount(); } <Specialization>"typename"{BN}+ { lineCount(); }
<Specialization>"(" { *specName += *yytext; roundCount++; }
<Specialization>")" { *specName += *yytext; roundCount--; }
<Specialization>. { <Specialization>. {
*specName += *yytext; *specName += *yytext;
} }
......
...@@ -60,12 +60,13 @@ extern char **environ; ...@@ -60,12 +60,13 @@ extern char **environ;
//------------------------------------------------------------------------ //------------------------------------------------------------------------
static QCache<int> g_accessibilityCache(10000,10000); static QCache<ClassDef*> g_lookupCache(20000,20000);
// object that automatically initializes the cache at startup
class CacheInitializer class CacheInitializer
{ {
public: public:
CacheInitializer() { g_accessibilityCache.setAutoDelete(TRUE); } CacheInitializer() { g_lookupCache.setAutoDelete(TRUE); }
} g_cacheInitializer; } g_cacheInitializer;
...@@ -578,7 +579,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -578,7 +579,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
MemberDef **pTypeDef, MemberDef **pTypeDef,
QCString *pTemplSpec QCString *pTemplSpec
); );
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item,
const QCString &explicitScopePart); const QCString &explicitScopePart);
/*! Returns the class representing the value of the typedef represented by \a md /*! Returns the class representing the value of the typedef represented by \a md
...@@ -673,7 +674,7 @@ QCString substTypedef(Definition *scope,FileDef *fileScope,const QCString &name) ...@@ -673,7 +674,7 @@ QCString substTypedef(Definition *scope,FileDef *fileScope,const QCString &name)
if (md->isTypedef()) // d is a typedef if (md->isTypedef()) // d is a typedef
{ {
// test accessibility of typedef within scope. // test accessibility of typedef within scope.
int distance = isAccessibleFrom(scope,fileScope,d,""); int distance = isAccessibleFromWithExpScope(scope,fileScope,d,"");
if (distance!=-1 && distance<minDistance) if (distance!=-1 && distance<minDistance)
// definition is accessible and a better match // definition is accessible and a better match
{ {
...@@ -711,7 +712,7 @@ static Definition *followPath(Definition *start,FileDef *fileScope,const QCStrin ...@@ -711,7 +712,7 @@ static Definition *followPath(Definition *start,FileDef *fileScope,const QCStrin
return current; // path could be followed return current; // path could be followed
} }
bool accessibleViaUsingClass(const ClassSDict *cl, bool accessibleViaUsingClass(const SDict<Definition> *cl,
FileDef *fileScope, FileDef *fileScope,
Definition *item, Definition *item,
const QCString &explicitScopePart="" const QCString &explicitScopePart=""
...@@ -719,26 +720,14 @@ bool accessibleViaUsingClass(const ClassSDict *cl, ...@@ -719,26 +720,14 @@ bool accessibleViaUsingClass(const ClassSDict *cl,
{ {
if (cl) // see if the class was imported via a using statement if (cl) // see if the class was imported via a using statement
{ {
ClassSDict::Iterator cli(*cl); SDict<Definition>::Iterator cli(*cl);
ClassDef *ucd; Definition *ucd;
bool explicitScopePartEmpty = explicitScopePart.isEmpty();
for (cli.toFirst();(ucd=cli.current());++cli) for (cli.toFirst();(ucd=cli.current());++cli)
{ {
//printf("Trying via used class %s\n",ucd->name().data()); //printf("Trying via used class %s\n",ucd->name().data());
Definition *sc = explicitScopePart.isEmpty() ? ucd : followPath(ucd,fileScope,explicitScopePart); Definition *sc = explicitScopePartEmpty ? ucd : followPath(ucd,fileScope,explicitScopePart);
if (item->definitionType()==Definition::TypeMember) if (sc && sc==item) return TRUE;
{
MemberDef *md = (MemberDef *)item;
if (md->isTypedef()) // d is a typedef
{
QCString spec;
ClassDef *typedefClass = newResolveTypedef(fileScope,md,&spec);
if (sc && sc==typedefClass) return TRUE;
}
}
else // item is a class
{
if (sc && sc==item) return TRUE;
}
//printf("Try via used class done\n"); //printf("Try via used class done\n");
} }
} }
...@@ -773,15 +762,10 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) ...@@ -773,15 +762,10 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
{ {
//fprintf(stderr,"<isAccesibleFrom(scope=%s,item=%s itemScope=%s)\n", //fprintf(stderr,"<isAccesibleFrom(scope=%s,item=%s itemScope=%s)\n",
// scope->name().data(),item->name().data(),item->getOuterScope()->name().data()); // scope->name().data(),item->name().data(),item->getOuterScope()->name().data());
QCString key=scope->name()+"+"+item->qualifiedName();
int *pval=g_accessibilityCache.find(key);
int result=0; // assume we found it int result=0; // assume we found it
int i; int i;
if (pval) // value was cached
{
//fprintf(stderr,"> found cached value=%d\n",*pval);
return *pval;
}
if (item->getOuterScope()==scope) if (item->getOuterScope()==scope)
{ {
//fprintf(stderr,"> found it\n"); //fprintf(stderr,"> found it\n");
...@@ -790,7 +774,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) ...@@ -790,7 +774,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
{ {
if (fileScope) if (fileScope)
{ {
ClassSDict *cl = fileScope->getUsedClasses(); SDict<Definition> *cl = fileScope->getUsedClasses();
if (accessibleViaUsingClass(cl,fileScope,item)) if (accessibleViaUsingClass(cl,fileScope,item))
{ {
//fprintf(stderr,"> found via used class\n"); //fprintf(stderr,"> found via used class\n");
...@@ -812,7 +796,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) ...@@ -812,7 +796,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
if (scope->definitionType()==Definition::TypeNamespace) if (scope->definitionType()==Definition::TypeNamespace)
{ {
NamespaceDef *nscope = (NamespaceDef*)scope; NamespaceDef *nscope = (NamespaceDef*)scope;
ClassSDict *cl = nscope->getUsedClasses(); SDict<Definition> *cl = nscope->getUsedClasses();
if (accessibleViaUsingClass(cl,fileScope,item)) if (accessibleViaUsingClass(cl,fileScope,item))
{ {
//fprintf(stderr,"> found via used class\n"); //fprintf(stderr,"> found via used class\n");
...@@ -831,7 +815,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) ...@@ -831,7 +815,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
result= (i==-1) ? -1 : i+1; result= (i==-1) ? -1 : i+1;
} }
done: done:
g_accessibilityCache.insert(key,new int(result)); //g_lookupCache.insert(key,new int(result));
return result; return result;
} }
...@@ -840,7 +824,7 @@ done: ...@@ -840,7 +824,7 @@ done:
* if item in not in this scope. The explicitScopePart limits the search * if item in not in this scope. The explicitScopePart limits the search
* to scopes that match \a scope plus the explicit part. * to scopes that match \a scope plus the explicit part.
*/ */
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item,
const QCString &explicitScopePart) const QCString &explicitScopePart)
{ {
if (explicitScopePart.isEmpty()) if (explicitScopePart.isEmpty())
...@@ -848,17 +832,10 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, ...@@ -848,17 +832,10 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
// handle degenerate case where there is no explicit scope. // handle degenerate case where there is no explicit scope.
return isAccessibleFrom(scope,fileScope,item); return isAccessibleFrom(scope,fileScope,item);
} }
//printf("<isAccesibleFrom(%s,%s,%s)\n",scope?scope->name().data():"<global>", //printf("<isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?scope->name().data():"<global>",
// item?item->name().data():"<none>", // item?item->name().data():"<none>",
// explicitScopePart.data()); // explicitScopePart.data());
QCString key=scope->name()+"+"+item->qualifiedName()+"+"+explicitScopePart;
int *pval=g_accessibilityCache.find(key);
int result=0; // assume we found it int result=0; // assume we found it
if (pval) // value was cached
{
//printf("> found cached value=%d\n",*pval);
return *pval;
}
Definition *newScope = followPath(scope,fileScope,explicitScopePart); Definition *newScope = followPath(scope,fileScope,explicitScopePart);
if (newScope) // explicitScope is inside scope => newScope is the result if (newScope) // explicitScope is inside scope => newScope is the result
{ {
...@@ -878,14 +855,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, ...@@ -878,14 +855,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
// in A via a using directive. // in A via a using directive.
//printf("newScope is a namespace: %s!\n",newScope->name().data()); //printf("newScope is a namespace: %s!\n",newScope->name().data());
NamespaceDef *nscope = (NamespaceDef*)newScope; NamespaceDef *nscope = (NamespaceDef*)newScope;
ClassSDict *cl = nscope->getUsedClasses(); SDict<Definition> *cl = nscope->getUsedClasses();
if (cl) if (cl)
{ {
ClassSDict::Iterator cli(*cl); SDict<Definition>::Iterator cli(*cl);
ClassDef *cd; Definition *cd;
for (cli.toFirst();(cd=cli.current());++cli) for (cli.toFirst();(cd=cli.current());++cli)
{ {
i = isAccessibleFrom(scope,fileScope,item,cd->name()); i = isAccessibleFromWithExpScope(scope,fileScope,item,cd->name());
if (i!=-1) if (i!=-1)
{ {
//printf("> found via explicit scope of used class\n"); //printf("> found via explicit scope of used class\n");
...@@ -902,7 +879,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, ...@@ -902,7 +879,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
{ {
if (g_visitedNamespaces.find(nd->name())==0) if (g_visitedNamespaces.find(nd->name())==0)
{ {
i = isAccessibleFrom(scope,fileScope,item,nd->name()); i = isAccessibleFromWithExpScope(scope,fileScope,item,nd->name());
if (i!=-1) if (i!=-1)
{ {
//printf("> found via explicit scope of used namespace\n"); //printf("> found via explicit scope of used namespace\n");
...@@ -915,7 +892,8 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, ...@@ -915,7 +892,8 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
// repeat for the parent scope // repeat for the parent scope
if (scope!=Doxygen::globalScope) if (scope!=Doxygen::globalScope)
{ {
i = isAccessibleFrom(scope->getOuterScope(),fileScope,item,explicitScopePart); i = isAccessibleFromWithExpScope(scope->getOuterScope(),fileScope,
item,explicitScopePart);
} }
//printf("> result=%d\n",i); //printf("> result=%d\n",i);
result = (i==-1) ? -1 : i+1; result = (i==-1) ? -1 : i+1;
...@@ -927,7 +905,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, ...@@ -927,7 +905,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
if (scope->definitionType()==Definition::TypeNamespace) if (scope->definitionType()==Definition::TypeNamespace)
{ {
NamespaceDef *nscope = (NamespaceDef*)scope; NamespaceDef *nscope = (NamespaceDef*)scope;
ClassSDict *cl = nscope->getUsedClasses(); SDict<Definition> *cl = nscope->getUsedClasses();
if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart)) if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart))
{ {
//printf("> found in used class\n"); //printf("> found in used class\n");
...@@ -944,7 +922,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, ...@@ -944,7 +922,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
{ {
if (fileScope) if (fileScope)
{ {
ClassSDict *cl = fileScope->getUsedClasses(); SDict<Definition> *cl = fileScope->getUsedClasses();
if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart)) if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart))
{ {
//printf("> found in used class\n"); //printf("> found in used class\n");
...@@ -962,13 +940,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, ...@@ -962,13 +940,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
} }
else // continue by looking into the parent scope else // continue by looking into the parent scope
{ {
int i=isAccessibleFrom(scope->getOuterScope(),fileScope,item,explicitScopePart); int i=isAccessibleFromWithExpScope(scope->getOuterScope(),fileScope,
item,explicitScopePart);
//printf("> result=%d\n",i); //printf("> result=%d\n",i);
result= (i==-1) ? -1 : i+1; result= (i==-1) ? -1 : i+1;
} }
} }
done: done:
g_accessibilityCache.insert(key,new int(result)); //g_lookupCache.insert(key,new int(result));
return result; return result;
} }
...@@ -1006,6 +985,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1006,6 +985,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
replaceNamespaceAliases(explicitScopePart,explicitScopePart.length()); replaceNamespaceAliases(explicitScopePart,explicitScopePart.length());
name=name.mid(qualifierIndex+2); name=name.mid(qualifierIndex+2);
} }
if (name.isEmpty()) if (name.isEmpty())
{ {
//printf("] empty name\n"); //printf("] empty name\n");
...@@ -1016,22 +996,43 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1016,22 +996,43 @@ ClassDef *getResolvedClassRec(Definition *scope,
//printf("Looking for symbol %s result=%p\n",name.data(),dl); //printf("Looking for symbol %s result=%p\n",name.data(),dl);
if (dl==0) if (dl==0)
{ {
//printf("] no such symbol\n"); // name is not a known symbol
return 0; // symbol not found return 0;
} }
// Since it is often the case that the same name is searched in the same
// scope over an over again (especially for the linked source code generation)
// we use a cache to collect previous results. This is possible since the
// result of a lookup is deterministic. As the key we use the concatenated
// scope, the name to search for and the explicit scope prefix. The speedup
// achieved by this simple cache can be enormous.
QCString key=scope->name()+"+"+name+"+"+explicitScopePart;
ClassDef **pval=g_lookupCache.find(key);
//printf("Searching for %s result=%p\n",key.data(),pval);
if (pval)
{
return *pval;
}
else // not found yet; we already add a 0 to avoid the possibility of
// endless recursion.
{
g_lookupCache.insert(key,new ClassDef*(0));
}
ClassDef *bestMatch=0;
//printf(" found %d symbol with name %s\n",dl->count(),name.data()); //printf(" found %d symbol with name %s\n",dl->count(),name.data());
// now we look int the list of Definitions and determine which one is the "best" // now we look int the list of Definitions and determine which one is the "best"
DefinitionListIterator dli(*dl); DefinitionListIterator dli(*dl);
Definition *d; Definition *d;
ClassDef *bestMatch=0;
MemberDef *bestTypedef=0; MemberDef *bestTypedef=0;
QCString bestTemplSpec; QCString bestTemplSpec;
int minDistance=10000; // init at "infinite" int minDistance=10000; // init at "infinite"
for (dli.toFirst();(d=dli.current());++dli) // foreach definition int count=0;
for (dli.toFirst();(d=dli.current());++dli,++count) // foreach definition
{ {
//printf(" found type %x name=%s\n", //fprintf(stderr," found type %x name=%s (%d/%d)\n",
// d->definitionType(),d->name().data()); // d->definitionType(),d->name().data(),count,dl->count());
// only look at classes and members // only look at classes and members
if (d->definitionType()==Definition::TypeClass || if (d->definitionType()==Definition::TypeClass ||
...@@ -1039,7 +1040,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1039,7 +1040,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
{ {
g_visitedNamespaces.clear(); g_visitedNamespaces.clear();
// test accessibility of definition within scope. // test accessibility of definition within scope.
int distance = isAccessibleFrom(scope,fileScope,d,explicitScopePart); int distance = isAccessibleFromWithExpScope(scope,fileScope,d,explicitScopePart);
if (distance!=-1) // definition is accessible if (distance!=-1) // definition is accessible
{ {
// see if we are dealing with a class or a typedef // see if we are dealing with a class or a typedef
...@@ -1060,8 +1061,6 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1060,8 +1061,6 @@ ClassDef *getResolvedClassRec(Definition *scope,
if (md->isTypedef()) // d is a typedef if (md->isTypedef()) // d is a typedef
{ {
//printf(" found typedef!\n"); //printf(" found typedef!\n");
QCString spec;
ClassDef *typedefClass = newResolveTypedef(fileScope,md,&spec);
// we found a symbol at this distance, but if it didn't // we found a symbol at this distance, but if it didn't
// resolve to a class, we still have to make sure that // resolve to a class, we still have to make sure that
...@@ -1069,8 +1068,9 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1069,8 +1068,9 @@ ClassDef *getResolvedClassRec(Definition *scope,
// that symbol is hidden by this one. // that symbol is hidden by this one.
if (distance<minDistance) if (distance<minDistance)
{ {
QCString spec;
minDistance=distance; minDistance=distance;
bestMatch = typedefClass; bestMatch = newResolveTypedef(fileScope,md,&spec);
//printf(" bestTypeDef=%p\n",md); //printf(" bestTypeDef=%p\n",md);
bestTypedef = md; bestTypedef = md;
bestTemplSpec = spec; bestTemplSpec = spec;
...@@ -1092,6 +1092,16 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1092,6 +1092,16 @@ ClassDef *getResolvedClassRec(Definition *scope,
{ {
*pTemplSpec = bestTemplSpec; *pTemplSpec = bestTemplSpec;
} }
pval=g_lookupCache.find(key);
if (pval)
{
*pval=bestMatch;
}
else
{
g_lookupCache.insert(key,new ClassDef*(bestMatch));
}
//printf("] bestMatch=%s distance=%d\n", //printf("] bestMatch=%s distance=%d\n",
// bestMatch?bestMatch->name().data():"<none>",minDistance); // bestMatch?bestMatch->name().data():"<none>",minDistance);
return bestMatch; return bestMatch;
...@@ -1119,7 +1129,6 @@ ClassDef *getResolvedClass(Definition *scope, ...@@ -1119,7 +1129,6 @@ ClassDef *getResolvedClass(Definition *scope,
{ {
scope=Doxygen::globalScope; scope=Doxygen::globalScope;
} }
//printf("-------- start\n");
//printf("getResolvedClass(%s,%s)\n",scope?scope->name().data():"<global>",n); //printf("getResolvedClass(%s,%s)\n",scope?scope->name().data():"<global>",n);
ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec); ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec);
if (!mayBeUnlinkable && result && !result->isLinkable()) if (!mayBeUnlinkable && result && !result->isLinkable())
...@@ -1129,7 +1138,6 @@ ClassDef *getResolvedClass(Definition *scope, ...@@ -1129,7 +1138,6 @@ ClassDef *getResolvedClass(Definition *scope,
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>", //printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
// n,result?result->name().data():"<none>"); // n,result?result->name().data():"<none>");
// //
//printf("-------- end\n");
return result; return result;
} }
...@@ -1308,54 +1316,28 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,FileDef *fileSco ...@@ -1308,54 +1316,28 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,FileDef *fileSco
NamespaceDef *nd=0; NamespaceDef *nd=0;
GroupDef *gd=0; GroupDef *gd=0;
//QCString searchName=name; MemberDef *typeDef=0;
//printf("word=`%s' scope=`%s'\n", if ((cd=getResolvedClass(scope,fileScope,word,&typeDef)))
// word.data(),scope ? scope->name().data() : "<none>" {
// ); // add link to the result
// Definition *curScope = scope; if (external ? cd->isLinkable() : cd->isLinkableInProject())
// check if `word' is a documented class name
//int scopeOffset=scopeName.length();
// do // for each scope (starting with full scope and going to empty scope)
// {
//printf("Searching %s in %s...\n",word.data(),curScope?curScope->name().data():"<global>");
// QCString fullName = word;
// QCString prefix;
// replaceNamespaceAliases(fullName,fullName.length());
// //if (scopeOffset>0)
// if (curScope && curScope!=Doxygen::globalScope)
// {
// prefix = curScope->name();
// replaceNamespaceAliases(prefix,prefix.length());
// fullName.prepend(prefix+"::");
// }
MemberDef *typeDef=0;
if ((cd=getResolvedClass(scope,fileScope,word,&typeDef)))
{ {
// add link to the result out.writeLink(cd->getReference(),cd->getOutputFileBase(),0,word);
if (external ? cd->isLinkable() : cd->isLinkableInProject()) found=TRUE;
{
out.writeLink(cd->getReference(),cd->getOutputFileBase(),0,word);
found=TRUE;
}
} }
else if (typeDef) }
else if (typeDef)
{
if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject())
{ {
if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject()) out.writeLink(typeDef->getReference(),
{ typeDef->getOutputFileBase(),
out.writeLink(typeDef->getReference(), typeDef->anchor(),
typeDef->getOutputFileBase(), word);
typeDef->anchor(), found=TRUE;
word);
found=TRUE;
}
} }
}
// if (curScope) curScope = curScope->getOuterScope();
// } //while (!found && scopeOffset>=0);
// while (!found && curScope);
//endloop:
if (scope && if (scope &&
(scope->definitionType()==Definition::TypeClass || (scope->definitionType()==Definition::TypeClass ||
scope->definitionType()==Definition::TypeNamespace scope->definitionType()==Definition::TypeNamespace
...@@ -2072,7 +2054,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -2072,7 +2054,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
const QCString &className, const QCString &className,
const QCString &namespaceName, const QCString &namespaceName,
NamespaceSDict *usingNamespaces, NamespaceSDict *usingNamespaces,
ClassSDict *usingClasses) SDict<Definition> *usingClasses)
{ {
//printf("match argument start %s:%s <-> %s:%s using nsp=%p class=%p\n", //printf("match argument start %s:%s <-> %s:%s using nsp=%p class=%p\n",
// srcA->type.data(),srcA->name.data(), // srcA->type.data(),srcA->name.data(),
...@@ -2186,8 +2168,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -2186,8 +2168,8 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
} }
if (usingClasses && usingClasses->count()>0) if (usingClasses && usingClasses->count()>0)
{ {
ClassSDict::Iterator cli(*usingClasses); SDict<Definition>::Iterator cli(*usingClasses);
ClassDef *cd; Definition *cd;
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
srcAType=trimScope(cd->name(),srcAType); srcAType=trimScope(cd->name(),srcAType);
...@@ -2339,7 +2321,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA, ...@@ -2339,7 +2321,7 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
const char *cl,const char *ns,bool checkCV, const char *cl,const char *ns,bool checkCV,
NamespaceSDict *usingNamespaces, NamespaceSDict *usingNamespaces,
ClassSDict *usingClasses) SDict<Definition> *usingClasses)
{ {
QCString className=cl; QCString className=cl;
QCString namespaceName=ns; QCString namespaceName=ns;
...@@ -3536,6 +3518,7 @@ bool hasVisibleRoot(BaseClassList *bcl) ...@@ -3536,6 +3518,7 @@ bool hasVisibleRoot(BaseClassList *bcl)
QCString escapeCharsInString(const char *name,bool allowDots) QCString escapeCharsInString(const char *name,bool allowDots)
{ {
static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES");
QCString result; QCString result;
char c; char c;
const char *p=name; const char *p=name;
...@@ -3557,7 +3540,7 @@ QCString escapeCharsInString(const char *name,bool allowDots) ...@@ -3557,7 +3540,7 @@ QCString escapeCharsInString(const char *name,bool allowDots)
case ',': result+="_00"; break; case ',': result+="_00"; break;
case ' ': result+="_01"; break; case ' ': result+="_01"; break;
default: default:
if (Config_getBool("CASE_SENSE_NAMES") || !isupper(c)) if (caseSenseNames || !isupper(c))
{ {
result+=c; result+=c;
} }
...@@ -3578,8 +3561,10 @@ QCString escapeCharsInString(const char *name,bool allowDots) ...@@ -3578,8 +3561,10 @@ QCString escapeCharsInString(const char *name,bool allowDots)
*/ */
QCString convertNameToFile(const char *name,bool allowDots) QCString convertNameToFile(const char *name,bool allowDots)
{ {
static bool shortNames = Config_getBool("SHORT_NAMES");
static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
QCString result; QCString result;
if (Config_getBool("SHORT_NAMES")) if (shortNames)
{ {
static QDict<void> usedNames(10007); static QDict<void> usedNames(10007);
static int count=1; static int count=1;
...@@ -3601,7 +3586,7 @@ QCString convertNameToFile(const char *name,bool allowDots) ...@@ -3601,7 +3586,7 @@ QCString convertNameToFile(const char *name,bool allowDots)
{ {
result=escapeCharsInString(name,allowDots); result=escapeCharsInString(name,allowDots);
} }
if (Config_getBool("CREATE_SUBDIRS")) if (createSubdirs)
{ {
if (Doxygen::htmlDirMap==0) if (Doxygen::htmlDirMap==0)
{ {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <qlist.h> #include <qlist.h>
#include <qtextstream.h> #include <qtextstream.h>
#include <ctype.h> #include <ctype.h>
#include "sortdict.h"
class ClassDef; class ClassDef;
class FileDef; class FileDef;
...@@ -43,13 +44,13 @@ class GroupDef; ...@@ -43,13 +44,13 @@ class GroupDef;
class NamespaceSDict; class NamespaceSDict;
class ClassList; class ClassList;
class MemberGroupSDict; class MemberGroupSDict;
class Definition;
struct TagInfo; struct TagInfo;
class MemberNameInfoSDict; class MemberNameInfoSDict;
struct ListItemInfo; struct ListItemInfo;
class PageDef; class PageDef;
struct SectionInfo; struct SectionInfo;
class QDir; class QDir;
class Definition;
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -129,7 +130,7 @@ void writePageRef(OutputDocInterface &od,const char *cn,const char *mn); ...@@ -129,7 +130,7 @@ void writePageRef(OutputDocInterface &od,const char *cn,const char *mn);
bool matchArguments(ArgumentList *,ArgumentList *, bool matchArguments(ArgumentList *,ArgumentList *,
const char *cl=0,const char *ns=0,bool checkCV=TRUE, const char *cl=0,const char *ns=0,bool checkCV=TRUE,
NamespaceSDict *usingNamespaces=0, NamespaceSDict *usingNamespaces=0,
ClassSDict *usingClasses=0); SDict<Definition> *usingClasses=0);
void mergeArguments(ArgumentList *,ArgumentList *,bool forceNameOverwrite=FALSE); void mergeArguments(ArgumentList *,ArgumentList *,bool forceNameOverwrite=FALSE);
QCString substituteClassNames(const QCString &s); QCString substituteClassNames(const QCString &s);
QCString substitute(const char *s,const char *src,const char *dst); QCString substitute(const char *s,const char *src,const char *dst);
...@@ -212,7 +213,7 @@ QCString linkToText(const char *link,bool isFileName); ...@@ -212,7 +213,7 @@ QCString linkToText(const char *link,bool isFileName);
QCString stripExtension(const char *fName); QCString stripExtension(const char *fName);
void replaceNamespaceAliases(QCString &scope,int i); void replaceNamespaceAliases(QCString &scope,int i);
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item); int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item);
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item, int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item,
const QCString &explicitScopePart); const QCString &explicitScopePart);
int computeQualifiedIndex(const QString &name); int computeQualifiedIndex(const QString &name);
void addDirPrefix(QCString &fileName); void addDirPrefix(QCString &fileName);
......
...@@ -752,7 +752,25 @@ void XmlDocVisitor::visitPre(DocParamList *pl) ...@@ -752,7 +752,25 @@ void XmlDocVisitor::visitPre(DocParamList *pl)
const char *s; const char *s;
for (li.toFirst();(s=li.current());++li) for (li.toFirst();(s=li.current());++li)
{ {
m_t << "<parametername>"; m_t << "<parametername";
if (pl->direction()!=DocParamSect::Unspecified)
{
m_t << " direction=\"";
if (pl->direction()==DocParamSect::In)
{
m_t << "in";
}
else if (pl->direction()==DocParamSect::Out)
{
m_t << "out";
}
else if (pl->direction()==DocParamSect::InOut)
{
m_t << "inout";
}
m_t << "\"";
}
m_t << ">";
filter(s); filter(s);
m_t << "</parametername>" << endl; m_t << "</parametername>" << endl;
} }
......
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