Commit 9b0cf1e0 authored by dimitri's avatar dimitri

Release-1.3.6-20040427

parent 4088d90d
DOXYGEN Version 1.3.6-20040413
DOXYGEN Version 1.3.6-20040427
Please read the installation section of the manual
(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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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 @@
#include "inputbool.h"
#include "pagewidget.h"
#if QT_VERSION >= 300
#include <qstylefactory.h>
#else
#include <qwindowsstyle.h>
#endif
#include <qlayout.h>
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->addStretch(10);
#if QT_VERSION >= 300
QStyle *winStyle = QStyleFactory::create("windows");
#else
QWindowsStyle *winStyle = new QWindowsStyle();
#endif
cb->setChecked( flag );
cb->setStyle( winStyle );
if (winStyle) cb->setStyle( winStyle );
cb->setMinimumSize( sizeHint() );
connect( cb, SIGNAL(toggled(bool)), SLOT(setState(bool)) );
......
......@@ -397,6 +397,10 @@ echo "using $f_perl";
test -f .makeconfig && rm .makeconfig
test -f .tmakeconfig && rm .tmakeconfig
if test -z $PWD; then
PWD=`pwd`
fi
cat > .makeconfig <<EOF
DOXYGEN = $PWD
TMAKEPATH = $PWD/tmake/lib/$f_platform
......
......@@ -31,6 +31,6 @@ clean:
language: language.doc
language.doc: $(wildcard ../src/translator*.h) maintainers.txt language.tpl translator.py
python translator.pl
python translator.py
FORCE:
......@@ -922,9 +922,28 @@ ALIASES = "english=\if english" \
\addindex \\param
Starts a parameter description for a function parameter with name
\<parameter-name\>. Followed by a description of the parameter.
The existence of the parameter is not checked.
The text of the paragraph has no special internal structure. All visual
enhancement commands may be used inside the paragraph.
The existence of the parameter is checked and a warning is given if
the documentation of this (or any other) parameter is missing or not
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.
Each parameter description will start on a new line.
The \\param description ends when a blank line or some other
......
......@@ -26,8 +26,8 @@ Version: $(VERSION)
\endif
<h2>Introduction</h2>
Doxygen is a documentation system for C++, C, Java, IDL
(Corba and Microsoft flavors) and to some extent Objective-C, PHP, C# and D.
Doxygen is a documentation system for C++, C, Java, Objective-C, IDL
(Corba and Microsoft flavors) and to some extent PHP, C# and D.
It can help you in three ways:
<ol>
......
......@@ -38,8 +38,8 @@
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
content should be more useful for developers.
2004/02/11
- Some tuning-up to provide more useful information.
2004/02/11 - 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
......@@ -127,6 +127,8 @@ class Transl:
'"': 'dquot',
'.': 'dot',
'%': 'perc',
'~': 'tilde',
'^': 'caret',
}
# Regular expression for recognizing identifiers.
......@@ -180,7 +182,7 @@ class Transl:
else:
msg = '\aWarning: unknown token "' + tokenStr + '"'
msg += '\tfound on line %d' % tokenLineNo
msg += 'in "' + self.fname + '".\n'
msg += ' in "' + self.fname + '".\n'
sys.stderr.write(msg)
yield (tokenId, tokenStr, tokenLineNo)
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.6_20040413
Version: 1.3.6_20040427
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -41,7 +41,6 @@
#include "qdatastream.h"
#include <ctype.h>
// NOT REVISED
/*!
\class QGDict qgdict.h
......@@ -87,8 +86,8 @@ public:
int QGDict::hashKeyString( const QString &key )
{
#if defined(CHECK_NULL)
if ( key.isNull() )
qWarning( "QGDict::hashStringKey: Invalid null key" );
if ( key.isNull() )
qWarning( "QGDict::hashStringKey: Invalid null key" );
#endif
int i;
register uint h=0;
......
......@@ -129,8 +129,10 @@ ClassDef::~ClassDef()
QCString ClassDef::displayName() const
{
static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
QCString n;
if (Config_getBool("HIDE_SCOPE_NAMES"))
if (hideScopeNames)
{
n=m_className;
}
......@@ -138,7 +140,7 @@ QCString ClassDef::displayName() const
{
n=qualifiedNameWithTemplateParameters();
}
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
if (optimizeOutputForJava)
{
n=substitute(n,"::",".");
}
......@@ -1932,10 +1934,15 @@ bool ClassDef::hasDocumentation() const
// returns TRUE iff class definition `bcd' represents an (in)direct base
// class of class definition `cd'.
bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances)
bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
{
bool found=FALSE;
//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());
for ( ; bcli.current() && !found ; ++bcli)
{
......@@ -1945,7 +1952,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances)
if (ccd==bcd)
found=TRUE;
else
found=ccd->isBaseClass(bcd,followInstances);
found=ccd->isBaseClass(bcd,followInstances,level+1);
}
return found;
}
......@@ -2843,4 +2850,3 @@ MemberDef *ClassDef::getMemberByName(const QCString &name)
return xmd;
}
......@@ -149,7 +149,7 @@ class ClassDef : public Definition
* class. This function will recusively traverse all branches of the
* 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
* this template class. Returns 0 if not a template or no instances.
......
......@@ -1466,6 +1466,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
%x ObjCCall
%x ObjCMName
%x ObjCSkipStr
%x OldStyleArgs
%%
......@@ -1783,7 +1784,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0)
{
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);
// insert base classes.
char *s=g_curClassBases.first();
......@@ -2280,7 +2281,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_code->codify(yytext);
endFontClass();
}
<MemberCall2,FuncCall>{TYPEKW}/([^a-z_A-Z0-9]) {
<MemberCall2,FuncCall,OldStyleArgs>{TYPEKW}/([^a-z_A-Z0-9]) {
addParmType();
g_parmName=yytext;
startFontClass("keywordtype");
......@@ -2352,7 +2353,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
BEGIN( SkipInits );
}
}
<CallEnd>({BN}"const"|"volatile")*{BN}*"{" {
<CallEnd,OldStyleArgs>({BN}"const"|"volatile")*{BN}*"{" {
if (g_insideBody)
{
g_theVarContext.pushScope();
......@@ -2401,6 +2402,28 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
g_type.resize(0); g_name.resize(0);
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>. {
unput(*yytext);
if (!g_insideBody)
......
This diff is collapsed.
This diff is collapsed.
......@@ -76,6 +76,7 @@ static void removeFromMap(Definition *d)
Definition::Definition(const char *df,int dl,
const char *name,const char *b,
const char *d,bool isSymbol)
: m_reachableDefs(17)
{
//QCString ns;
m_defFileName = df;
......@@ -111,6 +112,8 @@ Definition::Definition(const char *df,int dl,
m_docFile=(QCString)"<"+name+">";
m_isSymbol = isSymbol;
if (m_isSymbol) addToMap(name,this);
m_reachableDefs.setAutoDelete(TRUE);
m_reachabilityComputed=FALSE;
}
Definition::~Definition()
......@@ -578,9 +581,10 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
bool Definition::hasDocumentation() const
{
static bool extractAll = Config_getBool("EXTRACT_ALL");
return !m_doc.isEmpty() || // has detailed docs
!m_brief.isEmpty() || // has brief description
Config_getBool("EXTRACT_ALL"); // extract everything
extractAll; // extract everything
}
void Definition::addSourceReferencedBy(MemberDef *md)
......@@ -640,8 +644,10 @@ void Definition::addInnerCompound(Definition *)
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());
if (m_outerScope==0)
{
......@@ -649,17 +655,16 @@ QCString Definition::qualifiedName() const
else return m_localName;
}
QCString qualifiedName;
if (m_outerScope->name()=="<globalScope>")
{
qualifiedName = m_localName.copy();
m_qualifiedName = m_localName.copy();
}
else
{
qualifiedName = m_outerScope->qualifiedName()+"::"+m_localName;
m_qualifiedName = m_outerScope->qualifiedName()+"::"+m_localName;
}
//printf("end Definition::qualifiedName()=%s\n",qualifiedName.data());
return qualifiedName;
return m_qualifiedName;
};
QCString Definition::localName() 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 @@
#include "qtbc.h"
#include <qlist.h>
#include <qdict.h>
class FileDef;
class OutputList;
......@@ -32,6 +33,14 @@ class GroupDef;
class GroupList;
struct ListItemInfo;
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. */
class Definition
......@@ -58,7 +67,7 @@ class Definition
/*! Returns the base name of the output file that contains this
* definition.
*/
virtual QCString qualifiedName() const;
virtual QCString qualifiedName();
QCString localName() const;
virtual QCString getOutputFileBase() const = 0;
/*! Returns the name of the source listing of this file. */
......@@ -132,6 +141,7 @@ class Definition
virtual Definition *getOuterScope() const { return m_outerScope; }
virtual void addInnerCompound(Definition *d);
virtual void setOuterScope(Definition *d) { m_outerScope = d; }
virtual void computeReachability();
MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; }
MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; }
......@@ -139,6 +149,7 @@ class Definition
void makePartOfGroup(GroupDef *gd);
GroupList *partOfGroups() const { return m_partOfGroups; }
QCString convertNameToFile(const char *name,bool allowDots=FALSE) const;
void addReachableDef(Definition *d,int distance);
protected:
int m_startBodyLine; // line number of the start of the definition
......@@ -158,6 +169,9 @@ class Definition
/*! List of groups this definition is part of */
GroupList *m_partOfGroups;
// reachability of other definitions from this one
QDict<ReachableDefinition> m_reachableDefs;
bool m_reachabilityComputed;
private:
int getXRefListId(const char *listName) const;
......@@ -181,6 +195,9 @@ class Definition
QList<ListItemInfo> *m_xrefListItems;
QCString m_symbolName;
bool m_isSymbol;
QCString m_qualifiedName;
};
class DefinitionList : public QList<Definition>
......
......@@ -3154,13 +3154,13 @@ endparamlist:
//--------------------------------------------------------------------------
int DocParamSect::parse(const QString &cmdName)
int DocParamSect::parse(const QString &cmdName,Direction d)
{
int retval=RetVal_OK;
DBG(("DocParamSect::parse() start\n"));
g_nodeStack.push(this);
DocParamList *pl = new DocParamList(this,m_type);
DocParamList *pl = new DocParamList(this,m_type,d);
if (m_children.isEmpty())
{
pl->markFirst();
......@@ -3204,7 +3204,9 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t)
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;
if (!m_children.isEmpty() && // previous element
......@@ -3219,7 +3221,7 @@ int DocPara::handleParamSection(const QString &cmdName,DocParamSect::Type t)
ps=new DocParamSect(this,t);
m_children.append(ps);
}
int rv=ps->parse(cmdName);
int rv=ps->parse(cmdName,(DocParamSect::Direction)direction);
return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
}
......@@ -3738,7 +3740,7 @@ int DocPara::handleCommand(const QString &cmdName)
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break;
case CMD_PARAM:
retval = handleParamSection(cmdName,DocParamSect::Param);
retval = handleParamSection(cmdName,DocParamSect::Param,g_token->paramDir);
break;
case CMD_RETVAL:
retval = handleParamSection(cmdName,DocParamSect::RetVal);
......
......@@ -909,8 +909,13 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode
{
Unknown, Param, RetVal, Exception
};
DocParamSect(DocNode *parent,Type t) : m_parent(parent), m_type(t) {}
int parse(const QString &cmdName);
enum Direction
{
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; }
Type type() const { return m_type; }
DocNode *parent() const { return m_parent; }
......@@ -919,6 +924,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode
private:
DocNode * m_parent;
Type m_type;
Direction m_dir;
};
/*! Node representing a paragraph in the documentation tree */
......@@ -943,7 +949,8 @@ class DocPara : public CompAccept<DocPara>, public DocNode
int handleHtmlEndTag(const QString &tagName);
int handleSimpleSection(DocSimpleSect::Type t);
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 handleImage(const QString &cmdName);
void handleDotFile(const QString &cmdName);
......@@ -965,14 +972,15 @@ class DocPara : public CompAccept<DocPara>, public DocNode
class DocParamList : public DocNode
{
public:
DocParamList(DocNode *parent,DocParamSect::Type t)
: m_parent(parent) , m_type(t), m_isFirst(TRUE), m_isLast(TRUE)
DocParamList(DocNode *parent,DocParamSect::Type t,DocParamSect::Direction d)
: m_parent(parent) , m_type(t), m_dir(d), m_isFirst(TRUE), m_isLast(TRUE)
{ m_paragraph=new DocPara(this); }
virtual ~DocParamList() { delete m_paragraph; }
Kind kind() const { return Kind_ParamList; }
DocNode *parent() const { return m_parent; }
const QStrList &parameters() { return m_params; }
DocParamSect::Type type() const { return m_type; }
DocParamSect::Direction direction() const { return m_dir; }
void markFirst(bool b=TRUE) { m_isFirst=b; }
void markLast(bool b=TRUE) { m_isLast=b; }
bool isFirst() const { return m_isFirst; }
......@@ -986,12 +994,13 @@ class DocParamList : public DocNode
int parse(const QString &cmdName);
private:
DocNode * m_parent;
DocPara * m_paragraph;
QStrList m_params;
DocParamSect::Type m_type;
bool m_isFirst;
bool m_isLast;
DocNode * m_parent;
DocPara * m_paragraph;
QStrList m_params;
DocParamSect::Type m_type;
DocParamSect::Direction m_dir;
bool m_isFirst;
bool m_isLast;
};
/*! @brief Node representing an item of a auto list */
......
......@@ -98,6 +98,10 @@ struct TokenInfo
// url
bool isEMailAddr;
// param attributes
enum ParamDir { In=1, Out=2, InOut=3, Unspecified=0 };
ParamDir paramDir;
};
// globals
......
......@@ -288,6 +288,8 @@ LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))?
SPCMD1 {CMD}[a-z_A-Z0-9]+
SPCMD2 {CMD}[\\@<>&$#%~]
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\*\&]
FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&]
SCOPESEP "::"|"#"|"."
......@@ -391,8 +393,35 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_Para>{SPCMD1} |
<St_Para>{SPCMD2} { /* special command */
g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
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
g_token->name=yytext;
g_token->isEMailAddr=FALSE;
......@@ -567,6 +596,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_TitleN>{SPCMD1} |
<St_TitleN>{SPCMD2} { /* special command */
g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
return TK_COMMAND;
}
<St_TitleN>{WORD1} |
......@@ -592,6 +622,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_TitleQ>{SPCMD1} |
<St_TitleQ>{SPCMD2} { /* special command */
g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
return TK_COMMAND;
}
<St_TitleQ>{WORD1NQ} |
......@@ -663,6 +694,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
<St_Ref2>{SPCMD1} |
<St_Ref2>{SPCMD2} { /* special command */
g_token->name = yytext+1;
g_token->paramDir=TokenInfo::Unspecified;
return TK_COMMAND;
}
<St_Ref2>{WORD1NQ} |
......
......@@ -1217,24 +1217,9 @@ static void findUsingDeclarations(Entry *root)
// 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.
// file scope).
// int scopeOffset = scName.length();
// do
// {
// 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);
MemberDef *mtd=0;
usingCd = getResolvedClass(nd,fd,root->name,&mtd);
//printf("%s -> %p\n",root->name.data(),usingCd);
if (usingCd==0) // definition not in the input => add an artificial class
......@@ -1248,8 +1233,20 @@ static void findUsingDeclarations(Entry *root)
usingCd->setClassIsArtificial();
}
// add the namespace the correct scope
if (usingCd)
if (mtd) // add the typedef to the correct scope
{
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)
{
......@@ -1623,20 +1620,23 @@ static MemberDef *addVariableToFile(
return md;
}
if (nd==0 && md->isExplicit()!=root->explicitExternal)
{
// 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());
addMemberToGroups(root,md);
}
else if (md->getGroupDef()!=0 && root->groups->count()==0)
{
root->groups->append(new Grouping(md->getGroupDef()->name(), md->getGroupPri()));
}
}
// TODO: rethink why we would need this!
//if (nd==0 && md->isExplicit()!=root->explicitExternal)
//{
// // 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());
// addMemberToGroups(root,md);
// }
// else if (md->getGroupDef()!=0 && root->groups->count()==0)
// {
// // 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
......@@ -1668,10 +1668,6 @@ static MemberDef *addVariableToFile(
md->enableCallGraph(root->callGraph);
md->setExplicitExternal(root->explicitExternal);
addMemberToGroups(root,md);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
md->setRefItems(root->sli);
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
......@@ -2286,8 +2282,8 @@ static void buildFunctionList(Entry *root)
QCString nsName,rnsName;
if (nd) nsName = nd->name().copy();
if (rnd) rnsName = rnd->name().copy();
NamespaceSDict *unl = fd ? fd->getUsedNamespaces() : 0;
ClassSDict *ucl = fd ? fd->getUsedClasses() : 0;
NamespaceSDict *unl = fd ? fd->getUsedNamespaces() : 0;
SDict<Definition> *ucl = fd ? fd->getUsedClasses() : 0;
//printf("matching arguments for %s%s %s%s\n",
// md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
if (
......@@ -2968,32 +2964,34 @@ static ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name)
if (result && result!=cd) return result;
}
}
ClassSDict *cl = nd->getUsedClasses();
SDict<Definition> *cl = nd->getUsedClasses();
if (cl)
{
ClassSDict::Iterator cli(*cl);
ClassDef *ucd;
SDict<Definition>::Iterator cli(*cl);
Definition *ucd;
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!
if (fd) // and in the global namespace
{
ClassSDict *cl = fd->getUsedClasses();
SDict<Definition> *cl = fd->getUsedClasses();
if (cl)
{
ClassSDict::Iterator cli(*cl);
ClassDef *ucd;
SDict<Definition>::Iterator cli(*cl);
Definition *ucd;
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)
}
}
}
ClassSDict *cl = fd->getUsedClasses();
SDict<Definition> *cl = fd->getUsedClasses();
if (cl)
{
ClassSDict::Iterator cli(*cl);
ClassDef *ucd;
SDict<Definition>::Iterator cli(*cl);
Definition *ucd;
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,
// namespaceName.data(),nd ? nd->name().data() : "<none>");
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
//printf("File %s\n",fd ? fd->name().data() : "<none>");
NamespaceSDict *nl = fd ? fd->getUsedNamespaces() : 0;
ClassSDict *cl = fd ? fd->getUsedClasses() : 0;
NamespaceSDict *nl = fd ? fd->getUsedNamespaces() : 0;
SDict<Definition> *cl = fd ? fd->getUsedClasses() : 0;
//printf("NamespaceList %p\n",nl);
// search in the list of namespaces that are imported via a
......@@ -4676,14 +4675,14 @@ static void findMember(Entry *root,
}
}
ClassSDict *cl = new ClassSDict(17);
SDict<Definition> *cl = new SDict<Definition>(17);
if (nd)
{
ClassSDict *ncl = nd->getUsedClasses();
SDict<Definition> *ncl = nd->getUsedClasses();
if (ncl)
{
ClassSDict::Iterator csdi(*ncl);
ClassDef *ncd;
SDict<Definition>::Iterator csdi(*ncl);
Definition *ncd;
for (csdi.toFirst();(ncd=csdi.current());++csdi)
{
cl->append(ncd->qualifiedName(),ncd);
......@@ -4692,11 +4691,11 @@ static void findMember(Entry *root,
}
if (fd)
{
ClassSDict *fcl = fd->getUsedClasses();
SDict<Definition> *fcl = fd->getUsedClasses();
if (fcl)
{
ClassSDict::Iterator csdi(*fcl);
ClassDef *fcd;
SDict<Definition>::Iterator csdi(*fcl);
Definition *fcd;
for (csdi.toFirst();(fcd=csdi.current());++csdi)
{
cl->append(fcd->qualifiedName(),fcd);
......
......@@ -681,15 +681,15 @@ void FileDef::addUsingDirective(NamespaceDef *nd)
}
}
void FileDef::addUsingDeclaration(ClassDef *cd)
void FileDef::addUsingDeclaration(Definition *d)
{
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()
// add used classes of namespace nd to this namespace
if (nd->getUsedClasses())
{
ClassSDict::Iterator cli(*nd->getUsedClasses());
ClassDef *ucd;
SDict<Definition>::Iterator cli(*nd->getUsedClasses());
Definition *ucd;
for (cli.toFirst();(ucd=cli.current());++cli)
{
//printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data());
......
......@@ -134,8 +134,8 @@ class FileDef : public Definition
void addUsingDirective(NamespaceDef *nd);
NamespaceSDict *getUsedNamespaces() const { return usingDirList; }
void addUsingDeclaration(ClassDef *cd);
ClassSDict *getUsedClasses() const { return usingDeclList; }
void addUsingDeclaration(Definition *def);
SDict<Definition> *getUsedClasses() const { return usingDeclList; }
void combineUsingRelations();
bool generateSourceFile() const;
......@@ -188,7 +188,7 @@ class FileDef : public Definition
QDict<IncludeInfo> *includedByDict;
QList<IncludeInfo> *includedByList;
NamespaceSDict *usingDirList;
ClassSDict *usingDeclList;
SDict<Definition> *usingDeclList;
//DefineList *defineList;
QCString path;
QCString filepath;
......
......@@ -189,12 +189,12 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
switch(s->type())
{
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());
m_t << "</div></pre>";
break;
case DocVerbatim::Verbatim:
m_t << "<pre class=\"fragment\"><div>";
m_t << "<pre><div class=\"fragment\">";
filter(s->text());
m_t << "</div></pre>";
break;
......@@ -246,16 +246,16 @@ void HtmlDocVisitor::visit(DocInclude *inc)
switch(inc->type())
{
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());
m_t << "</div></pre>";
case DocInclude::IncWithLines:
{
m_t << "<div class=\"fragment\"><pre>";
m_t << "<pre><div class=\"fragment\">";
QFileInfo cfi( inc->file() );
FileDef fd( cfi.dirPath(), cfi.fileName() );
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile(), &fd);
m_t << "</pre></div>";
m_t << "</div></pre>";
}
break;
break;
......@@ -265,7 +265,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
m_t << inc->text();
break;
case DocInclude::VerbInclude:
m_t << "<pre class=\"fragment\"><div>";
m_t << "<pre><div class=\"fragment\">";
filter(inc->text());
m_t << "</div></pre>";
break;
......@@ -278,7 +278,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
if (!m_hide) m_t << "<pre class=\"fragment\"><div>";
if (!m_hide) m_t << "<pre><div class=\"fragment\">";
pushEnabled();
m_hide=TRUE;
}
......@@ -868,7 +868,25 @@ void HtmlDocVisitor::visitPost(DocParamSect *)
void HtmlDocVisitor::visitPre(DocParamList *pl)
{
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());
const char *s;
bool first=TRUE;
......
......@@ -888,7 +888,25 @@ void LatexDocVisitor::visitPost(DocParamSect *)
void LatexDocVisitor::visitPre(DocParamList *pl)
{
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());
const char *s;
bool first=TRUE;
......
......@@ -2226,7 +2226,7 @@ bool MemberDef::isObjCMethod() const
return FALSE;
}
QCString MemberDef::qualifiedName() const
QCString MemberDef::qualifiedName()
{
if (isObjCMethod())
{
......
......@@ -99,7 +99,7 @@ class MemberDef : public Definition
const char *getGroupFileName() const { return groupFileName; }
int getGroupStartLine() const { return groupStartLine; }
bool getGroupHasDocs() const { return groupHasDocs; }
QCString qualifiedName() const;
QCString qualifiedName();
// direct kind info
Protection protection() const { return prot; }
......
......@@ -36,7 +36,7 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
fileName+=name;
classSDict = new ClassSDict(17);
namespaceSDict = new NamespaceSDict(17);
m_innerCompounds = new SDict<Definition>(17);
m_innerCompounds = new SDict<Definition>(257);
usingDirList = 0;
usingDeclList = 0;
setReference(lref);
......@@ -399,15 +399,15 @@ void NamespaceDef::addUsingDirective(NamespaceDef *nd)
}
}
void NamespaceDef::addUsingDeclaration(ClassDef *cd)
void NamespaceDef::addUsingDeclaration(Definition *d)
{
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()
// add used classes of namespace nd to this namespace
if (nd->getUsedClasses())
{
ClassSDict::Iterator cli(*nd->getUsedClasses());
ClassDef *ucd;
SDict<Definition>::Iterator cli(*nd->getUsedClasses());
Definition *ucd;
for (cli.toFirst();(ucd=cli.current());++cli)
{
//printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data());
......
......@@ -55,8 +55,8 @@ class NamespaceDef : public Definition
int countMembers();
void addUsingDirective(NamespaceDef *nd);
NamespaceSDict *getUsedNamespaces() const { return usingDirList; }
void addUsingDeclaration(ClassDef *cd);
ClassSDict *getUsedClasses() const { return usingDeclList; }
void addUsingDeclaration(Definition *def);
SDict<Definition> *getUsedClasses() const { return usingDeclList; }
void combineUsingRelations();
QCString displayName() const;
......@@ -118,7 +118,7 @@ class NamespaceDef : public Definition
NamespaceSDict *usingDirList;
ClassSDict *usingDeclList;
SDict<Definition> *usingDeclList;
SDict<Definition> *m_innerCompounds;
MemberList allMemberList;
......
......@@ -232,7 +232,7 @@ void PerlModOutput::iaddQuoted(const char *s)
}
}
inline void PerlModOutput::iaddField(const char *s)
void PerlModOutput::iaddField(const char *s)
{
continueBlock();
m_stream->add(s);
......
......@@ -491,7 +491,7 @@ static void prependScope()
/*! Returns TRUE iff the current entry could be a K&R style C function */
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;
ArgumentListIterator ali(*current->argList);
Argument *a;
......@@ -3575,12 +3575,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
<ClassVar>"<" { current->name += *yytext;
sharpCount=1;
roundCount=0;
lastSkipSharpContext = YY_START;
specName = &current->name;
BEGIN ( Specialization );
}
<Bases>"<" {
sharpCount=1;
roundCount=0;
lastSkipSharpContext = YY_START;
if (insideObjC) // start of protocol list
{
......@@ -3594,17 +3596,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
}
<Specialization>"<" { *specName += *yytext;
sharpCount++;
if (roundCount==0) sharpCount++;
}
<Specialization>">" {
*specName += *yytext;
if (--sharpCount<=0)
if (roundCount==0 && --sharpCount<=0)
BEGIN(lastSkipSharpContext);
}
<Specialization>{BN}+ { lineCount(); *specName +=' '; }
<Specialization>"<<" { *specName += yytext; }
<Specialization>">>" { *specName += yytext; }
<Specialization>"typename"{BN}+ { lineCount(); }
<Specialization>"(" { *specName += *yytext; roundCount++; }
<Specialization>")" { *specName += *yytext; roundCount--; }
<Specialization>. {
*specName += *yytext;
}
......
This diff is collapsed.
......@@ -26,6 +26,7 @@
#include <qlist.h>
#include <qtextstream.h>
#include <ctype.h>
#include "sortdict.h"
class ClassDef;
class FileDef;
......@@ -43,13 +44,13 @@ class GroupDef;
class NamespaceSDict;
class ClassList;
class MemberGroupSDict;
class Definition;
struct TagInfo;
class MemberNameInfoSDict;
struct ListItemInfo;
class PageDef;
struct SectionInfo;
class QDir;
class Definition;
//--------------------------------------------------------------------
......@@ -129,7 +130,7 @@ void writePageRef(OutputDocInterface &od,const char *cn,const char *mn);
bool matchArguments(ArgumentList *,ArgumentList *,
const char *cl=0,const char *ns=0,bool checkCV=TRUE,
NamespaceSDict *usingNamespaces=0,
ClassSDict *usingClasses=0);
SDict<Definition> *usingClasses=0);
void mergeArguments(ArgumentList *,ArgumentList *,bool forceNameOverwrite=FALSE);
QCString substituteClassNames(const QCString &s);
QCString substitute(const char *s,const char *src,const char *dst);
......@@ -212,7 +213,7 @@ QCString linkToText(const char *link,bool isFileName);
QCString stripExtension(const char *fName);
void replaceNamespaceAliases(QCString &scope,int i);
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);
int computeQualifiedIndex(const QString &name);
void addDirPrefix(QCString &fileName);
......
......@@ -752,7 +752,25 @@ void XmlDocVisitor::visitPre(DocParamList *pl)
const char *s;
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);
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