From d033ece659ef73379802b0c3d6b6f718f79b0436 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 11 Aug 2002 20:15:10 +0000 Subject: Release-1.2.17-20020811 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- doc/arch.doc | 4 +- doc/autolink.doc | 2 +- doc/commands.doc | 10 +- doc/faq.doc | 8 +- doc/htmlcmds.doc | 134 ++++----- doc/install.doc | 5 +- doc/language.doc | 16 +- packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 11 +- src/cmdmapper.cpp | 4 +- src/cmdmapper.h | 136 ++++----- src/code.h | 4 +- src/code.l | 65 ++--- src/definition.cpp | 4 +- src/diagram.cpp | 2 +- src/doc.l | 14 +- src/docparser.cpp | 693 ++++++++++++++++++++++++++++++++++++---------- src/docparser.h | 279 ++++++++++++++----- src/doctokenizer.h | 20 +- src/doctokenizer.l | 53 +++- src/docvisitor.h | 14 +- src/dot.cpp | 16 +- src/doxygen.cpp | 12 +- src/doxygen.h | 3 +- src/filedef.cpp | 7 - src/ftvhelp.cpp | 12 +- src/groupdef.cpp | 2 +- src/htmldocvisitor.h | 627 +++++++++++++++++++++++++++++++++++++++++ src/htmlgen.cpp | 37 ++- src/htmlgen.h | 6 + src/htmlhelp.cpp | 12 +- src/index.cpp | 40 +-- src/latexgen.cpp | 11 +- src/latexgen.h | 2 + src/mangen.h | 2 + src/memberdef.cpp | 2 +- src/namespacedef.cpp | 2 +- src/outputgen.h | 66 +++-- src/outputlist.cpp | 19 ++ src/outputlist.h | 7 + src/page.h | 3 +- src/printdocvisitor.h | 122 ++++---- src/rtfgen.cpp | 43 +-- src/rtfgen.h | 4 +- src/scanner.l | 30 +- src/translator_it.h | 14 +- src/translator_pl.h | 174 ++++++++++-- src/translator_sr.h | 144 +++++----- src/util.cpp | 378 ++++++++++++------------- src/util.h | 18 ++ src/xmlgen.cpp | 10 + 54 files changed, 2389 insertions(+), 926 deletions(-) create mode 100644 src/htmldocvisitor.h diff --git a/INSTALL b/INSTALL index e5e99fa..f6399f6 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.17-20020804 +DOXYGEN Version 1.2.17-20020811 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (04 August 2002) +Dimitri van Heesch (11 August 2002) diff --git a/README b/README index 967ac22..d8b4355 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.17_20020804 +DOXYGEN Version 1.2.17_20020811 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) (04 August 2002) +Dimitri van Heesch (dimitri@stack.nl) (11 August 2002) diff --git a/VERSION b/VERSION index 07b9071..d5e9194 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.17-20020804 +1.2.17-20020811 diff --git a/doc/arch.doc b/doc/arch.doc index 1851d31..71b9ff5 100644 --- a/doc/arch.doc +++ b/doc/arch.doc @@ -58,7 +58,7 @@ of macros. This is to allow macro names to appear in the type of function parameters for instance. Another difference is that the preprocessor parses, but not actually includes -code when it encounters a #include (with the exception of #include +code when it encounters a \#include (with the exception of \#include found inside { ... } blocks). The reasons behind this deviation from the standard is to prevent feeding multiple definitions of the same functions/classes to doxygen's parser. If all source files would @@ -67,7 +67,7 @@ definitions (and their documentation) would be present in each translation unit. The preprocessor is written using \c flex and can be found in -\c src/pre.l. For condition blocks (#if) evaluation of constant expressions +\c src/pre.l. For condition blocks (\#if) evaluation of constant expressions is needed. For this a \c yacc based parser is used, which can be found in \c src/constexp.y and \c src/constexp.l. diff --git a/doc/autolink.doc b/doc/autolink.doc index c7f9ba7..3bb0e9a 100644 --- a/doc/autolink.doc +++ b/doc/autolink.doc @@ -62,7 +62,7 @@
  • (\"::")n\"()"
  • (\"::")n\ - where n>0. + where n\>0. \par Note 1: The patterns above should not contain spaces, tabs or newlines. diff --git a/doc/commands.doc b/doc/commands.doc index 0a6a352..33456bb 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -90,6 +90,7 @@ documentation: \refitem cmdline \\line \refitem cmdlink \\link \refitem cmdmainpage \\mainpage +\refitem cmdn \\n \refitem cmdname \\name \refitem cmdnamespace \\namespace \refitem cmdnosubgrouping \\nosubgrouping @@ -205,7 +206,7 @@ doxygen. Unrecognized commands are treated as normal text. \addindex \\def Indicates that a comment block contains documentation for a - \c #define macro. + \c \#define macro. \par Example: \verbinclude define.h @@ -1627,6 +1628,13 @@ ALIASES = "english=\if english" \ Equivalent to \ref cmdarg "\\arg"
    +\section cmdn \n + + \addindex \\n + Forces a new line. Equivalent to \ and inspired by + the printf function. + +
    \section cmdp \p \addindex \\p diff --git a/doc/faq.doc b/doc/faq.doc index 98199eb..4f7ce54 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -104,7 +104,7 @@ You can document your class like To make doxygen put

    -#include \ +\#include \ in the documentation of the class MyClassName regardless of the name of the actual @@ -192,15 +192,15 @@ remove the % and keep the word unlinked. This error happens when doxygen lexical scanner has a rules that matches more than 16K input character in one go. I've seen this happening -on a very large generated file (>16K lines), where the built-in preprocessor -converted it into an empty file (with >16K of newlines). Another case +on a very large generated file (\>16K lines), where the built-in preprocessor +converted it into an empty file (with \>16K of newlines). Another case where this might happen is if you have lines in your code with more than 16K characters. If you have ran into such a case and want me to fix it, you should send me a code fragment that triggers the message. -
  • How did doxygen get it's name? +
  • How did doxygen get its name? Doxygen got its name from playing with the words documentation and generator. diff --git a/doc/htmlcmds.doc b/doc/htmlcmds.doc index 7f79852..96b22f5 100644 --- a/doc/htmlcmds.doc +++ b/doc/htmlcmds.doc @@ -23,73 +23,73 @@ documentation. Note that all attributes of a HTML tag are ignored The special HTML character entities that are recognized by Doxygen: diff --git a/doc/install.doc b/doc/install.doc index 96a1056..fe7fd55 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -181,8 +181,9 @@ Compilation is now done by performing the following steps: directory manually to some bin directory in your search path. This is sufficient to use doxygen. - \note You need the GNU install tool for this to work. Other - install tools may put the binaries in the wrong directory! + \note You need the GNU install tool for this to work (it is part of + the fileutils package). Other install tools may put the binaries in + the wrong directory! If you have a RPM or DEP package, then please follow the standard installation procedure that is required for these packages. diff --git a/doc/language.doc b/doc/language.doc index 42b1195..f850044 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means that the text fragments that doxygen generates can be produced in languages other than English (the default) at configuration time. -Currently (version 1.2.14-20020317), 27 languages +Currently (version 1.2.17-20020804), 27 languages are supported (sorted alphabetically): Brazilian Portuguese, Chinese, Chinese Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, @@ -133,7 +133,7 @@ when the translator was updated. Italian Alessandro Falappa
    Ahmed Aldo Faisal alessandro@NOSPAM.falappa.net
    aaf23@NOSPAM.cam.ac.uk - 1.2.17 + up-to-date Japanese @@ -175,7 +175,7 @@ when the translator was updated. Russian Alexandr Chelpanov cav@NOSPAM.cryptopro.ru - 1.2.17 + up-to-date Serbian @@ -252,7 +252,7 @@ when the translator was updated. \hline Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\ \hline - Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & 1.2.17 \\ + Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & up-to-date \\ & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\ \hline Japanese & Ryunosuke Sato & {\tt puyo@mint.freemail.ne.jp} & 1.2.17 \\ @@ -269,7 +269,7 @@ when the translator was updated. \hline Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.16 \\ \hline - Russian & Alexandr Chelpanov & {\tt cav@cryptopro.ru} & 1.2.17 \\ + Russian & Alexandr Chelpanov & {\tt cav@cryptopro.ru} & up-to-date \\ \hline Serbian & Dejan Milosavljevic & {\tt dmilos@email.com} & 1.2.16 \\ \hline @@ -315,8 +315,8 @@ Just follow these steps: defines which language translators will be compiled into doxygen executable. It is a kind of configuration file. If you are sure that you do not need some of the languages, you can remove (comment out) - definitions of symbols for the languages, or you can say \c #undef - instead of \c #define for them. + definitions of symbols for the languages, or you can say \c \#undef + instead of \c \#define for them.
  • Edit language.cpp: Add a \verbatim @@ -346,7 +346,7 @@ Just follow these steps:
  • Edit translator_xx.h:
    • Rename TRANSLATOR_EN_H to TRANSLATOR_XX_H - twice (i.e. in the \c #ifndef and \c #define preprocessor commands at + twice (i.e. in the \c \#ifndef and \c \#define preprocessor commands at the beginning of the file).
    • Rename TranslatorEnglish to TranslatorYourLanguage
    • In the member idLanguage() change "english" into the diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index a41a72c..efa0314 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.2.17_20020804 +Version: 1.2.17_20020811 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 eb0f199..d8be5e5 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -39,7 +39,10 @@ static QCString stripExtension(const char *fName) { QCString result=fName; - if (result.right(htmlFileExtensionLength)==htmlFileExtension) result=result.left(result.length()-htmlFileExtensionLength); + if (result.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension) + { + result=result.left(result.length()-Doxygen::htmlFileExtension.length()); + } return result; } @@ -853,7 +856,7 @@ void ClassDef::writeDocumentation(OutputList &ol) Doxygen::tagFile << " " << endl; Doxygen::tagFile << " " << convertToXML(name()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(getOutputFileBase()) << htmlFileExtension << "" << endl; + Doxygen::tagFile << " " << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "" << endl; if (m_tempArgs) { ArgumentListIterator ali(*m_tempArgs); @@ -993,7 +996,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeString("
      ["); - ol.startHtmlLink("graph_legend"+htmlFileExtension); + ol.startHtmlLink("graph_legend"+Doxygen::htmlFileExtension); ol.docify(theTranslator->trLegend()); ol.endHtmlLink(); ol.writeString("]
      "); @@ -1028,7 +1031,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); ol.writeString("
      ["); - ol.startHtmlLink("graph_legend"+htmlFileExtension); + ol.startHtmlLink("graph_legend"+Doxygen::htmlFileExtension); ol.docify(theTranslator->trLegend()); ol.endHtmlLink(); ol.writeString("]
      "); diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index eb7c25a..b2aedcf 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -86,7 +86,8 @@ CommandMap cmdMap[] = { "verbinclude", CMD_VERBINCLUDE }, { "version", CMD_VERSION }, { "warning", CMD_WARNING }, - { "authors", CMD_AUTHOR }, + { "author", CMD_AUTHOR }, + { "authors", CMD_AUTHORS }, { "throws", CMD_EXCEPTION }, { "\\", CMD_BSLASH }, { "@", CMD_AT }, @@ -97,6 +98,7 @@ CommandMap cmdMap[] = { "#", CMD_HASH }, { "%", CMD_PERCENT }, { "~", CMD_LANGSWITCH }, + { "_internalref", CMD_INTERNALREF }, { 0, 0 } }; diff --git a/src/cmdmapper.h b/src/cmdmapper.h index 09a8e92..e9dd096 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -31,73 +31,75 @@ const int SIMPLESECT_BIT = 0x1000; enum CommandType { - CMD_UNKNOWN=0, - CMD_ADDINDEX=1, /* DocIndex, word as arg */ - CMD_ANCHOR=2, - CMD_ATTENTION=3 | SIMPLESECT_BIT, - CMD_AUTHOR=4 | SIMPLESECT_BIT, - CMD_BOLD=5, - CMD_BUG=6 | SIMPLESECT_BIT, - CMD_CODE=7, - CMD_COPYDOC=8, /* reference yields subtree */ - CMD_DATE=9 | SIMPLESECT_BIT, - CMD_DEPRECATED=10 | SIMPLESECT_BIT, - CMD_DONTINCLUDE=11, /* file name */ - CMD_DOTFILE=12, /* file name */ - CMD_EMPHASIS =13, - CMD_ENDCODE=14, - CMD_ENDHTMLONLY=15, - CMD_ENDLATEXONLY=16, - CMD_ENDLINK=17, - CMD_ENDVERBATIM=18 , - CMD_EXCEPTION=19 | SIMPLESECT_BIT, - CMD_HTMLINCLUDE=20 , - CMD_HTMLONLY=21 , - CMD_IMAGE=22 , /* some number of arguments */ - CMD_INCLUDE=23 , - CMD_INTERNAL=24 , /* node, with sub paragraphs? */ - CMD_INVARIANT=25| SIMPLESECT_BIT , - CMD_LATEXONLY=26 , - CMD_LI=27 , - CMD_LINE=28 , - CMD_LINK=29 , /* argument + "text", TODO {@link...} */ - CMD_NOTE=30 | SIMPLESECT_BIT , - CMD_PAR=31 | SIMPLESECT_BIT , - CMD_PARAM=32 | SIMPLESECT_BIT, - CMD_POST=33 | SIMPLESECT_BIT, - CMD_PRE=34 | SIMPLESECT_BIT , - CMD_REF=35 , - CMD_SECREFITEM=36 , - CMD_REMARK=37 | SIMPLESECT_BIT , - CMD_RETURN=38 | SIMPLESECT_BIT , - CMD_RETVAL=39 | SIMPLESECT_BIT, - CMD_SA=40 | SIMPLESECT_BIT , - CMD_SECTION=41 , - CMD_SINCE=42 | SIMPLESECT_BIT, - CMD_SKIP=43 , - CMD_SKIPLINE=44 , - CMD_STARTCODE=45, - CMD_JAVALINK=46, - CMD_TEST=47 | SIMPLESECT_BIT, - CMD_TODO=48 | SIMPLESECT_BIT, - CMD_UNTIL=49 , - CMD_VERBATIM=50 , - CMD_VERBINCLUDE=51 , - CMD_VERSION=52 | SIMPLESECT_BIT, - CMD_WARNING=53 | SIMPLESECT_BIT , - CMD_BSLASH=54 , - CMD_AT=55 , - CMD_LESS=56 , - CMD_GREATER=57 , - CMD_AMP=58 , - CMD_DOLLAR=59 , - CMD_HASH=60 , - CMD_PERCENT=61, - CMD_LINEBREAK=62, - CMD_FORMULA=63, - CMD_SECREFLIST=64, - CMD_ENDSECREFLIST=65, - CMD_LANGSWITCH=66 + CMD_UNKNOWN = 0, + CMD_ADDINDEX = 1, + CMD_ANCHOR = 2, + CMD_ATTENTION = 3 | SIMPLESECT_BIT, + CMD_AUTHOR = 4 | SIMPLESECT_BIT, + CMD_BOLD = 5, + CMD_BUG = 6 | SIMPLESECT_BIT, + CMD_CODE = 7, + CMD_COPYDOC = 8, + CMD_DATE = 9 | SIMPLESECT_BIT, + CMD_DEPRECATED = 10 | SIMPLESECT_BIT, + CMD_DONTINCLUDE = 11, + CMD_DOTFILE = 12, + CMD_EMPHASIS = 13, + CMD_ENDCODE = 14, + CMD_ENDHTMLONLY = 15, + CMD_ENDLATEXONLY = 16, + CMD_ENDLINK = 17, + CMD_ENDVERBATIM = 18, + CMD_EXCEPTION = 19 | SIMPLESECT_BIT, + CMD_HTMLINCLUDE = 20, + CMD_HTMLONLY = 21, + CMD_IMAGE = 22, + CMD_INCLUDE = 23, + CMD_INTERNAL = 24, + CMD_INVARIANT = 25 | SIMPLESECT_BIT , + CMD_LATEXONLY = 26, + CMD_LI = 27, + CMD_LINE = 28, + CMD_LINK = 29, + CMD_NOTE = 30 | SIMPLESECT_BIT , + CMD_PAR = 31 | SIMPLESECT_BIT , + CMD_PARAM = 32 | SIMPLESECT_BIT, + CMD_POST = 33 | SIMPLESECT_BIT, + CMD_PRE = 34 | SIMPLESECT_BIT , + CMD_REF = 35, + CMD_SECREFITEM = 36, + CMD_REMARK = 37 | SIMPLESECT_BIT , + CMD_RETURN = 38 | SIMPLESECT_BIT , + CMD_RETVAL = 39 | SIMPLESECT_BIT, + CMD_SA = 40 | SIMPLESECT_BIT , + CMD_SECTION = 41, + CMD_SINCE = 42 | SIMPLESECT_BIT, + CMD_SKIP = 43, + CMD_SKIPLINE = 44, + CMD_STARTCODE = 45, + CMD_JAVALINK = 46, + CMD_TEST = 47 | SIMPLESECT_BIT, + CMD_TODO = 48 | SIMPLESECT_BIT, + CMD_UNTIL = 49, + CMD_VERBATIM = 50, + CMD_VERBINCLUDE = 51, + CMD_VERSION = 52 | SIMPLESECT_BIT, + CMD_WARNING = 53 | SIMPLESECT_BIT , + CMD_BSLASH = 54, + CMD_AT = 55, + CMD_LESS = 56, + CMD_GREATER = 57, + CMD_AMP = 58, + CMD_DOLLAR = 59, + CMD_HASH = 60, + CMD_PERCENT = 61, + CMD_LINEBREAK = 62, + CMD_FORMULA = 63, + CMD_SECREFLIST = 64, + CMD_ENDSECREFLIST= 65, + CMD_LANGSWITCH = 66, + CMD_AUTHORS = 67 | SIMPLESECT_BIT, + CMD_INTERNALREF = 68 }; enum HtmlTagType diff --git a/src/code.h b/src/code.h index 1023d00..db1ab18 100644 --- a/src/code.h +++ b/src/code.h @@ -21,11 +21,11 @@ #include "qtbc.h" #include -class OutputDocInterface; +class BaseCodeDocInterface; class FileDef; class MemberDef; -extern void parseCode(OutputDocInterface &,const char *,const QCString &, +extern void parseCode(BaseCodeDocInterface &,const char *,const QCString &, bool ,const char *,FileDef *fd=0, int startLine=-1,int endLine=-1,bool inlineFragment=FALSE); extern void initParseCodeContext(); diff --git a/src/code.l b/src/code.l index 59b0f16..a3e7b00 100644 --- a/src/code.l +++ b/src/code.l @@ -48,7 +48,7 @@ * statics */ -static OutputDocInterface * g_code; +static BaseCodeDocInterface * g_code; static ClassSDict g_codeClassSDict(17); static ClassDef *g_curClassDef; @@ -414,7 +414,7 @@ static void codifyLines(char *text) * line numbers for each line. If \a text contains newlines, the link will be * split into multiple links with the same destination, one for each line. */ -static void writeMultiLineCodeLink(OutputDocInterface &ol, +static void writeMultiLineCodeLink(BaseCodeDocInterface &ol, const char *ref,const char *file, const char *anchor,const char *text) { @@ -610,7 +610,7 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst) } -static void generateClassOrGlobalLink(OutputDocInterface &ol,char *clName,int *clNameLen=0) +static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int *clNameLen=0) { int i=0; if (*clName=='~') // correct for matching negated values i.s.o. destructors. @@ -642,11 +642,7 @@ static void generateClassOrGlobalLink(OutputDocInterface &ol,char *clName,int *c // g_exampleFile.data()); if (cd->addExample(anchor,g_exampleName,g_exampleFile)) { - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Latex); - ol.disable(OutputGenerator::RTF); - ol.writeAnchor(0,anchor); - ol.popGeneratorState(); + ol.writeCodeAnchor(anchor); g_anchorCount++; } } @@ -681,7 +677,8 @@ static void generateClassOrGlobalLink(OutputDocInterface &ol,char *clName,int *c } static bool getLink(const char *className, - const char *memberName,OutputDocInterface &result, + const char *memberName, + BaseCodeDocInterface &ol, const char *text=0) { MemberDef *md; @@ -704,13 +701,7 @@ static bool getLink(const char *className, // g_exampleFile.data()); if (md->addExample(anchor,g_exampleName,g_exampleFile)) { - //bool latexEnabled = result.isEnabled(OutputGenerator::Latex); - result.pushGeneratorState(); - //if (latexEnabled) result.disable(OutputGenerator::Latex); - result.disable(OutputGenerator::Latex); - result.writeAnchor(0,anchor); - result.popGeneratorState(); - //if (latexEnabled) result.enable(OutputGenerator::Latex); + ol.writeCodeAnchor(anchor); g_anchorCount++; } } @@ -733,7 +724,7 @@ static bool getLink(const char *className, } //printf("d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getOutputFileBase().data(),d->name().data(),md->name().data()); - writeMultiLineCodeLink(result,d->getReference(),d->getOutputFileBase(), + writeMultiLineCodeLink(ol,d->getReference(),d->getOutputFileBase(), md->getBodyAnchor(),text ? text : memberName); return TRUE; } @@ -741,7 +732,7 @@ static bool getLink(const char *className, return FALSE; } -static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const char *memName) +static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const char *memName) { if (mcd) { @@ -764,10 +755,7 @@ static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const c // g_exampleFile.data()); if (xmd->addExample(anchor,g_exampleName,g_exampleFile)) { - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Latex); - ol.writeAnchor(0,anchor); - ol.popGeneratorState(); + ol.writeCodeAnchor(anchor); g_anchorCount++; } } @@ -799,7 +787,7 @@ static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const c return FALSE; } -static void generateMemberLink(OutputDocInterface &ol,const QCString &varName, +static void generateMemberLink(BaseCodeDocInterface &ol,const QCString &varName, char *memName) { //printf("generateMemberLink(object=%s,mem=%s) classScope=%s\n", @@ -812,23 +800,17 @@ static void generateMemberLink(OutputDocInterface &ol,const QCString &varName, if (vcd) { //printf("Class found!\n"); - OutputDocInterface *result = ol.clone(); - if (getLink(vcd->name(),memName,*result)) + if (getLink(vcd->name(),memName,ol)) { //printf("Found result!\n"); - ol.append(result); - delete result; return; } BaseClassListIterator bcli(*vcd->baseClasses()); for ( ; bcli.current() ; ++bcli) { - OutputDocInterface *result = ol.clone(); - if (getLink(bcli.current()->classDef->name(),memName,*result)) + if (getLink(bcli.current()->classDef->name(),memName,ol)) { //printf("Found result!\n"); - ol.append(result); - delete result; return; } } @@ -896,9 +878,8 @@ static void generateMemberLink(OutputDocInterface &ol,const QCString &varName, return; } -static void generateFunctionLink(OutputDocInterface &ol,char *funcName) +static void generateFunctionLink(BaseCodeDocInterface &ol,char *funcName) { - OutputDocInterface *result = ol.clone(); //CodeClassDef *ccd=0; ClassDef *ccd=0; QCString locScope=g_classScope.copy(); @@ -924,24 +905,16 @@ static void generateFunctionLink(OutputDocInterface &ol,char *funcName) BaseClassListIterator bcli(*ccd->baseClasses()); for ( ; bcli.current() ; ++bcli) { - if (getLink(bcli.current()->classDef->name(),locFunc,*result,funcName)) + if (getLink(bcli.current()->classDef->name(),locFunc,ol,funcName)) { - ol.append(result); - delete result; return; } } } - if (getLink(locScope,locFunc,*result,funcName)) + if (!getLink(locScope,locFunc,ol,funcName)) { - ol.append(result); - } - else - { - //codifyLines(funcName); generateClassOrGlobalLink(ol,funcName); } - delete result; return; } @@ -2008,12 +1981,12 @@ void initParseCodeContext() g_anchorCount = 0; } -void parseCode(OutputDocInterface &od,const char *className,const QCString &s, +void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s, bool exBlock, const char *exName,FileDef *fd, int startLine,int endLine,bool inlineFragment) { if (s.isEmpty()) return; - g_code = od.clone(); + g_code = &od; g_inputString = s; g_inputPosition = 0; g_currentFontClass = 0; @@ -2060,8 +2033,6 @@ void parseCode(OutputDocInterface &od,const char *className,const QCString &s, endFontClass(); g_code->endCodeLine(); } - od.append(g_code); - delete g_code; return; } diff --git a/src/definition.cpp b/src/definition.cpp index 5d5ca03..1e7652b 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -408,6 +408,9 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, name.prepend(scope+"::"); } } + if (md->isFunction() || md->isSlot() || + md->isPrototype() || md->isSignal() + ) name+="()"; Definition *d = md->getOuterScope(); if (d==Doxygen::globalScope) d=md->getBodyDef(); if (md->getStartBodyLine()!=-1 && md->getBodyDef()) @@ -447,7 +450,6 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, { ol.docify(name); } - if (md->isFunction() || md->isSlot() || md->isPrototype() || md->isSignal()) ol.docify("()"); } index=newIndex+matchLen; } diff --git a/src/diagram.cpp b/src/diagram.cpp index 3e9eb33..a2891c0 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -166,7 +166,7 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h) { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - t << cd->getOutputFileBase() << htmlFileExtension << "\" "; + t << cd->getOutputFileBase() << Doxygen::htmlFileExtension << "\" "; t << "alt=\"" << cd->displayName(); t << "\" shape=\"rect\" coords=\"" << x << "," << y << ","; t << (x+w) << "," << (y+h) << "\">" << endl; diff --git a/src/doc.l b/src/doc.l index e7eeb6d..23b96ec 100644 --- a/src/doc.l +++ b/src/doc.l @@ -1,4 +1,4 @@ -/***************************************************************************** +/**************************************************************************** * * * @@ -31,7 +31,6 @@ #include // new experimental parser -#include "docparser.h" #include "debug.h" #include "doc.h" @@ -446,7 +445,10 @@ static QCString stripKnownExtensions(const char *text) { QCString result=text; if (result.right(4)==".tex") result=result.left(result.length()-4); - else if (result.right(htmlFileExtensionLength)==htmlFileExtension) result=result.left(result.length()-htmlFileExtensionLength); + else if (result.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension) + { + result=result.left(result.length()-Doxygen::htmlFileExtension.length()); + } //printf("%s stripKnowExtensions(%s)\n",result.data(),text); return result; } @@ -1928,9 +1930,9 @@ LINKMASK [a-z_A-Z0-9:#.,~&*/\[\]<>()\-\+]+({B}*("const"|"volatile"))? internalRefAnchor.resize(0); BEGIN(DocInternalRef); } -[A-Z_a-z0-9.:\-\+]+ { +[A-Z_a-z0-9.:#\-\+]+ { internalRefFile=yytext; - int i = internalRefFile.find(':'); + int i = internalRefFile.find('#'); if (i!=-1) { internalRefAnchor=internalRefFile.right(internalRefFile.length()-i-1); @@ -2947,7 +2949,7 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine, if (Debug::isFlagSet(Debug::Validate)) { - validatingParseDoc(fileName,startLine,docStr); + od.parseDoc(fileName,startLine,clName,md,docStr); } strcpy(yyFileName,fileName); diff --git a/src/docparser.cpp b/src/docparser.cpp index a34f652..da1d808 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -27,6 +27,8 @@ #include "doxygen.h" #include "debug.h" +#include "util.h" +#include "page.h" #include "docparser.h" #include "doctokenizer.h" @@ -38,9 +40,67 @@ //--------------------------------------------------------------------------- +static QCString g_context; +static bool g_inSeeBlock; +static bool g_insideHtmlLink; static QStack g_nodeStack; static QStack g_styleStack; +struct DocParserContext +{ + QCString context; + bool inSeeBlock; + bool insideHtmlLink; + QStack nodeStack; + QStack styleStack; +}; + +static QStack g_parserStack; + +//--------------------------------------------------------------------------- + +static void docParserPushContext() +{ + doctokenizerYYpushContext(); + DocParserContext *ctx = new DocParserContext; + ctx->context = g_context; + ctx->inSeeBlock = g_inSeeBlock; + ctx->insideHtmlLink = g_insideHtmlLink; + ctx->nodeStack = g_nodeStack; + ctx->styleStack = g_styleStack; + g_parserStack.push(ctx); +} + +static void docParserPopContext() +{ + DocParserContext *ctx = g_parserStack.pop(); + g_context = ctx->context; + g_inSeeBlock = ctx->inSeeBlock; + g_insideHtmlLink = ctx->insideHtmlLink; + g_nodeStack = ctx->nodeStack; + g_styleStack = ctx->styleStack; + delete ctx; + doctokenizerYYpopContext(); +} + +//--------------------------------------------------------------------------- + +static QCString stripKnownExtensions(const char *text) +{ + QCString result=text; + if (result.right(4)==".tex") + { + result=result.left(result.length()-4); + } + else if (result.right(Doxygen::htmlFileExtension.length())== + Doxygen::htmlFileExtension) + { + result=result.left(result.length()-Doxygen::htmlFileExtension.length()); + } + return result; +} + + //--------------------------------------------------------------------------- /*! Returns TRUE iff node n is a child of a preformatted node */ @@ -185,7 +245,7 @@ static void handlePendingStyleCommands(DocNode *parent,QList &children) DocStyleChange *sc = g_styleStack.top(); while (sc && sc->position()>=g_nodeStack.count()) { // there are unclosed style modifiers in the paragraph - const char *cmd; + const char *cmd=""; switch (sc->style()) { case DocStyleChange::Bold: cmd = "b"; break; @@ -205,6 +265,39 @@ static void handlePendingStyleCommands(DocNode *parent,QList &children) } } +static void handleLinkedWord(DocNode *parent,QList &children) +{ + Definition *compound=0; + MemberDef *member=0; + if (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)) + { + if (member) // member link + { + children.append(new + DocLinkedWord(parent,g_token->name, + compound->getReference(), + compound->getOutputFileBase(), + member->anchor() + ) + ); + } + else // compound link + { + children.append(new + DocLinkedWord(parent,g_token->name, + compound->getReference(), + compound->getOutputFileBase(), + "" + ) + ); + } + } + else // normal word + { + children.append(new DocWord(parent,g_token->name)); + } +} + /* Helper function that deals with the most common tokens allowed in * title like sections. * @param parent Parent node, owner of the children list passed as @@ -220,7 +313,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children handleWord) { DBG(("token %s at %d",tokToString(tok),doctokenizerYYlineno)); - if (tok==TK_WORD || tok==TK_SYMBOL || tok==TK_URL || + if (tok==TK_WORD || tok==TK_LNKWORD || tok==TK_SYMBOL || tok==TK_URL || tok==TK_COMMAND || tok==TK_HTMLTAG ) { @@ -285,7 +378,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children { doctokenizerYYsetStateHtmlOnly(); int retval = doctokenizerYYlex(); - children.append(new DocVerbatim(parent,g_token->verb,DocVerbatim::HtmlOnly)); + children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly)); if (retval==0) printf("Error: htmlonly section ended without end marker at line %d\n", doctokenizerYYlineno); doctokenizerYYsetStatePara(); @@ -295,7 +388,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children { doctokenizerYYsetStateLatexOnly(); int retval = doctokenizerYYlex(); - children.append(new DocVerbatim(parent,g_token->verb,DocVerbatim::LatexOnly)); + children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly)); if (retval==0) printf("Error: latexonly section ended without end marker at line %d\n", doctokenizerYYlineno); doctokenizerYYsetStatePara(); @@ -307,6 +400,57 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children children.append(form); } break; + case CMD_ANCHOR: + { + int tok=doctokenizerYYlex(); + if (tok!=TK_WHITESPACE) + { + printf("Error: expected whitespace after %s command at line %d\n", + tokenName.data(),doctokenizerYYlineno); + break; + } + tok=doctokenizerYYlex(); + if (tok==0) + { + printf("Error: unexpected end of comment block at line %d while parsing the " + "argument of command %s\n",doctokenizerYYlineno, tokenName.data()); + break; + } + else if (tok!=TK_WORD && tok!=TK_LNKWORD) + { + printf("Error: unexpected token %s as the argument of %s at line %d.\n", + tokToString(tok),tokenName.data(),doctokenizerYYlineno); + break; + } + DocAnchor *anchor = new DocAnchor(parent,g_token->name); + children.append(anchor); + } + break; + case CMD_INTERNALREF: + { + int tok=doctokenizerYYlex(); + if (tok!=TK_WHITESPACE) + { + printf("Error: expected whitespace after %s command at line %d\n", + tokenName.data(),doctokenizerYYlineno); + break; + } + doctokenizerYYsetStateInternalRef(); + tok=doctokenizerYYlex(); // get the reference id + DocInternalRef *ref=0; + if (tok!=TK_WORD && tok!=TK_LNKWORD) + { + printf("Error: unexpected token %s as the argument of %s at line %d.\n", + tokToString(tok),tokenName.data(),doctokenizerYYlineno); + doctokenizerYYsetStatePara(); + break; + } + ref = new DocInternalRef(parent,g_token->name); + children.append(ref); + ref->parse(); + doctokenizerYYsetStatePara(); + } + break; default: return FALSE; } @@ -413,9 +557,19 @@ handlepara: children.append(new DocWhiteSpace(parent,g_token->chars)); } break; + case TK_LNKWORD: + if (handleWord) + { + handleLinkedWord(parent,children); + } + else + return FALSE; + break; case TK_WORD: if (handleWord) + { children.append(new DocWord(parent,g_token->name)); + } else return FALSE; break; @@ -483,6 +637,77 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QCString &symName,char *letter) //--------------------------------------------------------------------------- +static int internalValidatingParseDoc(DocNode *parent,QList &children, + const QCString &doc) +{ + int retval = RetVal_OK; + + doctokenizerYYinit(doc); + + // first parse any number of paragraphs + bool isFirst=FALSE; + DocPara *lastPar=0; + do + { + DocPara *par = new DocPara(parent); + if (isFirst) { par->markFirst(); isFirst=FALSE; } + retval=par->parse(); + if (!par->isEmpty()) + { + children.append(par); + lastPar=par; + } + } while (retval==TK_NEWPARA); + if (lastPar) lastPar->markLast(); + + return retval; +} + +//--------------------------------------------------------------------------- + +void DocXRefItem::parse() +{ + QCString listName; + switch(m_type) + { + case Bug: listName="bug"; break; + case Test: listName="test"; break; + case Todo: listName="todo"; break; + case Deprecated: listName="deprecated"; break; + } + RefList *refList = Doxygen::specialLists->find(listName); + if (Config_getBool(refList->optionName())) // list is enabled + { + RefItem *item = refList->getRefItem(m_id); + ASSERT(item!=0); + + m_file = refList->listName(); + m_anchor = item->listAnchor; + m_title = refList->sectionTitle(); + + docParserPushContext(); + internalValidatingParseDoc(this,m_children,item->text); + docParserPopContext(); + } +} + +//--------------------------------------------------------------------------- + +DocFormula::DocFormula(DocNode *parent,int id) : + m_parent(parent) +{ + QCString formCmd; + formCmd.sprintf("\\form#%d",id); + Formula *formula=Doxygen::formulaNameDict[formCmd]; + if (formula) + { + m_name.sprintf("form_%d",formula->getId()); + m_text = formula->getFormulaText(); + } +} + +//--------------------------------------------------------------------------- + int DocLanguage::parse() { int retval; @@ -490,13 +715,17 @@ int DocLanguage::parse() g_nodeStack.push(this); // parse one or more paragraphs + bool isFirst=TRUE; + DocPara *par=0; do { - DocPara *par = new DocPara(this); + par = new DocPara(this); + if (isFirst) { par->markFirst(); isFirst=FALSE; } m_children.append(par); retval=par->parse(); } while (retval==TK_NEWPARA); + if (par) par->markLast(); DBG(("DocLanguage::parse() end\n")); DocNode *n = g_nodeStack.pop(); @@ -568,7 +797,7 @@ void DocSecRefList::parse() break; } tok=doctokenizerYYlex(); - if (tok!=TK_WORD) + if (tok!=TK_WORD && tok!=TK_LNKWORD) { printf("Error: unexpected token %s as the argument of \\refitem at line %d.\n", tokToString(tok),doctokenizerYYlineno); @@ -603,10 +832,98 @@ endsecreflist: ASSERT(n==this); } +//--------------------------------------------------------------------------- + +DocInternalRef::DocInternalRef(DocNode *parent,const QCString &ref) + : m_parent(parent) +{ + int i=ref.find('#'); + if (i!=-1) + { + m_anchor = ref.right(ref.length()-i-1); + m_file = ref.left(i); + } + else + { + m_file = ref; + } +} +void DocInternalRef::parse() +{ + g_nodeStack.push(this); + DBG(("DocInternalRef::parse() start\n")); + + int tok; + while ((tok=doctokenizerYYlex())) + { + if (!defaultHandleToken(this,tok,m_children)) + { + switch (tok) + { + case TK_COMMAND: + printf("Error: Illegal command %s as part of a \\ref at line %d\n", + g_token->name.data(),doctokenizerYYlineno); + break; + case TK_SYMBOL: + printf("Error: Unsupported symbol %s found at line %d\n", + g_token->name.data(),doctokenizerYYlineno); + break; + default: + printf("Error: Unexpected token %s at line %d\n", + g_token->name.data(),doctokenizerYYlineno); + break; + } + } + } + + handlePendingStyleCommands(this,m_children); + DBG(("DocInternalRef::parse() end\n")); + DocNode *n=g_nodeStack.pop(); + ASSERT(n==this); +} //--------------------------------------------------------------------------- +DocRef::DocRef(DocNode *parent,const QCString &target) : + m_parent(parent), m_refToSection(FALSE), m_refToAnchor(FALSE) +{ + Definition *compound = 0; + MemberDef *member = 0; + ASSERT(!target.isEmpty()); + SectionInfo *sec = Doxygen::sectionDict[target]; + if (sec) // ref to section or anchor + { + m_text = sec->title; + if (m_text.isEmpty()) m_text = sec->label; + + m_ref = sec->ref; + m_file = stripKnownExtensions(sec->fileName); + m_anchor = sec->label; + m_refToAnchor = sec->type==SectionInfo::Anchor; + m_refToSection = sec->type!=SectionInfo::Anchor; + } + else if (resolveRef(g_context,target,TRUE,&compound,&member)) + { + if (member) // ref to member + { + m_file = compound->getOutputFileBase(); + m_ref = compound->getReference(); + m_anchor = member->anchor(); + } + else // ref to compound + { + m_file = compound->getOutputFileBase(); + m_ref = compound->getReference(); + } + } + else // oops, bogus target + { + printf("Error: unable to resolve reference to `%s' for \\ref command at line %d\n", + target.data(),doctokenizerYYlineno); + } +} + void DocRef::parse() { g_nodeStack.push(this); @@ -643,6 +960,33 @@ void DocRef::parse() //--------------------------------------------------------------------------- +DocLink::DocLink(DocNode *parent,const QCString &target) : + m_parent(parent) +{ + Definition *compound; + PageInfo *page; + if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock, + &compound,&page,m_anchor)) + { + if (compound) + { + m_file = compound->getOutputFileBase(); + m_ref = compound->getReference(); + } + else if (page) + { + m_file = page->getOutputFileBase(); + m_ref = page->getReference(); + } + } + else // oops, bogus target + { + printf("Error: unable to resolve link to `%s' for \\link command at line %d\n", + target.data(),doctokenizerYYlineno); + } +} + + QCString DocLink::parse(bool isJavaLink) { QCString result; @@ -944,16 +1288,24 @@ int DocInternal::parse() DBG(("DocInternal::parse() start\n")); // first parse any number of paragraphs + bool isFirst=FALSE; + DocPara *lastPar=0; do { DocPara *par = new DocPara(this); + if (isFirst) { par->markFirst(); isFirst=FALSE; } retval=par->parse(); - if (!par->isEmpty()) m_children.append(par); + if (!par->isEmpty()) + { + m_children.append(par); + lastPar=par; + } if (retval==TK_LISTITEM) { printf("Error: Invalid list item found at line %d!\n",doctokenizerYYlineno); } } while (retval!=0 && retval!=RetVal_Section); + if (lastPar) lastPar->markLast(); // then parse any number of level1 sections while (retval==RetVal_Section) @@ -1094,13 +1446,17 @@ int DocHtmlCell::parse() DBG(("DocHtmlCell::parse() start\n")); // parse one or more paragraphs + bool isFirst=FALSE; + DocPara *par=0; do { - DocPara *par = new DocPara(this); + par = new DocPara(this); + if (isFirst) { par->markFirst(); isFirst=FALSE; } m_children.append(par); retval=par->parse(); } while (retval==TK_NEWPARA); + if (par) par->markLast(); DBG(("DocHtmlCell::parse() end\n")); DocNode *n=g_nodeStack.pop(); @@ -1311,13 +1667,17 @@ int DocHtmlDescData::parse() g_nodeStack.push(this); DBG(("DocHtmlDescData::parse() start\n")); + bool isFirst=FALSE; + DocPara *par=0; do { - DocPara *par = new DocPara(this); + par = new DocPara(this); + if (isFirst) { par->markFirst(); isFirst=FALSE; } m_children.append(par); retval=par->parse(); } while (retval==TK_NEWPARA); + if (par) par->markLast(); DBG(("DocHtmlDescData::parse() end\n")); DocNode *n=g_nodeStack.pop(); @@ -1404,13 +1764,17 @@ int DocHtmlPre::parse() int rv; g_nodeStack.push(this); + bool isFirst=FALSE; + DocPara *par=0; do { - DocPara *par = new DocPara(this); + par = new DocPara(this); + if (isFirst) { par->markFirst(); isFirst=FALSE; } m_children.append(par); rv=par->parse(); } while (rv==TK_NEWPARA); + if (par) par->markLast(); DocNode *n=g_nodeStack.pop(); ASSERT(n==this); @@ -1426,13 +1790,17 @@ int DocHtmlListItem::parse() g_nodeStack.push(this); // parse one or more paragraphs + bool isFirst=FALSE; + DocPara *par=0; do { - DocPara *par = new DocPara(this); + par = new DocPara(this); + if (isFirst) { par->markFirst(); isFirst=FALSE; } m_children.append(par); retval=par->parse(); } while (retval==TK_NEWPARA); + if (par) par->markLast(); DocNode *n=g_nodeStack.pop(); ASSERT(n==this); @@ -1506,6 +1874,8 @@ int DocSimpleListItem::parse() { g_nodeStack.push(this); int rv=m_paragraph->parse(); + m_paragraph->markFirst(); + m_paragraph->markLast(); DocNode *n=g_nodeStack.pop(); ASSERT(n==this); return rv; @@ -1535,6 +1905,8 @@ int DocAutoListItem::parse() int retval = RetVal_OK; g_nodeStack.push(this); retval=m_paragraph->parse(); + m_paragraph->markFirst(); + m_paragraph->markLast(); DocNode *n=g_nodeStack.pop(); ASSERT(n==this); return retval; @@ -1602,24 +1974,23 @@ void DocTitle::parse() //-------------------------------------------------------------------------- DocSimpleSect::DocSimpleSect(DocNode *parent,Type t) : - m_parent(parent), m_type(t) + m_parent(parent), m_type(t) { - m_paragraph = new DocPara(this); - //m_params.setAutoDelete(TRUE); - m_title = 0; + m_title=0; } -DocSimpleSect::~DocSimpleSect() +DocSimpleSect::~DocSimpleSect() { - delete m_paragraph; - delete m_title; + delete m_title; } void DocSimpleSect::accept(DocVisitor *v) { v->visitPre(this); if (m_title) m_title->accept(v); - m_paragraph->accept(v); + QListIterator cli(m_children); + DocNode *n; + for (cli.toFirst();(n=cli.current());++cli) n->accept(v); v->visitPost(this); } @@ -1635,34 +2006,38 @@ int DocSimpleSect::parse(bool userTitle) m_title->parse(); } - int retval = m_paragraph->parse(); + // add new paragraph as child + DocPara *par = new DocPara(this); + if (m_children.isEmpty()) + { + par->markFirst(); + } + else + { + ASSERT(m_children.last()->kind()==DocNode::Kind_Para); + ((DocPara *)m_children.last())->markLast(FALSE); + } + par->markLast(); + m_children.append(par); + + // parse the contents of the paragraph + int retval = par->parse(); DBG(("DocSimpleSect::parse() end retval=%d\n",retval)); - DocNode *n = g_nodeStack.pop(); + DocNode *n=g_nodeStack.pop(); ASSERT(n==this); return retval; // 0==EOF, TK_NEWPARA, TK_LISTITEM, TK_ENDLIST, RetVal_SimpleSec } -void DocSimpleSect::addParam(const QCString &name) -{ - m_params.append(name); -} - //-------------------------------------------------------------------------- -int DocPara::handleSimpleSection(DocSimpleSect::Type t) +int DocParamList::parse(const QCString &cmdName) { - DocSimpleSect *ss=new DocSimpleSect(this,t); - m_children.append(ss); - int rv = ss->parse(t==DocSimpleSect::User); - return (rv!=TK_NEWPARA) ? rv : RetVal_OK; -} + int retval=RetVal_OK; + DBG(("DocParamList::parse() start\n")); + g_nodeStack.push(this); -int DocPara::handleParamSection(const QCString &cmdName,DocSimpleSect::Type t) -{ int tok=doctokenizerYYlex(); - DocSimpleSect *ss=new DocSimpleSect(this,t); - m_children.append(ss); if (tok!=TK_WHITESPACE) { printf("Error: expected whitespace after %s command at line %d\n", @@ -1670,12 +2045,12 @@ int DocPara::handleParamSection(const QCString &cmdName,DocSimpleSect::Type t) } doctokenizerYYsetStateParam(); tok=doctokenizerYYlex(); - doctokenizerYYsetStatePara(); while (tok==TK_WORD) /* there is a parameter name */ { - ss->addParam(g_token->name); + m_params.append(g_token->name); tok=doctokenizerYYlex(); } + doctokenizerYYsetStatePara(); if (tok==0) /* premature end of comment block */ { printf("Error: unexpected end of comment block at line %d while parsing the " @@ -1683,71 +2058,75 @@ int DocPara::handleParamSection(const QCString &cmdName,DocSimpleSect::Type t) return 0; } ASSERT(tok==TK_WHITESPACE); - int rv = ss->parse(FALSE); - return (rv!=TK_NEWPARA) ? rv : RetVal_OK; + + retval = m_paragraph->parse(); + m_paragraph->markFirst(); + m_paragraph->markLast(); + + DBG(("DocParamList::parse() end retval=%d\n",retval)); + DocNode *n=g_nodeStack.pop(); + ASSERT(n==this); + return retval; } -#if 0 -int DocPara::handleStyleArgument(const QCString &cmdName) +//-------------------------------------------------------------------------- + +int DocParamSect::parse(const QCString &cmdName) { - int tok=doctokenizerYYlex(); - if (tok!=TK_WHITESPACE) + int retval=RetVal_OK; + DBG(("DocParamSect::parse() start\n")); + g_nodeStack.push(this); + + DocParamList *pl = new DocParamList(this); + m_children.append(pl); + retval = pl->parse(cmdName); + + DBG(("DocParamSect::parse() end retval=%d\n",retval)); + DocNode *n=g_nodeStack.pop(); + ASSERT(n==this); + return retval; +} + +//-------------------------------------------------------------------------- + +int DocPara::handleSimpleSection(DocSimpleSect::Type t) +{ + DocSimpleSect *ss=0; + if (!m_children.isEmpty() && // previous element + m_children.last()->kind()==Kind_SimpleSect && // was a simple sect + ((DocSimpleSect *)m_children.last())->type()==t) // of same type { - printf("Error: expected whitespace after %s command at line %d\n", - cmdName.data(),doctokenizerYYlineno); - return; + // append to previous section + ss=(DocSimpleSect *)m_children.last(); } - while ((tok=doctokenizerYYlex()) && tok!=TK_WHITESPACE && tok!=TK_NEWPARA) + else // start new section { - if (!defaultHandleToken(this,tok,m_children)) - { - switch (tok) - { - case TK_COMMAND: - printf("Error: Illegal command \\%s as the argument of a \\%s command at line %d\n", - g_token->name.data(),cmdName.data(),doctokenizerYYlineno); - break; - case TK_SYMBOL: - printf("Error: Unsupported symbol %s found at line %d\n", - g_token->name.data(),doctokenizerYYlineno); - break; - default: - printf("Error: Unexpected token %s at line %d\n", - g_token->name.data(),doctokenizerYYlineno); - break; - } - } + ss=new DocSimpleSect(this,t); + m_children.append(ss); } - return tok==TK_NEWPARA ? TK_NEWPARA : RetVal_OK; -} - -void DocPara::handleStyleEnter(DocStyleChange::Style s) -{ - DBG(("HandleStyleEnter\n")); - DocStyleChange *sc= new DocStyleChange(this,g_nodeStack.count(),s,TRUE); - m_children.append(sc); - g_styleStack.push(sc); + int rv = ss->parse(t==DocSimpleSect::User); + return (rv!=TK_NEWPARA) ? rv : RetVal_OK; } -void DocPara::handleStyleLeave(DocStyleChange::Style s,const char *tagName) +int DocPara::handleParamSection(const QCString &cmdName,DocParamSect::Type t) { - DBG(("HandleStyleLeave\n")); - if (g_styleStack.isEmpty() || // no style change - g_styleStack.top()->style()!=s || // wrong style change - g_styleStack.top()->position()!=g_nodeStack.count() // wrong position - ) + DocParamSect *ps=0; + + if (!m_children.isEmpty() && // previous element + m_children.last()->kind()==Kind_ParamSect && // was a param sect + ((DocParamSect *)m_children.last())->type()==t) // of same type { - printf("Error: found tag at line %d without matching <%s> in the same paragraph\n", - tagName,doctokenizerYYlineno,tagName); + // append to previous section + ps=(DocParamSect *)m_children.last(); } - else // end the section + else // start new section { - DocStyleChange *sc= new DocStyleChange(this,g_nodeStack.count(),s,FALSE); - m_children.append(sc); - g_styleStack.pop(); + ps=new DocParamSect(this,t); + m_children.append(ps); } + int rv=ps->parse(cmdName); + return (rv!=TK_NEWPARA) ? rv : RetVal_OK; } -#endif int DocPara::handleXRefItem(DocXRefItem::Type t) { @@ -1757,7 +2136,9 @@ int DocPara::handleXRefItem(DocXRefItem::Type t) retval=doctokenizerYYlex(); if (retval!=0) { - m_children.append(new DocXRefItem(this,g_token->id,t)); + DocXRefItem *ref = new DocXRefItem(this,g_token->id,t); + m_children.append(ref); + ref->parse(); } doctokenizerYYsetStatePara(); return retval; @@ -1801,7 +2182,7 @@ void DocPara::handleImage(const QCString &cmdName) return; } tok=doctokenizerYYlex(); - if (tok!=TK_WORD) + if (tok!=TK_WORD && tok!=TK_LNKWORD) { printf("Error: unexpected token %s as the argument of %s at line %d.\n", tokToString(tok),cmdName.data(),doctokenizerYYlineno); @@ -1937,7 +2318,7 @@ int DocPara::handleLanguageSwitch() retval = tok; goto endlang; } - else if (tok==TK_WORD) + else if (tok==TK_WORD || tok==TK_LNKWORD) { DocLanguage *dl = new DocLanguage(this,g_token->name); m_children.append(dl); @@ -2037,7 +2418,9 @@ int DocPara::handleCommand(const QCString &cmdName) m_children.append(new DocSymbol(this,DocSymbol::Percent)); break; case CMD_SA: + g_inSeeBlock=TRUE; retval = handleSimpleSection(DocSimpleSect::See); + g_inSeeBlock=FALSE; break; case CMD_RETURN: retval = handleSimpleSection(DocSimpleSect::Return); @@ -2045,6 +2428,9 @@ int DocPara::handleCommand(const QCString &cmdName) case CMD_AUTHOR: retval = handleSimpleSection(DocSimpleSect::Author); break; + case CMD_AUTHORS: + retval = handleSimpleSection(DocSimpleSect::Authors); + break; case CMD_VERSION: retval = handleSimpleSection(DocSimpleSect::Version); break; @@ -2102,7 +2488,7 @@ int DocPara::handleCommand(const QCString &cmdName) "argument of command %s\n",doctokenizerYYlineno, cmdName.data()); break; } - else if (tok!=TK_WORD) + else if (tok!=TK_WORD && tok!=TK_LNKWORD) { printf("Error: unexpected token %s as the argument of %s at line %d.\n", tokToString(tok),cmdName.data(),doctokenizerYYlineno); @@ -2116,7 +2502,7 @@ int DocPara::handleCommand(const QCString &cmdName) { doctokenizerYYsetStateCode(); retval = doctokenizerYYlex(); - m_children.append(new DocVerbatim(this,g_token->verb,DocVerbatim::Code)); + m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Code)); if (retval==0) printf("Error: code section ended without end marker at line %d\n", doctokenizerYYlineno); doctokenizerYYsetStatePara(); @@ -2126,7 +2512,7 @@ int DocPara::handleCommand(const QCString &cmdName) { doctokenizerYYsetStateHtmlOnly(); retval = doctokenizerYYlex(); - m_children.append(new DocVerbatim(this,g_token->verb,DocVerbatim::HtmlOnly)); + m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly)); if (retval==0) printf("Error: htmlonly section ended without end marker at line %d\n", doctokenizerYYlineno); doctokenizerYYsetStatePara(); @@ -2136,7 +2522,7 @@ int DocPara::handleCommand(const QCString &cmdName) { doctokenizerYYsetStateLatexOnly(); retval = doctokenizerYYlex(); - m_children.append(new DocVerbatim(this,g_token->verb,DocVerbatim::LatexOnly)); + m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly)); if (retval==0) printf("Error: latexonly section ended without end marker at line %d\n", doctokenizerYYlineno); doctokenizerYYsetStatePara(); @@ -2146,7 +2532,7 @@ int DocPara::handleCommand(const QCString &cmdName) { doctokenizerYYsetStateVerbatim(); retval = doctokenizerYYlex(); - m_children.append(new DocVerbatim(this,g_token->verb,DocVerbatim::Verbatim)); + m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim)); if (retval==0) printf("Error: verbatim section ended without end marker at line %d\n", doctokenizerYYlineno); doctokenizerYYsetStatePara(); @@ -2160,13 +2546,13 @@ int DocPara::handleCommand(const QCString &cmdName) printf("Error: unexpected command %s at line %d\n",g_token->name.data(),doctokenizerYYlineno); break; case CMD_PARAM: - retval = handleParamSection(cmdName,DocSimpleSect::Param); + retval = handleParamSection(cmdName,DocParamSect::Param); break; case CMD_RETVAL: - retval = handleParamSection(cmdName,DocSimpleSect::RetVal); + retval = handleParamSection(cmdName,DocParamSect::RetVal); break; case CMD_EXCEPTION: - retval = handleParamSection(cmdName,DocSimpleSect::Exception); + retval = handleParamSection(cmdName,DocParamSect::Exception); break; case CMD_BUG: retval = handleXRefItem(DocXRefItem::Bug); @@ -2202,7 +2588,7 @@ int DocPara::handleCommand(const QCString &cmdName) "argument of command %s\n",doctokenizerYYlineno, cmdName.data()); break; } - else if (tok!=TK_WORD) + else if (tok!=TK_WORD && tok!=TK_LNKWORD) { printf("Error: unexpected token %s as the argument of %s at line %d.\n", tokToString(tok),cmdName.data(),doctokenizerYYlineno); @@ -2238,7 +2624,7 @@ int DocPara::handleCommand(const QCString &cmdName) "argument of command %s\n",doctokenizerYYlineno, cmdName.data()); break; } - else if (tok!=TK_WORD) + else if (tok!=TK_WORD && tok!=TK_LNKWORD) { printf("Error: unexpected token %s as the argument of %s at line %d.\n", tokToString(tok),cmdName.data(),doctokenizerYYlineno); @@ -2309,6 +2695,9 @@ int DocPara::handleCommand(const QCString &cmdName) case CMD_LANGSWITCH: retval = handleLanguageSwitch(); break; + case CMD_INTERNALREF: + printf("Error: unexpected command %s at line %d\n",g_token->name.data(),doctokenizerYYlineno); + break; default: // we should not get here! ASSERT(0); @@ -2322,34 +2711,6 @@ int DocPara::handleCommand(const QCString &cmdName) return retval; } -#if 0 -void DocPara::handlePendingStyleCommands() -{ - if (!g_styleStack.isEmpty()) - { - DocStyleChange *sc = g_styleStack.top(); - while (sc && sc->position()>=g_nodeStack.count()) - { // there are unclosed style modifiers in the paragraph - const char *cmd; - switch (sc->style()) - { - case DocStyleChange::Bold: cmd = "b"; break; - case DocStyleChange::Italic: cmd = "em"; break; - case DocStyleChange::Code: cmd = "code"; break; - case DocStyleChange::Center: cmd = "center"; break; - case DocStyleChange::Small: cmd = "small"; break; - case DocStyleChange::Subscript: cmd = "subscript"; break; - case DocStyleChange::Superscript: cmd = "superscript"; break; - } - printf("Error: end of paragraph at line %d without end of style " - "command \n",doctokenizerYYlineno,cmd); - m_children.append(new DocStyleChange(this,g_nodeStack.count(),sc->style(),FALSE)); - g_styleStack.pop(); - sc = g_styleStack.top(); - } - } -} -#endif int DocPara::handleHtmlStartTag(const QCString &tagName,const QList
    \n"; + } + } + void visitPre(DocAutoListItem *) + { + m_t << "
  • "; + } + void visitPost(DocAutoListItem *) + { + m_t << "
  • "; + } + void visitPre(DocPara *) + { + } + void visitPost(DocPara *p) + { + if (!p->isLast() && // omit

    for last paragraph + !(p->parent() && // and for parameter sections + p->parent()->kind()==DocNode::Kind_ParamSect + ) + ) m_t << "

    \n"; + } + void visitPre(DocRoot *) + { + m_t << "


    New parser:

    \n"; + } + void visitPost(DocRoot *) + { + m_t << "

    Old parser:

    \n"; + } + void visitPre(DocSimpleSect *s) + { + m_t << "
    "; + switch(s->type()) + { + case DocSimpleSect::See: + m_t << theTranslator->trSeeAlso(); break; + case DocSimpleSect::Return: + m_t << theTranslator->trReturns(); break; + case DocSimpleSect::Author: + m_t << theTranslator->trAuthor(TRUE,TRUE); break; + case DocSimpleSect::Authors: + m_t << theTranslator->trAuthor(TRUE,FALSE); break; + case DocSimpleSect::Version: + m_t << theTranslator->trVersion(); break; + case DocSimpleSect::Since: + m_t << theTranslator->trSince(); break; + case DocSimpleSect::Date: + m_t << theTranslator->trDate(); break; + case DocSimpleSect::Note: + m_t << theTranslator->trNote(); break; + case DocSimpleSect::Warning: + m_t << theTranslator->trWarning(); break; + case DocSimpleSect::Pre: + m_t << theTranslator->trPrecondition(); break; + case DocSimpleSect::Post: + m_t << theTranslator->trPostcondition(); break; + case DocSimpleSect::Invar: + m_t << theTranslator->trInvariant(); break; + case DocSimpleSect::Remark: + m_t << theTranslator->trRemarks(); break; + case DocSimpleSect::Attention: + m_t << theTranslator->trAttention(); break; + case DocSimpleSect::User: break; + case DocSimpleSect::Unknown: break; + } + m_t << ":"; + + // special case 1: user defined title + if (s->type()!=DocSimpleSect::User) + { + m_t << "
    "; + } + } + void visitPost(DocSimpleSect *) + { + m_t << "
    \n"; + } + void visitPre(DocTitle *) + { + } + void visitPost(DocTitle *) + { + m_t << "
    "; + } + void visitPre(DocSimpleList *) + { + m_t << "
      \n"; + } + void visitPost(DocSimpleList *) + { + m_t << "
    \n"; + } + void visitPre(DocSimpleListItem *) + { + m_t << "
  • "; + } + void visitPost(DocSimpleListItem *) + { + m_t << "
  • \n"; + } + void visitPre(DocSection *s) + { + m_t << "",s->level(); + } + void visitPost(DocSection *s) + { + m_t << "\n",s->level(); + } + void visitPre(DocHtmlList *s) + { + if (s->type()==DocHtmlList::Ordered) + m_t << "
      \n"; + else + m_t << "
        \n"; + } + void visitPost(DocHtmlList *s) + { + if (s->type()==DocHtmlList::Ordered) + m_t << "
    \n"; + else + m_t << "\n"; + } + void visitPre(DocHtmlListItem *) + { + m_t << "
  • \n"; + } + void visitPost(DocHtmlListItem *) + { + m_t << "
  • \n"; + } + void visitPre(DocHtmlPre *) + { + m_t << "
    \n";
    +      m_insidePre=TRUE;
    +    }
    +    void visitPost(DocHtmlPre *) 
    +    {
    +      m_insidePre=FALSE;
    +      m_t << "
    \n"; + } + void visitPre(DocHtmlDescList *) + { + m_t << "
    \n"; + } + void visitPost(DocHtmlDescList *) + { + m_t << "
    \n"; + } + void visitPre(DocHtmlDescTitle *) + { + m_t << "
    "; + } + void visitPost(DocHtmlDescTitle *) + { + m_t << "
    \n"; + } + void visitPre(DocHtmlDescData *) + { + m_t << "
    "; + } + void visitPost(DocHtmlDescData *) + { + m_t << "
    \n"; + } + void visitPre(DocHtmlTable *) + { + m_t << "\n"; + } + void visitPost(DocHtmlTable *) + { + m_t << "
    \n"; + } + void visitPre(DocHtmlRow *) + { + m_t << "\n"; + } + void visitPost(DocHtmlRow *) + { + m_t << "\n"; + } + void visitPre(DocHtmlCell *c) + { + if (c->isHeading()) m_t << ""; else m_t << ""; + } + void visitPost(DocHtmlCell *c) + { + if (c->isHeading()) m_t << ""; else m_t << ""; + } + void visitPre(DocHtmlCaption *) + { + m_t << ""; + } + void visitPost(DocHtmlCaption *) + { + m_t << "\n"; + } + void visitPre(DocIndexEntry *) + { + m_hide = TRUE; + } + void visitPost(DocIndexEntry *) + { + m_hide = FALSE; + } + void visitPre(DocInternal *) + { + m_t << "

    " << theTranslator->trForInternalUseOnly() << "

    " << endl; + m_t << "

    " << endl; + } + void visitPost(DocInternal *) + { + m_t << "

    " << endl; + } + void visitPre(DocHRef *href) + { + m_t << "url() << "\">"; + } + void visitPost(DocHRef *) + { + m_t << "\n"; + } + void visitPre(DocHtmlHeader *header) + { + m_t << "level() << ">"; + } + void visitPost(DocHtmlHeader *header) + { + m_t << "level() << ">\n"; + } + void visitPre(DocImage *img) + { + m_t << "name() << "\">\n"; + } + void visitPost(DocImage *) + { + } + void visitPre(DocDotFile *) + { + // TODO + } + void visitPost(DocDotFile *) + { + // TODO + } + void visitPre(DocLink *lnk) + { + startLink(lnk->ref(),lnk->file(),lnk->anchor()); + } + void visitPost(DocLink *) + { + endLink(); + } + void visitPre(DocRef *ref) + { + startLink(ref->ref(),ref->file(),ref->anchor()); + if (!ref->hasLinkText()) filter(ref->targetTitle()); + } + void visitPost(DocRef *) + { + endLink(); + } + void visitPre(DocSecRefItem *) + { + // TODO + } + void visitPost(DocSecRefItem *) + { + // TODO + } + void visitPre(DocSecRefList *) + { + // TODO + } + void visitPost(DocSecRefList *) + { + // TODO + } + void visitPre(DocLanguage *) + { + // TODO + } + void visitPost(DocLanguage *) + { + // TODO + } + void visitPre(DocParamSect *s) + { + m_t << "
    "; + switch(s->type()) + { + case DocParamSect::Param: + m_t << theTranslator->trParameters(); break; + case DocParamSect::RetVal: + m_t << theTranslator->trReturnValues(); break; + case DocParamSect::Exception: + m_t << theTranslator->trExceptions(); break; + } + m_t << ":"; + m_t << "
    " << endl; + m_t << " " << endl; + } + void visitPost(DocParamSect *) + { + m_t << "
    " << endl; + m_t << "
    " << endl; + } + void visitPre(DocParamList *pl) + { + m_t << " "; + QStrListIterator li(pl->parameters()); + const char *s; + bool first=TRUE; + for (li.toFirst();(s=li.current());++li) + { + if (!first) m_t << ","; else first=FALSE; + m_t << s; + } + m_t << " "; + } + void visitPost(DocParamList *) + { + m_t << "" << endl; + } + void visitPre(DocXRefItem *x) + { + m_t << "
    file() << Doxygen::htmlFileExtension << "#" << x->anchor() << "\">" + << x->title() << ":
    "; + } + void visitPost(DocXRefItem *) + { + m_t << "
    " << endl; + } + void visitPre(DocInternalRef *ref) + { + startLink(0,ref->file(),ref->anchor()); + } + void visitPost(DocInternalRef *) + { + endLink(); + } + + private: + void filter(const char *str) + { + if (str==0) return; + const char *p=str; + char c; + while (*p) + { + c=*p++; + switch(c) + { + case '<': m_t << "<"; break; + case '>': m_t << ">"; break; + case '&': m_t << "&"; break; + default: m_t << c; + } + } + } + + void startLink(const QCString &ref,const QCString &file,const QCString &anchor) + { + QCString *dest; + if (!ref.isEmpty()) // link to entity imported via tag file + { + m_t << ""; + } + void endLink() + { + m_t << " "; + } + QTextStream &m_t; + BaseCodeDocInterface &m_ci; + bool m_insidePre; + bool m_hide; +}; + +#endif diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index a8291fc..37cd81f 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -30,6 +30,7 @@ #include "dot.h" #include "language.h" #include "htmlhelp.h" +#include "htmldocvisitor.h" // #define GROUP_COLOR "#ff8080" @@ -202,7 +203,10 @@ void HtmlGenerator::startFile(const char *name,const char *, //printf("HtmlGenerator::startFile(%s)\n",name); QCString fileName=name; lastTitle=title; - if (fileName.right(htmlFileExtensionLength)!=htmlFileExtension) fileName+=htmlFileExtension; + if (fileName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension) + { + fileName+=Doxygen::htmlFileExtension; + } startPlainFile(fileName); if (Config_getBool("GENERATE_HTMLHELP")) { @@ -383,7 +387,7 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f, { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - if (f) t << f << htmlFileExtension << "\">"; + if (f) t << f << Doxygen::htmlFileExtension << "\">"; } else { @@ -409,7 +413,7 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f, { t << "
  • "; if (path) docify(path); - t << ""; + t << ""; docify(name); t << " "; //if (Config_getBool("GENERATE_HTMLHELP") && f) @@ -438,7 +442,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f, { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - if (f) t << f << htmlFileExtension; + if (f) t << f << Doxygen::htmlFileExtension; if (anchor) t << "#" << anchor; t << "\">"; docify(name); @@ -465,7 +469,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, { if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; } - if (f) t << f << htmlFileExtension; + if (f) t << f << Doxygen::htmlFileExtension; if (anchor) t << "#" << anchor; t << "\">"; docify(name); @@ -476,7 +480,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, void HtmlGenerator::startTextLink(const char *f,const char *anchor) { t << ""; } @@ -547,7 +551,10 @@ void HtmlGenerator::writeSectionRef(const char *ref,const char *name, QCString *dest; //printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title); QCString refName=name; - if (refName.right(htmlFileExtensionLength)!=htmlFileExtension) refName+=htmlFileExtension; + if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension) + { + refName+=Doxygen::htmlFileExtension; + } t << ""; docify(title); t << ""; @@ -1229,3 +1239,14 @@ void HtmlGenerator::endSectionRefList() t << "" << endl; } +void HtmlGenerator::printDoc(DocNode *n) +{ +#ifdef ENABLE_NEW_PARSER + HtmlDocVisitor *visitor = new HtmlDocVisitor(t,*this); + n->accept(visitor); + delete visitor; +#else + n=n; +#endif +} + diff --git a/src/htmlgen.h b/src/htmlgen.h index 6f93ca4..6297fc0 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -43,6 +43,9 @@ class HtmlGenerator : public OutputGenerator void disableIfNot(OutputType o) { if (o!=Html) active=FALSE; } bool isEnabled(OutputType o) { return (o==Html && active); } OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; } + + void printDoc(DocNode *); + //void generateExternalIndex(); void startFile(const char *name,const char *manName, @@ -267,6 +270,9 @@ class HtmlGenerator : public OutputGenerator void startSectionRefList(); void endSectionRefList(); + void writeCodeAnchor(const char *anchor) + { t << ""; } + private: QCString lastTitle; QCString lastFile; diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 4ca6188..33fdf40 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -178,7 +178,7 @@ void HtmlHelpIndex::writeFields(QTextStream &t) if (level2.isEmpty()) { t << "
  • "; - t << "url << htmlFileExtension; + t << "url << Doxygen::htmlFileExtension; if (!f->anchor.isEmpty()) t << "#" << f->anchor; t << "\">"; t << "" @@ -189,7 +189,7 @@ void HtmlHelpIndex::writeFields(QTextStream &t) if (f->link) { t << "
  • "; - t << "url << htmlFileExtension << "\">"; + t << "url << Doxygen::htmlFileExtension << "\">"; t << "" "\n"; } @@ -215,7 +215,7 @@ void HtmlHelpIndex::writeFields(QTextStream &t) if (level2Started) { t << "
  • "; - t << "url << htmlFileExtension; + t << "url << Doxygen::htmlFileExtension; if (!f->anchor.isEmpty()) t << "#" << f->anchor; t << "\">"; t << "" @@ -385,8 +385,8 @@ void HtmlHelp::createProjectFile() - QCString indexName="index"+htmlFileExtension; - if (Config_getBool("GENERATE_TREEVIEW")) indexName="main"+htmlFileExtension; + QCString indexName="index"+Doxygen::htmlFileExtension; + if (Config_getBool("GENERATE_TREEVIEW")) indexName="main"+Doxygen::htmlFileExtension; t << "[OPTIONS]\n"; if (!Config_getString("CHM_FILE").isEmpty()) { @@ -500,7 +500,7 @@ void HtmlHelp::addContentsItem(bool isDir, cts << ""; if (ref) // made ref optional param - KPW { - cts << ""; } diff --git a/src/index.cpp b/src/index.cpp index ac20381..69a19ae 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -181,11 +181,11 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) if (!compact) ol.writeListItem(); if (Config_getBool("GENERATE_TREEVIEW")) { - ol.startQuickIndexItem(extLink,"main"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"main"+Doxygen::htmlFileExtension); } else { - ol.startQuickIndexItem(extLink,"index"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"index"+Doxygen::htmlFileExtension); } parseText(ol,theTranslator->trMainPage()); ol.endQuickIndexItem(); @@ -193,21 +193,21 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) //if (documentedPackages>0) //{ // if (!compact) ol.writeListItem(); - // ol.startQuickIndexItem(extLink,"packages"+htmlFileExtension); + // ol.startQuickIndexItem(extLink,"packages"+Doxygen::htmlFileExtension); // parseText(ol,theTranslator->trPackages()); // ol.endQuickIndexItem(); //} if (documentedGroups>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"modules"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"modules"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trModules()); ol.endQuickIndexItem(); } if (documentedNamespaces>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"namespaces"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"namespaces"+Doxygen::htmlFileExtension); if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) { parseText(ol,theTranslator->trPackages()); @@ -221,7 +221,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) if (hierarchyClasses>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"hierarchy"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"hierarchy"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trClassHierarchy()); ol.endQuickIndexItem(); } @@ -230,68 +230,68 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) if (Config_getBool("ALPHABETICAL_INDEX")) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"classes"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"classes"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trAlphabeticalList()); ol.endQuickIndexItem(); } if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"annotated"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"annotated"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trCompoundList()); ol.endQuickIndexItem(); } if (documentedHtmlFiles>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"files"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"files"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trFileList()); ol.endQuickIndexItem(); } //if (documentedIncludeFiles>0 && Config_getBool("VERBATIM_HEADERS")) //{ // if (!compact) ol.writeListItem(); - // ol.startQuickIndexItem(extLink,"headers"+htmlFileExtension); + // ol.startQuickIndexItem(extLink,"headers"+Doxygen::htmlFileExtension); // parseText(ol,theTranslator->trHeaderFiles()); // ol.endQuickIndexItem(); //} //if (Config_getBool("SOURCE_BROWSER")) //{ // if (!compact) ol.writeListItem(); - // ol.startQuickIndexItem(extLink,"sources"+htmlFileExtension); + // ol.startQuickIndexItem(extLink,"sources"+Doxygen::htmlFileExtension); // parseText(ol,theTranslator->trSources()); // ol.endQuickIndexItem(); //} if (documentedNamespaceMembers>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"namespacemembers"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"namespacemembers"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trNamespaceMembers()); ol.endQuickIndexItem(); } if (documentedMembers>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"functions"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"functions"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trCompoundMembers()); ol.endQuickIndexItem(); } if (documentedFunctions>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"globals"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"globals"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trFileMembers()); ol.endQuickIndexItem(); } if (indexedPages>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"pages"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"pages"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trRelatedPages()); ol.endQuickIndexItem(); } if (Doxygen::exampleSDict->count()>0) { if (!compact) ol.writeListItem(); - ol.startQuickIndexItem(extLink,"examples"+htmlFileExtension); + ol.startQuickIndexItem(extLink,"examples"+Doxygen::htmlFileExtension); parseText(ol,theTranslator->trExamples()); ol.endQuickIndexItem(); } @@ -1430,7 +1430,7 @@ void writeAlphabeticalIndex(OutputList &ol) if (annotatedClasses==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - startFile(ol,"classes"+htmlFileExtension,0,"Alphabetical index"); + startFile(ol,"classes"+Doxygen::htmlFileExtension,0,"Alphabetical index"); startTitle(ol,0); parseText(ol,Config_getString("PROJECT_NAME")+" "+theTranslator->trCompoundIndex()); endTitle(ol,0,0); @@ -2065,7 +2065,7 @@ void writeExampleIndex(OutputList &ol) for (pdi.toFirst();(pi=pdi.current());++pdi) { ol.writeListItem(); - QCString n=convertNameToFile(pi->name+"-example"); + QCString n=pi->getOutputFileBase(); if (!pi->title.isEmpty()) { ol.writeObjectLink(0,n,0,pi->title); @@ -2529,11 +2529,11 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) { if(htmlHelp) { - htmlHelp->addContentsItem(FALSE,convertToHtml(pi->name),convertNameToFile(pi->name+"-example")); + htmlHelp->addContentsItem(FALSE,pi->getReference(),pi->getOutputFileBase()); } if(ftvHelp) { - ftvHelp->addContentsItem(FALSE,pi->getReference(),convertToHtml(pi->name+"-example"),0,convertNameToFile(pi->name)); + ftvHelp->addContentsItem(FALSE,pi->getReference(),pi->getOutputFileBase(),0,pi->name); } pi=++eli; } diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 45e26e7..987538b 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -784,12 +784,12 @@ void LatexGenerator::endIndexSection(IndexSections is) PageInfo *pi=pdi.toFirst(); if (pi) { - t << "\\input{" << convertNameToFile(pi->name+"-example") << "}\n"; + t << "\\input{" << pi->getOutputFileBase() << "}\n"; } for (++pdi;(pi=pdi.current());++pdi) { if (compactLatex) t << "\\input" ; else t << "\\include"; - t << "{" << convertNameToFile(pi->name+"-example") << "}\n"; + t << "{" << pi->getOutputFileBase() << "}\n"; } } break; @@ -803,13 +803,8 @@ void LatexGenerator::endIndexSection(IndexSections is) { if (!pi->getGroupDef() && !pi->isReference()) { - QCString pageName; - if (Config_getBool("CASE_SENSE_NAMES")) - pageName=pi->name.copy(); - else - pageName=pi->name.lower(); if (compactLatex || first) t << "\\input" ; else t << "\\include"; - t << "{" << pageName << "}\n"; + t << "{" << pi->getOutputFileBase() << "}\n"; first=FALSE; } } diff --git a/src/latexgen.h b/src/latexgen.h index 6ce7785..cf36929 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -284,6 +284,8 @@ class LatexGenerator : public OutputGenerator void startSectionRefList(); void endSectionRefList(); + void writeCodeAnchor(const char *) {} + private: void latin2ToLatex(unsigned char); LatexGenerator(const LatexGenerator &); diff --git a/src/mangen.h b/src/mangen.h index d81242a..35439d6 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -251,6 +251,8 @@ class ManGenerator : public OutputGenerator void startSectionRefList() {} void endSectionRefList() {} + void writeCodeAnchor(const char *) {} + private: bool firstCol; bool paragraph; diff --git a/src/memberdef.cpp b/src/memberdef.cpp index a00fcf1..64aeb4c 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -1704,7 +1704,7 @@ void MemberDef::addListReference(Definition *d) } //printf("*** addListReference %s todo=%d test=%d bug=%d\n",name().data(),todoId(),testId(),bugId()); addRefItem(specialListItems(),memLabel, - d->getOutputFileBase()+":"+anchor(),memName,argsString()); + d->getOutputFileBase()+"#"+anchor(),memName,argsString()); } MemberList *MemberDef::getSectionList(Definition *d) const diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 48e1814..76854bf 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -239,7 +239,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) { Doxygen::tagFile << " " << endl; Doxygen::tagFile << " " << convertToXML(name()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(getOutputFileBase()) << htmlFileExtension << "" << endl; + Doxygen::tagFile << " " << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "" << endl; } ol.startTextBlock(); diff --git a/src/outputgen.h b/src/outputgen.h index 6452f3b..7390e45 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -30,6 +30,41 @@ class ClassDiagram; class DotClassGraph; class DotInclDepGraph; class DotGfxHierarchyTable; +class DocNode; +class MemberDef; + +/*! \brief Output interface for code parser. + */ +class BaseCodeDocInterface +{ + public: + /*! Writes an ASCII string to the output. This function should keep + * spaces visible, should break lines at a newline and should convert + * tabs to the right number of spaces. + */ + virtual void codify(const char *s) = 0; + + /*! Writes a link to an object in a code fragment. + * \param ref If this is non-zero, the object is to be found in + * an external documentation file. + * \param file The file in which the object is located. + * \param anchor The anchor uniquely identifying the object within + * the file. + * \param name The text to display as a placeholder for the link. + */ + virtual void writeCodeLink(const char *ref,const char *file, + const char *anchor,const char *name) = 0; + + virtual void writeLineNumber(const char *ref,const char *file, + const char *anchor,int lineNumber) = 0; + virtual void startCodeLine() = 0; + virtual void endCodeLine() = 0; + virtual void startCodeAnchor(const char *label) = 0; + virtual void endCodeAnchor() = 0; + virtual void startFontClass(const char *) = 0; + virtual void endFontClass() = 0; + virtual void writeCodeAnchor(const char *name) = 0; +}; /*! \brief Base Interface used for generating documentation. * @@ -38,7 +73,7 @@ class DotGfxHierarchyTable; * or a list of formats (see OutputList). This interface * contains functions that generate output. */ -class BaseOutputDocInterface +class BaseOutputDocInterface : public BaseCodeDocInterface { public: enum ParamListTypes { Param, RetVal, Exception }; @@ -50,6 +85,10 @@ class BaseOutputDocInterface Examples }; + virtual void parseDoc(const char *,int, const char *,MemberDef *, + const QCString &) + {} + /*! Start of a bullet list: e.g. \c
      in html. writeListItem() is * Used for the bullet items. */ @@ -101,16 +140,6 @@ class BaseOutputDocInterface virtual void writeObjectLink(const char *ref,const char *file, const char *anchor, const char *name) = 0; - /*! Writes a link to an object in a code fragment. - * \param ref If this is non-zero, the object is to be found in - * an external documentation file. - * \param file The file in which the object is located. - * \param anchor The anchor uniquely identifying the object within - * the file. - * \param name The text to display as a placeholder for the link. - */ - virtual void writeCodeLink(const char *ref,const char *file, - const char *anchor,const char *name) = 0; /*! Starts a (link to an) URL found in the documentation. * \param url The URL to link to. @@ -260,14 +289,6 @@ class BaseOutputDocInterface virtual void endPageRef(const char *,const char *) = 0; - virtual void writeLineNumber(const char *ref,const char *file, - const char *anchor,int lineNumber) = 0; - virtual void startCodeLine() = 0; - virtual void endCodeLine() = 0; - virtual void startCodeAnchor(const char *label) = 0; - virtual void endCodeAnchor() = 0; - virtual void startFontClass(const char *) = 0; - virtual void endFontClass() = 0; virtual void startHtmlOnly() = 0; virtual void endHtmlOnly() = 0; @@ -277,11 +298,6 @@ class BaseOutputDocInterface virtual void startSectionRefList() = 0; virtual void endSectionRefList() = 0; - /*! Writes an ASCII string to the output. This function should keep - * spaces visible, should break lines at a newline and should convert - * tabs to the right number of spaces. - */ - virtual void codify(const char *s) = 0; }; @@ -318,6 +334,8 @@ class OutputGenerator : public BaseOutputDocInterface void pushGeneratorState(); void popGeneratorState(); + virtual void printDoc(DocNode *) {} + /////////////////////////////////////////////////////////////// // structural output interface /////////////////////////////////////////////////////////////// diff --git a/src/outputlist.cpp b/src/outputlist.cpp index d0a2114..7374aff 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -27,6 +27,8 @@ #include "config.h" #include "message.h" +#include "docparser.h" + OutputList::OutputList(bool) { //printf("OutputList::OutputList()\n"); @@ -189,6 +191,23 @@ void OutputList::popGeneratorState() } } +void OutputList::parseDoc(const char *fileName,int startLine, + const char * clName,MemberDef * /*md*/, + const QCString &docStr) +{ + DocNode *root = validatingParseDoc(fileName,startLine,clName,docStr); + + OutputGenerator *og=outputs->first(); + while (og) + { + if (og->isEnabled()) og->printDoc(root); + og=outputs->next(); + } + + delete root; +} + + //-------------------------------------------------------------------------- // Create some overloaded definitions of the forall function. // Using template functions here would have made it a little less diff --git a/src/outputlist.h b/src/outputlist.h index 2dc34af..918d373 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -46,6 +46,7 @@ class OutputList : public OutputDocInterface OutputList &operator=(const OutputList &ol); OutputList &operator+=(const OutputList &ol); + void add(const OutputGenerator *); void disableAllBut(OutputGenerator::OutputType o); @@ -57,10 +58,14 @@ class OutputList : public OutputDocInterface void pushGeneratorState(); void popGeneratorState(); + ////////////////////////////////////////////////// // OutputDocInterface implementation ////////////////////////////////////////////////// + void parseDoc(const char *fileName,int startLine, + const char *clName,MemberDef *md,const QCString &docStr); + OutputDocInterface *clone() { return new OutputList(this); @@ -457,6 +462,8 @@ class OutputList : public OutputDocInterface void endSectionRefList() { forall(&OutputGenerator::endSectionRefList); } + void writeCodeAnchor(const char *name) + { forall(&OutputGenerator::writeCodeAnchor,name); } #if 0 void startPlainFile(const char *name) { forall(&OutputGenerator::startPlainFile,name); } diff --git a/src/page.h b/src/page.h index d2ad7c4..303d43c 100644 --- a/src/page.h +++ b/src/page.h @@ -41,8 +41,7 @@ class PageInfo QCString fileName; // functions to get a uniform interface with Definitions - QCString getOutputFileBase() const - { return fileName; } + QCString getOutputFileBase() const { return fileName; } bool isReference() const { return !reference.isEmpty(); } QCString getReference() const { return reference; } diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index f20099a..20595bc 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -34,6 +34,11 @@ class PrintDocVisitor : public DocVisitor indent_leaf(); printf("%s",w->word().data()); } + void visit(DocLinkedWord *w) + { + indent_leaf(); + printf("%s",w->word().data()); + } void visit(DocWhiteSpace *w) { indent_leaf(); @@ -137,11 +142,6 @@ class PrintDocVisitor : public DocVisitor case DocVerbatim::LatexOnly: printf(""); break; } } - void visit(DocXRefItem *x) - { - indent_leaf(); - printf("",x->id()); - } void visit(DocAnchor *a) { indent_leaf(); @@ -181,7 +181,7 @@ class PrintDocVisitor : public DocVisitor void visit(DocFormula *f) { indent_leaf(); - printf("",f->id()); + printf("",f->name().data(),f->text().data()); } //-------------------------------------- @@ -244,11 +244,12 @@ class PrintDocVisitor : public DocVisitor { indent_pre(); printf("parameters()); - const char *s; - bool first=TRUE; - for (li.toFirst();(s=li.current());++li) - { - if (!first) printf(","); else first=FALSE; - printf("%s",s); - } - printf("]"); - } - break; - case DocSimpleSect::RetVal: - { - printf("retval["); - QStrListIterator li(s->parameters()); - const char *s; - bool first=TRUE; - for (li.toFirst();(s=li.current());++li) - { - if (!first) printf(","); else first=FALSE; - printf("%s",s); - } - printf("]"); - } - break; - case DocSimpleSect::Exception: printf("exception"); break; - { - printf("exception["); - QStrListIterator li(s->parameters()); - const char *s; - bool first=TRUE; - for (li.toFirst();(s=li.current());++li) - { - if (!first) printf(","); else first=FALSE; - printf("%s",s); - } - printf("]"); - } - break; case DocSimpleSect::Unknown: printf("unknown"); break; } printf(">\n"); @@ -517,7 +476,8 @@ class PrintDocVisitor : public DocVisitor void visitPre(DocLink *lnk) { indent_pre(); - printf("\n",lnk->target().data()); + printf("\n", + lnk->ref().data(),lnk->file().data(),lnk->anchor().data()); } void visitPost(DocLink *) { @@ -527,7 +487,12 @@ class PrintDocVisitor : public DocVisitor void visitPre(DocRef *ref) { indent_pre(); - printf("\n",ref->target().data()); + printf("\n", + ref->ref().data(),ref->file().data(),ref->anchor().data(), + ref->targetTitle().data(),ref->hasLinkText()?"yes":"no", + ref->refToAnchor()?"yes":"no", ref->refToSection()?"yes":"no"); } void visitPost(DocRef *) { @@ -564,6 +529,61 @@ class PrintDocVisitor : public DocVisitor indent_post(); printf("\n"); } + void visitPre(DocParamList *pl) + { + indent_pre(); + QStrListIterator sli(pl->parameters()); + const char *s; + printf(""); + for (sli.toFirst();(s=sli.current());++sli) + { + printf("%s",s); + } + } + void visitPost(DocParamList *) + { + indent_post(); + printf(""); + } + void visitPre(DocParamSect *ps) + { + indent_pre(); + printf(""); + } + void visitPost(DocParamSect *) + { + indent_post(); + printf(""); + } + void visitPre(DocXRefItem *x) + { + indent_pre(); + printf("", + x->file().data(),x->anchor().data(),x->title().data()); + } + void visitPost(DocXRefItem *) + { + indent_post(); + printf(""); + } + void visitPre(DocInternalRef *r) + { + indent_pre(); + printf("\n",r->file().data(),r->anchor().data()); + } + void visitPost(DocInternalRef *) + { + indent_post(); + printf("\n"); + } private: // helper functions diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 0dfb1a4..8583856 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -116,6 +116,7 @@ RTFGenerator::RTFGenerator() : OutputGenerator() m_listLevel = 0; m_bstartedBody = FALSE; m_omitParagraph = FALSE; + m_numCols = 0; } RTFGenerator::~RTFGenerator() @@ -129,7 +130,6 @@ void RTFGenerator::append(const OutputGenerator *g) //insideTabbing=insideTabbing || ((RTFGenerator *)g)->insideTabbing; m_listLevel=((RTFGenerator *)g)->m_listLevel; m_omitParagraph=((RTFGenerator *)g)->m_omitParagraph; - m_columnNumbers=((RTFGenerator *)g)->m_columnNumbers; //printf("RTFGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), // insideTabbing ? "TRUE" : "FALSE" ); } @@ -1336,7 +1336,7 @@ void RTFGenerator::endIndexSection(IndexSections is) { t << "\\par " << Rtf_Style_Reset << endl; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; - t << convertNameToFile(pi->name+"-example"); + t << pi->getOutputFileBase(); t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; } for (++pdi;(pi=pdi.current());++pdi) @@ -1344,7 +1344,7 @@ void RTFGenerator::endIndexSection(IndexSections is) t << "\\par " << Rtf_Style_Reset << endl; beginRTFSection(); t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; - t << convertNameToFile(pi->name+"-example"); + t << pi->getOutputFileBase(); t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; } } @@ -1359,14 +1359,9 @@ void RTFGenerator::endIndexSection(IndexSections is) { if (!pi->getGroupDef() && !pi->isReference()) { - QCString pageName; - if (Config_getBool("CASE_SENSE_NAMES")) - pageName=pi->name.copy(); - else - pageName=pi->name.lower(); if (first) t << "\\par " << Rtf_Style_Reset << endl; t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; - t << pageName; + t << pi->getOutputFileBase(); t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; first=FALSE; } @@ -1667,8 +1662,8 @@ void RTFGenerator::endSubsubsection() void RTFGenerator::startTable(bool,int colNumbers) { - m_columnNumbers=colNumbers; - t<<"\\par\n"; + m_numCols=colNumbers; + t << "\\par\n"; } void RTFGenerator::endTable(bool hasCaption) @@ -1681,8 +1676,8 @@ void RTFGenerator::endTable(bool hasCaption) void RTFGenerator::startCaption() { endTableRow(); - t<<"\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10"<0 && m_numCols<25); + uint columnWidth=PAGEWIDTH/m_numCols; + t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 " + "\\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 " + "\\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 " + "\\trbrdrv\\brdrs\\brdrw10 "<getRefItem(lii->itemId); + ASSERT(item!=0); item->text += "

      "; item->text += current->brief; } else // new item { int itemId = refList->addRefItem(); - char anchorLabel[12]; + char anchorLabel[1024]; sprintf(anchorLabel,"_%s%06d",listName,itemId); RefItem *item = refList->getRefItem(itemId); + ASSERT(item!=0); item->text = current->brief.copy(); item->listAnchor = anchorLabel; current->addSpecialListItem(listName,itemId); @@ -3781,15 +3783,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) {CMD}{CMD}"endif"/[^a-z_A-Z0-9] { current->brief+=yytext; } /* conditional commands */ -{CMD}"if"{B}+ { +{CMD}"if"{B}+ { lastIfContext = YY_START; BEGIN(IfGuard); } -{CMD}"ifnot"{B}+ { +{CMD}"ifnot"{B}+ { lastIfContext = YY_START; BEGIN(IfNotGuard); } -{CMD}"if"(\r?)\n | +{CMD}"if"(\r?)\n | \n { warn(yyFileName,yyLineNr,"Missing guard for if statement!"); yyLineNr++; @@ -3850,33 +3852,33 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) yyLineNr++; } "//"|"*/" -{CMD}"elseif"/[^a-z_A-Z0-9] { +{CMD}"elseif"/[^a-z_A-Z0-9] { // previous section enabled => skip now depthIf=1; BEGIN(SkipSection); } -{CMD}"else"/[^a-z_A-Z0-9] { +{CMD}"else"/[^a-z_A-Z0-9] { // section was enabled => skip now depthIf=1; BEGIN(SkipSection); } -{CMD}"endif"/[^a-z_A-Z0-9] { +{CMD}"endif"/[^a-z_A-Z0-9] { // section enabled => absorb endif } -{CMD}"ingroup"{B}+ { +{CMD}"ingroup"{B}+ { lastGroupContext = YY_START; lineCount(); BEGIN( GroupName ); } -{CMD}"nosubgrouping"/[^a-z_A-Z0-9] { +{CMD}"nosubgrouping"/[^a-z_A-Z0-9] { current->subGrouping = FALSE; } -{CMD}"showinitializer"/[^a-z_A-Z0-9] { +{CMD}"showinitializer"/[^a-z_A-Z0-9] { current->initLines = 100000; // ON } -{CMD}"hideinitializer"/[^a-z_A-Z0-9] { +{CMD}"hideinitializer"/[^a-z_A-Z0-9] { current->initLines = 0; // OFF } {ID} { @@ -4478,7 +4480,9 @@ static void parseCompounds(Entry *rt) // set default protection based on the compound type if( ce->section==Entry::CLASS_SEC ) // class { - if (ce->fileName.right(5)==".java" || ce->fileName.right(4)==".php") + if (ce->fileName.right(5)==".java" || + ce->fileName.right(4)==".php" || + ce->fileName.right(4)==".inc") current->protection = protection = Public ; // Actually this should be package scope! else current->protection = protection = Private ; diff --git a/src/translator_it.h b/src/translator_it.h index 9766eb9..7ea9978 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -19,6 +19,7 @@ * * Revision history * + * 2002/08: translated new items used since version 1.2.17 * 2002/07: translated new items used since version 1.2.16 * 2002/06: modified trRelatedPagesDescription() method * correct typo in trInclByDepGraph() method @@ -65,7 +66,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public TranslatorAdapter_1_2_17 +class TranslatorItalian : public Translator { public: @@ -1358,6 +1359,17 @@ class TranslatorItalian : public TranslatorAdapter_1_2_17 return "Sommario"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Lista degli elementi deprecati"; + } }; #endif diff --git a/src/translator_pl.h b/src/translator_pl.h index 4951a6f..7d16654 100644 --- a/src/translator_pl.h +++ b/src/translator_pl.h @@ -13,7 +13,7 @@ * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * - * Polish translation was updated to version 1.2.16 by + * Polish translation was updated to version 1.2.17 by * Piotr Kaminski (Piotr.Kaminski@ctm.gdynia.pl) */ @@ -22,7 +22,7 @@ #include "translator_adapter.h" -class TranslatorPolish : public TranslatorAdapter_1_2_16 +class TranslatorPolish : public TranslatorAdapter_1_2_17 { public: @@ -82,7 +82,16 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 /*! header that is put before the list of member attributes. */ QCString trMemberDataDocumentation() - { return "Dokumentacja Atrybutów Składowych"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentacja Pól"; + } + else + { + return "Dokumentacja Atrybutów Składowych"; + } + } /*! this is the text of a link put after brief descriptions. */ QCString trMore() @@ -146,7 +155,16 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 /*! This is put above each page as a link to the list of annotated classes */ QCString trCompoundList() - { return "Lista Klas"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Struktury Danych"; + } + else + { + return "Lista Klas"; + } + } /*! This is put above each page as a link to the list of documented files */ QCString trFileList() @@ -158,11 +176,29 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 /*! This is put above each page as a link to all members of compounds. */ QCString trCompoundMembers() - { return "Składowe Klas"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Pola Danych"; + } + else + { + return "Składowe Klas"; + } + } /*! This is put above each page as a link to all members of files. */ QCString trFileMembers() - { return "Składowe Plików"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globalne"; + } + else + { + return "Składowe Plików"; + } + } /*! This is put above each page as a link to all related pages. */ QCString trRelatedPages() @@ -193,20 +229,58 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 /*! This is an introduction to the annotated compound list. */ QCString trCompoundListDescription() - { return "Tutaj znajdują się klasy, struktury, " + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Tutaj znajdują się struktury danych wraz z ich krótkimi opisami:"; + } + else + { + return "Tutaj znajdują się klasy, struktury, " "unie i interfejsy wraz z ich krótkimi opisami:"; + } } /*! This is an introduction to the page with all class members. */ QCString trCompoundMembersDescription(bool extractAll) { QCString result="Tutaj znajduje się lista wszystkich "; - if (!extractAll) result+="udokumentowanych "; - result+="składowych wraz z odnośnikami do "; + if (!extractAll) + { + result+="udokumentowanych "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="pól struktur i unii"; + } + else + { + result+="składowych"; + } + result+=" wraz z odnośnikami do "; if (extractAll) - result+="dokumentacji klas dla każdej składowej:"; + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="dokumentacji struktur/unii dla każdego pola:"; + } + else + { + result+="dokumentacji klas dla każdej składowej:"; + } + } else - result+="klas, do których dana składowa należy:"; + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struktur/unii, do których dane pole należy:"; + } + else + { + result+="klas, do których dana składowa należy:"; + } + } return result; } @@ -215,11 +289,19 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 { QCString result="Tutaj znajduje się lista wszystkich "; if (!extractAll) result+="udokumentowanych "; - result+="składowych wraz z odnośnikami do "; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funkcji, zmiennych, makr, wyliczeń i definicji typów"; + } + else + { + result+="składowych plików"; + } + result+=" wraz z odnośnikami do "; if (extractAll) - result+="dokumentacji plików dla każdej składowej:"; + result+="plików, do których one należą:"; else - result+="plików, do których dana składowa należy:"; + result+="dokumentacji:"; return result; } @@ -268,7 +350,16 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 * annotated compound index. */ QCString trCompoundIndex() - { return "Indeks Klas"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Indeks Struktur Danych"; + } + else + { + return "Indeks Klas"; + } + } /*! This is used in LaTeX as the title of the chapter with the * list of all files. @@ -286,7 +377,16 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 * the documentation of all classes, structs and unions. */ QCString trClassDocumentation() - { return "Dokumentacja Klas"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentacja Struktur Danych"; + } + else + { + return "Dokumentacja Klas"; + } + } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all files. @@ -402,7 +502,16 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 * the list of links to documented compounds */ QCString trCompounds() - { return "Komponenty"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Struktury Danych"; + } + else + { + return "Komponenty"; + } + } /*! This is used in the documentation of a group before the list of * links to documented files @@ -521,7 +630,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 ClassDef::CompoundType compType, bool isTemplate) { - QCString result="Referencje"; + QCString result="Dokumentacja"; if (isTemplate) result+=" Szablonu"; switch(compType) { @@ -538,7 +647,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 /*! used as the title of the HTML page of a file */ QCString trFileReference(const char *fileName) { - QCString result="Referencje Pliku "; + QCString result="Dokumentacja Pliku "; result+=fileName; return result; } @@ -546,7 +655,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 /*! used as the title of the HTML page of a namespace */ QCString trNamespaceReference(const char *namespaceName) { - QCString result="Referencje Przestrzeni Nazw "; + QCString result="Dokumentacja Przestrzeni Nazw "; result+=namespaceName; return result; } @@ -829,7 +938,14 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 } QCString trPublicAttribs() { - return "Atrybuty Publiczne"; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Pola Danych"; + } + else + { + return "Atrybuty Publiczne"; + } } QCString trStaticPublicAttribs() { @@ -881,7 +997,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 QCString trReferencedBy() { - return "Referencje według"; + return "Odwołania w"; } QCString trRemarks() { @@ -1210,7 +1326,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 */ virtual QCString trReferences() { - return "Wskazuje na"; + return "Odwołuje się do"; } @@ -1229,6 +1345,18 @@ class TranslatorPolish : public TranslatorAdapter_1_2_16 return "Implementowany w "+trWriteList(numEntries)+"."; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Spis Treści"; + } + }; #endif diff --git a/src/translator_sr.h b/src/translator_sr.h index 71d66d5..1934084 100644 --- a/src/translator_sr.h +++ b/src/translator_sr.h @@ -20,7 +20,7 @@ // translation by Dejan D. M. Milosavljevic ; -class TranslatorSerbian : public TranslatorAdapter_1_2_16 +class TranslatorSerbian : public TranslatorAdapter_1_2_17 { QCString decode(const QCString& sInput) { @@ -98,40 +98,40 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! header that is put before the list of member functions. */ virtual QCString trMemberFunctionDocumentation() - { return "Dokumentacija funkcija članica"; } + { return decode( "Dokumentacija funkcija članica" ); } /*! header that is put before the list of member attributes. */ virtual QCString trMemberDataDocumentation() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Dokumentacija članova"; + return decode( "Dokumentacija članova" ); } else { - return "Documentacija javnoh članova"; + return decode( "Dokumentacija javnih članova" ); } } /*! this is the text of a link put after brief descriptions. */ virtual QCString trMore() - { return "Još..."; } + { return decode( "Još..." ); } /*! put in the class documentation */ virtual QCString trListOfAllMembers() - { return "Spisak svih članova."; } + { return decode( "Spisak svih članova." ); } /*! used as the title of the "list of all members" page of a class */ virtual QCString trMemberList() - { return "Spisak članova"; } + { return decode( "Spisak članova" ); } /*! this is the first part of a sentence that is followed by a class name */ virtual QCString trThisIsTheListOfAllMembers() - { return "Ovo je spisak svih članova "; } + { return decode( "Ovo je spisak svih članova " ); } /*! this is the remainder of the sentence after the class name */ virtual QCString trIncludingInheritedMembers() - { return ", uključujući nasleđene članove."; } + { return decode( ", uključujući nasleđene članove." ); } /*! this is put at the author sections at the bottom of man pages. * parameter s is name of the project name. @@ -193,11 +193,11 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Svi članovi struktura"; - } + return decode( "Svi članovi struktura" ); + } else { - return "Svi članovi klasa"; + return decode( "Svi članovi klasa" ); } } @@ -206,29 +206,29 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Globalni"; + return decode("Članovi fajla"); } else { - return "Lokalni"; + return decode("Članovi fajla"); } } /*! This is put above each page as a link to all related pages. */ virtual QCString trRelatedPages() - { return "Stranice povezane s ovom"; } + { return decode( "Stranice povezane sa ovom" ); } /*! This is put above each page as a link to all examples. */ virtual QCString trExamples() - { return "Primeri"; } + { return decode( "Primeri" ); } /*! This is put above each page as a link to the search engine. */ virtual QCString trSearch() - { return "Traži"; } + { return decode( "Traži" ); } /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return "Stablo nasleđivanja je složeno ""približno po abecedi:"; } + { return decode( "Stablo nasleđivanja je složeno ""približno po abecedi:" ); } /*! This is an introduction to the list with all files. */ virtual QCString trFileListDescription(bool extractAll) @@ -236,7 +236,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 QCString result="Spisak svih "; if (!extractAll) result+="dokumetovanih "; result+="fajlova, sa kratkim opisom:"; - return result; + return decode( result ); } /*! This is an introduction to the annotated compound list. */ @@ -245,11 +245,11 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Spisak struktura sa kratkim opisom:"; + return decode( "Spisak struktura sa kratkim opisom:" ); } else { - return "Spisak klasa, struktura, unija i interjfejsa sa kratkim opisom:"; + return decode( "Spisak klasa, struktura, unija i interjfejsa sa kratkim opisom:" ); } } @@ -293,7 +293,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 result+="klase koje pripadaju:"; } } - return result; + return decode( result ); } /*! This is an introduction to the page with all file members. */ @@ -359,7 +359,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 * class hierarchy. */ virtual QCString trHierarchicalIndex() - { return "Hijerarhijski sadžraj"; } + { return decode( "Hijerarhijski sadžraj" ); } /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. @@ -423,7 +423,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! This is used in LaTeX as the title of the document */ virtual QCString trReferenceManual() - { return decode("Priručnik"); } + { return decode( "Priručnik" ); } /*! This is used in the documentation of a file as a header before the * list of defines @@ -549,11 +549,11 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! this text is generated when the \\internal command is used. */ virtual QCString trForInternalUseOnly() - { return decode( "Samo za unutrasnju upotrebu." ); } + { return decode( "Samo za unutrašnju upotrebu." ); } /*! this text is generated when the \\reimp command is used. */ virtual QCString trReimplementedForInternalReasons() - { return decode("Preurađeno zbog internih razloga; Nema uticaja na API." ); } + { return decode("Preurađeno zbog unutrašnjih razloga; Nema uticaja na API." ); } /*! this text is generated when the \\warning command is used. */ virtual QCString trWarning() @@ -573,11 +573,11 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! this text is generated when the \\return command is used. */ virtual QCString trReturns() - { return decode( "Vraćenene vrednosti" ); } + { return decode( "Vraćene vrednosti" ); } /*! this text is generated when the \\sa command is used. */ virtual QCString trSeeAlso() - { return "Takođe pogledati"; } + { return decode( "Takođe pogledati" ); } /*! this text is generated when the \\param command is used. */ virtual QCString trParameters() @@ -643,7 +643,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 case ClassDef::Interface: result+="interfejsa "; break; case ClassDef::Exception: result+="izuzetka "; break; } - if (isTemplate) result+="švablona "; + if (isTemplate) result += "šablona "; result += clName; return decode( result ); @@ -652,16 +652,16 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! used as the title of the HTML page of a file */ virtual QCString trFileReference(const char *fileName) { - QCString result=fileName; - result+=" Opis fajla"; + QCString result = "Opis fajla "; + result += fileName; return result; } /*! used as the title of the HTML page of a namespace */ virtual QCString trNamespaceReference(const char *namespaceName) { - QCString result=namespaceName; - result+=" Opis prostora imena"; + QCString result="Opis prostora imena "; + result += namespaceName; return result; } @@ -674,9 +674,9 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 virtual QCString trStaticPublicMembers() { return decode("Zajednički javni članovi"); } virtual QCString trProtectedMembers() - { return decode("Zastićeni članovi"); } + { return decode("Zaštićeni članovi"); } virtual QCString trProtectedSlots() - { return decode("Zastićeni slotovi"); } + { return decode("Zaštićeni slotovi"); } virtual QCString trStaticProtectedMembers() { return decode("Zajednički zaštićeni članovi"); } virtual QCString trPrivateMembers() @@ -757,7 +757,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 result+="dokumentaciju svakog člana prostora imena: "; else result+="prostor imena kojima pripadaju: "; - return result; + return decode( result ); } /*! This is used in LaTeX as the title of the chapter with the * index of all namespaces. @@ -792,16 +792,16 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 bool single) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file - QCString result=(QCString)"Dokumentacija ove "; + QCString result=(QCString)"Dokumentacija "; switch(compType) { - case ClassDef::Class: result+="klase"; break; - case ClassDef::Struct: result+="strukture"; break; - case ClassDef::Union: result+="unije"; break; - case ClassDef::Interface: result+="interfejsa"; break; - case ClassDef::Exception: result+="izuzetka"; break; + case ClassDef::Class: result+="ove klase"; break; + case ClassDef::Struct: result+="ove strukture"; break; + case ClassDef::Union: result+="ove unije"; break; + case ClassDef::Interface: result+="ovog interfejsa"; break; + case ClassDef::Exception: result+="ovog izuzetka"; break; } - result+=" je napravljen iz "; + result+=" je napravljena iz "; if (single) result+=":"; else result+=":"; return result; } @@ -818,7 +818,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! This is used as the heading text for the retval command. */ virtual QCString trReturnValues() - { return "Vraćena vrednost"; } + { return decode( "Vraćena vrednost" ); } /*! This is in the (quick) index as a link to the main page (index.html) */ @@ -904,7 +904,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! Text shown before a multi-line variable/enum initialization */ virtual QCString trInitialValue() { - return decode("Početna vriednost:"); + return decode( "Početna vriednost:" ); } /*! Text used the source code in the file index */ virtual QCString trCode() @@ -913,15 +913,15 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 } virtual QCString trGraphicalHierarchy() { - return decode("Grafičko prikaz stablo klasa"); + return decode("Grafički prikaz stabla klasa"); } virtual QCString trGotoGraphicalHierarchy() { - return decode("Prikaži grafičko stablo klasa"); + return decode("Prikaži stablo klasa u grafičkom obliku"); } virtual QCString trGotoTextualHierarchy() { - return decode( "Prikaži tekstualno stablo klasa" ); + return decode( "Prikaži stablo klasa u tekstualnom obliku" ); } virtual QCString trPageIndex() { @@ -944,11 +944,11 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Član"; + return decode( "Član" ); } else { - return "Javni član"; + return decode( "Javni član" ); } } virtual QCString trStaticPublicAttribs() @@ -973,11 +973,11 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 } virtual QCString trPrivateAttribs() { - return "Privatni članovi"; + return decode( "Privatni članovi" ); } virtual QCString trStaticPrivateAttribs() { - return decode("Zajednički privatni članovi"); + return decode( "Zajednički privatni članovi" ); } ////////////////////////////////////////////////////////////////////////// @@ -1001,7 +1001,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 virtual QCString trReferencedBy() { - return decode( "Korišćno od" ); + return decode( "Korišćeno od" ); } virtual QCString trRemarks() { @@ -1028,7 +1028,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! title of the graph legend page */ virtual QCString trLegendTitle() { - return decode( "Objasnjenje koriscenih simbola" ); + return decode( "Objašnjenje korišćenih simbola" ); } /*! page explaining how the dot graph's should be interpreted * The %A in the text below are to prevent link to classes called "A". @@ -1056,7 +1056,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 "class PrivateBase { };\n\n" "/*! Klasa koja je korišćena od drugih klasa*/\n" "class Used { };\n\n" - "/*! Super klasa koja naslijeđuje/koristi ostale */\n" + "/*! Nadklasa koja nasleđuje/koristi ostale */\n" "class Inherited : public PublicBase,\n" " protected ProtectedBase,\n" " private PrivateBase,\n" @@ -1078,9 +1078,9 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 "

    • Sa crnom ivicom predstavlja dokumentovanu strukturu ili klasu.\n" "
    • Sa sivom icivom predstavlja nedokumentovanu strukturu ili klasu.\n" "
    • Sa crvenom ivicom predstavlja dokumentovanu strukturu ili klasu\n" - "za koju nije prikazan graf naslijeđivanja/korišćenja. Graf je odsečen " + "za koju nije prikazan graf nasleđivanja/korišćenja. Graf je odsečen " "ako ne stane unutar određenih granica." - + "
    " "Strelice imaju sledeća značenja:\n" "
      \n" "
    • Tamnoplava strelica označava javno nasleđivanje.\n" @@ -1098,7 +1098,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 /*! text for the link to the legend page */ virtual QCString trLegend() { - return decode( "Objačnjenje koričćenih simbola" ); + return decode( "Objašnjenje korišćenih simbola" ); } ////////////////////////////////////////////////////////////////////////// @@ -1367,7 +1367,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 */ virtual QCString trReferences() { - return "Pogledati"; + return "Koristi"; } ////////////////////////////////////////////////////////////////////////// @@ -1379,7 +1379,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 */ virtual QCString trImplementedFromList(int numEntries) { - return "Definiše "+trWriteList(numEntries)+"."; + return decode( "Definiše "+trWriteList(numEntries)+"." ); } /*! used in member documentation blocks to produce a list of @@ -1387,14 +1387,28 @@ class TranslatorSerbian : public TranslatorAdapter_1_2_16 */ virtual QCString trImplementedInList(int numEntries) { - return "Definisano u "+trWriteList(numEntries)+"."; + return "Definisano u " + trWriteList(numEntries) + "." ; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return decode( "Sadržaj" ); + } + + + }; #endif -// sh - š -// dj - đ +// sh - š - shashavo +// dj - đ - djordje // ch - č - chasha -// cc - ć - vicc -// zz - ž +// cc - ć - cciccifu +// zz - ž - zzaba diff --git a/src/util.cpp b/src/util.cpp index 5b0ed19..5be38ca 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2274,92 +2274,61 @@ static bool isLowerCase(QCString &s) return TRUE; } -/*! - * generate a reference to a class, namespace or member. - * `scName' is the name of the scope that contains the documentation - * string that is returned. - * `name' is the name that we want to link to. - * `name' may have five formats: - * 1) "ScopeName" - * 2) "memberName()" one of the (overloaded) function or define - * with name memberName. - * 3) "memberName(...)" a specific (overloaded) function or define - * with name memberName - * 4) "::name a global variable or define - * 4) "#memberName member variable, global variable or define - * 5) ("ScopeName::")+"memberName()" - * 6) ("ScopeName::")+"memberName(...)" - * 7) ("ScopeName::")+"memberName" - * instead of :: the # symbol may also be used. - */ -bool generateRef(OutputDocInterface &od,const char *scName, - const char *name,bool inSeeBlock,const char *rt) + +/*! Returns an object to reference to given its name and context + * @post return value TRUE implies *resContext!=0 or *resMember!=0 + */ +bool resolveRef(/* in */ const char *scName, + /* in */ const char *name, + /* in */ bool inSeeBlock, + /* out */ Definition **resContext, + /* out */ MemberDef **resMember + ) { - //printf("generateRef(scName=%s,name=%s,rt=%s)\n",scName,name,rt); + //printf("resolveRef(scName=%s,name=%s,inSeeBlock=%d,rt=%s)\n",scName,name,inSeeBlock,rt); QCString tsName = name; bool memberScopeFirst = tsName.find('#')!=-1; - QCString tmpName = substitute(tsName,"#","::"); - QCString linkText = rt; - int scopePos=tmpName.findRev("::"); - int bracePos=tmpName.findRev('('); // reverse is needed for operator()(...) + QCString fullName = substitute(tsName,"#","::"); + int scopePos=fullName.findRev("::"); + int bracePos=fullName.findRev('('); // reverse is needed for operator()(...) + + // default result values + *resContext=0; + *resMember=0; + if (bracePos==-1) // simple name { ClassDef *cd=0; NamespaceDef *nd=0; - if (linkText.isEmpty()) - { - linkText=tmpName; - // strip :: prefix if present - if (linkText.at(0)==':' && linkText.at(1)==':') - { - linkText=linkText.right(linkText.length()-2); - } - } - if (scopePos==-1 && isLowerCase(tsName)) { // link to lower case only name => do not try to autolink - od.docify(linkText); - // text has been written, stop now. return FALSE; } //printf("scName=%s tmpName=%s\n",scName,tmpName.data()); // check if this is a class or namespace reference - if (scName!=tmpName && getScopeDefs(scName,name,cd,nd)) + if (scName!=fullName && getScopeDefs(scName,name,cd,nd)) { if (cd) // scope matches that of a class { - od.writeObjectLink(cd->getReference(), - cd->getOutputFileBase(),0,linkText); - if (!cd->isReference() /*&& !Config_getBool("PDF_HYPERLINKS")*/) - { - writePageRef(od,cd->getOutputFileBase(),0); - } + *resContext = cd; } else // scope matches that of a namespace { - od.writeObjectLink(nd->getReference(), - nd->getOutputFileBase(),0,linkText); - if (!nd->getReference() /*&& !Config_getBool("PDF_HYPERLINKS")*/) - { - writePageRef(od,nd->getOutputFileBase(),0); - } + ASSERT(nd!=0); + *resContext = nd; } - // link has been written, stop now. return TRUE; } - else if (scName==tmpName || (!inSeeBlock && scopePos==-1)) // nothing to link => output plain text + else if (scName==fullName || (!inSeeBlock && scopePos==-1)) // nothing to link => output plain text { - od.docify(linkText); - // text has been written, stop now. return FALSE; } // continue search... - linkText = rt; } // extract scope @@ -2368,22 +2337,15 @@ bool generateRef(OutputDocInterface &od,const char *scName, //printf("scopeContext=%s scopeUser=%s\n",scopeContext.data(),scopeUser.data()); // extract userscope+name - int endNamePos=bracePos!=-1 ? bracePos : tmpName.length(); - QCString nameStr=tmpName.left(endNamePos); + int endNamePos=bracePos!=-1 ? bracePos : fullName.length(); + QCString nameStr=fullName.left(endNamePos); // extract arguments QCString argsStr; - if (bracePos!=-1) argsStr=tmpName.right(tmpName.length()-bracePos); + if (bracePos!=-1) argsStr=fullName.right(fullName.length()-bracePos); - // create a default link text if none was explicitly given - if (linkText.isEmpty()) - { - //if (!scopeUser.isEmpty()) linkText=scopeUser+"::"; - linkText=nameStr; - if (linkText.left(2)=="::") linkText=linkText.right(linkText.length()-2); - } - //printf("scope=`%s' name=`%s' arg=`%s' linkText=`%s'\n", - // scopeStr.data(),nameStr.data(),argsStr.data(),linkText.data()); + //printf("scope=`%s' name=`%s' arg=`%s'\n", + // scopeStr.data(),nameStr.data(),argsStr.data()); // strip template specifier // TODO: match against the correct partial template instantiation @@ -2394,14 +2356,11 @@ bool generateRef(OutputDocInterface &od,const char *scName, nameStr=nameStr.left(templPos)+nameStr.right(nameStr.length()-endTemplPos-1); } - MemberDef *md = 0; - ClassDef *cd = 0; - FileDef *fd = 0; + MemberDef *md = 0; + ClassDef *cd = 0; + FileDef *fd = 0; NamespaceDef *nd = 0; - GroupDef *gd = 0; - - //printf("Try with scName=`%s' nameStr=`%s' argsStr=`%s'\n", - // scopeStr.data(),nameStr.data(),argsStr.data()); + GroupDef *gd = 0; // check if nameStr is a member or global. if (getDefs(scopeStr,nameStr,argsStr, @@ -2413,112 +2372,119 @@ bool generateRef(OutputDocInterface &od,const char *scName, ) { //printf("after getDefs md=%p cd=%p fd=%p nd=%p gd=%p\n",md,cd,fd,nd,gd); - QCString anchor; - if (md->isLinkable()) anchor = md->anchor(); - QCString cName,aName; - if (cd) // nameStr is a member of cd - { - //printf("addObjectLink(%s,%s,%s,%s)\n",cd->getReference(), - // cd->getOutputFileBase(),anchor.data(),resultName.stripWhiteSpace().data()); - od.writeObjectLink(cd->getReference(),cd->getOutputFileBase(), - anchor,linkText.stripWhiteSpace()); - cName=cd->getOutputFileBase(); - aName=md->anchor(); - } - else if (nd) // nameStr is a member of nd - { - //printf("writing namespace link\n"); - od.writeObjectLink(nd->getReference(),nd->getOutputFileBase(), - anchor,linkText.stripWhiteSpace()); - cName=nd->getOutputFileBase(); - aName=md->anchor(); - } - else if (fd) // nameStr is a global in file fd - { - //printf("addFileLink(%s,%s,%s)\n",fd->getOutputFileBase(),anchor.data(), - // resultName.stripWhiteSpace().data()); - od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(), - anchor,linkText.stripWhiteSpace()); - cName=fd->getOutputFileBase(); - aName=md->anchor(); - } - else if (gd) - { - //printf("addGroupLink(%s,%s,%s)\n",fd->getOutputFileBase().data(),anchor.data(), - // gd->name().data()); - od.writeObjectLink(gd->getReference(),gd->getOutputFileBase(), - anchor,linkText.stripWhiteSpace()); - cName=gd->getOutputFileBase(); - aName=md->anchor(); - } - else // should not be reached - { - //printf("add no link fd=cd=0\n"); - od.docify(linkText); - } + *resMember=md; + if (cd) *resContext=cd; + else if (nd) *resContext=nd; + else if (fd) *resContext=fd; + else if (gd) *resContext=gd; + else { *resContext=0; *resMember=0; return FALSE; } + return TRUE; + } + else if (inSeeBlock && !nameStr.isEmpty() && (gd=Doxygen::groupSDict[nameStr])) + { // group link + *resContext=gd; + return TRUE; + } - // for functions we add the arguments if explicitly specified or else "()" - if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot() || md->isDefine())) - { - if (argsStr.isEmpty() && (!md->isDefine() || md->argsString()!=0)) - // od.writeString("()") - ; - else - od.docify(argsStr); - } + return FALSE; +} + +/*! + * generate a reference to a class, namespace or member. + * `scName' is the name of the scope that contains the documentation + * string that is returned. + * `name' is the name that we want to link to. + * `name' may have five formats: + * 1) "ScopeName" + * 2) "memberName()" one of the (overloaded) function or define + * with name memberName. + * 3) "memberName(...)" a specific (overloaded) function or define + * with name memberName + * 4) "::name a global variable or define + * 4) "#memberName member variable, global variable or define + * 5) ("ScopeName::")+"memberName()" + * 6) ("ScopeName::")+"memberName(...)" + * 7) ("ScopeName::")+"memberName" + * instead of :: the # symbol may also be used. + */ + +bool generateRef(OutputDocInterface &od,const char *scName, + const char *name,bool inSeeBlock,const char *rt) +{ + //printf("generateRef(scName=%s,name=%s,rt=%s)\n",scName,name,rt); + + Definition *compound; + MemberDef *md; - // generate the page reference (for LaTeX) - if ((!cName.isEmpty() || !aName.isEmpty()) && md->isLinkableInProject()) + // create default link text + QCString linkText = rt; + if (linkText.isEmpty()) + { + linkText=substitute(name,"#","::"); + // strip :: prefix if present + if (linkText.at(0)==':' && linkText.at(1)==':') { - writePageRef(od,cName,aName); + linkText=linkText.right(linkText.length()-2); } - return TRUE; } - else if (inSeeBlock && !nameStr.isEmpty() && (gd=Doxygen::groupSDict[nameStr])) - { // group link - od.startTextLink(gd->getOutputFileBase(),0); - if (rt) // explict link text + + if (resolveRef(scName,name,inSeeBlock,&compound,&md)) + { + if (md) // link to member { - od.docify(rt); + od.writeObjectLink(compound->getReference(), + compound->getOutputFileBase(), + md->anchor(),linkText); + // generate the page reference (for LaTeX) + if (!compound->isReference() && !md->anchor().isEmpty() && + md->isLinkableInProject()) + { + writePageRef(od,compound->getOutputFileBase(),md->anchor()); + } } - else // use group title as the default link text + else // link to compound { - od.docify(gd->groupTitle()); + if (rt==0 && compound->definitionType()==Definition::TypeGroup) + { + linkText=((GroupDef *)compound)->groupTitle(); + } + od.writeObjectLink(compound->getReference(), + compound->getOutputFileBase(), + 0,linkText); + if (!compound->isReference()) + { + writePageRef(od,compound->getOutputFileBase(),0); + } } - od.endTextLink(); return TRUE; } - - // nothing found - if (rt) - od.docify(rt); - else + else // no link possible { od.docify(linkText); - if (!argsStr.isEmpty()) od.docify(argsStr); + return FALSE; } - return FALSE; } -//---------------------------------------------------------------------- -// General function that generates the HTML code for a reference to some -// file, class or member from text `lr' within the context of class `clName'. -// This link has the text 'lt' (if not 0), otherwise `lr' is used as a -// basis for the link's text. -// returns TRUE if a link could be generated. - -bool generateLink(OutputDocInterface &od,const char *clName, - const char *lr,bool inSeeBlock,const char *lt) +bool resolveLink(/* in */ const char *scName, + /* in */ const char *lr, + /* in */ bool inSeeBlock, + /* out */ Definition **resContext, + /* out */ PageInfo **resPageInfo, + /* out */ QCString &resAnchor + ) { - //printf("generateLink clName=`%s' lr=`%s' lt=`%s'\n",clName,lr,lt); + //printf("resolveLink clName=`%s' lr=`%s' lt=`%s'\n",clName,lr,lt); + + *resContext=0; + *resPageInfo=0; + QCString linkRef=lr; - FileDef *fd; + FileDef *fd; GroupDef *gd; PageInfo *pi; bool ambig; if (linkRef.isEmpty()) // no reference name! { - od.docify(lt); return FALSE; } else if ((pi=Doxygen::pageSDict->find(linkRef))) // link to a page @@ -2528,62 +2494,84 @@ bool generateLink(OutputDocInterface &od,const char *clName, { SectionInfo *si=0; if (!pi->name.isEmpty()) si=Doxygen::sectionDict[pi->name]; - od.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),si ? si->label.data() : 0,lt); - if (gd->isLinkableInProject()) - { - writePageRef(od,gd->getOutputFileBase(),si ? si->label.data() : 0); - } + *resContext=gd; + if (si) resAnchor = si->label; } else { - od.writeObjectLink(pi->getReference(),pi->getOutputFileBase(),0,lt); - if (!pi->isReference()) - { - writePageRef(od,pi->name,0); - } + *resPageInfo=pi; } return TRUE; } else if ((pi=Doxygen::exampleSDict->find(linkRef))) // link to an example { - od.writeObjectLink(0,convertNameToFile(pi->name+"-example"),0,lt); - if (!pi->isReference()) - { - writePageRef(od,convertNameToFile(pi->name+"-example"),0); - } + *resPageInfo=pi; return TRUE; } else if ((gd=Doxygen::groupSDict[linkRef])) // link to a group { - //od.startTextLink(gd->getOutputFileBase(),0); - //if (lt) - // od.docify(lt); - //else - // od.docify(gd->groupTitle()); - //od.endTextLink(); - QCString title; - if (lt) title=lt; else title=gd->groupTitle(); - od.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,title); - if (gd->isLinkableInProject()) - { - writePageRef(od,gd->getOutputFileBase(),0); - } + *resContext=gd; + return TRUE; + } + else if ((fd=findFileDef(Doxygen::inputNameDict,linkRef,ambig)) // file link + && fd->isLinkable()) + { + *resContext=fd; return TRUE; } - else if ((fd=findFileDef(Doxygen::inputNameDict,linkRef,ambig)) - && fd->isLinkable()) + else // probably a class or member reference { - // link to documented input file - od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,lt); - if (fd->isLinkableInProject()) + MemberDef *md; + bool res = resolveRef(scName,lr,inSeeBlock,resContext,&md); + if (md) resAnchor=md->anchor(); + return res; + } +} + + +//---------------------------------------------------------------------- +// General function that generates the HTML code for a reference to some +// file, class or member from text `lr' within the context of class `clName'. +// This link has the text 'lt' (if not 0), otherwise `lr' is used as a +// basis for the link's text. +// returns TRUE if a link could be generated. + +bool generateLink(OutputDocInterface &od,const char *clName, + const char *lr,bool inSeeBlock,const char *lt) +{ + Definition *compound; + PageInfo *pageInfo; + QCString anchor,linkText=lt; + if (resolveLink(clName,lr,inSeeBlock,&compound,&pageInfo,anchor)) + { + if (pageInfo) // link to page { - writePageRef(od,fd->getOutputFileBase(),0); + od.writeObjectLink(pageInfo->getReference(), + pageInfo->getOutputFileBase(),anchor,linkText); + if (!pageInfo->isReference()) + { + writePageRef(od,pageInfo->getOutputFileBase(),anchor); + } + } + else if (compound) // link to compound + { + if (lt==0 && compound->definitionType()==Definition::TypeGroup) + { + linkText=((GroupDef *)compound)->groupTitle(); + } + od.writeObjectLink(compound->getReference(), + compound->getOutputFileBase(),anchor,linkText); + if (!compound->isReference()) + { + writePageRef(od,compound->getOutputFileBase(),anchor); + } } return TRUE; } - else // probably a class or member reference + else // link could not be found { - return generateRef(od,clName,lr,inSeeBlock,lt); + od.docify(linkText); + return FALSE; } } @@ -3408,8 +3396,8 @@ void addRelatedPage(const char *name,const QCString &ptitle, QCString baseName=name; if (baseName.right(4)==".tex") baseName=baseName.left(baseName.length()-4); - else if (baseName.right(htmlFileExtensionLength)==htmlFileExtension) - baseName=baseName.left(baseName.length()-htmlFileExtensionLength); + else if (baseName.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension) + baseName=baseName.left(baseName.length()-Doxygen::htmlFileExtension.length()); QCString title=ptitle.stripWhiteSpace(); pi=new PageInfo(fileName,startLine,baseName,doc,title); diff --git a/src/util.h b/src/util.h index 61d9ff3..a39c0b1 100644 --- a/src/util.h +++ b/src/util.h @@ -44,6 +44,7 @@ class Definition; struct TagInfo; class MemberNameInfoSDict; struct ListItemInfo; +class PageInfo; //-------------------------------------------------------------------- @@ -91,10 +92,27 @@ extern bool getDefs(const QCString &scopeName, bool checkCV=FALSE ); + +extern bool resolveRef(/* in */ const char *scName, + /* in */ const char *name, + /* in */ bool inSeeBlock, + /* out */ Definition **resContext, + /* out */ MemberDef **resMember + ); + +extern bool resolveLink(/* in */ const char *scName, + /* in */ const char *lr, + /* in */ bool inSeeBlock, + /* out */ Definition **resContext, + /* out */ PageInfo **resPageInfo, + /* out */ QCString &resAnchor + ); + extern bool generateRef(OutputDocInterface &od,const char *, const char *,bool inSeeBlock,const char * =0); extern bool generateLink(OutputDocInterface &od,const char *, const char *,bool inSeeBlock,const char *); + extern void generateFileRef(OutputDocInterface &od,const char *, const char *linkTxt=0); void writePageRef(OutputDocInterface &od,const char *cn,const char *mn); diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 0eb94d2..4962334 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -895,6 +895,10 @@ class XMLGenerator : public OutputDocInterface { XML_DB(("(endSectionRefList)\n")); } + void writeCodeAnchor(const char *anchor) + { + XML_DB(("(writeCodeAnchor(%s))\n",anchor)); + } // Generator specific functions @@ -1311,6 +1315,12 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De writeXMLString(t,emd->initializer()); t << "" << endl; } + t << " " << endl; + writeXMLDocBlock(t,emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription()); + t << " " << endl; + t << " " << endl; + writeXMLDocBlock(t,emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->documentation()); + t << " " << endl; t << " " << endl; } } -- cgit v0.12