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

Release-1.7.6.1

parent e48f695c
DOXYGEN Version 1.7.6 DOXYGEN Version 1.7.6.1
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 (03 December 2011) Dimitri van Heesch (10 December 2011)
DOXYGEN Version 1.7.6 DOXYGEN Version 1.7.6.1
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -26,4 +26,4 @@ forum. ...@@ -26,4 +26,4 @@ forum.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (03 December 2011) Dimitri van Heesch (dimitri@stack.nl) (10 December 2011)
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
doxygen_version_major=1 doxygen_version_major=1
doxygen_version_minor=7 doxygen_version_minor=7
doxygen_version_revision=6 doxygen_version_revision=6.1
#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=NO doxygen_version_mmn=NO
......
...@@ -1017,7 +1017,7 @@ Section indicators ...@@ -1017,7 +1017,7 @@ Section indicators
\par Example: \par Example:
\verbinclude author.cpp \verbinclude author.cpp
\htmlonly \htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/author/html/class_windows_n_t.html">here</a> Click <a href="$(DOXYGEN_DOCDIR)/examples/author/html/class_some_nice_class.html">here</a>
for the corresponding HTML documentation that is generated by doxygen. for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly \endhtmlonly
......
...@@ -196,6 +196,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -196,6 +196,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_latex_output LATEX_OUTPUT \refitem cfg_latex_output LATEX_OUTPUT
\refitem cfg_latex_source_code LATEX_SOURCE_CODE \refitem cfg_latex_source_code LATEX_SOURCE_CODE
\refitem cfg_layout_file LAYOUT_FILE \refitem cfg_layout_file LAYOUT_FILE
\refitem cfg_lookup_cache_size LOOKUP_CACHE_SIZE
\refitem cfg_macro_expansion MACRO_EXPANSION \refitem cfg_macro_expansion MACRO_EXPANSION
\refitem cfg_makeindex_cmd_name MAKEINDEX_CMD_NAME \refitem cfg_makeindex_cmd_name MAKEINDEX_CMD_NAME
\refitem cfg_man_extension MAN_EXTENSION \refitem cfg_man_extension MAN_EXTENSION
...@@ -644,6 +645,18 @@ combination with \ref cfg_separate_member_pages "SEPARATE_MEMBER_PAGES". ...@@ -644,6 +645,18 @@ combination with \ref cfg_separate_member_pages "SEPARATE_MEMBER_PAGES".
\f$2^{(16+\mbox{SYMBOL\_CACHE\_SIZE})}\f$. The valid range is 0..9, the default is 0, \f$2^{(16+\mbox{SYMBOL\_CACHE\_SIZE})}\f$. The valid range is 0..9, the default is 0,
corresponding to a cache size of \f$2^{16} = 65536\f$ symbols. corresponding to a cache size of \f$2^{16} = 65536\f$ symbols.
\anchor cfg_lookup_cache_size
<dt>\c LOOKUP_CACHE_SIZE <dd>
\addindex LOOKUP_CACHE_SIZE
Similar to the \c SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
set using \c LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
their name and scope. Since this can be an expensive process and often the
same symbol appear multiple times in the code, doxygen keeps a cache of
pre-resolved symbols. If the cache is too small doxygen will become slower.
If the cache is too large, memory is wasted. The cache size is given by this
formula: \f$2^{(16+\mbox{LOOKUP\_CACHE\_SIZE})}\f$. The valid range is 0..9, the default is 0,
corresponding to a cache size of \f$2^{16} = 65536\f$ symbols.
</dl> </dl>
\section config_build Build related options \section config_build Build related options
......
...@@ -3,5 +3,12 @@ ...@@ -3,5 +3,12 @@
<compound kind="class"> <compound kind="class">
<name>Test</name> <name>Test</name>
<filename>class_test.html</filename> <filename>class_test.html</filename>
<member kind="function">
<type>void</type>
<name>example</name>
<anchorfile>class_test.html</anchorfile>
<anchor>a47b775f65718978f1ffcd96376f8ecfa</anchor>
<arglist>()</arglist>
</member>
</compound> </compound>
</tagfile> </tagfile>
...@@ -164,8 +164,8 @@ QHP_SECT_FILTER_ATTRS = ...@@ -164,8 +164,8 @@ QHP_SECT_FILTER_ATTRS =
QHG_LOCATION = QHG_LOCATION =
GENERATE_ECLIPSEHELP = YES GENERATE_ECLIPSEHELP = YES
ECLIPSE_DOC_ID = org.doxygen.qtools ECLIPSE_DOC_ID = org.doxygen.qtools
DISABLE_INDEX = YES DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES GENERATE_TREEVIEW = NO
ENUM_VALUES_PER_LINE = 4 ENUM_VALUES_PER_LINE = 4
USE_INLINE_TREES = YES USE_INLINE_TREES = YES
TREEVIEW_WIDTH = 250 TREEVIEW_WIDTH = 250
......
...@@ -73,6 +73,8 @@ public: ...@@ -73,6 +73,8 @@ public:
type *operator[]( const QString &k ) const type *operator[]( const QString &k ) const
{ return (type *)QGCache::find_string(k);} { return (type *)QGCache::find_string(k);}
void statistics() const { QGCache::statistics(); } void statistics() const { QGCache::statistics(); }
int hits() const { return QGCache::hits(); }
int misses() const { return QGCache::misses(); }
private: private:
void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } void deleteItem( Item d ) { if ( del_item ) delete (type *)d; }
}; };
...@@ -107,6 +109,8 @@ public: ...@@ -107,6 +109,8 @@ public:
type *operator[]( const char *k ) const type *operator[]( const char *k ) const
{ return (type *)QGCache::find_other(k);} { return (type *)QGCache::find_other(k);}
void statistics() const { QGCache::statistics(); } void statistics() const { QGCache::statistics(); }
int hits() const { return QGCache::hits(); }
int misses() const { return QGCache::misses(); }
private: private:
void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } void deleteItem( Item d ) { if ( del_item ) delete (type *)d; }
}; };
......
...@@ -655,6 +655,16 @@ void QGCache::statistics() const ...@@ -655,6 +655,16 @@ void QGCache::statistics() const
#endif #endif
} }
int QGCache::hits() const
{
return lruList->hits;
}
int QGCache::misses() const
{
return lruList->finds - lruList->hits;
}
/***************************************************************************** /*****************************************************************************
QGCacheIterator member functions QGCacheIterator member functions
......
...@@ -83,6 +83,8 @@ protected: ...@@ -83,6 +83,8 @@ protected:
QCollection::Item find_other( const char *key, bool ref=TRUE ) const; QCollection::Item find_other( const char *key, bool ref=TRUE ) const;
void statistics() const; void statistics() const;
int hits() const;
int misses() const;
private: private:
bool makeRoomFor( int cost, int priority = -1 ); bool makeRoomFor( int cost, int priority = -1 );
......
...@@ -957,9 +957,9 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol) ...@@ -957,9 +957,9 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol)
{ {
ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": "); ol.startSimpleSect(BaseOutputDocInterface::Examples,0,0,theTranslator->trExamples()+": ");
ol.startDescForItem(); ol.startDescForItem();
ol.startParagraph(); //ol.startParagraph();
writeExample(ol,m_impl->exampleSDict); writeExample(ol,m_impl->exampleSDict);
ol.endParagraph(); //ol.endParagraph();
ol.endDescForItem(); ol.endDescForItem();
ol.endSimpleSect(); ol.endSimpleSect();
} }
......
...@@ -402,6 +402,8 @@ static int g_condCount; ...@@ -402,6 +402,8 @@ static int g_condCount;
static int g_sectionLevel; static int g_sectionLevel;
static int g_commentCount; static int g_commentCount;
static bool g_spaceBeforeCmd;
static bool g_spaceBeforeIf;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -955,6 +957,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ...@@ -955,6 +957,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// the {B}* in the front was added for bug620924 // the {B}* in the front was added for bug620924
QCString cmdName = QCString(yytext).stripWhiteSpace().data()+1; QCString cmdName = QCString(yytext).stripWhiteSpace().data()+1;
DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName); DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName);
g_spaceBeforeCmd = yytext[0]==' ' || yytext[0]=='\t';
if (cmdPtr) // special action is required if (cmdPtr) // special action is required
{ {
if (cmdPtr->endsBrief) if (cmdPtr->endsBrief)
...@@ -1675,9 +1678,15 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ...@@ -1675,9 +1678,15 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput(*yytext); addOutput(*yytext);
} }
<GuardParamEnd>{B}*{DOCNL} { <GuardParamEnd>{B}*{DOCNL} {
g_spaceBeforeIf=FALSE;
BEGIN(Comment); BEGIN(Comment);
} }
<GuardParamEnd>{B}* { <GuardParamEnd>{B}* {
if (g_spaceBeforeIf) // needed for 665313 in combation with bug620924
{
addOutput(" ");
}
g_spaceBeforeIf=FALSE;
BEGIN(Comment); BEGIN(Comment);
} }
<GuardParamEnd>. { <GuardParamEnd>. {
...@@ -2323,6 +2332,7 @@ static bool handleIf(const QCString &) ...@@ -2323,6 +2332,7 @@ static bool handleIf(const QCString &)
{ {
enabledSectionFound=FALSE; enabledSectionFound=FALSE;
guardType = Guard_If; guardType = Guard_If;
g_spaceBeforeIf = g_spaceBeforeCmd;
BEGIN(GuardParam); BEGIN(GuardParam);
return FALSE; return FALSE;
} }
...@@ -2331,6 +2341,7 @@ static bool handleIfNot(const QCString &) ...@@ -2331,6 +2341,7 @@ static bool handleIfNot(const QCString &)
{ {
enabledSectionFound=FALSE; enabledSectionFound=FALSE;
guardType = Guard_IfNot; guardType = Guard_IfNot;
g_spaceBeforeIf = g_spaceBeforeCmd;
BEGIN(GuardParam); BEGIN(GuardParam);
return FALSE; return FALSE;
} }
...@@ -2557,6 +2568,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, ...@@ -2557,6 +2568,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
briefEndsAtDot = isAutoBriefOn; briefEndsAtDot = isAutoBriefOn;
g_condCount = 0; g_condCount = 0;
g_sectionLevel = 0; g_sectionLevel = 0;
g_spaceBeforeCmd = FALSE;
g_spaceBeforeIf = FALSE;
if (!current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments if (!current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments
{ {
......
...@@ -323,7 +323,17 @@ performance by keeping more symbols in memory. Note that the value works on ...@@ -323,7 +323,17 @@ performance by keeping more symbols in memory. Note that the value works on
a logarithmic scale so increasing the size by one will roughly double the a logarithmic scale so increasing the size by one will roughly double the
memory usage. The cache size is given by this formula: memory usage. The cache size is given by this formula:
2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
corresponding to a cache size of 2^16 = 65536 symbols corresponding to a cache size of 2^16 = 65536 symbols.
' minval='0' maxval='9' defval='0'/>
<option type='int' id='LOOKUP_CACHE_SIZE' docs='
Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
their name and scope. Since this can be an expensive process and often the
same symbol appear multiple times in the code, doxygen keeps a cache of
pre-resolved symbols. If the cache is too small doxygen will become slower.
If the cache is too large, memory is wasted. The cache size is given by this
formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
corresponding to a cache size of 2^16 = 65536 symbols.
' minval='0' maxval='9' defval='0'/> ' minval='0' maxval='9' defval='0'/>
</group> </group>
<group name='Build' docs='Build related configuration options'> <group name='Build' docs='Build related configuration options'>
......
...@@ -451,7 +451,20 @@ void addConfigOptions(Config *cfg) ...@@ -451,7 +451,20 @@ void addConfigOptions(Config *cfg)
"a logarithmic scale so increasing the size by one will roughly double the\n" "a logarithmic scale so increasing the size by one will roughly double the\n"
"memory usage. The cache size is given by this formula:\n" "memory usage. The cache size is given by this formula:\n"
"2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,\n" "2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,\n"
"corresponding to a cache size of 2^16 = 65536 symbols", "corresponding to a cache size of 2^16 = 65536 symbols.",
0,9,0
);
//----
ci = cfg->addInt(
"LOOKUP_CACHE_SIZE",
"Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be\n"
"set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given\n"
"their name and scope. Since this can be an expensive process and often the\n"
"same symbol appear multiple times in the code, doxygen keeps a cache of\n"
"pre-resolved symbols. If the cache is too small doxygen will become slower.\n"
"If the cache is too large, memory is wasted. The cache size is given by this\n"
"formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,\n"
"corresponding to a cache size of 2^16 = 65536 symbols.",
0,9,0 0,9,0
); );
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -770,7 +783,8 @@ void addConfigOptions(Config *cfg) ...@@ -770,7 +783,8 @@ void addConfigOptions(Config *cfg)
".bib extension is automatically appended if omitted. Using this command\n" ".bib extension is automatically appended if omitted. Using this command\n"
"requires the bibtex tool to be installed. See also\n" "requires the bibtex tool to be installed. See also\n"
"http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\n" "http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style\n"
"of the bibliography can be controlled using LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the search path." "of the bibliography can be controlled using LATEX_BIB_STYLE. To use this\n"
"feature you need bibtex and perl available in the search path."
); );
cl->setWidgetType(ConfigList::File); cl->setWidgetType(ConfigList::File);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
......
...@@ -134,7 +134,7 @@ SearchIndex * Doxygen::searchIndex=0; ...@@ -134,7 +134,7 @@ SearchIndex * Doxygen::searchIndex=0;
QDict<DefinitionIntf> *Doxygen::symbolMap; QDict<DefinitionIntf> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE; bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0; QDict<int> * Doxygen::htmlDirMap = 0;
QCache<LookupInfo> Doxygen::lookupCache(50000,50000); QCache<LookupInfo> *Doxygen::lookupCache;
DirSDict *Doxygen::directories; DirSDict *Doxygen::directories;
SDict<DirRelation> Doxygen::dirRelations(257); SDict<DirRelation> Doxygen::dirRelations(257);
ParserManager *Doxygen::parserManager = 0; ParserManager *Doxygen::parserManager = 0;
...@@ -7881,13 +7881,13 @@ static void flushCachedTemplateRelations() ...@@ -7881,13 +7881,13 @@ static void flushCachedTemplateRelations()
// as there can be new template instances in the inheritance path // as there can be new template instances in the inheritance path
// to this class. Optimization: only remove those classes that // to this class. Optimization: only remove those classes that
// have inheritance instances as direct or indirect sub classes. // have inheritance instances as direct or indirect sub classes.
QCacheIterator<LookupInfo> ci(Doxygen::lookupCache); QCacheIterator<LookupInfo> ci(*Doxygen::lookupCache);
LookupInfo *li=0; LookupInfo *li=0;
for (ci.toFirst();(li=ci.current());++ci) for (ci.toFirst();(li=ci.current());++ci)
{ {
if (li->classDef) if (li->classDef)
{ {
Doxygen::lookupCache.remove(ci.currentKey()); Doxygen::lookupCache->remove(ci.currentKey());
} }
} }
// remove all cached typedef resolutions whose target is a // remove all cached typedef resolutions whose target is a
...@@ -7937,13 +7937,13 @@ static void flushUnresolvedRelations() ...@@ -7937,13 +7937,13 @@ static void flushUnresolvedRelations()
// class B : public A {}; // class B : public A {};
// class C : public B::I {}; // class C : public B::I {};
// //
QCacheIterator<LookupInfo> ci(Doxygen::lookupCache); QCacheIterator<LookupInfo> ci(*Doxygen::lookupCache);
LookupInfo *li=0; LookupInfo *li=0;
for (ci.toFirst();(li=ci.current());++ci) for (ci.toFirst();(li=ci.current());++ci)
{ {
if (li->classDef==0 && li->typeDef==0) if (li->classDef==0 && li->typeDef==0)
{ {
Doxygen::lookupCache.remove(ci.currentKey()); Doxygen::lookupCache->remove(ci.currentKey());
} }
} }
...@@ -9393,7 +9393,6 @@ void initDoxygen() ...@@ -9393,7 +9393,6 @@ void initDoxygen()
Doxygen::sectionDict.setAutoDelete(TRUE); Doxygen::sectionDict.setAutoDelete(TRUE);
Doxygen::memGrpInfoDict.setAutoDelete(TRUE); Doxygen::memGrpInfoDict.setAutoDelete(TRUE);
Doxygen::tagDestinationDict.setAutoDelete(TRUE); Doxygen::tagDestinationDict.setAutoDelete(TRUE);
Doxygen::lookupCache.setAutoDelete(TRUE);
Doxygen::dirRelations.setAutoDelete(TRUE); Doxygen::dirRelations.setAutoDelete(TRUE);
Doxygen::citeDict = new CiteDict(256); Doxygen::citeDict = new CiteDict(256);
} }
...@@ -9453,6 +9452,18 @@ void cleanUpDoxygen() ...@@ -9453,6 +9452,18 @@ void cleanUpDoxygen()
// dynamic first // dynamic first
} }
static int computeIdealCacheParam(uint v)
{
//printf("computeIdealCacheParam(v=%u)\n",v);
int r=0;
while (v!=0) v>>=1,r++;
// r = log2(v)
// convert to a valid cache size value
return QMAX(0,QMIN(r-16,9));
}
void readConfiguration(int argc, char **argv) void readConfiguration(int argc, char **argv)
{ {
/************************************************************************** /**************************************************************************
...@@ -10106,6 +10117,14 @@ void parseInput() ...@@ -10106,6 +10117,14 @@ void parseInput()
//Doxygen::symbolCache = new ObjCache(1); // only to stress test cache behaviour //Doxygen::symbolCache = new ObjCache(1); // only to stress test cache behaviour
Doxygen::symbolStorage = new Store; Doxygen::symbolStorage = new Store;
// also scale lookup cache with SYMBOL_CACHE_SIZE
cacheSize = Config_getInt("LOOKUP_CACHE_SIZE");
if (cacheSize<0) cacheSize=0;
if (cacheSize>9) cacheSize=9;
uint lookupSize = 65536 << cacheSize;
Doxygen::lookupCache = new QCache<LookupInfo>(lookupSize,lookupSize);
Doxygen::lookupCache->setAutoDelete(TRUE);
#ifdef HAS_SIGNALS #ifdef HAS_SIGNALS
signal(SIGINT, stopDoxygen); signal(SIGINT, stopDoxygen);
#endif #endif
...@@ -10328,7 +10347,7 @@ void parseInput() ...@@ -10328,7 +10347,7 @@ void parseInput()
// calling buildClassList may result in cached relations that // calling buildClassList may result in cached relations that
// become invalid after resolveClassNestingRelations(), that's why // become invalid after resolveClassNestingRelations(), that's why
// we need to clear the cache here // we need to clear the cache here
Doxygen::lookupCache.clear(); Doxygen::lookupCache->clear();
// we don't need the list of using declaration anymore // we don't need the list of using declaration anymore
g_usingDeclarations.clear(); g_usingDeclarations.clear();
...@@ -10840,6 +10859,27 @@ void generateOutput() ...@@ -10840,6 +10859,27 @@ void generateOutput()
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
} }
int cacheParam;
msg("symbol cache used %d/%d hits=%d misses=%d\n",
Doxygen::symbolCache->count(),
Doxygen::symbolCache->size(),
Doxygen::symbolCache->hits(),
Doxygen::symbolCache->misses());
cacheParam = computeIdealCacheParam(Doxygen::symbolCache->misses());
if (cacheParam>Config_getInt("SYMBOL_CACHE_SIZE"))
{
msg("Note: based on cache misses the ideal setting for SYMBOL_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
}
msg("lookup cache used %d/%d hits=%d misses=%d\n",
Doxygen::lookupCache->count(),
Doxygen::lookupCache->size(),
Doxygen::lookupCache->hits(),
Doxygen::lookupCache->misses());
cacheParam = computeIdealCacheParam(Doxygen::lookupCache->misses()*2/3); // part of the cache is flushed, hence the 2/3 correction factor
if (cacheParam>Config_getInt("LOOKUP_CACHE_SIZE"))
{
msg("Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
}
if (Debug::isFlagSet(Debug::Time)) if (Debug::isFlagSet(Debug::Time))
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
body, table, div, p, dl { body, table, div, p, dl {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 13px; font-size: 13px;
line-height: 1.5; line-height: 1.3;
} }
/* @group Heading Levels */ /* @group Heading Levels */
...@@ -122,11 +122,11 @@ a.el { ...@@ -122,11 +122,11 @@ a.el {
a.elRef { a.elRef {
} }
a.code { a.code, a.code:visited {
color: #4665A2; color: #4665A2;
} }
a.codeRef { a.codeRef, a.codeRef:visited {
color: #4665A2; color: #4665A2;
} }
......
...@@ -118,7 +118,7 @@ class Doxygen ...@@ -118,7 +118,7 @@ class Doxygen
static QDict<DefinitionIntf> *symbolMap; static QDict<DefinitionIntf> *symbolMap;
static bool outputToWizard; static bool outputToWizard;
static QDict<int> *htmlDirMap; static QDict<int> *htmlDirMap;
static QCache<LookupInfo> lookupCache; static QCache<LookupInfo> *lookupCache;
static DirSDict *directories; static DirSDict *directories;
static SDict<DirRelation> dirRelations; static SDict<DirRelation> dirRelations;
static ParserManager *parserManager; static ParserManager *parserManager;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"body, table, div, p, dl {\n" "body, table, div, p, dl {\n"
" font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;\n" " font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;\n"
" font-size: 13px;\n" " font-size: 13px;\n"
" line-height: 1.5;\n" " line-height: 1.3;\n"
"}\n" "}\n"
"\n" "\n"
"/* @group Heading Levels */\n" "/* @group Heading Levels */\n"
...@@ -122,11 +122,11 @@ ...@@ -122,11 +122,11 @@
"a.elRef {\n" "a.elRef {\n"
"}\n" "}\n"
"\n" "\n"
"a.code {\n" "a.code, a.code:visited {\n"
" color: #4665A2; \n" " color: #4665A2; \n"
"}\n" "}\n"
"\n" "\n"
"a.codeRef {\n" "a.codeRef, a.codeRef:visited {\n"
" color: #4665A2; \n" " color: #4665A2; \n"
"}\n" "}\n"
"\n" "\n"
......
...@@ -800,7 +800,7 @@ void FileDef::writeSource(OutputList &ol) ...@@ -800,7 +800,7 @@ void FileDef::writeSource(OutputList &ol)
else else
{ {
startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible, startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,
!generateTreeView,getOutputFileBase()); FALSE,getOutputFileBase());
startTitle(ol,getSourceFileBase()); startTitle(ol,getSourceFileBase());
ol.parseText(title); ol.parseText(title);
endTitle(ol,getSourceFileBase(),0); endTitle(ol,getSourceFileBase(),0);
......
...@@ -2707,7 +2707,7 @@ void HtmlGenerator::startContents() ...@@ -2707,7 +2707,7 @@ void HtmlGenerator::startContents()
void HtmlGenerator::endContents() void HtmlGenerator::endContents()
{ {
t << "</div>" << endl; t << "</div><!-- contents -->" << endl;
} }
void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli) void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli)
...@@ -2927,7 +2927,7 @@ void HtmlGenerator::endTitleHead(const char *,const char *) ...@@ -2927,7 +2927,7 @@ void HtmlGenerator::endTitleHead(const char *,const char *)
void HtmlGenerator::endHeaderSection() void HtmlGenerator::endHeaderSection()
{ {
t << "</div>" << endl; t << "</div><!--header-->" << endl;
} }
void HtmlGenerator::startInlineHeader() void HtmlGenerator::startInlineHeader()
......
...@@ -303,14 +303,14 @@ void startFile(OutputList &ol,const char *name,const char *manName, ...@@ -303,14 +303,14 @@ void startFile(OutputList &ol,const char *name,const char *manName,
} }
} }
void endFile(OutputList &ol,bool skipNavIndex) void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents)
{ {
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
if (!skipNavIndex) if (!skipNavIndex)
{ {
ol.endContents(); if (!skipEndContents) ol.endContents();
ol.writeSearchInfo(); ol.writeSearchInfo();
if (generateTreeView) if (generateTreeView)
{ {
...@@ -331,7 +331,7 @@ void endFileWithNavPath(Definition *d,OutputList &ol) ...@@ -331,7 +331,7 @@ void endFileWithNavPath(Definition *d,OutputList &ol)
{ {
d->writeNavigationPath(ol); d->writeNavigationPath(ol);
} }
endFile(ol,generateTreeView); endFile(ol,generateTreeView,TRUE);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
......
...@@ -257,7 +257,7 @@ void endTitle(OutputList &ol,const char *fileName,const char *name); ...@@ -257,7 +257,7 @@ void endTitle(OutputList &ol,const char *fileName,const char *name);
void startFile(OutputList &ol,const char *name,const char *manName, void startFile(OutputList &ol,const char *name,const char *manName,
const char *title,HighlightedItem hli=HLI_None, const char *title,HighlightedItem hli=HLI_None,
bool additionalIndices=FALSE,const char *altSidebarName=0); bool additionalIndices=FALSE,const char *altSidebarName=0);
void endFile(OutputList &ol,bool skipNavIndex=FALSE); void endFile(OutputList &ol,bool skipNavIndex=FALSE,bool skipEndContents=FALSE);
void endFileWithNavPath(Definition *d,OutputList &ol); void endFileWithNavPath(Definition *d,OutputList &ol);
void initClassMemberIndices(); void initClassMemberIndices();
......
...@@ -1742,7 +1742,10 @@ bool MemberDef::isDetailedSectionLinkable() const ...@@ -1742,7 +1742,10 @@ bool MemberDef::isDetailedSectionLinkable() const
) )
); );
return ((docFilter && staticFilter && privateFilter && friendCompoundFilter && !isHidden()) /*|| inAnonymousScope*/);
bool result = ((docFilter && staticFilter && privateFilter && friendCompoundFilter && !isHidden()));
//printf("%s::isDetailedSectionLinkable: %d\n",name().data(),result);
return result;
} }
bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
...@@ -1757,8 +1760,10 @@ bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const ...@@ -1757,8 +1760,10 @@ bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter && bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter &&
!isReference(); !isReference();
//printf("MemberDef::isDetailedSectionVisible() %d\n",visible); bool result = visible || simpleFilter;
return visible || simpleFilter; //printf("%s::isDetailedSectionVisble: %d groupFilter=%d fileFilter=%d\n",
// name().data(),result,groupFilter,fileFilter);
return result;
} }
/*! Writes the "detailed documentation" section of this member to /*! Writes the "detailed documentation" section of this member to
......
...@@ -191,7 +191,7 @@ void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile, ...@@ -191,7 +191,7 @@ void writeMscImageMapFromFile(FTextStream &t,const QCString &inFile,
QCString mapName = baseName+".map"; QCString mapName = baseName+".map";
QCString mapFile = inFile+".map"; QCString mapFile = inFile+".map";
t << "<img src=\"" << relPath << baseName << ".png\" alt=\"" t << "<img src=\"" << relPath << baseName << ".png\" alt=\""
<< baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl; << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>" << endl;
QCString imap = getMscImageMapFromFile(inFile,outDir,relPath,context); QCString imap = getMscImageMapFromFile(inFile,outDir,relPath,context);
t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>" << endl; t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>" << endl;
} }
......
...@@ -22,16 +22,10 @@ ...@@ -22,16 +22,10 @@
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#ifdef CACHE_STATS
int ObjCache::misses = 0;
int ObjCache::hits = 0;
#endif
//----------------------------------------------------------------------
ObjCache::ObjCache(unsigned int logSize) ObjCache::ObjCache(unsigned int logSize)
: m_head(-1), m_tail(-1), //m_numEntries(0), : m_head(-1), m_tail(-1), //m_numEntries(0),
m_size(1<<logSize), m_freeHashNodes(0), m_freeCacheNodes(0), m_lastHandle(-1) m_size(1<<logSize), m_count(0), m_freeHashNodes(0), m_freeCacheNodes(0),
m_lastHandle(-1)
{ {
int i; int i;
m_cache = new CacheNode[m_size]; m_cache = new CacheNode[m_size];
...@@ -42,6 +36,8 @@ ObjCache::ObjCache(unsigned int logSize) ...@@ -42,6 +36,8 @@ ObjCache::ObjCache(unsigned int logSize)
m_hash[i].nextHash = i+1; m_hash[i].nextHash = i+1;
m_cache[i].next = i+1; m_cache[i].next = i+1;
} }
m_misses = 0;
m_hits = 0;
} }
ObjCache::~ObjCache() ObjCache::~ObjCache()
...@@ -61,9 +57,7 @@ int ObjCache::add(void *obj,void **victim) ...@@ -61,9 +57,7 @@ int ObjCache::add(void *obj,void **victim)
{ {
//printf("moveToFront=%d\n",hnode->index); //printf("moveToFront=%d\n",hnode->index);
moveToFront(hnode->index); moveToFront(hnode->index);
#ifdef CACHE_STATS m_hits++;
hits++;
#endif
} }
else // object not in the cache. else // object not in the cache.
{ {
...@@ -86,6 +80,7 @@ int ObjCache::add(void *obj,void **victim) ...@@ -86,6 +80,7 @@ int ObjCache::add(void *obj,void **victim)
m_cache[m_head].prev = index; m_cache[m_head].prev = index;
} }
m_head = index; m_head = index;
m_count++;
} }
else // cache full -> replace element in the cache else // cache full -> replace element in the cache
{ {
...@@ -99,9 +94,7 @@ int ObjCache::add(void *obj,void **victim) ...@@ -99,9 +94,7 @@ int ObjCache::add(void *obj,void **victim)
hnode = hashInsert(obj); hnode = hashInsert(obj);
hnode->index = m_head; hnode->index = m_head;
*victim = lruObj; *victim = lruObj;
#ifdef CACHE_STATS m_misses++;
misses++;
#endif
} }
return m_head; return m_head;
} }
...@@ -121,6 +114,7 @@ void ObjCache::del(int index) ...@@ -121,6 +114,7 @@ void ObjCache::del(int index)
m_cache[index].prev=-1; m_cache[index].prev=-1;
m_cache[index].next = m_freeCacheNodes; m_cache[index].next = m_freeCacheNodes;
m_freeCacheNodes = index; m_freeCacheNodes = index;
m_count--;
} }
#ifdef CACHE_DEBUG #ifdef CACHE_DEBUG
...@@ -151,7 +145,7 @@ void ObjCache::printLRU() ...@@ -151,7 +145,7 @@ void ObjCache::printLRU()
#define cache_stats_printf printf #define cache_stats_printf printf
void ObjCache::printStats() void ObjCache::printStats()
{ {
cache_stats_printf("ObjCache: hits=%d misses=%d hit ratio=%f\n",hits,misses,hits*100.0/(hits+misses)); cache_stats_printf("ObjCache: hits=%d misses=%d hit ratio=%f\n",m_hits,m_misses,m_hits*100.0/(m_hits+m_misses));
} }
#endif #endif
......
...@@ -71,9 +71,9 @@ class ObjCache ...@@ -71,9 +71,9 @@ class ObjCache
*/ */
void use(int handle) void use(int handle)
{ {
hits++;
if (handle==m_lastHandle) return; if (handle==m_lastHandle) return;
m_lastHandle = handle; m_lastHandle = handle;
m_hits++;
moveToFront(handle); moveToFront(handle);
} }
...@@ -87,6 +87,22 @@ class ObjCache ...@@ -87,6 +87,22 @@ class ObjCache
/*! Print miss/hits statistics */ /*! Print miss/hits statistics */
void printStats(); void printStats();
/*! total size of the cache */
int size() const { return m_size; }
/*! number of elements in the cache */
int count() const { return m_count; }
int hits() const
{
return m_hits;
}
int misses() const
{
return m_misses;
}
private: private:
void moveToFront(int index); void moveToFront(int index);
unsigned int hash(void *addr); unsigned int hash(void *addr);
...@@ -99,14 +115,12 @@ class ObjCache ...@@ -99,14 +115,12 @@ class ObjCache
int m_head; int m_head;
int m_tail; int m_tail;
int m_size; int m_size;
int m_count;
int m_freeHashNodes; int m_freeHashNodes;
int m_freeCacheNodes; int m_freeCacheNodes;
int m_lastHandle; int m_lastHandle;
int m_misses;
#ifdef CACHE_STATS int m_hits;
static int misses;
static int hits;
#endif
}; };
#endif // OBJCACHE_H #endif // OBJCACHE_H
......
...@@ -139,19 +139,19 @@ class DefineManager ...@@ -139,19 +139,19 @@ class DefineManager
{ {
if (fileName==0) return; if (fileName==0) return;
//printf("DefineManager::addDefine(%s,%s)\n",fileName,def->name.data()); //printf("DefineManager::addDefine(%s,%s)\n",fileName,def->name.data());
DefinesPerFile *dpf = m_fileMap.find(fileName);
if (dpf==0)
{
dpf = new DefinesPerFile;
}
dpf->addDefine(def);
Define *d = m_contextDefines.find(def->name); Define *d = m_contextDefines.find(def->name);
if (d!=0) // redefine if (d!=0) // redefine
{ {
m_contextDefines.remove(d->name); m_contextDefines.remove(d->name);
} }
m_contextDefines.insert(def->name,def); m_contextDefines.insert(def->name,def);
DefinesPerFile *dpf = m_fileMap.find(fileName);
if (dpf==0)
{
dpf = new DefinesPerFile;
}
dpf->addDefine(def);
} }
void addInclude(const char *fromFileName,const char *toFileName) void addInclude(const char *fromFileName,const char *toFileName)
{ {
...@@ -1468,6 +1468,7 @@ static void readIncludeFile(const QCString &inc) ...@@ -1468,6 +1468,7 @@ static void readIncludeFile(const QCString &inc)
} }
//printf( "absIncFileName = %s\n", absIncFileName.data() ); //printf( "absIncFileName = %s\n", absIncFileName.data() );
} }
s=includePath.next();
} }
} }
//printf( "absIncFileName = %s\n", absIncFileName.data() ); //printf( "absIncFileName = %s\n", absIncFileName.data() );
......
...@@ -135,6 +135,7 @@ static void initEntry() ...@@ -135,6 +135,7 @@ static void initEntry()
current->lang = SrcLangExt_Python; current->lang = SrcLangExt_Python;
current->setParent(current_root); current->setParent(current_root);
initGroupInfo(current); initGroupInfo(current);
gstat = FALSE;
} }
static void newEntry() static void newEntry()
...@@ -333,6 +334,7 @@ static void handleCommentBlock(const QCString &doc,bool brief) ...@@ -333,6 +334,7 @@ static void handleCommentBlock(const QCString &doc,bool brief)
static void endOfDef(int correction=0) static void endOfDef(int correction=0)
{ {
//printf("endOfDef at=%d\n",yyLineNr);
if (bodyEntry) if (bodyEntry)
{ {
bodyEntry->endBodyLine = yyLineNr-correction; bodyEntry->endBodyLine = yyLineNr-correction;
...@@ -388,13 +390,15 @@ static void searchFoundDef() ...@@ -388,13 +390,15 @@ static void searchFoundDef()
current->protection = protection = Public; current->protection = protection = Public;
current->lang = SrcLangExt_Python; current->lang = SrcLangExt_Python;
current->virt = Normal; current->virt = Normal;
current->stat = FALSE; current->stat = gstat;
current->mtype = mtype = Method; current->mtype = mtype = Method;
current->type.resize(0); current->type.resize(0);
current->name.resize(0); current->name.resize(0);
current->args.resize(0); current->args.resize(0);
current->argList->clear(); current->argList->clear();
g_packageCommentAllowed = FALSE; g_packageCommentAllowed = FALSE;
gstat=FALSE;
//printf("searchFoundDef at=%d\n",yyLineNr);
} }
static void searchFoundClass() static void searchFoundClass()
...@@ -583,7 +587,9 @@ STARTDOCSYMS "##" ...@@ -583,7 +587,9 @@ STARTDOCSYMS "##"
g_packageCommentAllowed = FALSE; g_packageCommentAllowed = FALSE;
BEGIN( DoubleQuoteString ); BEGIN( DoubleQuoteString );
} }
"@staticmethod" {
gstat=TRUE;
}
{POUNDCOMMENT} { // normal comment {POUNDCOMMENT} { // normal comment
g_packageCommentAllowed = FALSE; g_packageCommentAllowed = FALSE;
} }
......
...@@ -2460,7 +2460,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) ...@@ -2460,7 +2460,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
initEntry(); initEntry();
BEGIN(FindMembers); BEGIN(FindMembers);
} }
else if (*yytext==';' || lastInitializerContext==FindFields) else if (*yytext==';' || (lastInitializerContext==FindFields && initBracketCount==0)) // initBracketCount==0 was added for bug 665778
{ {
unput(*yytext); unput(*yytext);
BEGIN(lastInitializerContext); BEGIN(lastInitializerContext);
......
...@@ -492,7 +492,7 @@ static QDict<MemberDef> g_resolvedTypedefs; ...@@ -492,7 +492,7 @@ static QDict<MemberDef> g_resolvedTypedefs;
static QDict<Definition> g_visitedNamespaces; static QDict<Definition> g_visitedNamespaces;
// forward declaration // forward declaration
ClassDef *getResolvedClassRec(Definition *scope, static ClassDef *getResolvedClassRec(Definition *scope,
FileDef *fileScope, FileDef *fileScope,
const char *n, const char *n,
MemberDef **pTypeDef, MemberDef **pTypeDef,
...@@ -1276,7 +1276,7 @@ static void getResolvedSymbol(Definition *scope, ...@@ -1276,7 +1276,7 @@ static void getResolvedSymbol(Definition *scope,
* match against the input name. Can recursively call itself when * match against the input name. Can recursively call itself when
* resolving typedefs. * resolving typedefs.
*/ */
ClassDef *getResolvedClassRec(Definition *scope, static ClassDef *getResolvedClassRec(Definition *scope,
FileDef *fileScope, FileDef *fileScope,
const char *n, const char *n,
MemberDef **pTypeDef, MemberDef **pTypeDef,
...@@ -1374,7 +1374,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1374,7 +1374,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
} }
*p='\0'; *p='\0';
LookupInfo *pval=Doxygen::lookupCache.find(key); LookupInfo *pval=Doxygen::lookupCache->find(key);
//printf("Searching for %s result=%p\n",key.data(),pval); //printf("Searching for %s result=%p\n",key.data(),pval);
if (pval) if (pval)
{ {
...@@ -1393,7 +1393,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1393,7 +1393,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
else // not found yet; we already add a 0 to avoid the possibility of else // not found yet; we already add a 0 to avoid the possibility of
// endless recursion. // endless recursion.
{ {
Doxygen::lookupCache.insert(key,new LookupInfo); Doxygen::lookupCache->insert(key,new LookupInfo);
} }
ClassDef *bestMatch=0; ClassDef *bestMatch=0;
...@@ -1439,7 +1439,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1439,7 +1439,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
//printf("getResolvedClassRec: bestMatch=%p pval->resolvedType=%s\n", //printf("getResolvedClassRec: bestMatch=%p pval->resolvedType=%s\n",
// bestMatch,bestResolvedType.data()); // bestMatch,bestResolvedType.data());
pval=Doxygen::lookupCache.find(key); pval=Doxygen::lookupCache->find(key);
if (pval) if (pval)
{ {
pval->classDef = bestMatch; pval->classDef = bestMatch;
...@@ -1449,7 +1449,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ...@@ -1449,7 +1449,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
} }
else else
{ {
Doxygen::lookupCache.insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec,bestResolvedType)); Doxygen::lookupCache->insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec,bestResolvedType));
} }
//printf("] bestMatch=%s distance=%d\n", //printf("] bestMatch=%s distance=%d\n",
// bestMatch?bestMatch->name().data():"<none>",minDistance); // bestMatch?bestMatch->name().data():"<none>",minDistance);
...@@ -7203,7 +7203,7 @@ QCString langToString(SrcLangExt lang) ...@@ -7203,7 +7203,7 @@ QCString langToString(SrcLangExt lang)
/** Returns the scope separator to use given the programming language \a lang */ /** Returns the scope separator to use given the programming language \a lang */
QCString getLanguageSpecificSeparator(SrcLangExt lang) QCString getLanguageSpecificSeparator(SrcLangExt lang)
{ {
if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp || lang==SrcLangExt_VHDL) if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp || lang==SrcLangExt_VHDL || lang==SrcLangExt_Python)
{ {
return "."; return ".";
} }
......
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