summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bufstr.h5
-rw-r--r--src/classdef.cpp9
-rw-r--r--src/cmdmapper.cpp1
-rw-r--r--src/cmdmapper.h42
-rw-r--r--src/commentscan.l150
-rw-r--r--src/config.l1
-rw-r--r--src/definition.cpp5
-rw-r--r--src/docparser.cpp47
-rw-r--r--src/doctokenizer.l10
-rw-r--r--src/doxygen.cpp152
-rw-r--r--src/index.cpp8
-rw-r--r--src/memberdef.cpp21
-rw-r--r--src/memberdef.h2
-rw-r--r--src/pagedef.cpp87
-rw-r--r--src/pagedef.h10
-rw-r--r--src/scanner.l48
-rw-r--r--src/translator_cz.h131
-rw-r--r--src/translator_kr.h2
-rw-r--r--src/translator_ru.h73
-rw-r--r--src/translator_se.h58
-rw-r--r--src/util.cpp2
-rw-r--r--src/xmldocvisitor.cpp15
-rw-r--r--src/xmlgen.cpp13
23 files changed, 460 insertions, 432 deletions
diff --git a/src/bufstr.h b/src/bufstr.h
index 7d3c284..c1cb307 100644
--- a/src/bufstr.h
+++ b/src/bufstr.h
@@ -55,6 +55,11 @@ class BufStr
makeRoomFor(s);
m_writeOffset+=s;
}
+ void shrink( uint newlen )
+ {
+ m_writeOffset=newlen;
+ resize(newlen);
+ }
void resize( uint newlen )
{
m_size=newlen;
diff --git a/src/classdef.cpp b/src/classdef.cpp
index b50931a..3c70485 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1571,7 +1571,7 @@ void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
ol.writeString("href=\"");
ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
ol.writeString("\">");
- ol.writeString(md->localName());
+ ol.writeString(md->name());
ol.writeString("</a>");
}
ol.writeString("</td></tr>\n");
@@ -2076,12 +2076,9 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
static bool isStandardFunc(MemberDef *md)
{
- ClassDef *cd=md->getClassDef();
- if (cd->templateMaster()) cd=cd->templateMaster();
return md->name()=="operator=" || // assignment operator
- md->name()==cd->localName() || // constructor
- (md->name().find('~')!=-1 &&
- md->name().find("operator")==-1); // destructor
+ md->isConstructor() || // constructor
+ md->isDestructor(); // destructor
}
/*!
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index f01fad4..51c41eb 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -73,6 +73,7 @@ CommandMap cmdMap[] =
{ "sa", CMD_SA },
{ "secreflist", CMD_SECREFLIST },
{ "section", CMD_SECTION },
+ { "subpage", CMD_SUBPAGE },
{ "subsection", CMD_SUBSECTION },
{ "subsubsection", CMD_SUBSUBSECTION },
{ "paragraph", CMD_PARAGRAPH },
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index c215d6f..e5277f2 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -66,27 +66,27 @@ enum CommandType
CMD_INTERNAL = 32,
CMD_INTERNALREF = 33,
CMD_INVARIANT = 34 | SIMPLESECT_BIT ,
- //CMD_LANGSWITCH = 35,
- CMD_LATEXONLY = 36,
- CMD_LESS = 37,
- CMD_LI = 38,
- CMD_LINE = 39,
- CMD_LINEBREAK = 40,
- CMD_LINK = 41,
- CMD_NOTE = 42 | SIMPLESECT_BIT,
- CMD_PAR = 43 | SIMPLESECT_BIT,
- CMD_PARAM = 44 | SIMPLESECT_BIT,
- CMD_PERCENT = 45,
- CMD_POST = 46 | SIMPLESECT_BIT,
- CMD_PRE = 47 | SIMPLESECT_BIT ,
- CMD_REF = 48,
- CMD_SECREFITEM = 49,
- CMD_REMARK = 50 | SIMPLESECT_BIT ,
- CMD_RETURN = 51 | SIMPLESECT_BIT ,
- CMD_RETVAL = 52 | SIMPLESECT_BIT,
- CMD_SA = 53 | SIMPLESECT_BIT ,
- CMD_SECREFLIST = 54,
- CMD_SECTION = 55,
+ CMD_LATEXONLY = 35,
+ CMD_LESS = 36,
+ CMD_LI = 37,
+ CMD_LINE = 38,
+ CMD_LINEBREAK = 39,
+ CMD_LINK = 40,
+ CMD_NOTE = 41 | SIMPLESECT_BIT,
+ CMD_PAR = 42 | SIMPLESECT_BIT,
+ CMD_PARAM = 43 | SIMPLESECT_BIT,
+ CMD_PERCENT = 44,
+ CMD_POST = 45 | SIMPLESECT_BIT,
+ CMD_PRE = 46 | SIMPLESECT_BIT ,
+ CMD_REF = 47,
+ CMD_SECREFITEM = 48,
+ CMD_REMARK = 49 | SIMPLESECT_BIT ,
+ CMD_RETURN = 50 | SIMPLESECT_BIT ,
+ CMD_RETVAL = 51 | SIMPLESECT_BIT,
+ CMD_SA = 52 | SIMPLESECT_BIT ,
+ CMD_SECREFLIST = 53,
+ CMD_SECTION = 54,
+ CMD_SUBPAGE = 55,
CMD_SUBSECTION = 56,
CMD_SUBSUBSECTION= 57,
CMD_PARAGRAPH = 58,
diff --git a/src/commentscan.l b/src/commentscan.l
index 59b13ce..0ea11ed 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -72,6 +72,7 @@ static void handleName(const QCString &);
static void handleTodo(const QCString &);
static void handleTest(const QCString &);
static void handleBug(const QCString &);
+static void handleSubpage(const QCString &s);
static void handleDeprecated(const QCString &);
static void handleXRefItem(const QCString &);
static void handleRelated(const QCString &);
@@ -153,6 +154,7 @@ static DocCmdMap docCmdMap[] =
{ "relatedalso", &handleRelatedAlso },
{ "relatesalso", &handleRelatedAlso },
{ "refitem", &handleRefItem },
+ { "subpage", &handleSubpage },
{ "section", &handleSection },
{ "subsection", &handleSection },
{ "subsubsection", &handleSection },
@@ -335,25 +337,25 @@ static QCString getDocSectionName(int s)
{
switch(s)
{
- case Entry::CLASSDOC_SEC: return "@class";
- case Entry::STRUCTDOC_SEC: return "@struct";
- case Entry::UNIONDOC_SEC: return "@union";
- case Entry::EXCEPTIONDOC_SEC: return "@exception";
- case Entry::NAMESPACEDOC_SEC: return "@namespace";
- case Entry::PROTOCOLDOC_SEC: return "@protocol";
- case Entry::CATEGORYDOC_SEC: return "@category";
- case Entry::ENUMDOC_SEC: return "@enum";
- case Entry::PAGEDOC_SEC: return "@page";
- case Entry::MEMBERDOC_SEC: return "@fn";
- case Entry::OVERLOADDOC_SEC: return "@overload";
- case Entry::FILEDOC_SEC: return "@file";
- case Entry::DEFINEDOC_SEC: return "@def";
- case Entry::GROUPDOC_SEC: return "@defgroup";
- case Entry::MAINPAGEDOC_SEC: return "@mainpage";
- case Entry::PACKAGEDOC_SEC: return "@package";
- case Entry::DIRDOC_SEC: return "@dir";
- case Entry::EXAMPLE_SEC: return "@example";
- case Entry::MEMBERGRP_SEC: return "@name";
+ case Entry::CLASSDOC_SEC: return "\\class";
+ case Entry::STRUCTDOC_SEC: return "\\struct";
+ case Entry::UNIONDOC_SEC: return "\\union";
+ case Entry::EXCEPTIONDOC_SEC: return "\\exception";
+ case Entry::NAMESPACEDOC_SEC: return "\\namespace";
+ case Entry::PROTOCOLDOC_SEC: return "\\protocol";
+ case Entry::CATEGORYDOC_SEC: return "\\category";
+ case Entry::ENUMDOC_SEC: return "\\enum";
+ case Entry::PAGEDOC_SEC: return "\\page";
+ case Entry::MEMBERDOC_SEC: return "\\fn";
+ case Entry::OVERLOADDOC_SEC: return "\\overload";
+ case Entry::FILEDOC_SEC: return "\\file";
+ case Entry::DEFINEDOC_SEC: return "\\def";
+ case Entry::GROUPDOC_SEC: return "\\defgroup";
+ case Entry::MAINPAGEDOC_SEC: return "\\mainpage";
+ case Entry::PACKAGEDOC_SEC: return "\\package";
+ case Entry::DIRDOC_SEC: return "\\dir";
+ case Entry::EXAMPLE_SEC: return "\\example";
+ case Entry::MEMBERGRP_SEC: return "\\name";
default: return "";
}
}
@@ -645,7 +647,18 @@ static int yyread(char *buf,int max_size)
/* start command character */
CMD ("\\"|"@")
-DETAILEDCMD {CMD}("arg"|"attention"|"author"|"bug"|"code"|"date"|"deprecated"|"dot"|"dotfile"|"example"|"htmlinclude"|"htmlonly"|"image"|"include"|"includelineno"|"internal"|"invariant"|"latexonly"|"li"|"line"|manonly"|"name"|"note"|"par"|"paragraph"|"param"|"post"|"pre"|"remarks"|"relate"[sd]"("also")?|"remarks"|"return"[s]?|"retval"|"sa"|"section"|"see"|"since"|"subsection"|"subsubsection"|"test"|"throw"|"todo"|"until"|"verbatim"|"verbinclude"|"version"|"warning"|"xrefitem")
+DCMD1 ("arg"|"attention"|"author"|"bug"|"code")
+DCMD2 ("date"|"deprecated"|"dot"|"dotfile"|"example")
+DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include")
+DCMD4 ("includelineno"|"internal"|"invariant")
+DCMD5 ("latexonly"|"li"|"line"|"manonly"|"name")
+DCMD6 ("note"|"par"|"paragraph"|"param"|"post")
+DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?))
+DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section")
+DCMD9 ("see"|"since"|"subsection"|"subsubsection")
+DCMD10 ("test"|"throw"|"todo"|"until"|"verbatim")
+DCMD11 ("verbinclude"|"version"|"warning"|"xrefitem")
+DETAILEDCMD {CMD}({DCMD1}|{DCMD2}|{DCMD3}|{DCMD4}|{DCMD5}|{DCMD6}|{DCMD7}|{DCMD8}|{DCMD9}|{DCMD10}|{DCMD11})
PRE [pP][rR][eE]
TABLE [tT][aA][bB][lL][eE]
P [pP]
@@ -672,7 +685,6 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
-%option nounput
%option noyywrap
/* comment parsing states. */
@@ -695,6 +707,8 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
%x GroupDocArg2
%x SectionLabel
%x SectionTitle
+%x SubpageLabel
+%x SubpageTitle
%x FormatBlock
%x LineParam
%x GuardParam
@@ -736,7 +750,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!)
addOutput(yytext);
}
-<Comment>{DETAILEDCMD}/[^a-z_A-Z] { // command that can end a brief description
+<Comment>{DETAILEDCMD}/[^a-z_A-Z]* { // command that can end a brief description
if (inContext!=OutputXRef) setOutput(OutputDoc);
// continue with the same input
REJECT;
@@ -1262,6 +1276,36 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
addOutput(*yytext);
}
+ /* ----- handle arguments of the subpage command ------- */
+
+<SubpageLabel>{LABELID} { // first argument
+ addOutput(yytext);
+ // we add subpage labels as a kind of "inheritance" relation to prevent
+ // needing to add another list to the Entry class.
+ current->extends->append(new BaseInfo(yytext,Public,Normal));
+ BEGIN(SubpageTitle);
+ }
+<SubpageLabel>{DOCNL} { // missing argument
+ warn(yyFileName,yyLineNr,
+ "Warning: \\subpage command has no label"
+ );
+ if (*yytext=='\n') yyLineNr++;
+ addOutput('\n');
+ BEGIN( Comment );
+ }
+<SubpageTitle>{DOCNL} { // no title, end command
+ addOutput(yytext);
+ BEGIN( Comment );
+ }
+<SubpageTitle>[ \t]*"\""[^\"\n]*"\"" { // add title, end of command
+ addOutput(yytext);
+ BEGIN( Comment );
+ }
+<SubpageTitle>. { // no title, end of command
+ unput(*yytext);
+ BEGIN( Comment );
+ }
+
/* ----- handle arguments of the anchor command ------- */
<AnchorLabel>{LABELID} { // found argument
@@ -1771,6 +1815,20 @@ static void handleSection(const QCString &s)
BEGIN(SectionLabel);
}
+static void handleSubpage(const QCString &s)
+{
+ if (current->section!=Entry::EMPTY_SEC &&
+ current->section!=Entry::PAGEDOC_SEC &&
+ current->section!=Entry::MAINPAGEDOC_SEC
+ )
+ {
+ warn(yyFileName,yyLineNr,
+ "Warning: found \\subpage command in a comment block that is not marked as a page!");
+ }
+ addOutput("@"+s+" ");
+ BEGIN(SubpageLabel);
+}
+
static void handleAnchor(const QCString &s)
{
addOutput("@"+s+" ");
@@ -1808,7 +1866,7 @@ static void handleElseIf(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found @else without matching start command");
+ "Warning: found \\else without matching start command");
}
else
{
@@ -1822,7 +1880,7 @@ static void handleElse(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found @else without matching start command");
+ "Warning: found \\else without matching start command");
}
else
{
@@ -1835,7 +1893,7 @@ static void handleEndIf(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found @endif without matching start command");
+ "Warning: found \\endif without matching start command");
}
else
{
@@ -1960,6 +2018,7 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
current = curEntry;
//previous = prevEntry;
inputString = comment;
+ if (inputString==0) return FALSE; // avoid empty strings
inputPosition = 0;
yyLineNr = lineNr;
yyFileName = fileName;
@@ -1993,47 +2052,6 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
return needNewEntry;
}
-#if 0
-//----------------------------------------------------------------------------
-void commentScanTest()
-{
- Entry *ce = new Entry;
- Entry *pe = new Entry;
- Entry *re = new Entry;
- Protection prot=Public;
-
- ce->doc.resize(0);ce->brief.resize(0);
- parseCommentBlock(ce,pe,re,"@brief A brief description.\n\n"
- "This is a @e simple test!\n","test.dox",
- 1,FALSE,FALSE,FALSE,prot);
- printf("---------\nbrief test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
-
- ce->doc.resize(0);ce->brief.resize(0);
- parseCommentBlock(ce,pe,re,"@defgroup grp A group\n"
- "This is a @c group definition.","test.dox",
- 1,FALSE,FALSE,FALSE,prot);
- printf("---------\ndefgroup test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
-
- ce->doc.resize(0);ce->brief.resize(0);
- parseCommentBlock(ce,pe,re,"A code example:\n"
- "@code\n"
- "void main()\n"
- "{\n"
- " printf(\"Hello world\");\n"
- "}\n"
- "@endcode\n"
- "More text follows.","test.dox",
- 1,FALSE,FALSE,FALSE,prot);
- printf("---------\ncode test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
-
- ce->doc.resize(0);ce->brief.resize(0);
- parseCommentBlock(ce,pe,re,"Some text <!-- A comment --> and more.\n"
- ,"test.dox",
- 1,FALSE,FALSE,FALSE,prot);
- printf("---------\nhtml comment test: result: brief=[%s] doc=[%s]\n",ce->brief.data(),ce->doc.data());
-
-}
-#endif
#if !defined(YY_FLEX_SUBMINOR_VERSION)
//----------------------------------------------------------------------------
diff --git a/src/config.l b/src/config.l
index fa951cf..bf7f30d 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1094,6 +1094,7 @@ void Config::check()
filePatternList.append("*.cxx");
filePatternList.append("*.cpp");
filePatternList.append("*.c++");
+ filePatternList.append("*.d");
filePatternList.append("*.java");
filePatternList.append("*.ii");
filePatternList.append("*.ixx");
diff --git a/src/definition.cpp b/src/definition.cpp
index c672125..b1b103e 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -29,6 +29,7 @@
#include "code.h"
#include "util.h"
#include "groupdef.h"
+#include "pagedef.h"
#include "section.h"
#if defined(_MSC_VER) || defined(__BORLANDC__)
@@ -789,6 +790,10 @@ void Definition::writePathFragment(OutputList &ol) const
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const GroupDef*)this)->groupTitle());
}
+ else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty())
+ {
+ ol.writeObjectLink(getReference(),getOutputFileBase(),0,((const PageDef*)this)->title());
+ }
else
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 03d30e1..3641caa 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -3620,6 +3620,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
void DocPara::handleRef(const QString &cmdName)
{
+ DBG(("handleRef(%s)\n",cmdName.data()));
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
@@ -3643,49 +3644,6 @@ endref:
doctokenizerYYsetStatePara();
}
-//int DocPara::handleLanguageSwitch()
-//{
-// int retval=RetVal_OK;
-//
-// if (!insideLang(this)) // start a language section at this level
-// {
-// do
-// {
-// int tok = doctokenizerYYlex();
-// if (tok==TK_WHITESPACE)
-// {
-// // end of language specific sections
-// retval=RetVal_OK;
-// goto endlang;
-// }
-// else if (tok==TK_NEWPARA)
-// {
-// // end of language specific sections
-// retval = tok;
-// goto endlang;
-// }
-// else if (tok==TK_WORD || tok==TK_LNKWORD)
-// {
-// DocLanguage *dl = new DocLanguage(this,g_token->name);
-// m_children.append(dl);
-// retval = dl->parse();
-// }
-// else
-// {
-// warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s as parameter of \\~",
-// tokToString(tok));
-// goto endlang;
-// }
-// }
-// while (retval==RetVal_SwitchLang);
-// }
-// else // return from this section
-// {
-// retval = RetVal_SwitchLang;
-// }
-//endlang:
-// return retval;
-//}
void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
{
@@ -4084,7 +4042,8 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_JAVALINK:
handleLink(cmdName,TRUE);
break;
- case CMD_REF:
+ case CMD_REF: // fall through
+ case CMD_SUBPAGE:
handleRef(cmdName);
break;
case CMD_SECREFLIST:
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index b92ca77..18c3060 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -682,22 +682,22 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
return 0;
}
-<St_Ref>{REFWORD} {
+<St_Ref>{REFWORD} { // label to refer to
g_token->name=yytext;
return TK_WORD;
}
-<St_Ref>{BLANK}+ {
+<St_Ref>{BLANK} { // white space
unput(' ');
return 0;
}
-<St_Ref>{WS}+"\"" {
+<St_Ref>{WS}+"\"" { // white space following by quoted string
BEGIN(St_Ref2);
}
-<St_Ref>\n {
+<St_Ref>\n { // new line
unput(*yytext);
return 0;
}
-<St_Ref>. {
+<St_Ref>. { // any other character
unput(*yytext);
return 0;
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index c2ed7c1..3db9682 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -221,9 +221,9 @@ static void addRelatedPage(Entry *root)
);
if (pd)
{
- // see if the function is inside a namespace
Definition *ctx = 0;
+ // find the page's context
if (root->parent->section & Entry::COMPOUND_MASK ) // inside class
{
QCString fullName=removeRedundantWhiteSpace(root->parent->name);
@@ -648,7 +648,7 @@ static void addClassToContext(Entry *root)
bool ambig;
- NamespaceDef *nd = 0;
+ //NamespaceDef *nd = 0;
FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// see if the using statement was found inside a namespace or inside
@@ -657,18 +657,16 @@ static void addClassToContext(Entry *root)
if (root->parent->section == Entry::NAMESPACE_SEC)
{
scName=root->parent->name;
- if (!scName.isEmpty())
- {
- nd = getResolvedNamespace(scName);
- }
+ // if (!scName.isEmpty())
+ // {
+ // nd = getResolvedNamespace(scName);
+ // }
}
QCString fullName = root->name;
- ClassDef *cd = getResolvedClass( nd,fd,
- // normally we could use root->name to find the class, but since we did not yet resolve
- // the class/namespace nesting relations we have to use the fully qualified name here.
- scName.isEmpty() ? root->name : scName+"::"+root->name,
- 0,0,TRUE);
+ QCString qualifiedName = scName.isEmpty() ? root->name : scName+"::"+root->name;
+
+ ClassDef *cd = getClass(qualifiedName);
Debug::print(Debug::Classes,0, " Found class with name %s (cd=%p)\n",
cd ? cd->name().data() : root->name.data(), cd);
@@ -1975,7 +1973,6 @@ static void buildVarList(Entry *root)
QCString classScope=stripAnonymousNamespaceScope(scope);
classScope=stripTemplateSpecifiersFromScope(classScope,FALSE);
QCString annScopePrefix=scope.left(scope.length()-classScope.length());
- scope=classScope;
bool isRelated=FALSE;
if (!root->relates.isEmpty()) // related variable
@@ -1991,6 +1988,7 @@ static void buildVarList(Entry *root)
{
// TODO: clean up this mess!
MemberDef *md=0;
+#if 0
// if cd is an annonymous scope we insert the member
// into a non-annonymous scope as well.
//int indentDepth=0;
@@ -2028,6 +2026,7 @@ static void buildVarList(Entry *root)
}
}
}
+#endif
//printf("name=`%s' scope=%s scope.right=%s indentDepth=%d anonyScopes=%d\n",
// name.data(),scope.data(),
// scope.right(scope.length()-si).data(),
@@ -6654,6 +6653,62 @@ static void findMainPage(Entry *root)
}
}
+static void computePageRelations(Entry *root)
+{
+ if ((root->section==Entry::PAGEDOC_SEC ||
+ root->section==Entry::MAINPAGEDOC_SEC
+ )
+ && !root->name.isEmpty()
+ )
+ {
+ PageDef *pd = root->section==Entry::PAGEDOC_SEC ?
+ Doxygen::pageSDict->find(root->name) :
+ Doxygen::mainPage;
+ if (pd)
+ {
+ QListIterator<BaseInfo> bii(*root->extends);
+ BaseInfo *bi;
+ for (bii.toFirst();(bi=bii.current());++bii)
+ {
+ PageDef *subPd = Doxygen::pageSDict->find(bi->name);
+ if (subPd)
+ {
+ pd->addInnerCompound(subPd);
+ //printf("*** Added subpage relation: %s->%s\n",
+ // pd->name().data(),subPd->name().data());
+ }
+ }
+ }
+ }
+ EntryListIterator eli(*root->sublist);
+ Entry *e;
+ for (;(e=eli.current());++eli)
+ {
+ computePageRelations(e);
+ }
+}
+
+static void checkPageRelations()
+{
+ PageSDict::Iterator pdi(*Doxygen::pageSDict);
+ PageDef *pd=0;
+ for (pdi.toFirst();(pd=pdi.current());++pdi)
+ {
+ Definition *ppd = pd->getOuterScope();
+ while (ppd)
+ {
+ if (ppd==pd)
+ {
+ err("Warning: page defined at line %d of file %s with label %s is a subpage "
+ "of itself! Please remove this cyclic dependency.\n",
+ pd->docLine(),pd->docFile().data(),pd->name().data());
+ exit(1);
+ }
+ ppd=ppd->getOuterScope();
+ }
+ }
+}
+
//----------------------------------------------------------------------------
static void resolveUserReferences()
@@ -6738,66 +6793,7 @@ static void generatePageDocs()
if (!pd->getGroupDef() && !pd->isReference())
{
msg("Generating docs for page %s...\n",pd->name().data());
- //outputList->disable(OutputGenerator::Man);
- QCString pageName;
- if (Config_getBool("CASE_SENSE_NAMES"))
- pageName=pd->name();
- else
- pageName=pd->name().lower();
-
- startFile(*outputList,pageName,pageName,pd->title());
-
- // save old generator state and write title only to Man generator
- outputList->pushGeneratorState();
- outputList->disableAllBut(OutputGenerator::Man);
- outputList->startTitleHead(pageName);
- outputList->endTitleHead(pageName, pageName);
- outputList->popGeneratorState();
-
- SectionInfo *si=0;
- if (!pd->title().isEmpty() && !pd->name().isEmpty() &&
- (si=Doxygen::sectionDict.find(pageName))!=0)
- {
- outputList->startSection(si->label,si->title,si->type);
- outputList->docify(si->title);
- outputList->endSection(si->label,si->type);
- }
- outputList->startTextBlock();
- outputList->parseDoc(pd->docFile(), // fileName
- pd->docLine(), // startLine
- pd, // context
- 0, // memberdef
- pd->documentation(), // docStr
- TRUE, // index words
- FALSE // not an example
- );
- outputList->endTextBlock();
- endFile(*outputList);
- //outputList->enable(OutputGenerator::Man);
-
- if (!Config_getString("GENERATE_TAGFILE").isEmpty())
- {
- bool found=FALSE;
- QDictIterator<RefList> rli(*Doxygen::xrefLists);
- RefList *rl;
- for (rli.toFirst();(rl=rli.current());++rli)
- {
- if (rl->listName()==pd->name())
- {
- found=TRUE;
- break;
- }
- }
- if (!found) // not one of the generated related pages
- {
- Doxygen::tagFile << " <compound kind=\"page\">" << endl;
- Doxygen::tagFile << " <name>" << pd->name() << "</name>" << endl;
- Doxygen::tagFile << " <title>" << convertToXML(pd->title()) << "</title>" << endl;
- Doxygen::tagFile << " <filename>" << pd->getOutputFileBase() << "</filename>" << endl;
- pd->writeDocAnchorsToTagFile();
- Doxygen::tagFile << " </compound>" << endl;
- }
- }
+ pd->writeDocumentation(*outputList);
}
}
}
@@ -7282,8 +7278,8 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
//printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize);
if (newSize!=size) // we removed chars
{
- dest.resize(oldPos+newSize); // resize the array
- //printf(".......resizing from %d to %d\n",oldPos+size,oldPos+newSize);
+ dest.shrink(oldPos+newSize); // resize the array
+ //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data());
}
}
@@ -8529,7 +8525,11 @@ void parseInput()
msg("Building class list...\n");
buildClassList(root);
+
+ msg("Associating documentation with classes...\n");
buildClassDocList(root);
+
+ msg("Computing nesting relations for classes...\n");
resolveClassNestingRelations();
// calling buildClassList may result in cached relations that
// become invalid after resolveClassNestingRelation(), that's why
@@ -8587,6 +8587,10 @@ void parseInput()
msg("Search for main page...\n");
findMainPage(root);
+ msg("Computing page relations...\n");
+ computePageRelations(root);
+ checkPageRelations();
+
msg("Sorting lists...\n");
Doxygen::memberNameSDict.sort();
Doxygen::functionNameSDict.sort();
diff --git a/src/index.cpp b/src/index.cpp
index fefd232..ae64403 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -2404,9 +2404,10 @@ void countRelatedPages(int &docPages,int &indexPages)
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
- if (!pd->getGroupDef() && (!pd->isReference() || Config_getBool("ALLEXTERNALS")))
+ if (!pd->getGroupDef() &&
+ (!pd->isReference() || Config_getBool("ALLEXTERNALS")))
{
- indexPages++;
+ indexPages++;
if (!pd->isReference()) docPages++;
}
}
@@ -2453,7 +2454,8 @@ void writePageIndex(OutputList &ol)
PageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
- if (!pd->getGroupDef() && (!pd->isReference() || Config_getBool("ALLEXTERNALS")))
+ if (!pd->getGroupDef() &&
+ (!pd->isReference() || Config_getBool("ALLEXTERNALS")))
{
QCString pageTitle;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index ef01fff..0377bb7 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -428,6 +428,7 @@ MemberDef::MemberDef(const char *df,int dl,
m_hasDocumentedParams = FALSE;
m_hasDocumentedReturnType = FALSE;
m_docProvider = 0;
+ m_isDMember = m_defFileName.right(2).lower()==".d";
}
/*! Destroys the member definition. */
@@ -2141,14 +2142,30 @@ Specifier MemberDef::virtualness() const
bool MemberDef::isConstructor() const
{
if (classDef)
- return name()==classDef->localName();
+ {
+ if (m_isDMember) // for D
+ {
+ return name()=="this";
+ }
+ else // for other languages
+ {
+ return name()==classDef->localName();
+ }
+ }
else
return FALSE;
}
bool MemberDef::isDestructor() const
{
- return name().find('~')!=-1 && name().find("operator")==-1;
+ if (m_isDMember) // for D
+ {
+ return name()=="~this";
+ }
+ else // other languages
+ {
+ return name().find('~')!=-1 && name().find("operator")==-1;
+ }
}
void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
diff --git a/src/memberdef.h b/src/memberdef.h
index 98be73c..d40fff2 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -404,6 +404,8 @@ class MemberDef : public Definition
// to store the output file base from tag files
QCString explicitOutputFileBase;
+
+ bool m_isDMember;
};
#endif
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index 36b63a0..b54a937 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -1,6 +1,10 @@
#include "pagedef.h"
#include "groupdef.h"
#include "docparser.h"
+#include "config.h"
+#include "util.h"
+#include "outputlist.h"
+#include "doxygen.h"
PageDef::PageDef(const char *f,int l,const char *n,
@@ -8,11 +12,12 @@ PageDef::PageDef(const char *f,int l,const char *n,
: Definition(f,l,n), m_title(t)
{
setDocumentation(d,f,l);
-
+ subPageDict = new PageSDict(7);
}
PageDef::~PageDef()
{
+ delete subPageDict;
}
void PageDef::findSectionsInDocumentation()
@@ -33,3 +38,83 @@ QCString PageDef::getOutputFileBase() const
return m_fileName;
}
+void PageDef::addInnerCompound(Definition *def)
+{
+ if (def->definitionType()==Definition::TypePage)
+ {
+ PageDef *pd = (PageDef*)def;
+ subPageDict->append(pd->name(),pd);
+ def->setOuterScope(this);
+ }
+}
+
+void PageDef::writeDocumentation(OutputList &ol)
+{
+ //outputList->disable(OutputGenerator::Man);
+ QCString pageName;
+ if (Config_getBool("CASE_SENSE_NAMES"))
+ pageName=name();
+ else
+ pageName=name().lower();
+
+ startFile(ol,pageName,pageName,title());
+
+ if (getOuterScope()!=Doxygen::globalScope)
+ {
+ getOuterScope()->writeNavigationPath(ol);
+ }
+
+ // save old generator state and write title only to Man generator
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.startTitleHead(pageName);
+ ol.endTitleHead(pageName, pageName);
+ ol.popGeneratorState();
+
+ SectionInfo *si=0;
+ if (!title().isEmpty() && !name().isEmpty() &&
+ (si=Doxygen::sectionDict.find(pageName))!=0)
+ {
+ ol.startSection(si->label,si->title,si->type);
+ ol.docify(si->title);
+ ol.endSection(si->label,si->type);
+ }
+ ol.startTextBlock();
+ ol.parseDoc(docFile(), // fileName
+ docLine(), // startLine
+ this, // context
+ 0, // memberdef
+ documentation(), // docStr
+ TRUE, // index words
+ FALSE // not an example
+ );
+ ol.endTextBlock();
+ endFile(ol);
+ //outputList->enable(OutputGenerator::Man);
+
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ bool found=FALSE;
+ QDictIterator<RefList> rli(*Doxygen::xrefLists);
+ RefList *rl;
+ for (rli.toFirst();(rl=rli.current());++rli)
+ {
+ if (rl->listName()==name())
+ {
+ found=TRUE;
+ break;
+ }
+ }
+ if (!found) // not one of the generated related pages
+ {
+ Doxygen::tagFile << " <compound kind=\"page\">" << endl;
+ Doxygen::tagFile << " <name>" << name() << "</name>" << endl;
+ Doxygen::tagFile << " <title>" << convertToXML(title()) << "</title>" << endl;
+ Doxygen::tagFile << " <filename>" << getOutputFileBase() << "</filename>" << endl;
+ writeDocAnchorsToTagFile();
+ Doxygen::tagFile << " </compound>" << endl;
+ }
+ }
+}
+
+
diff --git a/src/pagedef.h b/src/pagedef.h
index 462584f..1425dfd 100644
--- a/src/pagedef.h
+++ b/src/pagedef.h
@@ -18,6 +18,9 @@
#include "definition.h"
#include "sortdict.h"
+class PageSDict;
+class OutputList;
+
class PageDef : public Definition
{
public:
@@ -32,18 +35,23 @@ class PageDef : public Definition
{
return isLinkableInProject() || isReference();
}
+ void addSubPage(PageDef *def);
+ void writeDocumentation(OutputList &ol);
// functions to get a uniform interface with Definitions
QCString getOutputFileBase() const;
void findSectionsInDocumentation();
QCString title() const { return m_title; }
- GroupDef *getGroupDef() const;
+ GroupDef * getGroupDef() const;
+ PageSDict * getSubPages() const { return subPageDict; }
void setFileName(const char *name) { m_fileName = name; }
+ void addInnerCompound(Definition *d);
private:
QCString m_fileName;
QCString m_title;
GroupDef *m_inGroup;
+ PageSDict *subPageDict; // list of pages in the group
};
class PageSDict : public SDict<PageDef>
diff --git a/src/scanner.l b/src/scanner.l
index 1f8aa80..9617c42 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -473,9 +473,9 @@ static void setContext()
QCString fileName = yyFileName;
insideIDL = fileName.right(4)==".idl" || fileName.right(5)==".pidl" ||
fileName.right(4)==".odl";
- insideJava = fileName.right(5)==".java";
+ insideJava = fileName.right(5)==".java" || fileName.right(3)==".as";
insideCS = fileName.right(3)==".cs"; // for normal keywords add colon
- insideD = fileName.right(3)==".d"; // for normal keywords add colon
+ insideD = fileName.right(2)==".d"; // for normal keywords add colon
insidePHP = fileName.right(4)==".php" || fileName.right(5)==".php4" ||
fileName.right(4)==".inc" || fileName.right(6)==".phtml";
insideObjC = fileName.right(2)==".m" || fileName.right(2)==".M" ||
@@ -1188,9 +1188,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
lineCount();
current->argList->getLast()->name=QCString(yytext).stripWhiteSpace();
}
-<ObjCParams>"..." { // name of parameter
- current->argList->getLast()->attrib="[,]";
- current->argList->getLast()->type="...";
+<ObjCParams>","{BN}*"..." { // name of parameter
+ lineCount();
+ // do we want the comma as part of the name?
+ //current->name += ",";
+ Argument *a = new Argument;
+ a->attrib="[,]";
+ a->type="...";
+ current->argList->append(a);
}
/*
<ObjCParams>":" {
@@ -1567,9 +1572,16 @@ IDLATTR ("["[^\]]*"]"){BN}*
lineCount();
QCString scope=yytext;
current->name=removeRedundantWhiteSpace(substitute(scope,".","::"));
- //printf("import name = %s -> %s\n",yytext,current->name.data());
- current->fileName = yyFileName;
- current->section=Entry::USINGDECL_SEC;
+ current->fileName = yyFileName;
+ if (insideD)
+ {
+ current->section=Entry::USINGDIR_SEC;
+ }
+ else
+ {
+ //printf("import name = %s -> %s\n",yytext,current->name.data());
+ current->section=Entry::USINGDECL_SEC;
+ }
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
@@ -1709,6 +1721,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
<FindMembers>"Q_PROPERTY" { // Qt property declaration
current->protection = protection = Public ;
current->mtype = mtype = Property;
+ current->type.resize(0);
BEGIN(QtPropType);
}
<QtPropType>"(" { // start of property arguments
@@ -1717,8 +1730,14 @@ IDLATTR ("["[^\]]*"]"){BN}*
unput(';');
BEGIN(FindMembers);
}
+<QtPropType>"const"|"volatile" {
+ current->type+=yytext;
+ }
+<QtPropType>{B}+ {
+ current->type+=yytext;
+ }
<QtPropType>{ID} {
- current->type=yytext;
+ current->type+=yytext;
BEGIN(QtPropName);
}
<QtPropName>{ID} {
@@ -4384,11 +4403,11 @@ IDLATTR ("["[^\]]*"]"){BN}*
/* ---- Comments blocks ------ */
-<DocBlock>"*/" { // end of comment block
+<DocBlock>"*"*"*/" { // end of comment block
handleCommentBlock(docBlock,FALSE);
BEGIN(docBlockContext);
}
-<DocBlock>^{B}*"*"+/{BN}+ { // start of a comment line
+<DocBlock>^{B}*"*"+/[^//] { // start of a comment line
}
<DocBlock>("@@"|"\\\\"){ID}/[^a-z_A-Z0-9] { // escaped command
docBlock+=yytext;
@@ -4449,9 +4468,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
/*************************************************************************/
- /*** The next part is obsolete and will be removed */
-
-
+ /*** The next part is obsolete and will be removed ***/
<JavaDoc>{CMD}("brief"|"short"){B}+ {
@@ -6121,8 +6138,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
}
<DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; }
-
- /**** End of obsolete part */
+ /*** End of obsolete part ***/
/***********************************************************************/
diff --git a/src/translator_cz.h b/src/translator_cz.h
index 54436eb..b22d63b 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -27,101 +27,33 @@
//
// Updates:
// --------
-// 2000/06/20
-// - The prototype version of Czech strings with diacritics. The
-// translation was based on translator.h of Doxygen version
-// 1.1.4 (from scratch).
-//
-// 2000/07/10
-// - Updated version based on 1.1.5 sources (including important updates
-// of the up-to-1.1.4 strings). Czech strings in this file were written
-// in windows-1250 encoding. On-line decoding into iso-8859-2 ensured
-// via conditional compilation if the sources are compiled under UNIX.
-//
-// 2000/07/19
-// - Encoding conversion tables moved to the methods that use them.
-// - Updates for "new since 1.1.5".
-//
-// 2000/08/02 (Petr Prikryl)
-// - Updated for 1.2.0
-//
-// 2000/08/24
-// - Changed trTodo() text from "Udelat" to "Planovane upravy"
-// which seems more appropriate in the document context.
-// - Typo corrected in trMemberTypedefDocumentation().
-//
-// 2000/08/30
-// - Macro DECODE replaced by the inline Decode() (proposed by
-// Boris Bralo <boris.bralo@zg.tel.hr> in translator_hr.h).
-//
-// 2000/08/31
-// - Methods ISOToWin() and WinToISO() renamed and moved to the
-// base class (in translator.h) to be shared with the Croatian
-// translator.
-//
-// 2000/09/06
-// - Reimplementation of the method trInheritsList() which takes
-// into account quantity of base classes.
-//
-// 2000/09/11
-// - Update for "new since 1.2.1" version. The text of trDCOPMethods()
-// was translated rather blindly (not knowing what exactly
-// the DCOP means).
-//
-// 2000/10/17
-// - Update for "new since 1.2.2" version.
-//
-// 2001/01/09
-// - Update for "new since 1.2.4" version. As I do not use Java,
-// I tried my best to guess the Czech terminology for the Java.
-// Let me know if some wording should be changed/improved.
-//
-// 2001/02/15
-// - trMore() now returns only "..." (ellipsis). The Czech replacement
-// of "(more)" was too much visible. The previous "(...)" did not
-// look well.
-//
-// 2001/02/26
-// - Update for "new since 1.2.5" version (trBug(), trBugList()).
-//
-// 2001/03/12
-// - Minor correction of comments which copied the same
-// corrections in translator.h (doubled backslash) just after
-// 1.2.6 release.
-//
-// 2001/04/10
-// - Update for OPTIMIZE_OUTPUT_FOR_C (1.2.6-20010408).
-// - Removed implementation of latexBabelPackage().
-// - Removed implementation of trVerbatimText().
-//
-// 2001/04/20
-// - Update for "new since 1.2.6-20010422". Experimental version
-// introducing TranslatorAdapter class and the abstract base
-// class Translator. The English translator is now on the same
-// level as other translators.
-//
-// 2001/05/02
-// - The Decode() inline identifier changed to decode (i.e. lower
-// case) to be consistent with HR and RU translator, which also
-// use the approach.
-// - Removed the obsolete method trFiles().
-//
-// 2001/05/18
-// - The trRelatedPagesDescription() content updated to fit
-// the context better.
-// - Implemented new method trAuthor(params).
-// - Removed obsolete methods trAuthor() and trAuthors().
-//
-// 2001/05/25
-// - Updated misleading information in trLegendDocs().
-// - The trReimplementedInList() updated to fit the context better.
-// - The trReimplementedFromList() updated to fit the context better.
-//
+// 2000/06/20 - Prototype: with diacritics; based on ver. 1.1.4 (from scratch).
+// 2000/07/10 - Update to 1.1.5; conditionally decoding to iso-8859-2 for UNIX.
+// 2000/07/19 - Updates for "new since 1.1.5"; encoding conversion separated.
+// 2000/08/02 - Updated for 1.2.0
+// 2000/08/24 - Corrections, updates.
+// 2000/08/30 - Macro DECODE replaced by the inline (thanks to Boris Bralo).
+// 2000/08/31 - ISOToWin() and WinToISO() moved to the base class.
+// 2000/09/06 - Reimplementation of trInheritsList().
+// 2000/09/11 - Update for "new since 1.2.1" version.
+// 2000/10/17 - Update for "new since 1.2.2" version.
+// 2001/01/09 - Update for "new since 1.2.4" version.
+// 2001/02/15 - trMore() now returns only "..." (ellipsis).
+// 2001/02/26 - Update for "new since 1.2.5" version (trBug(), trBugList()).
+// 2001/03/12 - Minor correction of comments (synchronous with translator.h).
+// 2001/04/10 - Updates (1.2.6-20010408), cleaning.
+// 2001/04/20 - Update for "new since 1.2.6-20010422". Experimental version
+// introducing TranslatorAdapter class and the abstract base
+// class Translator. The English translator is now on the same
+// level as other translators.
+// 2001/05/02 - Decode() inline changed to decode(); cleaning.
+// 2001/05/18 - Updates, corrections.
+// 2001/05/25 - Corrections.
// 2001/07/16 - trClassDocumentation() updated as in the English translator.
// 2001/11/06 - trReferences() implemented.
// 2002/01/23 - Two new methods "since 1.2.13" implemented.
// 2002/03/05 - ... forgot to replace TranslatorAdapter... by Translator.
-// 2002/07/08 (my birthday! ;) - The new trRTFTableOfContents() implemented.
+// 2002/07/08 - The new trRTFTableOfContents() implemented. (my birthday! ;)
// 2002/07/29 - The new trDeprecatedList() implemented.
// 2002/10/15 - The new trEvents() and trEventDocumentation() implemented.
// 2003/04/28 - Five new methods "since 1.3" implemented.
@@ -132,6 +64,7 @@
// 2004/06/16 - The new method "since 1.3.8" implemented.
// 2004/09/14 - The new methods "since 1.3.9" implemented.
// 2005/02/11 - The "never used" methods removed.
+// 2005/03/08 - Update for "new since 1.4.1" (trOverloadText())
// Todo
// ----
@@ -151,7 +84,7 @@
// Windows version. The version which does not call the function is
// probably slightly faster.
-class TranslatorCzech : public TranslatorAdapter_1_4_1
+class TranslatorCzech : public Translator
{
private:
/*! The decode() inline assumes the source written in the
@@ -1673,6 +1606,20 @@ class TranslatorCzech : public TranslatorAdapter_1_4_1
result += "e";
return decode(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 decode("Jde o pøetíženou (overloaded) metodu, "
+ "která má usnadnit používání. Od výše uvedené metody se liší "
+ "pouze jinak zadávanými argumenty.");
+ }
};
#endif // TRANSLATOR_CZ_H
diff --git a/src/translator_kr.h b/src/translator_kr.h
index 32b1302..96b08e1 100644
--- a/src/translator_kr.h
+++ b/src/translator_kr.h
@@ -60,7 +60,7 @@
//
-class TranslatorKorean : public TranslatorAdapter_1_3_9
+class TranslatorKorean : public TranslatorAdapter_1_4_1
{
private:
/*! The decode() can change euc into sjis */
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 3736a93..900e87c 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -49,10 +49,10 @@
#ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H
-class TranslatorRussian : public TranslatorAdapter_1_4_1
+class TranslatorRussian : public Translator
{
private:
- /*! The Decode() inline assumes the source written in the
+ /*! The decode() inline assumes the source written in the
Koi8-R encoding (maintainer dependent).
*/
inline QCString decode(const QCString & sInput)
@@ -216,10 +216,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trFileList()
{ return decode("æÁÊÌÙ"); }
- /*! This is put above each page as a link to the list of all verbatim headers */
- virtual QCString trHeaderFiles()
- { return decode("úÁÇÏÌÏ×ÏÞÎÙÅ ÆÁÊÌÙ"); }
-
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
@@ -330,10 +326,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
return decode( result );
}
- /*! This is an introduction to the page with the list of all header files. */
- virtual QCString trHeaderFilesDescription()
- { return decode("ðÏÌÎÙÊ ÓÐÉÓÏË ÚÁÇÏÌÏ×ÏÞÎÙÈ ÆÁÊÌÏ×."); }
-
/*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return decode("ðÏÌÎÙÊ ÓÐÉÓÏË ÐÒÉÍÅÒÏ×."); }
@@ -346,12 +338,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trModulesDescription()
{ return decode("ðÏÌÎÙÊ ÓÐÉÓÏË ÇÒÕÐÐ."); }
- /*! This sentences is used in the annotated class/file lists if no brief
- * description is given.
- */
- virtual QCString trNoDescriptionAvailable()
- { return decode("ïÐÉÓÁÎÉÅ ÏÔÓÕÔÓ×ÕÅÔ"); }
-
// index titles (the project name is prepended for these)
@@ -502,12 +488,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
{ return decode("ðÅÒÅÞÉÓÌÅÎÉÑ"); }
/*! This is used in the documentation of a file/namespace before the list
- * of documentation blocks for enumeration values
- */
- virtual QCString trEnumerationValueDocumentation()
- { return decode("üÌÅÍÅÎÔÙ ÐÅÒÅÞÉÓÌÅÎÉÊ"); }
-
- /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
virtual QCString trFunctionDocumentation()
@@ -566,20 +546,10 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
virtual QCString trForInternalUseOnly()
{ return decode("ôÏÌØËÏ ÄÌÑ ×ÎÕÔÒÅÎÎÅÇÏ ÉÓÐÏÌØÚÏ×ÁÎÉÑ"); }
- /*! this text is generated when the \\reimp command is used. */
- virtual QCString trReimplementedForInternalReasons()
- /*??*/
- { return decode("éÚÍÅÎÅÎÏ ÐÏ ×ÎÕÔÒÅÎÎÉÍ ÐÒÉÞÉÎÁÍ");
- }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return decode("ðÒÅÄÕÐÒÅÖÄÅÎÉÑ"); }
- /*! this text is generated when the \\bug command is used. */
- virtual QCString trBugsAndLimitations()
- { return decode("ïÛÉÂËÉ É ÏÇÒÁÎÉÞÅÎÉÑ"); }
-
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return decode("÷ÅÒÓÉÑ"); }
@@ -881,10 +851,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
// new since 0.49-991106
//////////////////////////////////////////////////////////////////////////
- virtual QCString trSources()
- {
- return decode("éÓÈÏÄÎÙÅ ÔÅËÓÔÙ.");
- }
virtual QCString trDefinedAtLineInSourceFile()
{
return decode("óÍ. ÏÐÒÅÄÅÌÅÎÉÅ × ÆÁÊÌÅ @1 ÓÔÒÏËÁ @0");
@@ -1192,11 +1158,6 @@ class TranslatorRussian : 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 decode("éÎÔÅÒÆÅÊÓÙ");
- }
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
@@ -1229,11 +1190,6 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
{
return decode("ðÁËÅÔÙ");
}
- /*! Used as a chapter title for Latex & RTF output */
- virtual QCString trPackageDocumentation()
- {
- return decode("ðÁËÅÔÙ");
- }
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
@@ -1352,17 +1308,6 @@ class TranslatorRussian : 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 ? "ðÏÌ" : "ÐÏÌ"));
- result+=(singular ? "Å" : "Ñ");
- return decode(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 ? "çÌÏÂÁÌØÎÙ" : "ÇÌÏÂÁÌØÎÙ"));
@@ -1616,6 +1561,20 @@ class TranslatorRussian : public TranslatorAdapter_1_4_1
if (singular) result+="Ñ"; else result+="É";
return decode( 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 decode( "üÔÁ ÆÕÎËÃÉÑ ÐÅÒÅÇÒÕÖÅÎÁ É ÐÒÅÄÏÓÔÁ×ÌÑÅÔÓÑ ÉÓËÌÀÞÉÔÅÌØÎÏ "
+ "ÄÌÑ ÕÄÏÂÓÔ×Á ÉÓÐÏÌØÚÏ×ÁÎÉÑ. ïÎÁ ÏÔÌÉÞÁÅÔÓÑ ÏÔ ×ÙÛÅÕÐÏÍÑÎÕÔÏÊ "
+ "ÔÏÌØËÏ ÆÁËÔÉÞÅÓËÉÍÉ ÁÒÇÕÍÅÎÔÁÍÉ." );
+ }
};
#endif
diff --git a/src/translator_se.h b/src/translator_se.h
index 6cbd487..6e80997 100644
--- a/src/translator_se.h
+++ b/src/translator_se.h
@@ -69,7 +69,7 @@ Problem!
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
-class TranslatorSwedish : public TranslatorAdapter_1_4_1
+class TranslatorSwedish : public Translator
{
public:
@@ -187,9 +187,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trFileList()
{ return "Fillista"; }
- virtual QCString trHeaderFiles()
- { return "Headerfiler"; }
-
virtual QCString trCompoundMembers()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
@@ -314,9 +311,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
return result;
}
- virtual QCString trHeaderFilesDescription()
- { return "Här följer headerfilerna som API:n består av:"; }
-
virtual QCString trExamplesDescription()
{ return "Här följer en lista med alla exempel:"; }
@@ -326,9 +320,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trModulesDescription()
{ return "Här följer en lista över alla moduler:"; }
- virtual QCString trNoDescriptionAvailable()
- { return "Beskrivning saknas"; }
-
virtual QCString trDocumentation()
{ return "Dokumentation"; }
@@ -411,9 +402,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trEnumerationTypeDocumentation()
{ return "Dokumentation över egenuppräknande typer"; }
- virtual QCString trEnumerationValueDocumentation()
- { return "Dokumentation över egenuppräknande typers värden"; }
-
virtual QCString trFunctionDocumentation()
{ return "Dokumentation över funktioner"; }
@@ -456,15 +444,9 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
virtual QCString trForInternalUseOnly()
{ return "Endast för internt bruk."; }
- virtual QCString trReimplementedForInternalReasons()
- { return "Omskriven av intern anledning; API:n påverkas inte.";}
-
virtual QCString trWarning()
{ return "Varning"; }
- virtual QCString trBugsAndLimitations()
- { return "Fel och begränsningar"; }
-
virtual QCString trVersion()
{ return "Version"; }
@@ -704,10 +686,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
- virtual QCString trSources()
- {
- return "Källor";
- }
virtual QCString trDefinedAtLineInSourceFile()
{
return "Definition på rad @0 i filen @1.";
@@ -1027,11 +1005,6 @@ class TranslatorSwedish : 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 "Gränssnitt";
- }
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
@@ -1065,11 +1038,6 @@ class TranslatorSwedish : public TranslatorAdapter_1_4_1
{
return "Paket";
}
- /*! Used as a chapter title for Latex & RTF output */
- virtual QCString trPackageDocumentation()
- {
- return "Paketdokumentation";
- }
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
@@ -1193,16 +1161,6 @@ class TranslatorSwedish : 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 ? "Fält" : "fält"));
- return result;
- }
-
- /*! This is used for translation of the word that will possibly
- * be followed by a single name or by a list of names
- * of the category.
- */
virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "Global" : "global"));
@@ -1458,6 +1416,20 @@ class TranslatorSwedish : 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 "Det här är en överlagrad medlemsfunktion "
+ "tillhandahållen för bekvämlighet. Den enda som "
+ "skiljer sig från ovanstående funktion är vilka "
+ "argument den tar emot.";
+ }
};
diff --git a/src/util.cpp b/src/util.cpp
index 37da875..dafc068 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -908,6 +908,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition
Definition *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
+ //printf("Trying for class %s\n",cd->name().data());
i = isAccessibleFromWithExpScope(scope,fileScope,item,cd->name());
if (i!=-1)
{
@@ -925,6 +926,7 @@ int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition
{
if (g_visitedNamespaces.find(nd->name())==0)
{
+ //printf("Trying for namespace %s\n",nd->name().data());
i = isAccessibleFromWithExpScope(scope,fileScope,item,nd->name());
if (i!=-1)
{
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 7eb6b65..178a0aa 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -641,6 +641,21 @@ void XmlDocVisitor::visitPre(DocImage *img)
m_t << "\"";
}
m_t << ">";
+
+ // copy the image to the output dir
+ QFile inImage(img->name());
+ QFile outImage(Config_getString("XML_OUTPUT")+"/"+baseName.ascii());
+ if (inImage.open(IO_ReadOnly))
+ {
+ if (outImage.open(IO_WriteOnly))
+ {
+ char *buffer = new char[inImage.size()];
+ inImage.readBlock(buffer,inImage.size());
+ outImage.writeBlock(buffer,inImage.size());
+ outImage.flush();
+ delete buffer;
+ }
+ }
}
void XmlDocVisitor::visitPost(DocImage *)
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index aa7cb6c..de9473c 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -478,6 +478,18 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c
}
+static void stripQualifiers(QCString &typeStr)
+{
+ bool done=FALSE;
+ while (!done)
+ {
+ if (typeStr.left(7)=="static ") typeStr=typeStr.mid(7);
+ else if (typeStr.left(8)=="virtual ") typeStr=typeStr.mid(8);
+ else if (typeStr.left(9)=="volatile ") typeStr=typeStr.mid(9);
+ else done=TRUE;
+ }
+}
+
static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def)
{
@@ -612,6 +624,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
writeMemberTemplateLists(md,t);
}
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
+ stripQualifiers(typeStr);
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md->name(),typeStr);
t << "</type>" << endl;