From 8f7c9d9ba3b6c4e87c87deb6775d4bf642939e77 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 19 Aug 2001 18:13:14 +0000 Subject: Release-1.2.9-20010819 --- INSTALL | 4 +- PLATFORMS | 1 + README | 4 +- VERSION | 2 +- addon/xmlparse/dochandler.h | 4 +- addon/xmlparse/main.cpp | 60 ++++++++++++++++----- configure | 26 ++++++++- doc/commands.doc | 47 +++++++++++++++- doc/config.doc | 8 +++ doc/language.doc | 11 ++-- doc/maintainers.txt | 1 - doc/preprocessing.doc | 11 +++- packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 4 +- src/code.l | 8 +-- src/config.l | 18 +++++-- src/doc.l | 106 ++++++++++++++++++++++++++++-------- src/dot.cpp | 20 +++++++ src/dot.h | 2 + src/doxygen.cpp | 27 +++++++--- src/doxygen.h | 2 +- src/htmlgen.cpp | 33 ++++++++++++ src/htmlgen.h | 9 ++-- src/lang_cfg.h | 23 ++++++++ src/language.cpp | 93 ++++++++++++++++++++++++++++++++ src/latexgen.cpp | 41 +++++++++++++- src/latexgen.h | 9 ++-- src/mangen.cpp | 12 ++++- src/mangen.h | 8 +-- src/memberdef.cpp | 41 +++++++++----- src/memberdef.h | 2 + src/memberlist.cpp | 117 ++++++++++++++++++++++++---------------- src/outputgen.h | 11 +++- src/outputlist.cpp | 1 + src/outputlist.h | 9 +++- src/rtfgen.cpp | 50 ++++++++++++++++- src/rtfgen.h | 8 +-- src/scanner.l | 37 ++++++++++--- src/translator_it.h | 37 ++++++------- src/translator_ru.h | 32 +++++------ src/xmlgen.cpp | 48 +++++++++++++++-- tmake/lib/linux-g++/tmake.conf | 2 +- tmake/lib/macosx-c++/app.t | 2 + tmake/lib/macosx-c++/lib.t | 2 + tmake/lib/macosx-c++/subdirs.t | 2 + tmake/lib/macosx-c++/tmake.conf | 59 ++++++++++++++++++++ 46 files changed, 860 insertions(+), 196 deletions(-) create mode 100644 src/lang_cfg.h create mode 100755 tmake/lib/macosx-c++/app.t create mode 100755 tmake/lib/macosx-c++/lib.t create mode 100755 tmake/lib/macosx-c++/subdirs.t create mode 100755 tmake/lib/macosx-c++/tmake.conf diff --git a/INSTALL b/INSTALL index d46236f..38c116e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.9-20010812 +DOXYGEN Version 1.2.9-20010819 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (12 August 2001) +Dimitri van Heesch (19 August 2001) diff --git a/PLATFORMS b/PLATFORMS index 0ce4249..67f072b 100644 --- a/PLATFORMS +++ b/PLATFORMS @@ -11,6 +11,7 @@ irix-dcc irix-g++ irix-n32 linux-g++ +macosx-c++ netbsd-g++ openbsd-g++ osf1-cxx diff --git a/README b/README index 03ddee8..22b2c1e 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.9_20010812 +DOXYGEN Version 1.2.9_20010819 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) (12 August 2001) +Dimitri van Heesch (dimitri@stack.nl) (19 August 2001) diff --git a/VERSION b/VERSION index cdb4ff7..7f67068 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.9-20010812 +1.2.9-20010819 diff --git a/addon/xmlparse/dochandler.h b/addon/xmlparse/dochandler.h index 0b11e25..c7c8095 100644 --- a/addon/xmlparse/dochandler.h +++ b/addon/xmlparse/dochandler.h @@ -232,7 +232,9 @@ class SimpleSectHandler : public DocNode, enum Types { See, Return, Author, Version, Since, Date, Bug, Note, Warning, Par, Deprecated, Pre, - Post, Invar, Remark, Attention + Post, Invar, Remark, Attention, + Todo, Test, RCS, EnumValues, + Examples }; SimpleSectHandler(IBaseHandler *parent); virtual ~SimpleSectHandler(); diff --git a/addon/xmlparse/main.cpp b/addon/xmlparse/main.cpp index 7fdb60a..3575c16 100644 --- a/addon/xmlparse/main.cpp +++ b/addon/xmlparse/main.cpp @@ -21,6 +21,13 @@ #include #include +//#define USE_DOM +#define USE_SAX + +#ifdef USE_DOM +#include +#endif + class ErrorHandler : public QXmlErrorHandler { public: @@ -55,18 +62,47 @@ int main(int argc,char **argv) exit(1); } - //for (;;) - //{ - QFile xmlFile(argv[1]); - MainHandler handler; - ErrorHandler errorHandler; - QXmlInputSource source( xmlFile ); - QXmlSimpleReader reader; - reader.setContentHandler( &handler ); - reader.setErrorHandler( &errorHandler ); - reader.parse( source ); - //} - + QFile xmlFile(argv[1]); + if (!xmlFile.open( IO_ReadOnly )) + { + qFatal("Could not read %s",argv[1] ); + } + +#ifdef USE_SAX + MainHandler handler; + ErrorHandler errorHandler; + QXmlInputSource source( xmlFile ); + QXmlSimpleReader reader; + reader.setContentHandler( &handler ); + reader.setErrorHandler( &errorHandler ); + reader.parse( source ); +#endif + +#ifdef USE_DOM + QDomDocument doc; + doc.setContent( &xmlFile ); + + QDomElement de = doc.documentElement(); + + printf("docElem=%s\n",de.tagName().data()); + + QDomNode n = de.firstChild(); + while( !n.isNull() ) + { + QDomElement e = n.toElement(); // try to convert the node to an element. + if( !e.isNull() ) + { // the node was really an element. + printf("direct child %s id=%s kind=%s\n", + e.tagName().data(), + e.attribute("id").data(), + e.attribute("kind").data() + ); + } + n = n.nextSibling(); + } + +#endif + return 0; } diff --git a/configure b/configure index d0a8605..b10dd6a 100755 --- a/configure +++ b/configure @@ -27,6 +27,7 @@ f_prefix=/usr f_insttool=NO f_english=NO f_wizard=NO +f_langs=nl,se,cz,fr,it,de,jp,es,fi,ru,hr,pl,pt,hu,kr,ro,si,cn,no,br,dk,sk,ua while test -n "$1"; do case $1 in @@ -51,6 +52,9 @@ while test -n "$1"; do --english-only | -english-only) f_english=YES ;; + --enable-langs | -enable-langs) + shift; f_langs=$1 + ;; --platform | -platform) shift; f_platform=$1 ;; @@ -86,7 +90,7 @@ if test "$f_help" = y; then Usage: $0 [--help] [--shared] [--static] [--release] [--debug] [--perl name] [--make name] [--dot name] [--platform target] [--prefix dir] [--docdir dir] [--install name] [--english-only] - [--with-doxywizard] + [----enable-langs list] [--with-doxywizard] Options: @@ -112,6 +116,8 @@ Options: --install name Use \`name' as the name of the GNU install tool [default: autodetect] --english-only Include support for English only. + --enable-langs list Include support for output languages listed in list. + [default: $f_langs] --with-doxywizard Build the GUI frontend for doxygen. This requires Qt 2.x.x @@ -344,6 +350,7 @@ if test "$f_perl" = NO; then fi echo "using $f_perl"; + # ----------------------------------------------------------------------------- test -f .makeconfig && rm .makeconfig @@ -450,3 +457,20 @@ EOF echo " Created $DST from $SRC..." done +# - generating src/lang_cfg.h + +echo -n " Generating src/lang_cfg.h..." +echo $f_langs | $f_perl -e '@l=split(/,/,); + chomp @l; + @allowed=(NL,SE,CZ,FR,IT,DE,JP,ES,FI,RU,HR,PL,PT,HU,KR,RO,SI,CN,NO,BR, + DK,SK,UA); + foreach my $elem (@l){ + $elem =~ tr/a-z/A-Z/; + $r=0; + foreach my $tst (@allowed){ + if ($tst eq $elem) { $r=1; last; } + } + if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; } + print "#define LANG_$elem\n"; + };' > ./src/lang_cfg.h +echo diff --git a/doc/commands.doc b/doc/commands.doc index d9cf37f..ee2eb3b 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -61,6 +61,7 @@ documentation:
  • \refitem cmddefgroup \defgroup
  • \refitem cmddeprecated \deprecated
  • \refitem cmddontinclude \dontinclude +
  • \refitem cmddotfile \dotfile
  • \refitem cmde \e
  • \refitem cmdelse \else
  • \refitem cmdelseif \elseif @@ -758,6 +759,32 @@ Public/Protected/Private/... section. */ \endverbatim + You can also use conditional commands inside aliases. To + document a class in two languages you could for instance use: + +\par Example 2: +\verbatim +/*! \english + * This is English. + * \endenglish + * \dutch + * Dit is Nederlands. + * \enddutch + */ +class Example +{ +}; +\endverbatim +

    Where the following aliases are defined in the configuration file:

    +\verbatim +ALIASES = "english=\if english" \ + "endenglish=\endif" \ + "dutch=\if dutch" \ + "enddutch=\endif" +\endverbatim + + and \c ENABLED_SECTIONS can be used to enable either \c english or \c dutch. + \sa sections \ref cmdendif "\\endif", \ref cmdifnot "\\ifnot", \ref cmdelse "\\else", and \ref cmdelseif "\\elseif". @@ -1332,6 +1359,24 @@ Public/Protected/Private/... section. \sa section \ref cmdendcode "\\endcode", section \ref cmdverbatim "\\verbatim"


    +\subsection cmddotfile \dotfile ["caption"] + + \addindex \dotfile + Inserts an image generated by dot from \ into the documentation. + + The first argument specifies the file name of the image. + doxygen will look for files in the paths (or files) that you specified + after the \ref cfg_dotfile_dirs "DOTFILE_DIRS" tag. + If the dot file is found it will be used as an input file to the dot tool. + The resulting image will be put into the correct output directory. + If the dot file name contains spaces you'll have to put quotes (") around it. + + The second argument is optional and can be used to specify the caption + that is displayed below the image. This argument has to be specified + between quotes even if it does not contain any spaces. The quotes are + stripped before the caption is displayed. + +
    \subsection cmde \e \addindex \e @@ -1443,7 +1488,7 @@ Public/Protected/Private/... section. \ref cmdlatexonly "\\latexonly".
    -\subsection cmdimage \image [""] [=] +\subsection cmdimage \image ["caption"] [=] \addindex \image Inserts an image into the documentation. This command is format diff --git a/doc/config.doc b/doc/config.doc index 4d5b92f..dbb0e53 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -84,6 +84,7 @@ followed by the descriptions of the tags grouped by category.
  • \refitem cfg_doc_abspath DOC_ABSPATH
  • \refitem cfg_doc_url DOC_URL
  • \refitem cfg_dot_path DOT_PATH +
  • \refitem cfg_dotfile_dirs DOTFILE_DIRS
  • \refitem cfg_enable_preprocessing ENABLE_PREPROCESSING
  • \refitem cfg_enum_values_per_line ENUM_VALUES_PER_LINE
  • \refitem cfg_enabled_sections ENABLED_SECTIONS @@ -1184,6 +1185,13 @@ TAGFILES = file1=loc1 "file2 = loc2" ... This tag can be used to specify the path where the dot tool can be found. If left blank, it is assumed the dot tool can be found on the path. +\anchor cfg_dotfile_dirs +
    \c DOTFILE_DIRS
    + \addindex DOTFILE_DIRS + This tag can be used to specify one or more directories that + contain dot files that are included in the documentation (see the + \\dotfile command). + \anchor cfg_max_dot_graph_height
    \c MAX_DOT_GRAPH_HEIGHT
    \addindex MAX_DOT_GRAPH_HEIGHT diff --git a/doc/language.doc b/doc/language.doc index daf3178..74f75b4 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.8-20010726), 24 languages +Currently (version 1.2.9-20010812), 24 languages are supported (sorted alphabetically): Brazilian Portuguese, Chinese, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, @@ -70,8 +70,8 @@ when the translator was updated. Czech - Petr Přikryl
    Vlastimil Havran - prikrylp@NOSPAM.skil.cz
    havran@NOSPAM.fel.cvut.cz + Petr Přikryl + prikrylp@NOSPAM.skil.cz up-to-date @@ -120,7 +120,7 @@ when the translator was updated. Italian Ahmed Aldo Faisal
    Alessandro Falappa aaf23@NOSPAM.cam.ac.uk
    a.falappa@NOSPAM.flashnet.it - 1.2.7 + up-to-date Japanese @@ -212,7 +212,6 @@ when the translator was updated. Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\ \hline Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\ - & Vlastimil Havran & {\tt havran@fel.cvut.cz} & \\ \hline Danish & Erik S\o{}e S\o{}rensen & {\tt erik@mail.nu} & 1.2.7 \\ \hline @@ -229,7 +228,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 & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & 1.2.7 \\ + Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & up-to-date \\ & Alessandro Falappa & {\tt a.falappa@flashnet.it} & \\ \hline Japanese & Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} & 1.2.5 \\ diff --git a/doc/maintainers.txt b/doc/maintainers.txt index 5d654e0..646f6c1 100644 --- a/doc/maintainers.txt +++ b/doc/maintainers.txt @@ -12,7 +12,6 @@ Boris Bralo: boris.bralo@zg.tel.hr Czech Petr Přikryl: prikrylp@skil.cz -Vlastimil Havran: havran@fel.cvut.cz Danish Erik Søe Sørensen: erik@mail.nu diff --git a/doc/preprocessing.doc b/doc/preprocessing.doc index 524f7c5..1be3ecd 100644 --- a/doc/preprocessing.doc +++ b/doc/preprocessing.doc @@ -202,7 +202,16 @@ PREDEFINED = "DECLARE_INTERFACE(name)=class name" \ "ASSERT_VALID(x)=assert(x)" \ "TRACE0(x)=printf(x)" \ "OS_ERR(A,B)={ #A, B }" \ - __cplusplus + __cplusplus \ + "DECLARE_OLECREATE(class)= " \ + "BEGIN_DISPATCH_MAP(class1, class2)= " \ + "BEGIN_INTERFACE_MAP(class1, class2)= " \ + "INTERFACE_PART(class, id, name)= " \ + "END_INTERFACE_MAP()=" \ + "DISP_FUNCTION(class, name, function, result, id)=" \ + "END_DISPATCH_MAP()=" \ + "IMPLEMENT_OLECREATE2(class, name, id1, id2, id3, id4,\ + id5, id6, id7, id8, id9, id10, id11)=" \endverbatim As you can see doxygen's preprocessor is quite powerful, but if you want diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index f1ab84e..2443735 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,5 +1,5 @@ Name: doxygen -Version: 1.2.9_20010812 +Version: 1.2.9_20010819 Summary: documentation system for C, C++ and IDL Release: 4 Source: doxygen-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index 5f93e7a..ebb22e4 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1072,7 +1072,7 @@ void ClassDef::writeDocumentation(OutputList &ol) // write examples if (exampleFlag) { - ol.startDescList(); + ol.startDescList(BaseOutputDocInterface::Examples); ol.startBold(); parseText(ol,theTranslator->trExamples()+": "); ol.endBold(); @@ -1199,6 +1199,7 @@ void ClassDef::writeDocumentation(OutputList &ol) { msg("Generating docs for nested compound %s...\n",innerCd->name().data()); innerCd->writeDocumentation(ol); + innerCd->writeMemberList(ol); } } } @@ -1541,6 +1542,7 @@ bool ClassDef::isLinkableInProject() const { return !name().isEmpty() && /* no name */ //m_isTemplBaseClass==-1 && /* template base class */ + !m_artificial && name().find('@')==-1 && /* anonymous compound */ (m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */ hasDocumentation() && /* documented */ diff --git a/src/code.l b/src/code.l index 1c6506c..c07841b 100644 --- a/src/code.l +++ b/src/code.l @@ -36,8 +36,8 @@ #define YY_NEVER_INTERACTIVE 1 -#define SCOPEBLOCK (void *)1 -#define INNERBLOCK (void *)2 +#define SCOPEBLOCK (int *)4 +#define INNERBLOCK (int *)8 /*! local class definition, used for classes that are defined * inside code fragments. @@ -109,7 +109,7 @@ static QCString g_parmName; static bool g_inClass; static QCString g_classScope; static QCString g_realScope; -static QStack g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks +static QStack g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks static CodeClassDef g_ccd; static CodeVarDef g_cvd; static bool g_exampleBlock; @@ -939,7 +939,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" } else { - g_scopeStack.push((void *)2); + g_scopeStack.push(INNERBLOCK); } BEGIN( Body ); } diff --git a/src/config.l b/src/config.l index cdaeb66..6725e9d 100644 --- a/src/config.l +++ b/src/config.l @@ -1413,11 +1413,6 @@ void Config::create() "Doxygen uses this value to replace tabs by spaces in code fragments. \n", 1,16,8 ); - cl = addList( - "ENABLED_SECTIONS", - "The ENABLED_SECTIONS tag can be used to enable conditional \n" - "documentation sections, marked by \\if sectionname ... \\endif. \n" - ); cb = addBool( "GENERATE_TODOLIST", "The GENERATE_TODOLIST tag can be used to enable (YES) or \n" @@ -1448,6 +1443,11 @@ void Config::create() "will result in a user defined paragraph with heading \"Side Effects:\". \n" "You can put \\n's in the value part of an alias to insert newlines. \n" ); + cl = addList( + "ENABLED_SECTIONS", + "The ENABLED_SECTIONS tag can be used to enable conditional \n" + "documentation sections, marked by \\if sectionname ... \\endif. \n" + ); ci = addInt( "MAX_INITIALIZER_LINES", "The MAX_INITIALIZER_LINES tag determines the maximum number of lines \n" @@ -2076,6 +2076,14 @@ void Config::create() ); cs->setWidgetType(ConfigString::Dir); cs->addDependency("HAVE_DOT"); + cl = addList( + "DOTFILE_DIRS", + "The DOTFILE_DIRS tag can be used to specify one or more directories that \n" + "contain dot files that are included in the documentation (see the \n" + "\\dotfile command). \n" + ); + cl->setWidgetType(ConfigList::Dir); + cl->addDependency("HAVE_DOT"); ci = addInt( "MAX_DOT_GRAPH_WIDTH", "The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width \n" diff --git a/src/doc.l b/src/doc.l index 683c219..0b25480 100644 --- a/src/doc.l +++ b/src/doc.l @@ -95,6 +95,8 @@ static bool insidePre = FALSE; static int depthIf; static QCString curImageName; static QCString curImageCaption; +static QCString curDotFileName; +static QCString curDotFileCaption; static QCString internalRefFile; static QCString internalRefAnchor; static QStack currentListIndent; // indent stack of all list items @@ -674,9 +676,10 @@ enum ImageTypes IT_RTF }; -// search for an image in the imageNameDict and if found -// copies the image to the output directory (which is the -// html directory if type==0 or the latex directory if type==1) +/*! search for an image in the imageNameDict and if found + * copies the image to the output directory (which is the + * html directory if type==0 or the latex directory if type==1) + */ static QCString findAndCopyImage(const char *fileName,ImageTypes type) { QCString result; @@ -794,6 +797,39 @@ void writeImage(ImageTypes it,const char *size) outDoc->popGeneratorState(); } +// search for a dot file in the dotFileNameDict, and if found +// generates the graph in the output directories. +static void writeDotFile(const char *fileName, const char *captionText) +{ + bool ambig; + FileDef *fd; + bool hasCaption = captionText!=0; + + if ((fd=findFileDef(Doxygen::dotFileNameDict,fileName,ambig))) + { + outDoc->startDotFile(fd->absFilePath(),hasCaption); + if (hasCaption) + { + scanString(captionText); + } + outDoc->endDotFile(hasCaption); + } + else if (ambig) + { + QCString text; + text.sprintf("Warning: dot file name %s is ambigious.\n",fileName); + text+="Possible candidates:\n"; + text+=showFileDefMatches(Doxygen::dotFileNameDict,fileName); + warn(yyFileName,yyLineNr,text); + } + else + { + warn(yyFileName,yyLineNr, + "Warning: dot file %s is not found in DOTFILE_DIRS! ",fileName + ); + } +} + /* ----------------------------------------------------------------- */ #undef YY_INPUT @@ -928,6 +964,8 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) %x DocLatexImageOpt %x DocRtfImageName %x DocRtfImageOpt +%x DocDotFile +%x DocDotFileOpt %% @@ -1131,7 +1169,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (b) endBlock(); inParBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Par); outDoc->startBold(); outDoc->docify(title); outDoc->endBold(); @@ -1151,7 +1189,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inWarningBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Warning); outDoc->startBold(); scanString(theTranslator->trWarning()+": "); outDoc->endBold(); @@ -1170,7 +1208,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inRemarkBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Remark); outDoc->startBold(); scanString(theTranslator->trRemarks()+": "); outDoc->endBold(); @@ -1189,7 +1227,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inAttentionBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Attention); outDoc->startBold(); scanString(theTranslator->trAttention()+": "); outDoc->endBold(); @@ -1208,7 +1246,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inNoteBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Note); outDoc->startBold(); scanString(theTranslator->trNote()+": "); outDoc->endBold(); @@ -1227,7 +1265,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inPreBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Pre); outDoc->startBold(); scanString(theTranslator->trPrecondition()+": "); outDoc->endBold(); @@ -1246,7 +1284,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inPostBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Post); outDoc->startBold(); scanString(theTranslator->trPostcondition()+": "); outDoc->endBold(); @@ -1265,7 +1303,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inInvarBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Invar); outDoc->startBold(); scanString(theTranslator->trInvariant()+": "); outDoc->endBold(); @@ -1284,7 +1322,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inVersionBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Version); outDoc->startBold(); scanString(theTranslator->trVersion()+": "); outDoc->endBold(); @@ -1303,7 +1341,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inSinceBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Since); outDoc->startBold(); scanString(theTranslator->trSince()+": "); outDoc->endBold(); @@ -1322,7 +1360,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inDateBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Date); outDoc->startBold(); scanString(theTranslator->trDate()+": "); outDoc->endBold(); @@ -1345,7 +1383,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Todo); outDoc->startBold(); outDoc->writeObjectLink(0,"todo",item->listAnchor,theTranslator->trTodo()+": "); outDoc->endBold(); @@ -1367,7 +1405,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Test); outDoc->startBold(); outDoc->writeObjectLink(0,"test",item->listAnchor,theTranslator->trTest()+": "); outDoc->endBold(); @@ -1389,7 +1427,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Bug); outDoc->startBold(); outDoc->writeObjectLink(0,"bug",item->listAnchor,theTranslator->trBug()+": "); outDoc->endBold(); @@ -1407,7 +1445,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inDeprecatedBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Deprecated); outDoc->startBold(); scanString(theTranslator->trDeprecated()+": "); outDoc->endBold(); @@ -1428,7 +1466,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) endArgumentList(); if (inBlock()) endBlock(); currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::RCS); outDoc->startBold(); scanString(tagName+": "); outDoc->endBold(); @@ -1445,7 +1483,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inAuthorBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Author); outDoc->startBold(); bool singular = ((QString)yytext).find('s')==-1; scanString(theTranslator->trAuthor(TRUE,singular)+": "); @@ -1465,7 +1503,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inReturnBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::Return); outDoc->startBold(); scanString(theTranslator->trReturns()+": "); outDoc->endBold(); @@ -1480,7 +1518,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) if (inBlock()) endBlock(); inSeeBlock=TRUE; currentListIndent.push("D"); - outDoc->startDescList(); + outDoc->startDescList(BaseOutputDocInterface::See); outDoc->startBold(); scanString(theTranslator->trSeeAlso()+": "); outDoc->endBold(); @@ -1832,6 +1870,30 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) outDoc->enableAll(); BEGIN(DocScan); } +{CMD}"dotfile"{B}* { + BEGIN(DocDotFile); + } +{FILE} { + curDotFileName = stripQuotes(yytext); + curDotFileCaption.resize(0); + if (curDotFileName.isEmpty()) + { + BEGIN(DocScan); + } + else + { + BEGIN(DocDotFileOpt); + } + } +\n { + writeDotFile(curDotFileName,curDotFileCaption); + BEGIN(DocScan); + } +\"[^\n"]*\" { + curDotFileCaption = stripQuotes(yytext); + writeDotFile(curDotFileName,curDotFileCaption); + BEGIN(DocScan); + } {CMD}"code"({BN}*"\n"|{B}*) { outDoc->startCodeFragment(); codeBlock.resize(0); diff --git a/src/dot.cpp b/src/dot.cpp index bd13f75..e9b739b 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1506,3 +1506,23 @@ void generateGraphLegend(const char *path) QDir::setCurrent(oldDir); } + +void writeDotGraphFromFile(const char *inFile,const char *outFile, + GraphOutputFormat format) +{ + QCString dotArgs(4096); + if (format==GIF) + { + dotArgs.sprintf("-Tgif \"%s\" -o \"%s.gif\"",inFile,outFile); + } + else // format==EPS + { + dotArgs.sprintf("-Tps \"%s\" -o \"%s.eps\"",inFile,outFile); + } + QCString dotExe = Config_getString("DOT_PATH")+"dot"; + //printf("Running: %s %s\n",dotExe.data(),dotArgs.data()); + if (iSystem(dotExe,dotArgs)!=0) + { + err("Problems running dot. Check your installation!\n"); + } +} diff --git a/src/dot.h b/src/dot.h index 9b64998..7539dbe 100644 --- a/src/dot.h +++ b/src/dot.h @@ -160,4 +160,6 @@ class DotInclDepGraph }; void generateGraphLegend(const char *path); +void writeDotGraphFromFile(const char *inFile,const char *outFile, + GraphOutputFormat format); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 6771f9c..b0d7dab 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -98,7 +98,7 @@ StringDict Doxygen::aliasDict(257); // aliases FileNameDict *Doxygen::includeNameDict; // include names FileNameDict *Doxygen::exampleNameDict; // examples FileNameDict *Doxygen::imageNameDict; // images -//TypedefDict Doxygen::typedefDict(1009); // all typedefs +FileNameDict *Doxygen::dotFileNameDict; // dot files StringDict Doxygen::namespaceAliasDict(257); // all namespace aliases StringDict Doxygen::tagDestinationDict(257); // all tag locations // a member group @@ -140,7 +140,7 @@ void clearAll() Doxygen::includeNameDict->clear(); Doxygen::exampleNameDict->clear(); Doxygen::imageNameDict->clear(); - //Doxygen::typedefDict.clear(); + Doxygen::dotFileNameDict->clear(); Doxygen::groupDict.clear(); Doxygen::formulaDict.clear(); Doxygen::formulaNameDict.clear(); @@ -159,8 +159,8 @@ void statistics() Doxygen::exampleNameDict->statistics(); fprintf(stderr,"--- imageNameDict stats ----\n"); Doxygen::imageNameDict->statistics(); - //fprintf(stderr,"--- classDict stats ----\n"); - //Doxygen::classSDict.statistics(); + fprintf(stderr,"--- dotFileNameDict stats ----\n"); + Doxygen::dotFileNameDict->statistics(); fprintf(stderr,"--- namespaceDict stats ----\n"); Doxygen::namespaceDict.statistics(); fprintf(stderr,"--- memberNameDict stats ----\n"); @@ -6698,10 +6698,11 @@ void readConfiguration(int argc, char **argv) void parseInput() { - Doxygen::inputNameDict = new FileNameDict(1009); - Doxygen::includeNameDict = new FileNameDict(1009); - Doxygen::exampleNameDict = new FileNameDict(1009); - Doxygen::imageNameDict = new FileNameDict(257); + Doxygen::inputNameDict = new FileNameDict(1009); + Doxygen::includeNameDict = new FileNameDict(1009); + Doxygen::exampleNameDict = new FileNameDict(1009); + Doxygen::imageNameDict = new FileNameDict(257); + Doxygen::dotFileNameDict = new FileNameDict(257); if (!Config_getString("DOC_URL").isEmpty()) { @@ -6768,6 +6769,16 @@ void parseInput() s=imagePathList.next(); } + msg("Searching for dot files...\n"); + QStrList &dotFileList=Config_getList("DOTFILE_DIRS"); + s=dotFileList.first(); + while (s) + { + readFileOrDirectory(s,0,Doxygen::dotFileNameDict,0,0, + 0,0,0); + s=dotFileList.next(); + } + msg("Searching for files to exclude\n"); QStrList &excludeList = Config_getList("EXCLUDE"); s=excludeList.first(); diff --git a/src/doxygen.h b/src/doxygen.h index 8b80676..de5372d 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -68,6 +68,7 @@ class Doxygen static FileNameDict *exampleNameDict; static FileNameDict *inputNameDict; static FileNameDict *imageNameDict; + static FileNameDict *dotFileNameDict; static QStrList tagfileList; static MemberNameList memberNameList; static MemberNameList functionNameList; @@ -79,7 +80,6 @@ class Doxygen static QTextStream tagFile; static SectionDict sectionDict; static FileNameList inputNameList; - //static TypedefDict typedefDict; static StringDict namespaceAliasDict; static GroupList groupList; static GroupDict groupDict; diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index a69d631..568906a 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -858,6 +858,39 @@ void HtmlGenerator::endImage(bool hasCaption) t << "" << endl; } +void HtmlGenerator::startDotFile(const char *name,bool hasCaption) +{ + QCString baseName=name; + int i; + if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) + { + baseName=baseName.right(baseName.length()-i-1); + } + QCString outName = Config_getString("HTML_OUTPUT")+ +#ifdef _WIN32 + "\\" +#else + "/" +#endif + +baseName; + writeDotGraphFromFile(name,outName,GIF); + t << "
    " << endl; + t << "\""" << endl; + if (hasCaption) + { + t << "

    "; + } +} + +void HtmlGenerator::endDotFile(bool hasCaption) +{ + if (hasCaption) + { + t << "

    " << endl; + } + t << "
    " << endl; +} + void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *) { DBG_HTML(t << "" << endl;) diff --git a/src/htmlgen.h b/src/htmlgen.h index 6f60593..dd58281 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -176,11 +176,10 @@ class HtmlGenerator : public OutputGenerator void writeRing(char c) { t << "&" << c << "ring;"; } void writeSharpS() { t << "ß"; } void writeCCedil(char c) { t << "&" << c << "cedil;"; } - void startDescList() { t << "
    " << endl; } + void startDescList(SectionTypes) { t << "
    " << endl; } void endDescList() { t << "
    "; } - void startParamList(ParamListTypes) - { startDescList(); } - void endParamList() { endDescList(); } + void startParamList(ParamListTypes) { t << "
    " << endl; } + void endParamList() { t << "
    "; } void endDescTitle() { t << ""; } void writeDescItem() { t << "
    " << endl; } void startSection(const char *,const char *,bool); @@ -204,6 +203,8 @@ class HtmlGenerator : public OutputGenerator void writeNonBreakableSpace(int); void startImage(const char *,const char *,bool); void endImage(bool); + void startDotFile(const char *,bool); + void endDotFile(bool); void startDescTable() { t << "" << endl; } diff --git a/src/lang_cfg.h b/src/lang_cfg.h new file mode 100644 index 0000000..581905b --- /dev/null +++ b/src/lang_cfg.h @@ -0,0 +1,23 @@ +#define LANG_NL +#define LANG_SE +#define LANG_CZ +#define LANG_FR +#define LANG_IT +#define LANG_DE +#define LANG_JP +#define LANG_ES +#define LANG_FI +#define LANG_RU +#define LANG_HR +#define LANG_PL +#define LANG_PT +#define LANG_HU +#define LANG_KR +#define LANG_RO +#define LANG_SI +#define LANG_CN +#define LANG_NO +#define LANG_BR +#define LANG_DK +#define LANG_SK +#define LANG_UA diff --git a/src/language.cpp b/src/language.cpp index 4f804f2..33da153 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -17,34 +17,81 @@ #include "message.h" #include "language.h" +#include "lang_cfg.h" #include "translator.h" #include "translator_en.h" #if !defined(ENGLISH_ONLY) #include "translator_adapter.h" +#ifdef LANG_NL #include "translator_nl.h" +#endif +#ifdef LANG_SE #include "translator_se.h" +#endif +#ifdef LANG_CZ #include "translator_cz.h" +#endif +#ifdef LANG_FR #include "translator_fr.h" +#endif +#ifdef LANG_IT #include "translator_it.h" +#endif +#ifdef LANG_DE #include "translator_de.h" +#endif +#ifdef LANG_JP #include "translator_jp.h" +#endif +#ifdef LANG_ES #include "translator_es.h" +#endif +#ifdef LANG_FI #include "translator_fi.h" +#endif +#ifdef LANG_RU #include "translator_ru.h" +#endif +#ifdef LANG_HR #include "translator_hr.h" +#endif +#ifdef LANG_PL #include "translator_pl.h" +#endif +#ifdef LANG_PT #include "translator_pt.h" +#endif +#ifdef LANG_HU #include "translator_hu.h" +#endif +#ifdef LANG_KR #include "translator_kr.h" +#endif +#ifdef LANG_RO #include "translator_ro.h" +#endif +#ifdef LANG_SI #include "translator_si.h" +#endif +#ifdef LANG_CN #include "translator_cn.h" +#endif +#ifdef LANG_NO #include "translator_no.h" +#endif +#ifdef LANG_BR #include "translator_br.h" +#endif +#ifdef LANG_DK #include "translator_dk.h" +#endif +#ifdef LANG_SK #include "translator_sk.h" +#endif +#ifdef LANG_UA #include "translator_ua.h" #endif +#endif #define L_EQUAL(a) !stricmp(langName,a) @@ -57,99 +104,145 @@ bool setTranslator(const char *langName) theTranslator=new TranslatorEnglish; } #if !defined(ENGLISH_ONLY) +#ifdef LANG_NL else if (L_EQUAL("dutch")) { theTranslator=new TranslatorDutch; } +#endif +#ifdef LANG_SE else if (L_EQUAL("swedish")) { theTranslator=new TranslatorSwedish; } +#endif +#ifdef LANG_CZ else if (L_EQUAL("czech")) { theTranslator=new TranslatorCzech; } +#endif +#ifdef LANG_FR else if (L_EQUAL("french")) { theTranslator=new TranslatorFrench; } +#endif +#ifdef LANG_IT else if (L_EQUAL("italian")) { theTranslator=new TranslatorItalian; } +#endif +#ifdef LANG_DE else if (L_EQUAL("german")) { theTranslator=new TranslatorGerman; } +#endif +#ifdef LANG_JP else if (L_EQUAL("japanese")) { theTranslator=new TranslatorJapanese; } +#endif +#ifdef LANG_ES else if (L_EQUAL("spanish")) { theTranslator=new TranslatorSpanish; } +#endif +#ifdef LANG_FI else if (L_EQUAL("finnish")) { theTranslator=new TranslatorFinnish; } +#endif +#ifdef LANG_RU else if (L_EQUAL("russian")) { theTranslator=new TranslatorRussian; } +#endif +#ifdef LANG_HR else if (L_EQUAL("croatian")) { theTranslator=new TranslatorCroatian; } +#endif +#ifdef LANG_PL else if (L_EQUAL("polish")) { theTranslator=new TranslatorPolish; } +#endif +#ifdef LANG_PT else if (L_EQUAL("portuguese")) { theTranslator=new TranslatorPortuguese; } +#endif +#ifdef LANG_HU else if (L_EQUAL("hungarian")) { theTranslator=new TranslatorHungarian; } +#endif +#ifdef LANG_KR else if (L_EQUAL("korean")) { theTranslator=new TranslatorKorean; } +#endif +#ifdef LANG_RO else if (L_EQUAL("romanian")) { theTranslator=new TranslatorRomanian; } +#endif +#ifdef LANG_SI else if (L_EQUAL("slovene")) { theTranslator=new TranslatorSlovene; } +#endif +#ifdef LANG_CN else if (L_EQUAL("chinese")) { theTranslator=new TranslatorChinese; } +#endif +#ifdef LANG_NO else if (L_EQUAL("norwegian")) { theTranslator=new TranslatorNorwegian; } +#endif +#ifdef LANG_BR else if (L_EQUAL("brazilian")) { theTranslator=new TranslatorBrazilian; } +#endif +#ifdef LANG_DK else if (L_EQUAL("danish")) { theTranslator=new TranslatorDanish; } +#endif +#ifdef LANG_SK else if (L_EQUAL("slovak")) { theTranslator=new TranslatorSlovak; } +#endif +#ifdef LANG_UA else if (L_EQUAL("ukrainian")) { theTranslator=new TranslatorUkrainian; } #endif +#endif else // use the default language (i.e. english) { theTranslator=new TranslatorEnglish; diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 7ffa258..7e072ac 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -223,8 +223,7 @@ static void writeDefaultHeaderPart1(QTextStream &t) "\\usepackage{fancyhdr}\n" "\\usepackage{graphicx}\n" "\\usepackage{float}\n" - "\\usepackage{alltt}\n" - "\\usepackage{doxygen}\n"; + "\\usepackage{alltt}\n"; if (Config_getBool("PDF_HYPERLINKS")) { t << "\\usepackage{times}" << endl; @@ -254,6 +253,7 @@ static void writeDefaultHeaderPart1(QTextStream &t) t << sLanguageSupportCommand; } + t << "\\usepackage{doxygen}\n"; QStrList &extraPackages = Config_getList("EXTRA_PACKAGES"); const char *s=extraPackages.first(); while (s) @@ -1553,6 +1553,43 @@ void LatexGenerator::endImage(bool hasCaption) } } +void LatexGenerator::startDotFile(const char *name,bool hasCaption) +{ + QCString baseName=name; + int i; + if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) + { + baseName=baseName.right(baseName.length()-i-1); + } + QCString outName = Config_getString("LATEX_OUTPUT")+ +#ifdef _WIN32 + "\\" +#else + "/" +#endif + +baseName; + writeDotGraphFromFile(name,outName,EPS); + if (hasCaption) + t << "\\begin{figure}[H]" << endl; + else + t << "\\mbox{"; + t << "\\includegraphics"; + t << "{" << baseName << ".eps}"; + if (hasCaption) + t << "\\caption{"; + else + t << "}" << endl; +} + +void LatexGenerator::endDotFile(bool hasCaption) +{ + if (hasCaption) + { + t << "}" << endl; + t << "\\end{figure}" << endl; + } +} + void LatexGenerator::startMemberGroupHeader(bool hasHeader) { diff --git a/src/latexgen.h b/src/latexgen.h index 51d2b61..c527e6f 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -183,11 +183,10 @@ class LatexGenerator : public OutputGenerator void writeCCedil(char c) { t << "\\c{" << c << "}"; } void startMemberDescription() { t << "\\begin{CompactList}\\small\\item\\em "; } void endMemberDescription() { t << "\\item\\end{CompactList}"; } - void startDescList() { t << "\\begin{Desc}\n\\item["; } + void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; } void endDescList() { t << "\\end{Desc}" << endl; } - void startParamList(ParamListTypes) - { startDescList(); } - void endParamList() { endDescList(); } + void startParamList(ParamListTypes) { t << "\\begin{Desc}\n\\item["; } + void endParamList() { t << "\\end{Desc}" << endl; } void endDescTitle() { t << "]"; } void writeDescItem() { t << "\\par" << endl; } void startSection(const char *,const char *,bool); @@ -212,6 +211,8 @@ class LatexGenerator : public OutputGenerator void writeNonBreakableSpace(int); void startImage(const char *,const char *,bool); void endImage(bool); + void startDotFile(const char *,bool); + void endDotFile(bool); void startDescTable() { t << "\\begin{description}" << endl; } diff --git a/src/mangen.cpp b/src/mangen.cpp index 36d23e1..b721a44 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -308,7 +308,17 @@ void ManGenerator::writeChar(char c) paragraph=FALSE; } -void ManGenerator::startDescList() +void ManGenerator::startDescList(SectionTypes) +{ + if (!firstCol) + { t << endl << ".PP" << endl; + firstCol=TRUE; paragraph=TRUE; + col=0; + } + paragraph=FALSE; +} + +void ManGenerator::startParamList(ParamListTypes) { if (!firstCol) { t << endl << ".PP" << endl; diff --git a/src/mangen.h b/src/mangen.h index 4a03abb..30fdea0 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -170,10 +170,10 @@ class ManGenerator : public OutputGenerator firstCol=FALSE; } void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; } void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; } - void startDescList(); + void startDescList(SectionTypes); void endDescList() {} - void startParamList(ParamListTypes) { startDescList(); } - void endParamList() { endDescList(); } + void startParamList(ParamListTypes); + void endParamList() {} void endDescTitle(); void writeDescItem(); void startSection(const char *,const char *,bool); @@ -198,6 +198,8 @@ class ManGenerator : public OutputGenerator void writeNonBreakableSpace(int n) { int i; for (i=0;i0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly + else if (hasOneLineInitializer() + //!init.isEmpty() && initLines==0 && // one line initializer + //((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly ) // add initializer { if (!isDefine()) @@ -889,7 +890,8 @@ bool MemberDef::isDetailedSectionLinkable() const ) ) || // has a multi-line initialization block - (initLines>0 && initLines0 && initLineshasDocumentation()); @@ -1081,8 +1083,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.startMemberDocName(); linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef); writeDefArgumentList(ol,cd,scopeName,this); - if (!init.isEmpty() && initLines==0 && // one line initializer - ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly + if (hasOneLineInitializer() + //!init.isEmpty() && initLines==0 && // one line initializer + // ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly ) // add initializer { if (!isDefine()) @@ -1160,9 +1163,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.popGeneratorState(); /* write multi-line initializer (if any) */ - if (initLines>0 && ((initLines0 && ((initLineshasDocumentation()) { //printf("***** argumentList is documented\n"); - ol.startDescList(); - ol.startBold(); + ol.startParamList(BaseOutputDocInterface::Param); parseText(ol,theTranslator->trParameters()+": "); - ol.endBold(); ol.endDescTitle(); ol.writeDescItem(); ol.startDescTable(); @@ -1244,7 +1246,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (first) { //ol.newParagraph(); - ol.startDescList(); + ol.startDescList(BaseOutputDocInterface::EnumValues); ol.startBold(); parseText(ol,theTranslator->trEnumerationValues()); ol.docify(":"); @@ -1441,7 +1443,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, // write the list of examples that use this member if (hasExamples()) { - ol.startDescList(); + ol.startDescList(BaseOutputDocInterface::Examples); ol.startBold(); parseText(ol,theTranslator->trExamples()+": "); //ol.writeBoldString("Examples: "); @@ -1637,3 +1639,16 @@ MemberDef *MemberDef::createTemplateInstanceMember( return imd; } +bool MemberDef::hasOneLineInitializer() const +{ + return !init.isEmpty() && initLines==0 && // one line initializer + ((maxInitLines>0 && userInitLines==-1) || userInitLines>0); // enabled by default or explicitly +} + +bool MemberDef::hasMultiLineInitializer() const +{ + return initLines>0 && + ((initLines *fmdl=md->enumFieldList(); + uint numVisibleEnumValues=0; if (fmdl) { MemberDef *fmd=fmdl->first(); while (fmd) { - /* in html we start a new line after a number of items */ - if (fmdl->count()>enumValuesPerLine - && (enumMemCount%enumValuesPerLine)==0 - ) + if (fmd->isBriefSectionVisible()) numVisibleEnumValues++; + fmd=fmdl->next(); + } + } + if (numVisibleEnumValues==0 && !md->isBriefSectionVisible()) break; + if (numVisibleEnumValues>0) + { + uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE"); + typeDecl.docify("{ "); + if (fmdl) + { + MemberDef *fmd=fmdl->first(); + bool fmdVisible = fmd->isBriefSectionVisible(); + while (fmd) { - typeDecl.pushGeneratorState(); - typeDecl.disableAllBut(OutputGenerator::Html); - typeDecl.lineBreak(); - typeDecl.writeString("  "); - typeDecl.popGeneratorState(); - } + /* in html we start a new line after a number of items */ + if (numVisibleEnumValues>enumValuesPerLine + && (enumMemCount%enumValuesPerLine)==0 + ) + { + typeDecl.pushGeneratorState(); + typeDecl.disableAllBut(OutputGenerator::Html); + typeDecl.lineBreak(); + typeDecl.writeString("  "); + typeDecl.popGeneratorState(); + } - if (fmd->hasDocumentation()) // enum value has docs - { - if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + if (fmdVisible) { - Doxygen::tagFile << " " << endl; - Doxygen::tagFile << " " << convertToXML(fmd->name()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(fmd->anchor()) << "" << endl; - Doxygen::tagFile << " " << convertToXML(fmd->argsString()) << "" << endl; - Doxygen::tagFile << " " << endl; + if (fmd->hasDocumentation()) // enum value has docs + { + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + { + Doxygen::tagFile << " " << endl; + Doxygen::tagFile << " " << convertToXML(fmd->name()) << "" << endl; + Doxygen::tagFile << " " << convertToXML(fmd->anchor()) << "" << endl; + Doxygen::tagFile << " " << convertToXML(fmd->argsString()) << "" << endl; + Doxygen::tagFile << " " << endl; + } + fmd->writeLink(typeDecl,cd,nd,fd,gd); + } + else // no docs for this enum value + { + typeDecl.startBold(); + typeDecl.docify(fmd->name()); + typeDecl.endBold(); + } + if (fmd->hasOneLineInitializer()) // enum value has initializer + { + typeDecl.writeString(" = "); + parseText(typeDecl,fmd->initializer()); + } + } + + bool prevVisible = fmdVisible; + fmd=fmdl->next(); + if (fmd && (fmdVisible=fmd->isBriefSectionVisible())) + { + typeDecl.writeString(", "); + } + if (prevVisible) + { + typeDecl.disable(OutputGenerator::Man); + typeDecl.writeString("\n"); // to prevent too long lines in LaTeX + typeDecl.enable(OutputGenerator::Man); + enumMemCount++; } - fmd->writeLink(typeDecl,cd,nd,fd,gd); - } - else // no docs for this enum value - { - typeDecl.startBold(); - typeDecl.docify(fmd->name()); - typeDecl.endBold(); } - if (!fmd->initializer().isEmpty()) // enum value has initializer + if (numVisibleEnumValues>enumValuesPerLine) { - typeDecl.writeString(" = "); - parseText(typeDecl,fmd->initializer()); + typeDecl.pushGeneratorState(); + typeDecl.disableAllBut(OutputGenerator::Html); + typeDecl.lineBreak(); + typeDecl.popGeneratorState(); } - - fmd=fmdl->next(); - if (fmd) typeDecl.writeString(", "); - typeDecl.disable(OutputGenerator::Man); - typeDecl.writeString("\n"); // to prevent too long lines in LaTeX - typeDecl.enable(OutputGenerator::Man); - enumMemCount++; - } - if (fmdl->count()>enumValuesPerLine) - { - typeDecl.pushGeneratorState(); - typeDecl.disableAllBut(OutputGenerator::Html); - typeDecl.lineBreak(); - typeDecl.popGeneratorState(); } + typeDecl.docify(" }"); + md->setEnumDecl(typeDecl); } - typeDecl.docify(" }"); - md->setEnumDecl(typeDecl); int enumVars=0; MemberListIterator vmli(*this); MemberDef *vmd; diff --git a/src/outputgen.h b/src/outputgen.h index 8d05ef5..8818a3e 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -41,6 +41,13 @@ class BaseOutputDocInterface { public: enum ParamListTypes { Param, RetVal, Exception }; + enum SectionTypes { See, Return, Author, Version, + Since, Date, Bug, Note, + Warning, Par, Deprecated, Pre, + Post, Invar, Remark, Attention, + Todo, Test, RCS, EnumValues, + Examples + }; /*! Start of a bullet list: e.g. \c
      in html. writeListItem() is * Used for the bullet items. @@ -207,7 +214,7 @@ class BaseOutputDocInterface virtual void writeRing(char) = 0; virtual void writeSharpS() = 0; virtual void writeCCedil(char) = 0; - virtual void startDescList() = 0; + virtual void startDescList(SectionTypes t) = 0; virtual void endDescList() = 0; virtual void startParamList(ParamListTypes t) = 0; virtual void endParamList() = 0; @@ -227,6 +234,8 @@ class BaseOutputDocInterface virtual void writeNonBreakableSpace(int) = 0; virtual void startImage(const char *,const char *,bool) = 0; virtual void endImage(bool) = 0; + virtual void startDotFile(const char *,bool) = 0; + virtual void endDotFile(bool) = 0; virtual void startDescTable() = 0; virtual void endDescTable() = 0; virtual void startDescTableTitle() = 0; diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 06d2ebc..9688dde 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -262,6 +262,7 @@ FORALL1(DotClassGraph &a1,a1) FORALL1(DotInclDepGraph &a1,a1) FORALL1(DotGfxHierarchyTable &a1,a1) FORALL1(ParamListTypes a1,a1) +FORALL1(SectionTypes a1,a1) #if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE) FORALL1(bool a1,a1) FORALL2(bool a1,int a2,a1,a2) diff --git a/src/outputlist.h b/src/outputlist.h index b96fc80..96e07aa 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -306,8 +306,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startMemberDescription); } void endMemberDescription() { forall(&OutputGenerator::endMemberDescription); } - void startDescList() - { forall(&OutputGenerator::startDescList); } + void startDescList(SectionTypes t) + { forall(&OutputGenerator::startDescList,t); } void endDescList() { forall(&OutputGenerator::endDescList); } void startParamList(ParamListTypes t) @@ -361,6 +361,10 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startImage,n,s,c); } void endImage(bool c) { forall(&OutputGenerator::endImage,c); } + void startDotFile(const char *n,bool c) + { forall(&OutputGenerator::startDotFile,n,c); } + void endDotFile(bool c) + { forall(&OutputGenerator::endDotFile,c); } void startDescTable() { forall(&OutputGenerator::startDescTable); } @@ -456,6 +460,7 @@ class OutputList : public OutputDocInterface FORALLPROTO1(DotInclDepGraph &); FORALLPROTO1(DotGfxHierarchyTable &); FORALLPROTO1(ParamListTypes); + FORALLPROTO1(SectionTypes); #if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE) FORALLPROTO1(bool); FORALLPROTO2(bool,int); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index e79646b..e912f26 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1926,7 +1926,7 @@ void RTFGenerator::endMemberDescription() t << "\\par}" << endl; } -void RTFGenerator::startDescList() +void RTFGenerator::startDescList(SectionTypes) { DBG_RTF(t << "{\\comment (startDescList)}" << endl) t << "{"; @@ -1942,6 +1942,24 @@ void RTFGenerator::endDescTitle() t << Rtf_Style_Reset << Rtf_DList_DepthStyle(); } +void RTFGenerator::startParamList(ParamListTypes) +{ + DBG_RTF(t << "{\\comment (startParamList)}" << endl) + t << "{"; + newParagraph(); +} + +void RTFGenerator::endParamList() +{ + DBG_RTF(t << "{\\comment (endParamList)}" << endl) + newParagraph(); + t << "}"; + decrementIndentLevel(); + m_omitParagraph = TRUE; + //t << Rtf_Style_Reset << styleStack.top() << endl; +} + + void RTFGenerator::writeDescItem() { DBG_RTF(t << "{\\comment (writeDescItem) }" << endl) @@ -2209,6 +2227,36 @@ void RTFGenerator::endImage(bool) // not yet implemented } +void RTFGenerator::startDotFile(const char *name,bool) +{ + QCString baseName=name; + int i; + if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) + { + baseName=baseName.right(baseName.length()-i-1); + } + QCString outName = Config_getString("RTF_OUTPUT")+ +#ifdef _WIN32 + "\\" +#else + "/" +#endif + +baseName; + writeDotGraphFromFile(name,outName,GIF); + newParagraph(); + t << "{" << endl; + t << Rtf_Style_Reset << endl; + t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; + t << outName; + t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + t << "}" << endl; +} + +void RTFGenerator::endDotFile(bool) +{ + // not yet implemented +} + void RTFGenerator::startDescTable() { DBG_RTF(t << "{\\comment (startDescTable) }" << endl) diff --git a/src/rtfgen.h b/src/rtfgen.h index 16d2b35..6e1209d 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -166,10 +166,10 @@ class RTFGenerator : public OutputGenerator void startMemberDescription(); void endMemberDescription(); - void startDescList(); + void startDescList(SectionTypes); void endDescList(); - void startParamList(ParamListTypes) { startDescList(); } - void endParamList() { endDescList(); } + void startParamList(ParamListTypes); + void endParamList(); void endDescTitle(); void writeDescItem(); void startSection(const char *,const char *,bool); @@ -194,6 +194,8 @@ class RTFGenerator : public OutputGenerator void writeNonBreakableSpace(int); void startImage(const char *,const char *,bool); void endImage(bool); + void startDotFile(const char *,bool); + void endDotFile(bool); void startDescTable(); void endDescTable(); diff --git a/src/scanner.l b/src/scanner.l index 52326e8..6d49da4 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -149,6 +149,7 @@ static bool insideFormula; static bool insideTryBlock=FALSE; static int depthIf; +static int initializerSharpCount; //----------------------------------------------------------------------------- @@ -1320,6 +1321,7 @@ TITLE [tT][iI][tT][lL][eE] "=" { current->bodyLine = yyLineNr; lastInitializerContext = YY_START; + initializerSharpCount=0; BEGIN(ReadInitializer); } /* Read initializer rules */ @@ -1339,8 +1341,15 @@ TITLE [tT][iI][tT][lL][eE] } [;,] { //printf(">> initializer `%s' <<\n",current->initializer.data()); - unput(*yytext); - BEGIN(lastInitializerContext); + if (initializerSharpCount==0) + { + unput(*yytext); + BEGIN(lastInitializerContext); + } + else + { + current->initializer+=*yytext; + } } \" { if (insideIDL && insideCppQuote) @@ -1355,9 +1364,23 @@ TITLE [tT][iI][tT][lL][eE] BEGIN(CopyString); } } -"'"\\[0-7]{1,3}"'" -"'"\\."'" -"'".{1,4}"'" +"<<" { + current->initializer+=yytext; + } +">>" { + current->initializer+=yytext; + } +\< { + initializerSharpCount++; + current->initializer+=*yytext; + } +\> { + initializerSharpCount--; + current->initializer+=*yytext; + } +"'"\\[0-7]{1,3}"'" | +"'"\\."'" | +"'".{1,4}"'" { current->initializer+=yytext; } \n { current->initializer+=*yytext; yyLineNr++; @@ -1547,6 +1570,7 @@ TITLE [tT][iI][tT][lL][eE] } "=" { lastInitializerContext = YY_START; + initializerSharpCount=0; BEGIN(ReadInitializer); } "," { @@ -1760,6 +1784,7 @@ TITLE [tT][iI][tT][lL][eE] } "=" { lastInitializerContext=YY_START; + initializerSharpCount=0; BEGIN(ReadInitializer); /* BEGIN(MemberSpecSkip); */ } @@ -3834,7 +3859,7 @@ TITLE [tT][iI][tT][lL][eE] "\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text current->doc+=yytext; } -{CMD}[a-z_A-Z][a-z_A-Z0-9]* { +{CMD}[a-z_A-Z][a-z_A-Z0-9]* { QCString *pValue=Doxygen::aliasDict[yytext+1]; if (pValue) { diff --git a/src/translator_it.h b/src/translator_it.h index 169998f..615e797 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -22,6 +22,8 @@ * Initial Italian Translation by Ahmed Aldo Faisal * Revised and completed by Alessandro Falappa (since June 1999) * Updates: + * 2001/08: corrected the translation fixing the issues reported by the translator.pl script + * translated new items used since version 1.2.7 * 2001/05: adopted new translation mechanism (trough adapters), * translated new items used since version 1.2.5 and 1.2.6, * revised those function returning strings in OPTIMIZE_OTPUT_FOR_C case, @@ -57,7 +59,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public TranslatorAdapter_1_2_7 +class TranslatorItalian : public Translator { public: @@ -168,12 +170,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7 QCString trDefinedIn() { return "definito in"; } - /*! put as in introduction in the verbatim header file of a class. - * parameter f is the name of the include file. - */ - QCString trVerbatimText(const char *f) - { return (QCString)"Questo Х il contenuto integrale del file include "+f+"."; } - // quick reference sections /*! This is put above each page as a link to the list of all groups of @@ -462,10 +458,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7 QCString trEnumerationValues() { return "Valori dei tipi enumerati"; } - /*! This is used in man pages as the author section. */ - QCString trAuthor() - { return "Autore"; } - /*! This is used in the documentation of a file before the list of * documentation blocks for defines */ @@ -523,12 +515,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7 } } - /*! This is used in the documentation of a group before the list of - * links to documented files - */ - QCString trFiles() - { return "File"; } - /*! This is used in the standard footer of each page and indicates when * the page was generated */ @@ -576,10 +562,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7 QCString trDate() { return "Data"; } - /*! this text is generated when the \\author command is used. */ - QCString trAuthors() - { return "Autore(i)"; } - /*! this text is generated when the \\return command is used. */ QCString trReturns() { return "Restituisce"; } @@ -1313,6 +1295,19 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7 result+=(singular ? "e" : "i"); return result; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Autor" : "autor")); + result+=(singular ? "e" : "i"); + return result; + } }; #endif diff --git a/src/translator_ru.h b/src/translator_ru.h index 64c5b6d..392c684 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -43,6 +43,8 @@ * Compounds переведено как классы, см Строустрап. * * Определения помеченные ?? являются спорными. + * + * Благодарности: Vitaly A. Repin */ #ifndef TRANSLATOR_RU_H @@ -678,13 +680,13 @@ class TranslatorRussian : public Translator } virtual QCString trPublicMembers() - { return decode("Публичные члены"); } + { return decode("Открытые члены"); } virtual QCString trPublicSlots() - { return decode("Публичные слоты"); } + { return decode("Открытые слоты"); } virtual QCString trSignals() { return decode("Сигналы"); } virtual QCString trStaticPublicMembers() - { return decode("Публичные статические члены"); } + { return decode("Открытые статические члены"); } virtual QCString trProtectedMembers() { return decode("Защищенные члены"); } virtual QCString trProtectedSlots() @@ -692,11 +694,11 @@ class TranslatorRussian : public Translator virtual QCString trStaticProtectedMembers() { return decode("Защищенные статические члены"); } virtual QCString trPrivateMembers() - { return decode("Приватные члены"); } + { return decode("Закрытые члены"); } virtual QCString trPrivateSlots() - { return decode("Приватные слоты"); } + { return decode("Закрытые слоты"); } virtual QCString trStaticPrivateMembers() - { return decode("Приватные статические члены"); } + { return decode("Закрытые статические члены"); } /*! this function is used to produce a comma-separated list of items. * use generateMarker(i) to indicate where item i should be put. @@ -957,7 +959,7 @@ class TranslatorRussian : public Translator } virtual QCString trPublicTypes() { - return decode("Публичные типы"); + return decode("Открытые типы"); } virtual QCString trPublicAttribs() { @@ -972,7 +974,7 @@ class TranslatorRussian : public Translator } virtual QCString trStaticPublicAttribs() { - return decode("Статические публичные данные"); + return decode("Статические открытые данные"); } virtual QCString trProtectedTypes() { @@ -988,15 +990,15 @@ class TranslatorRussian : public Translator } virtual QCString trPrivateTypes() { - return decode("Приватные типы"); + return decode("Закрытые типы"); } virtual QCString trPrivateAttribs() { - return decode("Приватные данные"); + return decode("Закрытые данные"); } virtual QCString trStaticPrivateAttribs() { - return decode("Приватные статические данные"); + return decode("Закрытые статические данные"); } @@ -1065,11 +1067,11 @@ class TranslatorRussian : public Translator "class Truncated : public Invisible { };\n\n" "/* Недокументированный класс */\n" "class Undocumented { };\n\n" - "/*! Публичное наследование */\n" + "/*! Открытое наследование */\n" "class PublicBase : public Truncated { };\n\n" "/*! Защищенное наследование */\n" "class ProtectedBase { };\n\n" - "/*! Приватное наследование */\n" + "/*! Закрытое наследование */\n" "class PrivateBase { };\n\n" "/*! Класс, используемый классом Inherited */\n" "class Used { };\n\n" @@ -1099,10 +1101,10 @@ class TranslatorRussian : public Translator "
    \n" "Стрелки имеют следующее значение:\n" "
      \n" - "
    • Темносиняя стрелка используется для изображения отношения публичного наследования " + "
    • Темносиняя стрелка используется для изображения отношения открытого наследования " "между двумя классами.\n" "
    • Темнозеленая стрелка используется при защищенном наследовании.\n" - "
    • Темнокрасная стрелка используется при приватном наследовании.\n" + "
    • Темнокрасная стрелка используется при закрытом наследовании.\n" "
    • Фиолетовая стрелка используется, если класс содержится в" "другом класе или используется другим классом." "Со стрелкой указывается переменная, " diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 736ae0a..7c9b09d 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -33,6 +33,35 @@ #include #include +static QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t) +{ + switch (t) + { + case BaseOutputDocInterface::See: return "see"; + case BaseOutputDocInterface::Return: return "return"; + case BaseOutputDocInterface::Author: return "author"; + case BaseOutputDocInterface::Version: return "version"; + case BaseOutputDocInterface::Since: return "since"; + case BaseOutputDocInterface::Date: return "date"; + case BaseOutputDocInterface::Bug: return "bug"; + case BaseOutputDocInterface::Note: return "note"; + case BaseOutputDocInterface::Warning: return "warning"; + case BaseOutputDocInterface::Par: return "par"; + case BaseOutputDocInterface::Deprecated: return "deprecated"; + case BaseOutputDocInterface::Pre: return "pre"; + case BaseOutputDocInterface::Post: return "post"; + case BaseOutputDocInterface::Invar: return "invariant"; + case BaseOutputDocInterface::Remark: return "remark"; + case BaseOutputDocInterface::Attention: return "attention"; + case BaseOutputDocInterface::Todo: return "todo"; + case BaseOutputDocInterface::Test: return "test"; + case BaseOutputDocInterface::RCS: return "rcs"; + case BaseOutputDocInterface::EnumValues: return "enumvalues"; + case BaseOutputDocInterface::Examples: return "examples"; + } + return "illegal"; +} + static inline void writeXMLString(QTextStream &t,const char *s) { t << convertToXML(s); @@ -320,9 +349,10 @@ class XMLGenerator : public OutputDocInterface m_t << ""; startNestedPar(); } - void startDescList() + void startDescList(SectionTypes st) { - m_t << ""; + m_t << "<simplesect kind=\"" << sectionTypeToString(st); + m_t << "\"><title>"; } void endDescList() { @@ -350,6 +380,7 @@ class XMLGenerator : public OutputDocInterface { m_t << ""; if (!m_inParamList) startNestedPar(); + printf("endDescTitle %d\n",m_inParamList); } void writeDescItem() { } void startDescTable() { } @@ -559,6 +590,15 @@ class XMLGenerator : public OutputDocInterface { m_t << ""; } + void startDotFile(const char *name,bool caption) + { + m_t << ""; // non docbook + } + void endDotFile(bool) + { + m_t << ""; + } void startTextLink(const char *name,const char *anchor) { m_t << ""; @@ -636,6 +676,7 @@ class XMLGenerator : public OutputDocInterface m_b.open( IO_WriteOnly ); m_t.setDevice(&m_b); m_t.setEncoding(QTextStream::Latin1); + m_inParamList = FALSE; } /*! copy constructor */ XMLGenerator(const XMLGenerator *xg) @@ -908,7 +949,8 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t) // detailed documentation // detailed member documentation - if (cd->name().find('@')!=-1) return; // skip anonymous compounds + if (cd->name().find('@')!=-1) return; // skip anonymous compounds. + if (cd->templateMaster()!=0) return; // skip generated template instances. t << " getOutputFileBase() << "\" kind=\"" << cd->compoundTypeString() << "\">" << endl; diff --git a/tmake/lib/linux-g++/tmake.conf b/tmake/lib/linux-g++/tmake.conf index e63a783..3537b39 100755 --- a/tmake/lib/linux-g++/tmake.conf +++ b/tmake/lib/linux-g++/tmake.conf @@ -9,7 +9,7 @@ CONFIG = qt warn_on release TMAKE_CC = gcc TMAKE_CFLAGS = -pipe -TMAKE_CFLAGS_WARN_ON = -Wall -W +TMAKE_CFLAGS_WARN_ON = -Wall -W -fno-exceptions TMAKE_CFLAGS_WARN_OFF = TMAKE_CFLAGS_RELEASE = -O2 TMAKE_CFLAGS_DEBUG = -g diff --git a/tmake/lib/macosx-c++/app.t b/tmake/lib/macosx-c++/app.t new file mode 100755 index 0000000..867725e --- /dev/null +++ b/tmake/lib/macosx-c++/app.t @@ -0,0 +1,2 @@ +#! Use the common Unix template +#$ IncludeTemplate("../unix/app.t"); diff --git a/tmake/lib/macosx-c++/lib.t b/tmake/lib/macosx-c++/lib.t new file mode 100755 index 0000000..2523b2f --- /dev/null +++ b/tmake/lib/macosx-c++/lib.t @@ -0,0 +1,2 @@ +#! Use the common Unix template +#$ IncludeTemplate("../unix/lib.t"); diff --git a/tmake/lib/macosx-c++/subdirs.t b/tmake/lib/macosx-c++/subdirs.t new file mode 100755 index 0000000..5e888af --- /dev/null +++ b/tmake/lib/macosx-c++/subdirs.t @@ -0,0 +1,2 @@ +#! Use the common Unix template +#$ IncludeTemplate("../unix/subdirs.t"); diff --git a/tmake/lib/macosx-c++/tmake.conf b/tmake/lib/macosx-c++/tmake.conf new file mode 100755 index 0000000..6956d07 --- /dev/null +++ b/tmake/lib/macosx-c++/tmake.conf @@ -0,0 +1,59 @@ +# +# +# +# tmake configuration for macosx-c++ +# + +TEMPLATE = app +CONFIG = qt warn_on release + +TMAKE_CC = cc +TMAKE_CFLAGS = -pipe +TMAKE_CFLAGS_WARN_ON = -Wall -W +TMAKE_CFLAGS_WARN_OFF = +TMAKE_CFLAGS_RELEASE = -O2 +TMAKE_CFLAGS_DEBUG = -g +TMAKE_CFLAGS_SHLIB = -fPIC +TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses + +TMAKE_CXX = c++ +TMAKE_CXXFLAGS = $$TMAKE_CFLAGS -D__FreeBSD__ +TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON +TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF +TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE +TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG +TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB +TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC + +TMAKE_INCDIR = +TMAKE_LIBDIR = +TMAKE_INCDIR_X11 = /usr/X11R6/include +TMAKE_LIBDIR_X11 = /usr/X11R6/lib +TMAKE_INCDIR_QT = $(QTDIR)/include +TMAKE_LIBDIR_QT = $(QTDIR)/lib +TMAKE_INCDIR_OPENGL = /usr/X11R6/include +TMAKE_LIBDIR_OPENGL = /usr/X11R6/lib + +TMAKE_LINK = c++ +TMAKE_LINK_SHLIB = c++ +TMAKE_LFLAGS = +TMAKE_LFLAGS_RELEASE = +TMAKE_LFLAGS_DEBUG = +TMAKE_LFLAGS_SHLIB = -shared + +# soname does not work on fbsd 2.x +#TMAKE_LFLAGS_SONAME = -Wl,-soname + +TMAKE_LIBS = +TMAKE_LIBS_X11 = -lXext -lX11 -lm +TMAKE_LIBS_QT = -lqt +TMAKE_LIBS_QT_OPENGL = -lqgl +TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu + +TMAKE_MOC = moc + +TMAKE_AR = ar cq +TMAKE_RANLIB = ranlib + +TMAKE_TAR = tar -cf +TMAKE_GZIP = gzip -9f -- cgit v0.12