From d3c3bbd02543280d12a763d82aa5b54ce516c57f Mon Sep 17 00:00:00 2001 From: dimitri Date: Thu, 17 Jun 2004 19:53:53 +0000 Subject: Release-1.3.7-20040617 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- addon/doxywizard/doxywizard.cpp | 3 +- doc/commands.doc | 11 +---- doc/config.doc | 16 +++---- doc/faq.doc | 4 +- doc/language.doc | 61 ++++++++++++------------ doc/translator.py | 81 ++++++++++++++++++++++++++++++-- examples/relates.cpp | 1 - packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 45 ++++++++++++------ src/classdef.h | 7 +++ src/code.l | 28 ++++++++++- src/compound.xsd | 5 +- src/compound_xsd.h | 5 +- src/config.h | 10 +++- src/config.l | 24 ++++++---- src/docparser.cpp | 11 ++++- src/doctokenizer.l | 7 ++- src/doxygen.cpp | 5 +- src/filedef.cpp | 6 +-- src/htmlgen.cpp | 22 ++++----- src/index.cpp | 101 +++++++++++++++++++++------------------- src/namespacedef.cpp | 13 +++--- src/scanner.l | 51 ++++++++++++++++++-- src/translator.h | 6 +++ src/translator_adapter.h | 12 ++++- src/translator_br.h | 2 +- src/translator_cz.h | 2 +- src/translator_de.h | 2 +- src/translator_dk.h | 2 +- src/translator_en.h | 11 +++++ src/translator_fr.h | 2 +- src/translator_hr.h | 2 +- src/translator_hu.h | 2 +- src/translator_it.h | 2 +- src/translator_kr.h | 2 +- src/translator_lt.h | 2 +- src/translator_nl.h | 2 +- src/translator_ru.h | 45 +++++++++--------- src/translator_sr.h | 2 +- src/translator_tw.h | 2 +- src/xmlgen.cpp | 51 ++++++++++++++------ wintools/make.pl | 6 +-- 45 files changed, 465 insertions(+), 221 deletions(-) diff --git a/INSTALL b/INSTALL index 0138680..afdf0b9 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ -DOXYGEN Version 1.3.7-20040526 +DOXYGEN Version 1.3.7-20040617 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (26 May 2004) +Dimitri van Heesch (17 June 2004) diff --git a/README b/README index 55d9776..554b510 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.3.7_20040526 +DOXYGEN Version 1.3.7_20040617 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (26 May 2004) +Dimitri van Heesch (dimitri@stack.nl) (17 June 2004) diff --git a/VERSION b/VERSION index 658b5e1..e6b82f0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.7-20040526 +1.3.7-20040617 diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 799fe4f..e92509a 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -89,7 +89,8 @@ static bool saveConfig( QString saveFile ) return FALSE; // failure } - Config::instance()->writeTemplate(&f,TRUE,FALSE); // write brief config file + QTextStream t(&f); + Config::instance()->writeTemplate(t,TRUE,FALSE); // write brief config file return TRUE; // success } diff --git a/doc/commands.doc b/doc/commands.doc index 932f83f..652f2ce 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -440,11 +440,11 @@ doxygen. Unrecognized commands are treated as normal text. \verbatim /*! \mainpage My Personal Index Page * - * \section intro Introduction + * \section intro_sec Introduction * * This is the introduction. * - * \section install Installation + * \section install_sec Installation * * \subsection step1 Step 1: Opening the box * @@ -603,13 +603,6 @@ See section \ref memgroup for an example. non-friend functions that are nevertheless strongly coupled to a certain class. It only works for functions. - \par Example: - \verbinclude relates.cpp - \htmlonly - Click here - for the corresponding HTML documentation that is generated by doxygen. - \endhtmlonly -
\section cmdshowinitializer \showinitializer diff --git a/doc/config.doc b/doc/config.doc index a465086..f71e636 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -359,14 +359,6 @@ followed by the descriptions of the tags grouped by category. (but less readable) file names. This can be useful is your file systems doesn't support long names like on DOS, Mac, or CD-ROM. -\anchor cfg_verbatim_headers -
\c VERBATIM_HEADERS
- \addindex VERBATIM_HEADERS - If the \c VERBATIM_HEADERS tag is set the \c YES (the default) then doxygen - will generate a verbatim copy of the header file for each class for - which an include is specified. Set to NO to disable this. - \sa Section \ref cmdclass "\\class". - \anchor cfg_javadoc_autobrief
\c JAVADOC_AUTOBRIEF
\addindex JAVADOC_AUTOBRIEF @@ -830,6 +822,14 @@ function's detailed documentation block. then for each documented function all documented entities called/used by that function will be listed. +\anchor cfg_verbatim_headers +
\c VERBATIM_HEADERS
+ \addindex VERBATIM_HEADERS + If the \c VERBATIM_HEADERS tag is set the \c YES (the default) then doxygen + will generate a verbatim copy of the header file for each class for + which an include is specified. Set to NO to disable this. + \sa Section \ref cmdclass "\\class". + \section alphabetical_index Alphabetical index options diff --git a/doc/faq.doc b/doc/faq.doc index 646d43a..af779ae 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -23,11 +23,11 @@ You should use the \\mainpage command inside a comment block like this: \verbatim /*! \mainpage My Personal Index Page * - * \section intro Introduction + * \section intro_sec Introduction * * This is the introduction. * - * \section install Installation + * \section install_sec Installation * * \subsection step1 Step 1: Opening the box * diff --git a/doc/language.doc b/doc/language.doc index 595a75c..0f94ac5 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -23,13 +23,12 @@ text fragments, generated by doxygen, can be produced in languages other than English (the default). The output language is chosen through the configuration file (with default name and known as Doxyfile). -Currently (version 1.3.7), 29 languages +Currently (version 1.3.7-20040616), 29 languages are supported (sorted alphabetically): Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hungarian, Italian, Japanese (+En), Korean (+En), Lithuanian, -Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, -Slovene, Spanish, Swedish, and Ukrainian.. +Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak,. The table of information related to the supported languages follows. It is sorted by language alphabetically. The Status column @@ -54,7 +53,7 @@ when the translator was updated. Brazilian Portuguese Fabio "FJTC" Jun Takada Chino chino@NOSPAM.icmc.sc.usp.br - up-to-date + 1.3.8 Catalan @@ -72,31 +71,31 @@ when the translator was updated. Chinese Traditional Daniel YC Lin
Gary Lee daniel@NOSPAM.twpda.com
garylee@NOSPAM.ecosine.com.tw - up-to-date + 1.3.8 Croatian Boris Bralo boris.bralo@NOSPAM.zg.tel.hr - up-to-date + 1.3.8 Czech Petr Přikryl prikrylp@NOSPAM.skil.cz - up-to-date + 1.3.8 Danish Erik Søe Sørensen erik@NOSPAM.mail.nu - up-to-date + 1.3.8 Dutch Dimitri van Heesch dimitri@NOSPAM.stack.nl - up-to-date + 1.3.8 English @@ -114,13 +113,13 @@ when the translator was updated. French Xavier Outhier xouthier@NOSPAM.yahoo.fr - up-to-date + 1.3.8 German Jens Seidel jensseidel@NOSPAM.users.sf.net - up-to-date + 1.3.8 Greek @@ -132,13 +131,13 @@ when the translator was updated. Hungarian Földvári György
Ákos Kiss foldvari@NOSPAM.diatronltd.com
akiss@NOSPAM.users.sourceforge.net - up-to-date + 1.3.8 Italian Alessandro Falappa
Ahmed Aldo Faisal alessandro@NOSPAM.falappa.net
aaf23@NOSPAM.cam.ac.uk - up-to-date + 1.3.8 Japanese @@ -156,7 +155,7 @@ when the translator was updated. Korean Richard Kim ryk@NOSPAM.dspwiz.com - up-to-date + 1.3.8 KoreanEn @@ -168,7 +167,7 @@ when the translator was updated. Lithuanian Tomas Simonaitis
Mindaugas Radzius
Aidas Berukstis haden@NOSPAM.homelan.lt
mindaugasradzius@NOSPAM.takas.lt
aidasber@NOSPAM.takas.lt - up-to-date + 1.3.8 Norwegian @@ -204,7 +203,7 @@ when the translator was updated. Serbian Dejan Milosavljevic dmilos@NOSPAM.email.com - up-to-date + 1.3.8 Slovak @@ -222,7 +221,7 @@ when the translator was updated. Spanish Francisco Oltra Thennet foltra@NOSPAM.puc.cl - up-to-date + 1.3.08 Swedish @@ -251,38 +250,38 @@ when the translator was updated. \hline \hline - Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny chino@icmc.sc.usp.br} & up-to-date \\ + Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt\tiny chino@icmc.sc.usp.br} & 1.3.8 \\ \hline Catalan & Albert Mora & {\tt\tiny amora@iua.upf.es} & 1.2.17 \\ \hline Chinese & Wei Liu & {\tt\tiny liuwei@asiainfo.com} & 1.2.13 \\ ~ & Wang Weihan & {\tt\tiny wangweihan@capinfo.com.cn} & ~ \\ \hline - Chinese Traditional & Daniel YC Lin & {\tt\tiny daniel@twpda.com} & up-to-date \\ + Chinese Traditional & Daniel YC Lin & {\tt\tiny daniel@twpda.com} & 1.3.8 \\ ~ & Gary Lee & {\tt\tiny garylee@ecosine.com.tw} & ~ \\ \hline - Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.tel.hr} & up-to-date \\ + Croatian & Boris Bralo & {\tt\tiny boris.bralo@zg.tel.hr} & 1.3.8 \\ \hline - Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & up-to-date \\ + Czech & Petr P\v{r}ikryl & {\tt\tiny prikrylp@skil.cz} & 1.3.8 \\ \hline - Danish & Erik S\o{}e S\o{}rensen & {\tt\tiny erik@mail.nu} & up-to-date \\ + Danish & Erik S\o{}e S\o{}rensen & {\tt\tiny erik@mail.nu} & 1.3.8 \\ \hline - Dutch & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & up-to-date \\ + Dutch & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & 1.3.8 \\ \hline English & Dimitri van Heesch & {\tt\tiny dimitri@stack.nl} & up-to-date \\ \hline Finnish & Olli Korhonen & {\tt\tiny Olli.Korhonen@ccc.fi} & obsolete \\ \hline - French & Xavier Outhier & {\tt\tiny xouthier@yahoo.fr} & up-to-date \\ + French & Xavier Outhier & {\tt\tiny xouthier@yahoo.fr} & 1.3.8 \\ \hline - German & Jens Seidel & {\tt\tiny jensseidel@users.sf.net} & up-to-date \\ + German & Jens Seidel & {\tt\tiny jensseidel@users.sf.net} & 1.3.8 \\ \hline Greek & Harry Kalogirou & {\tt\tiny harkal@rainbow.cs.unipi.gr} & 1.2.11 \\ \hline - Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt\tiny foldvari@diatronltd.com} & up-to-date \\ + Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt\tiny foldvari@diatronltd.com} & 1.3.8 \\ ~ & \'{A}kos Kiss & {\tt\tiny akiss@users.sourceforge.net} & ~ \\ \hline - Italian & Alessandro Falappa & {\tt\tiny alessandro@falappa.net} & up-to-date \\ + Italian & Alessandro Falappa & {\tt\tiny alessandro@falappa.net} & 1.3.8 \\ ~ & Ahmed Aldo Faisal & {\tt\tiny aaf23@cam.ac.uk} & ~ \\ \hline Japanese & Ryunosuke Satoh & {\tt\tiny sun594@hotmail.com} & 1.3.3 \\ @@ -290,11 +289,11 @@ when the translator was updated. \hline JapaneseEn & see the Japanese language & {\tt\tiny ~} & English based \\ \hline - Korean & Richard Kim & {\tt\tiny ryk@dspwiz.com} & up-to-date \\ + Korean & Richard Kim & {\tt\tiny ryk@dspwiz.com} & 1.3.8 \\ \hline KoreanEn & see the Korean language & {\tt\tiny ~} & English based \\ \hline - Lithuanian & Tomas Simonaitis & {\tt\tiny haden@homelan.lt} & up-to-date \\ + Lithuanian & Tomas Simonaitis & {\tt\tiny haden@homelan.lt} & 1.3.8 \\ ~ & Mindaugas Radzius & {\tt\tiny mindaugasradzius@takas.lt} & ~ \\ ~ & Aidas Berukstis & {\tt\tiny aidasber@takas.lt} & ~ \\ \hline @@ -309,13 +308,13 @@ when the translator was updated. \hline Russian & Alexandr Chelpanov & {\tt\tiny cav@cryptopro.ru} & up-to-date \\ \hline - Serbian & Dejan Milosavljevic & {\tt\tiny dmilos@email.com} & up-to-date \\ + Serbian & Dejan Milosavljevic & {\tt\tiny dmilos@email.com} & 1.3.8 \\ \hline Slovak & Stanislav Kudl\'{a}\v{c} & {\tt\tiny skudlac@pobox.sk} & 1.2.18 \\ \hline Slovene & Matjaz Ostroversnik & {\tt\tiny matjaz.ostroversnik@zrs-tk.si} & 1.2.16 \\ \hline - Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & up-to-date \\ + Spanish & Francisco Oltra Thennet & {\tt\tiny foltra@puc.cl} & 1.3.08 \\ \hline Swedish & Mikael Hallin & {\tt\tiny mikaelhallin@yahoo.se} & 1.3.3 \\ \hline diff --git a/doc/translator.py b/doc/translator.py index 8a8b99f..c3527a8 100644 --- a/doc/translator.py +++ b/doc/translator.py @@ -40,17 +40,90 @@ content should be more useful for developers. 2004/02/11 - Some tuning-up to provide more useful information. 2004/04/16 - Added new tokens to the tokenizer (to remove some warnings). + 2004/05/25 - Added from __future__ import generators not to force Python 2.3. + 2004/06/03 - Removed dependency on textwrap module. """ -import os, re, sys, textwrap +from __future__ import generators +import os, re, sys def fill(s): """Returns string formated to the wrapped paragraph multiline string. Replaces whitespaces by one space and then uses he textwrap.fill().""" + + # Replace all whitespace by spaces, remove whitespaces that are not + # necessary, strip the left and right whitespaces, and break the string + # to list of words. rexWS = re.compile(r'\s+') - return textwrap.fill(rexWS.sub(' ', s)) + lst = rexWS.sub(' ', s).strip().split() + + # If the list is not empty, put the words together and form the lines + # of maximum 70 characters. Build the list of lines. + lines = [] + if lst: + line = lst.pop(0) # no separation space in front of the first word + for word in lst: + if len(line) + len(word) < 70: + line += ' ' + word + else: + lines.append(line) # another full line formed + line = word # next line started + + return '\n'.join(lines) + + +# The following function dedent() is the verbatim copy from the textwrap.py +# module. The textwrap.py was introduced in Python 2.3. To make this script +# working also in older Python versions, I have decided to copy it. +# Notice that the textwrap.py is copyrighted: +# +# Copyright (C) 1999-2001 Gregory P. Ward. +# Copyright (C) 2002, 2003 Python Software Foundation. +# Written by Greg Ward +# +# The explicit permission to use the code here was sent by Guido van Rossum +# (4th June, 2004). +# +def dedent(text): + """dedent(text : string) -> string + + Remove any whitespace than can be uniformly removed from the left + of every line in `text`. + + This can be used e.g. to make triple-quoted strings line up with + the left edge of screen/whatever, while still presenting it in the + source code in indented form. + + For example: + + def test(): + # end first line with \ to avoid the empty line! + s = '''\ + hello + world + ''' + print repr(s) # prints ' hello\n world\n ' + print repr(dedent(s)) # prints 'hello\n world\n' + """ + lines = text.expandtabs().split('\n') + margin = None + for line in lines: + content = line.lstrip() + if not content: + continue + indent = len(line) - len(content) + if margin is None: + margin = indent + else: + margin = min(margin, indent) + + if margin is not None and margin > 0: + for i in range(len(lines)): + lines[i] = lines[i][margin:] + + return '\n'.join(lines) class Transl: @@ -1521,7 +1594,7 @@ class TrManager: \\endhtmlonly ''' - htmlTableTpl = textwrap.dedent(htmlTableTpl) + htmlTableTpl = dedent(htmlTableTpl) htmlTrTpl = '\n %s\n ' htmlTdTpl = '\n %s' @@ -1585,7 +1658,7 @@ class TrManager: \end{tabular} \endlatexonly ''' - latexTableTpl = textwrap.dedent(latexTableTpl) + latexTableTpl = dedent(latexTableTpl) latexLineTpl = '\n' + r' %s & %s & {\tt\tiny %s} & %s \\' # Loop through transl objects in the order of sorted readable names diff --git a/examples/relates.cpp b/examples/relates.cpp index d5e483d..c6f7dc9 100644 --- a/examples/relates.cpp +++ b/examples/relates.cpp @@ -18,7 +18,6 @@ int strcmp(const String &s1,const String &s2) /*! \relates String * A string debug function. */ - void stringDebug() { } diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 625b268..07d5f4d 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,6 +1,6 @@ Summary: A documentation system for C/C++. Name: doxygen -Version: 1.3.7_20040526 +Version: 1.3.7_20040617 Release: 1 Epoch: 1 Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index a30a774..31555b4 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -86,6 +86,7 @@ ClassDef::ClassDef( m_innerClasses = new ClassSDict(17); m_subGrouping=Config_getBool("SUBGROUPING"); m_templateInstances = 0; + m_variableInstances = 0; m_templateMaster =0; m_templBaseClassNames = 0; m_artificial = FALSE; @@ -123,6 +124,7 @@ ClassDef::~ClassDef() delete memberGroupSDict; delete m_innerClasses; delete m_templateInstances; + delete m_variableInstances; delete m_templBaseClassNames; delete m_tempArgs; } @@ -937,21 +939,16 @@ void ClassDef::writeDetailedDescription(OutputList &ol, const QCString &pageType // write all documentation for this class void ClassDef::writeDocumentation(OutputList &ol) { - // write title - QCString pageTitle=displayName().copy(); - QCString pageType; - QCString cType=compoundTypeString(); - //printf("ClassDef::writeDocumentation() cType=%s\n",cType.data()); - toupper(cType.at(0)); - pageType+=" "; - pageType+=cType; - pageTitle+=pageType+" Reference"; - if (m_tempArgs) pageTitle.prepend(" Template"); - startFile(ol,getOutputFileBase(),name(),pageTitle); + QCString pageType = " "; + pageType += compoundTypeString(); + toupper(pageType.at(1)); + QCString pageTitle = theTranslator->trCompoundReference(displayName(), + m_compType == Interface && m_isObjC ? Class : m_compType, + m_tempArgs != 0); + + startFile(ol,getOutputFileBase(),name(),pageTitle); startTitle(ol,getOutputFileBase()); - ol.parseText(theTranslator->trCompoundReference(displayName(), - m_isObjC && m_compType==Interface ? Class : m_compType, - m_tempArgs!=0)); + ol.parseText(pageTitle); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),name()); @@ -2642,6 +2639,26 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName, return templateClass; } +ClassDef *ClassDef::getVariableInstance(const char *templSpec) +{ + if (m_variableInstances==0) + { + m_variableInstances = new QDict(17); + m_variableInstances->setAutoDelete(TRUE); + } + ClassDef *templateClass=m_variableInstances->find(templSpec); + if (templateClass==0) + { + Debug::print(Debug::Classes,0," New template variable instance class `%s'`%s'\n",name().data(),templSpec); + templateClass = new ClassDef("",1,name()+templSpec, + ClassDef::Class,0,0,FALSE); + templateClass->addMembersToTemplateInstance( this, templSpec ); + templateClass->setTemplateMaster(this); + m_variableInstances->insert(templSpec,templateClass); + } + return templateClass; +} + void ClassDef::setTemplateBaseClassNames(QDict *templateNames) { if (templateNames==0) return; diff --git a/src/classdef.h b/src/classdef.h index b82e603..418b3b7 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -290,6 +290,7 @@ class ClassDef : public Definition //QCString getTemplateArgumentMapping(const char *formal) const; ClassDef *insertTemplateInstance(const QCString &fileName,int startLine, const QCString &templSpec,bool &freshInstance); + ClassDef *getVariableInstance(const char *templSpec); void setTemplateBaseClassNames(QDict *templateNames); QDict *getTemplateBaseClassNames() const; void setTemplateMaster(ClassDef *tm) { m_templateMaster=tm; } @@ -416,6 +417,12 @@ class ClassDef : public Definition */ QDict *m_templateInstances; + /*! Template instances that exists of this class, as defined by variables. + * We do NOT want to document these individually. The key in the + * dictionary is the template argument list. + */ + QDict *m_variableInstances; + QDict *m_templBaseClassNames; /*! The class this class is an instance of. */ diff --git a/src/code.l b/src/code.l index 7e4d281..e42b1c8 100644 --- a/src/code.l +++ b/src/code.l @@ -227,8 +227,30 @@ void VariableContext::addVariable(const QCString &type,const QCString &name) } else if ((i=ltype.find('<'))!=-1) { - // probably a template class, try without template arguments as well - addVariable(ltype.left(i),name); + // probably a template class + QCString typeName(ltype.left(i)); + ClassDef* newDef = 0; + QCString templateArgs(ltype.right(ltype.length() - i)); + if ( + ( // look for class definitions inside the code block + (varType=g_codeClassSDict[typeName]) || + // otherwise look for global class definitions + (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,typeName)) + ) && // and it must be a template + varType->templateArguments()) + { + newDef = varType->getVariableInstance( templateArgs ); + } + if (newDef) + { + DBG_CTX((stderr,"** addVariable type=%s templ=%s name=%s\n",typeName.data(),templateArgs.data(),lname.data())); + scope->append(lname, newDef); + } + else + { + // Doesn't seem to be a template. Try just the base name. + addVariable(typeName,name); + } } else // add a dummy entry so the name is hidden to avoid false links { @@ -914,6 +936,8 @@ static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const //printf("g_currentDefiniton=%p g_currentMemberDef=%p xmd=%p g_insideBody=%d\n",g_currentDefinition,g_currentMemberDef,xmd,g_insideBody); + if (xmd->templateMaster()) xmd = xmd->templateMaster(); + // add usage reference if (g_currentDefinition && g_currentMemberDef && xmd!=g_currentMemberDef && g_insideBody) diff --git a/src/compound.xsd b/src/compound.xsd index 6edff66..c5fea76 100644 --- a/src/compound.xsd +++ b/src/compound.xsd @@ -61,7 +61,7 @@ - + @@ -106,6 +106,7 @@ + @@ -156,9 +157,9 @@ + - diff --git a/src/compound_xsd.h b/src/compound_xsd.h index adf1a25..90409f7 100644 --- a/src/compound_xsd.h +++ b/src/compound_xsd.h @@ -61,7 +61,7 @@ " \n" " \n" " \n" -" \n" +" \n" " \n" " \n" " \n" @@ -106,6 +106,7 @@ " \n" " \n" " \n" +" \n" " \n" " \n" " \n" @@ -156,9 +157,9 @@ " \n" " \n" " \n" +" \n" " \n" " \n" -" \n" " \n" " \n" " \n" diff --git a/src/config.h b/src/config.h index 0201329..311bfb8 100644 --- a/src/config.h +++ b/src/config.h @@ -502,11 +502,11 @@ class Config } /*! @} */ - /*! Writes a template configuration file to \a f. If \a shortIndex + /*! Writes a template configuration to stream \a t. If \a shortIndex * is \c TRUE the description of each configuration option will * be omitted. */ - void writeTemplate(QFile *f,bool shortIndex,bool updateOnly); + void writeTemplate(QTextStream &t,bool shortIndex,bool updateOnly); ///////////////////////////// // internal API @@ -530,6 +530,12 @@ class Config /*! Initialize config variables to their default value */ void init(); + /*! Parse a configuration data in string \a str. + * \returns TRUE if successful, or FALSE if the string could not be + * parsed. + */ + bool parseString(const char *fn,const char *str); + /*! Parse a configuration file with name \a fn. * \returns TRUE if successful, FALSE if the file could not be * opened or read. diff --git a/src/config.l b/src/config.l index 7db22c9..59260ea 100644 --- a/src/config.l +++ b/src/config.l @@ -660,9 +660,8 @@ static void writeStringList(QTextStream &t,QStrList &l) } #endif -void Config::writeTemplate(QFile *f,bool sl,bool upd) +void Config::writeTemplate(QTextStream &t,bool sl,bool upd) { - QTextStream t(f); t << "# Doxyfile " << versionString << endl << endl; if (!sl) { @@ -1708,8 +1707,12 @@ void Config::create() "file names in lower-case letters. If set to YES upper-case letters are also \n" "allowed. This is useful if you have classes or files whose names only differ \n" "in case and if your file system supports case sensitive file names. Windows \n" - "users are advised to set this option to NO.\n", - TRUE + "and Mac users are advised to set this option to NO.\n", +#if defined(_WIN32) || defined(macintosh) || defined(__MACOSX__) || defined(__APPLE__) + FALSE // case insensitive file system expected +#else + TRUE // case sensitive file system expected +#endif ); cb = addBool( "HIDE_SCOPE_NAMES", @@ -2824,15 +2827,13 @@ static QCString configFileToString(const char *name) return ""; } - -bool Config::parse(const char *fn) +bool Config::parseString(const char *fn,const char *str) { - QCString contents = configFileToString(fn); config = Config::instance(); - inputString = contents.data(); + inputString = str; inputPosition = 0; + yyFileName = fn; yyLineNr = 1; - yyFileName=fn; includeStack.setAutoDelete(TRUE); includeStack.clear(); includeDepth = 0; @@ -2843,6 +2844,11 @@ bool Config::parse(const char *fn) return TRUE; } +bool Config::parse(const char *fn) +{ + return parseString(fn,configFileToString(fn)); +} + extern "C" { // some bogus code to keep the compiler happy //int configYYwrap() { return 1 ; } } diff --git a/src/docparser.cpp b/src/docparser.cpp index f810ce3..b324348 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -704,6 +704,7 @@ static void handleLinkedWord(DocNode *parent,QList &children) Definition *compound=0; MemberDef *member=0; QString name = linkToText(g_token->name,TRUE); + int len = g_token->name.length(); if (!g_insideHtmlLink && resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)) { @@ -733,7 +734,15 @@ static void handleLinkedWord(DocNode *parent,QList &children) ); } } - else // normal word + else if (!g_insideHtmlLink && g_token->name.at(len-1)==':') + { + // special case, where matching Foo: fails to be an Obj-C reference, + // but Foo itself might be linkable. + g_token->name=g_token->name.left(len-1); + handleLinkedWord(parent,children); + children.append(new DocWord(parent,":")); + } + else // normal non-linkable word { children.append(new DocWord(parent,g_token->name)); } diff --git a/src/doctokenizer.l b/src/doctokenizer.l index e445f55..638d30a 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -295,7 +295,9 @@ FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&] SCOPESEP "::"|"#"|"." SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP} SCOPEKEYS ":"({ID}":")* -SCOPEMASK {SCOPEPRE}*(~)?{ID}{SCOPEKEYS}?("<"{TEMPCHAR}*">")? +SCOPECPP {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")? +SCOPEOBJC {ID}{SCOPEKEYS}? +SCOPEMASK {SCOPECPP}|{SCOPEOBJC} FUNCARG "("{FUNCCHAR}*")" OPNEW {BLANK}+"new"({BLANK}*"[]")? OPDEL {BLANK}+"delete"({BLANK}*"[]")? @@ -462,6 +464,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* g_token->name = yytext; return TK_LNKWORD; } +{LNKWORD1}/"
" | // prevent
html tag to be parsed as template arguments {LNKWORD1} | {LNKWORD1}{FUNCARG} | {LNKWORD2} { @@ -794,7 +797,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* g_secType = SectionInfo::Paragraph; BEGIN(St_SecLabel2); } -{CMD}"verbatim"{BLANK}+ { +{CMD}"verbatim"/[^a-z_A-Z0-9] { g_endMarker="endverbatim"; BEGIN(St_SecSkip); } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 78040ca..9449a10 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -6586,7 +6586,7 @@ static void generateExampleDocs() { msg("Generating docs for example %s...\n",pd->name().data()); QCString n=pd->getOutputFileBase(); - startFile(*outputList,n,n,"Example Documentation"); + startFile(*outputList,n,n,pd->name()); startTitle(*outputList,n); outputList->docify(pd->name()); endTitle(*outputList,n,0); @@ -6849,7 +6849,8 @@ static void generateConfigFile(const char *configFile,bool shortList, bool writeToStdout=(configFile[0]=='-' && configFile[1]=='\0'); if (fileOpened) { - Config::instance()->writeTemplate(&f,shortList,updateOnly); + QTextStream t(&f); + Config::instance()->writeTemplate(t,shortList,updateOnly); if (!writeToStdout) { if (!updateOnly) diff --git a/src/filedef.cpp b/src/filedef.cpp index 33c418c..ad3a216 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -211,10 +211,10 @@ void FileDef::writeDocumentation(OutputList &ol) //printf("WriteDocumentation diskname=%s\n",diskname.data()); - QCString pageTitle=name()+" File Reference"; + QCString pageTitle=theTranslator->trFileReference(docname); startFile(ol,getOutputFileBase(),name(),pageTitle); startTitle(ol,getOutputFileBase()); - ol.parseText(theTranslator->trFileReference(docname)); + ol.parseText(pageTitle); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),docName()); //ol.newParagraph(); @@ -490,7 +490,7 @@ void FileDef::writeDocumentation(OutputList &ol) void FileDef::writeSource(OutputList &ol) { ol.disableAllBut(OutputGenerator::Html); - startFile(ol,getSourceFileBase(),0,docname+" Source File"); + startFile(ol,getSourceFileBase(),0,theTranslator->trSourceFile(docname)); startTitle(ol,0); ol.parseText(docname); endTitle(ol,0,0); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index ebe994c..5866c39 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -125,7 +125,7 @@ static const char *defaultStyleSheet = " font-weight: bold;\n" " font-family: Geneva, Arial, Helvetica, sans-serif;\n" "}\n" -"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n" +"DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }\n" "BODY {\n" " background: white;\n" " color: black;\n" @@ -179,10 +179,10 @@ static const char *defaultStyleSheet = " padding: 8px 10px;\n" "}\n" ".mdescLeft {\n" -" font-size: smaller;\n" +" padding: 0px 8px 4px 8px;\n" +" font-size: 14px;\n" " font-style: italic;\n" " background-color: #FAFAFA;\n" -" padding-left: 8px;\n" " border-top: 1px none #E0E0E0;\n" " border-right: 1px none #E0E0E0;\n" " border-bottom: 1px none #E0E0E0;\n" @@ -190,17 +190,15 @@ static const char *defaultStyleSheet = " margin: 0px;\n" "}\n" ".mdescRight {\n" -" font-size: smaller;\n" +" padding: 0px 8px 4px 8px;\n" +" font-size: 14px;\n" " font-style: italic;\n" " background-color: #FAFAFA;\n" -" padding-left: 4px;\n" " border-top: 1px none #E0E0E0;\n" " border-right: 1px none #E0E0E0;\n" " border-bottom: 1px none #E0E0E0;\n" " border-left: 1px none #E0E0E0;\n" " margin: 0px;\n" -" padding-bottom: 0px;\n" -" padding-right: 8px;\n" "}\n" ".memItemLeft {\n" " padding: 1px 0px 0px 8px;\n" @@ -222,7 +220,7 @@ static const char *defaultStyleSheet = " font-size: 12px;\n" "}\n" ".memItemRight {\n" -" padding: 1px 0px 0px 8px;\n" +" padding: 1px 8px 0px 8px;\n" " margin: 4px;\n" " border-top-width: 1px;\n" " border-right-width: 1px;\n" @@ -399,7 +397,7 @@ void HtmlGenerator::startFile(const char *name,const char *, } else { - t << substituteKeywords(g_header,convertToHtml(lastTitle),relPath); + t << substituteKeywords(g_header,convertToHtml(dispTitle),relPath); } t << "" << endl; @@ -906,11 +904,11 @@ void HtmlGenerator::endMemberDescription() DBG_HTML(t << "" << endl) if (Config_getBool("HTML_ALIGN_MEMBERS")) { - t << "

" << endl; + t << "
" << endl; } else { - t << "

"; + t << "
"; } } @@ -1498,7 +1496,7 @@ void HtmlGenerator::writeSearchPage() #endif if (g_header.isEmpty()) { - writeDefaultHeaderFile(t,"Search",0,FALSE); + writeDefaultHeaderFile(t,theTranslator->trSearch().data(),0,FALSE); } else { diff --git a/src/index.cpp b/src/index.cpp index 2a12120..77c01d6 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -731,7 +731,7 @@ void writeHierarchicalIndex(OutputList &ol) if (hierarchyClasses==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); - startFile(ol,"hierarchy",0,"Hierarchical Index",HLI_Hierarchy); + startFile(ol,"hierarchy",0, theTranslator->trHierarchicalIndex().data(), HLI_Hierarchy); startTitle(ol,0); QCString title = theTranslator->trClassHierarchy(); QCString htmlHelpTitle = title; @@ -782,9 +782,9 @@ void writeGraphicalClassHierarchy(OutputList &ol) { if (hierarchyClasses==0) return; ol.disableAllBut(OutputGenerator::Html); - startFile(ol,"inherits",0,"Graphical Class Hierarchy"); - startTitle(ol,0); QCString title = theTranslator->trGraphicalHierarchy(); + startFile(ol,"inherits",0,title.data()); + startTitle(ol,0); QCString htmlHelpTitle = title; QCString ftvHelpTitle = title; if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); @@ -861,7 +861,7 @@ void writeFileIndex(OutputList &ol) ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); if (documentedFiles==0) ol.disableAllBut(OutputGenerator::Html); - startFile(ol,"files",0,"File Index",HLI_Files); + startFile(ol,"files",0,theTranslator->trFileIndex().data(),HLI_Files); startTitle(ol,0); QCString title = theTranslator->trFileList(); QCString htmlHelpTitle = title; @@ -1068,12 +1068,12 @@ void writeNamespaceIndex(OutputList &ol) QCString title; if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) { - startFile(ol,"namespaces",0,"Package Index",HLI_Namespaces); + startFile(ol,"namespaces",0,theTranslator->trPackageList().data(),HLI_Namespaces); title = theTranslator->trPackageList(); } else { - startFile(ol,"namespaces",0,"Namespace Index",HLI_Namespaces); + startFile(ol,"namespaces",0,theTranslator->trNamespaceIndex().data(),HLI_Namespaces); title = theTranslator->trNamespaceList(); } startTitle(ol,0); @@ -1515,7 +1515,7 @@ void writeAlphabeticalIndex(OutputList &ol) if (annotatedClasses==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - startFile(ol,"classes"+Doxygen::htmlFileExtension,0,"Alphabetical index",HLI_Classes); + startFile(ol,"classes"+Doxygen::htmlFileExtension,0,theTranslator->trAlphabeticalList().data(),HLI_Classes); startTitle(ol,0); ol.parseText(Config_getString("PROJECT_NAME")+" "+theTranslator->trCompoundIndex()); endTitle(ol,0,0); @@ -1536,9 +1536,9 @@ void writeAnnotatedIndex(OutputList &ol) ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); - startFile(ol,"annotated",0,"Annotated Index",HLI_Annotated); - startTitle(ol,0); QCString title = theTranslator->trCompoundList(); + startFile(ol,"annotated",0,title.data(),HLI_Annotated); + startTitle(ol,0); QCString htmlHelpTitle = title; QCString ftvHelpTitle = title; if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); @@ -1652,14 +1652,14 @@ void writeMemberList(OutputList &ol,bool useSections,ClassMemberHighlight filter (cd=md->getClassDef()) && cd->isLinkableInProject() && cd->templateMaster()==0 && ( filter==CMHL_All && !(md->isFriend() && isFriendToHide) || - (filter==CMHL_Functions && (md->isFunction() || md->isSlot() || md->isSignal())) || + (filter==CMHL_Functions && (md->isFunction() || md->isSlot() || md->isSignal())) || (filter==CMHL_Variables && md->isVariable()) || (filter==CMHL_Typedefs && md->isTypedef()) || (filter==CMHL_Enums && md->isEnumerate()) || (filter==CMHL_EnumValues && md->isEnumValue()) || (filter==CMHL_Properties && md->isProperty()) || (filter==CMHL_Events && md->isEvent()) || - (filter==CMHL_Related && (md->isRelated() || (md->isFriend() && !isFriendToHide))) + (filter==CMHL_Related && (md->isRelated() || (md->isFriend() && !isFriendToHide))) ) ) { @@ -1801,13 +1801,13 @@ void writeQuickMemberIndex(OutputList &ol,bool *charUsed) //---------------------------------------------------------------------------- static void writeMemberIndexFiltered(OutputList &ol, - const char *fileName,ClassMemberHighlight hl) + const char *fileName,ClassMemberHighlight hl, + const QCString& title) { if (documentedClassMembers[hl]==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - startFile(ol,fileName,0,"Compound Member Index",HLI_Functions); - QCString title = theTranslator->trCompoundMembers(); + startFile(ol,fileName,0,title.data(),HLI_Functions); QCString htmlHelpTitle = title; QCString ftvHelpTitle = title; @@ -1908,15 +1908,18 @@ static void writeMemberIndexFiltered(OutputList &ol, void writeMemberIndex(OutputList &ol) { QCString ext=Doxygen::htmlFileExtension; - writeMemberIndexFiltered(ol,"functions"+ext,CMHL_All); - writeMemberIndexFiltered(ol,"functions_func"+ext,CMHL_Functions); - writeMemberIndexFiltered(ol,"functions_vars"+ext,CMHL_Variables); - writeMemberIndexFiltered(ol,"functions_type"+ext,CMHL_Typedefs); - writeMemberIndexFiltered(ol,"functions_enum"+ext,CMHL_Enums); - writeMemberIndexFiltered(ol,"functions_eval"+ext,CMHL_EnumValues); - writeMemberIndexFiltered(ol,"functions_prop"+ext,CMHL_Properties); - writeMemberIndexFiltered(ol,"functions_evnt"+ext,CMHL_Events); - writeMemberIndexFiltered(ol,"functions_rela"+ext,CMHL_Related); + QCString title = theTranslator->trCompoundMembers(); + writeMemberIndexFiltered(ol,"functions"+ext,CMHL_All,title); + title += " - "; + writeMemberIndexFiltered(ol,"functions_func"+ext,CMHL_Functions, title + theTranslator->trFunctions()); + writeMemberIndexFiltered(ol,"functions_vars"+ext,CMHL_Variables, title + theTranslator->trVariables()); + writeMemberIndexFiltered(ol,"functions_type"+ext,CMHL_Typedefs, title + theTranslator->trTypedefs()); + writeMemberIndexFiltered(ol,"functions_enum"+ext,CMHL_Enums, title + theTranslator->trEnumerations()); + writeMemberIndexFiltered(ol,"functions_eval"+ext,CMHL_EnumValues, title + theTranslator->trEnumerationValues()); + writeMemberIndexFiltered(ol,"functions_prop"+ext,CMHL_Properties, title + theTranslator->trProperties()); + writeMemberIndexFiltered(ol,"functions_evnt"+ext,CMHL_Events, title + theTranslator->trEvents()); + writeMemberIndexFiltered(ol,"functions_rela"+ext,CMHL_Related, title + theTranslator->trRelatedFunctions()); + } //---------------------------------------------------------------------------- @@ -2185,13 +2188,13 @@ int countFileMembers(int filter) //---------------------------------------------------------------------------- static void writeFileMemberIndexFiltered(OutputList &ol, - const char *fileName,FileMemberHighlight hl) + const char *fileName,FileMemberHighlight hl, + const QCString& title) { if (documentedFileMembers[hl]==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - startFile(ol,fileName,0,"File Member Index",HLI_Globals); - QCString title = theTranslator->trFileMembers(); + startFile(ol,fileName,0,title.data(),HLI_Globals); QCString htmlHelpTitle = title; QCString ftvHelpTitle = title; @@ -2279,13 +2282,15 @@ static void writeFileMemberIndexFiltered(OutputList &ol, void writeFileMemberIndex(OutputList &ol) { QCString ext=Doxygen::htmlFileExtension; - writeFileMemberIndexFiltered(ol,"globals"+ext,FMHL_All); - writeFileMemberIndexFiltered(ol,"globals_func"+ext,FMHL_Functions); - writeFileMemberIndexFiltered(ol,"globals_vars"+ext,FMHL_Variables); - writeFileMemberIndexFiltered(ol,"globals_type"+ext,FMHL_Typedefs); - writeFileMemberIndexFiltered(ol,"globals_enum"+ext,FMHL_Enums); - writeFileMemberIndexFiltered(ol,"globals_eval"+ext,FMHL_EnumValues); - writeFileMemberIndexFiltered(ol,"globals_defs"+ext,FMHL_Defines); + QCString title = theTranslator->trFileMembers(); + writeFileMemberIndexFiltered(ol,"globals"+ext,FMHL_All, title); + title += " - "; + writeFileMemberIndexFiltered(ol,"globals_func"+ext,FMHL_Functions, title + theTranslator->trFunctions()); + writeFileMemberIndexFiltered(ol,"globals_vars"+ext,FMHL_Variables, title + theTranslator->trVariables()); + writeFileMemberIndexFiltered(ol,"globals_type"+ext,FMHL_Typedefs, title + theTranslator->trTypedefs()); + writeFileMemberIndexFiltered(ol,"globals_enum"+ext,FMHL_Enums, title + theTranslator->trEnumerations()); + writeFileMemberIndexFiltered(ol,"globals_eval"+ext,FMHL_EnumValues, title + theTranslator->trEnumerationValues()); + writeFileMemberIndexFiltered(ol,"globals_defs"+ext,FMHL_Defines, title + theTranslator->trDefines()); } @@ -2293,13 +2298,13 @@ void writeFileMemberIndex(OutputList &ol) static void writeNamespaceMemberIndexFiltered(OutputList &ol, const char *fileName, - NamespaceMemberHighlight hl) + NamespaceMemberHighlight hl, + const QCString& title) { if (documentedNamespaceMembers[hl]==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - startFile(ol,fileName,0,"Namespace Member Index",HLI_NamespaceMembers); - QCString title = theTranslator->trNamespaceMembers(); + startFile(ol,fileName,0,title.data(),HLI_NamespaceMembers); QCString htmlHelpTitle = title; QCString ftvHelpTitle = title; //if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); @@ -2383,12 +2388,14 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol, void writeNamespaceMemberIndex(OutputList &ol) { QCString ext=Doxygen::htmlFileExtension; - writeNamespaceMemberIndexFiltered(ol,"namespacemembers"+ext,NMHL_All); - writeNamespaceMemberIndexFiltered(ol,"namespacemembers_func"+ext,NMHL_Functions); - writeNamespaceMemberIndexFiltered(ol,"namespacemembers_vars"+ext,NMHL_Variables); - writeNamespaceMemberIndexFiltered(ol,"namespacemembers_type"+ext,NMHL_Typedefs); - writeNamespaceMemberIndexFiltered(ol,"namespacemembers_enum"+ext,NMHL_Enums); - writeNamespaceMemberIndexFiltered(ol,"namespacemembers_eval"+ext,NMHL_EnumValues); + QCString title = theTranslator->trNamespaceMembers(); + writeNamespaceMemberIndexFiltered(ol,"namespacemembers"+ext,NMHL_All, title); + title += " - "; + writeNamespaceMemberIndexFiltered(ol,"namespacemembers_func"+ext,NMHL_Functions, title + theTranslator->trFunctions()); + writeNamespaceMemberIndexFiltered(ol,"namespacemembers_vars"+ext,NMHL_Variables, title + theTranslator->trVariables()); + writeNamespaceMemberIndexFiltered(ol,"namespacemembers_type"+ext,NMHL_Typedefs, title + theTranslator->trTypedefs()); + writeNamespaceMemberIndexFiltered(ol,"namespacemembers_enum"+ext,NMHL_Enums, title + theTranslator->trEnumerations()); + writeNamespaceMemberIndexFiltered(ol,"namespacemembers_eval"+ext,NMHL_EnumValues, title + theTranslator->trEnumerationValues()); } //---------------------------------------------------------------------------- @@ -2398,9 +2405,9 @@ void writeExampleIndex(OutputList &ol) if (Doxygen::exampleSDict->count()==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); - startFile(ol,"examples",0,"Example Index",HLI_Examples); - startTitle(ol,0); QCString title = theTranslator->trExamples(); + startFile(ol,"examples",0,title.data(),HLI_Examples); + startTitle(ol,0); QCString htmlHelpTitle = title; QCString ftvHelpTitle = title; if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); @@ -2486,7 +2493,7 @@ void writePageIndex(OutputList &ol) if (indexedPages==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); - startFile(ol,"pages",0,"Page Index",HLI_Pages); + startFile(ol,"pages",0,theTranslator->trPageIndex().data(),HLI_Pages); startTitle(ol,0); QCString title = theTranslator->trRelatedPages(); QCString htmlHelpTitle = title; @@ -2580,7 +2587,7 @@ void writeGraphInfo(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); generateGraphLegend(Config_getString("HTML_OUTPUT")); - startFile(ol,"graph_legend",0,"Graph Legend"); + startFile(ol,"graph_legend",0,theTranslator->trLegendTitle().data()); startTitle(ol,0); ol.parseText(theTranslator->trLegendTitle()); endTitle(ol,0,0); @@ -2986,7 +2993,7 @@ void writeGroupIndex(OutputList &ol) if (documentedGroups==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); - startFile(ol,"modules",0,"Module Index",HLI_Modules); + startFile(ol,"modules",0,theTranslator->trModuleIndex().data(),HLI_Modules); startTitle(ol,0); QCString title = theTranslator->trModules(); QCString htmlHelpTitle = title; diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 5178b76..4562067 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -264,18 +264,19 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol) void NamespaceDef::writeDocumentation(OutputList &ol) { - QCString pageTitle=displayName()+" Namespace Reference"; - startFile(ol,getOutputFileBase(),name(),pageTitle); - startTitle(ol,getOutputFileBase()); - //ol.docify(pageTitle); + QCString pageTitle; if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) { - ol.parseText(theTranslator->trPackage(displayName())); + pageTitle = theTranslator->trPackage(displayName()); } else { - ol.parseText(theTranslator->trNamespaceReference(displayName())); + pageTitle = theTranslator->trNamespaceReference(displayName()); } + startFile(ol,getOutputFileBase(),name(),pageTitle); + startTitle(ol,getOutputFileBase()); + //ol.docify(pageTitle); + //ol.parseText(pageTitle); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),displayName()); diff --git a/src/scanner.l b/src/scanner.l index 43b355a..08c116c 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1485,21 +1485,31 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] BEGIN(Using); } "namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); } -{ID}{BN}*"::"{BN}*{ID}({BN}*"::"{BN}*{ID})* { +{ID}{BN}*({BN}*("::"|"."){BN}*{ID})* { lineCount(); current->name=yytext; current->fileName = yyFileName; current->section=Entry::USINGDECL_SEC; - //printf("Found using declaration %s\n",yytext); current_root->addSubEntry(current); current = new Entry ; + if (insideCS) /* Hack: in C# a using declaration and + directive have the same syntax, so we + also add it as a using directive here + */ + { + current->name=yytext; + current->fileName = yyFileName; + current->startLine = yyLineNr; + current->section=Entry::USINGDIR_SEC; + current_root->addSubEntry(current); + current = new Entry ; + } initEntry(); BEGIN(Using); } {SCOPENAME} { current->name=yytext; current->fileName = yyFileName; current->section=Entry::USINGDIR_SEC; - //printf("Found using directive %s\n",yytext); current_root->addSubEntry(current); current = new Entry ; initEntry(); @@ -3616,6 +3626,39 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] } BEGIN( FindMembers ); } +"///"/[^/] { + if (!insideObjC) + { + REJECT; + } + else + { + lineCount(); + current->program+=yytext; + current->fileName = yyFileName ; + current->startLine = yyLineNr ; + curlyCount=0; + BEGIN( ReadBodyIntf ); + } + } +("//"{B}*)?"/**"/[^/*] | +("//"{B}*)?"/*!" | +"//!" | +[\-+]{BN}+ { + if (!insideObjC) + { + REJECT; + } + else + { + lineCount(); + current->program+=yytext; + current->fileName = yyFileName ; + current->startLine = yyLineNr ; + curlyCount=0; + BEGIN( ReadBodyIntf ); + } + } {B}*"{"{B}* { current->fileName = yyFileName ; current->startLine = yyLineNr ; @@ -3666,7 +3709,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] else { yyLineNr++; - unput('{'); + //unput('{'); } } "@end" { // empty ObjC interface diff --git a/src/translator.h b/src/translator.h index 260e608..e819e2b 100644 --- a/src/translator.h +++ b/src/translator.h @@ -416,6 +416,12 @@ class Translator virtual QCString trSearchResults(int numDocuments) = 0; virtual QCString trSearchMatches() = 0; +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trSourceFile(QCString& filename) = 0; + }; #endif diff --git a/src/translator_adapter.h b/src/translator_adapter.h index 03dafd9..ed33d4a 100644 --- a/src/translator_adapter.h +++ b/src/translator_adapter.h @@ -40,7 +40,17 @@ class TranslatorAdapterBase : public Translator }; -class TranslatorAdapter_1_3_3 : public TranslatorAdapterBase +class TranslatorAdapter_1_3_8 : public TranslatorAdapterBase +{ + public: + virtual QCString updateNeededMessage() + { return createUpdateNeededMessage(idLanguage(),"release 1.3.8"); } + + virtual QCString trSourceFile(QCString& filename) + { return english.trSourceFile(filename); } +}; + +class TranslatorAdapter_1_3_3 : public TranslatorAdapter_1_3_8 { public: virtual QCString updateNeededMessage() diff --git a/src/translator_br.h b/src/translator_br.h index 4e3279e..bfcabc9 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -31,7 +31,7 @@ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian: public Translator +class TranslatorBrazilian: public TranslatorAdapter_1_3_8 { public: diff --git a/src/translator_cz.h b/src/translator_cz.h index 37a847b..1280e5c 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -148,7 +148,7 @@ // Windows version. The version which does not call the function is // probably slightly faster. -class TranslatorCzech : public Translator +class TranslatorCzech : public TranslatorAdapter_1_3_8 { private: /*! The decode() inline assumes the source written in the diff --git a/src/translator_de.h b/src/translator_de.h index 0089d27..7af7cc8 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -90,7 +90,7 @@ #ifndef TRANSLATOR_DE_H #define TRANSLATOR_DE_H -class TranslatorGerman : public Translator +class TranslatorGerman : public TranslatorAdapter_1_3_8 { public: diff --git a/src/translator_dk.h b/src/translator_dk.h index 5eeee4d..38deea3 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -72,7 +72,7 @@ #ifndef TRANSLATOR_DK_H #define TRANSLATOR_DK_H -class TranslatorDanish : public Translator +class TranslatorDanish : public TranslatorAdapter_1_3_8 { public: diff --git a/src/translator_en.h b/src/translator_en.h index bf7bbe3..3dc27df 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -1544,6 +1544,17 @@ class TranslatorEnglish : public Translator return "Matches:"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return filename + " Source File"; + } + }; #endif diff --git a/src/translator_fr.h b/src/translator_fr.h index f959a4f..0fb4c12 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -85,7 +85,7 @@ // Translator class (by the local maintainer) when the localized // translator is made up-to-date again. -class TranslatorFrench : public Translator +class TranslatorFrench : public TranslatorAdapter_1_3_8 { public: diff --git a/src/translator_hr.h b/src/translator_hr.h index 89b324c..8412b4a 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -56,7 +56,7 @@ #ifndef TRANSLATOR_HR_H #define TRANSLATOR_HR_H -class TranslatorCroatian : public Translator +class TranslatorCroatian : public TranslatorAdapter_1_3_8 { private: /*! to avoid macro redefinition from translator_cz.h */ diff --git a/src/translator_hu.h b/src/translator_hu.h index ab61b18..215798b 100644 --- a/src/translator_hu.h +++ b/src/translator_hu.h @@ -32,7 +32,7 @@ #include "translator.h" #include "../qtools/qdatetime.h" -class TranslatorHungarian : public Translator +class TranslatorHungarian : public TranslatorAdapter_1_3_8 { private: const char * zed(char c) diff --git a/src/translator_it.h b/src/translator_it.h index 4d39e94..545e734 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -70,7 +70,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public Translator +class TranslatorItalian : public TranslatorAdapter_1_3_8 { public: diff --git a/src/translator_kr.h b/src/translator_kr.h index f087589..337df87 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -26,7 +26,7 @@ #ifndef TRANSLATOR_KR_H #define TRANSLATOR_KR_H -class TranslatorKorean : public Translator +class TranslatorKorean : public TranslatorAdapter_1_3_8 { public: diff --git a/src/translator_lt.h b/src/translator_lt.h index a965a4a..d5dfaa5 100644 --- a/src/translator_lt.h +++ b/src/translator_lt.h @@ -30,7 +30,7 @@ #define TRANSLATOR_LT_H -class TranslatorLithuanian : public Translator +class TranslatorLithuanian : public TranslatorAdapter_1_3_8 { public: diff --git a/src/translator_nl.h b/src/translator_nl.h index 91d8c73..68a5142 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -18,7 +18,7 @@ #ifndef TRANSLATOR_NL_H #define TRANSLATOR_NL_H -class TranslatorDutch : public Translator +class TranslatorDutch : public TranslatorAdapter_1_3_8 { public: QCString idLanguage() diff --git a/src/translator_ru.h b/src/translator_ru.h index 5f8ac1d..9631d54 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -18,7 +18,7 @@ * * Nickolay Semyonov * Andrey V. Stolyarov released Feb 14, 2001 - * Alexandr V. Chelpanov released Sep 16, 2003 + * Alexandr V. Chelpanov released Jun 16, 2004 * * При переводе заголовков слова list и documentation убраны. * @@ -42,7 +42,8 @@ * * Определения помеченные ?? являются спорными. * - * Благодарности: Vitaly A. Repin + * Благодарности: Vitaly A. Repin , + * Михаил Глушенков */ #ifndef TRANSLATOR_RU_H @@ -236,7 +237,7 @@ class TranslatorRussian : public Translator /*??*/ virtual QCString trFileMembers() { - return decode( "Члены файла" ); + return decode( "Список членов всех файлов" ); } /*! This is put above each page as a link to all related pages. */ @@ -638,7 +639,7 @@ class TranslatorRussian : public Translator * related classes */ virtual QCString trRelatedFunctionDocumentation() - { return decode("Документация по друзьям класса и функциям отноносящимся" + { return decode("Документация по друзьям класса и функциям, отноносящимся" " к классу"); } ////////////////////////////////////////////////////////////////////////// @@ -779,14 +780,14 @@ class TranslatorRussian : public Translator /*! This is put above each page as a link to all members of namespaces. */ virtual QCString trNamespaceMembers() - { return decode("Члены пространства имен"); } + { return decode("Члены пространств имен"); } /*! This is an introduction to the page with all namespace members */ virtual QCString trNamespaceMemberDescription(bool extractAll) { QCString result="Полный список "; if (!extractAll) result+="документированных "; - result+="членов простанства имен."; + result+="членов простанств имен."; return decode(result); } @@ -794,7 +795,7 @@ class TranslatorRussian : public Translator * index of all namespaces. */ virtual QCString trNamespaceIndex() - { return decode("Алфавитный указатель пространства имен"); } + { return decode("Алфавитный указатель пространств имен"); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all namespaces. @@ -1061,7 +1062,7 @@ class TranslatorRussian : public Translator } virtual QCString trInclByDepGraph() { - return decode("Граф файлов, в которые включеется этот файл:"); + return decode("Граф файлов, в которые включается этот файл:"); } virtual QCString trSince() /*??*/ @@ -1128,16 +1129,16 @@ class TranslatorRussian : public Translator "\n" "Стрелки имеют следующее значение:\n" "
    \n" - "
  • Темносиняя стрелка используется для изображения отношения открытого наследования " + "
  • Темно-синяя стрелка используется для изображения отношения открытого наследования " "между двумя классами.\n" - "
  • Темнозеленая стрелка используется при защищенном наследовании.\n" - "
  • Темнокрасная стрелка используется при закрытом наследовании.\n" + "
  • Темно-зеленая стрелка используется при защищенном наследовании.\n" + "
  • Темно-красная стрелка используется при закрытом наследовании.\n" "
  • Фиолетовая стрелка используется, если класс содержится в" "другом класе или используется другим классом." "Со стрелкой указывается переменная, " "через которую доступен указываемый класс или структура. \n" "
  • Желтая стрелка используется для связи подстановки шаблона и " - "шаблона, на основе которого эта подстановка выплднена. С шаблоном" + "шаблона, на основе которого эта подстановка выполнена. С шаблоном" "указывается параметр подстановки.\n" "
\n"); } @@ -1545,13 +1546,12 @@ class TranslatorRussian : public Translator } else if( numDocuments == 1 ) { - return decode( "Найдено $num документ" ) + as_documents( numDocuments ) - + "."; + return decode( "Найден 1 документ." ); } else { - return decode( "Найдено $num документ" ) + as_documents( numDocuments ) - + decode( ". Документы отсортированы по релевантности." ); + return decode( "Найден(о) $num документ(ов). " + "Документы отсортированы по релевантности." ); } } /*! This string is put before the list of matched words, for each search @@ -1562,12 +1562,15 @@ class TranslatorRussian : public Translator return decode( "Найдено:" ); } -private: - QCString as_documents( int num ) +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) { - if( num % 10 == 1 ) return ""; - if( (num % 10) >= 2 && (num % 10) <= 4 ) return decode( "а" ); - return decode( "ов" ); + return "Исходный файл " + filename; } }; diff --git a/src/translator_sr.h b/src/translator_sr.h index 37f7dcf..30d143b 100644 --- a/src/translator_sr.h +++ b/src/translator_sr.h @@ -21,7 +21,7 @@ // translation by Dejan D. M. Milosavljevic ; // // 10x 2 Ivana Miletic for gramatical consutation. -class TranslatorSerbian : public Translator +class TranslatorSerbian : public TranslatorAdapter_1_3_8 { private: QCString decode(const QCString& sInput) diff --git a/src/translator_tw.h b/src/translator_tw.h index 95c9568..867cbab 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -41,7 +41,7 @@ // Translator class (by the local maintainer) when the localized // translator is made up-to-date again. -class TranslatorChinesetraditional : public Translator +class TranslatorChinesetraditional : public TranslatorAdapter_1_3_8 { public: diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index aca2094..a1caf10 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -810,7 +810,8 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De } static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t, - MemberList *ml,const char *kind,const char *header=0) + MemberList *ml,const char *kind,const char *header=0, + const char *documentation=0) { if (ml->count()==0) return; // empty list @@ -819,6 +820,12 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t, { t << "
" << convertToXML(header) << "
" << endl; } + if (documentation) + { + t << " "; + writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation); + t << "" << endl; + } MemberListIterator mli(*ml); MemberDef *md; for (mli.toFirst();(md=mli.current());++mli) @@ -928,9 +935,12 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) BaseClassDef *bcd; for (bcli.toFirst();(bcd=bcli.current());++bcli) { - t << " classDef->getOutputFileBase() - << "\" prot=\""; + t << " classDef->isLinkable()) + { + t << "refid=\"" << bcd->classDef->getOutputFileBase() << "\" "; + } + t << "prot=\""; switch (bcd->prot) { case Public: t << "public"; break; @@ -1013,7 +1023,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(cd,ti,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(cd,ti,t,mg->members(),"user-defined",mg->header(), + mg->documentation()); } generateXMLSection(cd,ti,t,&cd->pubTypes,"public-type"); @@ -1145,7 +1156,8 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(nd,ti,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(nd,ti,t,mg->members(),"user-defined",mg->header(), + mg->documentation()); } generateXMLSection(nd,ti,t,&nd->decDefineMembers,"define"); @@ -1280,7 +1292,8 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(fd,ti,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(fd,ti,t,mg->members(),"user-defined",mg->header(), + mg->documentation()); } generateXMLSection(fd,ti,t,&fd->decDefineMembers,"define"); @@ -1411,7 +1424,8 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(gd,ti,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(gd,ti,t,mg->members(),"user-defined",mg->header(), + mg->documentation()); } generateXMLSection(gd,ti,t,&gd->decDefineMembers,"define"); @@ -1580,12 +1594,23 @@ void generateXML() t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" "; t << "version=\"" << versionString << "\">" << endl; - ClassSDict::Iterator cli(Doxygen::classSDict); - ClassDef *cd; - for (cli.toFirst();(cd=cli.current());++cli) { - msg("Generating XML output for class %s\n",cd->name().data()); - generateXMLForClass(cd,t); + ClassSDict::Iterator cli(Doxygen::classSDict); + ClassDef *cd; + for (cli.toFirst();(cd=cli.current());++cli) + { + msg("Generating XML output for class %s\n",cd->name().data()); + generateXMLForClass(cd,t); + } + } + { + ClassSDict::Iterator cli(Doxygen::hiddenClasses); + ClassDef *cd; + for (cli.toFirst();(cd=cli.current());++cli) + { + msg("Generating XML output for class %s\n",cd->name().data()); + generateXMLForClass(cd,t); + } } NamespaceSDict::Iterator nli(Doxygen::namespaceSDict); NamespaceDef *nd; diff --git a/wintools/make.pl b/wintools/make.pl index 3efa768..871c381 100755 --- a/wintools/make.pl +++ b/wintools/make.pl @@ -21,9 +21,9 @@ if ($target eq "msvc") # create config file open(FILE,">makeconfig") || die "Cannot create file makeconfig!"; -print FILE "DOXYGEN = $pwd\n"; -print FILE "TMAKEPATH = $pwd\\tmake\\lib\\win32-$target\n"; -print FILE "TMAKE = $pwd\\tmake\\bin\\tmake\n"; +print FILE "DOXYGEN = \"$pwd\"\n"; +print FILE "TMAKEPATH = \"$pwd\\tmake\\lib\\win32-$target\"\n"; +print FILE "TMAKE = \"$pwd\\tmake\\bin\\tmake\"\n"; print FILE "MAKE = $make\n"; print FILE "PERL = perl\n"; print FILE "RM = del /s /q\n"; -- cgit v0.12