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)
......
This diff is collapsed.
This diff is collapsed.
...@@ -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;
} }
......
This diff is collapsed.
...@@ -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