diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2005-04-21 21:10:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2005-04-21 21:10:51 (GMT) |
commit | 4a8c2f5c896a1883a0611d972952a68498002ae5 (patch) | |
tree | 81218085d3e6e15b1ce6c418734013d48e9deda8 /src | |
parent | 570375c30adbdb66714d465d849b18e0df9dd6e6 (diff) | |
download | Doxygen-4a8c2f5c896a1883a0611d972952a68498002ae5.zip Doxygen-4a8c2f5c896a1883a0611d972952a68498002ae5.tar.gz Doxygen-4a8c2f5c896a1883a0611d972952a68498002ae5.tar.bz2 |
Release-1.4.2-20050421
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 10 | ||||
-rw-r--r-- | src/code.l | 8 | ||||
-rw-r--r-- | src/commentcnv.l | 6 | ||||
-rw-r--r-- | src/commentscan.l | 30 | ||||
-rw-r--r-- | src/config.l | 5 | ||||
-rw-r--r-- | src/definition.cpp | 5 | ||||
-rw-r--r-- | src/definition.h | 2 | ||||
-rw-r--r-- | src/docparser.cpp | 73 | ||||
-rw-r--r-- | src/doctokenizer.h | 1 | ||||
-rw-r--r-- | src/doctokenizer.l | 5 | ||||
-rw-r--r-- | src/dot.cpp | 4 | ||||
-rw-r--r-- | src/doxygen.cpp | 82 | ||||
-rw-r--r-- | src/entry.h | 12 | ||||
-rw-r--r-- | src/htmlhelp.cpp | 10 | ||||
-rw-r--r-- | src/htmlhelp.h | 3 | ||||
-rw-r--r-- | src/index.cpp | 6 | ||||
-rw-r--r-- | src/memberdef.cpp | 94 | ||||
-rw-r--r-- | src/pre.l | 63 | ||||
-rw-r--r-- | src/scanner.l | 7 | ||||
-rw-r--r-- | src/sortdict.h | 8 | ||||
-rw-r--r-- | src/translator_hu.h | 366 | ||||
-rw-r--r-- | src/util.cpp | 123 | ||||
-rw-r--r-- | src/util.h | 1 |
23 files changed, 551 insertions, 373 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 3c70485..35b976a 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1856,8 +1856,11 @@ void ClassDef::setTemplateArguments(ArgumentList *al) */ bool ClassDef::hasNonReferenceSuperClass() { - bool found=!isReference(); - if (found) return TRUE; // we're done if this class is not a reference + bool found=!isReference() && isLinkableInProject(); + if (found) + { + return TRUE; // we're done if this class is not a reference + } BaseClassListIterator bcli(*m_inheritedBy); for ( ; bcli.current() && !found ; ++bcli ) // for each super class { @@ -2879,6 +2882,7 @@ void ClassDef::getTemplateParameterLists(QList<ArgumentList> &lists) const QCString ClassDef::qualifiedNameWithTemplateParameters( QList<ArgumentList> *actualParams) const { + static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); //printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data()); QCString scName; Definition *d=getOuterScope(); @@ -2896,7 +2900,7 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( } QCString scopeSeparator; - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + if (optimizeOutputJava) scopeSeparator="."; else scopeSeparator="::"; @@ -272,10 +272,11 @@ ClassDef *VariableContext::findVariable(const QCString &name) ClassDef *result = 0; QListIterator<Scope> sli(m_scopes); Scope *scope; + QCString key = name; // search from inner to outer scope for (sli.toLast();(scope=sli.current());--sli) { - result = scope->find(name); + result = scope->find(key); if (result) { DBG_CTX((stderr,"** findVariable(%s)=%p\n",name.data(),result)); @@ -2433,7 +2434,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} <MemberCall,MemberCall2,FuncCall>")" { g_theVarContext.addVariable(g_parmType,g_parmName); g_theCallContext.popScope(); - g_theCallContext.setClass(0); + //g_theCallContext.setClass(0); // commented out, otherwise a()->b() does not work for b(). g_code->codify(yytext); if (--g_bracketCount<=0) { @@ -2461,8 +2462,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} g_theVarContext.addVariable(g_type,g_name); } g_parmType.resize(0);g_parmName.resize(0); - //g_theCallContext.popScope(); - //g_theCallContext.setClass(0); + g_theCallContext.setClass(0); if (*yytext==';' || g_insideBody) { if (!g_insideBody) diff --git a/src/commentcnv.l b/src/commentcnv.l index c93b0c0..d1c4ad7 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -523,8 +523,10 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) while (!g_condStack.isEmpty()) { CondCtx *ctx = g_condStack.pop(); - warn(g_fileName,ctx->lineNr,"Conditional section with %s does not have " - "a corresponding \\endcond command within this file.",ctx->sectionId.data()); + QCString sectionInfo = " "; + if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label %s ",ctx->sectionId.data()); + warn(g_fileName,ctx->lineNr,"Conditional section%sdoes not have " + "a corresponding \\endcond command within this file.",sectionInfo.data()); } if (Debug::isFlagSet(Debug::CommentCnv)) { diff --git a/src/commentscan.l b/src/commentscan.l index bcbd296..bbb0ab6 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -267,7 +267,8 @@ enum OutputContext enum GuardType { Guard_If, - Guard_IfNot + Guard_IfNot, + Guard_Skip }; class GuardedSection @@ -305,6 +306,7 @@ static QCString blockName; // preformatted block name (e.g. ve static XRefKind xrefKind; // kind of cross-reference command static XRefKind newXRefKind; // static GuardType guardType; // kind of guard for conditional section +static bool enabledSectionFound; static QCString nameHeader; // heading of the @name command static QCString functionProto; // function prototype static QStack<GuardedSection> guards; // tracks nested conditional sections (if,ifnot,..) @@ -548,8 +550,10 @@ static inline void setOutput(OutputContext ctx) { bool xrefAppendToPrev = xrefAppendFlag; // determine append flag for the next item (i.e. the end of this item) - xrefAppendFlag = ctx==OutputXRef && newXRefKind==xrefKind && - (xrefKind!=XRef_Item || newXRefItemKey==xrefItemKey); + xrefAppendFlag = inContext==OutputXRef && ctx==OutputXRef && // two consecutive xref items + newXRefKind==xrefKind && // of the same kind + (xrefKind!=XRef_Item || + newXRefItemKey==xrefItemKey); // with the same key if \xrefitem //printf("refKind=%d newXRefKind=%d xrefAppendToPrev=%d xrefAppendFlag=%d\n", // xrefKind,newXRefKind,xrefAppendToPrev,xrefAppendFlag); xrefItemKey = newXRefItemKey; @@ -1386,11 +1390,15 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) ) // section is visible { guards.push(new GuardedSection(TRUE,TRUE)); + enabledSectionFound=TRUE; BEGIN( Comment ); } else // section is invisible { - guards.push(new GuardedSection(FALSE,TRUE)); + if (guardType!=Guard_Skip) + { + guards.push(new GuardedSection(FALSE,TRUE)); + } BEGIN( SkipGuardedSection ); } } @@ -1443,10 +1451,11 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) } else { - if (guards.top()->parentVisible()) + if (!enabledSectionFound && guards.top()->parentVisible()) { delete guards.pop(); guards.push(new GuardedSection(TRUE,TRUE)); + enabledSectionFound=TRUE; BEGIN( Comment ); } } @@ -1459,7 +1468,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) } else { - if (guards.top()->parentVisible()) + if (!enabledSectionFound && guards.top()->parentVisible()) { delete guards.pop(); BEGIN( GuardParam ); @@ -1828,6 +1837,7 @@ static void handleRefItem(const QCString &) static void handleSection(const QCString &s) { + setOutput(OutputDoc); addOutput("@"+s+" "); BEGIN(SectionLabel); } @@ -1868,12 +1878,14 @@ static void handleAddIndex(const QCString &) static void handleIf(const QCString &) { + enabledSectionFound=FALSE; guardType = Guard_If; BEGIN(GuardParam); } static void handleIfNot(const QCString &) { + enabledSectionFound=FALSE; guardType = Guard_IfNot; BEGIN(GuardParam); } @@ -1887,7 +1899,7 @@ static void handleElseIf(const QCString &) } else { - guardType = Guard_If; + guardType = enabledSectionFound ? Guard_Skip : Guard_If; BEGIN(GuardParam); } } @@ -1916,6 +1928,7 @@ static void handleEndIf(const QCString &) { delete guards.pop(); } + enabledSectionFound=FALSE; } static void handleIngroup(const QCString &) @@ -2058,8 +2071,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); } - // strip any leading/trailing whitespace - current->doc=current->doc.stripWhiteSpace(); + current->doc=stripLeadingAndTrailingEmptyLines(current->doc); if (current->section==Entry::FILEDOC_SEC && current->doc.isEmpty()) { diff --git a/src/config.l b/src/config.l index bf7f30d..4750d59 100644 --- a/src/config.l +++ b/src/config.l @@ -1734,6 +1734,7 @@ void Config::create() "provided by doxygen. Whatever the progam writes to standard output \n" "is used as the file version. See the manual for examples. \n" ); + cs->setWidgetType(ConfigString::File); //----------------------------------------------------------------------------------------------- addInfo( "Messages","configuration options related to warning and progress messages"); @@ -1791,6 +1792,7 @@ void Config::create() "and error messages should be written. If left blank the output is written \n" "to stderr. \n" ); + cs->setWidgetType(ConfigString::File); //----------------------------------------------------------------------------------------------- addInfo( "Input","configuration options related to the input files"); //----------------------------------------------------------------------------------------------- @@ -1877,6 +1879,7 @@ void Config::create() "to standard output. If FILTER_PATTERNS is specified, this tag will be \n" "ignored. \n" ); + cs->setWidgetType(ConfigString::File); cl = addList( "FILTER_PATTERNS", "The FILTER_PATTERNS tag can be used to specify filters on a per file pattern \n" @@ -2041,6 +2044,7 @@ void Config::create() "can add a path in front of the file if the result should not be \n" "written to the html output directory. \n" ); + cs->setWidgetType(ConfigString::File); cs->addDependency("GENERATE_HTML"); cs = addString( "HHC_LOCATION", @@ -2049,6 +2053,7 @@ void Config::create() "the HTML help compiler (hhc.exe). If non-empty doxygen will try to run \n" "the HTML help compiler on the generated index.hhp.\n" ); + cs->setWidgetType(ConfigString::File); cs->addDependency("GENERATE_HTML"); cb = addBool( "GENERATE_CHI", diff --git a/src/definition.cpp b/src/definition.cpp index 64db73d..ad35e26 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -177,9 +177,10 @@ void Definition::setDocumentation(const char *d,const char *docFile,int docLine, { if (d==0) return; //printf("Definition::setDocumentation(%s,%s,%d,%d)\n",d,docFile,docLine,stripWhiteSpace); - QCString doc; + QCString doc = d; if (stripWhiteSpace) { +#if 0 // strip leading empty lines in front of the text, but not the // leading spaces in front of the first line, so list items are // parsed with the correct indent @@ -201,6 +202,8 @@ void Definition::setDocumentation(const char *d,const char *docFile,int docLine, doc.at(e)='\0'; e--; } +#endif + doc = stripLeadingAndTrailingEmptyLines(doc); } else // don't strip whitespace { diff --git a/src/definition.h b/src/definition.h index d4e4f7a..c766652 100644 --- a/src/definition.h +++ b/src/definition.h @@ -79,7 +79,7 @@ class Definition virtual QCString getOutputFileBase() const = 0; /*! Returns the name of the source listing of this file. */ - const QCString getSourceFileBase() const { ASSERT(0); return "NULL"; } + virtual QCString getSourceFileBase() const { ASSERT(0); return "NULL"; } /*! Returns the detailed description of this definition */ const QCString& documentation() const { return m_doc; } diff --git a/src/docparser.cpp b/src/docparser.cpp index c3208eb..d69f6a9 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -886,9 +886,21 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) } children.append(new DocLinkedWord(parent,name, - compound->getReference(), - compound->getOutputFileBase(), - "" + compound->getReference(), + compound->getOutputFileBase(), + "" + ) + ); + } + else if (compound->definitionType()==Definition::TypeFile && + ((FileDef*)compound)->generateSourceFile() + ) // undocumented file that has source code we can link to + { + children.append(new + DocLinkedWord(parent,g_token->name, + compound->getReference(), + compound->getSourceFileBase(), + "" ) ); } @@ -1915,15 +1927,16 @@ DocRef::DocRef(DocNode *parent,const QString &target) : m_refToSection = sec->type!=SectionInfo::Anchor; //printf("m_text=%s,m_ref=%s,m_file=%s,m_refToAnchor=%d\n", // m_text.data(),m_ref.data(),m_file.data(),m_refToAnchor); + return; } - else if (resolveLink(g_context,target,TRUE,&compound,/*&pageInfo,*/anchor)) + else if (resolveLink(g_context,target,TRUE,&compound,anchor)) { bool isFile = compound ? (compound->definitionType()==Definition::TypeFile ? TRUE : FALSE) : FALSE; m_text = linkToText(target,isFile); m_anchor = anchor; - if (compound) // ref to compound + if (compound && compound->isLinkable()) // ref to compound { if (anchor.isEmpty() && /* compound link */ compound->definitionType()==Definition::TypeGroup && /* is group */ @@ -1935,18 +1948,20 @@ DocRef::DocRef(DocNode *parent,const QString &target) : m_file = compound->getOutputFileBase(); m_ref = compound->getReference(); + return; } - else + else if (compound->definitionType()==Definition::TypeFile && + ((FileDef*)compound)->generateSourceFile() + ) // undocumented file that has source code we can link to { - err("%s:%d: Internal error: resolveLink successful but no compound found!\n",__FILE__,__LINE__); + m_file = compound->getSourceFileBase(); + m_ref = compound->getReference(); + return; } } - else // oops, bogus target - { - m_text = linkToText(target,FALSE); - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve reference to `%s' for \\ref command", + m_text = linkToText(target,FALSE); + warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve reference to `%s' for \\ref command", target.data()); - } } void DocRef::parse() @@ -1998,25 +2013,27 @@ DocLink::DocLink(DocNode *parent,const QString &target) : m_refText = m_refText.right(m_refText.length()-1); } if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock, - &compound,/*&page,*/anchor)) + &compound,anchor)) { m_anchor = anchor; - if (compound) + if (compound && compound->isLinkable()) { m_file = compound->getOutputFileBase(); m_ref = compound->getReference(); } - //else if (page) - //{ - // m_file = page->getOutputFileBase(); - // m_ref = page->getReference(); - //} - } - else // oops, bogus target - { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve link to `%s' for \\link command", - target.data()); + else if (compound->definitionType()==Definition::TypeFile && + ((FileDef*)compound)->generateSourceFile() + ) // undocumented file that has source code we can link to + { + m_file = compound->getSourceFileBase(); + m_ref = compound->getReference(); + } + return; } + + // bogus link target + warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve link to `%s' for \\link command", + target.data()); } @@ -2205,6 +2222,14 @@ void DocImage::parse() int tok; while ((tok=doctokenizerYYlex())) { + if (tok==TK_WORD && (g_token->name=="width=" || g_token->name=="height=")) + { + // special case: no title, but we do have a size indicator + doctokenizerYYsetStateTitleAttrValue(); + // strip = + g_token->name=g_token->name.left(g_token->name.length()-1); + break; + } if (!defaultHandleToken(this,tok,m_children)) { switch (tok) diff --git a/src/doctokenizer.h b/src/doctokenizer.h index a867c5c..e7ee442 100644 --- a/src/doctokenizer.h +++ b/src/doctokenizer.h @@ -122,6 +122,7 @@ bool doctokenizerYYpopContext(); int doctokenizerYYlex(); void doctokenizerYYsetStatePara(); void doctokenizerYYsetStateTitle(); +void doctokenizerYYsetStateTitleAttrValue(); void doctokenizerYYsetStateCode(); void doctokenizerYYsetStateHtmlOnly(); void doctokenizerYYsetStateManOnly(); diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 18c3060..2834b6c 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -931,6 +931,11 @@ void doctokenizerYYsetStateTitle() BEGIN(St_Title); } +void doctokenizerYYsetStateTitleAttrValue() +{ + BEGIN(St_TitleV); +} + void doctokenizerYYsetStateCode() { g_token->verb=""; diff --git a/src/dot.cpp b/src/dot.cpp index d13a7ff..f26b82a 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -713,7 +713,7 @@ void DotNode::writeArrow(QTextStream &t, << "\",fontsize=10,style=\"" << edgeStyleMap[ei->m_style] << "\""; if (!ei->m_label.isEmpty()) { - t << ",label=\"" << ei->m_label << "\""; + t << ",label=\"" << convertLabel(ei->m_label) << "\""; } if (Config_getBool("UML_LOOK") && arrowStyle[ei->m_color] && @@ -3217,7 +3217,7 @@ void DotGroupCollaboration::Edge::write( QTextStream &t, int& ) for( lli.toFirst(); (link=lli.current()); ++lli) { if (first) first=FALSE; else t << "\\n"; - t << link->label; + t << convertLabel(link->label); } t << "\""; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 5a6b965..9e0d500 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -724,29 +724,10 @@ static void addClassToContext(Entry *root) if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1) { cd->setBodySegment(root->bodyLine,root->endBodyLine); - cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig)); + cd->setBodyDef(fd); } - cd->addSectionsToDefinition(root->anchors); //cd->setName(fullName); // change name to match docs } - cd->setFileDef(fd); - if (cd->hasDocumentation()) - { - addIncludeFile(cd,fd,root); - } - //addNamespace(root,cd); - if (fd && (root->section & Entry::COMPOUND_MASK)) - { - //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n", - // cd->name().data(), - // fd->name().data(), - // root->fileName.data() - // ); - fd->insertClass(cd); - } - addClassToGroups(root,cd); - cd->setRefItems(root->sli); - if (!root->subGrouping) cd->setSubGrouping(FALSE); if (cd->templateArguments()==0) { @@ -804,7 +785,7 @@ static void addClassToContext(Entry *root) tagName = root->tagInfo->tagName; refFileName = root->tagInfo->fileName; } - ClassDef *cd=new ClassDef(root->fileName,root->startLine,fullName,sec, + cd=new ClassDef(root->fileName,root->startLine,fullName,sec, tagName,refFileName); cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); @@ -817,51 +798,15 @@ static void addClassToContext(Entry *root) // tArgList ? tempArgListToString(tArgList).data() : "<none>"); cd->setTemplateArguments(tArgList); cd->setProtection(root->protection); - cd->addSectionsToDefinition(root->anchors); cd->setIsStatic(root->stat); // file definition containing the class cd cd->setBodySegment(root->bodyLine,root->endBodyLine); cd->setBodyDef(fd); - if (!root->subGrouping) cd->setSubGrouping(FALSE); - - addClassToGroups(root,cd); - cd->setRefItems(root->sli); // see if the class is found inside a namespace //bool found=addNamespace(root,cd); - cd->setFileDef(fd); - if (cd->hasDocumentation()) - { - addIncludeFile(cd,fd,root); - } - -#if 0 - // namespace is part of the class name - if (!found && !namespaceName.isEmpty()) - { - NamespaceDef *nd = getResolvedNamespace(namespaceName); - if (nd) - { - cd->setNamespace(nd); - nd->insertClass(cd); - found=TRUE; - } - } - - // add the class to the file (we do this even if we have already inserted - // it into the namespace) - if (fd && (root->section & Entry::COMPOUND_MASK)) - { - //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n", - // cd->name().data(), - // fd->name().data(), - // root->fileName.data() - // ); - fd->insertClass(cd); - } -#endif // the empty string test is needed for extract all case cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); @@ -873,6 +818,25 @@ static void addClassToContext(Entry *root) Doxygen::classSDict.append(fullName,cd); } + + cd->addSectionsToDefinition(root->anchors); + if (!root->subGrouping) cd->setSubGrouping(FALSE); + if (cd->hasDocumentation()) + { + addIncludeFile(cd,fd,root); + } + if (fd && (root->section & Entry::COMPOUND_MASK)) + { + //printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n", + // cd->name().data(), + // fd->name().data(), + // root->fileName.data() + // ); + cd->setFileDef(fd); + fd->insertClass(cd); + } + addClassToGroups(root,cd); + cd->setRefItems(root->sli); } //---------------------------------------------------------------------- @@ -3828,7 +3792,7 @@ static void computeTemplateClassRelations() for (tdi.toFirst();(tcd=tdi.current());++tdi) // for each template instance { Debug::print(Debug::Classes,0," Template instance %s : \n",tcd->name().data()); - QCString templSpec = tdi.currentKey().data(); + QCString templSpec = tdi.currentKey(); ArgumentList *templArgs = new ArgumentList; stringToArgumentList(templSpec,templArgs); QList<BaseInfo> *baseList=root->extends; @@ -5938,7 +5902,7 @@ static void createTemplateInstanceMembers() // for each instance of the template for (qdi.toFirst();(tcd=qdi.current());++qdi) { - tcd->addMembersToTemplateInstance(cd,qdi.currentKey().data()); + tcd->addMembersToTemplateInstance(cd,qdi.currentKey()); } } } diff --git a/src/entry.h b/src/entry.h index fdb56a6..6d29844 100644 --- a/src/entry.h +++ b/src/entry.h @@ -320,9 +320,9 @@ class Entry { switch( groupDocType ) { - case GROUPDOC_NORMAL: return "\\defgroup"; break; - case GROUPDOC_ADD: return "\\addgroup"; break; - case GROUPDOC_WEAK: return "\\weakgroup"; break; + case GROUPDOC_NORMAL: return "\\defgroup"; + case GROUPDOC_ADD: return "\\addgroup"; + case GROUPDOC_WEAK: return "\\weakgroup"; default: return "unknown group command"; } } @@ -334,9 +334,9 @@ class Entry } switch( groupDocType ) { - case GROUPDOC_NORMAL: return Grouping::GROUPING_AUTO_DEF; break; - case GROUPDOC_ADD: return Grouping::GROUPING_AUTO_ADD; break; - case GROUPDOC_WEAK: return Grouping::GROUPING_AUTO_WEAK; break; + case GROUPDOC_NORMAL: return Grouping::GROUPING_AUTO_DEF; + case GROUPDOC_ADD: return Grouping::GROUPING_AUTO_ADD; + case GROUPDOC_WEAK: return Grouping::GROUPING_AUTO_WEAK; default: return Grouping::GROUPING_LOWEST; } } diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 0bd6f0c..c8d7187 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -551,14 +551,16 @@ void HtmlHelp::addContentsItem(bool isDir, /*! Add an list item to the index file. * \param level1 the main index of the item. * \param level2 the sub index of the item. - * \param ref the URL of to the item. + * \param contRef the output file refering to the container. + * \param memRef the output file containing to the member documentation. * \param anchor the anchor of the item. * \sa HtmlHelpIndex */ void HtmlHelp::addIndexItem(const char *level1, const char *level2, - const char *ref, const char *anchor) + const char *contRef, const char *memRef, + const char *anchor) { - index->addItem(level1,level2,ref,anchor,TRUE,FALSE); - index->addItem(level2,level1,ref,anchor,TRUE,TRUE); + index->addItem(level1,level2,contRef,anchor,TRUE,FALSE); + index->addItem(level2,level1,memRef,anchor,TRUE,TRUE); } diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 70add06..6652989 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -74,7 +74,8 @@ class HtmlHelp const char *ref = 0, const char *anchor = 0); void addIndexItem(const char *level1, const char *level2, - const char *ref, const char *anchor); + const char *contRef, const char *memRef, + const char *anchor); void addIndexFile(const char *name); diff --git a/src/index.cpp b/src/index.cpp index 07c77f6..d5d82a4 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -1514,6 +1514,7 @@ void writeMemberList(OutputList &ol,bool useSections, { bool first = TRUE; char lastChar = 0; + static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS"); MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); MemberName *mn=0; @@ -1527,7 +1528,7 @@ void writeMemberList(OutputList &ol,bool useSections, while (md && !found) { ClassDef *cd; - bool isFriendToHide = Config_getBool("HIDE_FRIEND_COMPOUNDS") && + bool isFriendToHide = hideFriendCompounds && (QCString(md->typeString())=="friend class" || QCString(md->typeString())=="friend struct" || QCString(md->typeString())=="friend union"); @@ -1615,6 +1616,7 @@ void writeMemberList(OutputList &ol,bool useSections, int countClassMembers(int filter) { + static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS"); int i=0;for (i=0;i<256;i++) g_memberIndexLetterUsed[filter][i]=FALSE; int count=0; MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict); @@ -1626,7 +1628,7 @@ int countClassMembers(int filter) ClassDef *cd; while (md && !found) { - bool isFriendToHide = Config_getBool("HIDE_FRIEND_COMPOUNDS") && + bool isFriendToHide = hideFriendCompounds && (QCString(md->typeString())=="friend class" || QCString(md->typeString())=="friend struct" || QCString(md->typeString())=="friend union"); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 7449569..9fa64ee 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -509,6 +509,7 @@ bool MemberDef::hasExamples() QCString MemberDef::getOutputFileBase() const { + static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES"); QCString baseName; if (explicitOutputFileBase) { @@ -543,7 +544,7 @@ QCString MemberDef::getOutputFileBase() const ); return "dummy"; } - else if (Config_getBool("SEPARATE_MEMBER_PAGES")) + else if (separateMemberPages) { if (getEnumScope()) // enum value, which is part of enum's documentation { @@ -604,6 +605,8 @@ QCString MemberDef::anchor() const bool MemberDef::isLinkableInProject() const { + static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); + static bool extractStatic = Config_getBool("EXTRACT_STATIC"); //printf("MemberDef::isLinkableInProject(name=%s)\n",name().data()); if (m_templateMaster) { @@ -639,12 +642,12 @@ bool MemberDef::isLinkableInProject() const //printf("in a file but file not linkable!\n"); return FALSE; // in file (and not in namespace) but file not linkable } - if (prot==Private && !Config_getBool("EXTRACT_PRIVATE") && mtype!=Friend) + if (prot==Private && !extractPrivate && mtype!=Friend) { //printf("private and invisible!\n"); return FALSE; // hidden due to protection } - if (isStatic() && classDef==0 && !Config_getBool("EXTRACT_STATIC")) + if (isStatic() && classDef==0 && !extractStatic) { //printf("static and invisible!\n"); return FALSE; // hidden due to staticness @@ -754,6 +757,13 @@ ClassDef *MemberDef::getClassDefOfAnonymousType() */ bool MemberDef::isBriefSectionVisible() const { + static bool extractStatic = Config_getBool("EXTRACT_STATIC"); + static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS"); + static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC"); + static bool repeatBrief = Config_getBool("REPEAT_BRIEF"); + static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS"); + static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); + //printf("Member %s grpId=%d docs=%s file=%s args=%s\n", // name().data(), // 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(), @@ -770,26 +780,26 @@ bool MemberDef::isBriefSectionVisible() const // explicitly enabled in the config file bool visibleIfStatic = !(getClassDef()==0 && isStatic() && - !Config_getBool("EXTRACT_STATIC") + !extractStatic ); // only include members is the are documented or // HIDE_UNDOC_MEMBERS is NO in the config file - bool visibleIfDocumented = (!Config_getBool("HIDE_UNDOC_MEMBERS") || + bool visibleIfDocumented = (!hideUndocMembers || hasDocs || isDocumentedFriendClass() ); // hide members with no detailed description and brief descriptions // explicitly disabled. - bool visibleIfEnabled = !(Config_getBool("HIDE_UNDOC_MEMBERS") && + bool visibleIfEnabled = !(hideUndocMembers && documentation().isEmpty() && - !Config_getBool("BRIEF_MEMBER_DESC") && - !Config_getBool("REPEAT_BRIEF") + !briefMemberDesc && + !repeatBrief ); // Hide friend (class|struct|union) declarations if HIDE_FRIEND_COMPOUNDS is true - bool visibleIfFriendCompound = !(Config_getBool("HIDE_FRIEND_COMPOUNDS") && + bool visibleIfFriendCompound = !(hideFriendCompounds && isFriend() && (type=="friend class" || type=="friend struct" || @@ -800,7 +810,7 @@ bool MemberDef::isBriefSectionVisible() const // only include members that are non-private unless EXTRACT_PRIVATE is // set to YES or the member is part of a group bool visibleIfPrivate = (protection()!=Private || - Config_getBool("EXTRACT_PRIVATE") || + extractPrivate || mtype==Friend ); @@ -1177,10 +1187,18 @@ void MemberDef::writeDeclaration(OutputList &ol, bool MemberDef::isDetailedSectionLinkable() const { + static bool extractAll = Config_getBool("EXTRACT_ALL"); + static bool alwaysDetailedSec = Config_getBool("ALWAYS_DETAILED_SEC"); + static bool repeatBrief = Config_getBool("REPEAT_BRIEF"); + static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC"); + static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS"); + static bool extractStatic = Config_getBool("EXTRACT_STATIC"); + static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); + // the member has details documentation for any of the following reasons bool docFilter = // treat everything as documented - Config_getBool("EXTRACT_ALL") || + extractAll || // has detailed docs !documentation().isEmpty() || // has inbody docs @@ -1191,24 +1209,23 @@ bool MemberDef::isDetailedSectionLinkable() const (mtype==EnumValue && !briefDescription().isEmpty()) || // has brief description that is part of the detailed description (!briefDescription().isEmpty() && // has brief docs - (Config_getBool("ALWAYS_DETAILED_SEC") && // they or visible in - Config_getBool("REPEAT_BRIEF") || // detailed section or - !Config_getBool("BRIEF_MEMBER_DESC") // they are explicitly not + (alwaysDetailedSec && // they or visible in + repeatBrief || // detailed section or + !briefMemberDesc // they are explicitly not ) // shown in brief section ) || // has a multi-line initialization block //(initLines>0 && initLines<maxInitLines) || - (hasMultiLineInitializer() && !Config_getBool("HIDE_UNDOC_MEMBERS")) || + (hasMultiLineInitializer() && !hideUndocMembers) || // has one or more documented arguments (defArgList!=0 && defArgList->hasDocumentation()); // this is not a global static or global statics should be extracted - bool staticFilter = getClassDef()!=0 || !isStatic() || Config_getBool("EXTRACT_STATIC"); + bool staticFilter = getClassDef()!=0 || !isStatic() || extractStatic; // only include members that are non-private unless EXTRACT_PRIVATE is // set to YES or the member is part of a group - bool privateFilter = (protection()!=Private || - Config_getBool("EXTRACT_PRIVATE") || + bool privateFilter = (protection()!=Private || extractPrivate || mtype==Friend ); @@ -1261,11 +1278,13 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, QCString scopeName = scName; QCString memAnchor = anchor(); + QCString ciname = container->name(); if (container->definitionType()==TypeGroup) { if (getClassDef()) scopeName=getClassDef()->name(); else if (getNamespaceDef()) scopeName=getNamespaceDef()->name(); else if (getFileDef()) scopeName=getFileDef()->name(); + ciname = ((GroupDef *)container)->groupTitle(); } else if (container->definitionType()==TypeFile && getNamespaceDef()) { // member is in a namespace, but is written as part of the file documentation @@ -1274,12 +1293,15 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } QCString cname = container->name(); - QCString cfname = getOutputFileBase(); + QCString cfname = getOutputFileBase(); + QCString cfiname = container->getOutputFileBase(); - if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) + bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); + HtmlHelp *htmlHelp = 0; + if (hasHtmlHelp) { - HtmlHelp *htmlHelp = HtmlHelp::getInstance(); - htmlHelp->addIndexItem(cname,name(),cfname,memAnchor); + htmlHelp = HtmlHelp::getInstance(); + htmlHelp->addIndexItem(ciname,name(),cfiname,cfname,memAnchor); } // get member name @@ -1307,9 +1329,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.pushGeneratorState(); - bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); - HtmlHelp *htmlHelp = 0; - if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); if ((isVariable() || isTypedef()) && (i=r.match(ldef,0,&l))!=-1) { @@ -1323,10 +1342,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName); ol.startMemberDoc(cname,name(),memAnchor,name()); - if (hasHtmlHelp) - { - htmlHelp->addIndexItem(cname,name(),cfname,memAnchor); - } linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.left(i)); vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef()); linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),name(),ldef.right(ldef.length()-i-l)); @@ -1339,10 +1354,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, //printf("Anonymous compound `%s'\n",cname.data()); ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName); ol.startMemberDoc(cname,name(),memAnchor,name()); - if (hasHtmlHelp) - { - htmlHelp->addIndexItem(cname,name(),cfname,memAnchor); - } // strip anonymous compound names from definition int si=ldef.find(' '),pi,ei=i+l; if (si==-1) si=0; @@ -1361,10 +1372,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName); ol.startMemberDoc(cname,name(),memAnchor,name()); - if (hasHtmlHelp) - { - htmlHelp->addIndexItem(cname,name(),cfname,memAnchor); - } ClassDef *cd=getClassDef(); if (!Config_getBool("HIDE_SCOPE_NAMES")) @@ -1665,9 +1672,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ol.addIndexItem(fmd->name(),cname); ol.addIndexItem(cname,fmd->name()); - if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) + if (hasHtmlHelp) { - HtmlHelp::getInstance()->addIndexItem(cname,fmd->name(),cfname,fmd->anchor()); + HtmlHelp::getInstance()->addIndexItem(cname,fmd->name(),cfiname,cfname,fmd->anchor()); } //ol.writeListItem(); ol.startDescTableTitle(); // this enables emphasis! @@ -2096,10 +2103,13 @@ void MemberDef::setInitializer(const char *initializer) void MemberDef::addListReference(Definition *) { + static bool optimizeOutputForC = Config_getBool("OPTIMIZE_OUTPUT_FOR_C"); + static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES"); + static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); visited=TRUE; if (!isLinkableInProject()) return; QCString memLabel; - if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + if (optimizeOutputForC) { memLabel=theTranslator->trGlobal(TRUE,TRUE); } @@ -2111,7 +2121,7 @@ void MemberDef::addListReference(Definition *) Definition *pd=getOuterScope(); if (!isRelated() && ( - (!Config_getBool("HIDE_SCOPE_NAMES") && // there is a scope + (!hideScopeNames && // there is a scope pd && pd!=Doxygen::globalScope) // and we can show it || (pd=getClassDef()) // it's a class so we @@ -2119,7 +2129,7 @@ void MemberDef::addListReference(Definition *) ) ) { - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + if (optimizeOutputJava) { memName.prepend(pd->name()+"."); } @@ -101,6 +101,10 @@ static int g_commentCount; static bool g_insideComment; static bool g_isImported; static QCString g_blockName; +static int g_condCtx; +static bool g_skip; +static QStack<bool> g_condStack; + static void setFileName(const char *name) @@ -973,6 +977,9 @@ Define *newDefine() void addDefine() { + if (g_skip) return; // do not add this define as it is inside a + // conditional section (@cond command) that is disabled. + //printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data()); //ArgumentList *al = new ArgumentList; //stringToArgumentList(g_defArgsStr,al); @@ -1129,7 +1136,32 @@ static void readIncludeFile(const QCString &inc) /* ----------------------------------------------------------------- */ -#undef YY_INPUT +static void startCondSection(const char *sectId) +{ + g_condStack.push(new bool(g_skip)); + if (Config_getList("ENABLED_SECTIONS").find(sectId)==-1) + { + g_skip=TRUE; + } +} + +static void endCondSection() +{ + if (g_condStack.isEmpty()) + { + g_skip=FALSE; + } + else + { + bool *ctx = g_condStack.pop(); + g_skip=*ctx; + } +} + + +/* ----------------------------------------------------------------- */ + +#undef YY_INPUT #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); static int yyread(char *buf,int max_size) @@ -1183,6 +1215,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x IgnoreLine %x FindDefineArgs %x ReadString +%x CondLine %% @@ -1777,11 +1810,34 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputChar('/');outputChar('*'); //g_commentCount++; } +<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ { + outputArray(yytext,yyleng); + } <SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ { outputArray(yytext,yyleng); g_blockName=QCString(&yytext[1]).stripWhiteSpace(); BEGIN(SkipVerbatim); } +<SkipCComment,SkipCPPComment>[\\@]"cond"[ \t]+ { // conditional section + g_condCtx = YY_START; + outputArray(yytext,yyleng); + BEGIN(CondLine); + } +<CondLine>[a-z_A-Z][a-z_A-Z0-9.\-]* { + startCondSection(yytext); + outputArray(yytext,yyleng); + BEGIN(g_condCtx); + } +<SkipCComment,SkipCPPComment>[\\@]"cond"[ \t]+\n | +<CondLine>. { + outputArray(yytext,yyleng); + startCondSection(" "); + if (YY_START==CondLine) BEGIN(g_condCtx); + } +<SkipCComment,SkipCPPComment>[\\@]"endcond"/[^a-z_A-Z0-9] { + outputArray(yytext,yyleng); + endCondSection(); + } <SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode") { /* end of verbatim block */ outputArray(yytext,yyleng); if (&yytext[4]==g_blockName) @@ -1823,6 +1879,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <RemoveCComment>[^*\x06\n]+ <RemoveCComment>\n { g_yyLineNr++; outputChar('\n'); } <RemoveCComment>. +<SkipCPPComment>[^\n\/\\@]+ { + outputArray(yytext,yyleng); + } <SkipCPPComment,RemoveCPPComment>\n { unput(*yytext); BEGIN(g_lastCPPContext); @@ -2129,6 +2188,8 @@ void preprocessFile(const char *fileName,BufStr &output) g_fileDefineDict->clear(); g_expandedDict->setAutoDelete(FALSE); g_expandedDict->clear(); + g_condStack.clear(); + g_condStack.setAutoDelete(TRUE); // add predefined macros char *defStr; diff --git a/src/scanner.l b/src/scanner.l index 6f12f8a..25c53b4 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -302,7 +302,7 @@ static QCString stripQuotes(const char *s) static void addMemberGroupDocs() { memberGroupDocs=current->brief.stripWhiteSpace(); - current->doc = current->doc.stripWhiteSpace(); + current->doc = stripLeadingAndTrailingEmptyLines(current->doc); if (!memberGroupDocs.isEmpty() && !current->doc.isEmpty()) { memberGroupDocs+="\n\n"; @@ -4492,6 +4492,11 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt) static void parsePrototype(const QCString &text) { //printf("**** parsePrototype(%s) begin\n",text.data()); + if (text.isEmpty()) + { + warn(yyFileName,yyLineNr,"Empty prototype found!"); + return; + } const char *orgInputString; int orgInputPosition; diff --git a/src/sortdict.h b/src/sortdict.h index f3e0504..c1a553e 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -208,6 +208,14 @@ class SDict { return m_dict->find(key); } + T *find(const QCString &key) + { + return m_dict->find(key); + } + T *find(const QString &key) + { + return m_dict->find(key); + } /*! Equavalent to find(). */ T *operator[](const char *key) const diff --git a/src/translator_hu.h b/src/translator_hu.h index 9f823b1..11d2a40 100644 --- a/src/translator_hu.h +++ b/src/translator_hu.h @@ -29,7 +29,7 @@ #ifndef TRANSLATOR_HU_H #define TRANSLATOR_HU_H -class TranslatorHungarian : public TranslatorAdapter_1_4_1 +class TranslatorHungarian : public Translator { private: const char * zed(char c) @@ -47,20 +47,20 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 public: // --- Language control methods ------------------- - QCString idLanguage() + virtual QCString idLanguage() { return "hungarian"; } /*! Used to get the command(s) for the language support. This method * was designed for languages which do not prefer babel package. * If this methods returns empty string, then the latexBabelPackage() * method is used to generate the command for using the babel package. */ - QCString latexLanguageSupportCommand() + virtual QCString latexLanguageSupportCommand() { return ""; } /*! return the language charset. This will be used for the HTML output */ - QCString idLanguageCharset() + virtual QCString idLanguageCharset() { return "iso-8859-2"; } @@ -68,31 +68,31 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 // --- Language translation methods ------------------- /*! used in the compound documentation before a list of related functions. */ - QCString trRelatedFunctions() + virtual QCString trRelatedFunctions() { return "Kapcsolódó függvények"; } /*! subscript for the related functions. */ - QCString trRelatedSubscript() + virtual QCString trRelatedSubscript() { return "(Figyelem! Ezek a függvények nem tagjai az osztálynak!)"; } /*! header that is put before the detailed description of files, classes and namespaces. */ - QCString trDetailedDescription() + virtual QCString trDetailedDescription() { return "Részletes leírás"; } /*! header that is put before the list of typedefs. */ - QCString trMemberTypedefDocumentation() + virtual QCString trMemberTypedefDocumentation() { return "Típusdefiníció-tagok dokumentációja"; } /*! header that is put before the list of enumerations. */ - QCString trMemberEnumerationDocumentation() + virtual QCString trMemberEnumerationDocumentation() { return "Enumeráció-tagok dokumentációja"; } /*! header that is put before the list of member functions. */ - QCString trMemberFunctionDocumentation() + virtual QCString trMemberFunctionDocumentation() { return "Tagfüggvények dokumentációja"; } /*! header that is put before the list of member attributes. */ - QCString trMemberDataDocumentation() + virtual QCString trMemberDataDocumentation() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -105,26 +105,26 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! this is the text of a link put after brief descriptions. */ - QCString trMore() + virtual QCString trMore() { return "Részletek..."; } /*! put in the class documentation */ - QCString trListOfAllMembers() + virtual QCString trListOfAllMembers() { return "A tagok teljes listája."; } /*! used as the title of the "list of all members" page of a class */ - QCString trMemberList() + virtual QCString trMemberList() { return "Taglista"; } /*! this is the first part of a sentence that is followed by a class name */ - QCString trThisIsTheListOfAllMembers() + virtual QCString trThisIsTheListOfAllMembers() { return "A(z) "; } /*! this is the remainder of the sentence after the class name */ - QCString trIncludingInheritedMembers() + virtual QCString trIncludingInheritedMembers() { return " osztály tagjainak teljes listája, az örökölt tagokkal együtt."; } - QCString trGeneratedAutomatically(const char *s) + virtual QCString trGeneratedAutomatically(const char *s) { QCString result="Ezt a dokumentációt a Doxygen készítette "; if (s) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez"; result+=" a forráskódból."; @@ -132,15 +132,15 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! put after an enum name in the list of all members */ - QCString trEnumName() + virtual QCString trEnumName() { return "enum"; } /*! put after an enum value in the list of all members */ - QCString trEnumValue() + virtual QCString trEnumValue() { return "enum-érték"; } /*! put after an undocumented member in the list of all members */ - QCString trDefinedIn() + virtual QCString trDefinedIn() { return "definiálja:"; } // quick reference sections @@ -148,15 +148,15 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! This is put above each page as a link to the list of all groups of * compounds or files (see the \\group command). */ - QCString trModules() + virtual QCString trModules() { return "Modulok"; } /*! This is put above each page as a link to the class hierarchy */ - QCString trClassHierarchy() + virtual QCString trClassHierarchy() { return "Osztályhierarchia"; } /*! This is put above each page as a link to the list of annotated classes */ - QCString trCompoundList() + virtual QCString trCompoundList() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -169,15 +169,11 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! This is put above each page as a link to the list of documented files */ - QCString trFileList() + virtual QCString trFileList() { return "Fájllista"; } - /*! This is put above each page as a link to the list of all verbatim headers */ - QCString trHeaderFiles() - { return "Definíciós fájlok"; } - /*! This is put above each page as a link to all members of compounds. */ - QCString trCompoundMembers() + virtual QCString trCompoundMembers() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -190,7 +186,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! This is put above each page as a link to all members of files. */ - QCString trFileMembers() + virtual QCString trFileMembers() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -203,25 +199,25 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! This is put above each page as a link to all related pages. */ - QCString trRelatedPages() + virtual QCString trRelatedPages() { return "Kapcsolódó lapok"; } /*! This is put above each page as a link to all examples. */ - QCString trExamples() + virtual QCString trExamples() { return "Példák"; } /*! This is put above each page as a link to the search engine. */ - QCString trSearch() + virtual QCString trSearch() { return "Keresés"; } /*! This is an introduction to the class hierarchy. */ - QCString trClassHierarchyDescription() + virtual QCString trClassHierarchyDescription() { return "Majdnem (de nem teljesen) betűrendbe szedett " "leszármazási lista:"; } /*! This is an introduction to the list with all files. */ - QCString trFileListDescription(bool extractAll) + virtual QCString trFileListDescription(bool extractAll) { QCString result="Az összes "; if (!extractAll) result+="dokumentált "; @@ -230,7 +226,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! This is an introduction to the annotated compound list. */ - QCString trCompoundListDescription() + virtual QCString trCompoundListDescription() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) @@ -245,7 +241,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! This is an introduction to the page with all class members. */ - QCString trCompoundMembersDescription(bool extractAll) + virtual QCString trCompoundMembersDescription(bool extractAll) { QCString result="Az összes "; if (!extractAll) @@ -287,7 +283,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! This is an introduction to the page with all file members. */ - QCString trFileMembersDescription(bool extractAll) + virtual QCString trFileMembersDescription(bool extractAll) { QCString result="Az összes "; if (!extractAll) result+="dokumentált "; @@ -308,51 +304,41 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 return result; } - /*! This is an introduction to the page with the list of all header files. */ - QCString trHeaderFilesDescription() - { return "A Programozói Interfészt (API) alkotó definíciós fájlok listája:"; } - /*! This is an introduction to the page with the list of all examples */ - QCString trExamplesDescription() + virtual QCString trExamplesDescription() { return "A példák listája:"; } /*! This is an introduction to the page with the list of related pages */ - QCString trRelatedPagesDescription() + virtual QCString trRelatedPagesDescription() { return "A kapcsolódó dokumentációk listája:"; } /*! This is an introduction to the page with the list of class/file groups */ - QCString trModulesDescription() + virtual QCString trModulesDescription() { return "A modulok listája:"; } - /*! This sentences is used in the annotated class/file lists if no brief - * description is given. - */ - QCString trNoDescriptionAvailable() - { return "Nincs leírás"; } - // index titles (the project name is prepended for these) /*! This is used in HTML as the title of index.html. */ - QCString trDocumentation() + virtual QCString trDocumentation() { return "Dokumentáció"; } /*! This is used in LaTeX as the title of the chapter with the * index of all groups. */ - QCString trModuleIndex() + virtual QCString trModuleIndex() { return "Modulmutató"; } /*! This is used in LaTeX as the title of the chapter with the * class hierarchy. */ - QCString trHierarchicalIndex() + virtual QCString trHierarchicalIndex() { return "Hierarchikus mutató"; } /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. */ - QCString trCompoundIndex() + virtual QCString trCompoundIndex() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -367,131 +353,134 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! This is used in LaTeX as the title of the chapter with the * list of all files. */ - QCString trFileIndex() + virtual QCString trFileIndex() { return "Fájlmutató"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. */ - QCString trModuleDocumentation() + virtual QCString trModuleDocumentation() { return "Modulok dokumentációja"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all classes, structs and unions. */ - QCString trClassDocumentation() - { return "Osztályok dokumentációja"; } + virtual QCString trClassDocumentation() + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Adatszerkezetek dokumentációja"; + } + else + { + return "Osztályok dokumentációja"; + } + } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all files. */ - QCString trFileDocumentation() + virtual QCString trFileDocumentation() { return "Fájlok dokumentációja"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all examples. */ - QCString trExampleDocumentation() + virtual QCString trExampleDocumentation() { return "Példák dokumentációja"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all related pages. */ - QCString trPageDocumentation() + virtual QCString trPageDocumentation() { return "Kapcsolódó dokumentációk"; } /*! This is used in LaTeX as the title of the document */ - QCString trReferenceManual() + virtual QCString trReferenceManual() { return "Referencia kézikönyv"; } /*! This is used in the documentation of a file as a header before the * list of defines */ - QCString trDefines() + virtual QCString trDefines() { return "Makródefiníciók"; } /*! This is used in the documentation of a file as a header before the * list of function prototypes */ - QCString trFuncProtos() + virtual QCString trFuncProtos() { return "Függvény-prototípusok"; } /*! This is used in the documentation of a file as a header before the * list of typedefs */ - QCString trTypedefs() + virtual QCString trTypedefs() { return "Típusdefiníciók"; } /*! This is used in the documentation of a file as a header before the * list of enumerations */ - QCString trEnumerations() + virtual QCString trEnumerations() { return "Enumerációk"; } /*! This is used in the documentation of a file as a header before the * list of (global) functions */ - QCString trFunctions() + virtual QCString trFunctions() { return "Függvények"; } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ - QCString trVariables() + virtual QCString trVariables() { return "Változók"; } /*! This is used in the documentation of a file as a header before the * list of (global) variables */ - QCString trEnumerationValues() + virtual QCString trEnumerationValues() { return "Enumeráció-értékek"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines */ - QCString trDefineDocumentation() + virtual QCString trDefineDocumentation() { return "Makródefiníciók dokumentációja"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for function prototypes */ - QCString trFunctionPrototypeDocumentation() + virtual QCString trFunctionPrototypeDocumentation() { return "Függvény-prototípusok dokumentációja"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for typedefs */ - QCString trTypedefDocumentation() + virtual QCString trTypedefDocumentation() { return "Típusdefiníciók dokumentációja"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types */ - QCString trEnumerationTypeDocumentation() + virtual QCString trEnumerationTypeDocumentation() { return "Enumerációk dokumentációja"; } /*! This is used in the documentation of a file/namespace before the list - * of documentation blocks for enumeration values - */ - QCString trEnumerationValueDocumentation() - { return "Enumeráció-értékek dokumentációja"; } - - /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ - QCString trFunctionDocumentation() + virtual QCString trFunctionDocumentation() { return "Függvények dokumentációja"; } /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for variables */ - QCString trVariableDocumentation() + virtual QCString trVariableDocumentation() { return "Változók dokumentációja"; } /*! This is used in the documentation of a file/namespace/group before * the list of links to documented compounds */ - QCString trCompounds() + virtual QCString trCompounds() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -506,7 +495,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! This is used in the standard footer of each page and indicates when * the page was generated */ - QCString trGeneratedAt(const char *date,const char *projName) + virtual QCString trGeneratedAt(const char *date,const char *projName) { QCString result=(QCString)""; if (projName) result+=(QCString)"Projekt: "+projName; @@ -515,59 +504,51 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! This is part of the sentence used in the standard footer of each page. */ - QCString trWrittenBy() + virtual QCString trWrittenBy() { return " melyet írt "; } /*! this text is put before a class diagram */ - QCString trClassDiagram(const char *clName) + virtual QCString trClassDiagram(const char *clName) { return (QCString)"A"+zed(clName[0])+clName+" osztály származási diagramja:"; } /*! this text is generated when the \\internal command is used. */ - QCString trForInternalUseOnly() + virtual QCString trForInternalUseOnly() { return "CSAK BELSŐ HASZNÁLATRA!"; } - /*! this text is generated when the \\reimp command is used. */ - QCString trReimplementedForInternalReasons() - { return "Belső okok miatt újraimplementálva; az API-t nem érinti."; } - /*! this text is generated when the \\warning command is used. */ - QCString trWarning() + virtual QCString trWarning() { return "Figyelmeztetés"; } - /*! this text is generated when the \\bug command is used. */ - QCString trBugsAndLimitations() - { return "Hibák és korlátozások"; } - /*! this text is generated when the \\version command is used. */ - QCString trVersion() + virtual QCString trVersion() { return "Verzió"; } /*! this text is generated when the \\date command is used. */ - QCString trDate() + virtual QCString trDate() { return "Dátum"; } /*! this text is generated when the \\return command is used. */ - QCString trReturns() + virtual QCString trReturns() { return "Visszatérési érték"; } /*! this text is generated when the \\sa command is used. */ - QCString trSeeAlso() + virtual QCString trSeeAlso() { return "Lásd még"; } /*! this text is generated when the \\param command is used. */ - QCString trParameters() + virtual QCString trParameters() { return "Paraméterek"; } /*! this text is generated when the \\exception command is used. */ - QCString trExceptions() + virtual QCString trExceptions() { return "Kivételek"; } /*! this text is used in the title page of a LaTeX document. */ - QCString trGeneratedBy() + virtual QCString trGeneratedBy() { return "Készítette"; } ////////////////////////////////////////////////////////////////////////// @@ -575,11 +556,11 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 ////////////////////////////////////////////////////////////////////////// /*! used as the title of page containing all the index of all namespaces. */ - QCString trNamespaceList() + virtual QCString trNamespaceList() { return "Névtérlista"; } /*! used as an introduction to the namespace list */ - QCString trNamespaceListDescription(bool extractAll) + virtual QCString trNamespaceListDescription(bool extractAll) { QCString result="Az összes "; if (!extractAll) result+="dokumentált "; @@ -590,7 +571,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! used in the class documentation as a header before the list of all * friends of a class */ - QCString trFriends() + virtual QCString trFriends() { return "Barátok"; } ////////////////////////////////////////////////////////////////////////// @@ -600,7 +581,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! used in the class documentation as a header before the list of all * related classes */ - QCString trRelatedFunctionDocumentation() + virtual QCString trRelatedFunctionDocumentation() { return "Barát és kapcsolódó függvények dokumentációja"; } ////////////////////////////////////////////////////////////////////////// @@ -608,7 +589,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 ////////////////////////////////////////////////////////////////////////// /*! used as the title of the HTML page of a class/struct/union */ - QCString trCompoundReference(const char *clName, + virtual QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) { @@ -629,7 +610,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! used as the title of the HTML page of a file */ - QCString trFileReference(const char *fileName) + virtual QCString trFileReference(const char *fileName) { QCString result=fileName; result+=" fájlreferencia"; @@ -637,38 +618,38 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! used as the title of the HTML page of a namespace */ - QCString trNamespaceReference(const char *namespaceName) + virtual QCString trNamespaceReference(const char *namespaceName) { QCString result=namespaceName; result+=" névtér-referencia"; return result; } - QCString trPublicMembers() + virtual QCString trPublicMembers() { return "Publikus tagfüggvények"; } - QCString trPublicSlots() + virtual QCString trPublicSlots() { return "Publikus rések"; } - QCString trSignals() + virtual QCString trSignals() { return "Szignálok"; } - QCString trStaticPublicMembers() + virtual QCString trStaticPublicMembers() { return "Statikus publikus tagfüggvények"; } - QCString trProtectedMembers() + virtual QCString trProtectedMembers() { return "Védett tagfüggvények"; } - QCString trProtectedSlots() + virtual QCString trProtectedSlots() { return "Védett rések"; } - QCString trStaticProtectedMembers() + virtual QCString trStaticProtectedMembers() { return "Statikus védett tagfüggvények"; } - QCString trPrivateMembers() + virtual QCString trPrivateMembers() { return "Privát tagfüggvények"; } - QCString trPrivateSlots() + virtual QCString trPrivateSlots() { return "Privát rések"; } - QCString trStaticPrivateMembers() + virtual QCString trStaticPrivateMembers() { return "Statikus privát tagfüggvények"; } /*! this function is used to produce a comma-separated list of items. * use generateMarker(i) to indicate where item i should be put. */ - QCString trWriteList(int numEntries) + virtual QCString trWriteList(int numEntries) { QCString result; int i; @@ -693,7 +674,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! used in class documentation to produce a list of base classes, * if class diagrams are disabled. */ - QCString trInheritsList(int numEntries) + virtual QCString trInheritsList(int numEntries) { return "Ősök: "+trWriteList(numEntries)+"."; } @@ -701,7 +682,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! used in class documentation to produce a list of super classes, * if class diagrams are disabled. */ - QCString trInheritedByList(int numEntries) + virtual QCString trInheritedByList(int numEntries) { return "Leszármazottak: "+trWriteList(numEntries)+"."; } @@ -709,7 +690,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! used in member documentation blocks to produce a list of * members that are hidden by this one. */ - QCString trReimplementedFromList(int numEntries) + virtual QCString trReimplementedFromList(int numEntries) { return "Újraimplementált ősök: "+trWriteList(numEntries)+"."; } @@ -717,17 +698,17 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! used in member documentation blocks to produce a list of * all member that overwrite the implementation of this member. */ - QCString trReimplementedInList(int numEntries) + virtual QCString trReimplementedInList(int numEntries) { return "Újraimplementáló leszármazottak: "+trWriteList(numEntries)+"."; } /*! This is put above each page as a link to all members of namespaces. */ - QCString trNamespaceMembers() + virtual QCString trNamespaceMembers() { return "Névtértagok"; } /*! This is an introduction to the page with all namespace members */ - QCString trNamespaceMemberDescription(bool extractAll) + virtual QCString trNamespaceMemberDescription(bool extractAll) { QCString result="Az összes "; if (!extractAll) result+="dokumentált "; @@ -741,13 +722,13 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! This is used in LaTeX as the title of the chapter with the * index of all namespaces. */ - QCString trNamespaceIndex() + virtual QCString trNamespaceIndex() { return "Névtérmutató"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all namespaces. */ - QCString trNamespaceDocumentation() + virtual QCString trNamespaceDocumentation() { return "Névterek dokumentációja"; } ////////////////////////////////////////////////////////////////////////// @@ -757,7 +738,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! This is used in the documentation before the list of all * namespaces in a file. */ - QCString trNamespaces() + virtual QCString trNamespaces() { return "Névterek"; } ////////////////////////////////////////////////////////////////////////// @@ -767,7 +748,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! 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. */ - QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single) { // here s is one of " Class", " Struct" or " Union" // single is true implies a single file @@ -791,7 +772,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 /*! This is in the (quick) index as a link to the alphabetical compound * list. */ - QCString trAlphabeticalList() + virtual QCString trAlphabeticalList() { return "Betűrendes lista"; } ////////////////////////////////////////////////////////////////////////// @@ -799,33 +780,29 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 ////////////////////////////////////////////////////////////////////////// /*! This is used as the heading text for the retval command. */ - QCString trReturnValues() + virtual QCString trReturnValues() { return "Visszatérési értékek"; } /*! This is in the (quick) index as a link to the main page (index.html) */ - QCString trMainPage() + virtual QCString trMainPage() { return "Főoldal"; } /*! This is used in references to page that are put in the LaTeX * documentation. It should be an abbreviation of the word page. */ - QCString trPageAbbreviation() + virtual QCString trPageAbbreviation() { return "o."; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-991003 ////////////////////////////////////////////////////////////////////////// - QCString trSources() - { - return "Források"; - } - QCString trDefinedAtLineInSourceFile() + virtual QCString trDefinedAtLineInSourceFile() { return "Definíció a(z) @1 fájl @0. sorában."; } - QCString trDefinedInSourceFile() + virtual QCString trDefinedInSourceFile() { return "Definíció a(z) @0 fájlban."; } @@ -834,7 +811,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 // new since 0.49-991205 ////////////////////////////////////////////////////////////////////////// - QCString trDeprecated() + virtual QCString trDeprecated() { return "Ellenjavallt"; } @@ -844,68 +821,68 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 ////////////////////////////////////////////////////////////////////////// /*! this text is put before a collaboration diagram */ - QCString trCollaborationDiagram(const char *clName) + virtual QCString trCollaborationDiagram(const char *clName) { return (QCString)"A"+zed(clName[0])+clName+" osztály együttműködési diagramja:"; } /*! this text is put before an include dependency graph */ - QCString trInclDepGraph(const char *fName) + virtual QCString trInclDepGraph(const char *fName) { return (QCString)"A"+zed(fName[0])+fName+" definíciós fájl függési gráfja:"; } /*! header that is put before the list of constructor/destructors. */ - QCString trConstructorDocumentation() + virtual QCString trConstructorDocumentation() { return "Konstruktorok és destruktorok dokumentációja"; } /*! Used in the file documentation to point to the corresponding sources. */ - QCString trGotoSourceCode() + virtual QCString trGotoSourceCode() { return "Ugrás a fájl forráskódjához."; } /*! Used in the file sources to point to the corresponding documentation. */ - QCString trGotoDocumentation() + virtual QCString trGotoDocumentation() { return "Ugrás a fájl dokumentációjához."; } /*! Text for the \\pre command */ - QCString trPrecondition() + virtual QCString trPrecondition() { return "Előfeltétel"; } /*! Text for the \\post command */ - QCString trPostcondition() + virtual QCString trPostcondition() { return "Utófeltétel"; } /*! Text for the \\invariant command */ - QCString trInvariant() + virtual QCString trInvariant() { return "Invariáns"; } /*! Text shown before a multi-line variable/enum initialization */ - QCString trInitialValue() + virtual QCString trInitialValue() { return "Kezdő érték:"; } /*! Text used the source code in the file index */ - QCString trCode() + virtual QCString trCode() { return "forráskód"; } - QCString trGraphicalHierarchy() + virtual QCString trGraphicalHierarchy() { return "Osztályhierarchia-ábra"; } - QCString trGotoGraphicalHierarchy() + virtual QCString trGotoGraphicalHierarchy() { return "Ugrás az osztályhierarchia-ábrához"; } - QCString trGotoTextualHierarchy() + virtual QCString trGotoTextualHierarchy() { return "Ugrás az szöveges osztályhierarchiához"; } - QCString trPageIndex() + virtual QCString trPageIndex() { return "Oldalmutató"; } @@ -914,15 +891,15 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 // new since 1.1.0 ////////////////////////////////////////////////////////////////////////// - QCString trNote() + virtual QCString trNote() { return "Megjegyzés"; } - QCString trPublicTypes() + virtual QCString trPublicTypes() { return "Publikus típusok"; } - QCString trPublicAttribs() + virtual QCString trPublicAttribs() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { @@ -933,31 +910,31 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 return "Publikus attribútumok"; } } - QCString trStaticPublicAttribs() + virtual QCString trStaticPublicAttribs() { return "Statikus publikus attribútumok"; } - QCString trProtectedTypes() + virtual QCString trProtectedTypes() { return "Védett típusok"; } - QCString trProtectedAttribs() + virtual QCString trProtectedAttribs() { return "Védett attribútumok"; } - QCString trStaticProtectedAttribs() + virtual QCString trStaticProtectedAttribs() { return "Statikus védett attribútumok"; } - QCString trPrivateTypes() + virtual QCString trPrivateTypes() { return "Privát típusok"; } - QCString trPrivateAttribs() + virtual QCString trPrivateAttribs() { return "Privát attribútumok"; } - QCString trStaticPrivateAttribs() + virtual QCString trStaticPrivateAttribs() { return "Statikus privát attribútumok"; } @@ -967,12 +944,12 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 ////////////////////////////////////////////////////////////////////////// /*! Used as a marker that is put before a todo item */ - QCString trTodo() + virtual QCString trTodo() { return "Tennivaló"; } /*! Used as the header of the todo list */ - QCString trTodoList() + virtual QCString trTodoList() { return "Tennivalók listája"; } @@ -981,24 +958,24 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 // new since 1.1.4 ////////////////////////////////////////////////////////////////////////// - QCString trReferencedBy() + virtual QCString trReferencedBy() { return "Hivatkozások:"; } - QCString trRemarks() + virtual QCString trRemarks() { return "Megjegyzések"; } - QCString trAttention() + virtual QCString trAttention() { return "Figyelem"; } - QCString trInclByDepGraph() + virtual QCString trInclByDepGraph() { return "Ez az ábra azt mutatja, hogy mely fájlok ágyazzák be " "közvetve vagy közvetlenül ezt a fájlt:"; } - QCString trSince() + virtual QCString trSince() { return "Először bevezetve"; } @@ -1008,12 +985,12 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 ////////////////////////////////////////////////////////////////////////// /*! title of the graph legend page */ - QCString trLegendTitle() + virtual QCString trLegendTitle() { return "Jelmagyarázat"; } /*! page explaining how the dot graph's should be interpreted */ - QCString trLegendDocs() + virtual QCString trLegendDocs() { return "Ez az oldal elmagyarázza hogyan kell értelmezni a " @@ -1074,7 +1051,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 } /*! text for the link to the legend page */ - QCString trLegend() + virtual QCString trLegend() { return "Jelmagyarázat"; } @@ -1084,12 +1061,12 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 ////////////////////////////////////////////////////////////////////////// /*! Used as a marker that is put before a test item */ - QCString trTest() + virtual QCString trTest() { return "Teszt"; } /*! Used as the header of the test list */ - QCString trTestList() + virtual QCString trTestList() { return "Tesztlista"; } @@ -1123,11 +1100,6 @@ class TranslatorHungarian : 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 "Interfészek"; - } /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() { @@ -1160,11 +1132,6 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 { return "Csomagok"; } - /*! Used as a chapter title for Latex & RTF output */ - virtual QCString trPackageDocumentation() - { - return "Csomagok dokumentációja"; - } /*! Text shown before a multi-line define */ virtual QCString trDefineValue() { @@ -1305,17 +1272,6 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 * 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 ? "Mező" : "mező")); - //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 /*singular*/) { QCString result((first_capital ? "Globális elem" : "globális elem")); @@ -1572,6 +1528,18 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_1 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 "Ez egy túlterhelt tagfüggvény." + "A fenti függvénytől csak argumentumaiban különbözik."; + } }; #endif diff --git a/src/util.cpp b/src/util.cpp index 7c6e298..dd012aa 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1046,25 +1046,47 @@ ClassDef *getResolvedClassRec(Definition *scope, return 0; } + bool hasUsingStatements = + (fileScope && ((fileScope->getUsedNamespaces() && + fileScope->getUsedNamespaces()->count()>0) || + (fileScope->getUsedClasses() && + fileScope->getUsedClasses()->count()>0)) + ); // Since it is often the case that the same name is searched in the same // scope over an over again (especially for the linked source code generation) // we use a cache to collect previous results. This is possible since the // result of a lookup is deterministic. As the key we use the concatenated // scope, the name to search for and the explicit scope prefix. The speedup // achieved by this simple cache can be enormous. - QCString key=scope->name()+"+"+name+"+"+explicitScopePart; + int scopeNameLen = scope->name().length()+1; + int nameLen = name.length()+1; + int explicitPartLen = explicitScopePart.length(); + int fileScopeLen = hasUsingStatements ? 1+fileScope->name().length() : 0; + + // below is a more efficient coding of + // QCString key=scope->name()+"+"+name+"+"+explicitScopePart; + QCString key(scopeNameLen+nameLen+explicitPartLen+fileScopeLen+1); + char *p=key.data(); + qstrcpy(p,scope->name()); *(p+scopeNameLen-1)='+'; + p+=scopeNameLen; + qstrcpy(p,name); *(p+nameLen-1)='+'; + p+=nameLen; + qstrcpy(p,explicitScopePart); + p+=explicitPartLen; + // if a file scope is given and it contains using statements we should // also use the file part in the key (as a class name can be in // two different namespaces and a using statement in a file can select // one of them). - if (fileScope && ((fileScope->getUsedNamespaces() && - fileScope->getUsedNamespaces()->count()>0) || - (fileScope->getUsedClasses() && - fileScope->getUsedClasses()->count()>0)) - ) + if (hasUsingStatements) { - key+="+"+fileScope->name(); + // below is a more efficient coding of + // key+="+"+fileScope->name(); + *p++='+'; + qstrcpy(p,fileScope->name()); + p+=fileScopeLen-1; } + *p='\0'; LookupInfo *pval=Doxygen::lookupCache.find(key); //printf("Searching for %s result=%p\n",key.data(),pval); @@ -3490,6 +3512,7 @@ bool resolveRef(/* in */ const char *scName, QCString linkToText(const char *link,bool isFileName) { + static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); QCString result=link; if (!result.isEmpty()) { @@ -3502,7 +3525,7 @@ QCString linkToText(const char *link,bool isFileName) { result=result.right(result.length()-2); } - if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) + if (optimizeOutputJava) { result=substitute(result,"::","."); } @@ -3769,21 +3792,49 @@ QCString substitute(const char *s,const char *src,const char *dst) //---------------------------------------------------------------------- +struct FindFileCacheElem +{ + FindFileCacheElem(FileDef *fd,bool ambig) : fileDef(fd), isAmbig(ambig) {} + FileDef *fileDef; + bool isAmbig; +}; + +static QCache<FindFileCacheElem> g_findFileDefCache(5000); + FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) { ambig=FALSE; + if (n==0) return 0; + + QCString key; + key.sprintf("%p:",fnDict); + key+=n; + + g_findFileDefCache.setAutoDelete(TRUE); + FindFileCacheElem *cachedResult = g_findFileDefCache.find(key); + if (cachedResult) + { + ambig = cachedResult->isAmbig; + return cachedResult->fileDef; + } + else + { + cachedResult = new FindFileCacheElem(0,FALSE); + } + QCString name=convertToQCString(QDir::cleanDirPath(n)); QCString path; - if (name.isEmpty()) return 0; - int slashPos=QMAX(name.findRev('/'),name.findRev('\\')); + int slashPos; + FileName *fn; + if (name.isEmpty()) goto exit; + slashPos=QMAX(name.findRev('/'),name.findRev('\\')); if (slashPos!=-1) { path=name.left(slashPos+1); name=name.right(name.length()-slashPos-1); } //printf("findFileDef path=`%s' name=`%s'\n",path.data(),name.data()); - if (name.isEmpty()) return 0; - FileName *fn; + if (name.isEmpty()) goto exit; if ((fn=(*fnDict)[name])) { if (fn->count()==1) @@ -3791,6 +3842,8 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) FileDef *fd = fn->getFirst(); if (path.isEmpty() || fd->getPath().right(path.length())==path) { + cachedResult->fileDef = fd; + g_findFileDefCache.insert(key,cachedResult); return fd; } } @@ -3809,9 +3862,14 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) } } ambig=(count>1); + cachedResult->isAmbig = ambig; + cachedResult->fileDef = lastMatch; + g_findFileDefCache.insert(key,cachedResult); return lastMatch; } } +exit: + g_findFileDefCache.insert(key,cachedResult); return 0; } @@ -5276,3 +5334,44 @@ bool findAndRemoveWord(QCString &s,const QCString &word) return FALSE; } +/** Special version of QCString::stripWhiteSpace() that only strips + * empty lines. + */ +QCString stripLeadingAndTrailingEmptyLines(const QCString &s) +{ + const char *p = s.data(); + if (p==0) return 0; + + // search for leading empty lines + int i=0,li=-1,l=s.length(); + char c; + while ((c=*p++)) + { + if (c==' ' || c=='\t' || c=='\r') i++; + else if (c=='\n') i++,li=i; + else break; + } + + // search for trailing empty lines + int b=l-1,bi=-1; + p=s.data()+b; + while (b>=0) + { + c=*--p; + if (c==' ' || c=='\t' || c=='\r') b--; + else if (c=='\n') bi=b,b--; + else break; + } + + // return whole string if no leading or trailing lines where found + if (li==-1 && bi==-1) return s; + + // return substring + if (bi==-1) bi=l; + if (li==-1) li=0; + if (bi<=li) return 0; // only empty lines + return s.mid(li,bi-li); +} + + + @@ -230,6 +230,7 @@ void createSubDirs(QDir &d); QCString stripPath(const char *s); bool containsWord(const QCString &s,const QCString &word); bool findAndRemoveWord(QCString &s,const QCString &word); +QCString stripLeadingAndTrailingEmptyLines(const QCString &s); #endif |