diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/.cvsignore | 5 | ||||
-rw-r--r-- | src/classdef.h | 1 | ||||
-rw-r--r-- | src/code.l | 2 | ||||
-rw-r--r-- | src/config.l | 12 | ||||
-rw-r--r-- | src/definition.cpp | 2 | ||||
-rw-r--r-- | src/docparser.cpp | 19 | ||||
-rw-r--r-- | src/docparser.h | 8 | ||||
-rw-r--r-- | src/dot.cpp | 6 | ||||
-rw-r--r-- | src/dot.h | 3 | ||||
-rw-r--r-- | src/doxygen.cpp | 32 | ||||
-rw-r--r-- | src/doxygen.h | 12 | ||||
-rw-r--r-- | src/htmlattrib.h | 12 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 17 | ||||
-rw-r--r-- | src/htmldocvisitor.h | 2 | ||||
-rw-r--r-- | src/lang_cfg.h | 1 | ||||
-rw-r--r-- | src/language.cpp | 3 | ||||
-rw-r--r-- | src/libdoxygen.pro.in | 1 | ||||
-rw-r--r-- | src/memberdef.cpp | 4 | ||||
-rw-r--r-- | src/memberdef.h | 5 | ||||
-rw-r--r-- | src/pre.l | 13 | ||||
-rw-r--r-- | src/translator_cn.h | 232 | ||||
-rw-r--r-- | src/translator_za.h | 1550 | ||||
-rw-r--r-- | src/util.cpp | 141 | ||||
-rw-r--r-- | src/util.h | 1 | ||||
-rw-r--r-- | src/xmlgen.cpp | 15 |
25 files changed, 2000 insertions, 99 deletions
diff --git a/src/.cvsignore b/src/.cvsignore new file mode 100644 index 0000000..6f899dd --- /dev/null +++ b/src/.cvsignore @@ -0,0 +1,5 @@ +Makefile +doxygen.pro +doxytag.pro +libdoxycfg.pro +libdoxygen.pro diff --git a/src/classdef.h b/src/classdef.h index 418b3b7..3f6bf8e 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -75,6 +75,7 @@ class ClassDef : public Definition QCString getReference() const; bool isReference() const; bool isLocal() const { return m_isLocal; } + bool isArtificial() const { return m_artificial; } bool hasDocumentation() const; @@ -2017,7 +2017,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) g_name+=yytext; BEGIN( FuncCall ); } -<FuncCall,Body,MemberCall,MemberCall2>\" { +<FuncCall,Body,MemberCall,MemberCall2,SkipInits>\" { startFontClass("stringliteral"); g_code->codify(yytext); g_lastStringContext=YY_START; diff --git a/src/config.l b/src/config.l index 5b644a3..0371916 100644 --- a/src/config.l +++ b/src/config.l @@ -1943,7 +1943,17 @@ void Config::create() "by executing (via popen()) the command <filter> <input-file>, where <filter> \n" "is the value of the INPUT_FILTER tag, and <input-file> is the name of an \n" "input file. Doxygen will then use the output that the filter program writes \n" - "to standard output. \n" + "to standard output. If FILTER_PATTERNS is specified, this tag will be \n" + "ignored. \n" + ); + cl = addList( + "FILTER_PATTERNS", + "The FILTER_PATTERNS tag can be used to specify filters on a per file pattern \n" + "basis. Doxygen will compare the file name with each pattern and apply the \n" + "filter if there is a match. The filters are a list of the form: \n" + "pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further \n" + "info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER \n" + "is applied to all files. \n" ); cl->setWidgetType(ConfigList::File); cb = addBool( diff --git a/src/definition.cpp b/src/definition.cpp index 6581847..346b7e6 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -246,7 +246,7 @@ static bool readCodeFragment(const char *fileName, { //printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine); if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name - QCString cmd=Config_getString("INPUT_FILTER")+" \""+fileName+"\""; + QCString cmd=getFileFilter(fileName)+" \""+fileName+"\""; FILE *f = Config_getBool("FILTER_SOURCE_FILES") ? popen(cmd,"r") : fopen(fileName,"r"); bool found=FALSE; if (f) diff --git a/src/docparser.cpp b/src/docparser.cpp index b324348..3f74dcf 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1251,6 +1251,17 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor) //--------------------------------------------------------------------------- +DocVerbatim::DocVerbatim(DocNode *parent,const QString &context, + const QString &text, Type t,bool isExample, + const QString &exampleFile) + : m_parent(parent), m_context(context), m_text(text), m_type(t), + m_isExample(isExample), m_exampleFile(exampleFile), m_relPath(g_relPath) +{ +} + + +//--------------------------------------------------------------------------- + void DocInclude::parse() { DBG(("DocInclude::parse(file=%s,text=%s)\n",m_file.data(),m_text.data())); @@ -1480,7 +1491,7 @@ bool DocXRefItem::parse() //--------------------------------------------------------------------------- DocFormula::DocFormula(DocNode *parent,int id) : - m_parent(parent) + m_parent(parent), m_relPath(g_relPath) { QString formCmd; formCmd.sprintf("\\form#%d",id); @@ -4117,7 +4128,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag break; case HTML_UNKNOWN: warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag <%s> found", tagName.data()); - m_children.append(new DocWord(this, "<"+tagName+">")); + m_children.append(new DocWord(this, "<"+tagName+tagHtmlAttribs.toString()+">")); break; break; default: @@ -4257,8 +4268,8 @@ int DocPara::handleHtmlEndTag(const QString &tagName) // ignore </a> tag (can be part of <a name=...></a> break; case HTML_UNKNOWN: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag </%s> found", - tagName.data()); + warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag </%s> found", tagName.data()); + m_children.append(new DocWord(this,"</"+tagName+">")); break; default: // we should not get here! diff --git a/src/docparser.h b/src/docparser.h index 1b75451..84fe830 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -357,9 +357,7 @@ class DocVerbatim : public DocNode enum Type { Code, HtmlOnly, ManOnly, LatexOnly, XmlOnly, Verbatim, Dot }; DocVerbatim(DocNode *parent,const QString &context, const QString &text, Type t,bool isExample, - const QString &exampleFile) : - m_parent(parent), m_context(context), m_text(text), m_type(t), - m_isExample(isExample), m_exampleFile(exampleFile) {} + const QString &exampleFile); Kind kind() const { return Kind_Verbatim; } Type type() const { return m_type; } QString text() const { return m_text; } @@ -368,6 +366,7 @@ class DocVerbatim : public DocNode void accept(DocVisitor *v) { v->visit(this); } bool isExample() const { return m_isExample; } QString exampleFile() const { return m_exampleFile; } + QString relPath() const { return m_relPath; } private: DocNode *m_parent; @@ -376,6 +375,7 @@ class DocVerbatim : public DocNode Type m_type; bool m_isExample; QString m_exampleFile; + QString m_relPath; }; @@ -455,6 +455,7 @@ class DocFormula : public DocNode Kind kind() const { return Kind_Formula; } QString name() const { return m_name; } QString text() const { return m_text; } + QString relPath() const { return m_relPath; } int id() const { return m_id; } DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } @@ -463,6 +464,7 @@ class DocFormula : public DocNode DocNode *m_parent; QString m_name; QString m_text; + QString m_relPath; int m_id; }; diff --git a/src/dot.cpp b/src/dot.cpp index 7ebc1dd..4bde818 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -2433,9 +2433,11 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, * dotfiles to generate image maps. * \param inFile just the basename part of the filename * \param outDir output directory + * \param relPath relative path the to root of the output dir * \returns a string which is the HTML image map (without the \<map\>\</map\>) */ -QString getDotImageMapFromFile(const QString& inFile, const QString& outDir) +QString getDotImageMapFromFile(const QString& inFile, const QString& outDir, + const QCString &relPath) { QString outFile = inFile + ".map"; @@ -2458,7 +2460,7 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir) } QString result; QTextOStream tmpout(&result); - convertMapFile(tmpout, outFile, "",TRUE); + convertMapFile(tmpout, outFile, relPath ,TRUE); QDir().remove(outFile); // printf("result=%s\n",result.data()); @@ -202,7 +202,8 @@ class DotCallGraph void generateGraphLegend(const char *path); void writeDotGraphFromFile(const char *inFile,const char *outDir, const char *outFile,GraphOutputFormat format); -QString getDotImageMapFromFile(const QString& inFile, const QString& outDir); +QString getDotImageMapFromFile(const QString& inFile, const QString& outDir, + const QCString& relPath); #endif diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 15f10d9..98bb3ac 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -119,6 +119,8 @@ SearchIndex * Doxygen::searchIndex=0; SDict<DefinitionList> *Doxygen::symbolMap; bool Doxygen::outputToWizard=FALSE; QDict<int> * Doxygen::htmlDirMap = 0; +QCache<LookupInfo> Doxygen::lookupCache(20000,20000); +bool Doxygen::lookupCacheEnabled=FALSE; static StringList inputFiles; static StringDict excludeNameDict(1009); // sections @@ -149,7 +151,6 @@ void clearAll() Doxygen::formulaNameDict.clear(); Doxygen::tagDestinationDict.clear(); delete Doxygen::mainPage; Doxygen::mainPage=0; - } void statistics() @@ -3387,7 +3388,7 @@ static bool findClassRelation( } baseClassName=stripTemplateSpecifiersFromScope (removeRedundantWhiteSpace(baseClassName)); - MemberDef *baseClassTypeDef; + MemberDef *baseClassTypeDef=0; QCString templSpec; ClassDef *baseClass=getResolvedClass(explicitGlobalScope ? 0 : cd, cd->getFileDef(), // todo: is this ok? @@ -3417,7 +3418,9 @@ static bool findClassRelation( ); int i; - if (baseClass==0 && (i=baseClassName.find('<'))!=-1) + int si=baseClassName.findRev("::"); + if (si==-1) si=0; + if (baseClass==0 && (i=baseClassName.find('<',si))!=-1) // base class has template specifiers { // TODO: here we should try to find the correct template specialization @@ -3450,10 +3453,10 @@ static bool findClassRelation( //printf("cd=%p baseClass=%p\n",cd,baseClass); bool found=baseClass!=0 && (baseClass!=cd || mode==TemplateInstances); - if (!found && (i=baseClassName.findRev("::"))!=-1) + if (!found && si!=-1) { // replace any namespace aliases - replaceNamespaceAliases(baseClassName,i); + replaceNamespaceAliases(baseClassName,si); baseClass=getResolvedClass(cd,cd->getFileDef(),baseClassName); found=baseClass!=0 && baseClass!=cd; } @@ -3493,7 +3496,11 @@ static bool findClassRelation( else if (mode==DocumentedOnly) { QCString usedName; - if (baseClassTypeDef) usedName=biName; + if (baseClassTypeDef) + { + usedName=biName; + //printf("***** usedName=%s templSpec=%s\n",usedName.data(),templSpec.data()); + } cd->insertBaseClass(baseClass,usedName,bi->prot,bi->virt,templSpec); // add this class as super class to the base class baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec); @@ -6975,7 +6982,8 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) QFileInfo fi(fileName); if (!fi.exists()) return; - if (Config_getString("INPUT_FILTER").isEmpty()) + QCString filterName = getFileFilter(fileName); + if (filterName.isEmpty()) { QFile f(fileName); if (!f.open(IO_ReadOnly)) @@ -6994,11 +7002,11 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) } else { - QCString cmd=Config_getString("INPUT_FILTER")+" "+fileName; + QCString cmd=filterName+" "+fileName; FILE *f=popen(cmd,"r"); if (!f) { - err("Error: could not execute filter %s\n",Config_getString("INPUT_FILTER").data()); + err("Error: could not execute filter %s\n",filterName.data()); return; } const int bufSize=1024; @@ -7428,6 +7436,8 @@ void initDoxygen() excludeNameDict.setAutoDelete(TRUE); Doxygen::memGrpInfoDict.setAutoDelete(TRUE); Doxygen::tagDestinationDict.setAutoDelete(TRUE); + Doxygen::lookupCache.setAutoDelete(TRUE); + Doxygen::lookupCacheEnabled=FALSE; } void cleanUpDoxygen() @@ -8225,6 +8235,10 @@ void parseInput() computeClassRelations(); classEntries.clear(); + // from now on the class relations are fixed and we can + // start to cache them to improve performance + Doxygen::lookupCacheEnabled=TRUE; + msg("Searching for enumerations...\n"); findEnums(root); findEnumDocumentation(root); diff --git a/src/doxygen.h b/src/doxygen.h index b526495..32d2cbf 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -22,6 +22,7 @@ #include "qtbc.h" #include <qtextstream.h> #include <qdatetime.h> +#include <qcache.h> #include "groupdef.h" #include "filedef.h" #include "classdef.h" @@ -51,6 +52,15 @@ class StringDict : public QDict<QCString> virtual ~StringDict() {} }; +struct LookupInfo +{ + LookupInfo(ClassDef *cd=0,MemberDef *td=0,QCString ts="") + : classDef(cd), typeDef(td), templSpec(ts) {} + ClassDef *classDef; + MemberDef *typeDef; + QCString templSpec; +}; + extern QCString spaces; @@ -101,6 +111,8 @@ class Doxygen static SDict<DefinitionList> *symbolMap; static bool outputToWizard; static QDict<int> *htmlDirMap; + static QCache<LookupInfo> lookupCache; + static bool lookupCacheEnabled; }; void initDoxygen(); diff --git a/src/htmlattrib.h b/src/htmlattrib.h index 371f3d5..a62c8e5 100644 --- a/src/htmlattrib.h +++ b/src/htmlattrib.h @@ -35,6 +35,18 @@ class HtmlAttribList : public QList<HtmlAttrib> { operator=(l); } HtmlAttribList &operator=(const HtmlAttribList &l) { clear(); QList<HtmlAttrib>::operator=(l); return *this; } + QString toString() const + { + HtmlAttribList *that = (HtmlAttribList *)this; + QString result; + HtmlAttrib *attr=that->first(); + while (attr) + { + result+=" "+attr->name+"=\""+attr->value+"\""; + attr=that->next(); + } + return result; + } private: QCollection::Item newItem( QCollection::Item d ) { return (QCollection::Item)new HtmlAttrib(*(HtmlAttrib *)d); } diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index dd1f6df..de1dba2 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -28,7 +28,7 @@ #include "config.h" #define PREFRAG_START "<div class=\"fragment\"><pre>" -#define PREFRAG_END "</pre></div" +#define PREFRAG_END "</pre></div>" static QString htmlAttribsToString(const HtmlAttribList &attribs) { @@ -228,7 +228,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s) file.close(); m_t << "<div align=\"center\">" << endl; - writeDotFile(fileName); + writeDotFile(fileName,s->relPath()); m_t << "</div>" << endl; file.remove(); @@ -308,13 +308,14 @@ void HtmlDocVisitor::visit(DocFormula *f) if (m_hide) return; bool bDisplay = f->text().at(0)=='\\'; if (bDisplay) m_t << "<p class=\"formulaDsp\">" << endl; - m_t << "<img class=\"formula" << (bDisplay ? "Dsp" : "Inl"); + m_t << "<img class=\"formula" + << (bDisplay ? "Dsp" : "Inl"); m_t << "\" alt=\""; filterQuotedCdataAttr(f->text()); m_t << "\""; /// @todo cache image dimensions on formula generation and give height/width /// for faster preloading and better rendering of the page - m_t << " src=\"" << f->name() << ".png\">"; + m_t << " src=\"" << f->relPath() << f->name() << ".png\">"; if (bDisplay) m_t << endl << "<p>" << endl; } @@ -742,7 +743,7 @@ void HtmlDocVisitor::visitPost(DocImage *img) void HtmlDocVisitor::visitPre(DocDotFile *df) { if (m_hide) return; - writeDotFile(df->file()); + writeDotFile(df->file(),""); m_t << "<div align=\"center\">" << endl; if (df->hasCaption()) { @@ -1053,7 +1054,7 @@ void HtmlDocVisitor::popEnabled() delete v; } -void HtmlDocVisitor::writeDotFile(const QString &fileName) +void HtmlDocVisitor::writeDotFile(const QString &fileName,const QString &relPath) { QString baseName=fileName; int i; @@ -1065,10 +1066,10 @@ void HtmlDocVisitor::writeDotFile(const QString &fileName) writeDotGraphFromFile(fileName,outDir,baseName,BITMAP); QString mapName = baseName+".map"; QString mapFile = fileName+".map"; - m_t << "<img src=\"" << baseName << "." + m_t << "<img src=\"" << relPath << baseName << "." << Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\"" << baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl; - QString imap = getDotImageMapFromFile(fileName,outDir); + QString imap = getDotImageMapFromFile(fileName,outDir,relPath.data()); m_t << "<map name=\"" << mapName << "\">" << imap << "</map>" << endl; } diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h index 0650478..9d96e46 100644 --- a/src/htmldocvisitor.h +++ b/src/htmldocvisitor.h @@ -137,7 +137,7 @@ class HtmlDocVisitor : public DocVisitor void startLink(const QString &ref,const QString &file, const QString &relPath,const QString &anchor); void endLink(); - void writeDotFile(const QString &fileName); + void writeDotFile(const QString &fileName,const QString &relPath); void pushEnabled(); void popEnabled(); diff --git a/src/lang_cfg.h b/src/lang_cfg.h index 085c2a0..e44d5f5 100644 --- a/src/lang_cfg.h +++ b/src/lang_cfg.h @@ -28,3 +28,4 @@ #define LANG_SR #define LANG_CA #define LANG_LT +#define LANG_ZA diff --git a/src/language.cpp b/src/language.cpp index 8cc1214..7df83f9 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -115,6 +115,9 @@ #ifdef LANG_LT #include "translator_lt.h" #endif +#ifdef LANG_ZA +#include "translator_za.h" +#endif #endif #define L_EQUAL(a) !stricmp(langName,a) diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index 30a9042..5b65522 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -115,6 +115,7 @@ HEADERS = bufstr.h \ translator_sr.h \ translator_tw.h \ translator_ua.h \ + translator_za.h \ unistd.h \ util.h \ version.h \ diff --git a/src/memberdef.cpp b/src/memberdef.cpp index ce37bac..752e2d8 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -578,10 +578,10 @@ bool MemberDef::isLinkableInProject() const //printf("in a namespace but namespace not linkable!\n"); return FALSE; // in namespace but namespace not linkable } - if (!group && fileDef && !fileDef->isLinkableInProject()) + if (!group && !nspace && fileDef && !fileDef->isLinkableInProject()) { //printf("in a file but file not linkable!\n"); - return FALSE; // in file but file not linkable + return FALSE; // in file (and not in namespace) but file not linkable } if (prot==Private && !Config_getBool("EXTRACT_PRIVATE") && mtype!=Friend) { diff --git a/src/memberdef.h b/src/memberdef.h index 564fdc0..736dc2d 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -270,7 +270,9 @@ class MemberDef : public Definition // cached typedef functions bool isTypedefValCached() const { return m_isTypedefValCached; } ClassDef *getCachedTypedefVal() const { return m_cachedTypedefValue; } - void cacheTypedefVal(ClassDef *val) { m_isTypedefValCached=TRUE; m_cachedTypedefValue=val; } + QCString getCachedTypedefTemplSpec() const { return m_cachedTypedefTemplSpec; } + void cacheTypedefVal(ClassDef *val,const QCString &templSpec) + { m_isTypedefValCached=TRUE; m_cachedTypedefValue=val; m_cachedTypedefTemplSpec=templSpec; } // declaration <-> definition relation void setMemberDefinition(MemberDef *md) { memDef=md; } @@ -360,6 +362,7 @@ class MemberDef : public Definition bool m_isTypedefValCached; ClassDef *m_cachedTypedefValue; + QCString m_cachedTypedefTemplSpec; // inbody documentation int m_inbodyLine; @@ -190,9 +190,10 @@ static FILE *checkAndOpenFile(const QCString &absName) if (alreadyIncluded) return 0; - if (!Config_getString("INPUT_FILTER").isEmpty()) + QCString filterName = getFileFilter(absName); + if (!filterName.isEmpty()) { - QCString cmd = Config_getString("INPUT_FILTER")+" "+absName; + QCString cmd = filterName+" "+absName; f=popen(cmd,"r"); if (!f) err("Error: could not execute filter %s\n",cmd.data()); } @@ -1480,7 +1481,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <Command>. <UndefName>{ID} { Define *def; - if ((def=isDefined(yytext)) && !def->isPredefined) + if ((def=isDefined(yytext)) + /*&& !def->isPredefined*/ + ) { //printf("undefining %s\n",yytext); def->undef=TRUE; @@ -1955,7 +1958,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) { FileState *fs=g_includeStack.pop(); //fileDefineCache->merge(g_yyFileName,fs->fileName); - if (Config_getString("INPUT_FILTER").isEmpty()) + if (getFileFilter(fs->fileName.data()).isEmpty()) fclose(fs->filePtr); else pclose(fs->filePtr); @@ -2203,7 +2206,7 @@ void preprocessFile(const char *fileName,BufStr &output) } - QCString &inputFilter = Config_getString("INPUT_FILTER"); + QCString inputFilter = getFileFilter(fileName); if (inputFilter.isEmpty()) { preYYin = fopen(fileName,"r"); diff --git a/src/translator_cn.h b/src/translator_cn.h index f044067..7b2756a 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -24,7 +24,7 @@ */ #define CN_SPC -class TranslatorChinese : public TranslatorAdapter_1_2_13 +class TranslatorChinese : public TranslatorAdapter_1_3_3 { public: /*! Used for identification of the language. The identification @@ -36,24 +36,24 @@ class TranslatorChinese : public TranslatorAdapter_1_2_13 virtual QCString idLanguage() { return "chinese"; } - /*! Used to get the LaTeX command(s) for the language support. - * This method should return string with commands that switch - * LaTeX to the desired language. For example - * <pre>"\\usepackage[german]{babel}\n" - * </pre> - * or - * <pre>"\\usepackage{polski}\n" - * "\\usepackage[latin2]{inputenc}\n" - * "\\usepackage[T1]{fontenc}\n" - * </pre> - * - * The English LaTeX does not use such commands. Because of this - * the empty string is returned in this implementation. - */ - virtual QCString latexLanguageSupportCommand() - { + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + * <pre>"\\usepackage[german]{babel}\n" + * </pre> + * or + * <pre>"\\usepackage{polski}\n" + * "\\usepackage[latin2]{inputenc}\n" + * "\\usepackage[T1]{fontenc}\n" + * </pre> + * + * The English LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { return ""; - } + } /*! return the language charset. This will be used for the HTML output */ @@ -495,8 +495,8 @@ class TranslatorChinese : public TranslatorAdapter_1_2_13 case ClassDef::Struct: result+="结构"; break; case ClassDef::Union: result+="联合"; break; case ClassDef::Interface: result+="接口"; break; - case ClassDef::Protocol: result+="protocol"; break; // translate me! - case ClassDef::Category: result+="category"; break; // translate me! + case ClassDef::Protocol: result+="协议"; break; // translate me! + case ClassDef::Category: result+="分类"; break; // translate me! case ClassDef::Exception: result+="异常"; break; } result+="参考"; @@ -661,8 +661,8 @@ class TranslatorChinese : public TranslatorAdapter_1_2_13 case ClassDef::Struct: result+="结构"; break; case ClassDef::Union: result+="联合"; break; case ClassDef::Interface: result+="接口"; break; - case ClassDef::Protocol: result+="protocol"; break; // translate me! - case ClassDef::Category: result+="category"; break; // translate me! + case ClassDef::Protocol: result+="协议"; break; // translate me! + case ClassDef::Category: result+="分类"; break; // translate me! case ClassDef::Exception: result+="异常"; break; } result+="的文档由以下文件生成:"; @@ -1282,6 +1282,194 @@ class TranslatorChinese : public TranslatorAdapter_1_2_13 { return "参考"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + /* return "Implements "+trWriteList(numEntries)+"."; */ + return "实现了"CN_SPC+trWriteList(numEntries)+"。"; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + /* return "Implemented in "+trWriteList(numEntries)+"."; */ + return "在"CN_SPC+trWriteList(numEntries)+CN_SPC"内被实现。"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + /* return "Table of Contents"; */ + return "目录"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { +/* return "Deprecated List"; */ + return "过时列表"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + /* return "Events"; */ + return "事件"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + /* return "Event Documentation"; */ + return "事件文档"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + /* return "Package Types"; */ + return "模块类型"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + /* return "Package Functions"; */ + return "模块函数"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + /* return "Static Package Functions"; */ + return "静态模块函数"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + /* return "Package Attributes"; */ + return "模块属性"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + /* return "Static Package Attributes"; */ + return "静态模块属性"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + /* return "All"; */ + return "全部"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + /* return "Here is the call graph for this function:"; */ + return "函数调用图:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + /* return "Search for"; */ + return "搜索"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + /* return "Search Results"; */ + return "搜索结果"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + /* return "Sorry, no documents matching your query."; */ + return "对不起,找不到与你的查询相符的文档。"; + } + else if (numDocuments==1) + { + /* return "Found <b>1</b> document matching your query."; */ + return "找到<b>1</b>篇与你的查询相符的文档。"; + } + else + { + /* return "Found <b>$num</b> documents matching your query. " + "Showing best matches first."; */ + return "找到<b>$num</b>篇与你的查询相符的文档。" + "先显示最吻合的文档。"; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Matches:"; + return "符合的结果:"; + } }; #endif diff --git a/src/translator_za.h b/src/translator_za.h new file mode 100644 index 0000000..7f115dc --- /dev/null +++ b/src/translator_za.h @@ -0,0 +1,1550 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2004 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + + /* + * Bronne vir hierdie vertaling (Sources for this translation): + * Die Stigting vir Afrikaans se rekenaartermelys: + * - http://www.afrikaans.com/rekenaarterme.html + * Werkgroep vir Afrikaanse IT-terme: + * - http://www.vertaal.org/index.html + */ + +#ifndef TRANSLATOR_ZA_H +#define TRANSLATOR_ZA_H + +class TranslatorAfrikaans : public Translator +{ + public: + + // --- Language control methods ------------------- + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name + * of the language in English using lower-case characters only + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * the identification used in language.cpp. + */ + virtual QCString idLanguage() + { return "afrikaans"; } + + /*! Used to get the LaTeX command(s) for the language support. + * This method should return string with commands that switch + * LaTeX to the desired language. For example + * <pre>"\\usepackage[german]{babel}\n" + * </pre> + * or + * <pre>"\\usepackage{polski}\n" + * "\\usepackage[latin2]{inputenc}\n" + * "\\usepackage[T1]{fontenc}\n" + * </pre> + * + * The Afrikaans LaTeX does not use such commands. Because of this + * the empty string is returned in this implementation. + */ + virtual QCString latexLanguageSupportCommand() + { + //should we use return "\\usepackage[afrikaans]{babel}\n"; + // not sure - for now return an empty string + return ""; + } + + /*! return the language charset. This will be used for the HTML output */ + virtual QCString idLanguageCharset() + { + return "iso-8859-1"; + } + + // --- Language translation methods ------------------- + + /*! used in the compound documentation before a list of related functions. */ + virtual QCString trRelatedFunctions() + { return "Verwante Funksies"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Let daarop dat hierdie nie lede funksies is nie.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Detail Beskrywing"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Lede Typedef Dokumentasie"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Lede Enumerasie Dokumentasie"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Lede Funksie Dokumentasie"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Veld Dokumentasie"; + } + else + { + return "Lede Data Dokumentasie"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "Meer detail..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "Lys van alle lede."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "Lede Lys"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Hierdie is 'n volledige lys van lede vir "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", insluitend alle afgeleide lede."; } + + /*! this is put at the author sections at the bottom of man pages. + * parameter s is name of the project name. + */ + virtual QCString trGeneratedAutomatically(const char *s) + { QCString result="Automaties gegenereer deur Doxygen"; + if (s) result+=(QCString)" vir "+s; + result+=" van die bron kode af."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "enum naam"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "enum waarde"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "gedefinieër in"; } + + // 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). + */ + virtual QCString trModules() + { return "Modules"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Klas Hierargie"; } + + /*! This is put above each page as a link to the list of annotated classes */ + virtual QCString trCompoundList() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture"; + } + else + { + return "Klas Lys"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Leër Lys"; } + + /*! This is put above each page as a link to the list of all verbatim headers */ + virtual QCString trHeaderFiles() + { return "Kop Leër"; } + + /*! This is put above each page as a link to all members of compounds. */ + virtual QCString trCompoundMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Velde"; + } + else + { + return "Klas Lede"; + } + } + + /*! This is put above each page as a link to all members of files. */ + virtual QCString trFileMembers() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Globals"; + } + else + { + return "Leër Lede"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Verwante Bladsye"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Voorbeelde"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Soek"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { + return "Hierdie afgeleide lys word rofweg gesorteer: "; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Hier is 'n lys van alle "; + if (!extractAll) result+="gedokumenteerde "; + result+="leërs met kort beskrywings:"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return " Data strukture met kort beskrywings:"; + } + else + { + return "Klasse, structs, " + "unions en intervlakke met kort beskrywings:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="'n Lys van alle "; + if (!extractAll) + { + result+="gedokumenteerde "; + } + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struct en union velde"; + } + else + { + result+="klas lede"; + } + result+=" met skakels na "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="die struct/union dokumentasie vir elke veld:"; + } + else + { + result+="die klas dokumentasie vir elke lid:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="die structures/unions waaraan hulle behoort:"; + } + else + { + result+="die klasse waaraan hulle behoort:"; + } + } + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="'n Lys van alle "; + if (!extractAll) result+="gedokumenteerde "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="funksies, veranderlikes, defines, enums, en typedefs"; + } + else + { + result+="leër lede"; + } + result+=" met skakels na "; + if (extractAll) + result+="die leërs waaraan hulle behoort:"; + else + result+="die dokumentasie:"; + return result; + } + + /*! This is an introduction to the page with the list of all header files. */ + virtual QCString trHeaderFilesDescription() + { return "Die kop leers waaruit die API bestaan:"; } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "'n Lys van alle voorbeelde:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "'n Lys van alle verwante dokumentasie:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "'n Lys van alle modules:"; } + + /*! This sentences is used in the annotated class/file lists if no brief + * description is given. + */ + virtual QCString trNoDescriptionAvailable() + { return "Geen beskrywings beskikbaar"; } + + // index titles (the project name is prepended for these) + + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Module Indeks"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "Hierargiese Indeks"; } + + /*! This is used in LaTeX as the title of the chapter with the + * annotated compound index. + */ + virtual QCString trCompoundIndex() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture Indeks"; + } + else + { + return "Klas Indeks"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Leër Indeks"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Module Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all classes, structs and unions. + */ + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture Dokumentasie"; + } + else + { + return "Klas Dokumentasie"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Leër Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Voorbeeld Dokumentasie"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Bladsy Dokumentasie"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "Verwysings Handleiding"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Definiesies"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Funksie Prototipes"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Typedefs"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Enumerations"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Funksies"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Veranderlikes"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "Enumeration waardes"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Define Documentation"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Funksie Prototipe Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Typedef Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Enumeration Type Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Enumeration Waarde Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Funksie Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Veranderlike Dokumentasie"; } + + /*! This is used in the documentation of a file/namespace/group before + * the list of links to documented compounds + */ + virtual QCString trCompounds() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture"; + } + else + { + return "Klasse"; + } + } + + /*! This is used in the standard footer of each page and indicates when + * the page was generated + */ + virtual QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Gegenereer op "+date; + if (projName) result+=(QCString)" vir "+projName; + result+=(QCString)" deur"; + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return "geskryf deur"; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Afleidings diagram vir "+clName+":"; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Slegs vir interne gebruik."; } + + /*! this text is generated when the \\reimp command is used. */ + virtual QCString trReimplementedForInternalReasons() + { return "Hergeimplimenteer vir interne redes; die API word nie beinvloed nie."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Waarskuwing"; } + + /*! this text is generated when the \\bug command is used. */ + virtual QCString trBugsAndLimitations() + { return "Bugs and beperkings"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Weergawe"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Datum"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Returns"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Sien ook"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Parameters"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Exceptions"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Gegenereer deur"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "Namespace Lys"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="'n Lys van alle "; + if (!extractAll) result+="gedokumenteerde "; + result+="namespaces met kort beskrywings:"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Friends"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Friends En Verwante Funksie Dokumentasie"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + /*! used as the title of the HTML page of a class/struct/union */ + virtual QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool isTemplate) + { + QCString result=(QCString)clName; + switch(compType) + { + case ClassDef::Class: result+=" klas"; break; + case ClassDef::Struct: result+=" Struct"; break; + case ClassDef::Union: result+=" Union"; break; + case ClassDef::Interface: result+=" Intervlak"; break; + case ClassDef::Protocol: result+=" Protocol"; break; + case ClassDef::Category: result+=" Kategorie"; break; + case ClassDef::Exception: result+=" Exception"; break; + } + if (isTemplate) result+=" Template"; + result+=" Verwysing"; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result=fileName; + result+=" Leër Verwysing"; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Namespace Verwysing"; + return result; + } + + virtual QCString trPublicMembers() + { return "Publieke Lede Funksies"; } + virtual QCString trPublicSlots() + { return "Publieke Slots"; } + virtual QCString trSignals() + { return "Signals"; } + virtual QCString trStaticPublicMembers() + { return "Statiese Publieke Lede Funksies"; } + virtual QCString trProtectedMembers() + { return "Beskermde Lede Funksies"; } + virtual QCString trProtectedSlots() + { return "Beskermde Slots"; } + virtual QCString trStaticProtectedMembers() + { return "Statiese Beskermde Lede Funksies"; } + virtual QCString trPrivateMembers() + { return "Private Lede Funksies"; } + virtual QCString trPrivateSlots() + { return "Private Slots"; } + virtual QCString trStaticPrivateMembers() + { return "Statiese Private Lede Funksies"; } + + /*! this function is used to produce a comma-separated list of items. + * use generateMarker(i) to indicate where item i should be put. + */ + virtual QCString trWriteList(int numEntries) + { + QCString result; + int i; + // the inherits list contain `numEntries' classes + for (i=0;i<numEntries;i++) + { + // use generateMarker to generate placeholders for the class links! + result+=generateMarker(i); // generate marker for entry i in the list + // (order is left to right) + + if (i!=numEntries-1) // not the last entry, so we need a separator + { + if (i<numEntries-2) // not the fore last entry + result+=", "; + else // the fore last entry + result+=", en "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return "Afgelei van"+trWriteList(numEntries)+"."; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return "Afgelei van"+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * members that are hidden by this one. + */ + virtual QCString trReimplementedFromList(int numEntries) + { + return "Hergeimplimenteer van "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all member that overwrite the implementation of this member. + */ + virtual QCString trReimplementedInList(int numEntries) + { + return "Hergeimplimenter in "+trWriteList(numEntries)+"."; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Namespace Lede"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="'n Lys van alle "; + if (!extractAll) result+="gedokumenteerde "; + result+="namespace lede met skakels na "; + if (extractAll) + result+="die namespace dokumentasie vir elke lid:"; + else + result+="die namespaces waaraan hulle behoort:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "Namespace Indeks"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Namespace Dokumentasie"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990522 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "Namespaces"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Die dokumentasie vir hierdie "; + switch(compType) + { + case ClassDef::Class: result+="klas"; break; + case ClassDef::Struct: result+="struct"; break; + case ClassDef::Union: result+="union"; break; + case ClassDef::Interface: result+="intervlak"; break; + case ClassDef::Protocol: result+="protokol"; break; + case ClassDef::Category: result+="category"; break; + case ClassDef::Exception: result+="exception"; break; + } + result+=" is gegenereer vanaf die volgende leër"; + if (single) result+=":"; else result+="s:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Alfabetiese Lys"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Return waardes"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Hoof Bladsy"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + virtual QCString trPageAbbreviation() + { return "p."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991003 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trSources() + { + return "Bronne"; + } + virtual QCString trDefinedAtLineInSourceFile() + { + return "Gedefinieër by lyn @0 van leër @1."; + } + virtual QCString trDefinedInSourceFile() + { + return "Definisie in leër @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "Verouderd"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Samewerkings diagram vir "+clName+":"; + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Insluitings afhanklikheid diagram vir "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Konstruktor & Destruktor Dokumentasie"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "Skakel na die bron kode van hierdie leër."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "Skakel na die dokumentasie van hierdie leër."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "Prekondisie"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "Postkondisie"; + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Invariant"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "Oorspronklike waarde:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "kode"; + } + virtual QCString trGraphicalHierarchy() + { + return "Grafiese Klasse Hierargie"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "Skakel na die grafiese klasse hierargie"; + } + virtual QCString trGotoTextualHierarchy() + { + return "Skakel na die teks klasse hierargie"; + } + virtual QCString trPageIndex() + { + return "Bladsy Indeks"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Nota"; + } + virtual QCString trPublicTypes() + { + return "Publieke Tipes"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Velde"; + } + else + { + return "Publieke Public Attributes"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Statiese Publieke Attribute"; + } + virtual QCString trProtectedTypes() + { + return "Beskermde Tipes"; + } + virtual QCString trProtectedAttribs() + { + return "Beskermde Attribute"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Statiese Beskermde Attribute"; + } + virtual QCString trPrivateTypes() + { + return "Private Tipes"; + } + virtual QCString trPrivateAttribs() + { + return "Private Attribute"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Statiese Private Attribute"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\todo item */ + virtual QCString trTodo() + { + return "Aksies"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Aksie Lys"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Verwysing van"; + } + virtual QCString trRemarks() + { + return "Opmerkings"; + } + virtual QCString trAttention() + { + return "Aandag"; + } + virtual QCString trInclByDepGraph() + { + return "Hierdie diagram verduidelik watter leërs direk of" + "indirek hierdie leër insluit:"; + } + virtual QCString trSince() + { + return "Sederd"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.5 +////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Diagram beskrywing"; + } + /*! page explaining how the dot graph's should be interpreted + * The %A in the text below are to prevent link to classes called "A". + */ + virtual QCString trLegendDocs() + { + return + "Hierdie bladsy beskryf die diagram konvensies wat gebruik word " + "deur doxygen.<p>\n" + "in hierdie voorbeeld:\n" + "\\code\n" + "/*! Onsigbare klas weens afkorting */\n" + "class Invisible { };\n\n" + "/*! Afgekorte klas, afgeleide verwantskap word versteek */\n" + "class Truncated : public Invisible { };\n\n" + "/* Ongedokumenteerde Klas, geen doxygen kommentaar nie */\n" + "class Undocumented{ };\n\n" + "/*! 'n Klas wat afgelei is met 'n publieke verwantskap */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! 'n template klas */\n" + "template<class T> class Templ { };\n\n" + "/*! 'n Klas wat afgelei is met 'n beskermde verwantskap */\n" + "class ProtectedBase { };\n\n" + "/*! 'n Klas wat afgelei is met 'n private verwantskap */\n" + "class PrivateBase { };\n\n" + "/*! 'n Klas wat gebrui word deur die Afgeleide klas */\n" + "class GebruikMy { };\n\n" + "/*! 'n Super klas wat afgelei word van 'n aantal basis klasse */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Ongedokumenteer\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "As die \\c MAX_DOT_GRAPH_HEIGHT merker in die konfigurasie leër " + "aan 240 gelyk gestel is, word die volgende diagram geproduseer:" + "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "Die reghoeke in die diagram het die volgende betekenis:\n" + "<ul>\n" + "<li>%'n Soliede swart reghoek verteenwoordig die klas waarvoor " + "die diagram gegenereer is.\n" + "<li>%'n Reghoek met 'n swart omlyning verteenwoordig 'n gedokumenteerde klas.\n" + "<li>%'n Reghoek met 'n grys omlyning verteenwoordig 'n ongedokumenteerde klas.\n" + "<li>%'n Reghoek met 'n rooi omlyning verteenwoordig 'n gedokumenteerde klas waarvoor" + "alle verwante klasse (afgeleide of gebruik) nie getoon word nie. %'n Diagram word " + "op hierie manier afgekort as dit nie in die gespesifiseerde raam pas nie.\n" + "</ul>\n" + "Die pyltjies het die volgende betekenis:\n" + "<ul>\n" + "<li>%'n Donker blou pyltjie verteenwoordig 'n publieke afgeleide " + "verwantskap tussen twee klasse.\n" + "<li>%'n Donker groen pyltjie word gebruik vir 'n beskermde verwantskap.\n" + "<li>%'n Donker rooi pyltjie verteenwoordig private verwantskappe.\n" + "<li>%'n Pers pyltjie word gebruik as 'n klas gebruik of bevat word " + "deur 'n ander klas. Die pyltjie word gemerk met die veranderlike(s) waar deur " + "die verwysde klass verkrygbaar is.\n" + "<li>%'n Geel stippel pyl verteenwoordig die verwantslap tussen 'n template instansie en " + "die template waarvan die klas vervaardig is. Die pyltjie word gemerk met die " + "template parameters van die instansie.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "beskrywing"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.0 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "Toets"; + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "Toets Lys"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "DCOP Lede Funksies"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.2 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "Eienskappe"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Eienskap Dokumentasie"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java interfaces in the summary section of Java packages */ + virtual QCString trInterfaces() + { + return "Intervlake"; + } + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Data Strukture"; + } + else + { + return "Klasse"; + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Pakket "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Pakket Lys"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Die pakkette met kort beskrywings (indien beskikbaar):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Pakkette"; + } + /*! Used as a chapter title for Latex & RTF output */ + virtual QCString trPackageDocumentation() + { + return "Pakket Dokumentasie"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "Waarde:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.5 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\bug item */ + virtual QCString trBug() + { + return "Bug"; + } + /*! Used as the header of the bug list */ + virtual QCString trBugList() + { + return "Bug Lys"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.6 +////////////////////////////////////////////////////////////////////////// + + /*! Used as ansicpg for RTF file + * + * The following table shows the correlation of Charset name, Charset Value and + * <pre> + * Codepage number: + * Charset Name Charset Value(hex) Codepage number + * ------------------------------------------------------ + * DEFAULT_CHARSET 1 (x01) + * SYMBOL_CHARSET 2 (x02) + * OEM_CHARSET 255 (xFF) + * ANSI_CHARSET 0 (x00) 1252 + * RUSSIAN_CHARSET 204 (xCC) 1251 + * EE_CHARSET 238 (xEE) 1250 + * GREEK_CHARSET 161 (xA1) 1253 + * TURKISH_CHARSET 162 (xA2) 1254 + * BALTIC_CHARSET 186 (xBA) 1257 + * HEBREW_CHARSET 177 (xB1) 1255 + * ARABIC _CHARSET 178 (xB2) 1256 + * SHIFTJIS_CHARSET 128 (x80) 932 + * HANGEUL_CHARSET 129 (x81) 949 + * GB2313_CHARSET 134 (x86) 936 + * CHINESEBIG5_CHARSET 136 (x88) 950 + * </pre> + * + */ + virtual QCString trRTFansicp() + { + return "1252"; + } + + + /*! Used as ansicpg for RTF fcharset + * \see trRTFansicp() for a table of possible values. + */ + virtual QCString trRTFCharSet() + { + return "0"; + } + + /*! Used as header RTF general index */ + virtual QCString trRTFGeneralIndex() + { + return "Indeks"; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trClass(bool first_capital, bool singular) + { + QCString result((first_capital ? "Klas" : "klas")); + if (!singular) result+="se"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trFile(bool first_capital, bool singular) + { + QCString result((first_capital ? "Leër" : "leër")); + if (!singular) result+="s"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trNamespace(bool first_capital, bool singular) + { + QCString result((first_capital ? "Namespace" : "namespace")); + if (!singular) result+="s"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGroup(bool first_capital, bool singular) + { + QCString result((first_capital ? "Groep" : "groep")); + if (!singular) result+="e"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trPage(bool first_capital, bool singular) + { + QCString result((first_capital ? "Bladsy" : "bladsy")); + if (!singular) result+="e"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trMember(bool first_capital, bool singular) + { + QCString result((first_capital ? "Lid" : "lid")); + if (!singular) result = (first_capital ? "Lede" : "lede"); + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trField(bool first_capital, bool singular) + { + QCString result((first_capital ? "Veld" : "veld")); + if (!singular) result+="e"; + return result; + } + + /*! This is used for translation of the word that will possibly + * be followed by a single name or by a list of names + * of the category. + */ + virtual QCString trGlobal(bool first_capital, bool singular) + { + QCString result((first_capital ? "Global" : "global")); + if (!singular) result+="s"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.7 +////////////////////////////////////////////////////////////////////////// + + /*! This text is generated when the \\author command is used and + * for the author section in man pages. */ + virtual QCString trAuthor(bool first_capital, bool singular) + { + QCString result((first_capital ? "Outeur" : "outeur")); + if (!singular) result+="s"; + return result; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Verwysings"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implimenteer "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Geimplimenteer in "+trWriteList(numEntries)+"."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.16 +////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Inhoudsopgawe"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Verouderde Lys"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Events"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Event Dokumentasie"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Pakket Tipes"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Pakket Funksies"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Statiese Pakket Funksies"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Pakket Eienskappe"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Statiese Pakket Eienskappe"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.1 +////////////////////////////////////////////////////////////////////////// + + /*! Used in the quick index of a class/file/namespace member list page + * to link to the unfiltered list of all members. + */ + virtual QCString trAll() + { + return "Alle Lede"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "'n gebruiks diagram vir hierdie funksie:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.3 +////////////////////////////////////////////////////////////////////////// + + /*! When the search engine is enabled this text is put in the header + * of each page before the field where one can enter the text to search + * for. + */ + virtual QCString trSearchForIndex() + { + return "Soek vir"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Soektog Resultate"; + } + /*! This string is put just before listing the search results. The + * text can be different depending on the number of documents found. + * Inside the text you can put the special marker $num to insert + * the number representing the actual number of search results. + * The @a numDocuments parameter can be either 0, 1 or 2, where the + * value 2 represents 2 or more matches. HTML markup is allowed inside + * the returned string. + */ + virtual QCString trSearchResults(int numDocuments) + { + if (numDocuments==0) + { + return "Geen dokumente na gelang van jou navraag nie."; + } + else if (numDocuments==1) + { + return "Die soektog het <b>1</b> dokument gevind na gelang van jou navraag."; + } + else + { + return "Die soektog het <b>$num</b> documente gevind na gelang van jou navraag. " + "Begin met beste resultate."; + } + } + /*! This string is put before the list of matched words, for each search + * result. What follows is the list of words that matched the query. + */ + virtual QCString trSearchMatches() + { + return "Teikens:"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return filename + " Bron kode Leër"; + } + +}; + +#endif + diff --git a/src/util.cpp b/src/util.cpp index 9b89748..c1cd269 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -72,27 +72,6 @@ extern char **environ; //#define MAP_ALGO ALGO_COUNT //#define MAP_ALGO ALGO_CRC16 #define MAP_ALGO ALGO_MD5 - -//------------------------------------------------------------------------ - -struct LookupInfo -{ - LookupInfo(ClassDef *cd=0,MemberDef *td=0,QCString ts="") - : classDef(cd), typeDef(td), templSpec(ts) {} - ClassDef *classDef; - MemberDef *typeDef; - QCString templSpec; -}; - -static QCache<LookupInfo> g_lookupCache(20000,20000); - -// object that automatically initializes the cache at startup -class CacheInitializer -{ - public: - CacheInitializer() { g_lookupCache.setAutoDelete(TRUE); } -} g_cacheInitializer; - //------------------------------------------------------------------------ // TextGeneratorOLImpl implementation @@ -618,6 +597,10 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe bool isCached = md->isTypedefValCached(); // value already cached if (isCached) { + //printf("Already cached %s->%s\n", + // md->name().data(), + // md->getCachedTypedefVal()?md->getCachedTypedefVal()->name().data():"<none>"); + if (pTemplSpec) *pTemplSpec = md->getCachedTypedefTemplSpec(); return md->getCachedTypedefVal(); } QCString qname = md->qualifiedName(); @@ -638,32 +621,61 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,QCString *pTemplSpe } if (type.left(7)=="struct ") // strip leading "struct" { + type=type.mid(7); } else if (type.left(6)=="union ") // or strip leading "union" { + type=type.mid(6); } type=type.stripWhiteSpace(); // strip leading and trailing whitespace - ClassDef *result = getResolvedClassRec(md->getOuterScope(),fileScope,type,0,0); + MemberDef *memTypeDef = 0; + ClassDef *result = getResolvedClassRec(md->getOuterScope(), + fileScope,type,&memTypeDef,0); + // if type is a typedef than return what it resolves to. + if (memTypeDef) return newResolveTypedef(fileScope,memTypeDef,pTemplSpec); + //printf("type=%s result=%p\n",type.data(),result); if (result==0) { // try unspecialized version if type is template + int si=type.findRev("::"); int i=type.find('<'); - if (i!=-1) // typedef of a template => try the unspecialized version + if (si==-1 && i!=-1) // typedef of a template => try the unspecialized version { *pTemplSpec = type.mid(i); result = getResolvedClassRec(md->getOuterScope(),fileScope,type.left(i),0,0); } + else if (si!=-1) // A::B + { + i=type.find('<',si); + if (i==-1) // Something like A<T>::B => lookup A::B + { + i=type.length(); + } + else // Something like A<T>::B<S> => lookup A::B, spec=<S> + { + *pTemplSpec = type.mid(i); + } + result = getResolvedClassRec(md->getOuterScope(),fileScope, + stripTemplateSpecifiersFromScope(type.left(i),FALSE),0,0); + } } // remember computed value for next time - if (result && result->getDefFileName()!="<code>") + if (Doxygen::lookupCacheEnabled && result && result->getDefFileName()!="<code>") // this check is needed to prevent that temporary classes that are // introduced while parsing code fragments are being cached here. { //printf("setting cached typedef %p in result %p\n",md,result); //printf("==> %s (%s,%d)\n",result->name().data(),result->getDefFileName().data(),result->getDefLine()); - md->cacheTypedefVal(result); + if (pTemplSpec) + { + md->cacheTypedefVal(result,*pTemplSpec); + } + else + { + md->cacheTypedefVal(result,""); + } } g_resolvedTypedefs.remove(qname); // remove from the trace list @@ -839,7 +851,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) result= (i==-1) ? -1 : i+1; } done: - //g_lookupCache.insert(key,new int(result)); + //Doxygen::lookupCache.insert(key,new int(result)); return result; } @@ -971,7 +983,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition } } done: - //g_lookupCache.insert(key,new int(result)); + //Doxygen::lookupCache.insert(key,new int(result)); return result; } @@ -1031,9 +1043,9 @@ ClassDef *getResolvedClassRec(Definition *scope, // scope, the name to search for and the explicit scope prefix. The speedup // achieved by this simple cache can be enormous. QCString key=scope->name()+"+"+name+"+"+explicitScopePart; - LookupInfo *pval=g_lookupCache.find(key); + LookupInfo *pval=Doxygen::lookupCache.find(key); //printf("Searching for %s result=%p\n",key.data(),pval); - if (pval) + if (Doxygen::lookupCacheEnabled && pval) { if (pTemplSpec) *pTemplSpec=pval->templSpec; if (pTypeDef) *pTypeDef=pval->typeDef; @@ -1045,7 +1057,7 @@ ClassDef *getResolvedClassRec(Definition *scope, else // not found yet; we already add a 0 to avoid the possibility of // endless recursion. { - g_lookupCache.insert(key,new LookupInfo); + Doxygen::lookupCache.insert(key,new LookupInfo); } ClassDef *bestMatch=0; @@ -1100,7 +1112,7 @@ ClassDef *getResolvedClassRec(Definition *scope, QCString spec; minDistance=distance; bestMatch = newResolveTypedef(fileScope,md,&spec); - //printf(" bestTypeDef=%p\n",md); + //printf(" bestTypeDef=%p spec=%s\n",md,spec.data()); bestTypedef = md; bestTemplSpec = spec; } @@ -1122,7 +1134,7 @@ ClassDef *getResolvedClassRec(Definition *scope, *pTemplSpec = bestTemplSpec; } - pval=g_lookupCache.find(key); + pval=Doxygen::lookupCache.find(key); if (pval) { pval->classDef = bestMatch; @@ -1131,7 +1143,14 @@ ClassDef *getResolvedClassRec(Definition *scope, } else { - g_lookupCache.insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec)); + if (Doxygen::lookupCacheEnabled) + { + Doxygen::lookupCache.insert(key,new LookupInfo(bestMatch,bestTypedef,bestTemplSpec)); + } + else // remove the 0 key from the cache + { + Doxygen::lookupCache.remove(key); + } } //printf("] bestMatch=%s distance=%d\n", // bestMatch?bestMatch->name().data():"<none>",minDistance); @@ -1602,6 +1621,55 @@ int filterCRLF(char *buf,int len) return dest; // length of the valid part of the buf } + +/*! looks for a filter for the file \a name. Returns the name of the filter + * if there is a match for the file name, otherwise an empty string. + */ +QCString getFileFilter(const char* name) +{ + // sanity check + if (name==0) return ""; + + // first look for filter pattern list + QStrList& filterList = Config_getList("FILTER_PATTERNS"); + + if (filterList.isEmpty()) + { + // use INPUT_FILTER instead (For all files) + return Config_getString("INPUT_FILTER"); + } + + // compare the file name to the filter pattern list + QStrListIterator sli(filterList); + char* filterStr; + for(sli.toFirst(); (filterStr = sli.current()); ++sli) + { + QCString fs = filterStr; + int i_equals=fs.find('='); + + if (i_equals!=-1) + { + QCString filterPattern = fs.left(i_equals); + +#if defined(_WIN32) || defined(_OS_MAC_) // windows or mac + QRegExp fpat(filterPattern,FALSE,TRUE); // case insensitive match +#else // unix + QRegExp fpat(filterPattern,TRUE,TRUE); // case sensitive match +#endif + + if (fpat.match(name)!=-1) + { + // found a match! + QCString filterName = fs.mid(i_equals+1); + return filterName; + } + } + } + + // no match + return ""; +} + /*! reads a file with name \a name and returns it as a string. If \a filter * is TRUE the file will be filtered by any user specified input filter. * If \a name is "-" the string will be read from standard input. @@ -1641,7 +1709,8 @@ QCString fileToString(const char *name,bool filter) err("Error: file `%s' not found\n",name); return ""; } - if (Config_getString("INPUT_FILTER").isEmpty() || !filter) + QCString filterName = getFileFilter(name); + if (filterName.isEmpty() || !filter) { f.setName(name); fileOpened=f.open(IO_ReadOnly); @@ -1666,11 +1735,11 @@ QCString fileToString(const char *name,bool filter) } else // filter the input { - QCString cmd=Config_getString("INPUT_FILTER")+" \""+name+"\""; + QCString cmd=filterName+" \""+name+"\""; FILE *f=popen(cmd,"r"); if (!f) { - err("Error: could not execute filter %s\n",Config_getString("INPUT_FILTER").data()); + err("Error: could not execute filter %s\n",filterName.data()); return ""; } const int bSize=4096; @@ -104,6 +104,7 @@ bool getDefs(const QCString &scopeName, bool checkCV=FALSE ); +QCString getFileFilter(const char* name); bool resolveRef(/* in */ const char *scName, /* in */ const char *name, diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 7ad162d..ef9a490 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -955,8 +955,19 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) case Virtual: t << "virtual"; break; case Pure: t <<"pure-virtual"; break; } - t << "\">" << convertToXML(bcd->classDef->displayName()) - << "</basecompoundref>" << endl; + t << "\">"; + if (!bcd->templSpecifiers.isEmpty()) + { + convertToXML( + insertTemplateSpecifierInScope( + bcd->classDef->displayName(),bcd->templSpecifiers) + ); + } + else + { + convertToXML(bcd->classDef->displayName()); + } + t << "</basecompoundref>" << endl; } } if (cd->subClasses()->count()>0) |