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

Release-1.4.5-20051227

parent ed2cf9f7
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
PROJECT_NAME = Doxygen PROJECT_NAME = Doxygen
PROJECT_NUMBER = PROJECT_NUMBER =
OUTPUT_DIRECTORY = doxygen_docs OUTPUT_DIRECTORY = doxygen_docs
CREATE_SUBDIRS = YES CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES BRIEF_MEMBER_DESC = YES
...@@ -76,7 +76,6 @@ FILE_PATTERNS = *.h \ ...@@ -76,7 +76,6 @@ FILE_PATTERNS = *.h \
*.cpp *.cpp
RECURSIVE = NO RECURSIVE = NO
EXCLUDE = src/code.cpp \ EXCLUDE = src/code.cpp \
src/config.cpp \
src/ce_lex.cpp \ src/ce_lex.cpp \
src/ce_parse.cpp \ src/ce_parse.cpp \
src/declinfo.cpp \ src/declinfo.cpp \
...@@ -94,7 +93,9 @@ EXCLUDE = src/code.cpp \ ...@@ -94,7 +93,9 @@ EXCLUDE = src/code.cpp \
src/commentcnv.cpp \ src/commentcnv.cpp \
src/commentscan.cpp \ src/commentscan.cpp \
src/pycode.cpp \ src/pycode.cpp \
src/pyscanner.cpp src/config.cpp \
src/pyscanner.cpp \
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS =
EXAMPLE_PATH = EXAMPLE_PATH =
......
DOXYGEN Version 1.4.5-20051127 DOXYGEN Version 1.4.5-20051227
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 (27 November 2005) Dimitri van Heesch (27 December 2005)
...@@ -12,6 +12,7 @@ irix-dcc ...@@ -12,6 +12,7 @@ irix-dcc
irix-g++ irix-g++
irix-n32 irix-n32
linux-g++ linux-g++
linux-64
macosx-c++ macosx-c++
m68k-atari-mint-g++ m68k-atari-mint-g++
netbsd-g++ netbsd-g++
......
DOXYGEN Version 1.4.5_20051127 DOXYGEN Version 1.4.5_20051227
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) (27 November 2005) Dimitri van Heesch (dimitri@stack.nl) (27 December 2005)
...@@ -20,7 +20,7 @@ doxygen_version_minor=4 ...@@ -20,7 +20,7 @@ doxygen_version_minor=4
doxygen_version_revision=5 doxygen_version_revision=5
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20051127 doxygen_version_mmn=20051227
bin_dirs=`echo $PATH | sed -e "s/:/ /g"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
...@@ -243,6 +243,7 @@ fi ...@@ -243,6 +243,7 @@ fi
#- check for qt -------------------------------------------------------------- #- check for qt --------------------------------------------------------------
LIBDIR=lib
if test "$f_wizard" = YES; then if test "$f_wizard" = YES; then
if test -z "$QTDIR"; then if test -z "$QTDIR"; then
echo " QTDIR environment variable not set!" echo " QTDIR environment variable not set!"
...@@ -264,9 +265,12 @@ if test "$f_wizard" = YES; then ...@@ -264,9 +265,12 @@ if test "$f_wizard" = YES; then
exit 2 exit 2
else else
if test ! -d "$QTDIR/lib"; then if test ! -d "$QTDIR/lib"; then
if test ! -d "$QTDIR/lib64"; then
echo "QTDIR is set to $QTDIR, but library directory $QTDIR/lib does not exist!" echo "QTDIR is set to $QTDIR, but library directory $QTDIR/lib does not exist!"
exit 2 exit 2
fi fi
LIBDIR=lib64
fi
if test ! -d "$QTDIR/include"; then if test ! -d "$QTDIR/include"; then
echo "QTDIR is set to $QTDIR, but include directory $QTDIR/include does not exist!" echo "QTDIR is set to $QTDIR, but include directory $QTDIR/include does not exist!"
exit 2 exit 2
...@@ -276,8 +280,8 @@ if test "$f_wizard" = YES; then ...@@ -276,8 +280,8 @@ if test "$f_wizard" = YES; then
exit 2 exit 2
fi fi
echo " headers $QTDIR/include," echo " headers $QTDIR/include,"
echo " libraries $QTDIR/lib" echo " libraries $QTDIR/$LIBDIR"
if test -n "`ls $QTDIR/lib/* | grep qt-mt`"; then if test -n "`ls $QTDIR/$LIBDIR/* | grep qt-mt`"; then
f_thread=YES f_thread=YES
fi fi
fi fi
...@@ -571,7 +575,7 @@ done ...@@ -571,7 +575,7 @@ done
# - generating src/lang_cfg.h # - generating src/lang_cfg.h
if test -e "src/lang_cfg.h"; then if test -f "src/lang_cfg.h"; then
chmod u+w src/lang_cfg.h # make sure file can be overwritten chmod u+w src/lang_cfg.h # make sure file can be overwritten
fi fi
echo -n " Generating src/lang_cfg.h..." echo -n " Generating src/lang_cfg.h..."
......
...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other ...@@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other
than English (the default). The output language is chosen through the than English (the default). The output language is chosen through the
configuration file (with default name and known as Doxyfile). configuration file (with default name and known as Doxyfile).
Currently (version 1.4.5), 31 languages Currently (version 1.4.5-20051109), 31 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese Afrikaans, Brazilian Portuguese, Catalan, Chinese, Chinese
Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French,
......
...@@ -61,7 +61,7 @@ doxygen will try to read the configuration file from standard ...@@ -61,7 +61,7 @@ doxygen will try to read the configuration file from standard
input (<code>stdin</code>), which can be useful for scripting. input (<code>stdin</code>), which can be useful for scripting.
The configuration file has a format that is similar to that of a (simple) The configuration file has a format that is similar to that of a (simple)
Makefile. It contains of a number of assignments (tags) of the form: Makefile. It consists of a number of assignments (tags) of the form:
<tt>TAGNAME = VALUE</tt> or <br> <tt>TAGNAME = VALUE</tt> or <br>
<tt>TAGNAME = VALUE1 VALUE2 ... </tt><br> <tt>TAGNAME = VALUE1 VALUE2 ... </tt><br>
...@@ -95,7 +95,7 @@ To omit all \c test directories from a source tree for instance, one could use: ...@@ -95,7 +95,7 @@ To omit all \c test directories from a source tree for instance, one could use:
\verbatim EXCLUDE_PATTERNS = */test/* \verbatim EXCLUDE_PATTERNS = */test/*
\endverbatim \endverbatim
Doxygen looking at the file's extension to determine how to parse a file. Doxygen looks at the file's extension to determine how to parse a file.
If a file has an <code>.idl</code> or <code>.odl</code> extension it is If a file has an <code>.idl</code> or <code>.odl</code> extension it is
treated as an IDL file. If it has a <code>.java</code> extension it is treated as an IDL file. If it has a <code>.java</code> extension it is
treated as a file written in Java. Files ending with <code>.cs</code> are treated as a file written in Java. Files ending with <code>.cs</code> are
...@@ -162,7 +162,7 @@ supports DHTML and Javascript. ...@@ -162,7 +162,7 @@ supports DHTML and Javascript.
If you plan to use the search engine (see If you plan to use the search engine (see
\ref cfg_searchengine "SEARCHENGINE"), you should view the HTML output \ref cfg_searchengine "SEARCHENGINE"), you should view the HTML output
via a PHP enable web server (e.g. apache with the PHP module installed). via a PHP-enabled web server (e.g. apache with the PHP module installed).
\subsection latex_out LaTeX output \subsection latex_out LaTeX output
\addindex LaTeX \addindex LaTeX
...@@ -229,7 +229,7 @@ capabilities of the man page format, so some information ...@@ -229,7 +229,7 @@ capabilities of the man page format, so some information
\section step3 Step 3: Documenting the sources \section step3 Step 3: Documenting the sources
Although documenting the source is presented as step 3, in a new project Although documenting the sources is presented as step 3, in a new project
this should of course be step 1. Here I assume this should of course be step 1. Here I assume
you already have some code and you want doxygen to generate a nice document you already have some code and you want doxygen to generate a nice document
describing the API and maybe the internals as well. describing the API and maybe the internals as well.
......
...@@ -585,6 +585,8 @@ class Transl: ...@@ -585,6 +585,8 @@ class Transl:
prototype += ' ' + tokenStr prototype += ' ' + tokenStr
uniPrototype = tokenStr # start collecting the unified prototype uniPrototype = tokenStr # start collecting the unified prototype
status = 4 status = 4
elif tokenId == 'tilde':
status = 4
else: else:
self.__unexpectedToken(status, tokenId, tokenLineNo) self.__unexpectedToken(status, tokenId, tokenLineNo)
......
(1.4.5) (1.4.5-20051109)
Doxygen supports the following 31 languages (sorted alphabetically): Doxygen supports the following 31 languages (sorted alphabetically):
...@@ -30,7 +30,7 @@ still may be some details listed even for them: ...@@ -30,7 +30,7 @@ still may be some details listed even for them:
TranslatorHungarian TranslatorHungarian
TranslatorIndonesian -- Remove the obsolete methods (never used). TranslatorIndonesian -- Remove the obsolete methods (never used).
TranslatorItalian TranslatorItalian
TranslatorJapanese -- Change the base class to Translator. TranslatorJapanese -- Remove the obsolete methods (never used).
TranslatorKorean TranslatorKorean
TranslatorLithuanian TranslatorLithuanian
TranslatorPolish -- Remove the obsolete methods (never used). TranslatorPolish -- Remove the obsolete methods (never used).
...@@ -387,7 +387,7 @@ TranslatorIndonesian (Translator) ...@@ -387,7 +387,7 @@ TranslatorIndonesian (Translator)
virtual QCString trNoDescriptionAvailable() virtual QCString trNoDescriptionAvailable()
TranslatorJapanese (TranslatorAdapter_1_3_9) TranslatorJapanese (Translator)
------------------ ------------------
Implements 192 of the required methods. Implements 192 of the required methods.
......
...@@ -14,6 +14,7 @@ SET MODE=release ...@@ -14,6 +14,7 @@ SET MODE=release
if "%2"=="debug" SET MODE=debug if "%2"=="debug" SET MODE=debug
REM use perl to create the config file REM use perl to create the config file
perl wintools\version.pl >VERSION
perl wintools\make.pl %CC% perl wintools\make.pl %CC%
type makeconfig > Makefile type makeconfig > Makefile
......
...@@ -213,6 +213,7 @@ private: ...@@ -213,6 +213,7 @@ private:
class QM_EXPORT QXmlReader class QM_EXPORT QXmlReader
{ {
public: public:
virtual ~QXmlReader() {}
virtual bool feature( const QString& name, bool *ok = 0 ) const = 0; virtual bool feature( const QString& name, bool *ok = 0 ) const = 0;
virtual void setFeature( const QString& name, bool value ) = 0; virtual void setFeature( const QString& name, bool value ) = 0;
virtual bool hasFeature( const QString& name ) const = 0; virtual bool hasFeature( const QString& name ) const = 0;
...@@ -401,6 +402,7 @@ private: ...@@ -401,6 +402,7 @@ private:
class QM_EXPORT QXmlContentHandler class QM_EXPORT QXmlContentHandler
{ {
public: public:
virtual ~QXmlContentHandler() {}
virtual void setDocumentLocator( QXmlLocator* locator ) = 0; virtual void setDocumentLocator( QXmlLocator* locator ) = 0;
virtual bool startDocument() = 0; virtual bool startDocument() = 0;
virtual bool endDocument() = 0; virtual bool endDocument() = 0;
...@@ -418,6 +420,7 @@ public: ...@@ -418,6 +420,7 @@ public:
class QM_EXPORT QXmlErrorHandler class QM_EXPORT QXmlErrorHandler
{ {
public: public:
virtual ~QXmlErrorHandler() {}
virtual bool warning( const QXmlParseException& exception ) = 0; virtual bool warning( const QXmlParseException& exception ) = 0;
virtual bool error( const QXmlParseException& exception ) = 0; virtual bool error( const QXmlParseException& exception ) = 0;
virtual bool fatalError( const QXmlParseException& exception ) = 0; virtual bool fatalError( const QXmlParseException& exception ) = 0;
...@@ -427,6 +430,7 @@ public: ...@@ -427,6 +430,7 @@ public:
class QM_EXPORT QXmlDTDHandler class QM_EXPORT QXmlDTDHandler
{ {
public: public:
virtual ~QXmlDTDHandler() {}
virtual bool notationDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0; virtual bool notationDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0;
virtual bool unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName ) = 0; virtual bool unparsedEntityDecl( const QString& name, const QString& publicId, const QString& systemId, const QString& notationName ) = 0;
virtual QString errorString() = 0; virtual QString errorString() = 0;
...@@ -435,6 +439,7 @@ public: ...@@ -435,6 +439,7 @@ public:
class QM_EXPORT QXmlEntityResolver class QM_EXPORT QXmlEntityResolver
{ {
public: public:
virtual ~QXmlEntityResolver() {}
virtual bool resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret ) = 0; virtual bool resolveEntity( const QString& publicId, const QString& systemId, QXmlInputSource* ret ) = 0;
virtual QString errorString() = 0; virtual QString errorString() = 0;
}; };
...@@ -442,6 +447,7 @@ public: ...@@ -442,6 +447,7 @@ public:
class QM_EXPORT QXmlLexicalHandler class QM_EXPORT QXmlLexicalHandler
{ {
public: public:
virtual ~QXmlLexicalHandler() {}
virtual bool startDTD( const QString& name, const QString& publicId, const QString& systemId ) = 0; virtual bool startDTD( const QString& name, const QString& publicId, const QString& systemId ) = 0;
virtual bool endDTD() = 0; virtual bool endDTD() = 0;
// virtual bool startEntity( const QString& name ) = 0; // virtual bool startEntity( const QString& name ) = 0;
...@@ -455,6 +461,7 @@ public: ...@@ -455,6 +461,7 @@ public:
class QM_EXPORT QXmlDeclHandler class QM_EXPORT QXmlDeclHandler
{ {
public: public:
virtual ~QXmlDeclHandler() {}
virtual bool attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value ) = 0; virtual bool attributeDecl( const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value ) = 0;
virtual bool internalEntityDecl( const QString& name, const QString& value ) = 0; virtual bool internalEntityDecl( const QString& name, const QString& value ) = 0;
virtual bool externalEntityDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0; virtual bool externalEntityDecl( const QString& name, const QString& publicId, const QString& systemId ) = 0;
......
...@@ -98,6 +98,7 @@ static bool g_inFunctionTryBlock = FALSE; ...@@ -98,6 +98,7 @@ static bool g_inFunctionTryBlock = FALSE;
static int g_lastSpecialCContext; static int g_lastSpecialCContext;
static int g_lastStringContext; static int g_lastStringContext;
static int g_lastSkipCppContext;
static int g_lastVerbStringContext; static int g_lastVerbStringContext;
static int g_memCallContext; static int g_memCallContext;
static int g_lastCContext; static int g_lastCContext;
...@@ -105,6 +106,7 @@ static int g_lastCContext; ...@@ -105,6 +106,7 @@ static int g_lastCContext;
static bool g_insideObjC; static bool g_insideObjC;
static bool g_insideProtocolList; static bool g_insideProtocolList;
// context for an Objective-C method call // context for an Objective-C method call
struct ObjCCallCtx struct ObjCCallCtx
{ {
...@@ -881,19 +883,20 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, ...@@ -881,19 +883,20 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
Definition *d = g_currentDefinition; Definition *d = g_currentDefinition;
//printf("d=%p g_sourceFileDef=%p\n",d,g_currentDefinition); //printf("d=%p g_sourceFileDef=%p\n",d,g_currentDefinition);
cd = getResolvedClass(d,g_sourceFileDef,className,&md); cd = getResolvedClass(d,g_sourceFileDef,className,&md);
//printf("non-local variable name=%s context=%d cd=%s md=%s!\n", //fprintf(stderr,"non-local variable name=%s context=%d cd=%s md=%s!\n",
// className.data(),g_theVarContext.count(),cd?cd->name().data():"<none>", // className.data(),g_theVarContext.count(),cd?cd->name().data():"<none>",
// md?md->name().data():"<none>"); // md?md->name().data():"<none>");
if (cd==0 && md==0 && (i=className.find('<'))!=-1) if (cd==0 && md==0 && (i=className.find('<'))!=-1)
{ {
QCString bareName = stripTemplateSpecifiersFromScope(className); QCString bareName = className.left(i); //stripTemplateSpecifiersFromScope(className);
//fprintf(stderr,"bareName=%s\n",bareName.data());
if (bareName!=className) if (bareName!=className)
{ {
cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version
} }
} }
//printf("md=%s\n",md?md->name().data():"<none>"); //printf("md=%s\n",md?md->name().data():"<none>");
//printf("is found as a type %s\n",cd?cd->name().data():"<null>"); //fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>");
if (cd==0 && md==0) // also see if it is variable or enum or enum value if (cd==0 && md==0) // also see if it is variable or enum or enum value
{ {
if (getLink(g_classScope,clName,ol,clName)) if (getLink(g_classScope,clName,ol,clName))
...@@ -1756,6 +1759,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1756,6 +1759,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
} }
<Body>^[ \t]*"#" { <Body>^[ \t]*"#" {
startFontClass("preprocessor"); startFontClass("preprocessor");
g_lastSkipCppContext = YY_START;
g_code->codify(yytext); g_code->codify(yytext);
BEGIN( SkipCPP ) ; BEGIN( SkipCPP ) ;
} }
...@@ -1768,7 +1772,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1768,7 +1772,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<SkipCPP>\n/.*\n { <SkipCPP>\n/.*\n {
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
BEGIN( Body ) ; BEGIN( g_lastSkipCppContext ) ;
} }
<SkipCPP>"//" { <SkipCPP>"//" {
g_code->codify(yytext); g_code->codify(yytext);
...@@ -2053,13 +2057,13 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2053,13 +2057,13 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
} }
<Body>{KEYWORD}/{B}*"(" { <Body>{KEYWORD}/{BN}*"(" {
startFontClass("keyword"); startFontClass("keyword");
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
g_name.resize(0);g_type.resize(0); g_name.resize(0);g_type.resize(0);
} }
<Body>{FLOWKW}/{B}*"(" { <Body>{FLOWKW}/{BN}*"(" {
startFontClass("keywordflow"); startFontClass("keywordflow");
codifyLines(yytext); codifyLines(yytext);
endFontClass(); endFontClass();
...@@ -2125,7 +2129,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2125,7 +2129,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
generateClassOrGlobalLink(*g_code,yytext); generateClassOrGlobalLink(*g_code,yytext);
g_name+=yytext; g_name+=yytext;
} }
<Body>{SCOPENAME}/{B}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" <Body>{SCOPENAME}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
addType(); addType();
generateClassOrGlobalLink(*g_code,yytext/*,TRUE*/); generateClassOrGlobalLink(*g_code,yytext/*,TRUE*/);
g_name+=yytext; g_name+=yytext;
...@@ -2143,7 +2147,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2143,7 +2147,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
addType(); addType();
g_name=varname; g_name=varname;
} }
<Body>{SCOPETNAME}/{B}*"(" { // a() or c::a() or t<A,B>::a() <Body>{SCOPETNAME}/{BN}*"(" { // a() or c::a() or t<A,B>::a()
addType(); addType();
generateFunctionLink(*g_code,yytext); generateFunctionLink(*g_code,yytext);
//g_theVarContext.addVariable(g_type,yytext); //g_theVarContext.addVariable(g_type,yytext);
...@@ -2221,7 +2225,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2221,7 +2225,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_memCallContext = YY_START; g_memCallContext = YY_START;
BEGIN( MemberCall ); BEGIN( MemberCall );
} }
<MemberCall>{SCOPETNAME}/{B}*"(" { <MemberCall>{SCOPETNAME}/{BN}*"(" {
if (g_theCallContext.getClass()) if (g_theCallContext.getClass())
{ {
if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext)) if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext))
...@@ -2463,11 +2467,15 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2463,11 +2467,15 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_code->codify(yytext); g_code->codify(yytext);
endFontClass(); endFontClass();
} }
<MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]*({B}*"<"[^\n\[\](){}<>]*">")? { <MemberCall2,FuncCall>{ID}(({B}*"<"[^\n\[\](){}<>]*">")?({B}*"::"{B}*{ID})?)* {
addParmType(); addParmType();
g_parmName=yytext; g_parmName=yytext;
generateClassOrGlobalLink(*g_code,yytext,!g_insideBody); generateClassOrGlobalLink(*g_code,yytext,!g_insideBody);
} }
<FuncCall>";" { // probably a cast, not a function call
g_code->codify(yytext);
BEGIN( Body );
}
<MemberCall2,FuncCall>, { <MemberCall2,FuncCall>, {
g_code->codify(yytext); g_code->codify(yytext);
g_theVarContext.addVariable(g_parmType,g_parmName); g_theVarContext.addVariable(g_parmType,g_parmName);
...@@ -2619,6 +2627,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2619,6 +2627,12 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
if (*yytext==';') g_parmType.resize(0); if (*yytext==';') g_parmType.resize(0);
g_parmName.resize(0); g_parmName.resize(0);
} }
<CallEnd,OldStyleArgs>"#" {
startFontClass("preprocessor");
g_lastSkipCppContext = Body;
g_code->codify(yytext);
BEGIN( SkipCPP );
}
<CallEnd>. { <CallEnd>. {
unput(*yytext); unput(*yytext);
if (!g_insideBody) if (!g_insideBody)
......
...@@ -320,7 +320,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) ...@@ -320,7 +320,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
BEGIN(CComment); BEGIN(CComment);
} }
<CComment,ReadLine>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f$"|"f["|"f{")/[^a-z_A-Z0-9] { /* start of a verbatim block */ <CComment,ReadLine>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f$"|"f["|"f{"[a-z]*)/[^a-z_A-Z0-9] { /* start of a verbatim block */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
if (yytext[2]=='[') if (yytext[2]=='[')
{ {
......
...@@ -698,8 +698,8 @@ static int yyread(char *buf,int max_size) ...@@ -698,8 +698,8 @@ static int yyread(char *buf,int max_size)
/* start command character */ /* start command character */
CMD ("\\"|"@") CMD ("\\"|"@")
DCMD1 ("arg"|"attention"|"author"|"bug"|"code") DCMD1 ("arg"|"attention"|"author"|"code")
DCMD2 ("date"|"deprecated"|"dot"|"dotfile"|"example") DCMD2 ("date"|"dot"|"dotfile"|"example")
DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include") DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include")
DCMD4 ("includelineno"|"internal"|"invariant") DCMD4 ("includelineno"|"internal"|"invariant")
DCMD5 ("latexonly"|"li"|"line"|"manonly"|"name") DCMD5 ("latexonly"|"li"|"line"|"manonly"|"name")
...@@ -707,9 +707,10 @@ DCMD6 ("note"|"par"|"paragraph"|"param"|"post") ...@@ -707,9 +707,10 @@ DCMD6 ("note"|"par"|"paragraph"|"param"|"post")
DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?)) DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?))
DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section") DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section")
DCMD9 ("see"|"since"|"subsection"|"subsubsection") DCMD9 ("see"|"since"|"subsection"|"subsubsection")
DCMD10 ("test"|"throw"|"todo"|"until"|"verbatim") DCMD10 ("throw"|"until"|"verbatim")
DCMD11 ("verbinclude"|"version"|"warning"|"xrefitem") DCMD11 ("verbinclude"|"version"|"warning")
DETAILEDCMD {CMD}({DCMD1}|{DCMD2}|{DCMD3}|{DCMD4}|{DCMD5}|{DCMD6}|{DCMD7}|{DCMD8}|{DCMD9}|{DCMD10}|{DCMD11}) DETAILEDCMD {CMD}({DCMD1}|{DCMD2}|{DCMD3}|{DCMD4}|{DCMD5}|{DCMD6}|{DCMD7}|{DCMD8}|{DCMD9}|{DCMD10}|{DCMD11})
XREFCMD {CMD}("bug"|"deprecated"|"test"|"todo"|"xrefitem")
PRE [pP][rR][eE] PRE [pP][rR][eE]
TABLE [tT][aA][bB][lL][eE] TABLE [tT][aA][bB][lL][eE]
P [pP] P [pP]
...@@ -810,7 +811,7 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-] ...@@ -810,7 +811,7 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]
<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!) <Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!)
addOutput(yytext); addOutput(yytext);
} }
<Comment>{DETAILEDCMD}/[^a-z_A-Z]* { // command that can end a brief description <Comment>{XREFCMD}/[^a-z_A-Z]* { // command that can end a brief description
if (inContext!=OutputXRef) if (inContext!=OutputXRef)
{ {
briefEndsAtDot=FALSE; briefEndsAtDot=FALSE;
...@@ -819,6 +820,12 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-] ...@@ -819,6 +820,12 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]
// continue with the same input // continue with the same input
REJECT; REJECT;
} }
<Comment>{DETAILEDCMD}/[^a-z_A-Z]* { // command that can end a brief description
briefEndsAtDot=FALSE;
setOutput(OutputDoc);
// continue with the same input
REJECT;
}
<Comment>"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description <Comment>"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description
setOutput(OutputDoc); setOutput(OutputDoc);
// continue with the same input // continue with the same input
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
<xsd:element name="name" /> <xsd:element name="name" />
<xsd:element name="read" minOccurs="0" /> <xsd:element name="read" minOccurs="0" />
<xsd:element name="write" minOccurs="0" /> <xsd:element name="write" minOccurs="0" />
<xsd:element name="bitfield" minOccurs="0" />
<xsd:element name="reimplements" type="reimplementType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="reimplements" type="reimplementType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="reimplementedby" type="reimplementType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="reimplementedby" type="reimplementType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="param" type="paramType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="param" type="paramType" minOccurs="0" maxOccurs="unbounded" />
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
" <xsd:element name=\"name\" />\n" " <xsd:element name=\"name\" />\n"
" <xsd:element name=\"read\" minOccurs=\"0\" />\n" " <xsd:element name=\"read\" minOccurs=\"0\" />\n"
" <xsd:element name=\"write\" minOccurs=\"0\" />\n" " <xsd:element name=\"write\" minOccurs=\"0\" />\n"
" <xsd:element name=\"bitfield\" minOccurs=\"0\" />\n"
" <xsd:element name=\"reimplements\" type=\"reimplementType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"reimplements\" type=\"reimplementType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"reimplementedby\" type=\"reimplementType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"reimplementedby\" type=\"reimplementType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
" <xsd:element name=\"param\" type=\"paramType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n" " <xsd:element name=\"param\" type=\"paramType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n"
......
...@@ -868,9 +868,13 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -868,9 +868,13 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
QString name = linkToText(g_token->name,TRUE); QString name = linkToText(g_token->name,TRUE);
int len = g_token->name.length(); int len = g_token->name.length();
ClassDef *cd=0; ClassDef *cd=0;
//printf("handleLinkedWord(%s)\n",name.data()); //printf("handleLinkedWord(%s) g_context=%s\n",name.data(),g_context.data());
if (!g_insideHtmlLink && if (!g_insideHtmlLink &&
resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)) (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)
|| (!g_context.isEmpty() && // also try with global scope
resolveRef("",g_token->name,g_inSeeBlock,&compound,&member))
)
)
{ {
//printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE); //printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE);
if (member && member->isLinkable()) // member link if (member && member->isLinkable()) // member link
...@@ -2144,13 +2148,10 @@ QString DocLink::parse(bool isJavaLink) ...@@ -2144,13 +2148,10 @@ QString DocLink::parse(bool isJavaLink)
} }
endlink: endlink:
if (isJavaLink)
{
if (m_children.isEmpty()) // no link text if (m_children.isEmpty()) // no link text
{ {
m_children.append(new DocWord(this,m_refText)); m_children.append(new DocWord(this,m_refText));
} }
}
handlePendingStyleCommands(this,m_children); handlePendingStyleCommands(this,m_children);
DBG(("DocLink::parse() end\n")); DBG(("DocLink::parse() end\n"));
...@@ -5551,7 +5552,13 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -5551,7 +5552,13 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
} }
else if (ctx && ctx->definitionType()==Definition::TypePage) else if (ctx && ctx->definitionType()==Definition::TypePage)
{ {
g_context = ctx->getOuterScope()->name(); Definition *scope = ((PageDef*)ctx)->getPageScope();
if (scope) g_context = scope->name();
}
else if (ctx && ctx->definitionType()==Definition::TypeGroup)
{
Definition *scope = ((GroupDef*)ctx)->getGroupScope();
if (scope) g_context = scope->name();
} }
else else
{ {
......
...@@ -372,6 +372,28 @@ static void addSTLClasses(Entry *root) ...@@ -372,6 +372,28 @@ static void addSTLClasses(Entry *root)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n,
FileDef *fileScope=0);
static void addPageToContext(PageDef *pd,Entry *root)
{
if (root->parent) // add the page to it's scope
{
QCString scope = root->parent->name;
if (root->parent->section==Entry::PACKAGEDOC_SEC)
{
scope=substitute(scope,".","::");
}
scope = stripAnonymousNamespaceScope(scope);
scope+="::"+pd->name();
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,scope);
if (d)
{
pd->setPageScope(d);
}
}
}
static void addRelatedPage(Entry *root) static void addRelatedPage(Entry *root)
{ {
GroupDef *gd=0; GroupDef *gd=0;
...@@ -399,7 +421,7 @@ static void addRelatedPage(Entry *root) ...@@ -399,7 +421,7 @@ static void addRelatedPage(Entry *root)
if (pd) if (pd)
{ {
pd->addSectionsToDefinition(root->anchors); pd->addSectionsToDefinition(root->anchors);
//pi->context = ctx; addPageToContext(pd,root);
} }
} }
...@@ -478,6 +500,36 @@ static void buildGroupList(Entry *root) ...@@ -478,6 +500,36 @@ static void buildGroupList(Entry *root)
buildGroupListFiltered(root,TRUE); buildGroupListFiltered(root,TRUE);
} }
static void findGroupScope(Entry *root)
{
if (root->section==Entry::GROUPDOC_SEC && !root->name.isEmpty() &&
root->parent && !root->parent->name.isEmpty())
{
GroupDef *gd;
if ((gd=Doxygen::groupSDict[root->name]))
{
QCString scope = root->parent->name;
if (root->parent->section==Entry::PACKAGEDOC_SEC)
{
scope=substitute(scope,".","::");
}
scope = stripAnonymousNamespaceScope(scope);
scope+="::"+gd->name();
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,scope);
if (d)
{
gd->setGroupScope(d);
}
}
}
EntryListIterator eli(*root->sublist);
Entry *e;
for (;(e=eli.current());++eli)
{
findGroupScope(e);
}
}
static void organizeSubGroupsFiltered(Entry *root,bool additional) static void organizeSubGroupsFiltered(Entry *root,bool additional)
{ {
if (root->section==Entry::GROUPDOC_SEC && !root->name.isEmpty()) if (root->section==Entry::GROUPDOC_SEC && !root->name.isEmpty())
...@@ -773,7 +825,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name,int level) ...@@ -773,7 +825,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name,int level)
} }
static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n, static Definition *findScopeFromQualifiedName(Definition *startScope,const QCString &n,
FileDef *fileScope=0) FileDef *fileScope)
{ {
//printf("findScopeFromQualifiedName(%s,%s)\n",startScope ? startScope->name().data() : 0, n.data()); //printf("findScopeFromQualifiedName(%s,%s)\n",startScope ? startScope->name().data() : 0, n.data());
Definition *resultScope=startScope; Definition *resultScope=startScope;
...@@ -781,13 +833,18 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr ...@@ -781,13 +833,18 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr
QCString scope=stripTemplateSpecifiersFromScope(n,FALSE); QCString scope=stripTemplateSpecifiersFromScope(n,FALSE);
int l1=0,i1; int l1=0,i1;
i1=getScopeFragment(scope,0,&l1); i1=getScopeFragment(scope,0,&l1);
if (i1==-1) return resultScope; if (i1==-1)
{
//printf("no fragments!\n");
return resultScope;
}
int p=i1+l1,l2=0,i2; int p=i1+l1,l2=0,i2;
while ((i2=getScopeFragment(scope,p,&l2))!=-1) while ((i2=getScopeFragment(scope,p,&l2))!=-1)
{ {
QCString nestedNameSpecifier = scope.mid(i1,l1); QCString nestedNameSpecifier = scope.mid(i1,l1);
Definition *orgScope = resultScope; Definition *orgScope = resultScope;
resultScope = resultScope->findInnerCompound(nestedNameSpecifier); resultScope = resultScope->findInnerCompound(nestedNameSpecifier);
//printf("resultScope=%p\n",resultScope);
if (resultScope==0) if (resultScope==0)
{ {
if (orgScope==Doxygen::globalScope && fileScope) if (orgScope==Doxygen::globalScope && fileScope)
...@@ -839,7 +896,7 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr ...@@ -839,7 +896,7 @@ static Definition *findScopeFromQualifiedName(Definition *startScope,const QCStr
l1=l2; l1=l2;
p=i2+l2; p=i2+l2;
} }
//printf("scope %s\n",resultScope->name().data()); //printf("findScopeFromQualifiedName scope %s\n",resultScope->name().data());
return resultScope; return resultScope;
} }
...@@ -1935,10 +1992,10 @@ static MemberDef *addVariableToFile( ...@@ -1935,10 +1992,10 @@ static MemberDef *addVariableToFile(
*/ */
static int findFunctionPtr(const QCString &type,int *pLength=0) static int findFunctionPtr(const QCString &type,int *pLength=0)
{ {
static const QRegExp re("([^)]*)"); static const QRegExp re("([^)]*\\*[^)]*)");
int i=-1,l; int i=-1,l;
if (!type.isEmpty() && // return type is non-empty if (!type.isEmpty() && // return type is non-empty
(i=re.match(type,0,&l))!=-1 && // contains a (* (i=re.match(type,0,&l))!=-1 && // contains (...*...)
type.find("operator")==-1 && // not an operator type.find("operator")==-1 && // not an operator
type.find(")(")==-1 // not a function pointer return type type.find(")(")==-1 // not a function pointer return type
) )
...@@ -2029,6 +2086,19 @@ static bool isVarWithConstructor(Entry *root) ...@@ -2029,6 +2086,19 @@ static bool isVarWithConstructor(Entry *root)
result=FALSE; // arg type is a known type result=FALSE; // arg type is a known type
goto done; goto done;
} }
if (checkIfTypedef(ctx,fd,a->type))
{
//printf("%s:%d: false (arg is typedef)\n",__FILE__,__LINE__);
result=FALSE; // argument is a typedef
goto done;
}
if (a->type.at(a->type.length()-1)=='*' ||
a->type.at(a->type.length()-1)=='&')
// type ends with * or & => pointer or reference
{
result=FALSE;
goto done;
}
if (a->type.find(initChars)==0) if (a->type.find(initChars)==0)
{ {
result=TRUE; // argument type starts with typical initializer char result=TRUE; // argument type starts with typical initializer char
...@@ -2280,7 +2350,7 @@ nextMember: ...@@ -2280,7 +2350,7 @@ nextMember:
// If found they are stored in their class or in the global list. // If found they are stored in their class or in the global list.
static void addMethodToClass(Entry *root,ClassDef *cd, static void addMethodToClass(Entry *root,ClassDef *cd,
const QCString &rname,/*const QCString &scope,*/bool isFriend) const QCString &rname,bool isFriend)
{ {
int l,i; int l,i;
static QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*"); static QRegExp re("([a-z_A-Z0-9: ]*[ *]*[ ]*");
...@@ -4491,9 +4561,27 @@ static bool findGlobalMember(Entry *root, ...@@ -4491,9 +4561,27 @@ static bool findGlobalMember(Entry *root,
return TRUE; return TRUE;
} }
static bool isSpecialization(
const QList<ArgumentList> &srcTempArgLists,
const QList<ArgumentList> &dstTempArgLists
)
{
QListIterator<ArgumentList> srclali(srcTempArgLists);
QListIterator<ArgumentList> dstlali(dstTempArgLists);
for (;srclali.current();++srclali,++dstlali)
{
ArgumentList *sal = srclali.current();
ArgumentList *dal = dstlali.current();
if (!(sal && dal && sal->count()==dal->count())) return TRUE;
}
return FALSE;
}
static QCString substituteTemplatesInString( static QCString substituteTemplatesInString(
const QList<ArgumentList> &srcTempArgLists, const QList<ArgumentList> &srcTempArgLists,
const QList<ArgumentList> &dstTempArgLists, const QList<ArgumentList> &dstTempArgLists,
ArgumentList *funcTempArgList, // can be used to match template specializations
const QCString &src const QCString &src
) )
{ {
...@@ -4514,17 +4602,32 @@ static QCString substituteTemplatesInString( ...@@ -4514,17 +4602,32 @@ static QCString substituteTemplatesInString(
{ {
ArgumentListIterator tsali(*srclali.current()); ArgumentListIterator tsali(*srclali.current());
ArgumentListIterator tdali(*dstlali.current()); ArgumentListIterator tdali(*dstlali.current());
Argument *tsa =0,*tda=0; Argument *tsa =0,*tda=0, *fa=0;
if (funcTempArgList)
{
fa=funcTempArgList->first();
}
for (tsali.toFirst();(tsa=tsali.current()) && !found;++tsali) for (tsali.toFirst();(tsa=tsali.current()) && !found;++tsali)
{ {
tda = tdali.current(); tda = tdali.current();
if (tda && name==tsa->name) if (name==tsa->name)
{
if (tda)
{ {
name=tda->name; // substitute name=tda->name; // substitute
found=TRUE; found=TRUE;
} }
if (tda) ++tdali; else if (fa)
{
name=fa->type;
found=TRUE;
}
}
if (tda)
++tdali;
else if (fa)
fa=funcTempArgList->next();
} }
} }
dst+=name; dst+=name;
...@@ -4538,7 +4641,9 @@ static void substituteTemplatesInArgList( ...@@ -4538,7 +4641,9 @@ static void substituteTemplatesInArgList(
const QList<ArgumentList> &srcTempArgLists, const QList<ArgumentList> &srcTempArgLists,
const QList<ArgumentList> &dstTempArgLists, const QList<ArgumentList> &dstTempArgLists,
ArgumentList *src, ArgumentList *src,
ArgumentList *dst) ArgumentList *dst,
ArgumentList *funcTempArgs = 0
)
{ {
ArgumentListIterator sali(*src); ArgumentListIterator sali(*src);
Argument *sa=0; Argument *sa=0;
...@@ -4547,9 +4652,11 @@ static void substituteTemplatesInArgList( ...@@ -4547,9 +4652,11 @@ static void substituteTemplatesInArgList(
for (sali.toFirst();(sa=sali.current());++sali) // for each member argument for (sali.toFirst();(sa=sali.current());++sali) // for each member argument
{ {
QCString dstType = substituteTemplatesInString( QCString dstType = substituteTemplatesInString(
srcTempArgLists,dstTempArgLists,sa->type); srcTempArgLists,dstTempArgLists,funcTempArgs,
sa->type);
QCString dstArray = substituteTemplatesInString( QCString dstArray = substituteTemplatesInString(
srcTempArgLists,dstTempArgLists,sa->array); srcTempArgLists,dstTempArgLists,funcTempArgs,
sa->array);
if (da==0) if (da==0)
{ {
da=new Argument(*sa); da=new Argument(*sa);
...@@ -4933,18 +5040,6 @@ static void findMember(Entry *root, ...@@ -4933,18 +5040,6 @@ static void findMember(Entry *root,
{ {
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"4. class definition %s found\n",cd->name().data()); "4. class definition %s found\n",cd->name().data());
//int ci;
//ArgumentList *classTemplArgs = cd->templateArguments();
//ArgumentList *funcTemplArgs = md->memberDefTemplateArguments();
//if ((ci=cd->name().find("::"))!=-1) // nested class
//{
// ClassDef *parentClass = getClass(cd->name().left(ci));
// if (parentClass)
// classTemplArgs = parentClass->templateArguments();
//}
////printf("cd->name=%s classTemplArgs=%s\n",cd->name().data(),
//// argListToString(classTemplArgs).data());
// get the template parameter lists found at the member declaration // get the template parameter lists found at the member declaration
QList<ArgumentList> declTemplArgs; QList<ArgumentList> declTemplArgs;
...@@ -5008,10 +5103,22 @@ static void findMember(Entry *root, ...@@ -5008,10 +5103,22 @@ static void findMember(Entry *root,
if (matching) // replace member's argument list if (matching) // replace member's argument list
{ {
md->setDefinitionTemplateParameterLists(root->tArgLists); md->setDefinitionTemplateParameterLists(root->tArgLists);
md->setArgumentList(argList); md->setArgumentList(argList); // new owner of the list => no delete
} }
else // no match -> delete argument list else // no match
{ {
if (!funcTempList.isEmpty() &&
isSpecialization(declTemplArgs,*defTemplArgs))
{
// check if we are dealing with a partial template
// specialization. In this case we add it to the class
// even though the member arguments do not match.
// TODO: copy other aspects?
root->protection=md->protection(); // copy protection level
addMethodToClass(root,cd,md->name(),isFriend);
return;
}
delete argList; delete argList;
} }
} }
...@@ -5041,11 +5148,8 @@ static void findMember(Entry *root, ...@@ -5041,11 +5148,8 @@ static void findMember(Entry *root,
{ {
if (root->tArgLists && md->templateArguments() && if (root->tArgLists && md->templateArguments() &&
root->tArgLists->getLast()->count()<=md->templateArguments()->count()) root->tArgLists->getLast()->count()<=md->templateArguments()->count())
{ // assume we have found a template specialization {
// for which there is only a definition, no declaration in addMethodToClass(root,cd,md->name(),isFriend);
// the class. TODO: we should actually check whether
// the arguments match!
addMethodToClass(root,cd,md->name(),/*cd->name(),*/isFriend);
return; return;
} }
candidates++; candidates++;
...@@ -6737,12 +6841,24 @@ static void findDefineDocumentation(Entry *root) ...@@ -6737,12 +6841,24 @@ static void findDefineDocumentation(Entry *root)
} }
} }
else if (!root->doc.isEmpty() || !root->brief.isEmpty()) // define not found else if (!root->doc.isEmpty() || !root->brief.isEmpty()) // define not found
{
static bool preEnabled = Config_getBool("ENABLE_PREPROCESSING");
if (preEnabled)
{ {
warn(root->fileName,root->startLine, warn(root->fileName,root->startLine,
"Warning: documentation for unknown define %s found.\n", "Warning: documentation for unknown define %s found.\n",
root->name.data() root->name.data()
); );
} }
else
{
warn(root->fileName,root->startLine,
"Warning: found documented #define but ignoring it because "
"ENABLE_PREPROCESSING is NO.\n",
root->name.data()
);
}
}
} }
EntryListIterator eli(*root->sublist); EntryListIterator eli(*root->sublist);
Entry *e; Entry *e;
...@@ -6851,6 +6967,7 @@ static void findMainPage(Entry *root) ...@@ -6851,6 +6967,7 @@ static void findMainPage(Entry *root)
indexName, root->brief+root->doc,title); indexName, root->brief+root->doc,title);
//setFileNameForSections(root->anchors,"index",Doxygen::mainPage); //setFileNameForSections(root->anchors,"index",Doxygen::mainPage);
Doxygen::mainPage->setFileName(indexName); Doxygen::mainPage->setFileName(indexName);
addPageToContext(Doxygen::mainPage,root);
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( SectionInfo *si=new SectionInfo(
...@@ -8728,6 +8845,9 @@ void parseInput() ...@@ -8728,6 +8845,9 @@ void parseInput()
computePageRelations(root); computePageRelations(root);
checkPageRelations(); checkPageRelations();
msg("Determining the scope of groups...\n");
findGroupScope(root);
msg("Sorting lists...\n"); msg("Sorting lists...\n");
Doxygen::memberNameSDict.sort(); Doxygen::memberNameSDict.sort();
Doxygen::functionNameSDict.sort(); Doxygen::functionNameSDict.sort();
......
...@@ -1243,7 +1243,7 @@ void FileDef::acquireFileVersion() ...@@ -1243,7 +1243,7 @@ void FileDef::acquireFileVersion()
if (!vercmd.isEmpty()) if (!vercmd.isEmpty())
{ {
msg("Version of %s : ",filepath.data()); msg("Version of %s : ",filepath.data());
FILE *f=popen("\""+vercmd+"\" \""+filepath+"\"","r"); FILE *f=popen(vercmd+" \""+filepath+"\"","r");
if (!f) if (!f)
{ {
err("Error: could not execute %s\n",vercmd.data()); err("Error: could not execute %s\n",vercmd.data());
......
...@@ -89,6 +89,9 @@ class GroupDef : public Definition ...@@ -89,6 +89,9 @@ class GroupDef : public Definition
friend void writeGroupTreeNode(OutputList&, GroupDef*, int); friend void writeGroupTreeNode(OutputList&, GroupDef*, int);
// make accessible for writing tree view of group in index.cpp - KPW // make accessible for writing tree view of group in index.cpp - KPW
void setGroupScope(Definition *d) { groupScope = d; }
Definition *getGroupScope() const { return groupScope; }
// members in the declaration part of the documentation // members in the declaration part of the documentation
MemberList decDefineMembers; MemberList decDefineMembers;
MemberList decProtoMembers; MemberList decProtoMembers;
...@@ -135,6 +138,7 @@ class GroupDef : public Definition ...@@ -135,6 +138,7 @@ class GroupDef : public Definition
MemberList *allMemberList; MemberList *allMemberList;
MemberNameInfoSDict *allMemberNameInfoSDict; MemberNameInfoSDict *allMemberNameInfoSDict;
Definition *groupScope;
}; };
......
...@@ -1788,7 +1788,9 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact, ...@@ -1788,7 +1788,9 @@ static void writeDefaultQuickLinks(QTextStream &t,bool compact,
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// write sub indices // write sub indices
if ((hli==HLI_Namespaces || hli==HLI_NamespaceMembers || hli==HLI_NamespaceVisible) && if ((hli==HLI_Namespaces || hli==HLI_NamespaceMembers ||
hli==HLI_NamespaceVisible
) &&
documentedNamespaces>0 && documentedNamespaces>0 &&
documentedNamespaceMembers[NMHL_All]>0) documentedNamespaceMembers[NMHL_All]>0)
{ {
......
...@@ -3277,7 +3277,10 @@ void writeIndex(OutputList &ol) ...@@ -3277,7 +3277,10 @@ void writeIndex(OutputList &ol)
ol.parseDoc(defFileName,defLine,Doxygen::mainPage,0,Config_getString("PROJECT_NUMBER"),TRUE,FALSE); ol.parseDoc(defFileName,defLine,Doxygen::mainPage,0,Config_getString("PROJECT_NUMBER"),TRUE,FALSE);
ol.endProjectNumber(); ol.endProjectNumber();
} }
if (Config_getBool("DISABLE_INDEX") && Doxygen::mainPage==0) ol.writeQuickLinks(FALSE,HLI_Main); if (Config_getBool("DISABLE_INDEX") && Doxygen::mainPage==0)
{
ol.writeQuickLinks(FALSE,HLI_Main);
}
if (Doxygen::mainPage) if (Doxygen::mainPage)
{ {
......
...@@ -525,7 +525,7 @@ Definition *NamespaceDef::findInnerCompound(const char *n) ...@@ -525,7 +525,7 @@ Definition *NamespaceDef::findInnerCompound(const char *n)
} }
if (d==0 && usingDeclList) if (d==0 && usingDeclList)
{ {
d = usingDirList->find(n); d = usingDeclList->find(n);
} }
} }
return d; return d;
......
...@@ -14,6 +14,7 @@ PageDef::PageDef(const char *f,int l,const char *n, ...@@ -14,6 +14,7 @@ PageDef::PageDef(const char *f,int l,const char *n,
{ {
setDocumentation(d,f,l); setDocumentation(d,f,l);
subPageDict = new PageSDict(7); subPageDict = new PageSDict(7);
pageScope = 0;
} }
PageDef::~PageDef() PageDef::~PageDef()
......
...@@ -49,12 +49,15 @@ class PageDef : public Definition ...@@ -49,12 +49,15 @@ class PageDef : public Definition
bool visibleInIndex() const; bool visibleInIndex() const;
bool documentedPage() const; bool documentedPage() const;
bool hasSubPages() const; bool hasSubPages() const;
void setPageScope(Definition *d){ pageScope = d; }
Definition *getPageScope() const { return pageScope; }
private: private:
QCString m_fileName; QCString m_fileName;
QCString m_title; QCString m_title;
GroupDef *m_inGroup; GroupDef *m_inGroup;
PageSDict *subPageDict; // list of pages in the group PageSDict *subPageDict; // list of pages in the group
Definition *pageScope;
}; };
class PageSDict : public SDict<PageDef> class PageSDict : public SDict<PageDef>
......
...@@ -34,6 +34,7 @@ class MemberDef; ...@@ -34,6 +34,7 @@ class MemberDef;
class ParserInterface class ParserInterface
{ {
public: public:
virtual ~ParserInterface() {}
/** Parses a single input file with the goal to build an Entry tree. /** Parses a single input file with the goal to build an Entry tree.
* @param[in] fileName The full name of the file. * @param[in] fileName The full name of the file.
* @param[in] fileBuf The contents of the file (zero terminated). * @param[in] fileBuf The contents of the file (zero terminated).
...@@ -113,7 +114,7 @@ class ParserManager ...@@ -113,7 +114,7 @@ class ParserManager
* a given input file. * a given input file.
*/ */
ParserManager(ParserInterface *defaultParser) ParserManager(ParserInterface *defaultParser)
: m_defaultParser(defaultParser) {} : m_defaultParser(defaultParser) { m_parsers.setAutoDelete(TRUE); }
/** Registers an additional parser. /** Registers an additional parser.
* @param[in] extension The file extension that will trigger * @param[in] extension The file extension that will trigger
......
...@@ -1839,11 +1839,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1839,11 +1839,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar('/');outputChar('*'); outputChar('/');outputChar('*');
//g_commentCount++; //g_commentCount++;
} }
<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"|"f{"|"f$"|"f["){BN}+ { <SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") {
outputArray(yytext,yyleng); outputArray(yytext,yyleng);
} }
<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
outputArray(yytext,yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
}
<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ { <SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
outputArray(yytext,yyleng); outputArray(yytext,yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
if (yytext[1]=='f') if (yytext[1]=='f')
{ {
g_blockName="f"; g_blockName="f";
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
class PythonLanguageScanner : public ParserInterface class PythonLanguageScanner : public ParserInterface
{ {
public: public:
virtual ~PythonLanguageScanner() {}
void parseInput(const char * fileName, void parseInput(const char * fileName,
const char *fileBuf, const char *fileBuf,
Entry *root); Entry *root);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
class CLanguageScanner : public ParserInterface class CLanguageScanner : public ParserInterface
{ {
public: public:
virtual ~CLanguageScanner() {}
void parseInput(const char *fileName, void parseInput(const char *fileName,
const char *fileBuf, const char *fileBuf,
Entry *root); Entry *root);
......
...@@ -374,7 +374,7 @@ static void prependScope() ...@@ -374,7 +374,7 @@ static void prependScope()
static bool checkForKnRstyleC() static bool checkForKnRstyleC()
{ {
if (((QCString)yyFileName).right(2).lower()!=".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; // must have arguments
ArgumentListIterator ali(*current->argList); ArgumentListIterator ali(*current->argList);
Argument *a; Argument *a;
for (ali.toFirst();(a=ali.current());++ali) for (ali.toFirst();(a=ali.current());++ali)
...@@ -2447,15 +2447,14 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -2447,15 +2447,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
lineCount(); lineCount();
int i=0,l=yyleng,j; int i=0,l=yyleng,j;
while (i<l && (!isId(yytext[i]))) i++; while (i<l && (!isId(yytext[i]))) i++;
msName = yytext; msName = QCString(yytext).right(l-i).stripWhiteSpace();
msName = msName.right(msName.length()-i);
j=msName.find("["); j=msName.find("[");
if (j!=-1) if (j!=-1)
{ {
msArgs=msName.right(msName.length()-j); msArgs=msName.right(msName.length()-j);
msName=msName.left(j); msName=msName.left(j);
} }
msType = yytext; msType=msType.left(i); msType=QCString(yytext).left(i);
// handle *pName in: typedef { ... } name, *pName; // handle *pName in: typedef { ... } name, *pName;
if (firstTypedefEntry) if (firstTypedefEntry)
...@@ -2505,7 +2504,8 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -2505,7 +2504,8 @@ IDLATTR ("["[^\]]*"]"){BN}*
p=p->parent; p=p->parent;
} }
} }
if (!msName.isEmpty()) //printf("msName=%s current->name=%s\n",msName.data(),current->name.data());
if (!msName.isEmpty() && msName!=current->name) // skip typedef T {} T;
{ {
Entry *varEntry=new Entry; Entry *varEntry=new Entry;
varEntry->protection = current->protection ; varEntry->protection = current->protection ;
...@@ -3243,7 +3243,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3243,7 +3243,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
} }
else // a global function prototype or function variable else // a global function prototype or function variable
{ {
static QRegExp re("([^)]*)"); static QRegExp re("([^)]*\\*[^)]*)"); // (...*...)
//printf("Scanner.l: prototype? type=`%s' name=`%s' args=`%s'\n",current->type.data(),current->name.data(),current->args.data()); //printf("Scanner.l: prototype? type=`%s' name=`%s' args=`%s'\n",current->type.data(),current->name.data(),current->args.data());
if (!current->type.isEmpty() && if (!current->type.isEmpty() &&
(current->type.find(re,0)!=-1 || current->type.left(8)=="typedef ")) (current->type.find(re,0)!=-1 || current->type.left(8)=="typedef "))
...@@ -3356,6 +3356,7 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3356,6 +3356,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
} }
} }
<SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" { <SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" {
lineCount();
if ( curlyCount ) if ( curlyCount )
{ {
//addToBody(yytext); //addToBody(yytext);
...@@ -3364,7 +3365,6 @@ IDLATTR ("["[^\]]*"]"){BN}* ...@@ -3364,7 +3365,6 @@ IDLATTR ("["[^\]]*"]"){BN}*
else else
{ {
current->endBodyLine=yyLineNr; current->endBodyLine=yyLineNr;
lineCount();
tempEntry = current; // temporarily switch to the previous entry tempEntry = current; // temporarily switch to the previous entry
current = previous; current = previous;
...@@ -4310,7 +4310,7 @@ static void newEntry() ...@@ -4310,7 +4310,7 @@ static void newEntry()
static void handleCommentBlock(const QCString &doc,bool brief) static void handleCommentBlock(const QCString &doc,bool brief)
{ {
int position=0; int position=0;
bool needsEntry; bool needsEntry=FALSE;
if (docBlockInBody) if (docBlockInBody)
{ {
if (previous==0) if (previous==0)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "util.h" #include "util.h"
#include "config.h" #include "config.h"
class Translator class Translator
{ {
private: private:
...@@ -439,6 +440,8 @@ class Translator ...@@ -439,6 +440,8 @@ class Translator
virtual QCString trOverloadText() = 0; virtual QCString trOverloadText() = 0;
virtual ~Translator() {}
}; };
#endif #endif
...@@ -76,6 +76,8 @@ extern char **environ; ...@@ -76,6 +76,8 @@ extern char **environ;
//#define MAP_ALGO ALGO_CRC16 //#define MAP_ALGO ALGO_CRC16
#define MAP_ALGO ALGO_MD5 #define MAP_ALGO ALGO_MD5
#define REL_PATH_TO_ROOT "../../"
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// TextGeneratorOLImpl implementation // TextGeneratorOLImpl implementation
//------------------------------------------------------------------------ //------------------------------------------------------------------------
...@@ -809,6 +811,12 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) ...@@ -809,6 +811,12 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
//fprintf(stderr,"<isAccesibleFrom(scope=%s,item=%s itemScope=%s)\n", //fprintf(stderr,"<isAccesibleFrom(scope=%s,item=%s itemScope=%s)\n",
// scope->name().data(),item->name().data(),item->getOuterScope()->name().data()); // scope->name().data(),item->name().data(),item->getOuterScope()->name().data());
QCString key;
key.sprintf("%p:%p:%p",scope,fileScope,item);
static QDict<void> visitedDict;
if (visitedDict.find(key)) return -1; // already looked at this
visitedDict.insert(key,(void *)0x8);
int result=0; // assume we found it int result=0; // assume we found it
int i; int i;
...@@ -862,6 +870,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) ...@@ -862,6 +870,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
result= (i==-1) ? -1 : i+1; result= (i==-1) ? -1 : i+1;
} }
done: done:
visitedDict.remove(key);
//Doxygen::lookupCache.insert(key,new int(result)); //Doxygen::lookupCache.insert(key,new int(result));
return result; return result;
} }
...@@ -871,14 +880,21 @@ done: ...@@ -871,14 +880,21 @@ done:
* if item in not in this scope. The explicitScopePart limits the search * if item in not in this scope. The explicitScopePart limits the search
* to scopes that match \a scope plus the explicit part. * to scopes that match \a scope plus the explicit part.
*/ */
int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item, int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,
const QCString &explicitScopePart) Definition *item,const QCString &explicitScopePart)
{ {
if (explicitScopePart.isEmpty()) if (explicitScopePart.isEmpty())
{ {
// handle degenerate case where there is no explicit scope. // handle degenerate case where there is no explicit scope.
return isAccessibleFrom(scope,fileScope,item); return isAccessibleFrom(scope,fileScope,item);
} }
QCString key;
key.sprintf("%p:%p:%p:%s",scope,fileScope,item,explicitScopePart.data());
static QDict<void> visitedDict;
if (visitedDict.find(key)) return -1; // already looked at this
visitedDict.insert(key,(void *)0x8);
//printf("<isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?scope->name().data():"<global>", //printf("<isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?scope->name().data():"<global>",
// item?item->name().data():"<none>", // item?item->name().data():"<none>",
// explicitScopePart.data()); // explicitScopePart.data());
...@@ -996,6 +1012,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition ...@@ -996,6 +1012,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition
} }
} }
done: done:
visitedDict.remove(key);
//Doxygen::lookupCache.insert(key,new int(result)); //Doxygen::lookupCache.insert(key,new int(result));
return result; return result;
} }
...@@ -2264,6 +2281,7 @@ static void stripIrrelevantString(QCString &target,const QCString &str) ...@@ -2264,6 +2281,7 @@ static void stripIrrelevantString(QCString &target,const QCString &str)
if (target==str) { target.resize(0); return; } if (target==str) { target.resize(0); return; }
int i,p=0; int i,p=0;
int l=str.length(); int l=str.length();
bool changed=FALSE;
while ((i=target.find(str,p))!=-1) while ((i=target.find(str,p))!=-1)
{ {
bool isMatch = (i==0 || !isId(target.at(i-1))) && // not a character before str bool isMatch = (i==0 || !isId(target.at(i-1))) && // not a character before str
...@@ -2276,17 +2294,20 @@ static void stripIrrelevantString(QCString &target,const QCString &str) ...@@ -2276,17 +2294,20 @@ static void stripIrrelevantString(QCString &target,const QCString &str)
{ {
// strip str from target at index i // strip str from target at index i
target=target.left(i)+target.right(target.length()-i-l); target=target.left(i)+target.right(target.length()-i-l);
changed=TRUE;
i-=l; i-=l;
} }
else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // str before * or & else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2)) // str before * or &
{ {
// move str to front // move str to front
target=str+" "+target.left(i)+target.right(target.length()-i-l); target=str+" "+target.left(i)+target.right(target.length()-i-l);
changed=TRUE;
i++; i++;
} }
} }
p = i+l; p = i+l;
} }
if (changed) target=target.stripWhiteSpace();
} }
/*! According to the C++ spec and Ivan Vecerina: /*! According to the C++ spec and Ivan Vecerina:
...@@ -2739,38 +2760,13 @@ static QCString getCanonicalTypeForIdentifier( ...@@ -2739,38 +2760,13 @@ static QCString getCanonicalTypeForIdentifier(
if (word.findRev("::")!=-1 && !(tmpName=stripScope(word)).isEmpty()) if (word.findRev("::")!=-1 && !(tmpName=stripScope(word)).isEmpty())
{ {
symName=tmpName; symName=tmpName; // name without scope
} }
else else
{ {
symName=word; symName=word;
} }
#if 0 // I've commented this out because it leads to obscure errors
// while not gaining much w.r.t. speed.
if (!symName.isEmpty() && !templSpec.isEmpty() &&
(defList=Doxygen::symbolMap->find(symName+templSpec)) &&
defList->count()==1) // word without scope but with template specs
// is a unique symbol in the symbol map
{
QCString ts;
result = resolveSymbolName(fs,defList->first(),ts);
if (tSpec) *tSpec="";
}
else if (!symName.isEmpty() &&
(defList=Doxygen::symbolMap->find(symName)) &&
defList->count()==1) // word without scope is a
// unique symbol in the symbol map
{
QCString ts;
//printf("unique symName=%s templSpec=%s\n",symName.data(),templSpec.data());
result = resolveSymbolName(fs,defList->first(),ts)+templSpec;
//printf("result=%s ts=%s\n",result.data(),ts.data());
if (tSpec) *tSpec="";
}
else // symbol not unique, try to find the one in the right scope
#endif
{
ClassDef *cd = 0; ClassDef *cd = 0;
MemberDef *mType = 0; MemberDef *mType = 0;
QCString ts; QCString ts;
...@@ -2825,7 +2821,6 @@ static QCString getCanonicalTypeForIdentifier( ...@@ -2825,7 +2821,6 @@ static QCString getCanonicalTypeForIdentifier(
result = resolvedType; result = resolvedType;
} }
} }
}
return result; return result;
} }
...@@ -2845,7 +2840,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a ...@@ -2845,7 +2840,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
type+=name; type+=name;
} }
// strip const and volatile keywords that are not relatevant for the type // strip const and volatile keywords that are not relevant for the type
stripIrrelevantConstVolatile(type); stripIrrelevantConstVolatile(type);
// strip leading keywords // strip leading keywords
...@@ -2911,15 +2906,21 @@ static bool matchArgument2( ...@@ -2911,15 +2906,21 @@ static bool matchArgument2(
NOMATCH NOMATCH
return FALSE; return FALSE;
} }
QCString sSrcName=" "+srcA->name; QCString sSrcName = " "+srcA->name;
QCString sDstName=" "+dstA->name; QCString sDstName = " "+dstA->name;
if (sSrcName==dstA->type.right(sSrcName.length())) QCString srcType = srcA->type;
QCString dstType = dstA->type;
stripIrrelevantConstVolatile(srcType);
stripIrrelevantConstVolatile(dstType);
//printf("'%s'<->'%s'\n",sSrcName.data(),dstType.right(sSrcName.length()).data());
//printf("'%s'<->'%s'\n",sDstName.data(),srcType.right(sDstName.length()).data());
if (sSrcName==dstType.right(sSrcName.length()))
{ // case "unsigned int" <-> "unsigned int i" { // case "unsigned int" <-> "unsigned int i"
srcA->type+=sSrcName; srcA->type+=sSrcName;
srcA->name=""; srcA->name="";
srcA->canType=""; // invalidate cached type value srcA->canType=""; // invalidate cached type value
} }
else if (sDstName==srcA->type.right(sDstName.length())) else if (sDstName==srcType.right(sDstName.length()))
{ // case "unsigned int i" <-> "unsigned int" { // case "unsigned int i" <-> "unsigned int"
dstA->type+=sDstName; dstA->type+=sDstName;
dstA->name=""; dstA->name="";
...@@ -5695,4 +5696,57 @@ SrcLangExt getLanguageFromFileName(const QCString fileName) ...@@ -5695,4 +5696,57 @@ SrcLangExt getLanguageFromFileName(const QCString fileName)
return SrcLangExt_Cpp; // not listed => assume C-ish language. return SrcLangExt_Cpp; // not listed => assume C-ish language.
} }
/*! Returns true iff the given name string appears to be a typedef in scope. */
bool checkIfTypedef(Definition *scope,FileDef *fileScope,const char *n)
{
if (scope==0 ||
(scope->definitionType()!=Definition::TypeClass &&
scope->definitionType()!=Definition::TypeNamespace
)
)
{
scope=Doxygen::globalScope;
}
QCString name = n;
if (name.isEmpty())
return FALSE; // no name was given
DefinitionList *dl = Doxygen::symbolMap->find(name);
if (dl==0)
return FALSE; // could not find any matching symbols
// mostly copied from getResolvedClassRec()
QCString explicitScopePart;
int qualifierIndex = computeQualifiedIndex(name);
if (qualifierIndex!=-1)
{
explicitScopePart = name.left(qualifierIndex);
replaceNamespaceAliases(explicitScopePart,explicitScopePart.length());
name = name.mid(qualifierIndex+2);
}
// find the closest closest matching definition
DefinitionListIterator dli(*dl);
Definition *d;
int minDistance = 10000;
MemberDef *bestMatch = 0;
for (dli.toFirst();(d=dli.current());++dli)
{
if (d->definitionType()==Definition::TypeMember)
{
g_visitedNamespaces.clear();
int distance = isAccessibleFromWithExpScope(scope,fileScope,d,explicitScopePart);
if (distance!=-1 && distance<minDistance)
{
minDistance = distance;
bestMatch = (MemberDef *)d;
}
}
}
if (bestMatch && bestMatch->isTypedef())
return TRUE; // closest matching symbol is a typedef
else
return FALSE;
}
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <ctype.h> #include <ctype.h>
#include "sortdict.h" #include "sortdict.h"
//--------------------------------------------------------------------
class ClassDef; class ClassDef;
class FileDef; class FileDef;
class MemberList; class MemberList;
...@@ -81,6 +83,19 @@ class TextGeneratorOLImpl : public TextGeneratorIntf ...@@ -81,6 +83,19 @@ class TextGeneratorOLImpl : public TextGeneratorIntf
//-------------------------------------------------------------------- //--------------------------------------------------------------------
enum SrcLangExt
{
SrcLangExt_IDL = 0x008,
SrcLangExt_Java = 0x010,
SrcLangExt_CSharp = 0x020,
SrcLangExt_D = 0x040,
SrcLangExt_PHP = 0x080,
SrcLangExt_ObjC = 0x100,
SrcLangExt_Cpp = 0x200,
};
//--------------------------------------------------------------------
void linkifyText(const TextGeneratorIntf &ol, void linkifyText(const TextGeneratorIntf &ol,
Definition *scope, Definition *scope,
FileDef *fileScope, FileDef *fileScope,
...@@ -90,9 +105,13 @@ void linkifyText(const TextGeneratorIntf &ol, ...@@ -90,9 +105,13 @@ void linkifyText(const TextGeneratorIntf &ol,
bool external=TRUE, bool external=TRUE,
bool keepSpaces=FALSE bool keepSpaces=FALSE
); );
void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1); void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1);
QCString fileToString(const char *name,bool filter=FALSE); QCString fileToString(const char *name,bool filter=FALSE);
QCString dateToString(bool); QCString dateToString(bool);
bool getDefs(const QCString &scopeName, bool getDefs(const QCString &scopeName,
const QCString &memberName, const QCString &memberName,
const char *, const char *,
...@@ -124,28 +143,30 @@ bool resolveLink(/* in */ const char *scName, ...@@ -124,28 +143,30 @@ bool resolveLink(/* in */ const char *scName,
bool generateRef(OutputDocInterface &od,const char *, bool generateRef(OutputDocInterface &od,const char *,
const char *,bool inSeeBlock,const char * =0); const char *,bool inSeeBlock,const char * =0);
bool generateLink(OutputDocInterface &od,const char *, bool generateLink(OutputDocInterface &od,const char *,
const char *,bool inSeeBlock,const char *); const char *,bool inSeeBlock,const char *);
void generateFileRef(OutputDocInterface &od,const char *, void generateFileRef(OutputDocInterface &od,const char *,
const char *linkTxt=0); const char *linkTxt=0);
void writePageRef(OutputDocInterface &od,const char *cn,const char *mn); void writePageRef(OutputDocInterface &od,const char *cn,const char *mn);
#if 0
bool matchArguments(ArgumentList *,ArgumentList *,
const char *cl=0,const char *ns=0,bool checkCV=TRUE,
NamespaceSDict *usingNamespaces=0,
SDict<Definition> *usingClasses=0);
#endif
bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *srcAl, bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *srcAl,
Definition *dstScope,FileDef *dstFileScope,ArgumentList *dstAl, Definition *dstScope,FileDef *dstFileScope,ArgumentList *dstAl,
bool checkCV bool checkCV
); );
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);
QCString resolveDefines(const char *n); QCString resolveDefines(const char *n);
ClassDef *getClass(const char *key); ClassDef *getClass(const char *key);
ClassDef *getResolvedClass(Definition *scope, ClassDef *getResolvedClass(Definition *scope,
FileDef *fileScope, FileDef *fileScope,
const char *key, const char *key,
...@@ -153,61 +174,102 @@ ClassDef *getResolvedClass(Definition *scope, ...@@ -153,61 +174,102 @@ ClassDef *getResolvedClass(Definition *scope,
QCString *pTemplSpec=0, QCString *pTemplSpec=0,
bool mayBeUnlinkable=FALSE, bool mayBeUnlinkable=FALSE,
bool mayBeHidden=FALSE); bool mayBeHidden=FALSE);
NamespaceDef *getResolvedNamespace(const char *key); NamespaceDef *getResolvedNamespace(const char *key);
FileDef *findFileDef(const FileNameDict *fnDict,const char *n, FileDef *findFileDef(const FileNameDict *fnDict,const char *n,
bool &ambig); bool &ambig);
QCString showFileDefMatches(const FileNameDict *fnDict,const char *n); QCString showFileDefMatches(const FileNameDict *fnDict,const char *n);
int guessSection(const char *name); int guessSection(const char *name);
bool isId(char c); bool isId(char c);
QCString removeRedundantWhiteSpace(const QCString &s); QCString removeRedundantWhiteSpace(const QCString &s);
QCString argListToString(ArgumentList *al,bool useCanonicalType=FALSE); QCString argListToString(ArgumentList *al,bool useCanonicalType=FALSE);
QCString tempArgListToString(ArgumentList *al); QCString tempArgListToString(ArgumentList *al);
QCString generateMarker(int id); QCString generateMarker(int id);
void writeExample(OutputList &ol,ExampleSDict *el); void writeExample(OutputList &ol,ExampleSDict *el);
QCString stripAnonymousNamespaceScope(const QCString &s); QCString stripAnonymousNamespaceScope(const QCString &s);
QCString stripFromPath(const QCString &path); QCString stripFromPath(const QCString &path);
QCString stripFromIncludePath(const QCString &path); QCString stripFromIncludePath(const QCString &path);
bool rightScopeMatch(const QCString &scope, const QCString &name); bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name); bool leftScopeMatch(const QCString &scope, const QCString &name);
QCString substituteKeywords(const QCString &s,const char *title,const QCString &relPath=""); QCString substituteKeywords(const QCString &s,const char *title,const QCString &relPath="");
int getPrefixIndex(const QCString &name); int getPrefixIndex(const QCString &name);
QCString removeAnonymousScopes(const QCString &s); QCString removeAnonymousScopes(const QCString &s);
QCString replaceAnonymousScopes(const QCString &s); QCString replaceAnonymousScopes(const QCString &s);
void initClassHierarchy(ClassSDict *cl); void initClassHierarchy(ClassSDict *cl);
bool hasVisibleRoot(BaseClassList *bcl); bool hasVisibleRoot(BaseClassList *bcl);
int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0); int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0);
QCString convertNameToFile(const char *name,bool allowDots=FALSE); QCString convertNameToFile(const char *name,bool allowDots=FALSE);
void extractNamespaceName(const QCString &scopeName, void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName, QCString &className,QCString &namespaceName,
bool allowEmptyClass=FALSE); bool allowEmptyClass=FALSE);
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ); QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
QCString stripScope(const char *name); QCString stripScope(const char *name);
int iSystem(const char *command,const char *args,bool isBatchFile=FALSE); int iSystem(const char *command,const char *args,bool isBatchFile=FALSE);
QCString convertToHtml(const char *s); QCString convertToHtml(const char *s);
QCString convertToXML(const char *s); QCString convertToXML(const char *s);
QCString getOverloadDocs(); QCString getOverloadDocs();
void addMembersToMemberGroup(MemberList *ml, void addMembersToMemberGroup(MemberList *ml,
MemberGroupSDict *memberGroupSDict, MemberGroupSDict *memberGroupSDict,
Definition *context); Definition *context);
int extractClassNameFromType(const QCString &type,int &pos, int extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec); QCString &name,QCString &templSpec);
QCString substituteTemplateArgumentsInString( QCString substituteTemplateArgumentsInString(
const QCString &name, const QCString &name,
ArgumentList *formalArgs, ArgumentList *formalArgs,
ArgumentList *actualArgs); ArgumentList *actualArgs);
ArgumentList *copyArgumentList(const ArgumentList *src); ArgumentList *copyArgumentList(const ArgumentList *src);
QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists); QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists);
QCString stripTemplateSpecifiersFromScope(const QCString &fullName, QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
bool parentOnly=TRUE, bool parentOnly=TRUE,
QCString *lastScopeStripped=0); QCString *lastScopeStripped=0);
QCString resolveTypeDef(Definition *d,const QCString &name, QCString resolveTypeDef(Definition *d,const QCString &name,
Definition **typedefContext=0); Definition **typedefContext=0);
QCString mergeScopes(const QCString &leftScope,const QCString &rightScope); QCString mergeScopes(const QCString &leftScope,const QCString &rightScope);
int getScopeFragment(const QCString &s,int p,int *l); int getScopeFragment(const QCString &s,int p,int *l);
int filterCRLF(char *buf,int len); int filterCRLF(char *buf,int len);
void addRefItem(const QList<ListItemInfo> *sli,const char *prefix, void addRefItem(const QList<ListItemInfo> *sli,const char *prefix,
const char *name,const char *title,const char *args=0); const char *name,const char *title,const char *args=0);
PageDef *addRelatedPage(const char *name,const QCString &ptitle, PageDef *addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<SectionInfo> *anchors, const QCString &doc,QList<SectionInfo> *anchors,
const char *fileName,int startLine, const char *fileName,int startLine,
...@@ -215,44 +277,53 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle, ...@@ -215,44 +277,53 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
GroupDef *gd=0, GroupDef *gd=0,
TagInfo *tagInfo=0 TagInfo *tagInfo=0
); );
QCString escapeCharsInString(const char *name,bool allowDots); QCString escapeCharsInString(const char *name,bool allowDots);
void addGroupListToTitle(OutputList &ol,Definition *d); void addGroupListToTitle(OutputList &ol,Definition *d);
void filterLatexString(QTextStream &t,const char *str, void filterLatexString(QTextStream &t,const char *str,
bool insideTabbing=FALSE,bool insidePre=FALSE, bool insideTabbing=FALSE,bool insidePre=FALSE,
bool insideItem=FALSE); bool insideItem=FALSE);
QCString rtfFormatBmkStr(const char *name); QCString rtfFormatBmkStr(const char *name);
QCString linkToText(const char *link,bool isFileName); 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 isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item, int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item,
const QCString &explicitScopePart); const QCString &explicitScopePart);
int computeQualifiedIndex(const QCString &name); int computeQualifiedIndex(const QCString &name);
void addDirPrefix(QCString &fileName); void addDirPrefix(QCString &fileName);
QCString relativePathToRoot(const char *name); QCString relativePathToRoot(const char *name);
#define REL_PATH_TO_ROOT "../../"
void createSubDirs(QDir &d); void createSubDirs(QDir &d);
QCString stripPath(const char *s); QCString stripPath(const char *s);
bool containsWord(const QCString &s,const QCString &word); bool containsWord(const QCString &s,const QCString &word);
bool findAndRemoveWord(QCString &s,const QCString &word); bool findAndRemoveWord(QCString &s,const QCString &word);
QCString stripLeadingAndTrailingEmptyLines(const QCString &s); QCString stripLeadingAndTrailingEmptyLines(const QCString &s);
void stringToSearchIndex(const QCString &docUrlBase,const QCString &title, void stringToSearchIndex(const QCString &docUrlBase,const QCString &title,
const QCString &str, bool priority=FALSE, const QCString &str, bool priority=FALSE,
const QCString &anchor=""); const QCString &anchor="");
enum SrcLangExt
{
SrcLangExt_IDL = 0x008,
SrcLangExt_Java = 0x010,
SrcLangExt_CSharp = 0x020,
SrcLangExt_D = 0x040,
SrcLangExt_PHP = 0x080,
SrcLangExt_ObjC = 0x100,
SrcLangExt_Cpp = 0x200,
};
SrcLangExt getLanguageFromFileName(const QCString fileName); SrcLangExt getLanguageFromFileName(const QCString fileName);
bool checkIfTypedef(Definition *scope,FileDef *fileScope,const char *n);
#endif #endif
...@@ -605,6 +605,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De ...@@ -605,6 +605,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
t << " mutable=\""; t << " mutable=\"";
if (md->isMutable()) t << "yes"; else t << "no"; if (md->isMutable()) t << "yes"; else t << "no";
t << "\""; t << "\"";
} }
else if (md->memberType() == MemberDef::Property) else if (md->memberType() == MemberDef::Property)
{ {
...@@ -646,6 +647,12 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De ...@@ -646,6 +647,12 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
if (md->isWritable()) if (md->isWritable())
t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>" << endl; t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>" << endl;
} }
if (md->memberType()==MemberDef::Variable && md->bitfieldString())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
t << " <bitfield>" << bitfield << "</bitfield>" << endl;
}
MemberDef *rmd = md->reimplements(); MemberDef *rmd = md->reimplements();
if (rmd) if (rmd)
......
#! Use the common Unix template
#$ IncludeTemplate("../unix/app.t");
#! Use the common Unix template
#$ IncludeTemplate("../unix/lib.t");
#! Use the common Unix template
#$ IncludeTemplate("../unix/subdirs.t");
#
#
#
# tmake configuration for linux-g++
#
TEMPLATE = app
CONFIG = qt warn_on release
TMAKE_CC = gcc
TMAKE_CFLAGS = -pipe
TMAKE_CFLAGS_WARN_ON = -Wall -W -fno-exceptions
TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
TMAKE_CXX = g++
TMAKE_CXXFLAGS = $$TMAKE_CFLAGS
TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB
TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
TMAKE_INCDIR =
TMAKE_LIBDIR =
TMAKE_INCDIR_X11 = /usr/X11R6/include
TMAKE_LIBDIR_X11 = /usr/X11R6/lib64
TMAKE_INCDIR_QT = $(QTDIR)/include
TMAKE_LIBDIR_QT = $(QTDIR)/lib64
TMAKE_INCDIR_OPENGL = /usr/X11R6/include
TMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64
TMAKE_LINK = g++
TMAKE_LINK_SHLIB = g++
TMAKE_LFLAGS =
TMAKE_LFLAGS_RELEASE =
TMAKE_LFLAGS_DEBUG = -g
TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_X11SM = -lICE -lSM
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_MT = -lqt-mt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
TMAKE_AR = ar cqs
TMAKE_RANLIB =
TMAKE_TAR = tar -cf
TMAKE_GZIP = gzip -9f
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