From de611600b5521fab9d65a1b4f27d2042e7b546f9 Mon Sep 17 00:00:00 2001 From: dimitri Date: Sun, 12 Mar 2000 17:43:22 +0000 Subject: Release 1.1.1 --- INSTALL | 8 +- Makefile.in | 2 +- README | 4 +- VERSION | 2 +- doc/config.doc | 11 + src/classdef.cpp | 144 ++++++++---- src/classdef.h | 13 +- src/classlist.cpp | 2 +- src/code.l | 5 +- src/config.h | 1 + src/config.l | 412 +++++++++++++++++++++++++++-------- src/define.h | 4 +- src/dot.cpp | 2 +- src/doxygen.cpp | 135 +++++++++--- src/doxygen.h | 1 + src/entry.cpp | 1 + src/filedef.cpp | 35 ++- src/formula.cpp | 11 +- src/groupdef.cpp | 159 ++++++++++++-- src/groupdef.h | 20 +- src/index.cpp | 67 +++--- src/index.h | 2 +- src/latexgen.cpp | 8 +- src/memberdef.cpp | 48 ++-- src/memberdef.h | 27 ++- src/membergroup.cpp | 2 +- src/memberlist.cpp | 64 +++--- src/memberlist.h | 9 +- src/namespacedef.cpp | 2 +- src/namespacedef.h | 2 +- src/scanner.l | 91 ++++++-- src/translator.h | 53 ++++- src/translator_jp.h | 602 ++++++++++++++++++++++++++++++++++++++++++++++++--- src/util.cpp | 53 +++-- src/util.h | 8 +- 35 files changed, 1610 insertions(+), 400 deletions(-) diff --git a/INSTALL b/INSTALL index eb0f2e8..4cd915c 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -DOXYGEN Version 1.1.0-20000305 +DOXYGEN Version 1.1.1 CONTENTS -------- @@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: 1. Unpack the archive, unless you already have: - gunzip doxygen-1.1.0-20000305.src.tar.gz # uncompress the archive - tar xf doxygen-1.1.0-20000305.src.tar # unpack it + gunzip doxygen-1.1.1.src.tar.gz # uncompress the archive + tar xf doxygen-1.1.1.src.tar # unpack it 2. Run the configure script: @@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (05 March 2000) +Dimitri van Heesch (12 March 2000) diff --git a/Makefile.in b/Makefile.in index e8f5a34..4f6bc2b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -51,7 +51,7 @@ ps: docs pdf: docs cd latex ; $(MAKE) -archive: distclean +archive: clean tar zcvf dx`date +%y%m%d`.tgz tmake doc wintools examples bin objects \ src configure configure.bin Makefile.in Makefile.win.in INSTALL \ make.bat LANGUAGE.HOWTO LICENSE PLATFORMS VERSION diff --git a/README b/README index 983953e..3d325c0 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.1.0-20000305 +DOXYGEN Version 1.1.1 Please read INSTALL for compilation instructions. @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (05 March 2000) +Dimitri van Heesch (12 March 2000) diff --git a/VERSION b/VERSION index bca6dd5..524cb55 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0-20000305 +1.1.1 diff --git a/doc/config.doc b/doc/config.doc index 06871ac..906c86e 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -104,6 +104,7 @@ followed by the descriptions of the tags grouped by category.
  • \refitem cfg_input_filter INPUT_FILTER
  • \refitem cfg_internal_docs INTERNAL_DOCS
  • \refitem cfg_javadoc_autobrief JAVADOC_AUTOBRIEF +
  • \refitem cfg_latex_batchmode LATEX_BATCHMODE
  • \refitem cfg_latex_header LATEX_HEADER
  • \refitem cfg_latex_output LATEX_OUTPUT
  • \refitem cfg_macro_expansion MACRO_EXPANSION @@ -694,6 +695,16 @@ EXTRA_PACKAGES = times the version number of doxygen, the project name (see PROJECT_NAME), or the project number (see PROJECT_NUMBER). +\anchor cfg_latex_batchmode +
    \c LATEX_BATCHMODE
    + \addindex LATEX_BATCHMODE + +If the \c LATEX_BATCHMODE tag is set to \c YES, doxygen will add the \\batchmode. +command to the generated \f$\mbox{\LaTeX}\f$ files. This will +instruct \f$\mbox{\LaTeX}\f$ to keep running if errors occur, instead of +asking the user for help. This option is also used when generating formulas +in HTML. + \subsection rtf_output RTF related options diff --git a/src/classdef.cpp b/src/classdef.cpp index 8dc36a5..4c43d61 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -174,26 +174,65 @@ void ClassDef::insertMember(const MemberDef *md) default: // any of the other members if (md->isStatic()) { - switch (md->protection()) + if (md->isVariable()) { - case Protected: - proStaticMembers.append(md); - break; - case Public: - pubStaticMembers.append(md); - break; - case Private: - priStaticMembers.append(md); - break; + switch (md->protection()) + { + case Protected: + proStaticAttribs.append(md); + break; + case Public: + pubStaticAttribs.append(md); + break; + case Private: + priStaticAttribs.append(md); + break; + } + } + else // function + { + switch (md->protection()) + { + case Protected: + proStaticMembers.append(md); + break; + case Public: + pubStaticMembers.append(md); + break; + case Private: + priStaticMembers.append(md); + break; + } } } - else + else // not static { - switch (md->protection()) + if (md->isVariable()) { - case Protected: proMembers.append(md); break; - case Public: pubMembers.append(md); break; - case Private: priMembers.append(md); break; + switch (md->protection()) + { + case Protected: proAttribs.append(md); break; + case Public: pubAttribs.append(md); break; + case Private: priAttribs.append(md); break; + } + } + else if (md->isTypedef() || md->isEnumerate()) + { + switch (md->protection()) + { + case Protected: proTypes.append(md); break; + case Public: pubTypes.append(md); break; + case Private: priTypes.append(md); break; + } + } + else // member function + { + switch (md->protection()) + { + case Protected: proMembers.append(md); break; + case Public: pubMembers.append(md); break; + case Private: priMembers.append(md); break; + } } } if (md->protection()!=Private || Config::extractPrivateFlag) @@ -282,6 +321,15 @@ void ClassDef::computeAnchors() setAnchors('j',&signals); setAnchors('k',&related); setAnchors('l',&friends); + setAnchors('m',&pubAttribs); + setAnchors('n',&proAttribs); + setAnchors('o',&priAttribs); + setAnchors('p',&pubStaticAttribs); + setAnchors('q',&proStaticAttribs); + setAnchors('r',&priStaticAttribs); + setAnchors('s',&pubTypes); + setAnchors('t',&proTypes); + setAnchors('u',&priTypes); } // add a file name to the used files set @@ -549,21 +597,39 @@ void ClassDef::writeDocumentation(OutputList &ol) // write member groups ol.startMemberSections(); - pubMembers.writeDeclarations(ol,this,0,0,theTranslator->trPublicMembers(),0); - pubSlots.writeDeclarations(ol,this,0,0,theTranslator->trPublicSlots(),0); - signals.writeDeclarations(ol,this,0,0,theTranslator->trSignals(),0); - pubStaticMembers.writeDeclarations(ol,this,0,0,theTranslator->trStaticPublicMembers(),0); - proMembers.writeDeclarations(ol,this,0,0,theTranslator->trProtectedMembers(),0); - proSlots.writeDeclarations(ol,this,0,0,theTranslator->trProtectedSlots(),0); - proStaticMembers.writeDeclarations(ol,this,0,0,theTranslator->trStaticProtectedMembers(),0); + + // non static public members + pubTypes.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicTypes(),0); + pubMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicMembers(),0); + pubAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicAttribs(),0); + pubSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicSlots(),0); + signals.writeDeclarations(ol,this,0,0,0,theTranslator->trSignals(),0); + // static public members + pubStaticMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicMembers(),0); + pubStaticAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicAttribs(),0); + + // protected non-static members + proTypes.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedTypes(),0); + proMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedMembers(),0); + proAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedAttribs(),0); + proSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedSlots(),0); + // protected static members + proStaticMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticProtectedMembers(),0); + proStaticAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticProtectedAttribs(),0); + if (Config::extractPrivateFlag) { - priMembers.writeDeclarations(ol,this,0,0,theTranslator->trPrivateMembers(),0); - priSlots.writeDeclarations(ol,this,0,0,theTranslator->trPrivateSlots(),0); - priStaticMembers.writeDeclarations(ol,this,0,0,theTranslator->trStaticPrivateMembers(),0); + // private non-static members + priTypes.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateTypes(),0); + priMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateMembers(),0); + priAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateAttribs(),0); + priSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateSlots(),0); + // private static members + priStaticMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPrivateMembers(),0); + priStaticAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPrivateAttribs(),0); } - friends.writeDeclarations(ol,this,0,0,theTranslator->trFriends(),0); - related.writeDeclarations(ol,this,0,0, + friends.writeDeclarations(ol,this,0,0,0,theTranslator->trFriends(),0); + related.writeDeclarations(ol,this,0,0,0, theTranslator->trRelatedFunctions(), theTranslator->trRelatedSubscript() ); @@ -1130,21 +1196,21 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md) ol.endMemberItem(FALSE,0,0,FALSE); // TODO: pass correct group parameters // insert members of this class - pubMembers.writePlainDeclarations(ol,this,0,0); - pubSlots.writePlainDeclarations(ol,this,0,0); - signals.writePlainDeclarations(ol,this,0,0); - pubStaticMembers.writePlainDeclarations(ol,this,0,0); - proMembers.writePlainDeclarations(ol,this,0,0); - proSlots.writePlainDeclarations(ol,this,0,0); - proStaticMembers.writePlainDeclarations(ol,this,0,0); + pubMembers.writePlainDeclarations(ol,this,0,0,0); + pubSlots.writePlainDeclarations(ol,this,0,0,0); + signals.writePlainDeclarations(ol,this,0,0,0); + pubStaticMembers.writePlainDeclarations(ol,this,0,0,0); + proMembers.writePlainDeclarations(ol,this,0,0,0); + proSlots.writePlainDeclarations(ol,this,0,0,0); + proStaticMembers.writePlainDeclarations(ol,this,0,0,0); if (Config::extractPrivateFlag) { - priMembers.writePlainDeclarations(ol,this,0,0); - priSlots.writePlainDeclarations(ol,this,0,0); - priStaticMembers.writePlainDeclarations(ol,this,0,0); + priMembers.writePlainDeclarations(ol,this,0,0,0); + priSlots.writePlainDeclarations(ol,this,0,0,0); + priStaticMembers.writePlainDeclarations(ol,this,0,0,0); } - friends.writePlainDeclarations(ol,this,0,0); - related.writePlainDeclarations(ol,this,0,0); + friends.writePlainDeclarations(ol,this,0,0,0); + related.writePlainDeclarations(ol,this,0,0,0); } /*! a link to this class is possible within this project */ diff --git a/src/classdef.h b/src/classdef.h index d01a117..1425991 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -125,7 +125,7 @@ class ClassDef : public Definition BaseClassList *inheritedBy; NamespaceDef *nspace; // the namespace this class is in - /* member list by protection */ + /* member lists by protection */ MemberList pubMembers; MemberList proMembers; MemberList priMembers; @@ -135,6 +135,15 @@ class ClassDef : public Definition MemberList pubSlots; MemberList proSlots; MemberList priSlots; + MemberList pubAttribs; + MemberList proAttribs; + MemberList priAttribs; + MemberList pubStaticAttribs; + MemberList proStaticAttribs; + MemberList priStaticAttribs; + MemberList pubTypes; + MemberList proTypes; + MemberList priTypes; MemberList related; MemberList signals; MemberList friends; @@ -218,7 +227,7 @@ class BaseClassList : public QList if (c1==0 || c2==0) return FALSE; else - return strcasecmp(c1->name(),c2->name()); + return stricmp(c1->name(),c2->name()); } }; diff --git a/src/classlist.cpp b/src/classlist.cpp index 81bb940..36ac2b7 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -34,7 +34,7 @@ int ClassList::compareItems(GCI item1, GCI item2) //int prefixLength = Config::ignorePrefix.length(); //int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; //int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0; - return strcasecmp(c1->name().data()+getPrefixIndex(c1->name()), + return stricmp(c1->name().data()+getPrefixIndex(c1->name()), c2->name().data()+getPrefixIndex(c2->name()) ); } diff --git a/src/code.l b/src/code.l index c0c26af..1a9a6b4 100644 --- a/src/code.l +++ b/src/code.l @@ -301,10 +301,11 @@ static bool getLink(const char *className, ClassDef *cd; FileDef *fd; NamespaceDef *nd; + GroupDef *gd; QCString m=memberName; QCString c=className; //printf("Trying `%s'::`%s'\n",c.data(),m.data()); - if (getDefs(c,m,"()",md,cd,fd,nd) && md->isLinkable()) + if (getDefs(c,m,"()",md,cd,fd,nd,gd) && md->isLinkable()) { //printf("Found!\n"); if (g_exampleBlock) @@ -326,7 +327,7 @@ static bool getLink(const char *className, } } Definition *d=0; - if (cd) d=cd; else if (cd) d=nd; else d=fd; + if (cd) d=cd; else if (cd) d=nd; else if (fd) d=fd; else d=gd; if (d) { diff --git a/src/config.h b/src/config.h index b36892c..e54866a 100644 --- a/src/config.h +++ b/src/config.h @@ -115,6 +115,7 @@ struct Config static bool showIncFileFlag; // show include file in file documentation? static bool stripCommentsFlag; // strip special comments from code fragments? static bool sortMembersFlag; // sort members alphabetically? + static bool latexBatchModeFlag; // continue after latex errors? }; #endif diff --git a/src/config.l b/src/config.l index 3ab72bc..b8e92a8 100644 --- a/src/config.l +++ b/src/config.l @@ -66,24 +66,24 @@ void warn(const char *fmt, ...) QCString Config::projectName; QCString Config::projectNumber; QCString Config::outputDir; -QCString Config::htmlOutputDir; -QCString Config::latexOutputDir; -QCString Config::manOutputDir; -QCString Config::rtfOutputDir; -QCString Config::outputLanguage; +QCString Config::htmlOutputDir = "html"; +QCString Config::latexOutputDir = "latex"; +QCString Config::manOutputDir = "man"; +QCString Config::rtfOutputDir = "rtf"; +QCString Config::outputLanguage = "English"; QCString Config::headerFile; QCString Config::latexHeaderFile; QCString Config::footerFile; -QCString Config::cgiName; +QCString Config::cgiName = "search.cgi"; QCString Config::cgiURL; QCString Config::docURL; -QCString Config::binAbsPath; +QCString Config::binAbsPath = "/usr/local/bin/"; QCString Config::docAbsPath; -QCString Config::perlPath; +QCString Config::perlPath = "/usr/bin/perl"; QCString Config::genTagFile; QCString Config::inputFilter; -QCString Config::paperType; -QCString Config::manExtension; +QCString Config::paperType = "a4wide"; +QCString Config::manExtension = ".3"; QCString Config::htmlStyleSheet; QStrList Config::ignorePrefixList; QStrList Config::includePath; @@ -124,6 +124,7 @@ bool Config::inlineSourceFlag = FALSE; bool Config::rtfHyperFlag = FALSE; bool Config::compactRTFFlag = FALSE; bool Config::haveDotFlag = FALSE; +bool Config::latexBatchModeFlag = FALSE; bool Config::autoBriefFlag = TRUE; bool Config::warningFlag = TRUE; bool Config::generateHtml = TRUE; @@ -480,6 +481,7 @@ void Config::init() Config::haveDotFlag = FALSE; Config::compactRTFFlag = FALSE; Config::rtfHyperFlag = FALSE; + Config::latexBatchModeFlag = FALSE; Config::warningFlag = TRUE; Config::generateHtml = TRUE; Config::generateLatex = TRUE; @@ -503,6 +505,49 @@ void Config::init() Config::sortMembersFlag = TRUE; } +static void writeBoolValue(QTextStream &t,bool v) +{ + if (v) t << "YES"; else t << "NO"; +} + +static void writeIntValue(QTextStream &t,int i) +{ + t << i; +} + +static void writeStringValue(QTextStream &t,QCString &s) +{ + const char *p=s.data(); + char c; + bool hasBlanks=FALSE; + if (p) + { + while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t'); + if (hasBlanks) + t << "\"" << s << "\""; + else + t << s; + } +} + +static void writeStringList(QTextStream &t,QStrList &l) +{ + const char *p = l.first(); + bool first=TRUE; + while (p) + { + char c; + const char *s=p; + bool hasBlanks=FALSE; + while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t'); + if (!first) t << " "; + first=FALSE; + if (hasBlanks) t << "\"" << s << "\""; else t << s; + p = l.next(); + if (p) t << " \\" << endl; + } +} + void writeTemplateConfig(QFile *f,bool sl) { QTextStream t(f); @@ -531,7 +576,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# by quotes) that should identify the project. \n"; t << "\n"; } - t << "PROJECT_NAME =\n"; + t << "PROJECT_NAME = "; + writeStringValue(t,Config::projectName); + t << "\n"; if (!sl) { t << "\n"; @@ -540,7 +587,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# if some version control system is used.\n"; t << "\n"; } - t << "PROJECT_NUMBER =\n"; + t << "PROJECT_NUMBER = "; + writeStringValue(t,Config::projectNumber); + t << "\n"; if (!sl) { t << "\n"; @@ -550,7 +599,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# where doxygen was started. If left blank the current directory will be used.\n"; t << "\n"; } - t << "OUTPUT_DIRECTORY =\n"; + t << "OUTPUT_DIRECTORY = "; + writeStringValue(t,Config::outputDir); + t << "\n"; if (!sl) { t << "\n"; @@ -561,7 +612,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# Dutch, French, Italian, Czech, Swedish, German and Japanese\n"; t << "\n"; } - t << "OUTPUT_LANGUAGE = English\n"; + t << "OUTPUT_LANGUAGE = "; + writeStringValue(t,Config::outputLanguage); + t << "\n"; if (!sl) { t << "\n"; @@ -569,7 +622,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# by doxygen. Possible values are YES and NO. If left blank NO is used.\n"; t << "\n"; } - t << "QUIET = NO\n"; + t << "QUIET = "; + writeBoolValue(t,Config::quietFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -578,7 +633,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# NO is used.\n"; t << "\n"; } - t << "WARNINGS = YES\n"; + t << "WARNINGS = "; + writeBoolValue(t,Config::warningFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -587,7 +644,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# the value YES disables it.\n"; t << "\n"; } - t << "DISABLE_INDEX = NO\n"; + t << "DISABLE_INDEX = "; + writeBoolValue(t,Config::noIndexFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -595,7 +654,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# included in the documentation, even if no documentation was available.\n"; t << "\n"; } - t << "EXTRACT_ALL = NO\n"; + t << "EXTRACT_ALL = "; + writeBoolValue(t,Config::extractAllFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -603,7 +664,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# will be included in the documentation.\n"; t << "\n"; } - t << "EXTRACT_PRIVATE = NO\n"; + t << "EXTRACT_PRIVATE = "; + writeBoolValue(t,Config::extractPrivateFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -611,7 +674,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# undocumented members inside documented classes or files.\n"; t << "\n"; } - t << "HIDE_UNDOC_MEMBERS = NO\n"; + t << "HIDE_UNDOC_MEMBERS = "; + writeBoolValue(t,Config::hideMemberFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -619,7 +684,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# undocumented classes.\n"; t << "\n"; } - t << "HIDE_UNDOC_CLASSES = NO\n"; + t << "HIDE_UNDOC_CLASSES = "; + writeBoolValue(t,Config::hideClassFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -629,7 +696,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# Set to NO to disable this.\n"; t << "\n"; } - t << "BRIEF_MEMBER_DESC = YES\n"; + t << "BRIEF_MEMBER_DESC = "; + writeBoolValue(t,Config::briefMemDescFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -639,7 +708,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# brief descriptions will be completely suppressed.\n"; t << "\n"; } - t << "REPEAT_BRIEF = YES\n"; + t << "REPEAT_BRIEF = "; + writeBoolValue(t,Config::repeatBriefFlag); + t << "\n"; if (!sl) { t <<"\n"; @@ -648,7 +719,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# description.\n"; t <<"\n"; } - t << "ALWAYS_DETAILED_SEC = NO\n"; + t << "ALWAYS_DETAILED_SEC = "; + writeBoolValue(t,Config::alwaysDetailsFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -657,7 +730,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# to NO the shortest path that makes the file name unique will be used.\n"; t << "\n"; } - t << "FULL_PATH_NAMES = NO\n"; + t << "FULL_PATH_NAMES = "; + writeBoolValue(t,Config::fullPathNameFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -667,7 +742,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# the path.\n"; t << "\n"; } - t << "STRIP_FROM_PATH =\n"; + t << "STRIP_FROM_PATH = "; + writeStringList(t,Config::stripFromPath); + t << "\n"; if (!sl) { t << "\n"; @@ -677,7 +754,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# Set it to YES to include the internal documentation.\n"; t << "\n"; } - t << "INTERNAL_DOCS = NO\n"; + t << "INTERNAL_DOCS = "; + writeBoolValue(t,Config::internalDocsFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -686,7 +765,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# super classes. Setting the tag to NO turns the diagrams off.\n"; t << "\n"; } - t << "CLASS_DIAGRAMS = YES\n"; + t << "CLASS_DIAGRAMS = "; + writeBoolValue(t,Config::classDiagramFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -694,7 +775,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# be generated. Documented entities will be cross-referenced with these sources.\n"; t << "\n"; } - t << "SOURCE_BROWSER = NO\n"; + t << "SOURCE_BROWSER = "; + writeBoolValue(t,Config::sourceBrowseFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -702,7 +785,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# of functions and classes directly in the documentation.\n"; t << "\n"; } - t << "INLINE_SOURCES = NO\n"; + t << "INLINE_SOURCES = "; + writeBoolValue(t,Config::inlineSourceFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -711,7 +796,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# fragments. Normal C and C++ comments will always remain visible.\n"; t << "\n"; } - t << "STRIP_CODE_COMMENTS = YES\n"; + t << "STRIP_CODE_COMMENTS = "; + writeBoolValue(t,Config::stripCommentsFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -722,7 +809,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# supports case sensitive file names.\n"; t << "\n"; } - t << "CASE_SENSE_NAMES = NO\n"; + t << "CASE_SENSE_NAMES = "; + writeBoolValue(t,Config::caseSensitiveNames); + t << "\n"; if (!sl) { t << "\n"; @@ -731,7 +820,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# which an include is specified. Set to NO to disable this.\n"; t << "\n"; } - t << "VERBATIM_HEADERS = YES\n"; + t << "VERBATIM_HEADERS = "; + writeBoolValue(t,Config::verbatimHeaderFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -740,7 +831,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# of that file.\n"; t << "\n"; } - t << "SHOW_INCLUDE_FILES = YES\n"; + t << "SHOW_INCLUDE_FILES = "; + writeBoolValue(t,Config::showIncFileFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -750,7 +843,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# behave just like the Qt-style comments.\n"; t << "\n"; } - t << "JAVADOC_AUTOBRIEF = YES\n"; + t << "JAVADOC_AUTOBRIEF = "; + writeBoolValue(t,Config::autoBriefFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -759,7 +854,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# reimplements.\n"; t << "\n"; } - t << "INHERIT_DOCS = YES\n"; + t << "INHERIT_DOCS = "; + writeBoolValue(t,Config::inheritDocsFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -767,7 +864,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# is inserted in the documentation for inline members.\n"; t << "\n"; } - t << "INLINE_INFO = YES\n"; + t << "INLINE_INFO = "; + writeBoolValue(t,Config::inlineInfoFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -777,7 +876,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# declaration order.\n"; t << "\n"; } - t << "SORT_MEMBER_DOCS = YES\n"; + t << "SORT_MEMBER_DOCS = "; + writeBoolValue(t,Config::sortMembersFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -785,7 +886,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# Doxygen uses this value to replace tabs by spaces in code fragments.\n"; t << "\n"; } - t << "TAB_SIZE = 8\n"; + t << "TAB_SIZE = "; + writeIntValue(t,Config::tabSize); + t << "\n"; if (!sl) { t << "\n"; @@ -802,7 +905,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# with spaces.\n"; t << "\n"; } - t << "INPUT =\n"; + t << "INPUT = "; + writeStringList(t,Config::inputSources); + t << "\n"; if (!sl) { t << "\n"; @@ -812,7 +917,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# blank all files are included.\n"; t << "\n"; } - t << "FILE_PATTERNS =\n"; + t << "FILE_PATTERNS = "; + writeStringList(t,Config::filePatternList); + t << "\n"; if (!sl) { t << "\n"; @@ -821,7 +928,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# If left blank NO is used.\n"; t << "\n"; } - t << "RECURSIVE = NO\n"; + t << "RECURSIVE = "; + writeBoolValue(t,Config::recursiveFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -830,7 +939,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# subdirectory from a directory tree whose root is specified with the INPUT tag.\n"; t << "\n"; } - t << "EXCLUDE =\n"; + t << "EXCLUDE = "; + writeStringList(t,Config::excludeSources); + t << "\n"; if (!sl) { t << "\n"; @@ -839,7 +950,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# certain files from those directories.\n"; t << "\n"; } - t << "EXCLUDE_PATTERNS =\n"; + t << "EXCLUDE_PATTERNS = "; + writeStringList(t,Config::excludePatternList); + t << "\n"; if (!sl) { t << "\n"; @@ -848,7 +961,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# the \\include command).\n"; t << "\n"; } - t << "EXAMPLE_PATH =\n"; + t << "EXAMPLE_PATH = "; + writeStringList(t,Config::examplePath); + t << "\n"; if (!sl) { t << "\n"; @@ -858,7 +973,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# blank all files are included.\n"; t << "\n"; } - t << "EXAMPLE_PATTERNS =\n"; + t << "EXAMPLE_PATTERNS = "; + writeStringList(t,Config::examplePatternList); + t << "\n"; if (!sl) { @@ -868,7 +985,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# the \\image command).\n"; t << "\n"; } - t << "IMAGE_PATH =\n"; + t << "IMAGE_PATH = "; + writeStringList(t,Config::imagePath); + t << "\n"; if (!sl) { t << "\n"; @@ -880,7 +999,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# to standard output.\n"; t << "\n"; } - t << "INPUT_FILTER =\n"; + t << "INPUT_FILTER = "; + writeStringValue(t,Config::inputFilter); + t << "\n"; if (!sl) { t << "\n"; @@ -895,7 +1016,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# generate HTML output\n"; t << "\n"; } - t << "GENERATE_HTML = YES\n"; + t << "GENERATE_HTML = "; + writeBoolValue(t,Config::generateHtml); + t << "\n"; if (!sl) { t << "\n"; @@ -904,7 +1027,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# put in front of it. If left blank `html' will be used as the default path.\n"; t << "\n"; } - t << "HTML_OUTPUT =\n"; + t << "HTML_OUTPUT = "; + writeStringValue(t,Config::htmlOutputDir); + t << "\n"; if (!sl) { t << "\n"; @@ -913,7 +1038,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# standard header.\n"; t << "\n"; } - t << "HTML_HEADER =\n"; + t << "HTML_HEADER = "; + writeStringValue(t,Config::headerFile); + t << "\n"; if (!sl) { t << "\n"; @@ -922,7 +1049,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# standard footer.\n"; t << "\n"; } - t << "HTML_FOOTER =\n"; + t << "HTML_FOOTER = "; + writeStringValue(t,Config::footerFile); + t << "\n"; if (!sl) { t << "\n"; @@ -932,7 +1061,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# will generate a default style sheet\n"; t << "\n"; } - t << "HTML_STYLESHEET =\n"; + t << "HTML_STYLESHEET = "; + writeStringValue(t,Config::htmlStyleSheet); + t << "\n"; if (!sl) { t << "\n"; @@ -941,7 +1072,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# NO a bullet list will be used.\n"; t << "\n"; } - t << "HTML_ALIGN_MEMBERS = YES\n"; + t << "HTML_ALIGN_MEMBERS = "; + writeBoolValue(t,Config::htmlAlignMemberFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -951,7 +1084,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# of the generated HTML documentation.\n"; t << "\n"; } - t << "GENERATE_HTMLHELP = NO\n"; + t << "GENERATE_HTMLHELP = "; + writeBoolValue(t,Config::htmlHelpFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -967,7 +1102,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# contains a lot of classes, structs, unions or interfaces.\n"; t << "\n"; } - t << "ALPHABETICAL_INDEX = NO\n"; + t << "ALPHABETICAL_INDEX = "; + writeBoolValue(t,Config::alphaIndexFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -976,7 +1113,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# in which this list will be split (can be a number in the range [1..20])\n"; t << "\n"; } - t << "COLS_IN_ALPHA_INDEX = 5\n"; + t << "COLS_IN_ALPHA_INDEX = "; + writeIntValue(t,Config::colsInAlphaIndex); + t << "\n"; if (!sl) { t << "\n"; @@ -986,7 +1125,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# should be ignored while generating the index headers.\n"; t << "\n"; } - t << "IGNORE_PREFIX = \n"; + t << "IGNORE_PREFIX = "; + writeStringList(t,Config::ignorePrefixList); + t << "\n"; if (!sl) { t << "\n"; @@ -1001,7 +1142,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# generate Latex output.\n"; t << "\n"; } - t << "GENERATE_LATEX = YES\n"; + t << "GENERATE_LATEX = "; + writeBoolValue(t,Config::generateLatex); + t << "\n"; if (!sl) { t << "\n"; @@ -1010,7 +1153,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# put in front of it. If left blank `latex' will be used as the default path.\n"; t << "\n"; } - t << "LATEX_OUTPUT =\n"; + t << "LATEX_OUTPUT = "; + writeStringValue(t,Config::latexOutputDir); + t << "\n"; if (!sl) { t << "\n"; @@ -1019,7 +1164,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# save some trees in general.\n"; t << "\n"; } - t << "COMPACT_LATEX = NO\n"; + t << "COMPACT_LATEX = "; + writeBoolValue(t,Config::compactLatexFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1028,7 +1175,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# executive. If left blank a4wide will be used.\n"; t << "\n"; } - t << "PAPER_TYPE = a4wide\n"; + t << "PAPER_TYPE = "; + writeStringValue(t,Config::paperType); + t << "\n"; if (!sl) { t << "\n"; @@ -1036,7 +1185,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# packages that should be included in the LaTeX output.\n"; t << "\n"; } - t << "EXTRA_PACKAGES =\n"; + t << "EXTRA_PACKAGES = "; + writeStringList(t,Config::extraPackageList); + t << "\n"; if (!sl) { t << "\n"; @@ -1046,7 +1197,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# standard header. Notice: only use this tag if you know what you are doing!\n"; t << "\n"; } - t << "LATEX_HEADER =\n"; + t << "LATEX_HEADER = "; + writeStringValue(t,Config::latexHeaderFile); + t << "\n"; if (!sl) { t << "\n"; @@ -1056,11 +1209,27 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# This makes the output suitable for online browsing using a pdf viewer.\n"; t << "\n"; } - t << "PDF_HYPERLINKS = NO\n"; + t << "PDF_HYPERLINKS = "; + writeBoolValue(t,Config::pdfHyperFlag); + t << "\n"; if (!sl) { t << "\n"; } + if (!sl) + { + t << "\n"; + t << "# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.\n"; + t << "# command to the generated LaTeX files. This will instruct LaTeX to keep\n"; + t << "# running if errors occur, instead of asking the user for help.\n"; + t << "# This option is also used when generating formulas in HTML.\n"; + } + if (!sl) + { + t << "LATEX_BATCHMODE = "; + } + writeBoolValue(t,Config::latexBatchModeFlag); + t << "\n"; t << "#---------------------------------------------------------------------------\n"; t << "# configuration options related to the RTF output\n"; t << "#---------------------------------------------------------------------------\n"; @@ -1073,7 +1242,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# or editors.\n"; t << "\n"; } - t << "GENERATE_RTF = NO\n"; + t << "GENERATE_RTF = "; + writeBoolValue(t,Config::generateRTF); + t << "\n"; if (!sl) { t << "\n"; @@ -1082,7 +1253,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# put in front of it. If left blank `rtf' will be used as the default path.\n"; t << "\n"; } - t << "RTF_OUTPUT =\n"; + t << "RTF_OUTPUT = "; + writeStringValue(t,Config::rtfOutputDir); + t << "\n"; if (!sl) { t << "\n"; @@ -1091,7 +1264,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# save some trees in general.\n"; t << "\n"; } - t << "COMPACT_RTF = NO\n"; + t << "COMPACT_RTF = "; + writeBoolValue(t,Config::compactRTFFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1103,7 +1278,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# Note: wordpad (write) and others do not support links.\n"; t << "\n"; } - t << "RTF_HYPERLINKS = NO\n"; + t << "RTF_HYPERLINKS = "; + writeBoolValue(t,Config::rtfHyperFlag); + t << "\n"; t << "#---------------------------------------------------------------------------\n"; t << "# configuration options related to the man page output\n"; @@ -1115,7 +1292,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# generate man pages\n"; t << "\n"; } - t << "GENERATE_MAN = YES\n"; + t << "GENERATE_MAN = "; + writeBoolValue(t,Config::generateMan); + t << "\n"; if (!sl) { t << "\n"; @@ -1124,7 +1303,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# put in front of it. If left blank `man' will be used as the default path.\n"; t << "\n"; } - t << "MAN_OUTPUT =\n"; + t << "MAN_OUTPUT = "; + writeStringValue(t,Config::manOutputDir); + t << "\n"; if (!sl) { t << "\n"; @@ -1132,8 +1313,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# the generated man pages (default is the subroutine's section .3)\n"; t << "\n"; } - t << "MAN_EXTENSION = .3\n"; - + t << "MAN_EXTENSION = "; + writeStringValue(t,Config::manExtension); + t << "\n"; if (!sl) { t << "\n"; @@ -1149,7 +1331,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# files.\n"; t << "\n"; } - t << "ENABLE_PREPROCESSING = YES\n"; + t << "ENABLE_PREPROCESSING = "; + writeBoolValue(t,Config::preprocessingFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1158,7 +1342,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# compilation will be performed.\n"; t << "\n"; } - t << "MACRO_EXPANSION = NO\n"; + t << "MACRO_EXPANSION = "; + writeBoolValue(t,Config::macroExpansionFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1166,7 +1352,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# in the INCLUDE_PATH (see below) will be search if a #include is found.\n"; t << "\n"; } - t << "SEARCH_INCLUDES = YES\n"; + t << "SEARCH_INCLUDES = "; + writeBoolValue(t,Config::searchIncludeFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1175,7 +1363,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# the preprocessor.\n" ; t << "\n"; } - t << "INCLUDE_PATH =\n"; + t << "INCLUDE_PATH = "; + writeStringList(t,Config::includePath); + t << "\n"; if (!sl) { t << "\n"; @@ -1186,7 +1376,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# omitted =1 is assumed.\n"; t << "\n"; } - t << "PREDEFINED =\n"; + t << "PREDEFINED = "; + writeStringList(t,Config::predefined); + t << "\n"; if (!sl) { t << "\n"; @@ -1195,7 +1387,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# PREDEFINED tag.\n"; t << "\n"; } - t << "EXPAND_ONLY_PREDEF = NO\n"; + t << "EXPAND_ONLY_PREDEF = "; + writeBoolValue(t,Config::onlyPredefinedFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1209,7 +1403,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# The TAGFILES tag can be used to specify one or more tagfiles. \n"; t << "\n"; } - t << "TAGFILES =\n"; + t << "TAGFILES = "; + writeStringList(t,Config::tagFileList); + t << "\n"; if (!sl) { t << "\n"; @@ -1217,7 +1413,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# a tag file that is based on the input files it reads.\n"; t << "\n"; } - t << "GENERATE_TAGFILE =\n"; + t << "GENERATE_TAGFILE = "; + writeStringValue(t,Config::genTagFile); + t << "\n"; if (!sl) { t << "\n"; @@ -1226,7 +1424,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# will be listed.\n"; t << "\n"; } - t << "ALLEXTERNALS = NO\n"; + t << "ALLEXTERNALS = "; + writeBoolValue(t,Config::allExtFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1234,7 +1434,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# interpreter (i.e. the result of `which perl').\n"; t << "\n"; } - t << "PERL_PATH = /usr/bin/perl\n"; + t << "PERL_PATH = "; + writeStringValue(t,Config::perlPath); + t << "\n"; if (!sl) { t << "\n"; @@ -1251,7 +1453,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# have no effect if this option is set to NO (the default)\n"; t << "\n"; } - t << "HAVE_DOT = NO\n"; + t << "HAVE_DOT = "; + writeBoolValue(t,Config::haveDotFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1261,7 +1465,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# class references variables) of the class with other documented classes.\n"; t << "\n"; } - t << "COLLABORATION_GRAPH = YES\n"; + t << "COLLABORATION_GRAPH = "; + writeBoolValue(t,Config::collGraphFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1271,7 +1477,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# documented files.\n"; t << "\n"; } - t << "INCLUDE_GRAPH = YES\n"; + t << "INCLUDE_GRAPH = "; + writeBoolValue(t,Config::includeGraphFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1279,7 +1487,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# will graphical hierarchy of all classes instead of a textual one.\n"; t << "\n"; } - t << "GRAPHICAL_HIERARCHY = YES\n"; + t << "GRAPHICAL_HIERARCHY = "; + writeBoolValue(t,Config::gfxHierarchyFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1294,7 +1504,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# used. If set to NO the values of all tags below this one will be ignored.\n"; t << "\n"; } - t << "SEARCHENGINE = NO\n"; + t << "SEARCHENGINE = "; + writeBoolValue(t,Config::searchEngineFlag); + t << "\n"; if (!sl) { t << "\n"; @@ -1303,7 +1515,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# A script with this name will be generated by doxygen.\n"; t << "\n"; } - t << "CGI_NAME = search.cgi\n"; + t << "CGI_NAME = "; + writeStringValue(t,Config::cgiName); + t << "\n"; if (!sl) { t << "\n"; @@ -1312,7 +1526,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# details.\n"; t << "\n"; } - t << "CGI_URL =\n"; + t << "CGI_URL = "; + writeStringValue(t,Config::cgiURL); + t << "\n"; if (!sl) { t << "\n"; @@ -1321,7 +1537,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# documentation, with file:// prepended to it, will be used.\n"; t << "\n"; } - t << "DOC_URL =\n"; + t << "DOC_URL = "; + writeStringValue(t,Config::docURL); + t << "\n"; if (!sl) { t << "\n"; @@ -1330,7 +1548,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# will be used.\n"; t << "\n"; } - t << "DOC_ABSPATH =\n"; + t << "DOC_ABSPATH = "; + writeStringValue(t,Config::docAbsPath); + t << "\n"; if (!sl) { t << "\n"; @@ -1338,7 +1558,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# is installed.\n"; t << "\n"; } - t << "BIN_ABSPATH = /usr/local/bin/\n"; + t << "BIN_ABSPATH = "; + writeStringValue(t,Config::binAbsPath); + t << "\n"; if (!sl) { t << "\n"; @@ -1347,7 +1569,9 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# the documentation for these projects as well.\n"; t << "\n"; } - t << "EXT_DOC_PATHS =\n"; + t << "EXT_DOC_PATHS = "; + writeStringList(t,Config::extDocPathList); + t << "\n"; } void checkConfig() diff --git a/src/define.h b/src/define.h index 1e39ff5..358f10c 100644 --- a/src/define.h +++ b/src/define.h @@ -53,7 +53,7 @@ class DefineList : public QList ~DefineList() {} int compareItems(GCI i1,GCI i2) { - return strcasecmp(((Define *)i1)->name,((Define *)i2)->name); + return stricmp(((Define *)i1)->name,((Define *)i2)->name); } }; @@ -65,7 +65,7 @@ class DefineName : public QList const char *nameString() const { return name; } int compareItems(GCI i1,GCI i2) { - return strcasecmp(((Define *)i1)->name,((Define *)i2)->name); + return stricmp(((Define *)i1)->name,((Define *)i2)->name); } private: diff --git a/src/dot.cpp b/src/dot.cpp index 03f4227..e1e31c2 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -159,7 +159,7 @@ class DotNodeList : public QList ~DotNodeList() {} int compareItems(GCI item1,GCI item2) { - return strcasecmp(((DotNode *)item1)->m_label,((DotNode *)item2)->m_label); + return stricmp(((DotNode *)item1)->m_label,((DotNode *)item2)->m_label); } }; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 56787b9..2cb5483 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -141,6 +141,7 @@ int annotatedClasses; int hierarchyClasses; int documentedFunctions; int documentedMembers; +int documentedHtmlFiles; int documentedFiles; int documentedGroups; int documentedNamespaces; @@ -432,6 +433,48 @@ static bool addNamespace(Entry *root,ClassDef *cd) return FALSE; } +static void addClassToGroups(Entry *root,ClassDef *cd) +{ + QListIterator sli(*root->groups); + QCString *s; + for (;(s=sli.current());++sli) + { + GroupDef *gd=0; + if (!s->isEmpty() && (gd=groupDict[*s])) + { + gd->addClass(cd); + //printf("Compound %s: in group %s\n",cd->name().data(),s->data()); + } + } +} + +static void addMemberToGroups(Entry *root,MemberDef *md) +{ + QListIterator sli(*root->groups); + QCString *s; + for (;(s=sli.current());++sli) + { + GroupDef *gd=0; + if (!s->isEmpty() && (gd=groupDict[*s])) + { + GroupDef *mgd = md->groupDef(); + if (mgd==0) + { + gd->addMember(md); + md->setGroupDef(gd); + } + else if (mgd!=gd) + { + warn("Warning: Member %s found in multiple groups.!\n" + "The member will be put in group %s, and not in group %s", + md->name().data(),mgd->name().data(),gd->name().data() + ); + } + //printf("Member %s: in group %s\n",md->name().data(),s->data()); + } + } +} + //---------------------------------------------------------------------- // build a list of all classes mentioned in the documentation @@ -518,6 +561,7 @@ void buildClassList(Entry *root) // ); fd->insertClass(cd); } + addClassToGroups(root,cd); } else // new class { @@ -555,17 +599,7 @@ void buildClassList(Entry *root) cd->setBodySegment(root->bodyLine,root->endBodyLine); cd->setBodyDef(fd); - QListIterator sli(*root->groups); - QCString *s; - for (;(s=sli.current());++sli) - { - GroupDef *gd=0; - if (!s->isEmpty() && (gd=groupDict[*s])) - { - gd->addClass(cd); - //printf("Compound %s: in group %s\n",cd->name().data(),s->data()); - } - } + addClassToGroups(root,cd); // see if the class is found inside a namespace bool found=addNamespace(root,cd); @@ -1340,6 +1374,8 @@ void buildMemberList(Entry *root) cd->insertMember(md); // add file to list of used files cd->insertUsedFile(root->fileName); + + addMemberToGroups(root,md); } else if (root->parent && !(root->parent->section & Entry::COMPOUND_MASK) && @@ -1493,6 +1529,7 @@ void buildMemberList(Entry *root) functionNameDict.insert(name,mn); functionNameList.inSort(mn); } + addMemberToGroups(root,md); } else { @@ -1874,7 +1911,7 @@ void computeClassRelations(Entry *root) } //----------------------------------------------------------------------- -// compute the references (anchors in HTML) for each member in the class +// compute the references (anchors in HTML) for each function in the file void computeMemberReferences() { @@ -1884,13 +1921,6 @@ void computeMemberReferences() cd->computeAnchors(); cd=classList.next(); } -} - -//----------------------------------------------------------------------- -// compute the references (anchors in HTML) for each function in the file - -void computeFunctionReferences() -{ FileName *fn=inputNameList.first(); while (fn) { @@ -1908,6 +1938,12 @@ void computeFunctionReferences() nd->computeAnchors(); nd=namespaceList.next(); } + GroupDef *gd=groupList.first(); + while (gd) + { + gd->computeAnchors(); + gd=groupList.next(); + } } @@ -1994,6 +2030,7 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, md->setDefLine(root->startLine); if (root->inLine && !md->isInline()) md->setInline(TRUE); md->addSectionsToDefinition(root->anchors); + addMemberToGroups(root,md); if (cd) cd->insertUsedFile(root->fileName); if (root->mGrpId!=-1) { @@ -3373,7 +3410,7 @@ void computeMemberRelations() // mcd->name().data(),md->name().data(), // bmcd->name().data(),bmd->name().data() // ); - if (md!=bmd && bmcd && mcd && mcd->isBaseClass(bmcd)) + if (md!=bmd && bmcd && mcd && bmcd!=mcd && mcd->isBaseClass(bmcd)) { //printf(" Base argList=`%s'\n Super argList=`%s'\n", // argListToString(bmd->argumentList()).data(), @@ -3386,7 +3423,14 @@ void computeMemberRelations() mcd->isLinkable() && bmcd->isLinkable() ) { - md->setReimplements(bmd); + MemberDef *rmd; + if ((rmd=md->reimplements())==0 || + minClassDistance(mcd,bmcd)memberClass()) + ) + { + //printf("setting (new) reimplements member\n"); + md->setReimplements(bmd); + } bmd->insertReimplementedBy(md); } } @@ -3450,7 +3494,7 @@ void buildCompleteMemberLists() void generateFileDocs() { - if (documentedFiles==0) return; + if (documentedHtmlFiles==0) return; writeFileIndex(*outputList); if (inputNameList.count()>0) @@ -4628,15 +4672,17 @@ void readFormulaRepository() void usage(const char *name) { msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2000\n\n",versionString); - msg("You can use doxygen in two ways:\n\n"); + msg("You can use doxygen in three ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); - msg(" If -s is specified the comments in the config file will be omitted.\n"); msg(" If - is used for configName doxygen will write to standard output.\n\n"); - msg("2) Use doxygen to generate documentation using an existing "); + msg("2) Use doxygen to update an old configuration file:\n"); + msg(" %s [-s] -u [configName]\n\n",name); + msg("3) Use doxygen to generate documentation using an existing "); msg("configuration file:\n"); msg(" %s [configName]\n\n",name); msg(" If - is used for configName doxygen will read from standard input.\n\n"); + msg("If -s is specified the comments in the config file will be omitted.\n"); msg("If configName is omitted `Doxyfile' will be used as a default.\n\n"); exit(1); } @@ -4672,6 +4718,7 @@ int main(int argc,char **argv) const char *debugLabel; bool genConfig=FALSE; bool shortList=FALSE; + bool updateConfig=FALSE; while (optind=argc) { if (configFileInfo1.exists()) + { config=fileToString("Doxyfile"); + configName="Doxyfile"; + } else if (configFileInfo2.exists()) { config=fileToString("doxyfile"); + configName="doxyfile"; } else { @@ -4734,11 +4782,31 @@ int main(int argc,char **argv) } } else + { config=fileToString(argv[optind]); + configName=argv[optind]; + } parseConfig(config); + + if (updateConfig) + { + generateConfigFile(configName,shortList); + exit(1); + } + checkConfig(); + + /************************************************************************** + * Initialize some global constants + **************************************************************************/ + spaces.fill(' ',Config::tabSize); + compoundKeywordDict.insert("class",(void *)8); + compoundKeywordDict.insert("struct",(void *)8); + compoundKeywordDict.insert("union",(void *)8); + compoundKeywordDict.insert("interface",(void *)8); + compoundKeywordDict.insert("exception",(void *)8); /************************************************************************** * Initialize output generators * @@ -4943,9 +5011,6 @@ int main(int argc,char **argv) msg("Computing member references...\n"); computeMemberReferences(); - msg("Computing function references...\n"); - computeFunctionReferences(); - msg("Computing member relations...\n"); computeMemberRelations(); @@ -4990,7 +5055,7 @@ int main(int argc,char **argv) hierarchyClasses = countClassHierarchy(); documentedMembers = countClassMembers(); documentedFunctions = countFileMembers(); - documentedFiles = countFiles(); + countFiles(documentedHtmlFiles,documentedFiles); documentedGroups = countGroups(); documentedNamespaces = countNamespaces(); documentedNamespaceMembers = countNamespaceMembers(); diff --git a/src/doxygen.h b/src/doxygen.h index a6fba5b..626d174 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -124,6 +124,7 @@ extern int documentedFunctions; extern int documentedMembers; extern int documentedDefines; extern int documentedFiles; +extern int documentedHtmlFiles; extern int documentedGroups; extern int documentedNamespaces; extern int documentedNamespaceMembers; diff --git a/src/entry.cpp b/src/entry.cpp index 8d4b9f2..9a175ef 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -23,6 +23,7 @@ Entry::Entry() num++; //printf("New Entry %d\n",num); parent=0; + section = EMPTY_SEC; sublist = new QList; sublist->setAutoDelete(TRUE); extends = new QList; diff --git a/src/filedef.cpp b/src/filedef.cpp index 5caacff..e6409da 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -294,7 +294,7 @@ void FileDef::writeDocumentation(OutputList &ol) if (found) ol.endMemberList(); } - allMemberList.writeDeclarations(ol,0,0,this,0,0); + allMemberList.writeDeclarations(ol,0,0,this,0,0,0); ol.endMemberSections(); //doc=doc.stripWhiteSpace(); @@ -346,75 +346,74 @@ void FileDef::writeDocumentation(OutputList &ol) } } - //memList->countDocMembers(); defineMembers.countDocMembers(); - if ( /*memList->defineCount()>0*/ defineMembers.totalCount()>0 ) + if (defineMembers.totalCount()>0 ) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,theTranslator->trDefineDocumentation()); ol.endGroupHeader(); - /*memList->*/defineMembers.writeDocumentation(ol,name()/*,MemberDef::Define*/); + defineMembers.writeDocumentation(ol,name()); } protoMembers.countDocMembers(); - if ( /*memList->protoCount()>0*/ protoMembers.totalCount()>0 ) + if (protoMembers.totalCount()>0 ) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); ol.endGroupHeader(); - /*memList->*/protoMembers.writeDocumentation(ol,name()/*,MemberDef::Prototype*/); + protoMembers.writeDocumentation(ol,name()); } typedefMembers.countDocMembers(); - if ( /*memList->typedefCount()>0*/ typedefMembers.totalCount()>0 ) + if (typedefMembers.totalCount()>0 ) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,theTranslator->trTypedefDocumentation()); ol.endGroupHeader(); - /*memList->*/typedefMembers.writeDocumentation(ol,name()/*,MemberDef::Typedef*/); + typedefMembers.writeDocumentation(ol,name()); } enumMembers.countDocMembers(); - if ( /*memList->enumCount()>0*/ enumMembers.totalCount()>0 ) + if (enumMembers.totalCount()>0 ) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,theTranslator->trEnumerationTypeDocumentation()); ol.endGroupHeader(); - /*memList->*/enumMembers.writeDocumentation(ol,name()/*,MemberDef::Enumeration*/); + enumMembers.writeDocumentation(ol,name()); } enumValMembers.countDocMembers(); - if ( /*memList->enumValueCount()>0*/ enumValMembers.totalCount()>0 ) + if (enumValMembers.totalCount()>0 ) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,theTranslator->trEnumerationValueDocumentation()); ol.endGroupHeader(); - /*memList->*/enumValMembers.writeDocumentation(ol,name()/*,MemberDef::EnumValue*/); + enumValMembers.writeDocumentation(ol,name()); } funcMembers.countDocMembers(); - if ( /*memList->funcCount()>0*/ funcMembers.totalCount()>0 ) + if (funcMembers.totalCount()>0 ) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,theTranslator->trFunctionDocumentation()); ol.endGroupHeader(); - /*memList->*/funcMembers.writeDocumentation(ol,name()/*,MemberDef::Function*/); + funcMembers.writeDocumentation(ol,name()); } varMembers.countDocMembers(); - if ( /*memList->varCount()>0*/ varMembers.totalCount()>0 ) + if (varMembers.totalCount()>0 ) { ol.writeRuler(); ol.startGroupHeader(); parseText(ol,theTranslator->trVariableDocumentation()); ol.endGroupHeader(); - /*memList->*/varMembers.writeDocumentation(ol,name()/*,MemberDef::Variable*/); + varMembers.writeDocumentation(ol,name()); } // write Author section (Man only) @@ -573,8 +572,8 @@ int FileList::compareItems(GCI item1, GCI item2) FileDef *f2=(FileDef *)item2; ASSERT(f1!=0 && f2!=0); return Config::fullPathNameFlag ? - strcasecmp(f1->absFilePath(),f2->absFilePath()) : - strcasecmp(f1->name(),f2->name()); + stricmp(f1->absFilePath(),f2->absFilePath()) : + stricmp(f1->name(),f2->name()); } /*! Create a file list iterator. */ diff --git a/src/formula.cpp b/src/formula.cpp index fcc1a74..4715f19 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -62,11 +62,13 @@ void FormulaList::generateBitmaps(const char *path) FormulaListIterator fli(*this); Formula *formula; QFile f(texName); + bool formulaError=FALSE; if (f.open(IO_WriteOnly)) { QTextStream t(&f); + if (Config::latexBatchModeFlag) t << "\\batchmode" << endl; t << "\\documentclass{article}" << endl; - t << "\\usepackage{epsf}" << endl; // for those who want to include images + t << "\\usepackage{epsfig}" << endl; // for those who want to include images const char *s=Config::extraPackageList.first(); while (s) { @@ -99,8 +101,9 @@ void FormulaList::generateBitmaps(const char *path) //system("latex _formulas.tex /dev/null"); if (system("latex _formulas.tex")!=0) { - err("Problems running latex. Check your installation or look at _formulas.tex!\n"); - return; + err("Problems running latex. Check your installation or look for typos in _formulas.tex!\n"); + formulaError=TRUE; + //return; } //printf("Running dvips...\n"); QListIterator pli(pagesToGenerate); @@ -281,7 +284,7 @@ void FormulaList::generateBitmaps(const char *path) thisDir.remove("_formulas.aux"); } // remove the latex file itself - thisDir.remove("_formulas.tex"); + if (!formulaError) thisDir.remove("_formulas.tex"); // write/update the formula repository so we know what text the // generated gifs represent (we use this next time to avoid regeneration // of the gifs, and to avoid forcing the user to delete all gifs in order diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 2205300..a4d7924 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -25,13 +25,18 @@ #include "namespacedef.h" #include "language.h" #include "util.h" +#include "memberlist.h" +#include "message.h" -GroupDef::GroupDef(const char *na,const char *t) : Definition(na) +GroupDef::GroupDef(const char *na,const char *t) : + Definition(na) { fileList = new FileList; classList = new ClassList; // groupList = new GroupList; -// name = n; + + allMemberList = new MemberList; + allMemberDict = new QDict; if (t) title = t; else @@ -64,6 +69,28 @@ void GroupDef::addNamespace(const NamespaceDef *def) namespaceList->append(def); } +void GroupDef::addMember(const MemberDef *md) +{ + QCString funcDecl=md->name()+md->argsString(); + if (allMemberDict->find(funcDecl)==0) + { + allMemberList->append(md); + allMemberDict->insert(funcDecl,md); + switch(md->memberType()) + { + case MemberDef::Variable: varMembers.inSort(md); break; + case MemberDef::Function: funcMembers.inSort(md); break; + case MemberDef::Typedef: typedefMembers.inSort(md); break; + case MemberDef::Enumeration: enumMembers.inSort(md); break; + case MemberDef::EnumValue: enumValMembers.inSort(md); break; + case MemberDef::Prototype: protoMembers.inSort(md); break; + case MemberDef::Define: defineMembers.inSort(md); break; + default: + err("FileDef::insertMembers(): unexpected member insert in file!\n"); + } + } +} + //void GroupDef::addGroup(const GroupDef *def) //{ // groupList->append(def); @@ -71,7 +98,13 @@ void GroupDef::addNamespace(const NamespaceDef *def) int GroupDef::countMembers() const { - return fileList->count()+classList->count(); + return fileList->count()+classList->count()+allMemberList->count(); +} + +/*! Compute the HTML anchor names for all members in the class */ +void GroupDef::computeAnchors() +{ + setAnchors('a',allMemberList); } void GroupDef::writeDocumentation(OutputList &ol) @@ -100,20 +133,29 @@ void GroupDef::writeDocumentation(OutputList &ol) //ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); } + ol.startMemberSections(); if (fileList->count()>0) { - ol.startGroupHeader(); + ol.startMemberHeader(); parseText(ol,theTranslator->trFiles()); - ol.endGroupHeader(); - ol.startIndexList(); + ol.endMemberHeader(); FileDef *fd=fileList->first(); while (fd) { - ol.writeStartAnnoItem("file ",fd->getOutputFileBase(),0,fd->name()); - ol.writeEndAnnoItem(fd->name()); + ol.startMemberItem(FALSE,0); + ol.docify("file"); + ol.insertMemberAlign(); + ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); + ol.endMemberItem(FALSE,0,0,FALSE); + if (!fd->briefDescription().isEmpty() && Config::briefMemDescFlag) + { + ol.startMemberDescription(); + parseDoc(ol,0,0,fd->briefDescription()); + ol.endMemberDescription(); + ol.newParagraph(); + } fd=fileList->next(); } - ol.endIndexList(); } if (classList->count()>0) { @@ -123,10 +165,9 @@ void GroupDef::writeDocumentation(OutputList &ol) { if (!found) { - ol.startGroupHeader(); + ol.startMemberHeader(); parseText(ol,theTranslator->trCompounds()); - ol.endGroupHeader(); - ol.startIndexList(); + ol.endMemberHeader(); found=TRUE; } QCString type; @@ -138,24 +179,35 @@ void GroupDef::writeDocumentation(OutputList &ol) case ClassDef::Interface: type="interface"; break; case ClassDef::Exception: type="exception"; break; } - ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->name()); - ol.writeEndAnnoItem(cd->name()); + ol.startMemberItem(FALSE,0); + ol.docify(type); + ol.insertMemberAlign(); + ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()); + ol.endMemberItem(FALSE,0,0,FALSE); + if (!cd->briefDescription().isEmpty() && Config::briefMemDescFlag) + { + ol.startMemberDescription(); + parseDoc(ol,0,0,cd->briefDescription()); + ol.endMemberDescription(); + ol.newParagraph(); + } cd=classList->next(); } - ol.endIndexList(); } + if (allMemberList->count()>0) + { + allMemberList->writeDeclarations(ol,0,0,0,this,0,0); + } + ol.endMemberSections(); //int dl=doc.length(); //doc=doc.stripWhiteSpace(); if (!briefDescription().isEmpty() || !documentation().isEmpty()) { ol.writeRuler(); ol.pushGeneratorState(); - //bool latexOn = ol.isEnabled(OutputGenerator::Latex); - //if (latexOn) ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::RTF); ol.writeAnchor("_details"); - //if (latexOn) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); ol.startGroupHeader(); parseText(ol,theTranslator->trDetailedDescription()); @@ -173,7 +225,76 @@ void GroupDef::writeDocumentation(OutputList &ol) } } + defineMembers.countDocMembers(); + if (defineMembers.totalCount()>0 ) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trDefineDocumentation()); + ol.endGroupHeader(); + defineMembers.writeDocumentation(ol,name()); + } + + protoMembers.countDocMembers(); + if (protoMembers.totalCount()>0 ) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trFunctionPrototypeDocumentation()); + ol.endGroupHeader(); + protoMembers.writeDocumentation(ol,name()); + } + + typedefMembers.countDocMembers(); + if (typedefMembers.totalCount()>0 ) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trTypedefDocumentation()); + ol.endGroupHeader(); + typedefMembers.writeDocumentation(ol,name()); + } + + enumMembers.countDocMembers(); + if (enumMembers.totalCount()>0 ) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trEnumerationTypeDocumentation()); + ol.endGroupHeader(); + enumMembers.writeDocumentation(ol,name()); + } + + enumValMembers.countDocMembers(); + if (enumValMembers.totalCount()>0 ) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trEnumerationValueDocumentation()); + ol.endGroupHeader(); + enumValMembers.writeDocumentation(ol,name()); + } + + funcMembers.countDocMembers(); + if (funcMembers.totalCount()>0 ) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trFunctionDocumentation()); + ol.endGroupHeader(); + funcMembers.writeDocumentation(ol,name()); + } + + varMembers.countDocMembers(); + if (varMembers.totalCount()>0 ) + { + ol.writeRuler(); + ol.startGroupHeader(); + parseText(ol,theTranslator->trVariableDocumentation()); + ol.endGroupHeader(); + varMembers.writeDocumentation(ol,name()); + } + endFile(ol); - //ol.enable(OutputGenerator::Man); ol.popGeneratorState(); } diff --git a/src/groupdef.h b/src/groupdef.h index c3cf675..1032c28 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -19,7 +19,10 @@ #include "qtbc.h" #include +#include #include "definition.h" +#include "memberlist.h" +#include "memberdef.h" class FileList; class ClassList; @@ -41,6 +44,7 @@ class GroupDef : public Definition void addFile(const FileDef *def); void addClass(const ClassDef *def); void addNamespace(const NamespaceDef *def); + void addMember(const MemberDef *def); void writeDocumentation(OutputList &ol); int countMembers() const; bool isLinkableInProject() @@ -51,13 +55,25 @@ class GroupDef : public Definition { return isLinkableInProject() || isReference(); } + void computeAnchors(); private: - QCString title; // title of the group - QCString fileName; // base name of the generated file + QCString title; // title of the group + QCString fileName; // base name of the generated file FileList *fileList; // list of all files in the group ClassList *classList; // list of all classes in the group NamespaceList *namespaceList; // list of all namespace in the group + + MemberList *allMemberList; // list of all members in the group + QDict *allMemberDict; + // members sorted to type + MemberList defineMembers; + MemberList protoMembers; + MemberList typedefMembers; + MemberList enumMembers; + MemberList enumValMembers; + MemberList funcMembers; + MemberList varMembers; }; class GroupList : public QList diff --git a/src/index.cpp b/src/index.cpp index 2b0a163..3207d50 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -300,9 +300,10 @@ void writeGraphicalClassHierarchy(OutputList &ol) //---------------------------------------------------------------------------- -int countFiles() +void countFiles(int &htmlFiles,int &files) { - int count=0; + htmlFiles=0; + files=0; FileNameListIterator fnli(inputNameList); FileName *fn; for (;(fn=fnli.current());++fnli) @@ -311,22 +312,28 @@ int countFiles() FileDef *fd; for (;(fd=fni.current());++fni) { - if (fd->isLinkableInProject() || - fd->generateSource() || - (!fd->isReference() && Config::sourceBrowseFlag) - ) count++; + bool doc = fd->isLinkableInProject(); + bool src = fd->generateSource() || Config::sourceBrowseFlag; + if (doc || src) + { + htmlFiles++; + } + if (doc) + { + files++; + } } } - return count; } //---------------------------------------------------------------------------- void writeFileIndex(OutputList &ol) { - if (documentedFiles==0) return; + if (documentedHtmlFiles==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); + if (documentedFiles==0) ol.disableAllBut(OutputGenerator::Html); startFile(ol,"files","File Index"); startTitle(ol,0); QCString title = theTranslator->trFileList(); @@ -366,32 +373,28 @@ void writeFileIndex(OutputList &ol) path=stripFromPath(fd->getPath().copy()); } - // --------------- LaTeX only ----------------------------- - ol.pushGeneratorState(); - ol.disable(OutputGenerator::Html); - ol.writeStartAnnoItem("file", - fd->getOutputFileBase(), - path, - fd->name() - ); - if (!fd->briefDescription().isEmpty()) + // --------------- LaTeX/RTF only ------------------------- + if (doc) { - ol.docify(" ("); - OutputList briefOutput(&ol); - parseDoc(briefOutput,0,0, - abbreviate(fd->briefDescription(),fd->name())); - ol+=briefOutput; - ol.docify(")"); + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Html); + ol.writeStartAnnoItem("file", + fd->getOutputFileBase(), + path, + fd->name() + ); + if (!fd->briefDescription().isEmpty()) + { + ol.docify(" ("); + OutputList briefOutput(&ol); + parseDoc(briefOutput,0,0, + abbreviate(fd->briefDescription(),fd->name())); + ol+=briefOutput; + ol.docify(")"); + } + ol.writeEndAnnoItem(fd->getOutputFileBase()); + ol.popGeneratorState(); } - //else - //{ - // ol.startEmphasis(); - // parseText(ol,theTranslator->trNoDescriptionAvailable()); - // ol.endEmphasis(); - //} - ol.writeEndAnnoItem(fd->getOutputFileBase()); - //ol.enable(OutputGenerator::Html); - ol.popGeneratorState(); // -------------------------------------------------------- // ----------------- HTML only ---------------------------- diff --git a/src/index.h b/src/index.h index e945e94..4c8be7e 100644 --- a/src/index.h +++ b/src/index.h @@ -65,7 +65,7 @@ void writeGraphicalClassHierarchy(OutputList &ol); int countClassHierarchy(); int countClassMembers(); int countFileMembers(); -int countFiles(); +void countFiles(int &htmlFiles,int &files); int countGroups(); int countNamespaces(); int countAnnotatedClasses(); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 860e53c..491530a 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -168,6 +168,7 @@ void LatexGenerator::startIndexSection(IndexSections is) { if (Config::latexHeaderFile.isEmpty()) { + if (Config::latexBatchModeFlag) t << "\\batchmode" << endl; if (Config::paperType=="a4wide") paperName="a4"; else paperName=Config::paperType; t << "\\documentclass[" << paperName << "paper"; if (Config::pdfHyperFlag) t << ",ps2pdf"; @@ -207,13 +208,6 @@ void LatexGenerator::startIndexSection(IndexSections is) "\\vspace*{7cm}\n" "\\begin{center}\n" "{\\Large "; - //docify(projectName); - //t << " Reference Manual"; - //if (!projectNumber.isEmpty()) - //{ - // t << "\\\\[1ex]\\large "; - // docify(projectNumber); - //} } else { diff --git a/src/memberdef.cpp b/src/memberdef.cpp index ef2e877..67a3dd3 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -27,6 +27,7 @@ #include "example.h" #include "membergroup.h" #include "scanner.h" +#include "groupdef.h" //----------------------------------------------------------------------------- @@ -219,6 +220,7 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e, nspace=0; memDef=0; memDec=0; + group=0; exampleList=0; exampleDict=0; enumFields=0; @@ -426,24 +428,29 @@ void MemberDef::setGroupId(int groupId) } void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd, - FileDef *fd,MemberGroup *mg) + FileDef *fd,GroupDef *gd,MemberGroup *mg) { - if (mg) - ol.writeObjectLink(0,mg->getOutputFileBase(), - anchor(),name()); - else if (nd) - ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(), - anchor(),name()); - else if (fd) - ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(), - anchor(),name()); - else - ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(), - anchor(),name()); + Definition *d; + if (mg) d=mg; else if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd; + //if (mg) + // ol.writeObjectLink(0,mg->getOutputFileBase(), + // anchor(),name()); + //else if (cd) + // ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(), + // anchor(),name()); + //else if (nd) + // ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(), + // anchor(),name()); + //else if (fd) + // ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(), + // anchor(),name()); + //else + ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),anchor(),name()); } -void MemberDef::writeDeclaration(OutputList &ol,ClassDef *cd,NamespaceDef *nd,FileDef *fd, +void MemberDef::writeDeclaration(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, int prevGroupId,bool inGroup) { int i,l; @@ -481,7 +488,8 @@ void MemberDef::writeDeclaration(OutputList &ol,ClassDef *cd,NamespaceDef *nd,Fi } Definition *d=0; - if (cd) d=cd; else if (nd) d=nd; else d=fd; + ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something + if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; QCString cname = d->name(); QCString cfname = d->getOutputFileBase(); @@ -664,11 +672,11 @@ void MemberDef::writeDeclaration(OutputList &ol,ClassDef *cd,NamespaceDef *nd,Fi if (annMemb) { //printf("anchor=%s ann_anchor=%s\n",anchor(),annMemb->anchor()); - annMemb->writeLink(ol,cd,nd,fd,inGroup ? memberGroup : 0); + annMemb->writeLink(ol,cd,nd,fd,gd,inGroup ? memberGroup : 0); annMemb->annUsed=annUsed=TRUE; } else - writeLink(ol,0,0,0,memberGroup); + writeLink(ol,0,0,0,0,memberGroup); //ol.writeBoldString(name()); } else if (isLinkable()) @@ -680,13 +688,14 @@ void MemberDef::writeDeclaration(OutputList &ol,ClassDef *cd,NamespaceDef *nd,Fi annMemb->memberClass(), annMemb->getNamespace(), annMemb->getFileDef(), + annMemb->groupDef(), inGroup ? memberGroup : 0 ); annMemb->annUsed=annUsed=TRUE; } else //printf("writeLink %s->%d\n",name.data(),hasDocumentation()); - writeLink(ol,cd,nd,fd,inGroup ? memberGroup : 0); + writeLink(ol,cd,nd,fd,gd,inGroup ? memberGroup : 0); } else // there is a brief member description and brief member // descriptions are enabled or there is no detailed description. @@ -795,6 +804,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (isEnumValue() && (smd = getEnumScope()) && r.match(smd->name(),0,&dummy)==-1) return; + ol.pushGeneratorState(); + bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag; HtmlHelp *htmlHelp = 0; if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); @@ -1236,6 +1247,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.endIndent(); // enable LaTeX again //if (Config::extractAllFlag && !hasDocs) ol.enable(OutputGenerator::Latex); + ol.popGeneratorState(); } } diff --git a/src/memberdef.h b/src/memberdef.h index d5f98d0..2cce60d 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -24,14 +24,16 @@ #include "entry.h" #include "definition.h" -class FileDef; class ClassDef; class NamespaceDef; +class GroupDef; +class FileDef; class MemberList; class MemberGroup; class ExampleList; class ExampleDict; class OutputList; +class GroupDef; class MemberDef : public Definition { @@ -62,10 +64,12 @@ class MemberDef : public Definition const ArgumentList *al); ~MemberDef(); - void writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd, - FileDef *fd,MemberGroup *mg); - void writeDeclaration(OutputList &ol,ClassDef *cd,NamespaceDef *nd,FileDef *fd, - int prevGroupId,bool inGroup); + void writeLink(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + MemberGroup *mg); + void writeDeclaration(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + int prevGroupId,bool inGroup); void writeDocumentation(MemberList *ml,OutputList &ol, const char *scopeName/*,MemberType m*/); void warnIfUndocumented(); @@ -83,6 +87,12 @@ class MemberDef : public Definition Protection protection() const { return prot; } Specifier virtualness() const { return virt; } MemberType memberType() const { return mtype; } + GroupDef *groupDef() const { return group; } + FileDef *getFileDef() { return fileDef; } + FileDef *getFileDec() { return fileDec; } + bool isRelated() const { return related; } + bool isStatic() const { return stat; } + bool isInline() const { return inLine; } void setMemberType(MemberType t) { mtype=t; } void setDefinition(const char *d) { def=d; } void setDefFile(const char *f) { defFile=f; } @@ -96,13 +106,9 @@ class MemberDef : public Definition init=init.stripWhiteSpace(); initLines=init.contains('\n'); } - FileDef *getFileDef() { return fileDef; } - FileDef *getFileDec() { return fileDec; } void setMemberClass(ClassDef *cd) { classDef=cd; } void makeRelated() { related=TRUE; } - bool isRelated() const { return related; } - bool isStatic() const { return stat; } - bool isInline() const { return inLine; } + void setGroupDef(GroupDef *gd) { group=gd; } bool hasDocumentation() // overrides hasDocumentation in definition.h { return Definition::hasDocumentation(); } @@ -236,6 +242,7 @@ class MemberDef : public Definition int grpId; // group id QCString grpHeader; // group header MemberGroup *memberGroup; // group's member definition + GroupDef *group; // group in which this member is in // disable copying of member defs MemberDef(const MemberDef &); diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 8f0bb91..0aa678d 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -134,7 +134,7 @@ void MemberGroup::writeDocumentation(OutputList &ol) ol.docify(">"); } ol.startMemberSections(); - memberList->writeDeclarations(ol,cd,nd,fd,"Synopsis",0,TRUE); + memberList->writeDeclarations(ol,cd,nd,fd,0,"Synopsis",0,TRUE); ol.endMemberSections(); if ((!briefDescription().isEmpty() && Config::repeatBriefFlag) || diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 60c08aa..03c1d14 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -14,15 +14,17 @@ * */ +#include + #include "memberlist.h" #include "classdef.h" #include "message.h" -#include #include "util.h" #include "language.h" #include "doxygen.h" #include "outputlist.h" #include "scanner.h" +#include "groupdef.h" MemberList::MemberList() : QList() { @@ -36,7 +38,7 @@ int MemberList::compareItems(GCI item1, GCI item2) { MemberDef *c1=(MemberDef *)item1; MemberDef *c2=(MemberDef *)item2; - return strcasecmp(c1->name(),c2->name()); + return stricmp(c1->name(),c2->name()); } void MemberList::countDecMembers() @@ -187,17 +189,21 @@ MemberListIterator::MemberListIterator(const QList &l) : { } -void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, - NamespaceDef *nd,FileDef *fd,bool inGroup) +void MemberList::writePlainDeclarations(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + bool inGroup) { countDecMembers(); if (totalCount()==0) return; // no members in this list + ol.pushGeneratorState(); + int prevGroupId = -1; - if (!fd && !nd) ol.startMemberList(); + bool sectionPerType = fd || nd || gd; + if (!sectionPerType) ol.startMemberList(); MemberDef *md; - if (fd && defineCount()>0) + if (sectionPerType && defineCount()>0) { ol.startMemberHeader(); parseText(ol,theTranslator->trDefines()); @@ -210,14 +216,14 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, (md->argsString() || md->hasDocumentation() || Config::extractAllFlag) ) { - md->writeDeclaration(ol,cd,nd,fd,prevGroupId,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,prevGroupId,inGroup); prevGroupId = md->groupId(); } } ol.endMemberList(); } - if ((fd || nd) && protoCount()>0) + if (sectionPerType && protoCount()>0) { ol.startMemberHeader(); parseText(ol,theTranslator->trFuncProtos()); @@ -228,7 +234,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, { if (md->isPrototype()) { - md->writeDeclaration(ol,cd,nd,fd,prevGroupId,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,prevGroupId,inGroup); prevGroupId = md->groupId(); } } @@ -237,7 +243,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, if (typedefCount()>0) { - if (fd || nd) + if (sectionPerType) { ol.startMemberHeader(); parseText(ol,theTranslator->trTypedefs()); @@ -250,17 +256,17 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, { if (md->isTypedef()) { - md->writeDeclaration(ol,cd,nd,fd,prevGroupId,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,prevGroupId,inGroup); prevGroupId = md->groupId(); } } - if (fd || nd) ol.endMemberList(); + if (sectionPerType) ol.endMemberList(); } // write enums if (enumCount()>0) { - if (fd || nd) + if (sectionPerType) { ol.startMemberHeader(); parseText(ol,theTranslator->trEnumerations()); @@ -302,7 +308,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, if (!Config::genTagFile.isEmpty()) tagFile << md->name() << " " << md->anchor() << " \"\"" << endl; - md->writeLink(typeDecl,cd,nd,fd,0); + md->writeLink(typeDecl,cd,nd,fd,gd,0); } else { @@ -323,7 +329,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, if (!Config::genTagFile.isEmpty()) tagFile << fmd->name() << " " << fmd->anchor() << " \"" << fmd->argsString() << "\""; - fmd->writeLink(typeDecl,cd,nd,fd,0); + fmd->writeLink(typeDecl,cd,nd,fd,gd,0); } else // no docs for this enum value { @@ -395,13 +401,13 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, } } // md->isEnumerate() } // enum loop - if (fd || nd) ol.endMemberList(); + if (sectionPerType) ol.endMemberList(); } // write enums // write functions if (funcCount()>0) { - if (fd || nd) + if (sectionPerType) { ol.startMemberHeader(); parseText(ol,theTranslator->trFunctions()); @@ -416,11 +422,11 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, ( !md->isRelated() || md->memberClass() ) ) { - md->writeDeclaration(ol,cd,nd,fd,prevGroupId,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,prevGroupId,inGroup); prevGroupId = md->groupId(); } } - if (fd || nd) ol.endMemberList(); + if (sectionPerType) ol.endMemberList(); } if (friendCount()>0) @@ -434,7 +440,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, //printf("Friend: type=%s name=%s\n",type.data(),md->name().data()); if (md->hasDocumentation() && type!="friend class") { - md->writeDeclaration(ol,cd,nd,fd,prevGroupId,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,prevGroupId,inGroup); prevGroupId = md->groupId(); } else // friend is undocumented as a member but it is a class, @@ -479,7 +485,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, // write variables if (varCount()>0) { - if (fd || nd) + if (sectionPerType) { ol.startMemberHeader(); parseText(ol,theTranslator->trVariables()); @@ -491,11 +497,11 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, { if (md->isVariable()) { - md->writeDeclaration(ol,cd,nd,fd,prevGroupId,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,prevGroupId,inGroup); prevGroupId = md->groupId(); } } - if (fd || nd) ol.endMemberList(); + if (sectionPerType) ol.endMemberList(); } // handle members that are inside annonymous compounds and for which @@ -508,24 +514,26 @@ void MemberList::writePlainDeclarations(OutputList &ol,ClassDef *cd, if (md->fromAnnonymousScope() && !md->annonymousDeclShown()) { md->setFromAnnonymousScope(FALSE); - md->writeDeclaration(ol,cd,nd,fd,prevGroupId,inGroup); + md->writeDeclaration(ol,cd,nd,fd,gd,prevGroupId,inGroup); md->setFromAnnonymousScope(TRUE); prevGroupId = md->groupId(); } } } - if (!fd && !nd) { ol.endMemberList(); /*ol.writeChar('\n');*/ } + if (!sectionPerType) { ol.endMemberList(); /*ol.writeChar('\n');*/ } if (prevGroupId!=-1 && !inGroup) { ol.memberGroupSpacing(TRUE); ol.memberGroupSeparator(); } + ol.popGeneratorState(); } -void MemberList::writeDeclarations(OutputList &ol,ClassDef *cd,NamespaceDef *nd, - FileDef *fd,const char *title,const char *subtitle,bool inGroup) +void MemberList::writeDeclarations(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + const char *title,const char *subtitle,bool inGroup) { countDecMembers(); if (totalCount()==0) return; @@ -542,7 +550,7 @@ void MemberList::writeDeclarations(OutputList &ol,ClassDef *cd,NamespaceDef *nd, ol.endMemberSubtitle(); } - writePlainDeclarations(ol,cd,nd,fd,inGroup); + writePlainDeclarations(ol,cd,nd,fd,gd,inGroup); } void MemberList::writeDocumentation(OutputList &ol, diff --git a/src/memberlist.h b/src/memberlist.h index 37ea894..049c2d4 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -19,6 +19,7 @@ #include #include "memberdef.h" +class GroupDef; class MemberList : public QList { @@ -44,9 +45,11 @@ class MemberList : public QList //protoCnt+defCnt+friendCnt; m_count; } - void writePlainDeclarations(OutputList &ol,ClassDef *cd, - NamespaceDef *nd,FileDef *fd,bool inGroup=FALSE); - void writeDeclarations(OutputList &ol,ClassDef *cd,NamespaceDef *nd,FileDef *fd, + void writePlainDeclarations(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + bool inGroup=FALSE); + void writeDeclarations(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, const char *title,const char *subtitle,bool inGroup=FALSE); void writeDocumentation(OutputList &ol,const char *scopeName /*,MemberDef::MemberType m*/); diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index d0b8e1f..3360eee 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -163,7 +163,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) if (found) ol.endMemberList(); } - /*memList->*/allMemberList.writeDeclarations(ol,0,this,0,0,0); + allMemberList.writeDeclarations(ol,0,this,0,0,0,0); ol.endMemberSections(); if (!briefDescription().isEmpty() || !documentation().isEmpty()) diff --git a/src/namespacedef.h b/src/namespacedef.h index f81542c..f3df7d5 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -91,7 +91,7 @@ class NamespaceList : public QList ~NamespaceList() {} int compareItems(GCI item1,GCI item2) { - return strcasecmp(((NamespaceDef *)item1)->name(), + return stricmp(((NamespaceDef *)item1)->name(), ((NamespaceDef *)item2)->name() ); } diff --git a/src/scanner.l b/src/scanner.l index 55d2fcd..6868c56 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -130,6 +130,7 @@ static bool inDeprecatedBlock; static bool inVersionBlock; static bool inDateBlock; static bool inBugBlock; +static bool inNoteBlock; static bool inPreBlock; static bool inPostBlock; static bool inInvarBlock; @@ -214,6 +215,7 @@ static void initParser() inVersionBlock = FALSE; inDateBlock = FALSE; inBugBlock = FALSE; + inNoteBlock = FALSE; inPreBlock = FALSE; inPostBlock = FALSE; inInvarBlock = FALSE; @@ -643,7 +645,7 @@ static void tryEndItemList() static bool inBlock() { return inParamBlock || inRetValBlock || inSeeBlock || inReturnBlock || inAuthorBlock || - inVersionBlock || inDateBlock || inWarningBlock || inBugBlock || + inVersionBlock || inDateBlock || inWarningBlock || inBugBlock || inNoteBlock || inParBlock || inExceptionBlock || inDeprecatedBlock || inPreBlock || inPostBlock || inInvarBlock; } @@ -657,7 +659,7 @@ static void endBlock() } outDoc->endDescList(); inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock= - inVersionBlock=inDateBlock=inBugBlock=inWarningBlock= + inVersionBlock=inDateBlock=inBugBlock=inNoteBlock=inWarningBlock= inParBlock=inExceptionBlock=inDeprecatedBlock=inPreBlock=inPostBlock= inInvarBlock=FALSE; } @@ -899,6 +901,7 @@ TR [tT][rR] TT [tT][tT] UL [uU][lL] VAR [vV][aA][rR] +DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") %option noyywrap @@ -1039,6 +1042,7 @@ VAR [vV][aA][rR] %x CopyArgSharp %x CopyArgComment %x CopyArgCommentLine +%x SkipUnionSwitch %x ReadFuncArgType %x ReadTempArgs %x Specialization @@ -1050,6 +1054,7 @@ VAR [vV][aA][rR] %x CopyString %x CopyRound %x CopyCurly +%x IDLUnionCase %% @@ -1297,7 +1302,25 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -{CMD}"pre"[s]?/{BN} { +{CMD}"note"[s]?/{BN} { + endArgumentList(); + if (!inNoteBlock) + { + if (inBlock()) endBlock(); + inNoteBlock=TRUE; + outDoc->startDescList(); + outDoc->startBold(); + scanString(theTranslator->trNote()+": "); + outDoc->endBold(); + outDoc->endDescTitle(); + outDoc->writeDescItem(); + } + else + { + outDoc->writeDescItem(); + } + } +{CMD}"pre"/{BN} { endArgumentList(); if (!inPreBlock) { @@ -1315,7 +1338,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -{CMD}"post"[s]?/{BN} { +{CMD}"post"/{BN} { endArgumentList(); if (!inPostBlock) { @@ -1333,7 +1356,7 @@ VAR [vV][aA][rR] outDoc->writeDescItem(); } } -{CMD}"invariant"[s]?/{BN} { +{CMD}"invariant"/{BN} { endArgumentList(); if (!inInvarBlock) { @@ -1516,7 +1539,7 @@ VAR [vV][aA][rR] BEGIN(DocException); } "\\capt".* -([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") { +({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM} { outDoc->startDescTableTitle(); outDoc->startEmphasis(); outDoc->docify(yytext); @@ -1746,7 +1769,7 @@ VAR [vV][aA][rR] {CMD}"b"{BN}+ { BEGIN( DocBold ); } {CMD}"c"{BN}+ { BEGIN( DocCode ); } {CMD}"l"{BN}+ -{CMD}"n" { outDoc->lineBreak(); } +"\\n"/[^a-z_A-Z0-9] { outDoc->lineBreak(); } {CMD}"include"{BN}+ { BEGIN( DocInclude ); } {CMD}"dontinclude"{BN}+ { BEGIN( DocDontInclude ); } {CMD}"skip"{BN}+ { BEGIN( DocSkipKey ); } @@ -2422,6 +2445,10 @@ VAR [vV][aA][rR] { BEGIN(CppQuote); } + else if (insideIDL && strcmp(yytext,"case")==0) + { + BEGIN(IDLUnionCase); + } else { lineCount(); @@ -2445,6 +2472,10 @@ VAR [vV][aA][rR] insideCppQuote=TRUE; BEGIN(FindMembers); } +"::" +":" { BEGIN(FindMembers); } +\n { yyLineNr++; } +. ")" { insideCppQuote=FALSE; BEGIN(FindMembers); @@ -3581,19 +3612,28 @@ VAR [vV][aA][rR] BEGIN( ClassVar ); } {ID} { - if (isTypedef) + if (insideIDL && strcmp(yytext,"switch")==0) { - // typedefDict.insert(yytext,new QCString(current->name)); - // current->type.prepend("typedef "); - // current->extends - current->extends->append( - new BaseInfo(yytext,Public,Normal) - ); + // Corba IDL style union + roundCount=0; + BEGIN(SkipUnionSwitch); + } + else + { + if (isTypedef) + { + // typedefDict.insert(yytext,new QCString(current->name)); + // current->type.prepend("typedef "); + // current->extends + current->extends->append( + new BaseInfo(yytext,Public,Normal) + ); + } + current->type += ' ' ; + current->type += current->name ; + current->name = yytext ; + //BEGIN( FindMembers ); } - current->type += ' ' ; - current->type += current->name ; - current->name = yytext ; - //BEGIN( FindMembers ); } [(\[] { // probably a function anyway @@ -3702,6 +3742,17 @@ VAR [vV][aA][rR] curlyCount=0; BEGIN( Curly ) ; } +"(" { + roundCount++; + } +")" { + if (--roundCount==0) + { + BEGIN(ClassVar); + } + } +\n { yyLineNr++; } +. {BN}+ { current->program += yytext ; lineCount() ; } @@ -3797,7 +3848,7 @@ VAR [vV][aA][rR] } "@" { unput(*yytext); - BEGIN(Doc); + BEGIN(ClassDoc); } ^{B}*"*"+/[^/] { //printf("---> removing %s\n",yytext); @@ -3820,7 +3871,7 @@ VAR [vV][aA][rR] current->brief+="."; BEGIN( tmpDocType ); } -{CMD}("image"|"author"|"internal"|"version"|"date"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see") { +{CMD}("image"|"author"|"internal"|"version"|"date"|"param"|"exception"|"return"[s]?|"retval"|"bug"|"warning"|"par"|"sa"|"see"|"pre"|"post"|"invariant"|"note") { current->doc+=yytext; BEGIN( tmpDocType ); } diff --git a/src/translator.h b/src/translator.h index 1a8842e..ce81a7b 100644 --- a/src/translator.h +++ b/src/translator.h @@ -553,25 +553,25 @@ class Translator * these are for the member sections of a class, struct or union */ virtual QCString trPublicMembers() - { return "Public Members"; } + { return "Public Methods"; } virtual QCString trPublicSlots() { return "Public Slots"; } virtual QCString trSignals() { return "Signals"; } virtual QCString trStaticPublicMembers() - { return "Static Public Members"; } + { return "Static Public Methods"; } virtual QCString trProtectedMembers() - { return "Protected Members"; } + { return "Protected Methods"; } virtual QCString trProtectedSlots() { return "Protected Slots"; } virtual QCString trStaticProtectedMembers() - { return "Static Protected Members"; } + { return "Static Protected Methods"; } virtual QCString trPrivateMembers() - { return "Private Members"; } + { return "Private Methods"; } virtual QCString trPrivateSlots() { return "Private Slots"; } virtual QCString trStaticPrivateMembers() - { return "Static Private Members"; } + { return "Static Private Methods"; } /*! \endmgroup */ /*! this function is used to produce a comma-separated list of items. @@ -815,6 +815,47 @@ class Translator { return "Page Index"; } + virtual QCString trNote() + { + return "Note"; + } + + virtual QCString trPublicTypes() + { + return "Public Types"; + } + virtual QCString trPublicAttribs() + { + return "Public Attributes"; + } + virtual QCString trStaticPublicAttribs() + { + return "Static Public Attributes"; + } + virtual QCString trProtectedTypes() + { + return "Protected Types"; + } + virtual QCString trProtectedAttribs() + { + return "Protected Attributes"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Static Protected Attributes"; + } + virtual QCString trPrivateTypes() + { + return "Private Types"; + } + virtual QCString trPrivateAttribs() + { + return "Private Attributes"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Static Private Attributes"; + } }; #endif diff --git a/src/translator_jp.h b/src/translator_jp.h index e014ab8..c3d8f9a 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -22,89 +22,164 @@ class TranslatorJapanese : public Translator { public: - QCString latexBabelPackage() - { return "a4j"; } + //-------------------------------------------------------------------- + // NOTICE: + // the following functions are now obsolete: these are no longer used and + // will disappear in future versions. You do not have to translate them! QCString trInherits() { return "継承"; } QCString trAnd() { return "と"; } QCString trInheritedBy() { return "次に継承されています。"; } + QCString trReference() + { return "リファレンス"; } + QCString trReimplementedFrom() + { return "次を再定義"; } + QCString trReimplementedIn() + { return "次で再定義"; } + QCString trIncludeFile() + { return "インクルードファイル"; } + QCString trGeneratedFrom(const char *s,bool) + { + QCString result=(QCString)"この"+s+ + "に対するドキュメントは以下のファイルから生成されました。"; + return result; + } + // end of obsolete functions + //-------------------------------------------------------------------- + + /*! returns the name of the package that is included by LaTeX */ + QCString latexBabelPackage() + { return "a4j"; } + + /*! used in the compound documentation before a list of related functions. */ QCString trRelatedFunctions() { return "関連する関数"; } + + /*! subscript for the related functions. */ QCString trRelatedSubscript() { return "(これらはメンバ関数でないことに注意)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ QCString trDetailedDescription() { return "解説"; } + + /*! header that is put before the list of typedefs. */ QCString trMemberTypedefDocumentation() { return "メンバ型定義の解説"; } + + /*! header that is put before the list of enumerations. */ QCString trMemberEnumerationDocumentation() { return "メンバ列挙型の解説"; } - QCString trEnumerationValueDocumentation() - { return "列挙型値の解説"; } + + /*! header that is put before the list of member functions. */ QCString trMemberFunctionDocumentation() { return "メンバ関数の解説"; } + + /*! header that is put before the list of member attributes. */ QCString trMemberDataDocumentation() { return "メンバデータの解説"; } - QCString trGeneratedFrom(const char *s,bool) - { - QCString result=(QCString)"この"+s+ - "に対するドキュメントは以下のファイルから生成されました。"; - return result; - } + + /*! this is the text of a link put after brief descriptions. */ QCString trMore() { return "より詳しく..."; } - QCString trReference() - { return "リファレンス"; } + + /*! put in the class documentation */ QCString trListOfAllMembers() { return "すべてのメンバリスト"; } + + /*! used as the title of the "list of all members" page of a class */ QCString trMemberList() { return "メンバリスト"; } + + /*! this is the first part of a sentence that is followed by a class name */ QCString trThisIsTheListOfAllMembers() - { return "これは次の全メンバリストです。"; } + { return "これは全メンバリストです。"; } + + /*! this is the remainder of the sentence after the class name */ QCString trIncludingInheritedMembers() - { return "継承メンバすべてを含んで。"; } + { return "継承メンバもすべて含んでいます。"; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ QCString trGeneratedAutomatically(const char *s) { QCString result; - if (s) result=(QCString)s+"に対して"; + if (s) result=(QCString)s+"の"; result+="ソースコードから Doxygen が自動的に生成しました。"; return result; } + + /*! put after an enum name in the list of all members */ QCString trEnumName() { return "enum 型"; } + + /*! put after an enum value in the list of all members */ QCString trEnumValue() { return "enum 値"; } + + /*! put after an undocumented member in the list of all members */ QCString trDefinedIn() { return "次で定義されました。"; } - QCString trIncludeFile() - { return "インクルードファイル"; } + + /*! 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)"これはインクルードファイル"+f+ - "の Verbatim テキストです。"; } + { return (QCString)"これはインクルードファイル"+f+"の内容です。"; } + + // quick reference sections + + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \group command). + */ QCString trModules() { return "モジュール"; } + + /*! This is put above each page as a link to the class hierarchy */ QCString trClassHierarchy() { return "クラス階層"; } + + /*! This is put above each page as a link to the list of annotated classes */ QCString trCompoundList() { return "データ構造リスト"; } + + /*! This is put above each page as a link to the list of documented files */ QCString trFileList() { return "ファイルリスト"; } + + /*! This is put above each page as a link to the list of all verbatim headers */ QCString trHeaderFiles() { return "ヘッダファイル"; } + + /*! This is put above each page as a link to all members of compounds. */ QCString trCompoundMembers() { return "データ構造メンバ"; } + + /*! This is put above each page as a link to all members of files. */ QCString trFileMembers() { return "ファイルメンバ"; } + + /*! This is put above each page as a link to all related pages. */ QCString trRelatedPages() { return "関連ページ"; } + + /*! This is put above each page as a link to all examples. */ QCString trExamples() { return "例"; } + + /*! This is put above each page as a link to the search engine. */ QCString trSearch() { return "検索"; } + + /*! This is an introduction to the class hierarchy. */ QCString trClassHierarchyDescription() { return "この継承リストはおおまかにはソートされていますが、" "アルファベット順で完全にソートされてはいません。"; } + + /*! This is an introduction to the list with all files. */ QCString trFileListDescription(bool extractAll) { QCString result="このリストは、"; @@ -112,8 +187,12 @@ class TranslatorJapanese : public Translator result+="簡易説明を持つファイルすべてのリストです。"; return result; } + + /*! This is an introduction to the annotated compound list. */ QCString trCompoundListDescription() { return "これは簡易説明を持つ、クラス、構造体、共用体のリストです。";} + + /*! This is an introduction to the page with all class members. */ QCString trCompoundMembersDescription(bool extractAll) { QCString result="これは"; @@ -123,6 +202,8 @@ class TranslatorJapanese : public Translator result+="の解説へのリンクが張られています。"; return result; } + + /*! This is an introduction to the page with all file members. */ QCString trFileMembersDescription(bool extractAll) { QCString result="これは"; @@ -132,76 +213,197 @@ class TranslatorJapanese : public Translator result+="の解説へのリンクが張られています。"; return result; } + + /*! This is an introduction to the page with the list of all header files. */ QCString trHeaderFilesDescription() { return "APIを構成するヘッダファイルです。"; } + + /*! This is an introduction to the page with the list of all examples */ QCString trExamplesDescription() { return "すべての例のリストです。"; } + + /*! This is an introduction to the page with the list of related pages */ QCString trRelatedPagesDescription() { return "関連するドキュメントページすべてのリストです。"; } + + /*! This is an introduction to the page with the list of class/file groups */ QCString trModulesDescription() { return "すべてのモジュールのリストです。"; } + + /*! This sentences is used in the annotated class/file lists if no brief + * description is given. + */ QCString trNoDescriptionAvailable() { return "ドキュメントが記述されていません。"; } + + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ QCString trDocumentation() { return "ドキュメント"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ QCString trModuleIndex() { return "モジュール索引"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ QCString trHierarchicalIndex() { return "階層索引"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ QCString trCompoundIndex() { return "データ構造索引"; } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ QCString trFileIndex() { return "ファイル索引"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ QCString trModuleDocumentation() { return "モジュールの解説"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ QCString trClassDocumentation() { return "クラスの解説"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ QCString trFileDocumentation() { return "ファイルの解説"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ QCString trExampleDocumentation() { return "例題の解説"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ QCString trPageDocumentation() { return "ページの解説"; } + + /*! This is used in LaTeX as the title of the document */ QCString trReferenceManual() { return "リファレンスマニュアル"; } - + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ QCString trDefines() { return "マクロ定義"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ QCString trFuncProtos() { return "関数プロトタイプ"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ QCString trTypedefs() { return "型定義"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ QCString trEnumerations() { return "列挙型"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ QCString trFunctions() { return "関数"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ QCString trVariables() { return "変数"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ QCString trEnumerationValues() { return "列挙型値"; } - QCString trReimplementedFrom() - { return "次を再定義"; } - QCString trReimplementedIn() - { return "次で再定義"; } + + /*! This is used in man pages as the author section. */ QCString trAuthor() { return "作者"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ QCString trDefineDocumentation() { return "マクロ定義の解説"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ QCString trFunctionPrototypeDocumentation() { return "関数プロトタイプの解説"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ QCString trTypedefDocumentation() { return "型定義の解説"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ QCString trEnumerationTypeDocumentation() { return "列挙型の解説"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + QCString trEnumerationValueDocumentation() + { return "列挙型値の解説"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ QCString trFunctionDocumentation() { return "関数の解説"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ QCString trVariableDocumentation() { return "変数の解説"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ QCString trCompounds() { return "データ構造"; } + + /*! This is used in the documentation of a group before the list of + * links to documented files + */ QCString trFiles() { return "ファイル"; } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ QCString trGeneratedAt(const char *date,const char *projName) { QCString result; @@ -209,46 +411,75 @@ class TranslatorJapanese : public Translator result+=(QCString)date+"に生成されました。"; return result; } + /*! This is part of the sentence used in the standard footer of each page. + */ QCString trWrittenBy() { - return "を開発したのは"; + return "の開発者:"; } + + /*! this text is put before a class diagram */ QCString trClassDiagram(const char *clName) { return (QCString)clName+"に対するクラス階層図"; } + + /*! this text is generated when the \internal command is used. */ QCString trForInternalUseOnly() { return "内部使用のみ。"; } + + /*! this text is generated when the \reimp command is used. */ QCString trReimplementedForInternalReasons() { return "内部的な理由により再実装されましたが、APIには影響しません。"; } + + /*! this text is generated when the \warning command is used. */ QCString trWarning() { return "注意"; } + + /*! this text is generated when the \bug command is used. */ QCString trBugsAndLimitations() { return "バグと制限"; } + + /*! this text is generated when the \version command is used. */ QCString trVersion() { return "バージョン"; } + + /*! this text is generated when the \date command is used. */ QCString trDate() { return "日付"; } + + /*! this text is generated when the \author command is used. */ QCString trAuthors() { return "作者"; } + + /*! this text is generated when the \return command is used. */ QCString trReturns() { return "戻り値"; } + + /*! this text is generated when the \sa command is used. */ QCString trSeeAlso() { return "参照"; } + + /*! this text is generated when the \param command is used. */ QCString trParameters() { return "引数"; } + + /*! this text is generated when the \exception command is used. */ QCString trExceptions() { return "例外"; } + + /*! this text is used in the title page of a LaTeX document. */ QCString trGeneratedBy() { return ""; } + + // new since 0.49-990307 - // new since 0.49-990307 - - QCString trNamespaces() - { return "名前空間"; } + /*! used as the title of page containing all the index of all namespaces. */ QCString trNamespaceList() { return "名前空間リスト"; } + + /*! used as an introduction to the namespace list */ QCString trNamespaceListDescription(bool extractAll) { QCString result="このリストは、簡易説明を持つすべての"; @@ -256,13 +487,324 @@ class TranslatorJapanese : public Translator result+="名前空間のリストです。"; return result; } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ QCString trFriends() { return "フレンド"; } - // new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + /*! used in the class documentation as a header before the list of all + * related classes + */ virtual QCString trRelatedFunctionDocumentation() { return "フレンドと関連する関数の解説"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType) + { + QCString result=""; + switch(compType) + { + case ClassDef::Class: result+="クラス "; break; + case ClassDef::Struct: result+="構造体 "; break; + case ClassDef::Union: result+="共用体 "; break; + case ClassDef::Interface: result+="インタフェース"; break; + case ClassDef::Exception: result+="Exception "; break; //TODO:fixme + } + result+=(QCString)clName+" の解説"; + return result; + } + + /*! used as the title of the HTML page of a file */ + QCString trFileReference(const char *fileName) + { + QCString result="ファイル "+(QCString)fileName+" の解説"; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + QCString trNamespaceReference(const char *namespaceName) + { + QCString result="名前空間 "+(QCString)namespaceName+" の解説"; + return result; + } + + /*! \mgroup Class sections + * these are for the member sections of a class, struct or union + */ + QCString trPublicMembers() + { return "公開メンバ"; } + QCString trPublicSlots() + { return "公開スロット"; } + QCString trSignals() + { return "シグナル"; } + QCString trStaticPublicMembers() + { return "静的公開メンバ"; } + QCString trProtectedMembers() + { return "保護メンバ"; } + QCString trProtectedSlots() + { return "保護スロット"; } + QCString trStaticProtectedMembers() + { return "静的保護メンバ"; } + QCString trPrivateMembers() + { return "非公開メンバ"; } + QCString trPrivateSlots() + { return "非公開スロット"; } + QCString trStaticPrivateMembers() + { return "静的非公開メンバ"; } + /*! \endmgroup */ + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i