diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2005-04-10 18:36:52 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2005-04-10 18:36:52 (GMT) |
commit | 570375c30adbdb66714d465d849b18e0df9dd6e6 (patch) | |
tree | a604824ba5bbf13dd607ebd57c1a426a0d225d58 /src | |
parent | 4fa6a6049a696a55520a0537192697798f29602d (diff) | |
download | Doxygen-570375c30adbdb66714d465d849b18e0df9dd6e6.zip Doxygen-570375c30adbdb66714d465d849b18e0df9dd6e6.tar.gz Doxygen-570375c30adbdb66714d465d849b18e0df9dd6e6.tar.bz2 |
Release-1.4.2-20050410
Diffstat (limited to 'src')
36 files changed, 2501 insertions, 2847 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l index 10973aa..c93b0c0 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -320,7 +320,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) copyToOutput(yytext,yyleng); BEGIN(CComment); } -<CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code") { /* start of a verbatim block */ +<CComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code")/[ \r\t\n] { /* start of a verbatim block */ copyToOutput(yytext,yyleng); g_blockName=&yytext[1]; g_lastCommentContext = YY_START; @@ -423,7 +423,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) copyToOutput(yytext,yyleng); BEGIN(g_readLineCtx); } -<CComment,ReadLine>("\\\\"|"@@")[~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command +<CComment,ReadLine>[\\@][\\@][~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command copyToOutput(yytext,yyleng); } <CComment,ReadLine>[\\@]"cond"[ \t]+ { // conditional section @@ -507,6 +507,7 @@ void replaceComment(int offset) */ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) { + //printf("convertCppComments(%s)\n",fileName); g_inBuf = inBuf; g_outBuf = outBuf; g_inBufPos = 0; diff --git a/src/commentscan.h b/src/commentscan.h index d954a93..9d7fe7b 100644 --- a/src/commentscan.h +++ b/src/commentscan.h @@ -19,7 +19,10 @@ #include "qtbc.h" #include "entry.h" -bool parseCommentBlock(/* in,out */ Entry *curEntry, +class ParserInterface; + +bool parseCommentBlock(/* in */ ParserInterface *parser, + /* in,out */ Entry *curEntry, /* in */ const QCString &comment, /* in */ const QCString &fileName, /* in */ int lineNr, diff --git a/src/commentscan.l b/src/commentscan.l index 225706b..bcbd296 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -44,6 +44,7 @@ #include "reflist.h" #include "code.h" #include "debug.h" +#include "parserintf.h" // forward declarations static void handleBrief(const QCString &); @@ -288,6 +289,7 @@ class GuardedSection * statics */ +static ParserInterface *langParser; // the language parser that is calling us static const char * inputString; // input string static int inputPosition; // read pointer static QCString yyFileName; // file name that is read from @@ -322,6 +324,7 @@ static QCString xrefListTitle; static Protection protection; static bool xrefAppendFlag; +static bool inGroupParamFound; //----------------------------------------------------------------------------- @@ -812,10 +815,11 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) BEGIN(ReadFormulaLong); } <Comment>{CMD}"{" { // begin of a group - handleGroupStartCommand(nameHeader); + langParser->handleGroupStartCommand(nameHeader); } <Comment>{CMD}"}" { // end of a group - handleGroupEndCommand(); + langParser->handleGroupEndCommand(); + nameHeader.resize(0); } <Comment>{CMD}[$@\\&~<>#%] { // escaped character addOutput(yytext); @@ -1507,12 +1511,15 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) current->groups->append( new Grouping(yytext, Grouping::GROUPING_INGROUP) ); - BEGIN( Comment ); + inGroupParamFound=TRUE; } <InGroupParam>{DOCNL} { // missing argument - warn(yyFileName,yyLineNr, - "Warning: Missing group name for \\ingroup command" - ); + if (!inGroupParamFound) + { + warn(yyFileName,yyLineNr, + "Warning: Missing group name for \\ingroup command" + ); + } if (*yytext=='\n') yyLineNr++; addOutput('\n'); BEGIN( Comment ); @@ -1530,7 +1537,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) <FnParam>{DOCNL} { // end of argument if (*yytext=='\n') yyLineNr++; addOutput('\n'); - parsePrototype(functionProto); + langParser->parsePrototype(functionProto); BEGIN( Comment ); } <FnParam>{LC} { // line continuation @@ -1558,7 +1565,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) else // overload declaration { makeStructuralIndicator(Entry::OVERLOADDOC_SEC); - parsePrototype(functionProto); + langParser->parsePrototype(functionProto); } BEGIN( Comment ); } @@ -1913,6 +1920,7 @@ static void handleEndIf(const QCString &) static void handleIngroup(const QCString &) { + inGroupParamFound=FALSE; BEGIN( InGroupParam ); } @@ -2010,7 +2018,8 @@ static void checkFormula() //---------------------------------------------------------------------------- -bool parseCommentBlock(/* in,out */ Entry *curEntry, +bool parseCommentBlock(/* in */ ParserInterface *parser, + /* in,out */ Entry *curEntry, /* in */ const QCString &comment, /* in */ const QCString &fileName, /* in */ int lineNr, @@ -2025,6 +2034,7 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry, initParser(); guards.setAutoDelete(TRUE); guards.clear(); + langParser = parser; current = curEntry; inputString = comment; if (inputString==0) return FALSE; // avoid empty strings diff --git a/src/compound.xsd b/src/compound.xsd index 367fdd0..561ab94 100644 --- a/src/compound.xsd +++ b/src/compound.xsd @@ -253,6 +253,7 @@ <xsd:complexType name="locationType"> <xsd:attribute name="file" type="xsd:string" /> <xsd:attribute name="line" type="xsd:integer" /> + <xsd:attribute name="bodyfile" type="xsd:string" /> <xsd:attribute name="bodystart" type="xsd:integer" /> <xsd:attribute name="bodyend" type="xsd:integer" /> </xsd:complexType> diff --git a/src/compound_xsd.h b/src/compound_xsd.h index 7766410..2d93a57 100644 --- a/src/compound_xsd.h +++ b/src/compound_xsd.h @@ -253,6 +253,7 @@ " <xsd:complexType name=\"locationType\">\n" " <xsd:attribute name=\"file\" type=\"xsd:string\" />\n" " <xsd:attribute name=\"line\" type=\"xsd:integer\" />\n" +" <xsd:attribute name=\"bodyfile\" type=\"xsd:string\" />\n" " <xsd:attribute name=\"bodystart\" type=\"xsd:integer\" />\n" " <xsd:attribute name=\"bodyend\" type=\"xsd:integer\" />\n" " </xsd:complexType>\n" diff --git a/src/definition.cpp b/src/definition.cpp index 5fb5092..64db73d 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -249,7 +249,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=getFileFilter(fileName)+" \""+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 66b0203..c3208eb 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -864,7 +864,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)) { //printf("resolveRef %s = %p (linkable?=%d)\n",g_token->name.data(),member,member ? member->isLinkable() : FALSE); - if (member) // member link + if (member && member->isLinkable()) // member link { children.append(new DocLinkedWord(parent,name, @@ -874,7 +874,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ) ); } - else // compound link + else if (compound->isLinkable()) // compound link { if (compound->definitionType()==Definition::TypeFile) { @@ -892,8 +892,12 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ) ); } + else // not linkable + { + children.append(new DocWord(parent,name)); + } } - else if (!g_insideHtmlLink && g_token->name.at(len-1)==':') + else if (!g_insideHtmlLink && len>1 && g_token->name.at(len-1)==':') { // special case, where matching Foo: fails to be an Obj-C reference, // but Foo itself might be linkable. diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 7a0ab82..5a6b965 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -65,6 +65,7 @@ #include "commentcnv.h" #include "cmdmapper.h" #include "searchindex.h" +#include "parserintf.h" #if defined(_MSC_VER) || defined(__BORLANDC__) #define popen _popen @@ -214,7 +215,16 @@ static void addRelatedPage(Entry *root) if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict[g->groupname])) break; } //printf("---> addRelatedPage() %s gd=%p\n",root->name.data(),gd); - PageDef *pd = addRelatedPage(root->name,root->args,root->doc,root->anchors, + QCString doc; + if (root->brief.isEmpty()) + { + doc=root->doc; + } + else + { + doc=root->brief+"\n\n"+root->doc; + } + PageDef *pd = addRelatedPage(root->name,root->args,doc,root->anchors, root->fileName,root->startLine, root->sli, gd,root->tagInfo @@ -2261,16 +2271,23 @@ static void buildFunctionList(Entry *root) rname=rname.right(rname.length()-root->parent->name.length()-2); } + NamespaceDef *nd = 0; bool isMember=FALSE; - int memIndex=rname.find("::"); + int memIndex=rname.findRev("::"); if (memIndex!=-1) { int ts=rname.find('<'); int te=rname.find('>'); if (ts==-1 || te==-1) { - NamespaceDef *nd = Doxygen::namespaceSDict.find(rname.left(memIndex)); - isMember=nd==0; + nd = Doxygen::namespaceSDict.find(rname.left(memIndex)); + isMember = nd==0; + if (nd) + { + // strip namespace scope from name + scope=rname.left(memIndex); + rname=rname.right(rname.length()-memIndex-2); + } } else { @@ -2288,7 +2305,7 @@ static void buildFunctionList(Entry *root) ) ) { - Debug::print(Debug::Functions,0,"--> member %s of class %s!\n", + Debug::print(Debug::Functions,0," --> member %s of class %s!\n", rname.data(),cd->name().data()); addMethodToClass(root,cd,rname,isFriend); } @@ -2308,26 +2325,25 @@ static void buildFunctionList(Entry *root) */ bool found=FALSE; MemberName *mn; - //MemberDef *fmd; + MemberDef *md=0; if ((mn=Doxygen::functionNameSDict[rname])) { - Debug::print(Debug::Functions,0,"--> function %s already found!\n",rname.data()); + Debug::print(Debug::Functions,0," --> function %s already found!\n",rname.data()); MemberNameIterator mni(*mn); - MemberDef *md; - for (mni.toFirst();((md=mni.current()) && !found);++mni) + for (mni.toFirst();(!found && (md=mni.current()));++mni) { - NamespaceDef *nd = md->getNamespaceDef(); + NamespaceDef *mnd = md->getNamespaceDef(); NamespaceDef *rnd = 0; if (!root->parent->name.isEmpty()) { rnd = getResolvedNamespace(root->parent->name); } - FileDef *fd = md->getFileDef(); + FileDef *mfd = md->getFileDef(); QCString nsName,rnsName; - if (nd) nsName = nd->name().copy(); + if (mnd) nsName = mnd->name().copy(); if (rnd) rnsName = rnd->name().copy(); - NamespaceSDict *unl = fd ? fd->getUsedNamespaces() : 0; - SDict<Definition> *ucl = fd ? fd->getUsedClasses() : 0; + NamespaceSDict *unl = mfd ? mfd->getUsedNamespaces() : 0; + SDict<Definition> *ucl = mfd ? mfd->getUsedClasses() : 0; //printf("matching arguments for %s%s %s%s\n", // md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data()); if ( @@ -2341,9 +2357,9 @@ static void buildFunctionList(Entry *root) } //printf("match!\n"); // see if we need to create a new member - found=(nd && rnd && nsName==rnsName) || // members are in the same namespace - ((nd==0 && rnd==0 && fd!=0 && // no external reference and - fd->absFilePath()==root->fileName // prototype in the same file + found=(mnd && rnd && nsName==rnsName) || // members are in the same namespace + ((mnd==0 && rnd==0 && mfd!=0 && // no external reference and + mfd->absFilePath()==root->fileName // prototype in the same file ) ); // otherwise, allow a duplicate global member with the same argument list @@ -2378,7 +2394,7 @@ static void buildFunctionList(Entry *root) md->setArgumentList(argList); } } - else if (!md->documentation().isEmpty() && !root->doc.isEmpty() && nd==rnd) + else if (!md->documentation().isEmpty() && !root->doc.isEmpty() && mnd==rnd) { warn(root->docFile,root->docLine,"Warning: member %s: ignoring the detailed description found here, since another one was found at line %d of file %s!",md->name().data(),md->docLine(),md->docFile().data()); } @@ -2387,7 +2403,7 @@ static void buildFunctionList(Entry *root) { md->setBriefDescription(root->brief,root->briefFile,root->briefLine); } - else if (!md->briefDescription().isEmpty() && !root->brief.isEmpty() && nd==rnd) + else if (!md->briefDescription().isEmpty() && !root->brief.isEmpty() && mnd==rnd) { warn(root->briefFile,root->briefLine,"Warning: member %s: ignoring the brief description found here, since another one was found at line %d of file %s!",md->name().data(),md->briefLine(),md->briefFile().data()); } @@ -2416,19 +2432,19 @@ static void buildFunctionList(Entry *root) } if (!found) /* global function is unique with respect to the file */ { + Debug::print(Debug::Functions,0," --> new function %s found!\n",rname.data()); //printf("New function type=`%s' name=`%s' args=`%s' bodyLine=%d\n", // root->type.data(),rname.data(),root->args.data(),root->bodyLine); // new global function ArgumentList *tArgList = root->tArgLists ? root->tArgLists->last() : 0; QCString name=removeRedundantWhiteSpace(rname); - MemberDef *md=new MemberDef( + md=new MemberDef( root->fileName,root->startLine, root->type,name,root->args,root->exception, root->protection,root->virt,root->stat,FALSE, MemberDef::Function,tArgList,root->argList); - md->setTagInfo(root->tagInfo); //md->setDefFile(root->fileName); //md->setDefLine(root->startLine); @@ -2446,27 +2462,26 @@ static void buildFunctionList(Entry *root) md->setMemberSpecifiers(root->memSpec); md->setMemberGroupId(root->mGrpId); - // see if the function is inside a namespace - NamespaceDef *nd = 0; - QCString scope; - if (root->parent->section == Entry::NAMESPACE_SEC ) + // see if the function is inside a namespace that was not part of + // the name already (in that case nd should be non-zero already) + if (nd==0 && root->parent->section == Entry::NAMESPACE_SEC ) { QCString nscope=removeAnonymousScopes(root->parent->name); if (!nscope.isEmpty()) { nd = getResolvedNamespace(nscope); - if (nd) - { - scope+=nd->name(); - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) - { - scope+="."; - } - else - { - scope+="::"; - } - } + } + } + + if (!scope.isEmpty()) + { + if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + { + scope = substitute(scope,"::",".")+"."; + } + else + { + scope+="::"; } } @@ -2518,7 +2533,6 @@ static void buildFunctionList(Entry *root) nd->insertMember(md); md->setNamespace(nd); } - if (fd) { // add member to the file (we do this even if we have already @@ -2551,7 +2565,14 @@ static void buildFunctionList(Entry *root) } else { - //printf("Function already found!\n"); + bool ambig; + FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); + if (fd) + { + // add member to the file (we do this even if we have already + // inserted it into the namespace) + fd->insertMember(md); + } } //printf("unrelated function %d `%s' `%s' `%s'\n", @@ -4215,7 +4236,7 @@ static bool findGlobalMember(Entry *root, } } } - if (!found) // no match + if (!found && !root->relatesDup) // no match { QCString fullFuncDecl=decl; if (root->argList) fullFuncDecl+=argListToString(root->argList); @@ -5297,6 +5318,15 @@ static void findMemberDocumentation(Entry *root) root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->memSpec,root->mGrpId ); bool isFunc=TRUE; + + if (root->relatesDup && !root->relates.isEmpty()) + { + QCString tmp = root->relates; + root->relates.resize(0); + findMemberDocumentation(root); + root->relates = tmp; + } + if ( // detect func variable/typedef to func ptr (i=findFunctionPtr(root->type,&l))!=-1 ) @@ -5669,27 +5699,30 @@ static void findEnumDocumentation(Entry *root) && root->name[0]!='@' // skip anonymous enums ) { - //printf("Found docs for enum with name `%s'\n",root->name.data()); + //printf("Found docs for enum with name `%s' in context %s\n", + // root->name.data(),root->parent->name.data()); int i; - ClassDef *cd=0; QCString name; - if ((i=root->name.findRev("::"))!=-1) // scope is specified + QCString scope; + if ((i=root->name.findRev("::"))!=-1) // scope is specified as part of the name { - QCString scope=root->name.left(i); // extract scope name=root->name.right(root->name.length()-i-2); // extract name - cd=getClass(scope); + scope=root->name.left(i); // extract scope //printf("Scope=`%s' Name=`%s'\n",scope.data(),name.data()); } - else // no scope, check the scope in which the docs where found + else // just the name { - if (( root->parent->section & Entry::COMPOUND_MASK ) - && !root->parent->name.isEmpty() - ) // found enum docs inside a compound - { - cd=getClass(root->parent->name); - } - name=root->name.copy(); + name=root->name; + } + if (( root->parent->section & Entry::SCOPE_MASK ) + && !root->parent->name.isEmpty() + ) // found enum docs inside a compound + { + if (!scope.isEmpty()) scope.prepend("::"); + scope.prepend(root->parent->name); } + ClassDef *cd=getClass(scope); + if (!name.isEmpty()) { bool found=FALSE; @@ -7270,7 +7303,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) } else { - QCString cmd=filterName+" \""+fileName+"\""; + QCString cmd="\""+filterName+"\" \""+fileName+"\""; FILE *f=popen(cmd,"r"); if (!f) { @@ -7339,8 +7372,7 @@ static void copyStyleSheet() } } -#ifdef USE_TMP_FILE - +#if 0 static void readFiles(const QCString &tmpFile) { QFile outFile(tmpFile); @@ -7386,36 +7418,27 @@ static void readFiles(const QCString &tmpFile) } } } +#endif -#else -//---------------------------------------------------------------------------- -// Reads a file to a string. -// The name of the file is written in front of the file's contents and -// between 0x06 markers - -static void readFiles(BufStr &output) +static void parseFiles(Entry *root) { + ParserInterface *defaultParser = new CLanguageScanner; + ParserManager *parserManager = new ParserManager(defaultParser); + + // register any additional parsers here... + QCString *s=inputFiles.first(); while (s) { QCString fileName=*s; + QCString extension; + int ei = fileName.findRev('.'); + if (ei!=-1) extension=fileName.right(fileName.length()-ei); - int fileNameSize=fileName.length(); - - //bool multiLineIsBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF"); - - BufStr tempBuf(20000); - //BufStr *bufPtr = multiLineIsBrief ? &output : &tempBuf; - BufStr *bufPtr = &tempBuf; + QFileInfo fi(fileName); + BufStr preBuf(fi.size()+4096); + BufStr *bufPtr = &preBuf; - // add begin filename marker - bufPtr->addChar(0x06); - // copy filename - bufPtr->addArray(fileName.data(),fileNameSize); - - // add end filename marker - bufPtr->addChar(0x06); - bufPtr->addChar('\n'); if (Config_getBool("ENABLE_PREPROCESSING")) { msg("Preprocessing %s...\n",s->data()); @@ -7429,14 +7452,18 @@ static void readFiles(BufStr &output) bufPtr->addChar('\n'); /* to prevent problems under Windows ? */ - convertCppComments(&tempBuf,&output,fileName); + BufStr convBuf(bufPtr->curPos()+1024); + + convertCppComments(&preBuf,&convBuf,fileName); + + convBuf.addChar('\0'); + + ParserInterface *parser = parserManager->getParser(extension); + parser->parse(fileName,convBuf.data(),root); s=inputFiles.next(); - //printf("-------> adding new line\n"); } - output.addChar(0); } -#endif //---------------------------------------------------------------------------- // Read all files matching at least one pattern in `patList' in the @@ -8285,14 +8312,15 @@ void parseInput() // strip trailing slashes if (path.at(l-1)=='\\' || path.at(l-1)=='/') path=path.left(l-1); - inputSize+=readFileOrDirectory(path,&Doxygen::inputNameList, + inputSize+=readFileOrDirectory( + path,&Doxygen::inputNameList, Doxygen::inputNameDict,&excludeNameDict, - &Config_getList("FILE_PATTERNS"), - &Config_getList("EXCLUDE_PATTERNS"), - &inputFiles,0, - alwaysRecursive, - TRUE, - killDict); + &Config_getList("FILE_PATTERNS"), + &Config_getList("EXCLUDE_PATTERNS"), + &inputFiles,0, + alwaysRecursive, + TRUE, + killDict); s=inputList.next(); } delete killDict; @@ -8466,8 +8494,7 @@ void parseInput() * Read Input Files * **************************************************************************/ -#ifdef USE_TMP_FILE - +#if 0 QCString tmpName = Config_getString("OUTPUT_DIRECTORY")+ "/doxygen_scratchfile.tmp"; @@ -8493,36 +8520,9 @@ void parseInput() // remove temp file QDir().remove(tmpName); - -#else // use memory to store intermediate results - - BufStr input(inputSize+1); // Add one byte extra for \0 termination - - // read and preprocess all input files - readFiles(input); - - if (input.isEmpty()) - { - err("No input read, no output generated!\n"); - delete root; - cleanUpDoxygen(); - exit(1); - } - else - { - msg("Read %d bytes\n",input.curPos()); - } - - root->program=input; - - msg("Parsing input...\n"); - parseMain(root); // build a tree of entries - - msg("Freeing input...\n"); - input.resize(0); - #endif - + parseFiles(root); + /************************************************************************** * Gather information * **************************************************************************/ diff --git a/src/doxygen.h b/src/doxygen.h index 418a680..78067ae 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -123,7 +123,4 @@ void readConfiguration(int argc, char **argv); void parseInput(); void generateOutput(); -//#undef USE_TMP_FILE -#define USE_TMP_FILE - #endif diff --git a/src/filedef.cpp b/src/filedef.cpp index fba0573..3895db4 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -97,6 +97,15 @@ FileDef::FileDef(const char *p,const char *nm, memberGroupSDict = new MemberGroupSDict; memberGroupSDict->setAutoDelete(TRUE); acquireFileVersion(); + + // members in the detailed part of the documentation + docDefineMembers.setInFile(TRUE); + docProtoMembers.setInFile(TRUE); + docTypedefMembers.setInFile(TRUE); + docEnumMembers.setInFile(TRUE); + docFuncMembers.setInFile(TRUE); + docVarMembers.setInFile(TRUE); + } /*! destroy the file definition */ @@ -675,6 +684,8 @@ void FileDef::addMembersToMemberGroup() void FileDef::insertMember(MemberDef *md) { //printf("%s:FileDef::insertMember(%s)\n",name().data(),md->name().data()); + if (allMemberList.find(md)!=-1) return; + allMemberList.append(md); bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS"); bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS"); @@ -1220,7 +1231,7 @@ void FileDef::acquireFileVersion() if (!vercmd.isEmpty()) { msg("Version of %s : ",filepath.data()); - FILE *f=popen(vercmd+" "+filepath,"r"); + FILE *f=popen("\""+vercmd+"\" \""+filepath+"\"","r"); if (!f) { err("Error: could not execute %s\n",vercmd.data()); diff --git a/src/filedef.h b/src/filedef.h index 6dcd726..0550074 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -178,7 +178,7 @@ class FileDef : public Definition MemberList decFuncMembers; MemberList decVarMembers; - // members in the documentation part of the documentation + // members in the detailed part of the documentation MemberList docDefineMembers; MemberList docProtoMembers; MemberList docTypedefMembers; diff --git a/src/groupdef.cpp b/src/groupdef.cpp index b3af64c..aa0f727 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -327,8 +327,8 @@ bool GroupDef::insertMember(MemberDef *md,bool docOnly) break; default: err("GroupDef::insertMembers(): " - "member `%s' with class scope `%s' inserted in group scope `%s'!\n", - md->name().data(), + "member `%s' (typeid=%d) with scope `%s' inserted in group scope `%s'!\n", + md->name().data(),md->memberType(), md->getClassDef() ? md->getClassDef()->name().data() : "", name().data()); } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index a435d61..21b656b 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1368,7 +1368,9 @@ void HtmlGenerator::writeLineNumber(const char *ref,const char *file, } else { + startCodeAnchor(lineAnchor); codify(lineNumber); + endCodeAnchor(); } codify(" "); } diff --git a/src/index.cpp b/src/index.cpp index a270a1b..07c77f6 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2704,7 +2704,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) MemberDef *md=members->first(); while (md) { - if (md->isDetailedSectionVisible(TRUE)) + if (md->isDetailedSectionVisible(TRUE,FALSE)) { if (first) { diff --git a/src/lang_cfg.h b/src/lang_cfg.h index e44d5f5..d99d747 100644 --- a/src/lang_cfg.h +++ b/src/lang_cfg.h @@ -2,6 +2,7 @@ #define LANG_SE #define LANG_CZ #define LANG_FR +#define LANG_ID #define LANG_IT #define LANG_DE #define LANG_JP diff --git a/src/language.cpp b/src/language.cpp index 8b8f426..b6e12f2 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -34,6 +34,9 @@ #ifdef LANG_FR #include "translator_fr.h" #endif +#ifdef LANG_ID +#include "translator_id.h" +#endif #ifdef LANG_IT #include "translator_it.h" #endif @@ -165,6 +168,12 @@ bool setTranslator(const char *langName) theTranslator=new TranslatorFrench; } #endif +#ifdef LANG_ID + else if (L_EQUAL("indonesian")) + { + theTranslator=new TranslatorIndonesian; + } +#endif #ifdef LANG_IT else if (L_EQUAL("italian")) { diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index 55b97ab..58b135f 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -100,6 +100,7 @@ HEADERS = bufstr.h \ translator_gr.h \ translator_hr.h \ translator_hu.h \ + translator_id.h \ translator_it.h \ translator_je.h \ translator_jp.h \ diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 0377bb7..7449569 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -676,13 +676,22 @@ void MemberDef::setDefinitionTemplateParameterLists(QList<ArgumentList> *lists) } void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *, - FileDef *,GroupDef *gd) + FileDef *fd,GroupDef *gd,bool onlyText) { QCString sep = Config_getBool("OPTIMIZE_OUTPUT_JAVA") ? "." : "::"; QCString n = name(); if (classDef && gd) n.prepend(classDef->name()+sep); - else if (nspace && gd) n.prepend(nspace->name()+sep); - ol.writeObjectLink(getReference(),getOutputFileBase(),anchor(),n); + else if (nspace && (gd || fd)) n.prepend(nspace->name()+sep); + if (!onlyText) // write link + { + ol.writeObjectLink(getReference(),getOutputFileBase(),anchor(),n); + } + else // write only text + { + ol.startBold(); + ol.docify(n); + ol.endBold(); + } } /*! If this member has an anonymous class/struct/union as its type, then @@ -901,10 +910,10 @@ void MemberDef::writeDeclaration(OutputList &ol, QCString cname = d->name(); QCString cfname = getOutputFileBase(); - QCString osname = cname; + //QCString osname = cname; // in case of class members that are put in a group the name of the outerscope // differs from the cname. - if (getOuterScope()) osname=getOuterScope()->name(); + //if (getOuterScope()) osname=getOuterScope()->name(); HtmlHelp *htmlHelp=0; bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); @@ -942,6 +951,7 @@ void MemberDef::writeDeclaration(OutputList &ol, } } + // *** write template lists if (tArgList) { if (!isAnonymous) ol.startMemberTemplateParams(); @@ -949,10 +959,9 @@ void MemberDef::writeDeclaration(OutputList &ol, if (!isAnonymous) ol.endMemberTemplateParams(); } + // *** write type QCString ltype(type); if (mtype==Typedef) ltype.prepend("typedef "); - // strip `static' keyword from ltype - //if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7); // strip `friend' keyword from ltype if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7); static QRegExp r("@[0-9]+"); @@ -1034,7 +1043,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.insertMemberAlign(tArgList!=0); } - // write name + // *** write name if (!name().isEmpty() && name().at(0)!='@') // hide annonymous stuff { //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable()); @@ -1074,12 +1083,13 @@ void MemberDef::writeDeclaration(OutputList &ol, // descriptions are enabled or there is no detailed description. { if (annMemb) annMemb->annUsed=annUsed=TRUE; - ol.startBold(); - ol.docify(name()); - ol.endBold(); + ClassDef *rcd = cd; + if (isReference() && classDef) rcd = classDef; + writeLink(ol,rcd,nd,fd,gd,TRUE); } } + // *** write arguments if (argsString() && !isObjCMethod()) { if (!isDefine()) ol.writeString(" "); @@ -1087,12 +1097,14 @@ void MemberDef::writeDeclaration(OutputList &ol, linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),argsString()); } + // *** write exceptions if (excpString()) { ol.writeString(" "); ol.docify(excpString()); } + // *** write bitfields if (!bitfields.isEmpty()) // add bitfields { linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),bitfields.simplifyWhiteSpace()); @@ -1113,6 +1125,7 @@ void MemberDef::writeDeclaration(OutputList &ol, linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),init); } } + if (isObjCMethod() && isImplementation()) { ol.startTypewriter(); @@ -1217,11 +1230,13 @@ bool MemberDef::isDetailedSectionLinkable() const return ((docFilter && staticFilter && privateFilter && friendCompoundFilter) /*|| inAnonymousScope*/); } -bool MemberDef::isDetailedSectionVisible(bool inGroup) const +bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const { bool groupFilter = getGroupDef()==0 || inGroup; + bool fileFilter = getNamespaceDef()==0 || !inFile; - bool visible = isDetailedSectionLinkable() && groupFilter && !isReference(); + bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter && + !isReference(); //printf("MemberDef::isDetailedSectionVisible() %d\n",visible); return visible; } @@ -1237,7 +1252,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { // if this member is in a group find the real scope name. bool hasParameterList = FALSE; - bool hasDocs = isDetailedSectionVisible(inGroup); + bool inFile = container->definitionType()==Definition::TypeFile; + bool hasDocs = isDetailedSectionVisible(inGroup,inFile); //printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d\n", // name().data(),hasDocs,container->definitionType(),inGroup); if ( !hasDocs ) return; @@ -1287,6 +1303,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, int i=0,l; static QRegExp r("@[0-9]+"); + //---------------------------------------- ol.pushGeneratorState(); @@ -1398,6 +1415,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } } } + ol.startMemberDocName(isObjCMethod()); if (cd && cd->isObjectiveC()) { @@ -1431,7 +1449,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, //printf("end >%s< i=%d\n",ldef.data(),i); if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- "); } + linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef); + hasParameterList=writeDefArgumentList(ol,cd,scopeName,this); if (hasOneLineInitializer()) // add initializer { @@ -1865,6 +1885,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, //if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex); ol.popGeneratorState(); + //------------------------------------------------ + if (!Config_getBool("EXTRACT_ALL") && Config_getBool("WARN_IF_UNDOCUMENTED") && Config_getBool("WARN_NO_PARAMDOC")) diff --git a/src/memberdef.h b/src/memberdef.h index d40fff2..545bf7f 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -153,7 +153,7 @@ class MemberDef : public Definition bool isLinkable() const; bool hasDocumentation() const; // overrides hasDocumentation in definition.h bool isBriefSectionVisible() const; - bool isDetailedSectionVisible(bool inGroup=FALSE) const; + bool isDetailedSectionVisible(bool inGroup,bool inFile) const; bool isDetailedSectionLinkable() const; bool isDocumentedFriendClass() const; @@ -185,8 +185,6 @@ class MemberDef : public Definition void setTagInfo(TagInfo *i); // output generation - void writeLink(OutputList &ol, - ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); void writeDeclaration(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, bool inGroup); @@ -308,6 +306,10 @@ class MemberDef : public Definition bool visited; private: + void writeLink(OutputList &ol, + ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, + bool onlyText=FALSE); + ClassDef *classDef; // member of or related to FileDef *fileDef; // member of file definition MemberDef *enumScope; // the enclosing scope, if this is an enum field diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 87a3974..97022d5 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -32,6 +32,7 @@ MemberList::MemberList() : QList<MemberDef>() m_numDecMembers=-1; // special value indicating that computation is needed m_numDocMembers=-1; // special value indicating that computation is needed m_inGroup=FALSE; + m_inFile=FALSE; } MemberList::~MemberList() @@ -124,7 +125,7 @@ void MemberList::countDocMembers() MemberDef *md; for (mli.toFirst();(md=mli.current());++mli) { - if (md->isDetailedSectionVisible(m_inGroup)) + if (md->isDetailedSectionVisible(m_inGroup,m_inFile)) { // do not count enum values, since they do not produce entries of their own if (md->memberType()!=MemberDef::EnumValue) m_numDocMembers++; diff --git a/src/memberlist.h b/src/memberlist.h index c834fdc..1089224 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -57,7 +57,8 @@ class MemberList : public QList<MemberDef> void writeDocumentationPage(OutputList &ol, const char *scopeName, Definition *container); void addMemberGroup(MemberGroup *mg); - void setInGroup(bool group) { m_inGroup=group; } + void setInGroup(bool inGroup) { m_inGroup=inGroup; } + void setInFile(bool inFile) { m_inFile=inFile; } void addListReferences(Definition *def); void findSectionsInDocumentation(); MemberGroupList *getMemberGroupList() const { return memberGroupList; } @@ -68,7 +69,8 @@ class MemberList : public QList<MemberDef> int m_numDecMembers; // number of members in the brief part of the memberlist int m_numDocMembers; // number of members in the detailed part of the memberlist MemberGroupList *memberGroupList; - bool m_inGroup; // is this list part of a group + bool m_inGroup; // is this list part of a group definition + bool m_inFile; // is this list part of a file definition }; class MemberListIterator : public QListIterator<MemberDef> diff --git a/src/parserintf.h b/src/parserintf.h new file mode 100644 index 0000000..39ff310 --- /dev/null +++ b/src/parserintf.h @@ -0,0 +1,106 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2005 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. + * + */ + +#ifndef PARSERINTF_H +#define PARSERINTF_H + +#include <qdict.h> + +class Entry; + +/** \brief Abstract interface for programming language parsers. + * + * By implementing the methods of this interface one can add + * a new language parser to doxygen. The parser can make use of the + * comment block parser to parse the contents of special comment blocks. + */ +class ParserInterface +{ + public: + /** Parses a single file. + * @param[in] fileName The full name of the file. + * @param[in] fileBuf The contents of the file (zero terminated). + * @param[in,out] root The root of the tree of Entry *nodes + * representing the information extracted from the file. + */ + virtual void parse(const char *fileName,const char *fileBuf,Entry *root) = 0; + + /** Callback function called by the comment block scanner. + * It provides a string \a text containing the prototype of a function + * or variable. The parser should parse this and store the information + * in the Entry node that corresponds with the node for which the + * comment block parser was invoked. + */ + virtual void parsePrototype(const char *text) = 0; + + /** Callback function called by the comment block scanner upon encountering + * a group block start command (@@{). If the group has a header + * specified via the @@name command, this will be passed via + * the \a header parameter, if not the \a header parameter will be 0. + */ + virtual void handleGroupStartCommand(const char *header) = 0; + + /** Callback function called by the comment block scanner upon encountering + * a group block end command (@@}). + */ + virtual void handleGroupEndCommand() = 0; +}; + +/** \brief Manages programming language parsers. + * + * This class manages the language parsers in the system. One can + * register parsers, and obtain a parser given a file extension. + */ +class ParserManager +{ + public: + /** Creates the parser manager object. + * @param defaultParser The default parser that is used when + * no explicit extension has been register for + * a given input file. + */ + ParserManager(ParserInterface *defaultParser) + : m_defaultParser(defaultParser) {} + + /** Registers a new parser. + * @param[in] extension The file extension that will trigger + * the use of this parser (e.g. ".py", or ".bas"). + * @param[in] parser The parser that is to be used for the + * given extension. + */ + void registerParser(const char *extension,ParserInterface *parser) + { + m_parsers.insert(extension,parser); + } + + /** Gets the interface to the parser associated with given \a extension, + * if there is no parser explicitly registered for the supplied extension, + * the interface to the default parser will be returned. + */ + ParserInterface *getParser(const char *extension) + { + if (extension==0) return m_defaultParser; + ParserInterface *intf = m_parsers.find(extension); + return intf ? intf : m_defaultParser; + } + + private: + QDict<ParserInterface> m_parsers; + ParserInterface *m_defaultParser; +}; + +#endif @@ -195,7 +195,7 @@ static FILE *checkAndOpenFile(const QCString &absName) QCString filterName = getFileFilter(absName); if (!filterName.isEmpty()) { - QCString cmd = filterName+" \""+absName+"\""; + QCString cmd = "\"" + filterName+"\" \""+absName+"\""; f=popen(cmd,"r"); if (!f) err("Error: could not execute filter %s\n",cmd.data()); } @@ -1779,7 +1779,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } <SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ { outputArray(yytext,yyleng); - g_blockName=&yytext[1]; + g_blockName=QCString(&yytext[1]).stripWhiteSpace(); BEGIN(SkipVerbatim); } <SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode") { /* end of verbatim block */ @@ -1789,7 +1789,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN(SkipCComment); } } -<SkipCComment,SkipVerbatim>[^*\x06\n\/]+ { +<SkipCComment,SkipVerbatim>[^*\\@\x06\n\/]+ { outputArray(yytext,yyleng); } <SkipCComment,SkipVerbatim>\n { @@ -2235,7 +2235,7 @@ void preprocessFile(const char *fileName,BufStr &output) } else { - QCString cmd = inputFilter+" \""+fileName+"\""; + QCString cmd = "\"" + inputFilter+"\" \""+fileName+"\""; preYYin = popen(cmd,"r"); if (!preYYin) { diff --git a/src/scanner.h b/src/scanner.h index 36abd4d..2dbbf4e 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -18,13 +18,31 @@ #ifndef SCANNER_H #define SCANNER_H +#include "parserintf.h" + +/** \brief C-like language parser using state-based lexical scanning. + * + * This is the language parser for doxygen. It is somewhat fuzzy and + * supports C++ and various languages that are closely related to C++, + * such as C,C#,Objective-C,Java,PHP,and IDL. + */ +class CLanguageScanner : public ParserInterface +{ + public: + void parse(const char *fileName,const char *fileBuf,Entry *root); + void parsePrototype(const char *text); + void handleGroupStartCommand(const char *header); + void handleGroupEndCommand(); +}; + +#if 0 + #include "qtbc.h" class OutputList; class Entry; // Public interface provided by the language scanner -void parseMain(Entry *); void parseMain(Entry *,const char *fileName); // Internal callback interface for comment block scanner @@ -33,3 +51,5 @@ void handleGroupStartCommand(const char *header); void handleGroupEndCommand(); #endif + +#endif diff --git a/src/scanner.l b/src/scanner.l index c68e351..6f12f8a 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -34,61 +34,40 @@ #include "scanner.h" #include "entry.h" -#include "doxygen.h" #include "message.h" #include "config.h" +#include "doxygen.h" #include "util.h" -#include "index.h" #include "defargs.h" #include "language.h" -#include "outputlist.h" -#include "membergroup.h" -#include "reflist.h" -#include "code.h" #include "commentscan.h" -#define COMMENTSCAN - #define YY_NEVER_INTERACTIVE 1 /* ----------------------------------------------------------------- * * statics */ +static ParserInterface *g_thisParser; static const char * inputString; static int inputPosition; static QFile inputFile; static int lastContext; static int lastCContext; static int lastDocContext; -static int lastDocRelContext; -static int lastDocRelAlsoContext; static int lastCPPContext; static int lastSkipSharpContext; static int lastSkipRoundContext; -static int lastBriefContext; -static int lastVerbState; static int lastStringContext; static int lastCurlyContext; static int lastRoundContext; static int lastSquareContext; -static int lastCodeState; -static int lastAfterDocContext; -static int lastGroupContext; -static int lastFormulaContext; -static int lastAnchorContext; +//static int lastAfterDocContext; static int lastInitializerContext; static int lastClassTemplSpecContext; -static int lastSkipHtmlCommentContext; -static int lastIfContext; -static int lastInternalDocContext; static int lastPreLineCtrlContext; static int lastSkipVerbStringContext; static int lastCommentInArgContext; -static int lastFileDocContext; -static int lastSectionContext; -static int nextDefContext; -static int overloadContext; static Protection protection; static Protection baseProt; static int sharpCount = 0 ; @@ -96,7 +75,6 @@ static int roundCount = 0 ; static int curlyCount = 0 ; static int squareCount = 0 ; static int padCount = 0 ; -static int slStartContext = 0; static QCString slString; static Entry* current_root = 0 ; static Entry* global_root = 0 ; @@ -105,7 +83,7 @@ static Entry* previous = 0 ; static Entry* tempEntry = 0 ; static int yyLineNr = 1 ; static int anonCount = 0 ; -static char yyFileName[4096] ; +static QCString yyFileName; static int lastMemberGroupLine; static MethodTypes mtype; static bool gstat; @@ -117,7 +95,7 @@ static int memberGroupId = DOX_NOGROUP; static QCString memberGroupHeader; static QCString memberGroupDocs; static bool isTypedef; -static char afterDocTerminator; +//static char afterDocTerminator; static int tmpDocType; static QCString sectionLabel; static QCString sectionTitle; @@ -154,7 +132,6 @@ static char lastCopyArgChar; static QCString *pCopyRoundString; static QCString *pCopyCurlyString; static QCString *pCopyQuotedString; -static QCString *pSkipDoc; static QCString *pSkipVerbString; static QStack<Grouping> autoGroupStack; static Grouping lastDefGroup( "", Grouping::GROUPING_LOWEST ); @@ -188,6 +165,12 @@ static char docBlockTerm; //----------------------------------------------------------------------------- +// forward declarations +static void handleGroupStartCommand(const char *header); +static void handleGroupEndCommand(); + +//----------------------------------------------------------------------------- + static void initParser() { sectionLabel.resize(0); @@ -218,7 +201,10 @@ static void initParser() static void initEntry() { - if (insideJava) protection = Package; + if (insideJava) + { + protection = current_root->section==Entry::INTERFACE_SEC ? Public : Package; + } current->protection = protection ; current->mtype = mtype; current->virt = virt; @@ -268,9 +254,6 @@ static int newMemberGroupId() } // forward declarations -#ifndef COMMENTSCAN -static void startGroup(); -#endif static void startGroupInDoc(); static void endGroup(); @@ -314,8 +297,6 @@ static QCString stripQuotes(const char *s) return name; } -static void newDocState(); - //----------------------------------------------------------------- static void addMemberGroupDocs() @@ -343,96 +324,6 @@ static void startCommentBlock(bool); static void handleCommentBlock(const QCString &doc,bool brief); //----------------------------------------------------------------- -static void addXRefItem(bool inBody,const char *listName,const char *itemTitle,const char *listTitle) -{ - Entry *docEntry = inBody && previous ? previous : current; - //printf("docEntry=%p\n",docEntry); - if (listName==0) return; - - //printf("addXRefItem(%s,%s,%s)\n",listName,itemTitle,listTitle); - ListItemInfo *lii=0; - RefList *refList = Doxygen::xrefLists->find(listName); - if (refList==0) // new list - { - refList = new RefList(listName,listTitle,itemTitle); - Doxygen::xrefLists->insert(listName,refList); - //printf("new list!\n"); - } - if (docEntry->sli) - { - QListIterator<ListItemInfo> slii(*docEntry->sli); - for (slii.toFirst();(lii=slii.current());++slii) - { - if (strcmp(lii->type,listName)==0) - { - //printf("found %s lii->type=%s\n",listName,lii->type); - break; - } - } - } -#if 0 // with this code multiple @todo items can be put under the same - // heading, I removed it because it changes the text flow. - if (lii) // already found item of same type before - { - //printf("listName=%s item id = %d existing\n",listName,lii->itemId); - RefItem *item = refList->getRefItem(lii->itemId); - ASSERT(item!=0); - item->text += " <p>"; - item->text += current->brief; - //printf("%s: text +=%s\n",listName,item->text.data()); - } - else // new item -#endif - { - int itemId = refList->addRefItem(); - //printf("listName=%s item id = %d new current=%p\n",listName,itemId,current); - - // if we have already an item from the same list type (e.g. a second @todo) - // in the same Entry (i.e. lii!=0) then we reuse its link anchor. - char anchorLabel[1024]; - sprintf(anchorLabel,"_%s%06d",listName,lii ? lii->itemId : itemId); - RefItem *item = refList->getRefItem(itemId); - ASSERT(item!=0); - item->text = current->brief; - item->listAnchor = anchorLabel; - docEntry->addSpecialListItem(listName,itemId); - QCString cmdString; - cmdString.sprintf("\\xrefitem %s %d\n",listName,itemId); - docEntry->doc += cmdString; - SectionInfo *si=new SectionInfo(listName,anchorLabel, - sectionTitle,SectionInfo::Anchor); - Doxygen::sectionDict.insert(anchorLabel,si); - docEntry->anchors->append(si); - } - current->brief = slString; // restore orginial brief desc. -} - -//----------------------------------------------------------------------------- - -// Adds a formula text to the list/dictionary of formulas if it was -// not already added. Returns the label of the formula. -static QCString addFormula() -{ - QCString formLabel; - QCString fText=formulaText.simplifyWhiteSpace(); - Formula *f=0; - if ((f=Doxygen::formulaDict[fText])==0) - { - f = new Formula(fText); - Doxygen::formulaList.append(f); - Doxygen::formulaDict.insert(fText,f); - formLabel.sprintf("\\form#%d",f->getId()); - Doxygen::formulaNameDict.insert(formLabel,f); - } - else - { - formLabel.sprintf("\\form#%d",f->getId()); - } - return formLabel; -} - -//----------------------------------------------------------------------------- - static bool nameIsOperator(QCString &name) { int i=name.find("operator"); @@ -444,32 +335,6 @@ static bool nameIsOperator(QCString &name) //----------------------------------------------------------------------------- -static void checkFormula() -{ - if (insideFormula) - { - warn(yyFileName,yyLineNr,"Warning: End of comment block while inside formula."); - } -} - -//----------------------------------------------------------------------------- - -static void checkDocs() -{ - checkFormula(); - if ((current->brief.length()>2 && - current->brief.at(0)=='<' && current->brief.at(1)==' ') || - (current->doc.length()>2 && - current->doc.at(0)=='<' && current->doc.at(1)==' ') - ) - { - warn(yyFileName,yyLineNr,"Warning: Found lonely '<' symbol at the start of the documentation."); - - } -} - -//----------------------------------------------------------------------------- - static void setContext() { QCString fileName = yyFileName; @@ -486,7 +351,10 @@ static void setContext() { useOverrideCommands = TRUE; } - //printf("setContext(%s) insideIDL=%d\n",yyFileName,insideIDL); + //printf("setContext(%s) insideIDL=%d insideJava=%d insideCS=%d " + // "insideD=%d insidePHP=%d insideObjC=%d\n", + // yyFileName.data(),insideIDL,insideJava,insideCS,insideD,insidePHP,insideObjC + // ); } //----------------------------------------------------------------------------- @@ -663,14 +531,12 @@ static void addKnRArgInfo(const QCString &type,const QCString &name, static int yyread(char *buf,int max_size) { int c=0; -#ifdef USE_TMP_FILE if (g_inputFromFile) { c = inputFile.readBlock(buf,max_size); if (c==-1) yy_fatal_error("input in flex scanner failed"); } else -#endif { while( c < max_size && inputString[inputPosition] ) { @@ -717,6 +583,7 @@ IDLATTR ("["[^\]]*"]"){BN}* %option noyywrap /* language parsing states */ + %x Define %x DefineEnd %x CompoundName @@ -806,88 +673,20 @@ IDLATTR ("["[^\]]*"]"){BN}* %x FuncFunc %x FuncFuncEnd %x FuncFuncType - - - /* comment parsing states. - * What can happen in while parsing a comment block: - * commands (e.g. @page, or \page) - * escaped commands (e.g. @@page or \\page). - * directories (e.g. \doxygen\src\) - * HTML commands (e.g. <PRE>...</PRE>) - * autolists. - * newlines. - * words and whitespace and other characters (#,?!, etc). - */ - /* start states. TODO: reduce to one state */ -%x Doc -%x JavaDoc -%x LineDoc -%x AfterDoc -%x AfterDocBrief -%x AfterDocLine - /* internal states */ - /* page related */ -%x PageDoc -%x PageDocTitle -%x PageDocArg1 -%x PageDocArg2 -%x ExampleDocArg1 - -%x ClassDoc -%x DefLineDoc -%x SkipSection -%x IfGuard -%x IfNotGuard -%x NameSpaceDocArg1 -%x PackageDocArg1 -%x SkipCode -%x ClassDocArg1 -%x CategoryDocArg1 -%x ClassDocArg2 -%x ClassDocArg3 -%x ClassDocFunc -%x ClassDocFuncPtr -%x ClassDocFuncQual -%x ClassDocFuncSkipLine -%x ClassDocFuncExc -%x ClassDocDefine -%x ClassDocRelates -%x ClassDocRelatesAlso -%x ClassDocBrief -%x ClassDocOverload -%x ClassDefineArgs -%x DocInternal -%x DocInternalLine -%x DocBaseClass -%x GroupDocArg1 -%x GroupDocArg2 -%x GroupName -%x GroupHeader -%x StoreGroupDocs -%x FileDocArg1 -%x FileDocArg2 -%x EnumDocArg1 -%x SkipVerbatim -%x TodoParam -%x TestParam -%x BugParam -%x DeprecatedParam -%x XRefItemParam1 -%x XRefItemParam2 -%x XRefItemParam3 -%x XRefItemParam4 -%x SectionLabel -%x SectionTitle %x CopyArgString %x CopyArgPHPString %x CopyArgRound %x CopyArgSharp %x CopyArgComment %x CopyArgCommentLine -%x SkipHtmlComment -%x ReadFormulaShort -%x ReadFormulaLong -%x AnchorLabel + + /** Prototype scanner states */ + +%x Prototype +%x PrototypePtr +%x PrototypeQual +%x PrototypeExc +%x PrototypeSkipLine /** new comment parsing states */ @@ -897,43 +696,6 @@ IDLATTR ("["[^\]]*"]"){BN}* %% -<*>\x06[^\x06]*\x06 { // new file - if (YY_START==Comment) - { - warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?"); - } - if (memberGroupId!=DOX_NOGROUP) - { - warn(yyFileName,yyLineNr,"Warning: Missing //@}"); - memberGroupId=DOX_NOGROUP; - } - yyLineNr= 0 ; // there is always an extra newline at the start of the file - int i; - for( i = 0 ; yytext[i+1] != 6 ; i++ ) - yyFileName[i] = yytext[i+1] ; - yyFileName[i] = 0 ; - setContext(); - msg("Parsing file %s...\n",yyFileName); - current_root = global_root ; - initParser(); - current->reset(); - int sec=guessSection(yyFileName); - if (sec) - { - current->name = yyFileName; - current->section = sec; - current_root->addSubEntry(current); - current = new Entry; - } - if ( insidePHP ) - { - BEGIN( FindMembersPHP ); - } - else - { - BEGIN( FindMembers ); - } - } <NextSemi>"{" { curlyCount=0; needsSemi = TRUE; @@ -1224,7 +986,8 @@ IDLATTR ("["[^\]]*"]"){BN}* unput(';'); BEGIN( Function ); } -<ObjCMethod,ObjCParams>"{" { // start of a method body +<ObjCMethod,ObjCParams>(";"{BN}+)?"{" { // start of a method body + lineCount(); //printf("Type=%s Name=%s args=%s\n", // current->type.data(),current->name.data(),argListToString(current->argList).data() // ); @@ -1618,7 +1381,7 @@ IDLATTR ("["[^\]]*"]"){BN}* initEntry(); BEGIN(Using); } -<UsingDirective>{SCOPENAME} { current->name=yytext; +<UsingDirective>{SCOPENAME} { current->name=removeRedundantWhiteSpace(yytext); current->fileName = yyFileName; current->section=Entry::USINGDIR_SEC; current_root->addSubEntry(current); @@ -1915,7 +1678,7 @@ IDLATTR ("["[^\]]*"]"){BN}* BEGIN( PreLineCtrl ); } <PreLineCtrl>"\""[^\n\"]*"\"" { - strncpy(yyFileName,stripQuotes(yytext),4096); + yyFileName = stripQuotes(yytext); } <PreLineCtrl>. {} <PreLineCtrl>\n { @@ -2018,7 +1781,6 @@ IDLATTR ("["[^\]]*"]"){BN}* { current->bodyLine=yyLineNr; } -#ifdef COMMENTSCAN docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF"); @@ -2034,37 +1796,9 @@ IDLATTR ("["[^\]]*"]"){BN}* startCommentBlock(FALSE); BEGIN( DocBlock ); } -#else - lastAfterDocContext = YY_START; - afterDocTerminator = ';'; - if (yytext[yyleng-3]=='/') - { - current->brief.resize(0); - current->briefLine = yyLineNr; - current->briefFile = yyFileName; - BEGIN(AfterDocLine); - } - else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) - { - current->brief.resize(0); - current->briefLine = yyLineNr; - current->briefFile = yyLineNr; - current->docLine = yyLineNr; - current->docFile = yyFileName; - BEGIN(AfterDocBrief); - } - else - { - current->doc.resize(0); - current->docLine = yyLineNr; - current->docFile = yyFileName; - BEGIN(AfterDoc); - } -#endif } <MemberSpec,FindFields,FindMembers,NextSemi,BitFields,ReadInitializer,OldStyleArgs>","{BN}*("/**"|"//!"|"/*!"|"///")"<" { lineCount(); -#ifdef COMMENTSCAN docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF"); @@ -2080,69 +1814,31 @@ IDLATTR ("["[^\]]*"]"){BN}* startCommentBlock(FALSE); BEGIN( DocBlock ); } -#else - lastAfterDocContext = YY_START; - afterDocTerminator = ','; - if (yytext[yyleng-3]=='/') - { - current->brief.resize(0); - current->briefLine = yyLineNr; - current->briefFile = yyLineNr; - BEGIN(AfterDocLine); - } - else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) - { - current->brief.resize(0); - current->briefLine = yyLineNr; - current->briefFile = yyLineNr; - current->docLine = yyLineNr; - current->docFile = yyFileName; - BEGIN(AfterDocBrief); - } - else - { - current->doc.resize(0); - current->docLine = yyLineNr; - current->docFile = yyFileName; - BEGIN(AfterDoc); - } -#endif } <DefineEnd,FindFields,FindFieldArg,ReadInitializer,OldStyleArgs>{BN}*("/**"|"//!"|"/*!"|"///")"<" { lineCount(); - lastAfterDocContext = YY_START; - if (YY_START==DefineEnd) + if (current->bodyLine==-1) { - afterDocTerminator = '\n'; - yyLineNr--; + current->bodyLine=yyLineNr; } - else - afterDocTerminator = 0; + docBlockContext = YY_START; + docBlockInBody = FALSE; + docBlockJavaStyle = yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF"); + docBlock.resize(0); + docBlockTerm = 0; if (yytext[yyleng-3]=='/') { - current->brief.resize(0); - current->briefLine = yyLineNr; - current->briefFile = yyFileName; - BEGIN(AfterDocLine); - } - else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) - { - current->brief.resize(0); - current->briefLine = yyLineNr; - current->briefFile = yyFileName; - BEGIN(AfterDocBrief); + startCommentBlock(TRUE); + BEGIN( DocLine ); } else { - current->doc.resize(0); - current->docLine = yyLineNr; - current->docFile = yyFileName; - BEGIN(AfterDoc); + startCommentBlock(FALSE); + BEGIN( DocBlock ); } } <FindMembers,FindFields>("//"([!/]?){B}*{CMD}"{")|("/*"([!*]?){B}*{CMD}"{") { -#ifdef COMMENTSCAN Entry *tmp = current; if (previous) { @@ -2151,50 +1847,9 @@ IDLATTR ("["[^\]]*"]"){BN}* handleGroupStartCommand(current->name); current = tmp; initEntry(); - -#else - startGroup(); - tmpDocType=-1; - if (current_root->section & Entry::SCOPE_MASK) - { - current->inside = current_root->name+"::"; - if (current->mGrpId!=DOX_NOGROUP) - { - memberGroupInside = current->inside.copy(); - } - } - if (yytext[1]=='/') // C++ style comment - { - current->brief.resize(0); - current->briefLine = yyLineNr; - current->briefFile = yyFileName; - lastDocContext = YY_START; - BEGIN( LineDoc ); - } - else // C style comment - { - current->doc.resize(0); - current->docLine = yyLineNr; - current->docFile = yyFileName; - lastDocContext = YY_START; - removeSlashes=FALSE; - BEGIN( Doc ); - } -#endif } <FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}".*|"/*"([!*]?){B}*{CMD}"}".*"*/" { -#ifdef COMMENTSCAN handleGroupEndCommand(); -#else - if (memberGroupId==DOX_NOGROUP && autoGroupStack.isEmpty()) - { - warn(yyFileName,yyLineNr, - "Warning: end of group without matching begin."); - } - //printf("end of member group marker ends group %d\n",memberGroupId); - endGroup(); - memberGroupHeader.resize(0); -#endif } <FindMembers>"=" { current->bodyLine = yyLineNr; @@ -3631,31 +3286,24 @@ IDLATTR ("["[^\]]*"]"){BN}* { current->endBodyLine=yyLineNr; lineCount(); + tempEntry = current; // temporarily switch to the previous entry current = previous; - current->doc.resize(0); - current->brief.resize(0); - lastAfterDocContext = SkipCurlyEndDoc; - afterDocTerminator = '}'; + + docBlockContext = SkipCurlyEndDoc; + docBlockInBody = FALSE; + docBlockJavaStyle = yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF"); + docBlock.resize(0); + docBlockTerm = '}'; if (yytext[yyleng-3]=='/') { - current->briefLine = yyLineNr; - current->briefFile = yyFileName; - BEGIN(AfterDocLine); - } - else if (yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF")) - { - current->briefLine = yyLineNr; - current->briefFile = yyFileName; - current->docLine = yyLineNr; - current->docFile = yyFileName; - BEGIN(AfterDocBrief); + startCommentBlock(TRUE); + BEGIN( DocLine ); } else { - current->docLine = yyLineNr; - current->docFile = yyFileName; - BEGIN(AfterDoc); + startCommentBlock(FALSE); + BEGIN( DocBlock ); } } } @@ -4183,16 +3831,12 @@ IDLATTR ("["[^\]]*"]"){BN}* memberGroupInside = current->inside.copy(); } } -#ifdef COMMENTSCAN docBlockContext = YY_START; docBlockInBody = YY_START==SkipCurly; docBlockJavaStyle = FALSE; docBlock.resize(0); startCommentBlock(FALSE); BEGIN( DocBlock ); -#else - BEGIN( Doc ); -#endif } <FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>("//"{B}*)?"/**"/[^/*] { removeSlashes=(yytext[1]=='/'); @@ -4206,7 +3850,6 @@ IDLATTR ("["[^\]]*"]"){BN}* memberGroupInside = current->inside.copy(); } } -#ifdef COMMENTSCAN current->docLine = yyLineNr; current->docFile = yyFileName; docBlockContext = YY_START; @@ -4228,46 +3871,6 @@ IDLATTR ("["[^\]]*"]"){BN}* } startCommentBlock(FALSE); BEGIN( DocBlock ); -#else - if (!Config_getBool("JAVADOC_AUTOBRIEF")) // use the Qt style - { - current->docLine = yyLineNr; - current->docFile = yyFileName; - tmpDocType=-1; - if (!Config_getBool("HIDE_IN_BODY_DOCS") && - YY_START==SkipCurly) // inside body - { - current->doc+="\n\n"; - } - else - { - current->doc.resize(0); - } - BEGIN( Doc ); - } - else // Use the javadoc style - { - current->docLine = yyLineNr; - current->docFile = yyFileName; - current->briefLine = yyLineNr; - current->briefFile = yyFileName; - if (!Config_getBool("HIDE_IN_BODY_DOCS") && - YY_START==SkipCurly) // inside body - { - tmpDocType=-1; - current->doc+="\n\n"; - lastDocContext = SkipCurly; - BEGIN( Doc ); - } - else - { - tmpDocType=Doc; - current->doc.resize(0); - current->brief.resize(0); - BEGIN( JavaDoc ); - } - } -#endif } <FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"//!" { if (YY_START!=SkipCurly) @@ -4286,16 +3889,12 @@ IDLATTR ("["[^\]]*"]"){BN}* memberGroupInside = current->inside.copy(); } } -#ifdef COMMENTSCAN docBlockContext = YY_START; docBlockInBody = YY_START==SkipCurly; docBlockJavaStyle = FALSE; docBlock.resize(0); startCommentBlock(TRUE); BEGIN( DocLine ); -#else - BEGIN( LineDoc ); -#endif } <FindMembers,FindFields,MemberSpec,SkipCurly,FuncQual,Operator,ClassVar,Bases,OldStyleArgs>"///"/[^/] { if (YY_START!=SkipCurly) @@ -4314,16 +3913,12 @@ IDLATTR ("["[^\]]*"]"){BN}* memberGroupInside = current->inside.copy(); } } -#ifdef COMMENTSCAN docBlockContext = YY_START; docBlockInBody = YY_START==SkipCurly; docBlockJavaStyle = FALSE; docBlock.resize(0); startCommentBlock(TRUE); BEGIN( DocLine ); -#else - BEGIN( LineDoc ); -#endif } <FindMembers>"extern"{BN}*"\"C"("++")?"\""{BN}*("{")? { lineCount(); @@ -4413,7 +4008,12 @@ IDLATTR ("["[^\]]*"]"){BN}* handleCommentBlock(docBlock,FALSE); BEGIN(docBlockContext); } -<DocBlock>^{B}*"*"+/[^//] { // start of a comment line +<DocBlock>^{B}*("//")?{B}*"*"+/[^//] { // start of a comment line + } +<DocBlock>^{B}*("//"){B}* { // strip embedded C++ comments if at the start of a line + } +<DocBlock>"//" { // slashes in the middle of a comment block + docBlock+=yytext; } <DocBlock>("@@"|"\\\\"){ID}/[^a-z_A-Z0-9] { // escaped command docBlock+=yytext; @@ -4423,7 +4023,7 @@ IDLATTR ("["[^\]]*"]"){BN}* docBlockName=&yytext[1]; BEGIN(DocCopyBlock); } -<DocBlock>[^@*\\\n]+ { // any character that isn't special +<DocBlock>[^@*\/\\\n]+ { // any character that isn't special docBlock+=yytext; } <DocBlock>\n { // newline @@ -4470,1682 +4070,65 @@ IDLATTR ("["[^\]]*"]"){BN}* } + /* ------------- Prototype parser -------------- */ - - - /*************************************************************************/ - /*** The next part is obsolete and will be removed ***/ - - -<JavaDoc>{CMD}("brief"|"short"){B}+ { - lastBriefContext=tmpDocType; - BEGIN( ClassDocBrief ); - } -<JavaDoc>^(({B}*"*"+)?){BL} { - lineCount(); - if (!current->brief.stripWhiteSpace().isEmpty()) - { - BEGIN( tmpDocType ); - } - } - - - /* -<JavaDoc>"@" { - unput(*yytext); - BEGIN(ClassDoc); - } - */ -<JavaDoc>^{B}*"*"+/[^/] { - //printf("---> removing %s\n",yytext); - } - /* -<JavaDoc>[^\n\@\*\.\\]+ { - current->brief+=yytext; - } - */ -<JavaDoc>. { - //printf("---> copy %c\n",*yytext); - current->brief+=*yytext; - } -<JavaDoc>\n { - current->brief+=' '; - lineCount(); - } -<JavaDoc,AfterDocBrief>".\\"/[ \t\r\n] { - current->brief+="."; - } -<JavaDoc>"."[ \t\r\n] { - lineCount(); - current->brief+="."; - BEGIN( tmpDocType ); - } -<JavaDoc>{B}*/{SECTIONCMD} { - current->doc+=yytext; - BEGIN( tmpDocType ); - } -<JavaDoc>"<"({TABLE}|{UL}|{OL}|{DL}|{P}){ATTR}">" { // end brief upon encountering any of these - int i; - for (i=yyleng-1;i>=0;i--) - { - unput(yytext[i]); - } - BEGIN( tmpDocType ); - } -<Doc,JavaDoc>{B}*{CMD}("fn"|"var"|"typedef"|"property"){B}+ { - current->section = Entry::MEMBERDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocFunc ); - } -<Doc,JavaDoc>{B}*{CMD}"def"{B}+ { - nextDefContext = YY_START==LineDoc ? DefLineDoc : ClassDoc; - current->section = Entry::DEFINEDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocDefine ); - } -<LineDoc,Doc,JavaDoc>{B}*{CMD}"overload"{B}* { - overloadContext = YY_START; - BEGIN( ClassDocOverload ); - } -<ClassDocOverload>{B}*/"\n" { - QCString orgDoc = current->doc; - current->doc = getOverloadDocs(); - current->doc += "\n\n"; - current->doc += orgDoc; - BEGIN( overloadContext ); - } -<ClassDocOverload>{B}*/"*/" { - QCString orgDoc = current->doc; - current->doc = getOverloadDocs(); - current->doc += "\n\n"; - current->doc += orgDoc; - BEGIN( overloadContext ); - } -<ClassDocOverload>. { unput(*yytext); - current->section = Entry::OVERLOADDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocFunc ); - } -<Doc,JavaDoc>{B}*{CMD}"enum"{B}+ { - current->section = Entry::ENUMDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( EnumDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"defgroup"{B}+ { - current->section = Entry::GROUPDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - current->groupDocType = Entry::GROUPDOC_NORMAL; - BEGIN( GroupDocArg1 ); - } -<Doc,PageDoc,JavaDoc>{B}*{CMD}"addtogroup"{B}+ { - current->section = Entry::GROUPDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - current->groupDocType = Entry::GROUPDOC_ADD; - BEGIN( GroupDocArg1 ); - } -<Doc,PageDoc,JavaDoc>{B}*{CMD}"weakgroup"{B}+ { - current->section = Entry::GROUPDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - current->groupDocType = Entry::GROUPDOC_WEAK; - BEGIN( GroupDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"namespace"{B}+ { - current->section = Entry::NAMESPACEDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( NameSpaceDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"package"{B}+ { - current->section = Entry::PACKAGEDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( PackageDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"class"{B}+ { - current->section = Entry::CLASSDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"protocol"{B}+ { // ObjC protocol - current->section = Entry::PROTOCOLDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"category"{B}+ { // ObjC category - current->section = Entry::CATEGORYDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( CategoryDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"union"{B}+ { - current->section = Entry::UNIONDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"struct"{B}+ { - current->section = Entry::STRUCTDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"interface"{B}+ { - current->section = Entry::INTERFACEDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"idlexcept"{B}+ { - current->section = Entry::EXCEPTIONDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ClassDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"page"{B}+ { - current->section = Entry::PAGEDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( PageDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"mainpage"{B}* { - current->section = Entry::MAINPAGEDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - current->name = "mainpage"; - BEGIN( PageDocArg2 ); - } -<Doc,LineDoc,JavaDoc>{B}*{CMD}"file"{B}* { - current->section = Entry::FILEDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - lastFileDocContext = YY_START; - BEGIN( FileDocArg1 ); - } -<Doc,LineDoc,JavaDoc>{B}*{CMD}"dir"{B}* { - current->section = Entry::DIRDOC_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( FileDocArg1 ); - } -<Doc,JavaDoc>{B}*{CMD}"example"{B}+ { - current->section = Entry::EXAMPLE_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - BEGIN( ExampleDocArg1 ); - } -<ClassDoc,PageDoc,Doc,JavaDoc>{B}*{CMD}"details"{B}+ { /* nop */ - } -<LineDoc>{CMD}"name"[^\n]*\n { - lastDefGroup.groupname.resize(0); - memberGroupHeader=&yytext[5]; - memberGroupHeader=memberGroupHeader.stripWhiteSpace(); - current->section = Entry::MEMBERGRP_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - yyLineNr++; - startGroupInDoc(); - BEGIN( lastDocContext ); - } -<Doc,JavaDoc>{CMD}"name"{B}+ { - lastDefGroup.groupname.resize(0); - current->section = Entry::MEMBERGRP_SEC; - current->fileName = yyFileName; - current->startLine = yyLineNr; - memberGroupHeader.resize(0); - memberGroupDocs.resize(0); - BEGIN(GroupHeader); - } -<LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>"<!--" { - lastSkipHtmlCommentContext = YY_START; - BEGIN(SkipHtmlComment); - } -<SkipHtmlComment>"--"[!]?">" { BEGIN(lastSkipHtmlCommentContext); } -<SkipHtmlComment>. -<AfterDoc,Doc,ClassDoc,PageDoc>("\\\\"|"@@")("todo"|"test"|"bug"|"deprecated"|"xrefitem")/[^a-z_A-Z0-9] { - current->doc+=yytext; - } -<AfterDocLine,LineDoc,JavaDoc>("\\\\"|"@@")("todo"|"test"|"bug"|"deprecated"|"xrefitem")/[^a-z_A-Z0-9] { - current->brief+=yytext; - } -<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"todo"/[^a-z_A-Z0-9] { - slStartContext = YY_START; - lastBriefContext = TodoParam; // this is where we will continue at the end of the argument - slString = current->brief.copy(); // these will be swapped later on. - current->brief.resize(0); - BEGIN(ClassDocBrief); - } -<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"test"/[^a-z_A-Z0-9] { - slStartContext = YY_START; - lastBriefContext = TestParam; // this is where we will continue at the end of the argument - slString = current->brief.copy(); // these will be swapped later on. - current->brief.resize(0); - BEGIN(ClassDocBrief); - } -<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"bug"/[^a-z_A-Z0-9] { - slStartContext = YY_START; - lastBriefContext = BugParam; // this is where we will continue at the end of the argument - slString = current->brief.copy(); // these will be swapped later on. - current->brief.resize(0); - BEGIN(ClassDocBrief); - } -<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"deprecated"/[^a-z_A-Z0-9] { - slStartContext = YY_START; - lastBriefContext = DeprecatedParam; // this is where we will continue at the end of the argument - slString = current->brief.copy(); // these will be swapped later on. - current->brief.resize(0); - BEGIN(ClassDocBrief); - } -<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"xrefitem"/[^a-z_A-Z0-9] { - slStartContext = YY_START; - lastBriefContext = XRefItemParam4; // this is where we will continue at the end of the argument - slString = current->brief.copy(); // these will be swapped later on. - current->brief.resize(0); - BEGIN(XRefItemParam1); - } -<TodoParam>\n | -<TodoParam>"//" | -<TodoParam>"/*" | -<TodoParam>. { - addXRefItem(lastDocContext==SkipCurly, - "todo",theTranslator->trTodo(),theTranslator->trTodoList()); - int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); - BEGIN(slStartContext); - } -<TestParam>\n | -<TestParam>"//" | -<TestParam>"/*" | -<TestParam>. { - addXRefItem(lastDocContext==SkipCurly, - "test",theTranslator->trTest(),theTranslator->trTestList()); - int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); - BEGIN(slStartContext); - } -<BugParam>\n | -<BugParam>"//" | -<BugParam>"/*" | -<BugParam>. { - addXRefItem(lastDocContext==SkipCurly, - "bug",theTranslator->trBug(),theTranslator->trBugList()); - int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); - BEGIN(slStartContext); - } -<DeprecatedParam>\n | -<DeprecatedParam>"//" | -<DeprecatedParam>"/*" | -<DeprecatedParam>. { - addXRefItem(lastDocContext==SkipCurly, - "deprecated",theTranslator->trDeprecated(),theTranslator->trDeprecatedList()); - int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); - BEGIN(slStartContext); - } -<XRefItemParam1>{ID} { - xrefItemKey=yytext; - BEGIN(XRefItemParam2); - } -<XRefItemParam1>{B}* -<XRefItemParam1>. { - warn(yyFileName,yyLineNr,"Found unexpected character %s while parsing the first argument of \\xrefitem\n",yytext); - unput(*yytext); - BEGIN(slStartContext); - } -<XRefItemParam2>"\""[^\n\"]*"\"" { - xrefItemTitle = stripQuotes(yytext); - BEGIN(XRefItemParam3); - } -<XRefItemParam2>{B}* -<XRefItemParam2>. { - warn(yyFileName,yyLineNr,"Found unexpected character %s while parsing the second argument of \\xrefitem\n",yytext); - unput(*yytext); - BEGIN(slStartContext); - } -<XRefItemParam3>{B}* -<XRefItemParam3>"\""[^\n\"]*"\"" { - xrefListTitle = stripQuotes(yytext); - BEGIN(ClassDocBrief); - } -<XRefItemParam3>. { - warn(yyFileName,yyLineNr,"Found unexpected character %s while parsing the third argument of \\xrefitem\n",yytext); - unput(*yytext); - BEGIN(slStartContext); - } -<XRefItemParam4>{B}* -<XRefItemParam4>\n | -<XRefItemParam4>"//" | -<XRefItemParam4>"/*" | -<XRefItemParam4>. { - addXRefItem(lastDocContext==SkipCurly, - xrefItemKey,xrefItemTitle,xrefListTitle); - int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); - BEGIN(slStartContext); - } -<ExampleDocArg1>{FILE} { - current->name = stripQuotes(yytext); - BEGIN( PageDoc ); - } -<ClassDoc,Doc,JavaDoc>{B}*{CMD}"relate"[sd]{B}* { - lastDocRelContext = YY_START; - BEGIN( ClassDocRelates ); - } -<ClassDocRelates>({ID}"::")*{ID} { - current->relates = yytext; - if (current->mGrpId!=DOX_NOGROUP) - { - memberGroupRelates = yytext; - } - BEGIN( lastDocRelContext ); - } -<ClassDoc,Doc,JavaDoc>{B}*{CMD}"relate"[sd]"also"{B}* { - lastDocRelAlsoContext = YY_START; - BEGIN( ClassDocRelatesAlso ); - } -<ClassDocRelatesAlso>({ID}"::")*{ID} { - current->relatesDup = TRUE; - current->relates = yytext; - if (current->mGrpId!=DOX_NOGROUP) - { - memberGroupRelates = yytext; - } - BEGIN( lastDocRelAlsoContext ); - } -<NameSpaceDocArg1>{SCOPENAME} { - current->name = yytext; - newDocState(); - } -<NameSpaceDocArg1>"\\"{B}*"\n" { - yyLineNr++; - } -<NameSpaceDocArg1>"\n" { - warn(yyFileName,yyLineNr, - "Warning: missing argument after " - "\\namespace." - ); - yyLineNr++; - } -<PackageDocArg1>{ID}("."{ID})* { - current->name = yytext; - newDocState(); - } -<PackageDocArg1>"\\"{B}*"\n" { - yyLineNr++; - } -<PackageDocArg1>"\n" { - warn(yyFileName,yyLineNr, - "Warning: missing argument after " - "\\package." - ); - yyLineNr++; - } -<CategoryDocArg1>{SCOPENAME}{B}*"("[^\)]+")" { - current->name = yytext; - prependScope(); - BEGIN( ClassDocArg2 ); - } -<ClassDocArg1>{SCOPENAME}/"<" { - current->name = yytext; - // prepend outer scope name - prependScope(); - lastClassTemplSpecContext = ClassDocArg2; - BEGIN( ClassTemplSpec ); - } -<ClassDocArg1>{SCOPENAME} { - current->name = yytext; - if (current->section==Entry::PROTOCOLDOC_SEC) - { - current->name+="-p"; - } - // prepend outer scope name - prependScope(); - BEGIN( ClassDocArg2 ); - } -<ClassDocArg1,CategoryDocArg1>"\\"{B}*"\n" { - yyLineNr++; - } -<ClassDocArg1>"\n" { - warn(yyFileName,yyLineNr, - "Warning: missing argument after " - "\\class." - ); - yyLineNr++; - - } -<CategoryDocArg1>"\n" { - warn(yyFileName,yyLineNr, - "Warning: missing argument after " - "\\category." - ); - yyLineNr++; - - } -<GroupDocArg1>{ID}(".html"?) { - current->name = yytext; - lastDefGroup.groupname = yytext; - lastDefGroup.pri = current->groupingPri(); - // the .html stuff is for Qt compatibility - if (current->name.right(5)==".html") - current->name=current->name.left(current->name.length()-5); - BEGIN(GroupDocArg2); - } -<GroupDocArg1>"\\"{B}*"\n" { yyLineNr++; - } -<GroupDocArg1>"\n" { - warn(yyFileName,yyLineNr, - "Warning: missing group name after %s", - current->groupDocCmd() - ); - yyLineNr++; - BEGIN( Doc ); - } -<GroupDocArg2>{B}*"*/" { - // fake input for end of title rule - yyLineNr--; - unput('/');unput('*');unput('\n'); - } -<GroupDocArg2>"\\"{B}*"\n" { yyLineNr++; - } -<GroupDocArg2>[^\n\\\*]+ { - current->type += yytext; - current->type = current->type.stripWhiteSpace(); - } -<GroupDocArg2>"\\_linebr"|"\n" { - if( current->groupDocType == Entry::GROUPDOC_NORMAL && - current->type.length() == 0 ) - warn(yyFileName,yyLineNr, - "Warning: missing title after " - "\\defgroup %s", current->name.data() - ); - if (*yytext=='\n') yyLineNr++; - newDocState(); - } -<ClassDocArg2>{FILE} { - //printf("ClassDocArg2=%s\n",yytext); - current->includeFile = stripQuotes(yytext); - BEGIN( ClassDocArg3 ); - } -<ClassDocArg2>"\\"{B}*"\n" { yyLineNr++; - } -<ClassDocArg2>"\\_linebr" { - newDocState(); - } -<ClassDocArg2>"\n" { yyLineNr++; - newDocState(); - } -<ClassDocArg2>{B}*"*/" { - newDocState(); - unput('/');unput('*'); - } -<ClassDocArg3>[<]?{FILE}[>]? { - //printf("ClassDocArg3=%s\n",yytext); - current->includeName = yytext; - newDocState(); - } -<ClassDocArg3>"\\"{B}*"\n" { yyLineNr++; - } -<ClassDocArg3>"\n"|"\\linebr" { yyLineNr++; - newDocState(); - } -<ClassDocArg3>{B}*"*/" { - newDocState(); - unput('/');unput('*'); - } -<FileDocArg1>{FILE} { - current->name = stripQuotes(yytext); - newDocState(); - } -<FileDocArg1>"\\"{B}*"\n" { yyLineNr++; - } -<FileDocArg1>"\n"|"\\_linebr" { - current->name = yyFileName; - if (*yytext=='\n') yyLineNr++; - newDocState(); - if (lastFileDocContext==LineDoc) - { - current->doc += "\n\n"; - current_root->addSubEntry(current); - current = new Entry ; - initEntry(); - BEGIN( FindMembers ); - } - } -<PageDocArg1>{FILE} { - current->name = stripQuotes(yytext); - BEGIN( PageDocArg2 ); - } -<PageDocArg1>"\\"{B}*"\n" { yyLineNr++; - current->doc+="\n"; - } -<PageDocArg1>"\n"|"\\_linebr" { - warn(yyFileName,yyLineNr, - "Warning: missing argument after " - "\\page." - ); - current->doc+="\n"; - if (*yytext=='\n') yyLineNr++; - BEGIN( Doc ); - } -<PageDocArg2>.*"\n" { - yyLineNr++; - current->args = yytext; - current->doc+="\n"; - BEGIN( PageDoc ); - } -<EnumDocArg1>{SCOPEID} { - current->name = yytext; - prependScope(); - newDocState(); - } -<EnumDocArg1>"\\"{B}*"\n" { yyLineNr++; - current->doc+="\n"; - } -<EnumDocArg1>"\n"|"\\_linebr" { - warn(yyFileName,yyLineNr, - "Warning: missing argument after \\enum." - ); - current->doc+="\n"; - if (*yytext=='\n') yyLineNr++; - BEGIN( Doc ); - } -<PageDoc>{CMD}"refitem".*"\n" { - current->doc+=yytext; - } -<ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"section"{B}+ { - //sectionType=SectionInfo::Section; - current->doc+=yytext; - lastSectionContext=YY_START; - BEGIN(SectionLabel); - } -<ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsection"{B}+ { - //sectionType=SectionInfo::Subsection; - current->doc+=yytext; - lastSectionContext=YY_START; - BEGIN(SectionLabel); - } -<ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"subsubsection"{B}+ { - //sectionType=SectionInfo::Subsubsection; - current->doc+=yytext; - lastSectionContext=YY_START; - BEGIN(SectionLabel); - } -<ClassDoc,PageDoc,Doc,JavaDoc>{CMD}"paragraph"{B}+ { - //sectionType=SectionInfo::Paragraph; - current->doc+=yytext; - lastSectionContext=YY_START; - BEGIN(SectionLabel); - } -<GroupHeader>. { memberGroupHeader+=*yytext; } -<GroupHeader>"*/" { - unput('/');unput('*'); - //printf("Found memberGroup=`%s'\n",memberGroupHeader.data()); - startGroupInDoc(); - newDocState(); - } -<GroupHeader>\n|"\\_linebr" { - if (*yytext=='\n') yyLineNr++; - current->doc+="\n"; - //printf("Found memberGroup=`%s'\n",memberGroupHeader.data()); - startGroupInDoc(); - newDocState(); - } -<StoreGroupDocs>"$" { - //printf("StoreGroupDocs memberGroupId=%d brief=`%s' doc=`%s'!\n",memberGroupId,current->brief.data(),current->doc.data()); - memberGroupDocs=current->brief.stripWhiteSpace(); - current->doc = current->doc.stripWhiteSpace(); - if (!memberGroupDocs.isEmpty() && !current->doc.isEmpty()) - { - memberGroupDocs+="\n\n"; - } - memberGroupDocs+=current->doc; - //Doxygen::memberDocDict.insert(memberGroupId, - // new QCString(memberGroupDocs) - // ); - MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(memberGroupId); - if (info) - { - info->doc = memberGroupDocs; - info->docFile = yyFileName; - } - current->doc.resize(0); - current->brief.resize(0); - BEGIN(lastDocContext); - } -<Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ { - lastAnchorContext = YY_START; - //sectionType=SectionInfo::Anchor; - current->doc+=yytext; - BEGIN(AnchorLabel); - } -<Doc,PageDoc,ClassDoc>("\\\\"|"@@")("verbatim"|"latexonly"|"htmlonly"|"dot")/[^a-z_A-Z0-9] { - current->doc+=yytext; - } -<JavaDoc>("\\\\"|"@@")("verbatim"|"latexonly"|"htmlonly"|"dot")/[^a-z_A-Z0-9] { - current->brief+=yytext; - } -<Doc,PageDoc,ClassDoc>{CMD}"verbatim"/[^a-z_A-Z0-9] { - lastVerbState=YY_START; - current->doc+="\\verbatim"; - g_skipBlockName="verbatim"; - BEGIN(SkipVerbatim); - } -<JavaDoc>{CMD}"verbatim"/[^a-z_A-Z0-9] { - lastVerbState=YY_START; - current->brief+="\\verbatim"; - g_skipBlockName="verbatim"; - BEGIN(SkipVerbatim); - } -<Doc,PageDoc,ClassDoc>{CMD}"latexonly"/[^a-z_A-Z0-9] { - lastVerbState=YY_START; - current->doc+="\\latexonly"; - g_skipBlockName="latexonly"; - BEGIN(SkipVerbatim); - } -<JavaDoc>{CMD}"latexonly"/[^a-z_A-Z0-9] { - lastVerbState=YY_START; - current->brief+="\\latexonly"; - g_skipBlockName="latexonly"; - BEGIN(SkipVerbatim); - } -<Doc,PageDoc,ClassDoc>{CMD}"htmlonly"/[^a-z_A-Z0-9] { - lastVerbState=YY_START; - current->doc+="\\htmlonly"; - g_skipBlockName="htmlonly"; - BEGIN(SkipVerbatim); - } -<JavaDoc>{CMD}"htmlonly"/[^a-z_A-Z0-9] { - lastVerbState=YY_START; - current->brief+="\\htmlonly"; - g_skipBlockName="htmlonly"; - BEGIN(SkipVerbatim); - } -<Doc,PageDoc,ClassDoc>{CMD}"addindex"{B}+[^\n]+ { - current->doc+=yytext; - } -<JavaDoc>{CMD}"addindex"{B}+[^\n]+ { - current->brief+=yytext; - } -<Doc,PageDoc,ClassDoc>("\\\\"|"@@")"code"/[^a-z_A-Z0-9] { - current->doc+="\\\\code"; - } -<JavaDoc>("\\\\"|"@@")"code"/[^a-z_A-Z0-9] { - current->brief+="\\\\code"; - } -<Doc,PageDoc,ClassDoc>{CMD}"code"/[^a-z_A-Z0-9] { - lastCodeState=YY_START; - current->doc+="\\code"; - pSkipDoc=¤t->doc; - g_skipBlockName="code"; - BEGIN(SkipCode); - } -<JavaDoc>{CMD}"code"/[^a-z_A-Z0-9] { - lastCodeState=YY_START; - current->brief+="\\code"; - pSkipDoc=¤t->brief; - g_skipBlockName="code"; - BEGIN(SkipCode); - } -<Doc,PageDoc,ClassDoc>("\\\\"|"@@")"dot"/[^a-z_A-Z0-9] { - current->doc+="\\\\dot"; - } -<JavaDoc>("\\\\"|"@@")"dot"/[^a-z_A-Z0-9] { - current->brief+="\\\\dot"; - } -<Doc,PageDoc,ClassDoc>{CMD}"dot"/[^a-z_A-Z0-9] { - lastCodeState=YY_START; - current->doc+="\\dot"; - pSkipDoc=¤t->doc; - g_skipBlockName="dot"; - BEGIN(SkipCode); - } -<JavaDoc>{CMD}"dot"/[^a-z_A-Z0-9] { - lastCodeState=YY_START; - current->brief+="\\dot"; - pSkipDoc=¤t->brief; - g_skipBlockName="dot"; - BEGIN(SkipCode); - } -<Doc,PageDoc,ClassDoc>"<"{PRE}{ATTR}">" { - lastCodeState=YY_START; - current->doc+="<PRE>"; - pSkipDoc=¤t->doc; - g_skipBlockName="pre"; - BEGIN(SkipCode); - } -<JavaDoc>"<"{PRE}{ATTR}">" { - lastCodeState=YY_START; - current->brief+="<PRE>"; - pSkipDoc=¤t->brief; - g_skipBlockName="pre"; - BEGIN(SkipCode); - } -<SkipVerbatim>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddot")/[^a-z_A-Z0-9] { - current->doc+=yytext; - BEGIN(lastVerbState); - } -<SkipVerbatim>[^ \t\/\@\\\n]* { - current->doc+=yytext; - } -<SkipVerbatim>^"//" { - if (!removeSlashes) - current->doc+=yytext; - } - /* -<SkipVerbatim>^"//"({B}*"*"+)? { - if (!removeSlashes) - current->doc+=yytext; - } -<SkipVerbatim>^{B}*"*"+ - */ -<SkipVerbatim>"//"|"/*" { - current->doc+=yytext; - } -<SkipVerbatim>"\n" { - yyLineNr++; - current->doc+=*yytext; - } -<SkipVerbatim>. { - current->doc+=*yytext; - } -<SkipVerbatim><<EOF>> { - warn(yyFileName,yyLineNr, - "Warning: reached end of file while inside a @%s block; check for missing @end%s tag!",g_skipBlockName.data(),g_skipBlockName.data() - ); - yyterminate(); - } -<SkipCode>{CMD}"endcode"/[^a-z_A-Z0-9] { - *pSkipDoc+="\\endcode"; - if (g_skipBlockName=="code") - { - BEGIN(lastCodeState); - } - } -<SkipCode>"</"{PRE}{ATTR}">" { - *pSkipDoc+="</PRE>"; - if (g_skipBlockName=="pre") - { - BEGIN(lastCodeState); - } - } -<SkipCode>{CMD}"enddot"/[^a-z_A-Z0-9] { - *pSkipDoc+="\\enddot"; - if (g_skipBlockName=="dot") - { - BEGIN(lastCodeState); - } - } -<SkipCode>^"//"({B}*"*"+)? { - if (!removeSlashes) - *pSkipDoc+=yytext; - } -<SkipCode>^{B}*"*"+/{BN}+ -<SkipCode>"//" { - *pSkipDoc+=yytext; - } -<SkipCode>"/*"|"*/" { - *pSkipDoc+=yytext; - } -<SkipCode>[^ \<\*\t\/\\\n]+ { - *pSkipDoc+=yytext; - } -<SkipCode>\n { - yyLineNr++; - *pSkipDoc+=*yytext; - } -<SkipCode>. { - *pSkipDoc+=*yytext; - } -<SkipCode><<EOF>> { - warn(yyFileName,yyLineNr, - "Warning: reached end of file while inside a @%s block; check for missing @end%s tag!", - g_skipBlockName.data(), - g_skipBlockName.data() - ); - yyterminate(); - } -<AnchorLabel>{LABELID} { - SectionInfo *si = new SectionInfo(yyFileName,yytext,0,SectionInfo::Anchor); - printf("New anchor file=%s label=%s\n",yyFileName,yytext); - Doxygen::sectionDict.insert(yytext,si); - current->anchors->append(si); - current->doc+=yytext; - BEGIN(lastAnchorContext); - } -<SectionLabel>{LABELID} { - sectionLabel=yytext; - sectionTitle.resize(0); - current->doc+=yytext; - BEGIN(SectionTitle); - } -<SectionTitle>[^\n*]*/"\n" { - sectionTitle+=yytext; - sectionTitle=sectionTitle.stripWhiteSpace(); - //printf("Adding new section file=%s label=%s title=%s\n",yyFileName,sectionLabel.data(),sectionTitle.data()); - SectionInfo *si = new SectionInfo(yyFileName,sectionLabel,sectionTitle,SectionInfo::Anchor); - current->anchors->append(si); - Doxygen::sectionDict.insert(yytext,si); - current->doc+=yytext; - BEGIN(lastSectionContext); - } -<SectionTitle>[^\n*]*/"\\_linebr" { - sectionTitle+=yytext; - sectionTitle=sectionTitle.stripWhiteSpace(); - //printf("Adding new section file=%s label=%s title=%s\n",yyFileName,sectionLabel.data(),sectionTitle.data()); - SectionInfo *si = new SectionInfo(yyFileName,sectionLabel,sectionTitle,SectionInfo::Anchor); - current->anchors->append(si); - Doxygen::sectionDict.insert(yytext,si); - current->doc+=yytext; - BEGIN(lastSectionContext); - } -<SectionTitle>[^\n*]* { - sectionTitle+=yytext; - current->doc+=yytext; - } -<SectionTitle>"*" { - sectionTitle+=yytext; - current->doc+=yytext; - } -<PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; } -<PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; } -<PageDoc>{CMD}"ingroup"{B}+ { - lastGroupContext = YY_START; - lineCount(); - BEGIN( GroupName ); - } -<ClassDoc,Doc,JavaDoc>{CMD}"{" { - if (memberGroupId==DOX_NOGROUP && current->section==Entry::GROUPDOC_SEC) - { - startGroupInDoc(); - } - } -<ClassDoc,Doc,JavaDoc>{CMD}"}" { - if (memberGroupId==DOX_NOGROUP && autoGroupStack.isEmpty()) - { - warn(yyFileName,yyLineNr, - "Warning: end of group without matching begin."); - } - //printf("end of member group marker ends group %d\n",memberGroupId); - endGroup(); - memberGroupHeader.resize(0); - } -<PageDoc,ClassDoc>. { current->doc += yytext; } -<Doc,JavaDoc,LineDoc,PageDoc,ClassDoc>^{B}*"//" -<Doc,PageDoc,ClassDoc>"//" { current->doc += yytext; } -<LineDoc,JavaDoc,ClassDocBrief>"//" { current->brief += yytext; } -<Doc,JavaDoc,LineDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief>("\\\\"|"@@")"f"[$\[\]] { - current->doc += yytext; - } -<Doc,JavaDoc,LineDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f$" { - lastFormulaContext = YY_START; - formulaText="$"; - insideFormula=TRUE; - BEGIN(ReadFormulaShort); - } -<Doc,JavaDoc,LineDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f[" { - lastFormulaContext = YY_START; - formulaText="\\["; - insideFormula=TRUE; - BEGIN(ReadFormulaLong); - } -<Doc,JavaDoc,LineDoc,ClassDocBrief,PageDoc,ClassDoc,AfterDoc,AfterDocLine,AfterDocBrief,CopyArgComment,CopyArgCommentLine>{CMD}"f{"[^}\n]+"}" { - lastFormulaContext = YY_START; - formulaText="\\begin"; - formulaEnd=&yytext[2]; - formulaText+=formulaEnd; - insideFormula=TRUE; - BEGIN(ReadFormulaLong); - } -<ReadFormulaShort>{CMD}"f$" { - formulaText+="$"; - if (lastFormulaContext==ClassDocBrief || - lastFormulaContext==LineDoc || - lastFormulaContext==JavaDoc || - lastFormulaContext==AfterDocBrief || - lastFormulaContext==AfterDocLine - ) - { - current->brief += addFormula(); - } - else if (lastFormulaContext==CopyArgComment || - lastFormulaContext==CopyArgCommentLine) - { - fullArgString += addFormula(); - } - else - { - current->doc += addFormula(); - } - insideFormula=FALSE; - BEGIN(lastFormulaContext); - } -<ReadFormulaShort>\n { - formulaText+=" "; - yyLineNr++; - if (lastFormulaContext==LineDoc || - lastFormulaContext==AfterDocLine - ) - { - checkFormula(); - insideFormula=FALSE; - BEGIN(lastFormulaContext); - } - } -<ReadFormulaLong>{CMD}"f"[\}\]] { - if (yytext[2]==']') - { - formulaText+="\\]"; - } - else - { - formulaText+="\\end"; - formulaText+=formulaEnd; - } - if (lastFormulaContext==ClassDocBrief || - lastFormulaContext==LineDoc || - lastFormulaContext==JavaDoc || - lastFormulaContext==AfterDocBrief || - lastFormulaContext==AfterDocLine - ) - { - current->brief += addFormula(); - } - else if (lastFormulaContext==CopyArgComment || - lastFormulaContext==CopyArgCommentLine) - { - fullArgString += addFormula(); - } - else - { - current->doc += addFormula(); - } - insideFormula=FALSE; - BEGIN(lastFormulaContext); - } -<ReadFormulaLong>\n { formulaText+=*yytext; yyLineNr++; } -<ReadFormulaLong,ReadFormulaShort>. { formulaText+=*yytext; } -<PageDoc,ClassDocBrief,ClassDoc,ReadFormulaShort,ReadFormulaLong>{B}*"*/" { - checkDocs(); - //printf("current->section=%x\n",current->section); - if (YY_START==SkipCode) // premature end of code block - { - err("Error: comment block ended inside \\code ... \\endcode block at line %d in %s!\n", - yyLineNr,yyFileName); - *pSkipDoc += "\\endcode\n\n"; - BEGIN( lastDocContext ); - } - else if (YY_START==ClassDocBrief && - lastBriefContext==TodoParam) - { - unput('/');unput('*'); // make sure we have something to read - BEGIN( TodoParam ); - } - else if (YY_START==ClassDocBrief && - lastBriefContext==TestParam) - { - unput('/');unput('*'); // make sure we have something to read - BEGIN( TestParam ); - } - else if (YY_START==ClassDocBrief && - lastBriefContext==BugParam) - { - unput('/');unput('*'); // make sure we have something to read - BEGIN( BugParam ); - } - else if (YY_START==ClassDocBrief && - lastBriefContext==DeprecatedParam) - { - unput('/');unput('*'); // make sure we have something to read - BEGIN( DeprecatedParam ); - } - else if (YY_START==ClassDocBrief && - lastBriefContext==XRefItemParam4) - { - unput('/');unput('*'); // make sure we have something to read - BEGIN( XRefItemParam4 ); - } - else if (YY_START==ClassDocBrief && - lastBriefContext==Doc) - { - //printf("Add docs %s\n",current->doc.data()); - current->doc += "\n\n"; - BEGIN( lastDocContext ); - } - else if (current->section==Entry::MEMBERGRP_SEC) - { - unput('$'); - BEGIN( StoreGroupDocs ); - } - else - { - current->doc += "\n\n"; - //printf("Add docs for %s\n",current->name.data()); - current_root->addSubEntry(current); - current = new Entry ; - initEntry(); - BEGIN( lastDocContext ); - } - } -<PageDoc>"<"{TITLE}">" { - current->args.resize(0); - current->argList->clear(); - BEGIN( PageDocTitle); - } -<PageDocTitle>\n { yyLineNr++; current->args+=" "; } -<PageDocTitle>[^\n\<] { current->args+=yytext; } -<PageDocTitle>"</"{TITLE}">" { BEGIN( PageDoc ); } - - /* escaped versions of the conditional commands (for putting them in the docs) */ -<ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"if"/[^a-z_A-Z0-9] { current->doc+=yytext; } -<ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"ifnot"/[^a-z_A-Z0-9] { current->doc+=yytext; } -<ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"elseif"/[^a-z_A-Z0-9] { current->doc+=yytext; } -<ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"else"/[^a-z_A-Z0-9] { current->doc+=yytext; } -<ClassDoc,Doc,AfterDoc,PageDoc>{CMD}{CMD}"endif"/[^a-z_A-Z0-9] { current->doc+=yytext; } -<LineDoc,JavaDoc>{CMD}{CMD}"if"/[^a-z_A-Z0-9] { current->brief+=yytext; } -<LineDoc,JavaDoc>{CMD}{CMD}"ifnot"/[^a-z_A-Z0-9] { current->brief+=yytext; } -<LineDoc,JavaDoc>{CMD}{CMD}"elseif"/[^a-z_A-Z0-9] { current->brief+=yytext; } -<LineDoc,JavaDoc>{CMD}{CMD}"else"/[^a-z_A-Z0-9] { current->brief+=yytext; } -<LineDoc,JavaDoc>{CMD}{CMD}"endif"/[^a-z_A-Z0-9] { current->brief+=yytext; } - - /* conditional commands */ -<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"if"{B}+ { - lastIfContext = YY_START; - BEGIN(IfGuard); - } -<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"ifnot"{B}+ { - lastIfContext = YY_START; - BEGIN(IfNotGuard); - } -<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"if"(\r?)\n | -<IfGuard>\n { - warn(yyFileName,yyLineNr,"Missing guard for if statement!"); - yyLineNr++; - } -<IfGuard>[^\n\t ]+ { - if (Config_getList("ENABLED_SECTIONS").find(yytext)==-1) // not enabled - { - BEGIN(SkipSection); - depthIf=1; - } - else // section enabled - { - BEGIN(lastIfContext); - } - } -<IfNotGuard>\n { - warn(yyFileName,yyLineNr,"Missing guard for ifnot statement!"); - yyLineNr++; - } -<IfNotGuard>[^\n\t ]+ { - if (Config_getList("ENABLED_SECTIONS").find(yytext)==-1) // not enabled - { - BEGIN(lastIfContext); - } - else // section enabled - { - depthIf=1; - BEGIN(SkipSection); - } - } -<SkipSection>{CMD}"if"/[^a-z_A-Z0-9] { - depthIf++; - } -<SkipSection>{CMD}"endif"/[^a-z_A-Z0-9] { - if (--depthIf<=0) - { - BEGIN(lastIfContext); - } - } -<SkipSection>{CMD}"else"/[^a-z_A-Z0-9] { - if (depthIf==1) - { - depthIf=0; - BEGIN(lastIfContext); - } - } -<SkipSection>{CMD}"elseif"/[^a-z_A-Z0-9] { - if (depthIf==1) - { - BEGIN(IfGuard); - } - } -<SkipSection>"*/" { - BEGIN( SkipSection ); - } -<SkipSection>"/*!" { - BEGIN( SkipSection ); - } -<SkipSection>\n { - yyLineNr++; - } -<SkipSection>"//"|"*/" -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"elseif"/[^a-z_A-Z0-9] { - // previous section enabled => skip now - depthIf=1; - BEGIN(SkipSection); - } -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"else"/[^a-z_A-Z0-9] { - // section was enabled => skip now - depthIf=1; - BEGIN(SkipSection); - } -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc>{CMD}"endif"/[^a-z_A-Z0-9] { - // section enabled => absorb endif - } - - -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"ingroup"{B}+ { - lastGroupContext = YY_START; - lineCount(); - BEGIN( GroupName ); - } -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"nosubgrouping"/[^a-z_A-Z0-9] { - current->subGrouping = FALSE; - } -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"showinitializer"/[^a-z_A-Z0-9] { - current->initLines = 100000; // ON - } -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"hideinitializer"/[^a-z_A-Z0-9] { - current->initLines = 0; // OFF - } -<ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"callgraph"/[^a-z_A-Z0-9] { - current->callGraph = TRUE; // ON - } -<GroupName>{ID} { - current->groups->append( - new Grouping(yytext, Grouping::GROUPING_INGROUP) - ); - } -<GroupName>"\\_linebr" { - BEGIN( lastGroupContext ); - } -<GroupName>"\n" { - yyLineNr++; - BEGIN( lastGroupContext ); - } -<GroupName>"*/" { - unput('/');unput('*'); - BEGIN( lastGroupContext ); - } -<ClassDoc,Doc>{B}*{CMD}("brief"|"short") { - lastBriefContext=YY_START; - current->briefFile = yyFileName; - current->briefLine = yyLineNr; - BEGIN( ClassDocBrief ); - } -<ClassDoc>{B}*"\\inherit"{B}+ { BEGIN( DocBaseClass ); } -<DocBaseClass>{ID} { - //printf("Adding base class %s\n",yytext); - current->extends->append( - new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal) - ); - } -<DocBaseClass>\n { yyLineNr++; BEGIN( ClassDoc ); } -<ClassDocBrief>{BS}({BL}|"\\n\\n") | -<ClassDocBrief>("\\_linebr \\_linebr") { - //if (!current->doc.isEmpty()) current->doc+=" <p>"; - if (lastBriefContext==TodoParam || - lastBriefContext==TestParam || - lastBriefContext==BugParam || - lastBriefContext==DeprecatedParam || - lastBriefContext==XRefItemParam4 - ) - { - unput('\n'); - } - else - { - current->brief=current->brief.stripWhiteSpace(); - if (yytext[yyleng-1]=='\n') yyLineNr++; - } - BEGIN( lastBriefContext ); - } -<ClassDocBrief>"\n" { - // allow \todo in brief description - if (lastBriefContext==TodoParam && - (slStartContext==LineDoc || - slStartContext==AfterDocLine - ) - ) - { - unput('\n'); // make sure we have something to read - BEGIN( TodoParam ); - } - else if - (lastBriefContext==TestParam && - (slStartContext==LineDoc || - slStartContext==AfterDocLine - ) - ) - { - unput('\n'); // make sure we have something to read - BEGIN( TestParam ); - } - else if - (lastBriefContext==BugParam && - (slStartContext==LineDoc || - slStartContext==AfterDocLine - ) - ) - { - unput('\n'); // make sure we have something to read - BEGIN( BugParam ); - } - else if - (lastBriefContext==DeprecatedParam && - (slStartContext==LineDoc || - slStartContext==AfterDocLine - ) - ) - { - unput('\n'); // make sure we have something to read - BEGIN( DeprecatedParam ); - } - else if - (lastBriefContext==XRefItemParam4 && - (slStartContext==LineDoc || - slStartContext==AfterDocLine - ) - ) - { - unput('\n'); // make sure we have something to read - BEGIN( XRefItemParam4 ); - } - else - { - current->brief += "\n"; - if (!current->doc.stripWhiteSpace().isEmpty()) - { - current->doc += "<p>"; - } - yyLineNr++ ; - } - } -<ClassDocBrief>"<"{BR}{ATTR}">" -<ClassDocBrief>{BS}/{SECTIONCMD} | -<ClassDocBrief>{B}*/{SECTIONCMD} { - current->brief=current->brief.stripWhiteSpace(); - BEGIN( lastBriefContext ); - } -<ClassDocBrief>{BS}{CMD}("brief"|"short"){BN}+ { - //lastBriefContext=YY_START; - } -<ClassDocBrief>{ID} { current->brief += yytext; } -<ClassDocBrief>. { current->brief += *yytext; } -<ClassDocDefine>{ID}/"(" { - current->name = yytext; - BEGIN( ClassDefineArgs ); - } -<ClassDocDefine>{ID} { - current->name = yytext; - if (nextDefContext==ClassDoc) - newDocState(); - else - BEGIN( nextDefContext ); - } -<ClassDefineArgs>")" { - current->args+=")"; - if (nextDefContext==ClassDoc) - newDocState(); - else - BEGIN( nextDefContext ); - } -<ClassDefineArgs>. { - current->args+= yytext; - } -<ClassDocFunc>"\\"{B}*"\n" { yyLineNr++; } -<ClassDocFunc>"\n" { - yyLineNr++; - current->name = current->name.stripWhiteSpace(); - if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty()) - current->section = Entry::VARIABLEDOC_SEC; - newDocState(); - } -<ClassDocFunc>"operator"{B}*"("{B}*")" { +<Prototype>"operator"{B}*"("{B}*")" { current->name+=yytext; } -<ClassDocFunc>"(" { +<Prototype>"(" { current->args+=*yytext; - currentArgumentContext = ClassDocFuncQual; + currentArgumentContext = PrototypeQual; fullArgString = current->args.copy(); copyArgString = ¤t->args; BEGIN( ReadFuncArgType ) ; } -<ClassDocFunc>"("({ID}"::")*({B}*"*")+ { +<Prototype>"("({ID}"::")*({B}*"*")+ { current->type+=current->name+yytext; current->name.resize(0); - BEGIN( ClassDocFuncPtr ); + BEGIN( PrototypePtr ); } -<ClassDocFuncPtr>{SCOPENAME} { +<PrototypePtr>{SCOPENAME} { current->name+=yytext; } -<ClassDocFuncPtr>")" { +<PrototypePtr>")" { current->type+=')'; - BEGIN( ClassDocFunc ); + BEGIN( Prototype ); } -<ClassDocFuncQual>"{" { - BEGIN( ClassDocFuncSkipLine); +<PrototypeQual>"{" { + BEGIN( PrototypeSkipLine); } -<ClassDocFuncQual>{B}*"const"{B}* { +<PrototypeQual>{B}*"const"{B}* { current->args += " const "; current->argList->constSpecifier=TRUE; } -<ClassDocFuncQual>{B}*"volatile"{B}* { +<PrototypeQual>{B}*"volatile"{B}* { current->args += " volatile "; current->argList->volatileSpecifier=TRUE; } -<ClassDocFuncQual>{B}*"="{B}*"0"{B}* { +<PrototypeQual>{B}*"="{B}*"0"{B}* { current->args += " = 0"; current->virt = Pure; current->argList->pureSpecifier=TRUE; } -<ClassDocFuncQual>"throw"{B}*"(" { +<PrototypeQual>"throw"{B}*"(" { current->exception = "throw("; - BEGIN(ClassDocFuncExc); + BEGIN(PrototypeExc); } -<ClassDocFuncExc>")" { +<PrototypeExc>")" { current->exception += ')'; - BEGIN(ClassDocFuncQual); + BEGIN(PrototypeQual); } -<ClassDocFuncExc>. { +<PrototypeExc>. { current->exception += *yytext; } -<ClassDocFunc,ClassDocFuncQual>. { +<Prototype,PrototypeQual>. { current->name += *yytext; } -<ClassDocFuncQual,ClassDocFuncSkipLine>"\n" { - yyLineNr++; - current->name = current->name.stripWhiteSpace(); - newDocState(); - } -<DefLineDoc,LineDoc,AfterDocLine>{SECTIONCMD} { - warn(yyFileName,yyLineNr,"Command %s not allowed in single-line C++ comment! Ignoring.",yytext); - } -<Doc>[a-z_A-Z0-9]+ { current->doc += yytext; } -<Doc,PageDoc,AfterDoc,LineDoc,ClassDoc>("\\\\"|"@@") { current->doc += yytext; } -<Doc>. { current->doc += *yytext; } -<DefLineDoc,LineDoc>. { current->brief += *yytext; } -<Doc>\n { yyLineNr++; current->doc += *yytext; } -<LineDoc>[\n\r]+{B}*"//"[!/] { lineCount(); } -<LineDoc>\n { - yyLineNr++; - if (lastDocContext==SkipCurly) // inside body - { - if (!Config_getBool("HIDE_IN_BODY_DOCS")) - { - if (!previous->doc.isEmpty()) - { - previous->doc+="<p>"; - } - previous->doc += current->brief; - } - current->brief.resize(0); - } - BEGIN( lastDocContext ); - } -<DefLineDoc>\n { - yyLineNr++; - unput('/');unput('*'); - BEGIN( ClassDoc ); - } - -<AfterDocLine>"/*"|"//" { current->brief+=yytext; } -<AfterDocLine>\n { - yyLineNr++; - if (afterDocTerminator!=0) - unput(afterDocTerminator); - BEGIN(lastAfterDocContext); - } -<AfterDocLine>\n{B}*("//!<"|"///<") { - yyLineNr++; - BEGIN(AfterDocLine); - } -<AfterDocLine>\n{B}*("/*!<"|"/**<") { - yyLineNr++; - BEGIN(AfterDoc); - } -<AfterDocLine>{ID} { current->brief+=yytext; } -<AfterDocLine>. { current->brief+=yytext; } -<AfterDocBrief>{BS}({BL}|"\\n\\n") { - current->brief=current->brief.stripWhiteSpace(); - yyLineNr++; - BEGIN( AfterDoc ); - } -<AfterDocBrief>"/*"|"//" { current->brief+=yytext; } -<AfterDocBrief>{B}*/{SECTIONCMD} { - current->brief=current->brief.stripWhiteSpace(); - BEGIN( AfterDoc ); - } -<AfterDocBrief>\n { current->brief+=yytext; yyLineNr++; } -<AfterDocBrief>. { current->brief+=*yytext; } - - /* -<AfterDocBrief>"<"{BR}{ATTR}">" -<AfterDocBrief>{BS}/{CMD}"ingroup" { - current->brief=current->brief.stripWhiteSpace(); - BEGIN( lastBriefContext ); - } -<AfterDocBrief>{BS}/{SECTIONCMD} { - BEGIN( lastBriefContext ); - } -<AfterDocBrief>{BS}/[^/\n]{BL} { yyLineNr++; - if (!current->brief.stripWhiteSpace().isEmpty()) - BEGIN(AfterDoc); - } - */ -<AfterDocBrief>"*/" { - if (afterDocTerminator!=0) - unput(afterDocTerminator); - BEGIN(lastAfterDocContext); - } -<AfterDocBrief>"."/{BN} { BEGIN(AfterDoc); } -<LineDoc,AfterDocLine>{CMD}"internal" { - if (!Config_getBool("INTERNAL_DOCS")) - { - lastInternalDocContext = YY_START; - BEGIN( DocInternalLine ); - } - else - { - current->doc+="\\internal"; - } - } -<Doc,JavaDoc,PageDoc,ClassDoc,AfterDoc>{CMD}"internal" { - if (!Config_getBool("INTERNAL_DOCS")) - { - lastInternalDocContext = YY_START; - BEGIN( DocInternal ); - } - else - { - current->doc+="\\internal"; - } - } -<DocInternal>. -<DocInternal>\n { yyLineNr++; } -<DocInternal>"/*"|"//" -<DocInternal>"*/" { - unput('/'); - unput('*'); - BEGIN( lastInternalDocContext ); - } -<DocInternalLine>. -<DocInternalLine>\n { - yyLineNr++; - unput('\n'); - BEGIN( lastInternalDocContext ); - } -<AfterDoc>{CMD}"brief" { current->brief.resize(0); BEGIN(AfterDocBrief); } -<AfterDoc>"/*"|"//" { current->doc+=yytext; } -<AfterDoc>^{B}*"*"+/[^/] -<AfterDoc>\n { current->doc+=yytext; yyLineNr++; } -<AfterDoc>. { current->doc+=*yytext; } -<AfterDoc>"*/" { - if (afterDocTerminator!=0) - unput(afterDocTerminator); - BEGIN(lastAfterDocContext); - } -<ClassDocRelates,ClassDocFunc,ClassDocDefine,GroupDocArg1,CategoryDocArg1,ClassDocArg1,SectionTitle,EnumDocArg1,PageDocArg1,ExampleDocArg1,ClassDefineArgs>"*/" { - // defer "*/" to a later time - unput('/'); - unput('*'); - // insert \n and decrement the line number to compensate for the artifical newline - unput('\n'); - yyLineNr--; - BEGIN( Doc ); - } -<FileDocArg1>"*/" { - current->name = yyFileName; - current->doc += "\n\n"; - current_root->addSubEntry(current); - current = new Entry ; - initEntry(); - BEGIN( FindMembers ); - } -<Doc>"*/" { - checkDocs(); - //printf("End of docs at line %d: %s\n",yyLineNr,current->doc.data()); - if (lastDocContext==SkipCurly) - { - if (!Config_getBool("HIDE_IN_BODY_DOCS")) - { - if (!previous->doc.isEmpty()) - { - previous->doc+="<p>"; - } - previous->doc += current->doc; - } - current->doc.resize(0); - } - else - { - current->doc += "\n\n"; - } - if (current->section==Entry::GROUPDOC_SEC) - { - current_root->addSubEntry(current); - current = new Entry ; - initEntry(); - } - BEGIN( lastDocContext ); - } -<JavaDoc>"*/" { - unput('/');unput('*'); - BEGIN( tmpDocType ); - } -<Doc,JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine,ClassDoc,PageDoc,AfterDoc,CopyArgComment,DocInternal,DocInternalLine>"\\_linebr " { - // used to compensate for misalignments due to \n's inside ALIASES - current->doc += '\n'; +<PrototypeSkipLine>. { } -<Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"-"("#")?{B}+ { - current->doc += yytext; - } -<Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,AfterDoc>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n { - current->doc += yytext; - yyLineNr++; - } -<ClassDocBrief,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"-"("#")?{B}+ { - current->brief += "-"; - } -<ClassDocBrief,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+[ \t]*"."{B}*\n { - current->brief += "."; yyLineNr++; - } -<Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+/[^/] -<Doc,JavaDoc,ClassDoc,PageDoc,ReadFormulaShort,ReadFormulaLong,ClassDocBrief,AfterDoc,AfterDocBrief>^{B}*(("//"{B}*)?)"*"+{B}+ { - current->doc+=' '; - } -<Doc,ClassDoc,PageDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text - current->doc+=yytext; - } - /* -<SkipSection>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { - QCString *pValue=Doxygen::aliasDict[yytext+1]; - if (pValue) - { - int i,l=pValue->length(); - for (i=l-1;i>=0;i--) - { - unput(pValue->at(i)); - } - } - } - */ -<Doc,ClassDoc,PageDoc,AfterDoc,CopyArgComment>{CMD}{CMD}[a-z_A-Z][a-z_A-Z0-9]* { /* escaped command */ - if (YY_START==CopyArgComment) - fullArgString+=yytext; - else - current->doc+=yytext; - } -<Doc,ClassDoc,PageDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { - bool handled=FALSE; - if ( useOverrideCommands) - { - if ( strcmp(yytext+1,"static")==0 ) - { - current->stat = TRUE; handled = TRUE; - } - else if ( strcmp(yytext+1,"pure")==0 ) - { - current->virt = Pure; handled = TRUE; - } - else if ( strcmp(yytext+1,"private")==0 ) - { - current->protection = Private; handled = TRUE; - } - else if ( strcmp(yytext+1,"privatesection")==0 ) - { - current->protection = protection = Private; handled = TRUE; - } - else if ( strcmp(yytext+1,"protected")==0 ) - { - current->protection = Protected; handled = TRUE; - } - else if ( strcmp(yytext+1,"protectedsection")==0 ) - { - current->protection = protection = Protected ; handled = TRUE; - } - else if ( strcmp(yytext+1,"public")==0 ) - { - current->protection = Public; handled = TRUE; - } - else if ( strcmp(yytext+1,"publicsection")==0 ) - { - current->protection = protection = Public; handled = TRUE; - } - } - if (!handled) - { - if (YY_START==CopyArgComment) - fullArgString+=yytext; - else - current->doc+=yytext; - } - } -<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text - current->brief+=yytext; - } -<LineDoc,AfterDocLine,CopyArgCommentLine>{CMD}("brief"|"short") {} -<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}{CMD}[a-z_A-Z][a-z_A-Z0-9]* { /* escaped command */ - if (YY_START==CopyArgCommentLine) - fullArgString+=yytext; - else - current->brief+=yytext; - } -<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { - if (YY_START==CopyArgCommentLine) - fullArgString+=yytext; - else - current->brief+=yytext; - } -<DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; } - /*** End of obsolete part ***/ - /***********************************************************************/ + /* ------------ Generic rules -------------- */ <SkipCxxComment>.*/\n { @@ -6207,6 +4190,8 @@ static void startCommentBlock(bool brief) } } +//---------------------------------------------------------------------------- + static void handleCommentBlock(const QCString &doc,bool brief) { if (docBlockInBody) @@ -6222,6 +4207,7 @@ static void handleCommentBlock(const QCString &doc,bool brief) } } if (parseCommentBlock( + g_thisParser, docBlockInBody ? previous : current, doc, // text yyFileName, // file @@ -6249,44 +4235,7 @@ exit: } } -#ifndef COMMENTSCAN -static void startGroup() -{ - if (!lastDefGroup.groupname.isEmpty()) - { - setCurrentGroup( &lastDefGroup.groupname, lastDefGroup.pri ); - autoGroupStack.push(new Grouping(lastDefGroup)); - lastDefGroup.groupname.resize(0); - } - else - { - //if (memberGroupId!=DOX_NOGROUP) - //{ - // //warn(yyFileName,yyLineNr,"Warning: ignoring nested member group. " - // // "Previous command was found at line %d.",lastMemberGroupLine); - // printf("startGroup ends group %d\n",memberGroupId); - // endGroup(); - //} - if (memberGroupHeader.isEmpty()) - { - // warn( yyFileName, yyLineNr, "Warning: member group does not have a header" ); - memberGroupHeader="[NOHEADER]"; - } - memberGroupId = newMemberGroupId(); - MemberGroupInfo *info = new MemberGroupInfo; - info->header = memberGroupHeader.stripWhiteSpace(); - Doxygen::memGrpInfoDict.insert(memberGroupId,info); - //Doxygen::memberHeaderDict.insert(memberGroupId, - // new QCString(memberGroupHeader.stripWhiteSpace()) - // ); - - memberGroupRelates = current->relates.copy(); - memberGroupInside = current->inside.copy(); - current->mGrpId = memberGroupId; - lastMemberGroupLine = yyLineNr; - } -} -#endif +//---------------------------------------------------------------------------- static void startGroupInDoc() { @@ -6296,31 +4245,29 @@ static void startGroupInDoc() current->groupingPri() )); } - else if (current->section == Entry::MEMBERGRP_SEC) /* scope for a member group: @name */ + else /* if (current->section == Entry::MEMBERGRP_SEC) scope for a member group: @name */ { - //if (memberGroupId!=DOX_NOGROUP) - //{ - // printf("startGroupInDoc ends group %d\n",memberGroupId); - // endGroup(); - //} + if (memberGroupId!=DOX_NOGROUP) + { + warn(yyFileName,yyLineNr,"Warning: member groups cannot be nested. Ending current group!\n"); + endGroup(); + } memberGroupId = newMemberGroupId(); MemberGroupInfo *info = new MemberGroupInfo; - info->header = memberGroupHeader.stripWhiteSpace(); + if (current->section == Entry::MEMBERGRP_SEC) + { + info->header = memberGroupHeader.stripWhiteSpace(); + } Doxygen::memGrpInfoDict.insert(memberGroupId,info); - //Doxygen::memberHeaderDict.insert(memberGroupId, - // new QCString(memberGroupHeader.stripWhiteSpace()) - // ); memberGroupRelates = current->relates.copy(); memberGroupInside = current->inside.copy(); current->mGrpId = memberGroupId; lastMemberGroupLine = yyLineNr; } - else - { - warn(yyFileName,yyLineNr,"Warning: @{ may only be used in a group block!\n"); - } } +//---------------------------------------------------------------------------- + static void endGroup() { if (memberGroupId!=DOX_NOGROUP) // end of member group @@ -6357,6 +4304,8 @@ static void endGroup() } } +//---------------------------------------------------------------------------- + static void forceEndGroup() { while (memberGroupId!=DOX_NOGROUP || !autoGroupStack.isEmpty()) @@ -6368,21 +4317,6 @@ static void forceEndGroup() //---------------------------------------------------------------------------- -static void newDocState() -{ - if (tmpDocType!=-1) - { - tmpDocType=ClassDoc; - BEGIN(JavaDoc); - } - else - { - BEGIN(ClassDoc); - } -} - -//---------------------------------------------------------------------------- - static void parseCompounds(Entry *rt) { //printf("parseCompounds(%s)\n",rt->name.data()); @@ -6407,7 +4341,7 @@ static void parseCompounds(Entry *rt) else BEGIN( FindMembers ) ; current_root = ce ; - strcpy( yyFileName, ce->fileName ) ; + yyFileName = ce->fileName; setContext(); yyLineNr = ce->startLine ; insideObjC = ce->objc; @@ -6482,12 +4416,16 @@ static void parseCompounds(Entry *rt) } //---------------------------------------------------------------------------- -#ifdef USE_TMP_FILE -void parseMain(Entry *rt,const char *fileName) +static void parseMain(const char *fileName,const char *fileBuf,Entry *rt) { initParser(); - g_inputFromFile = TRUE; + //g_inputFromFile = TRUE; + + inputString = fileBuf; + inputPosition = 0; + g_inputFromFile = FALSE; + anonCount = 0; depthIf = 0; protection = Public; @@ -6499,11 +4437,35 @@ void parseMain(Entry *rt,const char *fileName) inputFile.setName(fileName); if (inputFile.open(IO_ReadOnly)) { + yyLineNr= 1 ; + yyFileName = fileName; + setContext(); + msg("Parsing file %s...\n",yyFileName.data()); + + current_root = rt ; + initParser(); current = new Entry; - inputPosition = 0; + int sec=guessSection(yyFileName); + if (sec) + { + current->name = yyFileName; + current->section = sec; + current_root->addSubEntry(current); + current = new Entry; + } + current->reset(); scanYYrestart( scanYYin ); - BEGIN( FindMembers ); + if ( insidePHP ) + { + BEGIN( FindMembersPHP ); + } + else + { + BEGIN( FindMembers ); + } + scanYYlex(); + if (YY_START==Comment) { warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?"); @@ -6525,46 +4487,9 @@ void parseMain(Entry *rt,const char *fileName) } } -#else - -void parseMain(Entry *rt) -{ - initParser(); - g_inputFromFile = FALSE; - anonCount = 0; - depthIf = 0; - protection = Public; - mtype = Method; - gstat = FALSE; - virt = Normal; - current_root = rt; - global_root = rt; - current = new Entry; - inputString = rt->program; - inputPosition = 0; - scanYYrestart( scanYYin ); - BEGIN( FindMembers ); - scanYYlex(); - if (YY_START==Comment) - { - warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?"); - } - - forceEndGroup(); - - if (depthIf>0) - { - warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); - } - - rt->program.resize(0); - delete current; current=0; - parseCompounds(rt); -} - -#endif +//---------------------------------------------------------------------------- -void parsePrototype(const QCString &text) +static void parsePrototype(const QCString &text) { //printf("**** parsePrototype(%s) begin\n",text.data()); @@ -6585,9 +4510,13 @@ void parsePrototype(const QCString &text) inputPosition = 0; g_inputFromFile = FALSE; scanYYrestart( scanYYin ); - BEGIN(ClassDocFunc); + BEGIN(Prototype); scanYYlex(); + current->name = current->name.stripWhiteSpace(); + if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty()) + current->section = Entry::VARIABLEDOC_SEC; + // restore original scanner state yy_switch_to_buffer(orgState); inputString = orgInputString; @@ -6597,39 +4526,40 @@ void parsePrototype(const QCString &text) //printf("**** parsePrototype end\n"); } -Entry *startNewEntry() +static void handleGroupStartCommand(const char *header) { - // make copy of documentation up till now - QCString doc = current->doc; - QCString brief = current->brief; - current->doc.resize(0); - current->brief.resize(0); + memberGroupHeader=header; + startGroupInDoc(); +} - // create new entry - current_root->addSubEntry(current); - previous = current; - current = new Entry ; - initEntry(); +static void handleGroupEndCommand() +{ + endGroup(); + previous=0; +} + +//---------------------------------------------------------------------------- - // move documentation to this entry - current->doc = doc; - current->brief = brief; - - return current; +void CLanguageScanner::parse(const char *fileName,const char *fileBuf,Entry *root) +{ + g_thisParser = this; + ::parseMain(fileName,fileBuf,root); } -void handleGroupStartCommand(const char *header) +void CLanguageScanner::parsePrototype(const char *text) { - memberGroupHeader=header; - startGroupInDoc(); + ::parsePrototype(text); } -void handleGroupEndCommand() +void CLanguageScanner::handleGroupStartCommand(const char *header) { - endGroup(); - previous=0; + ::handleGroupStartCommand(header); } +void CLanguageScanner::handleGroupEndCommand() +{ + ::handleGroupEndCommand(); +} //---------------------------------------------------------------------------- diff --git a/src/search.php b/src/search.php index ab8e248..ee8802a 100644 --- a/src/search.php +++ b/src/search.php @@ -21,15 +21,24 @@ function readHeader($file) function computeIndex($word) { - if (strlen($word)<2) return -1; + $lword = strtolower($word); + $l = strlen($lword); + for ($i=0;$i<$l;$i++) + { + $c = ord($lword{$i}); + $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff; + } + return $v; + + //if (strlen($word)<2) return -1; // high char of the index - $hi = ord($word{0}); - if ($hi==0) return -1; + //$hi = ord($word{0}); + //if ($hi==0) return -1; // low char of the index - $lo = ord($word{1}); - if ($lo==0) return -1; + //$lo = ord($word{1}); + //if ($lo==0) return -1; // return index - return $hi*256+$lo; + //return $hi*256+$lo; } function search($file,$word,&$statsList) diff --git a/src/search_php.h b/src/search_php.h index ffd152a..86e97fa 100644 --- a/src/search_php.h +++ b/src/search_php.h @@ -21,15 +21,24 @@ "\n" "function computeIndex($word)\n" "{\n" -" if (strlen($word)<2) return -1;\n" +" $lword = strtolower($word);\n" +" $l = strlen($lword);\n" +" for ($i=0;$i<$l;$i++)\n" +" {\n" +" $c = ord($lword{$i});\n" +" $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;\n" +" }\n" +" return $v;\n" +"\n" +" //if (strlen($word)<2) return -1;\n" " // high char of the index\n" -" $hi = ord($word{0});\n" -" if ($hi==0) return -1;\n" +" //$hi = ord($word{0});\n" +" //if ($hi==0) return -1;\n" " // low char of the index\n" -" $lo = ord($word{1});\n" -" if ($lo==0) return -1;\n" +" //$lo = ord($word{1});\n" +" //if ($lo==0) return -1;\n" " // return index\n" -" return $hi*256+$lo;\n" +" //return $hi*256+$lo;\n" "}\n" "\n" "function search($file,$word,&$statsList)\n" diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 752d4a9..5bf510f 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -19,6 +19,7 @@ #include "searchindex.h" #include "config.h" #include <qfile.h> +#include <ctype.h> // file format: (all multi-byte values are stored in big endian format) @@ -75,15 +76,24 @@ void SearchIndex::setCurrentDoc(const char *name,const char *baseName,const char m_urls.insert(m_urlIndex,new URL(name,url)); } - static int charsToIndex(const char *word) { if (word==0) return -1; - uint c1=word[0]; - if (c1==0) return -1; - uint c2=word[1]; - if (c2==0) return -1; - return c1*256+c2; + + register ushort h=0; + const char *k = word; + ushort mask=0xfc00; + while ( *k ) + { + h = (h&mask)^(h<<6)^(*k++); + } + + //uint c1=word[0]; + //if (c1==0) return -1; + //uint c2=word[1]; + //if (c2==0) return -1; + //return c1*256+c2; + return h; } void SearchIndex::addWord(const char *word,bool hiPriority) @@ -91,6 +101,7 @@ void SearchIndex::addWord(const char *word,bool hiPriority) //printf("SearchIndex::addWord(%s,%d)\n",word,hiPriority); //QString wStr=QString(word).lower(); QString wStr(word); + wStr=wStr.lower(); if (wStr.isEmpty()) return; IndexWord *w = m_words[wStr]; if (w==0) diff --git a/src/translator.cpp b/src/translator.cpp index 2ecbad9..10dfa9b 100644 --- a/src/translator.cpp +++ b/src/translator.cpp @@ -54,47 +54,30 @@ const char Translator::ISO88592ToWin1250Tab[] = { /*! The translation table used by Koi8RToWindows1251() method. */ -Q_UINT16 Translator::Koi8RToWindows1251Tab[128] = -{ 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, - 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219/**/, 0x221A, 0x2248, - 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, - 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, - 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, - 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, - 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, - 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, - 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, - 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, - 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, - 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, - 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, - 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A +const unsigned char Translator::Koi8RToWindows1251Tab[128] = +{ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, + 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, + 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, + 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, + 254,224,225,246,228,229,244,227,245,232,233,234,235,236,237,238, + 239,255,240,241,242,243,230,226,252,251,231,248,253,249,247,250, + 222,192,193,214,196,197,212,195,213,200,201,202,203,204,205,206, + 207,223,208,209,210,211,198,194,220,219,199,216,221,217,215,218 }; /*! The translation table used by Windows1251ToKoi8R() method. */ -Q_UINT16 Translator::Windows1251ToKoi8RTab[128] = -{ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, - 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, - 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, - 0xFFFD, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, - 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, - 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, - 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, - 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, - 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, - 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, - 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, - 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F +const unsigned char Translator::Windows1251ToKoi8RTab[128] = +{ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, + 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, + 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, + 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, + 225,226,247,231,228,229,246,250,233,234,235,236,237,238,239,240, + 242,243,244,245,230,232,227,254,251,253,255,249,248,252,224,241, + 193,194,215,199,196,197,214,218,201,202,203,204,205,206,207,208, + 210,211,212,213,198,200,195,222,219,221,223,217,216,220,192,209 }; - /*! Returns the string converted from windows-1250 to iso-8859-2. */ /* The method was designed initially for translator_cz.h. * It is used for on-line encoding conversion related to @@ -155,19 +138,16 @@ QCString Translator::ISO88592ToWin1250(const QCString & sInput) QCString Translator::Koi8RToWindows1251( const QCString & sInput ) { - QString result; + QCString result(sInput); int len = sInput.length(); - result.setUnicode(0, len); - QChar* uc = (QChar*)result.unicode(); // const_cast const unsigned char * c = (const unsigned char *)(const char*)sInput; + unsigned char *dc = (unsigned char*)(const char*)result; for( int i=0; i<len; i++ ) { if ( c[i] > 127 ) - uc[i] = Koi8RToWindows1251Tab[c[i]-128]; - else - uc[i] = c[i]; + dc[i] = Koi8RToWindows1251Tab[c[i]-128]; } - return result.local8Bit(); + return result; } @@ -176,19 +156,16 @@ QCString Translator::Koi8RToWindows1251( const QCString & sInput ) Encoding table got from QT:qtextcodec.cpp */ QCString Translator::Windows1251ToKoi8R( const QCString & sInput ) { - QString result; + QCString result(sInput); int len = sInput.length(); - result.setUnicode(0, len); - QChar* uc = (QChar*)result.unicode(); // const_cast const unsigned char * c = (const unsigned char *)(const char*)sInput; + unsigned char *dc = (unsigned char*)(const char*)result; for( int i=0; i<len; i++ ) { if ( c[i] > 127 ) - uc[i] = Windows1251ToKoi8RTab[c[i]-128]; - else - uc[i] = c[i]; + dc[i] = Windows1251ToKoi8RTab[c[i]-128]; } - return result.local8Bit(); + return result; } /*! returns the caracter converted from hankaku-kana to zenkakukana. diff --git a/src/translator.h b/src/translator.h index 831679b..9626996 100644 --- a/src/translator.h +++ b/src/translator.h @@ -29,8 +29,8 @@ class Translator /* Tables for encoding conversions. */ static const char Win1250ToISO88592Tab[]; static const char ISO88592ToWin1250Tab[]; - static Q_UINT16 Koi8RToWindows1251Tab[128]; - static Q_UINT16 Windows1251ToKoi8RTab[128]; + static const unsigned char Koi8RToWindows1251Tab[128]; + static const unsigned char Windows1251ToKoi8RTab[128]; protected: /*! Returns the string converted from windows-1250 to iso-8859-2. */ diff --git a/src/translator_ca.h b/src/translator_ca.h index 6ef3fa8..3980309 100644 --- a/src/translator_ca.h +++ b/src/translator_ca.h @@ -87,40 +87,40 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! subscript for the related functions. */ virtual QCString trRelatedSubscript() - { return "(Remarcar que aquestes funcions no són funcions membre.)"; } + { return "(Remarcar que aquestes funcions no sn funcions membre.)"; } /*! header that is put before the detailed description of files, classes and namespaces. */ virtual QCString trDetailedDescription() - { return "Descripció Detallada"; } + { return "Descripci Detallada"; } /*! header that is put before the list of typedefs. */ virtual QCString trMemberTypedefDocumentation() - { return "Documentació de les Definicions de Tipus Membre"; } + { return "Documentaci de les Definicions de Tipus Membre"; } /*! header that is put before the list of enumerations. */ virtual QCString trMemberEnumerationDocumentation() - { return "Documentació de les Enumeracions Membre"; } + { return "Documentaci de les Enumeracions Membre"; } /*! header that is put before the list of member functions. */ virtual QCString trMemberFunctionDocumentation() - { return "Documentació de les Funcions Membre"; } + { return "Documentaci de les Funcions Membre"; } /*! header that is put before the list of member attributes. */ virtual QCString trMemberDataDocumentation() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Documentació dels Camps"; + return "Documentaci dels Camps"; } else { - return "Documentació de les Dades Membre"; + return "Documentaci de les Dades Membre"; } } /*! this is the text of a link put after brief descriptions. */ virtual QCString trMore() - { return "Més..."; } + { return "Ms..."; } /*! put in the class documentation */ virtual QCString trListOfAllMembers() @@ -132,7 +132,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! this is the first part of a sentence that is followed by a class name */ virtual QCString trThisIsTheListOfAllMembers() - { return "Aquesta és la llista complerta dels membres de "; } + { return "Aquesta s la llista complerta dels membres de "; } /*! this is the remainder of the sentence after the class name */ virtual QCString trIncludingInheritedMembers() @@ -142,7 +142,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * parameter s is name of the project name. */ virtual QCString trGeneratedAutomatically(const char *s) - { QCString result="Generat automàticament per Doxygen"; + { QCString result="Generat automticament per Doxygen"; if (s) result+=(QCString)" per a "+s; result+=" a partir del codi font."; return result; @@ -166,7 +166,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * compounds or files (see the \\group command). */ virtual QCString trModules() - { return "Mòduls"; } + { return "Mduls"; } /*! This is put above each page as a link to the class hierarchy */ virtual QCString trClassHierarchy() @@ -191,7 +191,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! This is put above each page as a link to the list of all verbatim headers */ virtual QCString trHeaderFiles() - { return "Fitxers d'encapçalaments"; } + { return "Fitxers d'encapalaments"; } /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() @@ -221,7 +221,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! This is put above each page as a link to all related pages. */ virtual QCString trRelatedPages() - { return "Pàgines Relacionades"; } + { return "Pgines Relacionades"; } /*! This is put above each page as a link to all examples. */ virtual QCString trExamples() @@ -233,14 +233,14 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return "Aquesta llista d'herència està ordenada toscament, " - "però no completa, de forma alfabètica:"; + { return "Aquesta llista d'herncia est ordenada toscament, " + "per no completa, de forma alfabtica:"; } /*! This is an introduction to the list with all files. */ virtual QCString trFileListDescription(bool extractAll) { - QCString result="Aquesta és la llista de tots els fitxers "; + QCString result="Aquesta s la llista de tots els fitxers "; if (!extractAll) result+="documentats "; result+="acompanyats amb breus descripcions:"; return result; @@ -252,19 +252,19 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Aquestes són les estructures de dades acompanyades amb breus descripcions:"; + return "Aquestes sn les estructures de dades acompanyades amb breus descripcions:"; } else { - return "Aquestes són les classes, estructures, " - "unions i interfícies acompanyades amb breus descripcions:"; + return "Aquestes sn les classes, estructures, " + "unions i interfcies acompanyades amb breus descripcions:"; } } /*! This is an introduction to the page with all class members. */ virtual QCString trCompoundMembersDescription(bool extractAll) { - QCString result="Aquesta és la llista de tots els "; + QCString result="Aquesta s la llista de tots els "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { result+="camps d'estructures i unions"; @@ -277,16 +277,16 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 { result+=" documentats"; } - result+=" amb enllaços a "; + result+=" amb enllaos a "; if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="la documentació de l'estructura/unió per a cada camp:"; + result+="la documentaci de l'estructura/uni per a cada camp:"; } else { - result+="la documentació de la classe per a cada membre:"; + result+="la documentaci de la classe per a cada membre:"; } } else @@ -305,7 +305,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! This is an introduction to the page with all file members. */ virtual QCString trFileMembersDescription(bool extractAll) { - QCString result="Aquesta és la llista de "; + QCString result="Aquesta s la llista de "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { result+="totes les funcions, variables, definicions, enumeracions, i definicions de tipus"; @@ -316,54 +316,54 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 result+="tots els membres de fitxers"; if (!extractAll) result+=" documentats"; } - result+=" amb enllaços "; + result+=" amb enllaos "; if (extractAll) result+="als fitxers als quals corresponen:"; else - result+="a la documentació:"; + result+="a la documentaci:"; return result; } /*! This is an introduction to the page with the list of all header files. */ virtual QCString trHeaderFilesDescription() - { return "Aquests són els fitxers d'encapçalament que constitueixen l'API:"; } + { return "Aquests sn els fitxers d'encapalament que constitueixen l'API:"; } /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() - { return "Aquesta és la llista de tots els exemples:"; } + { return "Aquesta s la llista de tots els exemples:"; } /*! This is an introduction to the page with the list of related pages */ virtual QCString trRelatedPagesDescription() - { return "Aquesta és la llista de totes les pàgines de documentació associades:"; } + { return "Aquesta s la llista de totes les pgines de documentaci associades:"; } /*! This is an introduction to the page with the list of class/file groups */ virtual QCString trModulesDescription() - { return "Aquesta és la llista de mòduls:"; } + { return "Aquesta s la llista de mduls:"; } /*! This sentences is used in the annotated class/file lists if no brief * description is given. */ virtual QCString trNoDescriptionAvailable() - { return "No hi ha cap descripció disponible"; } + { return "No hi ha cap descripci disponible"; } // index titles (the project name is prepended for these) /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() - { return ": Documentació"; } + { return ": Documentaci"; } /*! This is used in LaTeX as the title of the chapter with the * index of all groups. */ virtual QCString trModuleIndex() - { return "Índex de Mòduls"; } + { return "ndex de Mduls"; } /*! This is used in LaTeX as the title of the chapter with the * class hierarchy. */ virtual QCString trHierarchicalIndex() - { return "Índex Jeràrquic"; } + { return "ndex Jerrquic"; } /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. @@ -372,11 +372,11 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Índex d'Estructures de Dades"; + return "ndex d'Estructures de Dades"; } else { - return "Índex de Classes"; + return "ndex de Classes"; } } @@ -384,13 +384,13 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * list of all files. */ virtual QCString trFileIndex() - { return "Índex de Fitxers"; } + { return "ndex de Fitxers"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. */ virtual QCString trModuleDocumentation() - { return "Documentació dels Mòduls"; } + { return "Documentaci dels Mduls"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all classes, structs and unions. @@ -399,11 +399,11 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Documentació de les Estructures de Dades"; + return "Documentaci de les Estructures de Dades"; } else { - return "Documentació de les Classes"; + return "Documentaci de les Classes"; } } @@ -411,23 +411,23 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * the documentation of all files. */ virtual QCString trFileDocumentation() - { return "Documentació dels Fitxers"; } + { return "Documentaci dels Fitxers"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all examples. */ virtual QCString trExampleDocumentation() - { return "Documentació dels Exemples"; } + { return "Documentaci dels Exemples"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all related pages. */ virtual QCString trPageDocumentation() - { return "Documentació de les Pàgines"; } + { return "Documentaci de les Pgines"; } /*! This is used in LaTeX as the title of the document */ virtual QCString trReferenceManual() - { return "Manual de Referència"; } + { return "Manual de Referncia"; } /*! This is used in the documentation of a file as a header before the * list of defines @@ -475,43 +475,43 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * documentation blocks for defines */ virtual QCString trDefineDocumentation() - { return "Documentació de les Definicions"; } + { return "Documentaci de les Definicions"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for function prototypes */ virtual QCString trFunctionPrototypeDocumentation() - { return "Documentació de les Funcions Prototipus"; } + { return "Documentaci de les Funcions Prototipus"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for typedefs */ virtual QCString trTypedefDocumentation() - { return "Documentació de les Definicions de Tipus"; } + { return "Documentaci de les Definicions de Tipus"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types */ virtual QCString trEnumerationTypeDocumentation() - { return "Documentació dels Tipus de les Enumeracions"; } + { return "Documentaci dels Tipus de les Enumeracions"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration values */ virtual QCString trEnumerationValueDocumentation() - { return "Documentació dels Valors de les Enumeracions"; } + { return "Documentaci dels Valors de les Enumeracions"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ virtual QCString trFunctionDocumentation() - { return "Documentació de les Funcions"; } + { return "Documentaci de les Funcions"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for variables */ virtual QCString trVariableDocumentation() - { return "Documentació de les Variables"; } + { return "Documentaci de les Variables"; } /*! This is used in the documentation of a file/namespace/group before * the list of links to documented compounds @@ -548,12 +548,12 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! this text is put before a class diagram */ virtual QCString trClassDiagram(const char *clName) { - return (QCString)"Diagrama d'Herència per a "+clName+":"; + return (QCString)"Diagrama d'Herncia per a "+clName+":"; } /*! this text is generated when the \\internal command is used. */ virtual QCString trForInternalUseOnly() - { return "Tan sols per a ús intern."; } + { return "Tan sols per a s intern."; } /*! this text is generated when the \\reimp command is used. */ virtual QCString trReimplementedForInternalReasons() @@ -561,7 +561,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! this text is generated when the \\warning command is used. */ virtual QCString trWarning() - { return "Atenció"; } + { return "Atenci"; } /*! this text is generated when the \\bug command is used. */ virtual QCString trBugsAndLimitations() @@ -569,7 +569,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() - { return "Versió"; } + { return "Versi"; } /*! this text is generated when the \\date command is used. */ virtual QCString trDate() @@ -581,11 +581,11 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! this text is generated when the \\sa command is used. */ virtual QCString trSeeAlso() - { return "Mireu també"; } + { return "Mireu tamb"; } /*! this text is generated when the \\param command is used. */ virtual QCString trParameters() - { return "Paràmetres"; } + { return "Parmetres"; } /*! this text is generated when the \\exception command is used. */ virtual QCString trExceptions() @@ -606,7 +606,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! used as an introduction to the namespace list */ virtual QCString trNamespaceListDescription(bool extractAll) { - QCString result="Aquests són tots els espais de noms "; + QCString result="Aquests sn tots els espais de noms "; if (!extractAll) result+="documentats "; result+="amb breus descripcions:"; return result; @@ -626,7 +626,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * related classes */ virtual QCString trRelatedFunctionDocumentation() - { return "Documentació de funcions amigues i relacionades"; } + { return "Documentaci de funcions amigues i relacionades"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 @@ -637,16 +637,16 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 ClassDef::CompoundType compType, bool isTemplate) { - QCString result="Referència de"; + QCString result="Referncia de"; switch(compType) { case ClassDef::Class: result+=" la Classe "; break; case ClassDef::Struct: result+=" l'Estructura "; break; - case ClassDef::Union: result+=" la Unió "; break; - case ClassDef::Interface: result+=" la Interfície "; break; + case ClassDef::Union: result+=" la Uni "; break; + case ClassDef::Interface: result+=" la Interfcie "; break; case ClassDef::Protocol: result+="l Protocol "; break; case ClassDef::Category: result+=" la Categoria "; break; - case ClassDef::Exception: result+=" l'Excepció "; break; + case ClassDef::Exception: result+=" l'Excepci "; break; } if (isTemplate) result+="Template "; result+=(QCString)clName; @@ -656,7 +656,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! used as the title of the HTML page of a file */ virtual QCString trFileReference(const char *fileName) { - QCString result="Referència del Fitxer "; + QCString result="Referncia del Fitxer "; result+=fileName; return result; } @@ -664,31 +664,31 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! used as the title of the HTML page of a namespace */ virtual QCString trNamespaceReference(const char *namespaceName) { - QCString result="Referència de l'Espai de Noms "; + QCString result="Referncia de l'Espai de Noms "; result+=namespaceName; return result; } virtual QCString trPublicMembers() - { return "Mètodes públics"; } + { return "Mtodes pblics"; } virtual QCString trPublicSlots() - { return "Slots públics"; } + { return "Slots pblics"; } virtual QCString trSignals() { return "Senyals"; } virtual QCString trStaticPublicMembers() - { return "Mètodes Públics Estàtics"; } + { return "Mtodes Pblics Esttics"; } virtual QCString trProtectedMembers() - { return "Mètodes Protegits"; } + { return "Mtodes Protegits"; } virtual QCString trProtectedSlots() { return "Slots Protegits"; } virtual QCString trStaticProtectedMembers() - { return "Mètodes Protegits Estàtics"; } + { return "Mtodes Protegits Esttics"; } virtual QCString trPrivateMembers() - { return "Mètodes Privats"; } + { return "Mtodes Privats"; } virtual QCString trPrivateSlots() { return "Slots Privats"; } virtual QCString trStaticPrivateMembers() - { return "Mètodes Privats Estàtics"; } + { return "Mtodes Privats Esttics"; } /*! this function is used to produce a comma-separated list of items. * use generateMarker(i) to indicate where item i should be put. @@ -754,11 +754,11 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! This is an introduction to the page with all namespace members */ virtual QCString trNamespaceMemberDescription(bool extractAll) { - QCString result="Aquesta és la llista de tots els membres de l'espai de noms "; + QCString result="Aquesta s la llista de tots els membres de l'espai de noms "; if (!extractAll) result+="documentats "; - result+="amb enllaços a "; + result+="amb enllaos a "; if (extractAll) - result+="la documentació de l'espai de noms de cada membre:"; + result+="la documentaci de l'espai de noms de cada membre:"; else result+="l'espai de noms al qual corresponen:"; return result; @@ -767,13 +767,13 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * index of all namespaces. */ virtual QCString trNamespaceIndex() - { return "Índex d'Espais de Noms"; } + { return "ndex d'Espais de Noms"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all namespaces. */ virtual QCString trNamespaceDocumentation() - { return "Documentació de l'Espai de Noms"; } + { return "Documentaci de l'Espai de Noms"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990522 @@ -796,20 +796,20 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 bool single) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file - QCString result=(QCString)"La documentació d'aquest"; + QCString result=(QCString)"La documentaci d'aquest"; switch(compType) { case ClassDef::Class: result+="a classe"; break; case ClassDef::Struct: result+="a estructura"; break; - case ClassDef::Union: result+="a unió"; break; - case ClassDef::Interface: result+="a interfície"; break; + case ClassDef::Union: result+="a uni"; break; + case ClassDef::Interface: result+="a interfcie"; break; case ClassDef::Protocol: result+=" protocol"; break; case ClassDef::Category: result+="a categoria"; break; - case ClassDef::Exception: result+="a excepció"; break; + case ClassDef::Exception: result+="a excepci"; break; } result+=" es va generar a partir del"; if (!single) result+="s"; - result+=" següent"; + result+=" segent"; if (!single) result+="s"; result+=" fitxer"; if (!single) result+="s:"; else result+=":"; @@ -820,7 +820,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * list. */ virtual QCString trAlphabeticalList() - { return "Llista Alfabètica"; } + { return "Llista Alfabtica"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990901 @@ -833,7 +833,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! This is in the (quick) index as a link to the main page (index.html) */ virtual QCString trMainPage() - { return "Pàgina principal"; } + { return "Pgina principal"; } /*! This is used in references to page that are put in the LaTeX * documentation. It should be an abbreviation of the word page. @@ -851,11 +851,11 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } virtual QCString trDefinedAtLineInSourceFile() { - return "Definició a la línia @0 del fitxer @1."; + return "Definici a la lnia @0 del fitxer @1."; } virtual QCString trDefinedInSourceFile() { - return "Definició al fitxer @0."; + return "Definici al fitxer @0."; } ////////////////////////////////////////////////////////////////////////// @@ -874,17 +874,17 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! this text is put before a collaboration diagram */ virtual QCString trCollaborationDiagram(const char *clName) { - return (QCString)"Diagrama de col·laboració per a "+clName+":"; + return (QCString)"Diagrama de collaboraci per a "+clName+":"; } /*! this text is put before an include dependency graph */ virtual QCString trInclDepGraph(const char *fName) { - return (QCString)"Inclou el graf de dependències per a "+fName+":"; + return (QCString)"Inclou el graf de dependncies per a "+fName+":"; } /*! header that is put before the list of constructor/destructors. */ virtual QCString trConstructorDocumentation() { - return "Documentació del Constructor i el Destructor"; + return "Documentaci del Constructor i el Destructor"; } /*! Used in the file documentation to point to the corresponding sources. */ virtual QCString trGotoSourceCode() @@ -894,17 +894,17 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Used in the file sources to point to the corresponding documentation. */ virtual QCString trGotoDocumentation() { - return "Veure la documentació d'aquest fitxer."; + return "Veure la documentaci d'aquest fitxer."; } /*! Text for the \\pre command */ virtual QCString trPrecondition() { - return "Precondició"; + return "Precondici"; } /*! Text for the \\post command */ virtual QCString trPostcondition() { - return "Postcondició"; + return "Postcondici"; } /*! Text for the \\invariant command */ virtual QCString trInvariant() @@ -923,11 +923,11 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } virtual QCString trGraphicalHierarchy() { - return "Jerarquia Gràfica de la Classe"; + return "Jerarquia Grfica de la Classe"; } virtual QCString trGotoGraphicalHierarchy() { - return "Veure la jerarquia gràfica de la classe"; + return "Veure la jerarquia grfica de la classe"; } virtual QCString trGotoTextualHierarchy() { @@ -935,7 +935,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } virtual QCString trPageIndex() { - return "Índex de Pàgines"; + return "ndex de Pgines"; } ////////////////////////////////////////////////////////////////////////// @@ -948,7 +948,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } virtual QCString trPublicTypes() { - return "Tipus Públics"; + return "Tipus Pblics"; } virtual QCString trPublicAttribs() { @@ -958,12 +958,12 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } else { - return "Atributs Públics"; + return "Atributs Pblics"; } } virtual QCString trStaticPublicAttribs() { - return "Atributs Públics Estàtics"; + return "Atributs Pblics Esttics"; } virtual QCString trProtectedTypes() { @@ -975,7 +975,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } virtual QCString trStaticProtectedAttribs() { - return "Atributs Protegits Estàtics"; + return "Atributs Protegits Esttics"; } virtual QCString trPrivateTypes() { @@ -987,7 +987,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } virtual QCString trStaticPrivateAttribs() { - return "Atributs Privats Estàtics"; + return "Atributs Privats Esttics"; } ////////////////////////////////////////////////////////////////////////// @@ -1019,11 +1019,11 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 } virtual QCString trAttention() { - return "Atenció"; + return "Atenci"; } virtual QCString trInclByDepGraph() { - return "Aquest gràfic mostra quins fitxers inclouen, " + return "Aquest grfic mostra quins fitxers inclouen, " "de forma directa o indirecta, aquest fitxer:"; } virtual QCString trSince() @@ -1038,7 +1038,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! title of the graph legend page */ virtual QCString trLegendTitle() { - return "Llegenda del Gràfic"; + return "Llegenda del Grfic"; } /*! page explaining how the dot graph's should be interpreted * The %A in the text below are to prevent link to classes called "A". @@ -1046,22 +1046,22 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 virtual QCString trLegendDocs() { return - "Aquesta pàgina explica com s'interpreten els gràfics generats per doxygen.<p>\n" + "Aquesta pgina explica com s'interpreten els grfics generats per doxygen.<p>\n" "Considera aquest exemple:\n" "\\code\n" "/*! Classe invisible per culpa del retall */\n" "class Invisible { };\n\n" - "/*! Classe truncada, l'herència està amagada */\n" + "/*! Classe truncada, l'herncia est amagada */\n" "class Truncated : public Invisible { };\n\n" "/* Classe no documentada amb comentaris doxygen */\n" "class Undocumented { };\n\n" - "/*! Classe heredada amb herència pública */\n" + "/*! Classe heredada amb herncia pblica */\n" "class PublicBase : public Truncated { };\n\n" "/*! Una classe Template */\n" "template<class T> class Templ { };\n\n" - "/*! Classe heredada utilitzant herència protegida */\n" + "/*! Classe heredada utilitzant herncia protegida */\n" "class ProtectedBase { };\n\n" - "/*! Classe heredada utiltzant herència privada */\n" + "/*! Classe heredada utiltzant herncia privada */\n" "class PrivateBase { };\n\n" "/*! Classe usada per la classe heretada */\n" "class Used { };\n\n" @@ -1076,26 +1076,26 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 " Used *m_usedClass;\n" "};\n" "\\endcode\n" - "Si l'etiqueta \\c MAX_DOT_GRAPH_HEIGHT està igualada a 24a0 al fitxer de configuració, resultarà el gràfic següent:" + "Si l'etiqueta \\c MAX_DOT_GRAPH_HEIGHT est igualada a 24a0 al fitxer de configuraci, resultar el grfic segent:" "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" "<p>\n" - "Les caixes del gràfic superior tenen aquesta interpretació:\n" + "Les caixes del grfic superior tenen aquesta interpretaci:\n" "<ul>\n" - "<li>Una caixa negra plena represent l'estructura o classe per la qual el gràfic s'ha generat.\n" + "<li>Una caixa negra plena represent l'estructura o classe per la qual el grfic s'ha generat.\n" "<li>Una caixa de vora negra representa una estructura o classe documentada.\n" "<li>Una caixa de vora verda representa una estructura o classe indocumentada.\n" "<li>Una caixa de vora vermalla representa una estructura o classe documentada de la qual " - "no es mostren totes les relacions d'herència/inclusió. Un gràfic és truncat si no s'ajusta als límits.\n" + "no es mostren totes les relacions d'herncia/inclusi. Un grfic s truncat si no s'ajusta als lmits.\n" "</ul>\n" "Les sagetes tenen aquest significat:\n" "<ul>\n" - "<li>Una sageta blau fosc remarca una relació d'herència de tipus pública entre dues classes.\n" - "<li>Una sageta verd fosc remarca una relació d'herència de tipus protegida entre dues classes.\n" - "<li>Una sageta roig fosc remarca una relació d'herència de tipus privada entre dues classes.\n" - "<li>Una sageta puntejada de color porpra indica que una classe és continguda o usada per una altra classe." - " La sageta s'etiqueta amb la variable o variables a través de les quals la classe o estructura apuntada és accessible.\n" - "<li>Una sageta puntejada de color groc indica la relació entre una instància template i la classe template de què ha set instanciada." - " La sageta s'etiqueta amb els paràmetres template de la instància.\n" + "<li>Una sageta blau fosc remarca una relaci d'herncia de tipus pblica entre dues classes.\n" + "<li>Una sageta verd fosc remarca una relaci d'herncia de tipus protegida entre dues classes.\n" + "<li>Una sageta roig fosc remarca una relaci d'herncia de tipus privada entre dues classes.\n" + "<li>Una sageta puntejada de color porpra indica que una classe s continguda o usada per una altra classe." + " La sageta s'etiqueta amb la variable o variables a travs de les quals la classe o estructura apuntada s accessible.\n" + "<li>Una sageta puntejada de color groc indica la relaci entre una instncia template i la classe template de qu ha set instanciada." + " La sageta s'etiqueta amb els parmetres template de la instncia.\n" "</ul>\n"; } /*! text for the link to the legend page */ @@ -1126,7 +1126,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Used as a section header for KDE-2 IDL methods */ virtual QCString trDCOPMethods() { - return "Mètodes DCOP"; + return "Mtodes DCOP"; } ////////////////////////////////////////////////////////////////////////// @@ -1141,7 +1141,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Used as a section header for IDL property documentation */ virtual QCString trPropertyDocumentation() { - return "Documentació de les Propietats"; + return "Documentaci de les Propietats"; } ////////////////////////////////////////////////////////////////////////// @@ -1151,7 +1151,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Used for Java interfaces in the summary section of Java packages */ virtual QCString trInterfaces() { - return "Interfícies"; + return "Interfcies"; } /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() @@ -1178,7 +1178,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! The description of the package index page */ virtual QCString trPackageListDescription() { - return "Aquesta és la llista de paquets, amb una breu descripció (si se'n disposa):"; + return "Aquesta s la llista de paquets, amb una breu descripci (si se'n disposa):"; } /*! The link name in the Quick links header for each page */ virtual QCString trPackages() @@ -1188,7 +1188,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Used as a chapter title for Latex & RTF output */ virtual QCString trPackageDocumentation() { - return "Documentació dels Paquets"; + return "Documentaci dels Paquets"; } /*! Text shown before a multi-line define */ virtual QCString trDefineValue() @@ -1257,7 +1257,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Used as header RTF general index */ virtual QCString trRTFGeneralIndex() { - return "Índex"; + return "ndex"; } /*! This is used for translation of the word that will possibly @@ -1310,7 +1310,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 */ virtual QCString trPage(bool first_capital, bool singular) { - QCString result((first_capital ? "Pàgin" : "pàgin")); + QCString result((first_capital ? "Pgin" : "pgin")); if (!singular) result+="es"; else result+="a"; return result; } @@ -1369,7 +1369,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 */ virtual QCString trReferences() { - return "Referències"; + return "Referncies"; } ////////////////////////////////////////////////////////////////////////// @@ -1430,7 +1430,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Header used for the documentation section of a class' events. */ virtual QCString trEventDocumentation() { - return "Documentació dels Esdeveniments"; + return "Documentaci dels Esdeveniments"; } ////////////////////////////////////////////////////////////////////////// @@ -1455,7 +1455,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 */ virtual QCString trStaticPackageMembers() { - return "Funcions Estàtiques de Paquet"; + return "Funcions Esttiques de Paquet"; } /*! Used as a heading for a list of Java class variables with package * scope. @@ -1469,7 +1469,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 */ virtual QCString trStaticPackageAttribs() { - return "Atributs Estàtics de Paquet"; + return "Atributs Esttics de Paquet"; } ////////////////////////////////////////////////////////////////////////// @@ -1486,7 +1486,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 /*! Put in front of the call graph for a function. */ virtual QCString trCallGraph() { - return "Gràfic de crides d'aquesta funció:"; + return "Grfic de crides d'aquesta funci:"; } ////////////////////////////////////////////////////////////////////////// @@ -1506,7 +1506,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 */ virtual QCString trSearchResultsTitle() { - return "Resultats de la Búsqueda"; + return "Resultats de la Bsqueda"; } /*! This string is put just before listing the search results. The * text can be different depending on the number of documents found. @@ -1565,7 +1565,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * of the directories. */ virtual QCString trDirDocumentation() - { return "Documentació dels Directoris"; } + { return "Documentaci dels Directoris"; } /*! This is used as the title of the directory index and also in the * Quick links of a HTML page, to link to the directory hierarchy. @@ -1577,15 +1577,15 @@ class TranslatorCatalan : public TranslatorAdapter_1_4_1 * and the fact that it is sorted alphabetically per level */ virtual QCString trDirDescription() - { return "Aquesta jerarquia de directoris està ordenada toscament, " - "però no completa, de forma alfabètica:"; + { return "Aquesta jerarquia de directoris est ordenada toscament, " + "per no completa, de forma alfabtica:"; } /*! This returns the title of a directory page. The name of the * directory is passed via \a dirName. */ virtual QCString trDirReference(const char *dirName) - { QCString result="Referència del Directori "; result+=dirName; return result; } + { QCString result="Referncia del Directori "; result+=dirName; return result; } /*! This returns the word directory with or without starting capital * (\a first_capital) and in sigular or plural form (\a singular). diff --git a/src/translator_de.h b/src/translator_de.h index 7a5488b..cfa8896 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -99,6 +99,10 @@ // 2005/03/20 Jens Seidel (jensseidel@users.sourceforge.net) // - Updated for "new since 1.4.1" version // +// 2005/04/09 Jens Seidel (jensseidel@users.sourceforge.net) +// - Changed Todo list translation as suggested in +// http://bugzilla.gnome.org/show_bug.cgi?id=172818 +// // Todo: // - see FIXME @@ -1074,7 +1078,7 @@ class TranslatorGerman : public Translator /*! Used as the header of the todo list */ virtual QCString trTodoList() { - return "Liste der zu erledigenden Dinge"; + return "Ausstehende Aufgaben"; } ////////////////////////////////////////////////////////////////////////// diff --git a/src/translator_id.h b/src/translator_id.h new file mode 100644 index 0000000..a0d4b83 --- /dev/null +++ b/src/translator_id.h @@ -0,0 +1,1597 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2005 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. + * + */ + +#ifndef TRANSLATOR_ID_H +#define TRANSLATOR_ID_H + +/*! + Indonesian translator based on Doxygen 1.4.2. + + \version $Id$ + \author Hendy Irawan <ceefour@gauldong.net> + */ +class TranslatorIndonesian : 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 "indonesian"; } + + /*! 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 */ + 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 "Fungsi-fungsi Terkait"; } + + /*! subscript for the related functions. */ + virtual QCString trRelatedSubscript() + { return "(Catatan: Fungsi-fungsi tersebut bukan fungsi anggota.)"; } + + /*! header that is put before the detailed description of files, classes and namespaces. */ + virtual QCString trDetailedDescription() + { return "Keterangan Lengkap"; } + + /*! header that is put before the list of typedefs. */ + virtual QCString trMemberTypedefDocumentation() + { return "Dokumentasi Anggota: Tipe"; } + + /*! header that is put before the list of enumerations. */ + virtual QCString trMemberEnumerationDocumentation() + { return "Dokumentasi Anggota: Enumerasi"; } + + /*! header that is put before the list of member functions. */ + virtual QCString trMemberFunctionDocumentation() + { return "Dokumentasi Anggota: Fungsi"; } + + /*! header that is put before the list of member attributes. */ + virtual QCString trMemberDataDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentasi Variabel"; + } + else + { + return "Dokumentasi Anggota: Data"; + } + } + + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() + { return "Selengkapnya..."; } + + /*! put in the class documentation */ + virtual QCString trListOfAllMembers() + { return "Daftar semua anggota."; } + + /*! used as the title of the "list of all members" page of a class */ + virtual QCString trMemberList() + { return "Daftar anggota"; } + + /*! this is the first part of a sentence that is followed by a class name */ + virtual QCString trThisIsTheListOfAllMembers() + { return "Berikut ini daftar lengkap anggota untuk "; } + + /*! this is the remainder of the sentence after the class name */ + virtual QCString trIncludingInheritedMembers() + { return ", termasuk semua anggota yang diwariskan."; } + + /*! 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="Dihasilkan secara otomatis oleh Doxygen"; + if (s) result+=(QCString)" untuk "+s; + result+=" dari kode sumber."; + return result; + } + + /*! put after an enum name in the list of all members */ + virtual QCString trEnumName() + { return "nama enumerasi"; } + + /*! put after an enum value in the list of all members */ + virtual QCString trEnumValue() + { return "nilai enumerasi"; } + + /*! put after an undocumented member in the list of all members */ + virtual QCString trDefinedIn() + { return "didefinisikan di"; } + + // 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 "Modul"; } + + /*! This is put above each page as a link to the class hierarchy */ + virtual QCString trClassHierarchy() + { return "Struktur Kelas"; } + + /*! 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 "Struktur Data"; + } + else + { + return "Daftar Kelas"; + } + } + + /*! This is put above each page as a link to the list of documented files */ + virtual QCString trFileList() + { return "Daftar File"; } + + /*! This is put above each page as a link to the list of all verbatim headers */ + virtual QCString trHeaderFiles() + { return "File Header"; } + + /*! 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 "Variabel Data"; + } + else + { + return "Daftar Anggota: Kelas"; + } + } + + /*! 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 "Daftar Global"; + } + else + { + return "Daftar File"; + } + } + + /*! This is put above each page as a link to all related pages. */ + virtual QCString trRelatedPages() + { return "Halaman Terkait"; } + + /*! This is put above each page as a link to all examples. */ + virtual QCString trExamples() + { return "Contoh"; } + + /*! This is put above each page as a link to the search engine. */ + virtual QCString trSearch() + { return "Cari"; } + + /*! This is an introduction to the class hierarchy. */ + virtual QCString trClassHierarchyDescription() + { return "Struktur kelas ini diurutkan hampir sepenuhnya diurutkan berdasarkan abjad:"; + } + + /*! This is an introduction to the list with all files. */ + virtual QCString trFileListDescription(bool extractAll) + { + QCString result="Berikut ini daftar seluruh file dengan penjelasan singkat"; + if (!extractAll) result+=" yang didokumentasikan"; + result += ":"; + return result; + } + + /*! This is an introduction to the annotated compound list. */ + virtual QCString trCompoundListDescription() + { + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Berikut ini daftar struktur data beserta penjelasan singkat:"; + } + else + { + return "Berikut ini daftar kelas, struktur, gabungan, dan interface beserta penjelasan singkat:"; + } + } + + /*! This is an introduction to the page with all class members. */ + virtual QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="Berikut ini daftar seluruh "; + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="variabel struktur dan gabungan"; + } + else + { + result+="kelas"; + } + if (!extractAll) + { + result+=" yang didokumentasikan"; + } + result+=" dengan link ke "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="dokumentasi struktur/gabungan untuk tiap variabel:"; + } + else + { + result+="dokumentasi kelas untuk tiap anggota:"; + } + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="struktur/gabungan induk:"; + } + else + { + result+="kelas induk:"; + } + } + return result; + } + + /*! This is an introduction to the page with all file members. */ + virtual QCString trFileMembersDescription(bool extractAll) + { + QCString result="Berikut ini daftar "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="fungsi, variabel, konstanta, enumerasi, dan tipe"; + } + else + { + result+="file"; + } + if (!extractAll) result+=" yang didokumentasikan"; + result+=" dengan link ke "; + if (extractAll) + result+="file induk:"; + else + result+="dokumentasi:"; + return result; + } + + /*! This is an introduction to the page with the list of all header files. */ + virtual QCString trHeaderFilesDescription() + { return "Berikut ini daftar file header yang melingkupi API (Application Programming Interface) ini:"; } + + /*! This is an introduction to the page with the list of all examples */ + virtual QCString trExamplesDescription() + { return "Berikut ini daftar semua contoh:"; } + + /*! This is an introduction to the page with the list of related pages */ + virtual QCString trRelatedPagesDescription() + { return "Berikut ini daftar semua halaman dokumentasi yang terkait:"; } + + /*! This is an introduction to the page with the list of class/file groups */ + virtual QCString trModulesDescription() + { return "Berikut ini daftar semua modul:"; } + + /*! This sentences is used in the annotated class/file lists if no brief + * description is given. + */ + virtual QCString trNoDescriptionAvailable() + { return "Tidak ada keterangan tersedia"; } + + // index titles (the project name is prepended for these) + + + /*! This is used in HTML as the title of index.html. */ + virtual QCString trDocumentation() + { return "Dokumentasi"; } + + /*! This is used in LaTeX as the title of the chapter with the + * index of all groups. + */ + virtual QCString trModuleIndex() + { return "Indeks Modul"; } + + /*! This is used in LaTeX as the title of the chapter with the + * class hierarchy. + */ + virtual QCString trHierarchicalIndex() + { return "Indeks Struktur Kelas"; } + + /*! 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 "Indeks Struktur Data"; + } + else + { + return "Indeks Kelas"; + } + } + + /*! This is used in LaTeX as the title of the chapter with the + * list of all files. + */ + virtual QCString trFileIndex() + { return "Indeks File"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all groups. + */ + virtual QCString trModuleDocumentation() + { return "Dokumentasi Modul"; } + + /*! 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 "Dokumentasi Struktur Data"; + } + else + { + return "Dokumentasi Kelas"; + } + } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all files. + */ + virtual QCString trFileDocumentation() + { return "Dokumentasi File"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all examples. + */ + virtual QCString trExampleDocumentation() + { return "Dokumentasi Contoh"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all related pages. + */ + virtual QCString trPageDocumentation() + { return "Dokumentasi Halaman"; } + + /*! This is used in LaTeX as the title of the document */ + virtual QCString trReferenceManual() + { return "Dokumentasi Referensi"; } + + /*! This is used in the documentation of a file as a header before the + * list of defines + */ + virtual QCString trDefines() + { return "Konstanta"; } + + /*! This is used in the documentation of a file as a header before the + * list of function prototypes + */ + virtual QCString trFuncProtos() + { return "Prototipe Fungsi"; } + + /*! This is used in the documentation of a file as a header before the + * list of typedefs + */ + virtual QCString trTypedefs() + { return "Definisi Tipe"; } + + /*! This is used in the documentation of a file as a header before the + * list of enumerations + */ + virtual QCString trEnumerations() + { return "Enumerasi"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) functions + */ + virtual QCString trFunctions() + { return "Fungsi"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trVariables() + { return "Variabel"; } + + /*! This is used in the documentation of a file as a header before the + * list of (global) variables + */ + virtual QCString trEnumerationValues() + { return "Nilai enumerasi"; } + + /*! This is used in the documentation of a file before the list of + * documentation blocks for defines + */ + virtual QCString trDefineDocumentation() + { return "Dokumentasi Konstanta"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for function prototypes + */ + virtual QCString trFunctionPrototypeDocumentation() + { return "Dokumentasi Prototipe Fungsi"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for typedefs + */ + virtual QCString trTypedefDocumentation() + { return "Dokumentasi Definisi Tipe"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration types + */ + virtual QCString trEnumerationTypeDocumentation() + { return "Dokumentasi Tipe Enumerasi"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for enumeration values + */ + virtual QCString trEnumerationValueDocumentation() + { return "Dokumentasi Nilai Enumerasi"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for functions + */ + virtual QCString trFunctionDocumentation() + { return "Dokumentasi Fungsi"; } + + /*! This is used in the documentation of a file/namespace before the list + * of documentation blocks for variables + */ + virtual QCString trVariableDocumentation() + { return "Dokumentasi Variabel"; } + + /*! 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 "Struktur Data"; + } + else + { + return "Kelas"; + } + } + + /*! 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)"Dihasilkan pada tanggal "+date; + if (projName) result+=(QCString)" untuk "+projName; + result+=(QCString)" oleh"; + return result; + } + /*! This is part of the sentence used in the standard footer of each page. + */ + virtual QCString trWrittenBy() + { + return "ditulis oleh"; + } + + /*! this text is put before a class diagram */ + virtual QCString trClassDiagram(const char *clName) + { + return (QCString)"Diagram struktur kelas untuk "+clName+":"; + } + + /*! this text is generated when the \\internal command is used. */ + virtual QCString trForInternalUseOnly() + { return "Untuk kalangan sendiri."; } + + /*! this text is generated when the \\reimp command is used. */ + virtual QCString trReimplementedForInternalReasons() + { return "Di-reimplementasikan karena alasan internal; API tidak berubah."; } + + /*! this text is generated when the \\warning command is used. */ + virtual QCString trWarning() + { return "Peringatan"; } + + /*! this text is generated when the \\bug command is used. */ + virtual QCString trBugsAndLimitations() + { return "Bug dan keterbatasan"; } + + /*! this text is generated when the \\version command is used. */ + virtual QCString trVersion() + { return "Versi"; } + + /*! this text is generated when the \\date command is used. */ + virtual QCString trDate() + { return "Tanggal"; } + + /*! this text is generated when the \\return command is used. */ + virtual QCString trReturns() + { return "Mengembalikan"; } + + /*! this text is generated when the \\sa command is used. */ + virtual QCString trSeeAlso() + { return "Lihat juga"; } + + /*! this text is generated when the \\param command is used. */ + virtual QCString trParameters() + { return "Parameter"; } + + /*! this text is generated when the \\exception command is used. */ + virtual QCString trExceptions() + { return "Exception"; } + + /*! this text is used in the title page of a LaTeX document. */ + virtual QCString trGeneratedBy() + { return "Dihasilkan oleh"; } + + ////////////////////////////////////////////////////////////////////////// + // new since 0.49-990307 + ////////////////////////////////////////////////////////////////////////// + + /*! used as the title of page containing all the index of all namespaces. */ + virtual QCString trNamespaceList() + { return "Daftar Namespace"; } + + /*! used as an introduction to the namespace list */ + virtual QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Berikut ini daftar namespace beserta keterangan singkat"; + if (!extractAll) result+=" yang didokumentasikan"; + result+=":"; + return result; + } + + /*! used in the class documentation as a header before the list of all + * friends of a class + */ + virtual QCString trFriends() + { return "Friend"; } + + ////////////////////////////////////////////////////////////////////////// + // new since 0.49-990405 + ////////////////////////////////////////////////////////////////////////// + + /*! used in the class documentation as a header before the list of all + * related classes + */ + virtual QCString trRelatedFunctionDocumentation() + { return "Dokumentasi Friend Dan Fungsi Terkait"; } + + ////////////////////////////////////////////////////////////////////////// + // 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+=" Kelas"; break; + case ClassDef::Struct: result+=" Struktur"; break; + case ClassDef::Union: result+=" Gabungan"; break; + case ClassDef::Interface: result+=" Interface"; break; + case ClassDef::Protocol: result+=" Protokol"; break; + case ClassDef::Category: result+=" Kategori"; break; + case ClassDef::Exception: result+=" Exception"; break; + } + if (isTemplate) result+=" Template"; + result+=" Referensi"; + return result; + } + + /*! used as the title of the HTML page of a file */ + virtual QCString trFileReference(const char *fileName) + { + QCString result=fileName; + result+=" Referensi File"; + return result; + } + + /*! used as the title of the HTML page of a namespace */ + virtual QCString trNamespaceReference(const char *namespaceName) + { + QCString result=namespaceName; + result+=" Referensi Namespace"; + return result; + } + + virtual QCString trPublicMembers() + { return "Fungsi Anggota Publik"; } + virtual QCString trPublicSlots() + { return "Slot Publik"; } + virtual QCString trSignals() + { return "Signal"; } + virtual QCString trStaticPublicMembers() + { return "Fungsi Anggota Publik Statis"; } + virtual QCString trProtectedMembers() + { return "Fungsi Anggota Diproteksi"; } + virtual QCString trProtectedSlots() + { return "Slot Diproteksi"; } + virtual QCString trStaticProtectedMembers() + { return "Fungsi Anggota Diproteksi Statis"; } + virtual QCString trPrivateMembers() + { return "Fungsi Anggota Privat"; } + virtual QCString trPrivateSlots() + { return "Slot Privat"; } + virtual QCString trStaticPrivateMembers() + { return "Fungsi Anggota Privat Statis"; } + + /*! 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+=", dan "; + } + } + return result; + } + + /*! used in class documentation to produce a list of base classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritsList(int numEntries) + { + return "Mewarisi "+trWriteList(numEntries)+"."; + } + + /*! used in class documentation to produce a list of super classes, + * if class diagrams are disabled. + */ + virtual QCString trInheritedByList(int numEntries) + { + return "Diwariskan ke "+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 "Di-reimplementasikan dari "+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 "Di-reimplementasikan di "+trWriteList(numEntries)+"."; + } + + /*! This is put above each page as a link to all members of namespaces. */ + virtual QCString trNamespaceMembers() + { return "Anggota Namespace"; } + + /*! This is an introduction to the page with all namespace members */ + virtual QCString trNamespaceMemberDescription(bool extractAll) + { + QCString result="Berikut ini daftar anggota namespace "; + if (!extractAll) result+="yang didokumentasikan "; + result+="dengan link ke "; + if (extractAll) + result+="dokumentasi namespace untuk tiap anggota:"; + else + result+="namespace induk:"; + return result; + } + /*! This is used in LaTeX as the title of the chapter with the + * index of all namespaces. + */ + virtual QCString trNamespaceIndex() + { return "Indeks Namespace"; } + + /*! This is used in LaTeX as the title of the chapter containing + * the documentation of all namespaces. + */ + virtual QCString trNamespaceDocumentation() + { return "Dokumentasi Namespace"; } + + ////////////////////////////////////////////////////////////////////////// + // new since 0.49-990522 + ////////////////////////////////////////////////////////////////////////// + + /*! This is used in the documentation before the list of all + * namespaces in a file. + */ + virtual QCString trNamespaces() + { return "Daftar Namespace"; } + + ////////////////////////////////////////////////////////////////////////// + // 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)"Dokumentasi untuk "; + switch(compType) + { + case ClassDef::Class: result+="kelas"; break; + case ClassDef::Struct: result+="struktur"; break; + case ClassDef::Union: result+="gabungan"; break; + case ClassDef::Interface: result+="interface"; break; + case ClassDef::Protocol: result+="protokol"; break; + case ClassDef::Category: result+="kategori"; break; + case ClassDef::Exception: result+="exception"; break; + } + result+=" ini dihasilkan dari file"; + result+=single ? "" : "-file"; + result+=" berikut:"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + virtual QCString trAlphabeticalList() + { return "Daftar Berdasarkan Abjad"; } + + ////////////////////////////////////////////////////////////////////////// + // new since 0.49-990901 + ////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + virtual QCString trReturnValues() + { return "Nilai kembali"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + virtual QCString trMainPage() + { return "Halaman Utama"; } + + /*! 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 "hal."; } + + ////////////////////////////////////////////////////////////////////////// + // new since 0.49-991003 + ////////////////////////////////////////////////////////////////////////// + + virtual QCString trSources() + { + return "Sumber"; + } + virtual QCString trDefinedAtLineInSourceFile() + { + return "Definisi pada baris @0 di file @1."; + } + virtual QCString trDefinedInSourceFile() + { + return "Definisi pada baris @0."; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 0.49-991205 + ////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecated() + { + return "Kadaluarsa"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.0.0 + ////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + virtual QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Diagram kolaborasi untuk "+clName+":"; + } + /*! this text is put before an include dependency graph */ + virtual QCString trInclDepGraph(const char *fName) + { + return (QCString)"Diagram ketergantungan untuk "+fName+":"; + } + /*! header that is put before the list of constructor/destructors. */ + virtual QCString trConstructorDocumentation() + { + return "Dokumentasi Konstruktor & Destruktor"; + } + /*! Used in the file documentation to point to the corresponding sources. */ + virtual QCString trGotoSourceCode() + { + return "Ke kode sumber file ini."; + } + /*! Used in the file sources to point to the corresponding documentation. */ + virtual QCString trGotoDocumentation() + { + return "Ke dokumentasi file ini."; + } + /*! Text for the \\pre command */ + virtual QCString trPrecondition() + { + return "Kondisi Awal"; + } + /*! Text for the \\post command */ + virtual QCString trPostcondition() + { + return "Kondisi Akhir"; + } + /*! Text for the \\invariant command */ + virtual QCString trInvariant() + { + return "Invariant"; + } + /*! Text shown before a multi-line variable/enum initialization */ + virtual QCString trInitialValue() + { + return "Nilai awal:"; + } + /*! Text used the source code in the file index */ + virtual QCString trCode() + { + return "kode"; + } + virtual QCString trGraphicalHierarchy() + { + return "Struktur Kelas Berbasis Grafis"; + } + virtual QCString trGotoGraphicalHierarchy() + { + return "Ke struktur kelas berbasis grafis"; + } + virtual QCString trGotoTextualHierarchy() + { + return "Ke struktur kelas berbasis teks"; + } + virtual QCString trPageIndex() + { + return "Indeks Halaman"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.1.0 + ////////////////////////////////////////////////////////////////////////// + + virtual QCString trNote() + { + return "Catatan"; + } + virtual QCString trPublicTypes() + { + return "Tipe Publik"; + } + virtual QCString trPublicAttribs() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Variabel Data"; + } + else + { + return "Atribut Publik"; + } + } + virtual QCString trStaticPublicAttribs() + { + return "Atribut Publik Statis"; + } + virtual QCString trProtectedTypes() + { + return "Tipe Diproteksi"; + } + virtual QCString trProtectedAttribs() + { + return "Atribut Diproteksi"; + } + virtual QCString trStaticProtectedAttribs() + { + return "Atribut Diproteksi Statis"; + } + virtual QCString trPrivateTypes() + { + return "Tipe Privat"; + } + virtual QCString trPrivateAttribs() + { + return "Atribut Privat"; + } + virtual QCString trStaticPrivateAttribs() + { + return "Atribut Privat Statis"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.1.3 + ////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a \\todo item */ + virtual QCString trTodo() + { + return "Tugas"; + } + /*! Used as the header of the todo list */ + virtual QCString trTodoList() + { + return "Daftar Tugas"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.1.4 + ////////////////////////////////////////////////////////////////////////// + + virtual QCString trReferencedBy() + { + return "Direferensikan oleh"; + } + virtual QCString trRemarks() + { + return "Keterangan"; + } + virtual QCString trAttention() + { + return "Perhatian"; + } + virtual QCString trInclByDepGraph() + { + return "Diagram ini menampilkan file-file yang membutuhkan file ini baik secara langsung maupun tidak langsung:"; + } + virtual QCString trSince() + { + return "Sejak"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.1.5 + ////////////////////////////////////////////////////////////////////////// + + /*! title of the graph legend page */ + virtual QCString trLegendTitle() + { + return "Legenda Diagram"; + } + /*! 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 + "Halaman ini berisi keterangan cara membaca diagram yang dihasilkan " + "oleh doxygen.<p>\n" + "Contoh:\n" + "\\code\n" + "/*! Invisible class because of truncation */\n" + "class Invisible { };\n\n" + "/*! Truncated class, inheritance relation is hidden */\n" + "class Truncated : public Invisible { };\n\n" + "/* Class not documented with doxygen comments */\n" + "class Undocumented { };\n\n" + "/*! Class that is inherited using public inheritance */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! A template class */\n" + "template<class T> class Templ { };\n\n" + "/*! Class that is inherited using protected inheritance */\n" + "class ProtectedBase { };\n\n" + "/*! Class that is inherited using private inheritance */\n" + "class PrivateBase { };\n\n" + "/*! Class that is used by the Inherited class */\n" + "class Used { };\n\n" + "/*! Super class that inherits a number of other classes */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + "Apabila tag \\c MAX_DOT_GRAPH_HEIGHT di file konfigurasi " + "diset ke 240 kode di atas akan menghasilkan diagram berikut:" + "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "Kotak-kotak pada diagram di atas mempunyai arti sebagai berikut:\n" + "<ul>\n" + "<li>%Kotak hitam merupakan struktur atau kelas yang bersangkutan.\n" + "<li>%Kotak berbingkai hitam adalah struktur atau kelas yang mempunyai dokumentasi.\n" + "<li>%Kotak dengan bingkai abu-abu adalah struktur atau kelas tanpa dokumentasi.\n" + "<li>%Kotak dengan bingkai merah merupakan struktur atau kelas yang didokumentasikan tetapi" + "tidak semua relasinya ditampilkan. %Sebuah diagram " + "akan terpotong apabila lebih besar daripada ukuran yang ditentukan.\n" + "</ul>\n" + "Arti dari tanda-tanda panah adalah sebagai berikut:\n" + "<ul>\n" + "<li>%Panah biru tua menandakan pewarisan publik.\n" + "<li>%Panah hijau tua untuk pewarisan diproteksi.\n" + "<li>%Panah merah tua untuk pewarisan privat.\n" + "<li>%Panah ungu putus-putus menandakan kelas tersebut berhubungan dengan kelas lain. " + "Panah tersebut diberi judul sesuai dengan kelas atau struktur tujuan.\n" + "<li>%Panah kuning putus-putus menandakan hubungan antara sebuah template kelas dan " + "instance dari template tersebut. Panah tersebut diberi judul sesuai dengan " + "parameter template yang digunakan.\n" + "</ul>\n"; + } + /*! text for the link to the legend page */ + virtual QCString trLegend() + { + return "legenda"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.2.0 + ////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a test item */ + virtual QCString trTest() + { + return "Tes"; + } + /*! Used as the header of the test list */ + virtual QCString trTestList() + { + return "Daftar Tes"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.2.1 + ////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for KDE-2 IDL methods */ + virtual QCString trDCOPMethods() + { + return "Fungsi Anggota: DCOP"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.2.2 + ////////////////////////////////////////////////////////////////////////// + + /*! Used as a section header for IDL properties */ + virtual QCString trProperties() + { + return "Daftar Property"; + } + /*! Used as a section header for IDL property documentation */ + virtual QCString trPropertyDocumentation() + { + return "Dokumentasi Property"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.2.4 + ////////////////////////////////////////////////////////////////////////// + + /*! Used for Java interfaces in the summary section of Java packages */ + virtual QCString trInterfaces() + { + return "Daftar Interface"; + } + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Struktur Data"; + } + else + { + return "Daftar Kelas"; + } + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return (QCString)"Paket "+name; + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return "Daftar Paket"; + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return "Berikut ini daftar paket beserta keterangan singkat (apabila tersedia):"; + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return "Daftar Paket"; + } + /*! Used as a chapter title for Latex & RTF output */ + virtual QCString trPackageDocumentation() + { + return "Dokumentasi Paket"; + } + /*! Text shown before a multi-line define */ + virtual QCString trDefineValue() + { + return "Nilai:"; + } + + ////////////////////////////////////////////////////////////////////////// + // 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 "Daftar Bug"; + } + + ////////////////////////////////////////////////////////////////////////// + // 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 ? "Kelas" : "kelas")); + if (!singular) result+="-kelas"; + 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 ? "File" : "file")); + if (!singular) result+="-file"; + 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) + { + 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 ? "Kelompok" : "kelompok")); + if (!singular) result+="-kelompok"; + 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 ) + { + QCString result((first_capital ? "Halaman" : "halaman")); + //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 trMember(bool first_capital, bool ) + { + QCString result((first_capital ? "Anggota" : "anggota")); + //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 trField(bool first_capital, bool) + { + QCString result((first_capital ? "Variabel" : "variabel")); + //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 trGlobal(bool first_capital, bool) + { + 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) + { + QCString result((first_capital ? "Penulis" : "penulis")); + //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 "Referensi"; + } + + ////////////////////////////////////////////////////////////////////////// + // 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 "Mengimplementasikan "+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 "Diimplementasikan di "+trWriteList(numEntries)+"."; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.2.16 + ////////////////////////////////////////////////////////////////////////// + + /*! used in RTF documentation as a heading for the Table + * of Contents. + */ + virtual QCString trRTFTableOfContents() + { + return "Daftar Isi"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.2.17 + ////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Daftar Kadaluarsa"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.2.18 + ////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Event"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Dokumentasi Event"; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.3 + ////////////////////////////////////////////////////////////////////////// + + /*! Used as a heading for a list of Java class types with package scope. + */ + virtual QCString trPackageTypes() + { + return "Jenis Paket"; + } + /*! Used as a heading for a list of Java class functions with package + * scope. + */ + virtual QCString trPackageMembers() + { + return "Daftar Fungsi Paket"; + } + /*! Used as a heading for a list of static Java class functions with + * package scope. + */ + virtual QCString trStaticPackageMembers() + { + return "Daftar Fungsi Statis Paket"; + } + /*! Used as a heading for a list of Java class variables with package + * scope. + */ + virtual QCString trPackageAttribs() + { + return "Daftar Atribut Paket"; + } + /*! Used as a heading for a list of static Java class variables with + * package scope. + */ + virtual QCString trStaticPackageAttribs() + { + return "Daftar Atribut Statis Paket"; + } + + ////////////////////////////////////////////////////////////////////////// + // 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 "Semua"; + } + /*! Put in front of the call graph for a function. */ + virtual QCString trCallGraph() + { + return "Berikut ini diagram pemanggilan untuk fungsi ini:"; + } + + ////////////////////////////////////////////////////////////////////////// + // 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 "Cari"; + } + /*! This string is used as the title for the page listing the search + * results. + */ + virtual QCString trSearchResultsTitle() + { + return "Hasil Pencarian"; + } + /*! 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 "Maaf, tidak ada dokumen yang cocok."; + } + else if (numDocuments==1) + { + return "Ditemukan <b>1</b> dokumen yang cocok."; + } + else + { + return "Ditemukan <b>$num</b> documents yang cocok. " + "Menampilkan hasil terbaik lebih awal."; + } + } + /*! 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 "Kecocokan:"; + } + + ////////////////////////////////////////////////////////////////////////// + // 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 "Kode Sumber:" + filename; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.3.9 + ////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return "Struktur Direktori"; } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return "Dokumentasi Direktori"; } + + /*! This is used as the title of the directory index and also in the + * Quick links of an HTML page, to link to the directory hierarchy. + */ + virtual QCString trDirectories() + { return "Daftar Direktori"; } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return "Struktur direktori ini diurutkan hampir berdasarkan abjad:"; + } + + /*! This returns the title of a directory page. The name of the + * directory is passed via \a dirName. + */ + virtual QCString trDirReference(const char *dirName) + { QCString result="Referensi Direktori "; result+=dirName; return result; } + + /*! This returns the word directory with or without starting capital + * (\a first_capital) and in sigular or plural form (\a singular). + */ + virtual QCString trDir(bool first_capital, bool) + { + QCString result((first_capital ? "Direktori" : "direktori")); + //if (singular) result+="y"; else result+="ies"; + return result; + } + + ////////////////////////////////////////////////////////////////////////// + // new since 1.4.1 + ////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "Ini adalah fungsi yang di-overload. Perbedaannya dengan fungsi di atas hanya pada " + "parameter-parameter yang diterima."; + } +}; + +#endif diff --git a/src/translator_kr.h b/src/translator_kr.h index 2d6a1dd..7c0ecb0 100644 --- a/src/translator_kr.h +++ b/src/translator_kr.h @@ -59,10 +59,10 @@ // - ؼ ߸ κ ҳ ־ .. // // 2005.02.11 (SooYoung Jung: jung5000 at gmail.com) -// - Ǽ ߰Ǿ decode Լ +// - Ǽ ߰Ǿ decode Լ // // 2005.03.11 (SooYoung Jung: jung5000 at gmail.com) -// - Adapting 1.4.1 +// - Adapting 1.4.1 and checked using translator.py // - Ϻ ȵ κ (Translated little bit of untranslated part) // - Removed following // Obsolete methods (should be removed, never used): @@ -76,24 +76,13 @@ // virtual QCString trBugsAndLimitations() // virtual QCString trEnumerationValueDocumentation() // virtual QCString trNoDescriptionAvailable() +// - Changed the base class to Translator from Translator_1_4_1 // -class TranslatorKorean : public TranslatorAdapter_1_4_1 +class TranslatorKorean : public Translator { private: - // guess, unnecessary for Korean language - inline QCString decode(const QCString & sInput) - { - if (Config_getBool("USE_WINDOWS_ENCODING")) - { - return sInput; - } - else - { - return sInput; - } - } public: @@ -232,50 +221,25 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 /*! 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")) - { - //Alternate text: "ȥ ", "ռ() (Ʈ)" - return "ձ(Ŭ, ü, ü)"; - } - else - { - return "ձ(Ŭ, ü, ü)"; - } + //Alternate text: "ȥ ", "ռ() (Ʈ)" + return "ձ(Ŭ, ü, ü)"; } /*! This is put above each page as a link to the list of documented files */ virtual QCString trFileList() { return " "; } //" ", " Ʈ" - /*! This is put above each page as a link to the list of all verbatim headers */ - // virtual QCString trHeaderFiles() - // { return " "; } - /*! 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 "ձ(Ŭ, ü, ü) "; - } - else - { - // Alternate text: "ռ() ()" - return "ձ(Ŭ, ü, ü) "; - } + // Alternate text: "ռ() ()" + return "ձ(Ŭ, ü, ü) "; } /*! 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 " "; - } - else - { - return " "; - } + return " "; } /*! This is put above each page as a link to all related pages. */ @@ -306,16 +270,8 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 /*! This is an introduction to the annotated compound list. */ virtual QCString trCompoundListDescription() { - if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) - { - return " Ŭ, " - "ü, ü, ̽ Դϴ."; - } - else - { - return " Ŭ, " - "ü, ü, ̽ Դϴ."; - } + return " Ŭ, " + "ü, ü, ̽ Դϴ."; } /*! This is an introduction to the page with all class members. */ @@ -326,14 +282,8 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { result+="ȭ "; } - if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) - { - result+="ũ Ŭ "; - } - else - { - result+="ũ Ŭ "; - } + + result+="ũ Ŭ "; if (extractAll) result+=" Ŭ ȭ ϴ."; @@ -355,10 +305,6 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 return result; } - /*! This is an introduction to the page with the list of all header files. */ - // virtual QCString trHeaderFilesDescription() - // { return " API ϴ Դϴ."; } - /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() { return " Դϴ."; } @@ -371,15 +317,8 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 virtual QCString trModulesDescription() { return " Դϴ."; } - /*! This sentences is used in the annotated class/file lists if no brief - * description is given. - */ - // virtual QCString trNoDescriptionAvailable() - // { return " ϴ."; } - // index titles (the project name is prepended for these) - /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() { return "ȭ"; } @@ -509,12 +448,6 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { return " Ÿ ȭ"; } /*! This is used in the documentation of a file/namespace before the list - * of documentation blocks for enumeration values - */ - // virtual QCString trEnumerationValueDocumentation() - // { return " ȭ"; } - - /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ virtual QCString trFunctionDocumentation() @@ -548,14 +481,14 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { QCString result=""; if (projName) result+=(QCString)projName+" ȭ. "; - result += "Ͻ : " +(QCString)date+" by"; + result += "Ͻ : " +(QCString)date; return result; } /*! This is part of the sentence used in the standard footer of each page. */ virtual QCString trWrittenBy() { - return "written by"; + return "ۼ: "; } /*! this text is put before a class diagram */ @@ -568,18 +501,10 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 virtual QCString trForInternalUseOnly() { return " 븸 "; } - /*! this text is generated when the \\reimp command is used. */ - // virtual QCString trReimplementedForInternalReasons() - // { return " 籸: API ʾҴ."; } - /*! this text is generated when the \\warning command is used. */ virtual QCString trWarning() { return ""; } - /*! this text is generated when the \\bug command is used. */ - // virtual QCString trBugsAndLimitations() - // { return " Ѱ"; } - /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() { return ""; } @@ -818,8 +743,8 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 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; + case ClassDef::Category: result+="īװ"; break; case ClassDef::Exception: result+=""; break; } result+=" ȭ "; @@ -857,10 +782,6 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 // new since 0.49-991003 ////////////////////////////////////////////////////////////////////////// - // virtual QCString trSources() - // { - // return "ó"; - // } virtual QCString trDefinedAtLineInSourceFile() { return "@1 @0 ° ο "; @@ -966,7 +887,7 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Data ʵ"; + return "Ÿ ʵ"; } else { @@ -1059,85 +980,85 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { // TODO: Need to be translated. -ryk11/22/01. return - "Doxygen ǥ Դϴ.<p>\n" - //"This page explains how to interpret the graphs that are generated " - //"by doxygen.<p>\n" - " ϼ.\n" - //"Consider the following example:\n" - "\\code\n" - "/*! Invisible class because of truncation */\n" - "class Invisible { };\n\n" - "/*! Truncated class, inheritance relation is hidden */\n" - "class Truncated : public Invisible { };\n\n" - "/* Class not documented with doxygen comments */\n" - "class Undocumented { };\n\n" - "/*! Class that is inherited using public inheritance */\n" - "class PublicBase : public Truncated { };\n\n" - "/*! A template class */\n" - "template<class T> class Templ { };\n\n" - "/*! Class that is inherited using protected inheritance */\n" - "class ProtectedBase { };\n\n" - "/*! Class that is inherited using private inheritance */\n" - "class PrivateBase { };\n\n" - "/*! Class that is used by the Inherited class */\n" - "class Used { };\n\n" - "/*! Super class that inherits a number of other classes */\n" - "class Inherited : public PublicBase,\n" - " protected ProtectedBase,\n" - " private PrivateBase,\n" - " public Undocumented\n" - " public Templ<int>\n" - "{\n" - " private:\n" - " Used *m_usedClass;\n" - "};\n" - "\\endcode\n" - " MAX_DOT_GRAPH_HEIGHT ÷װ 240 Ǿٸ ̴." - //"If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file " - //"is set to 240 this will result in the following graph:" - "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" - "<p>\n" - "ڵ Ѵ.\n" - //"The boxes in the above graph have the following meaning:\n" - "<ul>\n" - "<li>% ڴ ü Ŭ Ѵ.\n" - //"<li>%A filled black box represents the struct or class for which the " - //"graph is generated.\n" - "<li>%ε ڴ ȭ ü Ŭ ǥѴ.\n" - //"<li>%A box with a black border denotes a documented struct or class.\n" - "<li>%ȸε ڴ ȭ ü Ŭ ǥѴ.\n" - //"<li>%A box with a grey border denotes an undocumented struct or class.\n" - "<li>%ε ڴ /containment 踦 ȭ ü Ŭ Ÿ. " - " ȿ ©.\n" - //"<li>%A box with a red border denotes a documented struct or class for" - //"which not all inheritance/containment relations are shown. %A graph is " - //"truncated if it does not fit within the specified boundaries.\n" - "</ul>\n" - "ȭǥ Ѵ.\n" - //"The arrows have the following meaning:\n" - "<ul>\n" - "<li>%ο Ķ ȭǥ Ŭ public Ӱ踦 Ÿ.\n" - //"<li>%A dark blue arrow is used to visualize a public inheritance " - //"relation between two classes.\n" - "<li>%ο ȭǥ protected Ӱ踦 Ÿ.\n" - //"<li>%A dark green arrow is used for protected inheritance.\n" - "<li>%ο ȭǥ private Ӱ踦 Ÿ.\n" - //"<li>%A dark red arrow is used for private inheritance.\n" - "<li>% ֻ ȭǥ Ŭ ԵǴ Ŭ Ÿ. " - " ȭǥ Ÿ.\n" - //"<li>%A purple dashed arrow is used if a class is contained or used " - //"by another class. The arrow is labeled with the variable(s) " - //"through which the pointed class or struct is accessible.\n" - "<li>% ȭǥ ø νϽ ø Ŭ Ÿ. " - " ȭǥ νϽ ø Ű Ÿ.\n" - //"<li>%A yellow dashed arrow denotes a relation between a template instance and " - //"the template class it was instantiated from. The arrow is labeled with " - //"the template parameters of the instance.\n" - "</ul>\n"; + "Doxygen ǥ Դϴ.<p>\n" + //"This page explains how to interpret the graphs that are generated " + //"by doxygen.<p>\n" + " ϼ.\n" + //"Consider the following example:\n" + "\\code\n" + "/*! Invisible class because of truncation */\n" + "class Invisible { };\n\n" + "/*! Truncated class, inheritance relation is hidden */\n" + "class Truncated : public Invisible { };\n\n" + "/* Class not documented with doxygen comments */\n" + "class Undocumented { };\n\n" + "/*! Class that is inherited using public inheritance */\n" + "class PublicBase : public Truncated { };\n\n" + "/*! A template class */\n" + "template<class T> class Templ { };\n\n" + "/*! Class that is inherited using protected inheritance */\n" + "class ProtectedBase { };\n\n" + "/*! Class that is inherited using private inheritance */\n" + "class PrivateBase { };\n\n" + "/*! Class that is used by the Inherited class */\n" + "class Used { };\n\n" + "/*! Super class that inherits a number of other classes */\n" + "class Inherited : public PublicBase,\n" + " protected ProtectedBase,\n" + " private PrivateBase,\n" + " public Undocumented\n" + " public Templ<int>\n" + "{\n" + " private:\n" + " Used *m_usedClass;\n" + "};\n" + "\\endcode\n" + " MAX_DOT_GRAPH_HEIGHT ÷װ 240 Ǿٸ ̴." + //"If the \\c MAX_DOT_GRAPH_HEIGHT tag in the configuration file " + //"is set to 240 this will result in the following graph:" + "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n" + "<p>\n" + "ڵ Ѵ.\n" + //"The boxes in the above graph have the following meaning:\n" + "<ul>\n" + "<li>% ڴ ü Ŭ Ѵ.\n" + //"<li>%A filled black box represents the struct or class for which the " + //"graph is generated.\n" + "<li>%ε ڴ ȭ ü Ŭ ǥѴ.\n" + //"<li>%A box with a black border denotes a documented struct or class.\n" + "<li>%ȸε ڴ ȭ ü Ŭ ǥѴ.\n" + //"<li>%A box with a grey border denotes an undocumented struct or class.\n" + "<li>%ε ڴ /containment 踦 ȭ ü Ŭ Ÿ. " + " ȿ ©.\n" + //"<li>%A box with a red border denotes a documented struct or class for" + //"which not all inheritance/containment relations are shown. %A graph is " + //"truncated if it does not fit within the specified boundaries.\n" + "</ul>\n" + "ȭǥ Ѵ.\n" + //"The arrows have the following meaning:\n" + "<ul>\n" + "<li>%ο Ķ ȭǥ Ŭ public Ӱ踦 Ÿ.\n" + //"<li>%A dark blue arrow is used to visualize a public inheritance " + //"relation between two classes.\n" + "<li>%ο ȭǥ protected Ӱ踦 Ÿ.\n" + //"<li>%A dark green arrow is used for protected inheritance.\n" + "<li>%ο ȭǥ private Ӱ踦 Ÿ.\n" + //"<li>%A dark red arrow is used for private inheritance.\n" + "<li>% ֻ ȭǥ Ŭ ԵǴ Ŭ Ÿ. " + " ȭǥ Ÿ.\n" + //"<li>%A purple dashed arrow is used if a class is contained or used " + //"by another class. The arrow is labeled with the variable(s) " + //"through which the pointed class or struct is accessible.\n" + "<li>% ȭǥ ø νϽ ø Ŭ Ÿ. " + " ȭǥ νϽ ø Ű Ÿ.\n" + //"<li>%A yellow dashed arrow denotes a relation between a template instance and " + //"the template class it was instantiated from. The arrow is labeled with " + //"the template parameters of the instance.\n" + "</ul>\n"; } /*! text for the link to the legend page */ virtual QCString trLegend() - { + { return ""; } @@ -1185,11 +1106,6 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 // new since 1.2.4 ////////////////////////////////////////////////////////////////////////// - /*! Used for Java interfaces in the summary section of Java packages */ - // virtual QCString trInterfaces() - // { - // return "̽"; - // } /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() { @@ -1222,11 +1138,6 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { return "Ű"; } - /*! Used as a chapter title for Latex & RTF output */ - // virtual QCString trPackageDocumentation() - // { - // return "Ű ȭ"; - // } /*! Text shown before a multi-line define */ virtual QCString trDefineValue() { @@ -1294,29 +1205,29 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 /*! Used as header RTF general index */ virtual QCString trRTFGeneralIndex() { - return "ε"; // TODO: Need to be translated. -ryk11/22/01. + return "ε"; } /*! 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) + virtual QCString trClass(bool, bool singular) { - QCString result((first_capital ? "Ŭ" : "Ŭ")); + QCString result("Ŭ"); if (!singular) result+=""; - return result; // TODO: Need to be translated. -ryk11/22/01. + 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) + virtual QCString trFile(bool, bool singular) { - QCString result((first_capital ? "" : "")); + QCString result(""); if (!singular) result+=""; - return result; // TODO: Need to be translated. -ryk11/22/01. + return result; } /*! This is used for translation of the word that will possibly @@ -1334,22 +1245,22 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 * be followed by a single name or by a list of names * of the category. */ - virtual QCString trGroup(bool first_capital, bool singular) + virtual QCString trGroup(bool, bool singular) { - QCString result((first_capital ? "" : "")); + QCString result(""); if (!singular) result+=""; - return result; // TODO: Need to be translated. -ryk11/22/01. + 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) + virtual QCString trPage(bool, bool singular) { - QCString result((first_capital ? "" : "")); + QCString result(""); if (!singular) result+=""; - return result; // TODO: Need to be translated. -ryk11/22/01. + return result; } /*! This is used for translation of the word that will possibly @@ -1360,29 +1271,18 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { QCString result((first_capital ? "" : "")); if (!singular) result+=""; - return result; // TODO: Need to be translated. -ryk11/22/01. + 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 ? "ʵ" : "ʵ")); - // if (!singular) result+=""; - // return result; // TODO: Need to be translated. -ryk11/22/01. - // } - - /*! 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; // TODO: Need to be translated. -ryk11/22/01. + return result; } ////////////////////////////////////////////////////////////////////////// @@ -1391,11 +1291,11 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 /*! 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) + virtual QCString trAuthor(bool, bool singular) { - QCString result((first_capital ? "ۼ" : "ۼ")); + QCString result("ۼ"); if (!singular) result+=""; - return result; // TODO: Need to be translated. -ryk11/22/01. + return result; } ////////////////////////////////////////////////////////////////////////// @@ -1406,7 +1306,7 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 */ virtual QCString trReferences() { - return ""; // TODO: Need to be translated. -ryk11/22/01. + return ""; } ////////////////////////////////////////////////////////////////////////// @@ -1418,8 +1318,7 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 */ virtual QCString trImplementedFromList(int numEntries) { - //return "Implements "+trWriteList(numEntries)+"."; - return trWriteList(numEntries)+" ."; + return trWriteList(numEntries)+" ."; } /*! used in member documentation blocks to produce a list of @@ -1427,8 +1326,7 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 */ virtual QCString trImplementedInList(int numEntries) { - //return "Implemented in "+trWriteList(numEntries)+"."; - return trWriteList(numEntries)+" Ǿ."; + return trWriteList(numEntries)+" Ǿ."; } ////////////////////////////////////////////////////////////////////////// @@ -1480,35 +1378,35 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 */ 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 " Ű Ӽ"; } ////////////////////////////////////////////////////////////////////////// @@ -1526,7 +1424,6 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 virtual QCString trCallGraph() { return " Լ ȣ Դϴ:"; - //"Here is the call graph for this function:"; } ////////////////////////////////////////////////////////////////////////// @@ -1560,20 +1457,20 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 { if (numDocuments==0) { - //return "Sorry, no documents matching your query."; - return "˼մϴ. ǿ ġϴ ϴ."; + //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> ãҽϴ."; + //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> ãҽϴ. " - "ó ġϴ Դϴ."; + //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 @@ -1637,13 +1534,27 @@ class TranslatorKorean : public TranslatorAdapter_1_4_1 */ virtual QCString trDir(bool /*first_capital*/, bool /*singular*/) { - // QCString result((first_capital ? "Director" : "director")); - // if (singular) result+="y"; else result+="ies"; - - // return result; return ""; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.4.1 +////////////////////////////////////////////////////////////////////////// + + /*! This text is added to the documentation when the \\overload command + * is used for a overloaded function. + */ + virtual QCString trOverloadText() + { + return "̰ Ǵ ε Լ̴, " + " ƱԸƮ(argument) װ Ҷ Լ ٸ."; + + } + + }; #endif + + diff --git a/src/util.cpp b/src/util.cpp index 368fe50..7c6e298 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -141,7 +141,7 @@ int iSystem(const char *command,const char *args,bool isBatchFile) } fullCmd += " "; fullCmd += args; - Debug::print(Debug::ExtCmd,0,"Executing external command \"%s\"\n",fullCmd.data()); + Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",fullCmd.data()); #if !defined(_WIN32) || defined(__CYGWIN__) isBatchFile=isBatchFile; @@ -3354,6 +3354,7 @@ bool getScopeDefs(const char *docScope,const char *scope, static bool isLowerCase(QCString &s) { char *p=s.data(); + if (p==0) return TRUE; int c; while ((c=*p++)) if (!islower(c)) return FALSE; return TRUE; diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index de9473c..998ace4 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -805,6 +805,11 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De << md->getDefLine() << "\""; if (md->getStartBodyLine()!=-1) { + FileDef *bodyDef = md->getBodyDef(); + if (bodyDef) + { + t << " bodyfile=\"" << bodyDef->absFilePath() << "\""; + } t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\"" << md->getEndBodyLine() << "\""; } @@ -1220,6 +1225,11 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) << cd->getDefLine() << "\""; if (cd->getStartBodyLine()!=-1) { + FileDef *bodyDef = cd->getBodyDef(); + if (bodyDef) + { + t << " bodyfile=\"" << bodyDef->absFilePath() << "\""; + } t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\"" << cd->getEndBodyLine() << "\""; } @@ -1564,7 +1574,8 @@ static void generateXMLForPage(PageDef *pd,QTextStream &ti,bool isExample) t << "\" kind=\"" << kindName << "\">" << endl; t << " <compoundname>" << convertToXML(pd->name()) << "</compoundname>" << endl; - SectionInfo *si = Doxygen::sectionDict.find(pd->name()); + + SectionInfo *si = Doxygen::sectionDict.find(pageName); if (si) { t << " <title>" << convertToXML(si->title) << "</title>" << endl; |