summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-12-15 18:58:39 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-12-15 18:58:39 (GMT)
commit104be290eb99ab3277906a57fb4673dfa1850bc6 (patch)
tree1cb1b44f09351116c7ebe409fef462341fac2ff3 /src
parent4d3dea2f08f3bed73db5c3b8dc3772e46decb479 (diff)
downloadDoxygen-104be290eb99ab3277906a57fb4673dfa1850bc6.zip
Doxygen-104be290eb99ab3277906a57fb4673dfa1850bc6.tar.gz
Doxygen-104be290eb99ab3277906a57fb4673dfa1850bc6.tar.bz2
Release-1.3.5-20031215
Diffstat (limited to 'src')
-rw-r--r--src/config.l7
-rw-r--r--src/dot.cpp2
-rw-r--r--src/entry.cpp2
-rw-r--r--src/entry.h1
-rw-r--r--src/htmldocvisitor.cpp8
-rw-r--r--src/htmlgen.cpp126
-rw-r--r--src/lang_cfg.h1
-rw-r--r--src/language.cpp7
-rw-r--r--src/latexgen.cpp4
-rw-r--r--src/libdoxygen.pro.in3
-rw-r--r--src/pre.l84
-rw-r--r--src/scanner.l198
-rw-r--r--src/translator_ke.h50
-rw-r--r--src/translator_sr.h118
-rw-r--r--src/util.cpp146
-rw-r--r--src/xmlgen.cpp2
16 files changed, 607 insertions, 152 deletions
diff --git a/src/config.l b/src/config.l
index cd88d3e..b2f7848 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1316,7 +1316,7 @@ void Config::create()
"The default language is English, other supported languages are: \n"
"Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, \n"
"Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en \n"
- "(Japanese with English messages), Korean, Norwegian, Polish, Portuguese, \n"
+ "(Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, \n"
"Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.\n",
"English"
);
@@ -1369,6 +1369,7 @@ void Config::create()
#endif
#ifdef LANG_KR
ce->addValue("Korean");
+ ce->addValue("Korean-en");
#endif
#ifdef LANG_NO
ce->addValue("Norwegian");
@@ -2441,7 +2442,7 @@ void Config::create()
);
cb->addDependency("ENABLE_PREPROCESSING");
//-----------------------------------------------------------------------------------------------
- addInfo( "External","Configuration::addtions related to external references ");
+ addInfo( "External","Configuration::additions related to external references ");
//-----------------------------------------------------------------------------------------------
cl = addList(
"TAGFILES",
@@ -2660,7 +2661,7 @@ void Config::create()
cb->addDependency("HAVE_DOT");
//-----------------------------------------------------------------------------------------------
- addInfo( "Search","Configuration::addtions related to the search engine ");
+ addInfo( "Search","Configuration::additions related to the search engine ");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"SEARCHENGINE",
diff --git a/src/dot.cpp b/src/dot.cpp
index 06fa924..694b9ef 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -99,10 +99,10 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
char buf[maxLineLen];
char url[maxLineLen];
char ref[maxLineLen];
- bool isRef = FALSE;
int x1,y1,x2,y2;
while (!f.atEnd())
{
+ bool isRef = FALSE;
int numBytes = f.readLine(buf,maxLineLen);
buf[numBytes-1]='\0';
//printf("ReadLine `%s'\n",buf);
diff --git a/src/entry.cpp b/src/entry.cpp
index 3cb431a..2a729d3 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -87,6 +87,7 @@ Entry::Entry(const Entry &e)
initializer = e.initializer;
initLines = e.initLines;
callGraph = e.callGraph;
+ objc = e.objc;
//todoId = e.todoId;
//testId = e.testId;
//bugId = e.bugId;
@@ -260,6 +261,7 @@ void Entry::reset()
proto = FALSE;
explicitExternal = FALSE;
memSpec = 0;
+ objc = FALSE;
subGrouping = TRUE;
protection = Public;
groupDocType = GROUPDOC_NORMAL;
diff --git a/src/entry.h b/src/entry.h
index b796b4e..a15c980 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -293,6 +293,7 @@ class Entry
QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in
TagInfo *tagInfo; //!< tag file info
static int num; //!< counts the total number of entries
+ bool objc; //!< Objective-C construct
enum
{
GROUPDOC_NORMAL, //<! defgroup
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 9db76aa..a78c2ba 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -188,14 +188,14 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
switch(s->type())
{
case DocVerbatim::Code: // fall though
- m_t << "<div class=\"fragment\"><pre>";
+ m_t << "<pre class=\"fragment\"><div>";
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
- m_t << "</pre></div>";
+ m_t << "</div></pre>";
break;
case DocVerbatim::Verbatim:
- m_t << "<div class=\"fragment\"><pre>";
+ m_t << "<pre class=\"fragment\"><div>";
filter(s->text());
- m_t << "</pre></div>";
+ m_t << "</div></pre>";
break;
case DocVerbatim::HtmlOnly:
m_t << s->text();
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index d247102..fa8af17 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -49,38 +49,66 @@ static const char *defaultStyleSheet =
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
"}\n"
"CAPTION { font-weight: bold }\n"
-"DIV.qindex { width: 100%;\n"
-" background-color: #eeeeff;\n"
-" border: 4px solid #eeeeff;\n"
-" text-align: center;\n"
-" margin-bottom: 2px\n"
+"DIV.qindex {\n"
+" width: 100%;\n"
+" background-color: #eeeeff;\n"
+" border: 1px solid #B0B0B0;\n"
+" text-align: center;\n"
+" margin: 2px;\n"
+" padding: 2px;\n"
+"}\n"
+"A.qindex { text-decoration: none; font-weight: bold; color: #1A419D}\n"
+"A.qindex:visited { text-decoration: none; font-weight: bold; color: #1A419D}\n"
+"A.qindex:hover {\n"
+" text-decoration: none;\n"
+" background-color: #ddddff;\n"
+" padding-top: 2px;\n"
+" padding-right: 2px;\n"
+" padding-bottom: 2px;\n"
+" padding-left: 2px;\n"
"}\n"
-"A.qindex { text-decoration: none; font-weight: bold; color: #0000ee }\n"
-"A.qindex:visited { text-decoration: none; font-weight: bold; color: #0000ee }\n"
-"A.qindex:hover { text-decoration: none; background-color: #ddddff }\n"
-"A.qindexHL { text-decoration: none; font-weight: bold;\n"
-" background-color: #6666cc;\n"
-" color: #ffffff\n"
+"A.qindexHL {\n"
+" text-decoration: none;\n"
+" font-weight: bold;\n"
+" background-color: #6666cc;\n"
+" color: #ffffff;\n"
+" padding: 2 6px;\n"
+" border: 1px double #9295C2;\n"
" }\n"
-"A.qindexHL:hover { text-decoration: none; background-color: #6666cc; color: #ffffff }\n"
+"A.qindexHL:hover {\n"
+" text-decoration: none;\n"
+" background-color: #6666cc;\n"
+" color: #ffffff;\n"
+" padding: 2px 6px;\n"
+"}\n"
"A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }\n"
"A.el { text-decoration: none; font-weight: bold }\n"
"A.elRef { font-weight: bold }\n"
-"A.code { text-decoration: none; font-weight: normal; color: #4444ee }\n"
-"A.codeRef { font-weight: normal; color: #4444ee }\n"
+"A.code { text-decoration: none; font-weight: normal; color: #1A419D}\n"
+"A.codeRef { font-weight: normal; color: #1A419D}\n"
"A:hover { text-decoration: none; background-color: #f2f2ff }\n"
"DL.el { margin-left: -1cm }\n"
+"PRE.fragment {\n"
+" border: 1px solid #CCCCCC;\n"
+" background-color: #f5f5f5;\n"
+" margin-top: 4px;\n"
+" margin-bottom: 4px;\n"
+" margin-left: 2px;\n"
+" margin-right: 8px;\n"
+" padding-left: 6px;\n"
+" padding-right: 6px;\n"
+" padding-top: 4px;\n"
+" padding-bottom: 4px;\n"
+"}\n"
"DIV.fragment {\n"
-" width: 98%;\n"
" border: 1px solid #CCCCCC;\n"
" background-color: #f5f5f5;\n"
-" padding-left: 4px;\n"
-" margin: 4px;\n"
+" padding: 6px;\n"
"}\n"
"DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n"
-"TD.md { background-color: #f2f2ff; font-weight: bold; }\n"
-"TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }\n"
-"TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }\n"
+"TD.md { background-color: #F4F4FB; font-weight: bold; }\n"
+"TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }\n"
+"TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"BODY {\n"
@@ -89,29 +117,31 @@ static const char *defaultStyleSheet =
" margin-right: 20px;\n"
" margin-left: 20px;\n"
"}\n"
-"TD.indexkey { \n"
-" background-color: #eeeeff; \n"
-" font-weight: bold; \n"
-" padding-right : 10px; \n"
-" padding-top : 2px; \n"
-" padding-left : 10px; \n"
-" padding-bottom : 2px; \n"
-" margin-left : 0px; \n"
-" margin-right : 0px; \n"
-" margin-top : 2px; \n"
-" margin-bottom : 2px \n"
+"TD.indexkey {\n"
+" background-color: #eeeeff;\n"
+" font-weight: bold;\n"
+" padding-right : 10px;\n"
+" padding-top : 2px;\n"
+" padding-left : 10px;\n"
+" padding-bottom : 2px;\n"
+" margin-left : 0px;\n"
+" margin-right : 0px;\n"
+" margin-top : 2px;\n"
+" margin-bottom : 2px;\n"
+" border: 1px solid #CCCCCC;\n"
"}\n"
-"TD.indexvalue { \n"
-" background-color: #eeeeff; \n"
-" font-style: italic; \n"
-" padding-right : 10px; \n"
-" padding-top : 2px; \n"
-" padding-left : 10px; \n"
-" padding-bottom : 2px; \n"
-" margin-left : 0px; \n"
-" margin-right : 0px; \n"
-" margin-top : 2px; \n"
-" margin-bottom : 2px \n"
+"TD.indexvalue {\n"
+" background-color: #eeeeff;\n"
+" font-style: italic;\n"
+" padding-right : 10px;\n"
+" padding-top : 2px;\n"
+" padding-left : 10px;\n"
+" padding-bottom : 2px;\n"
+" margin-left : 0px;\n"
+" margin-right : 0px;\n"
+" margin-top : 2px;\n"
+" margin-bottom : 2px;\n"
+" border: 1px solid #CCCCCC;\n"
"}\n"
"TR.memlist {\n"
" background-color: #f0f0f0; \n"
@@ -128,10 +158,10 @@ static const char *defaultStyleSheet =
"SPAN.charliteral { color: #008080 }\n"
".mdTable {\n"
" border: 1px solid #868686;\n"
-" background-color: #f2f2ff;\n"
+" background-color: #F4F4FB;\n"
"}\n"
".mdRow {\n"
-" padding: 8px 20px;\n"
+" padding: 8px 10px;\n"
"}\n"
".mdescLeft {\n"
" font-size: smaller;\n"
@@ -196,7 +226,7 @@ static const char *defaultStyleSheet =
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
" font-size: 13px;\n"
"}\n"
-".search { color: #0000ee;\n"
+".search { color: #003399;\n"
" font-weight: bold;\n"
"}\n"
"FORM.search {\n"
@@ -209,6 +239,12 @@ static const char *defaultStyleSheet =
" background-color: #eeeeff;\n"
"}\n"
"TD.tiny { font-size: 75%;\n"
+"}\n"
+"a {\n"
+" color: #252E78;\n"
+"}\n"
+"a:visited {\n"
+" color: #3D2185;\n"
"}\n";
static QCString g_header;
diff --git a/src/lang_cfg.h b/src/lang_cfg.h
index bfd0556..01180c6 100644
--- a/src/lang_cfg.h
+++ b/src/lang_cfg.h
@@ -14,6 +14,7 @@
#define LANG_PT
#define LANG_HU
#define LANG_KR
+#define LANG_KE
#define LANG_RO
#define LANG_SI
#define LANG_CN
diff --git a/src/language.cpp b/src/language.cpp
index 858d307..23034f3 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -67,6 +67,9 @@
#ifdef LANG_HU
#include "translator_hu.h"
#endif
+#ifdef LANG_KE
+#include "translator_ke.h"
+#endif
#ifdef LANG_KR
#include "translator_kr.h"
#endif
@@ -227,6 +230,10 @@ bool setTranslator(const char *langName)
{
theTranslator=new TranslatorKorean;
}
+ else if (L_EQUAL("korean-en"))
+ {
+ theTranslator=new TranslatorKoreanEn;
+ }
#endif
#ifdef LANG_RO
else if (L_EQUAL("romanian"))
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index b80fea0..7b68e71 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -221,7 +221,7 @@ void LatexGenerator::init()
t << endl
<< "clean:" << endl
- << "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.pdf" << endl;
+ << "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf" << endl;
}
static void writeDefaultHeaderPart1(QTextStream &t)
@@ -1235,7 +1235,7 @@ void LatexGenerator::codify(const char *str)
MultiByte = FALSE;
continue;
}
- if ( (uchar)c>=0x80 || (uchar)c<=0xff) // char in range [0x80..0xff]
+ if ((uchar)c>=0x80) // char in range [0x80..0xff]
{
t << (char)c;
MultiByte = TRUE;
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index 53b3341..c9ddb3d 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -101,6 +101,7 @@ HEADERS = bufstr.h \
translator_it.h \
translator_je.h \
translator_jp.h \
+ translator_ke.h \
translator_kr.h \
translator_nl.h \
translator_no.h \
@@ -188,7 +189,7 @@ INCLUDEPATH += ../qtools
INCLUDEPATH += ../libpng
INCLUDEPATH += ../libmd5
win32:INCLUDEPATH += .
-win32-g++:INCLUDEPATH = ../qtools /usr/include/libpng12
+win32-g++:INCLUDEPATH = ../qtools /usr/include/libpng12 ../libmd5
DESTDIR = ../lib
TARGET = doxygen
OBJECTS_DIR = ../objects
diff --git a/src/pre.l b/src/pre.l
index 2855190..4704a93 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -636,6 +636,23 @@ static int getNextId(const QCString &expr,int p,int *l)
p++;
}
}
+ else if (c=='/') // skip C Comment
+ {
+ char pc=c;
+ if (p<(int)expr.length())
+ {
+ c=expr.at(++p);
+ if (c=='*') // Start of C comment
+ {
+ while (p<(int)expr.length() && !(pc=='*' && c=='/'))
+ {
+ pc=c;
+ c=expr.at(++p);
+ }
+ p++;
+ }
+ }
+ }
}
return -1;
}
@@ -777,6 +794,20 @@ QCString removeIdsAndMarkers(const char *s)
p++;
while ((c=*p) && isId(c)) p++;
}
+ else if (c=='/') // skip C comments
+ {
+ char pc=c;
+ c=*++p;
+ if (c=='*') // start of C comment
+ {
+ while (*p && !(pc=='*' && c=='/')) // search end of comment
+ {
+ pc=c;
+ c=*++p;
+ }
+ p++;
+ }
+ }
else
{
result+=c;
@@ -786,6 +817,7 @@ QCString removeIdsAndMarkers(const char *s)
}
}
}
+ //printf("removeIdsAndMarkers(%s)=%s\n",s,result.data());
return result;
}
@@ -810,6 +842,23 @@ QCString removeMarkers(const char *s)
}
p+=2;
}
+ else if (c=='/') // skip C comments
+ {
+ result+=c;
+ char pc=c;
+ c=*++p;
+ if (c=='*') // start of C comment
+ {
+ while (*p && !(pc=='*' && c=='/')) // search end of comment
+ {
+ result+=c;
+ pc=c;
+ c=*++p;
+ }
+ result+=c;
+ p++;
+ }
+ }
else
{
result+=c;
@@ -817,6 +866,7 @@ QCString removeMarkers(const char *s)
}
}
}
+ //printf("RemoveMarkers(%s)=%s\n",s,result.data());
return result;
}
@@ -1061,6 +1111,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x Ifdef
%x Ifndef
%x SkipCComment
+%x CopyCComment
%x SkipVerbatim
%x SkipCPPComment
%x RemoveCComment
@@ -1622,23 +1673,24 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_argDict->insert(argName,new int(g_defArgs));
g_defArgs++;
}
-<DefineText>"/**"|"/*!" {
+ /*
+<DefineText>"/ **"|"/ *!" {
g_defText+=yytext;
g_defLitText+=yytext;
g_insideComment=TRUE;
}
-<DefineText>"*/" {
+<DefineText>"* /" {
g_defText+=yytext;
g_defLitText+=yytext;
g_insideComment=FALSE;
}
-<DefineText>"/*"|"/**<"|"/*!<" {
- outputArray(yytext,yyleng);
- g_defText+=' ';
- g_defLitText+=' ';
+ */
+<DefineText>"/*" {
+ g_defText+=yytext;
+ g_defLitText+=yytext;
g_lastCContext=YY_START;
g_commentCount=1;
- BEGIN(SkipCComment);
+ BEGIN(CopyCComment);
}
<DefineText>"//" {
outputChar('/');outputChar('/');
@@ -1679,6 +1731,24 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCComment,SkipVerbatim>. {
outputChar(*yytext);
}
+<CopyCComment>[^*]+ {
+ g_defLitText+=yytext;
+ g_defText+=yytext;
+ }
+<CopyCComment>"*/" {
+ g_defLitText+=yytext;
+ g_defText+=yytext;
+ BEGIN(g_lastCContext);
+ }
+<CopyCComment>\n {
+ g_yyLineNr++;
+ g_defLitText+=yytext;
+ g_defText+=yytext;
+ }
+<CopyCComment>. {
+ g_defLitText+=yytext;
+ g_defText+=yytext;
+ }
<RemoveCComment>"*/" { BEGIN(g_lastCContext); }
<RemoveCComment>"//"
<RemoveCComment>"/*"
diff --git a/src/scanner.l b/src/scanner.l
index e4f12a4..a041063 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -128,6 +128,7 @@ static bool insideJava = FALSE; //!< processing Java code?
static bool insideCS = FALSE; //!< processing C# code?
static bool insidePHP = FALSE; //!< processing PHP code?
static bool insideCppQuote = FALSE;
+static bool insideObjC = FALSE; //!< processing Objective C code?
static int argRoundCount;
static int argSharpCount;
@@ -440,6 +441,7 @@ static void setContext()
insideCS = fileName.right(3)==".cs";
insidePHP = fileName.right(4)==".php" || fileName.right(5)==".php4" ||
fileName.right(4)==".inc" || fileName.right(6)==".phtml";
+ insideObjC = fileName.right(2)==".m";
if ( insidePHP )
{
useOverrideCommands = TRUE;
@@ -604,6 +606,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
%x Array
%x ReadBody
%x ReadNSBody
+%x ReadBodyIntf
%x Using
%x UsingDirective
%x NameSpaceDocArg1
@@ -722,6 +725,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
%x DefinePHPEnd
%x OldStyleArgs
%x SkipVerbString
+%x ObjCMethod
+%x ObjCReturnType
+%x ObjCParams
+%x ObjCParamType
%%
@@ -907,6 +914,102 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->argList->clear();
lineCount() ;
}
+<FindMembers>{B}*"@private"{BN}+ {
+ current->protection = protection = Private ;
+ current->mtype = mtype = Method;
+ current->type.resize(0);
+ current->name.resize(0);
+ current->args.resize(0);
+ current->argList->clear();
+ lineCount() ;
+ }
+<FindMembers>{B}*"@protected"{BN}+ {
+ current->protection = protection = Protected ;
+ current->mtype = mtype = Method;
+ current->type.resize(0);
+ current->name.resize(0);
+ current->args.resize(0);
+ current->argList->clear();
+ lineCount() ;
+ }
+<FindMembers>{B}*"@public"{BN}+ {
+ current->protection = protection = Public ;
+ current->mtype = mtype = Method;
+ current->type.resize(0);
+ current->name.resize(0);
+ current->args.resize(0);
+ current->argList->clear();
+ lineCount() ;
+ }
+<FindMembers>[\-+]{BN}* {
+ if (!insideObjC)
+ {
+ REJECT;
+ }
+ else
+ {
+ current->protection = protection = Public ;
+ current->stat=yytext[0]=='+';
+ current->mtype = mtype = Method;
+ current->type.resize(0);
+ current->name.resize(0);
+ current->args.resize(0);
+ current->argList->clear();
+ BEGIN( ObjCMethod );
+ }
+ }
+<ObjCMethod>"(" { // start of method's return type
+ BEGIN( ObjCReturnType );
+ }
+<ObjCMethod>{ID} { // found method name
+ if (current->type.isEmpty())
+ {
+ current->type = "id";
+ }
+ current->name = yytext;
+ }
+<ObjCMethod>":" { // start of parameter list
+ Argument *a = new Argument;
+ current->argList->append(a);
+ BEGIN( ObjCParams );
+ }
+<ObjCReturnType>[^)]* { // TODO: check if nested braches are possible.
+ current->type = yytext;
+ }
+<ObjCReturnType>")" {
+ BEGIN( ObjCMethod );
+ }
+<ObjCParams>{ID}/":" { // Keyword of parameter
+ current->argList->getLast()->attrib=(QCString)"["+yytext+"]";
+ }
+<ObjCParams>{ID} { // name of parameter
+ current->argList->getLast()->name=yytext;
+ }
+<ObjCParams>":" { }
+<ObjCParams>"(" {
+ BEGIN( ObjCParamType );
+ }
+<ObjCParams>{BN}* {
+ lineCount();
+ if (current->argList->getLast()->type.isEmpty())
+ {
+ current->argList->getLast()->type="id";
+ }
+ Argument *a = new Argument;
+ current->argList->append(a);
+ }
+<ObjCParamType>[^)]* {
+ current->argList->last()->type=yytext;
+ }
+<ObjCParamType>")" {
+ BEGIN( ObjCParams );
+ }
+<ObjCMethod,ObjCParams>";" { // end of method declaration
+ current->args = argListToString(current->argList);
+ printf("argList=%s\n",current->args.data());
+ unput(';');
+ BEGIN( Function );
+ }
<FindMembers>{BN}{1,80} {
lineCount();
}
@@ -1035,6 +1138,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name = QCString(yytext).stripWhiteSpace();
}
}
+<FindMembers>{B}*"@interface"{BN}+ { // Objective-C interface
+ lineCount();
+ isTypedef=FALSE;
+ current->section = Entry::INTERFACE_SEC;
+ current->objc = insideObjC = TRUE;
+ current->protection = protection = Public ;
+ addType( current ) ;
+ current->type += " interface" ;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ current->bodyLine = yyLineNr;
+ BEGIN( CompoundName );
+ }
<FindMembers>{B}*"exception"{BN}+ { // Corba IDL exception
isTypedef=FALSE;
current->section = Entry::EXCEPTION_SEC;
@@ -1466,7 +1582,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->bodyLine = yyLineNr;
BEGIN( Define );
}
-<FindMembers,ReadBody,ReadNSBody,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
+<FindMembers,ReadBody,ReadNSBody,ReadBodyIntf,SkipCurly,SkipCurlyCpp>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
yyLineNr = atoi(&yytext[1]);
//printf("setting line number to %d\n",yyLineNr);
lastPreLineCtrlContext = YY_START;
@@ -2019,33 +2135,33 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
/*
<FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); }
*/
-<ReadBody,ReadNSBody>[^\r\n\#{}"@'/]* { current->program += yytext ; }
-<ReadBody,ReadNSBody>"//".* { current->program += yytext ; }
-<ReadBody,ReadNSBody>"#".* { if (! insidePHP)
+<ReadBody,ReadNSBody,ReadBodyIntf>[^\r\n\#{}"@'/]* { current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>"//".* { current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>"#".* { if (! insidePHP)
REJECT;
current->program += yytext ;
}
-<ReadBody,ReadNSBody>@\" { current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>@\" { current->program += yytext ;
pSkipVerbString = &current->program;
lastSkipVerbStringContext=YY_START;
BEGIN( SkipVerbString );
}
-<ReadBody,ReadNSBody>\" { current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>\" { current->program += yytext ;
pCopyQuotedString = &current->program;
lastStringContext=YY_START;
BEGIN( CopyString );
}
-<ReadBody,ReadNSBody>"/*"{B}* { current->program += yytext ;
- lastContext = ReadBody ;
+<ReadBody,ReadNSBody,ReadBodyIntf>"/*"{B}* { current->program += yytext ;
+ lastContext = YY_START ;
BEGIN( Comment ) ;
}
-<ReadBody,ReadNSBody>"/*"{BL} { current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>"/*"{BL} { current->program += yytext ;
++yyLineNr ;
- lastContext = ReadBody ;
+ lastContext = YY_START ;
BEGIN( Comment ) ;
}
-<ReadBody,ReadNSBody>{CHARLIT} { current->program += yytext; }
-<ReadBody,ReadNSBody>"{" { current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} { current->program += yytext; }
+<ReadBody,ReadNSBody,ReadBodyIntf>"{" { current->program += yytext ;
++curlyCount ;
}
<ReadBody,ReadNSBody>"}" { //err("ReadBody count=%d\n",curlyCount);
@@ -2081,20 +2197,27 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->type = current->type.simplifyWhiteSpace();
current->name = current->name.stripWhiteSpace();
//printf("adding `%s' `%s' `%s' brief=%s\n",current->type.data(),current->name.data(),current->args.data(),current->brief.data());
- current_root->addSubEntry( current ) ;
- current = new Entry(*current);
- if (current->section==Entry::NAMESPACE_SEC ||
- current->section==Entry::INTERFACE_SEC ||
- insideJava || insidePHP || insideCS
- )
- { // namespaces and interfaces and java classes ends with a closing bracket without semicolon
- current->reset();
- initEntry();
- BEGIN( FindMembers ) ;
+ if (insideObjC) // method definition follows
+ {
+ BEGIN( ReadBodyIntf ) ;
}
else
{
- BEGIN( MemberSpec ) ;
+ current_root->addSubEntry( current ) ;
+ current = new Entry(*current);
+ if (current->section==Entry::NAMESPACE_SEC ||
+ current->section==Entry::INTERFACE_SEC ||
+ insideJava || insidePHP || insideCS
+ )
+ { // namespaces and interfaces and java classes ends with a closing bracket without semicolon
+ current->reset();
+ initEntry();
+ BEGIN( FindMembers ) ;
+ }
+ else
+ {
+ BEGIN( MemberSpec ) ;
+ }
}
}
}
@@ -2262,11 +2385,18 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
*/
<MemberSpecSkip>"," { BEGIN(MemberSpec); }
<MemberSpecSkip>";" { unput(';'); BEGIN(MemberSpec); }
-<ReadBody,ReadNSBody>{BN}+ { current->program += yytext ;
+<ReadBody,ReadNSBody,ReadBodyIntf>{BN}+ { current->program += yytext ;
lineCount() ;
}
-<ReadBody,ReadNSBody>. { current->program += yytext ; }
-<ReadBody,ReadNSBody>"'#" { current->program += yytext ; }
+<ReadBodyIntf>"@end" { // end of Objective C block
+ current_root->addSubEntry( current ) ;
+ current=new Entry;
+ initEntry();
+ insideObjC=FALSE;
+ BEGIN( FindMembers );
+ }
+<ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; }
+<ReadBody,ReadNSBody,ReadBodyIntf>"'#" { current->program += yytext ; }
<FindMembers>"("/({BN}*{ID}{BN}*"::")*{ID}{BN}*")"{BN}*"(" | /* typedef void (A::func_t)(args...) */
<FindMembers>("("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */
@@ -5299,6 +5429,7 @@ static void parseCompounds(Entry *rt)
strcpy( yyFileName, ce->fileName ) ;
setContext();
yyLineNr = ce->startLine ;
+ insideObjC = ce->objc;
//printf("---> Inner block starts at line %d\n",yyLineNr);
//current->reset();
current = new Entry;
@@ -5314,7 +5445,7 @@ static void parseCompounds(Entry *rt)
current->protection = protection = Public ;
else if (ce->fileName.right(5)==".java")
current->protection = protection = Package ;
- else
+ else
current->protection = protection = Private ;
}
else if (ce->section == Entry::ENUM_SEC ) // enum
@@ -5329,7 +5460,18 @@ static void parseCompounds(Entry *rt)
}
current->protection = protection = ce->protection;
}
- else // named struct, union, or interface
+ else if (ce->section==Entry::INTERFACE_SEC)
+ {
+ if (ce->objc)
+ {
+ current->protection = protection = Protected ;
+ }
+ else
+ {
+ current->protection = protection = Public ;
+ }
+ }
+ else // named struct, union
{
current->protection = protection = Public ;
}
diff --git a/src/translator_ke.h b/src/translator_ke.h
new file mode 100644
index 0000000..31b4bba
--- /dev/null
+++ b/src/translator_ke.h
@@ -0,0 +1,50 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2003 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef TRANSLATOR_KE_H
+#define TRANSLATOR_KE_H
+
+class TranslatorKoreanEn : public TranslatorEnglish
+{
+ public:
+ virtual QCString idLanguage()
+ { return "korean-en"; }
+ virtual QCString latexLanguageSupportCommand()
+ {
+ return "\\usepackage{hfont}\n";
+ }
+ /*! returns the name of the package that is included by LaTeX */
+ virtual QCString idLanguageCharset()
+ {
+ return "euc-kr";
+ }
+
+ virtual QCString trRTFansicp()
+ {
+ return "1252";
+ }
+
+ /*! Used as ansicpg for RTF fcharset
+ * \see trRTFansicp() for a table of possible values.
+ */
+ virtual QCString trRTFCharSet()
+ {
+ return "0";
+ }
+};
+
+#endif
diff --git a/src/translator_sr.h b/src/translator_sr.h
index 4ee9a12..50f578f 100644
--- a/src/translator_sr.h
+++ b/src/translator_sr.h
@@ -19,8 +19,9 @@
#define TRANSLATOR_SR_H
// translation by Dejan D. M. Milosavljevic <dmilos@email.com>;<dmilosx@ptt.yu>
+// // 10x 2 Ivana Miletic for gramatical consutation.
-class TranslatorSerbian : public TranslatorAdapter_1_3_3
+class TranslatorSerbian : public Translator
{
private:
QCString decode(const QCString& sInput)
@@ -306,7 +307,7 @@ private:
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- result+="funkcija, promenjiva, makro zamena, enum-a, i typedef-va";
+ result+="funkcija, promenjiva, makro zamena, enum-ova, i typedef-ova";
}
else
{
@@ -319,6 +320,7 @@ private:
result+="datoteke u kojima se nalaze:";
else
result+=" dokumentaciju:";
+
return decode( result );
}
@@ -491,7 +493,7 @@ private:
* of documentation blocks for enumeration types
*/
virtual QCString trEnumerationTypeDocumentation()
- { return "Dokumetacija enum tipa"; }
+ { return "Dokumetacija enum-a"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
@@ -534,7 +536,7 @@ private:
QCString result=(QCString)"Napravljeno "+date;
if (projName) result+=(QCString)" za "+projName;
result+=(QCString)" od";
- return result;
+ return decode( result );
}
/*! This is part of the sentence used in the standard footer of each page.
*/
@@ -563,7 +565,7 @@ private:
/*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
- { return decode("Greške i ograničenja"); }
+ { return decode( "Greške i ograničenja" ); }
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
@@ -971,7 +973,7 @@ private:
}
virtual QCString trPrivateTypes()
{
- return "Privatni tipovi";
+ return decode( "Privatni tipovi" );
}
virtual QCString trPrivateAttribs()
{
@@ -1011,7 +1013,7 @@ private:
}
virtual QCString trAttention()
{
- return decode("Pažnja");;
+ return decode( "Pažnja" );
}
virtual QCString trInclByDepGraph()
{
@@ -1135,12 +1137,12 @@ private:
/*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
- return "Osobine";
+ return decode( "Osobine" );
}
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
- return "Dokumentacija osobina";
+ return decode( "Dokumentacija osobina" );
}
//////////////////////////////////////////////////////////////////////////
@@ -1202,12 +1204,12 @@ private:
/*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
- return decode("Greška");;
+ return decode( "Greška" );
}
/*! Used as the header of the bug list */
virtual QCString trBugList()
{
- return decode("Spisak grešaka");;
+ return decode( "Spisak grešaka" );
}
//////////////////////////////////////////////////////////////////////////
@@ -1256,7 +1258,7 @@ private:
/*! Used as header RTF general index */
virtual QCString trRTFGeneralIndex()
{
- return decode("Sadržaj");;
+ return decode( "Sadržaj" );
}
/*! This is used for translation of the word that will possibly
@@ -1265,7 +1267,7 @@ private:
*/
virtual QCString trClass(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Klas" : "klas"));
+ QCString result( (first_capital ? "Klas" : "klas") );
result+= (singular ? "a" : "e");
return result;
}
@@ -1358,7 +1360,7 @@ private:
{
QCString result((first_capital ? "Autor" : "autor"));
result+= (singular ? "" : "i");
- return result;
+ return decode( result );
}
//////////////////////////////////////////////////////////////////////////
@@ -1369,7 +1371,7 @@ private:
*/
virtual QCString trReferences()
{
- return "Koristi";
+ return decode( "Koristi" );
}
//////////////////////////////////////////////////////////////////////////
@@ -1389,7 +1391,7 @@ private:
*/
virtual QCString trImplementedInList(int numEntries)
{
- return "Definisano u " + trWriteList(numEntries) + "." ;
+ return decode( "Definisano u " + trWriteList(numEntries) + "." );
}
//////////////////////////////////////////////////////////////////////////
@@ -1424,12 +1426,12 @@ private:
*/
virtual QCString trEvents()
{
- return "Događaji";
+ return decode( "Događaji" );
}
/*! Header used for the documentation section of a class' events. */
virtual QCString trEventDocumentation()
{
- return "Dokumentacija događaja";
+ return decode( "Dokumentacija događaja" );
}
//////////////////////////////////////////////////////////////////////////
// new since 1.3
@@ -1439,35 +1441,35 @@ private:
*/
virtual QCString trPackageTypes()
{
- return "Tipovi u Paketu";
+ return decode( "Tipovi u Paketu" );
}
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
virtual QCString trPackageMembers()
{
- return "Funkcije u paketu";
+ return decode( "Funkcije u paketu" );
}
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
virtual QCString trStaticPackageMembers()
{
- return "Statičke funkcije u paketu"; // Zajednicke funkcije u paketu
+ return decode( "Statičke funkcije u paketu" ); // Zajednicke funkcije u paketu
}
/*! Used as a heading for a list of Java class variables with package
* scope.
*/
virtual QCString trPackageAttribs()
{
- return "Atributi u paketu"; // Clanovi u paketu
+ return decode( "Atributi u paketu" ); // Clanovi u paketu
}
/*! Used as a heading for a list of static Java class variables with
* package scope.
*/
virtual QCString trStaticPackageAttribs()
{
- return "Statički atributi u paketu"; // Zajednicki clanovi u paketu
+ return decode( "Statički atributi u paketu" ); // Zajednicki clanovi u paketu
}
//////////////////////////////////////////////////////////////////////////
@@ -1479,21 +1481,77 @@ private:
*/
virtual QCString trAll()
{
- return "Sve";
+ return decode( "Sve" );
}
/*! Put in front of the call graph for a function. */
virtual QCString trCallGraph()
{
- return "Graf pozivanja finkcija:";
+ return decode( "Graf pozivanja funkcija:" );
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! When the search engine is enabled this text is put in the header
+ * of each page before the field where one can enter the text to search
+ * for.
+ */
+ virtual QCString trSearchForIndex()
+ {
+ return decode("Traži");
+ }
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ {
+ return decode( "Rezultati pretraživanja" );
+ }
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
+ {
+ return decode("Nema dokumenta koji odgovaraju vašem upitu");
+ }
+ else if (numDocuments==1)
+ { // 10x 2 Ivana Miletic 4 gramatical consutation.
+ return decode("Nađen je <b>1</b> dokument koji odgovara vašem upitu.");
+ }
+ else if (numDocuments<5)
+ { // 10x 2 Ivana Miletic 4 gramatical consutation.
+ return decode("Nađena su <b>$num</b> dokumenta koji odgovaraju vašem upitu."
+ "Najbolji su prikazani prvi.");
+ }
+ else
+ { // 10x 2 Ivana Miletic 4 gramatical consutation.
+ return decode("Nađeno je <b>$num</b> dokumenata koji odgovaraju vašem upitu."
+ "Najbolji su prikazani prvi.");
+ }
+ }
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ {
+ return decode( "Pronađeno:" );
}
};
-// sh - š - shashavo
-// dj - đ - djordje
-// ch - č - chasha
-// cc - ć - cciccifu
-// zz - ž - zzaba
+// sh - š - shashavo (,š)
+// dj - đ - djordje
+// ch - Č, č - chasha
+// cc - ć - cciccifu
+// zz - ž - zzaba
#endif
diff --git a/src/util.cpp b/src/util.cpp
index d268f8e..fd95766 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -26,6 +26,7 @@
#include <qfileinfo.h>
#include <qdir.h>
#include <qdatetime.h>
+#include <qcache.h>
#include "util.h"
#include "message.h"
@@ -58,6 +59,17 @@ extern char **environ;
#endif
//------------------------------------------------------------------------
+
+static QCache<int> g_accessibilityCache(10000,10000);
+
+class CacheInitializer
+{
+ public:
+ CacheInitializer() { g_accessibilityCache.setAutoDelete(TRUE); }
+} g_cacheInitializer;
+
+
+//------------------------------------------------------------------------
// TextGeneratorOLImpl implementation
//------------------------------------------------------------------------
@@ -689,7 +701,8 @@ static Definition *followPath(Definition *start,FileDef *fileScope,const QCStrin
bool accessibleViaUsingClass(const ClassSDict *cl,
FileDef *fileScope,
Definition *item,
- const QCString &explicitScopePart="")
+ const QCString &explicitScopePart=""
+ )
{
if (cl) // see if the class was imported via a using statement
{
@@ -697,6 +710,7 @@ bool accessibleViaUsingClass(const ClassSDict *cl,
ClassDef *ucd;
for (cli.toFirst();(ucd=cli.current());++cli)
{
+ //printf("Trying via used class %s\n",ucd->name().data());
Definition *sc = explicitScopePart.isEmpty() ? ucd : followPath(ucd,fileScope,explicitScopePart);
if (item->definitionType()==Definition::TypeMember)
{
@@ -712,6 +726,7 @@ bool accessibleViaUsingClass(const ClassSDict *cl,
{
if (sc && sc==item) return TRUE;
}
+ //printf("Try via used class done\n");
}
}
return FALSE;
@@ -728,8 +743,10 @@ bool accessibleViaUsingNamespace(const NamespaceSDict *nl,
NamespaceDef *und;
for (nli.toFirst();(und=nli.current());++nli)
{
+ //printf("Trying via used namespace %s\n",und->name().data());
Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,fileScope,explicitScopePart);
if (sc && item->getOuterScope()==sc) return TRUE;
+ //printf("Try via used namespac done\n");
}
}
return FALSE;
@@ -740,24 +757,39 @@ bool accessibleViaUsingNamespace(const NamespaceSDict *nl,
*/
int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
{
- //printf("<isAccesibleFrom(%s,%s)\n",scope?scope->name().data():"<global>",
- // item?item->name().data():"<none>");
+ //printf("<isAccesibleFrom(%s,%s)\n",scope->name().data(),item->name().data());
+ QCString key=scope->name()+"+"+item->name();
+ int *pval=g_accessibilityCache.find(key);
+ int result=0; // assume we found it
+ int i;
+ if (pval) // value was cached
+ {
+ //printf("> found cached value=%d\n",*pval);
+ return *pval;
+ }
if (item->getOuterScope()==scope)
{
//printf("> found it\n");
- return 0; // found it
}
else if (scope==Doxygen::globalScope)
{
if (fileScope)
{
ClassSDict *cl = fileScope->getUsedClasses();
- if (accessibleViaUsingClass(cl,fileScope,item)) return 0;
+ if (accessibleViaUsingClass(cl,fileScope,item))
+ {
+ //printf("> found via used class\n");
+ goto done;
+ }
NamespaceSDict *nl = fileScope->getUsedNamespaces();
- if (accessibleViaUsingNamespace(nl,fileScope,item)) return 0;
+ if (accessibleViaUsingNamespace(nl,fileScope,item))
+ {
+ //printf("> found via used namespace\n");
+ goto done;
+ }
}
- return -1; // not found in path to globalScope
//printf("> reached global scope\n");
+ result=-1; // not found in path to globalScope
}
else // keep searching
{
@@ -766,16 +798,26 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item)
{
NamespaceDef *nscope = (NamespaceDef*)scope;
ClassSDict *cl = nscope->getUsedClasses();
- if (accessibleViaUsingClass(cl,fileScope,item)) return 0;
+ if (accessibleViaUsingClass(cl,fileScope,item))
+ {
+ //printf("> found via used class\n");
+ goto done;
+ }
NamespaceSDict *nl = nscope->getUsedNamespaces();
- if (accessibleViaUsingNamespace(nl,fileScope,item)) return 0;
+ if (accessibleViaUsingNamespace(nl,fileScope,item))
+ {
+ //printf("> found via used namespace\n");
+ goto done;
+ }
}
-
// repeat for the parent scope
- int i=isAccessibleFrom(scope->getOuterScope(),fileScope,item);
- //printf("> continue\n");
- return (i==-1) ? -1 : i+1;
+ i=isAccessibleFrom(scope->getOuterScope(),fileScope,item);
+ //printf("> result=%d\n",i);
+ result= (i==-1) ? -1 : i+1;
}
+done:
+ g_accessibilityCache.insert(key,new int(result));
+ return result;
}
@@ -794,6 +836,14 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
//printf("<isAccesibleFrom(%s,%s,%s)\n",scope?scope->name().data():"<global>",
// item?item->name().data():"<none>",
// explicitScopePart.data());
+ QCString key=scope->name()+"+"+item->name()+"+"+explicitScopePart;
+ int *pval=g_accessibilityCache.find(key);
+ int result=0; // assume we found it
+ if (pval) // value was cached
+ {
+ //printf("> found cached value=%d\n",*pval);
+ return *pval;
+ }
Definition *newScope = followPath(scope,fileScope,explicitScopePart);
if (newScope) // explicitScope is inside scope => newScope is the result
{
@@ -801,7 +851,6 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
if (item->getOuterScope()==newScope)
{
//printf("> found it\n");
- return 0; // found it
}
else
{
@@ -811,8 +860,8 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
{
i = isAccessibleFrom(scope->getOuterScope(),fileScope,item,explicitScopePart);
}
- //printf("> continue\n");
- return (i==-1) ? -1 : i+1;
+ //printf("> result=%d\n",i);
+ result = (i==-1) ? -1 : i+1;
}
}
else // failed to resolve explicitScope
@@ -822,29 +871,48 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
{
NamespaceDef *nscope = (NamespaceDef*)scope;
ClassSDict *cl = nscope->getUsedClasses();
- if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart)) return 0;
+ if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart))
+ {
+ //printf("> found in used class\n");
+ goto done;
+ }
NamespaceSDict *nl = nscope->getUsedNamespaces();
- if (accessibleViaUsingNamespace(nl,fileScope,item,explicitScopePart)) return 0;
+ if (accessibleViaUsingNamespace(nl,fileScope,item,explicitScopePart))
+ {
+ //printf("> found in used namespace\n");
+ goto done;
+ }
}
if (scope==Doxygen::globalScope)
{
if (fileScope)
{
ClassSDict *cl = fileScope->getUsedClasses();
- if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart)) return 0;
+ if (accessibleViaUsingClass(cl,fileScope,item,explicitScopePart))
+ {
+ //printf("> found in used class\n");
+ goto done;
+ }
NamespaceSDict *nl = fileScope->getUsedNamespaces();
- if (accessibleViaUsingNamespace(nl,fileScope,item,explicitScopePart)) return 0;
+ if (accessibleViaUsingNamespace(nl,fileScope,item,explicitScopePart))
+ {
+ //printf("> found in used namespace\n");
+ goto done;
+ }
}
- //printf("> reached global scope\n");
- return -1;
+ //printf("> not found\n");
+ result=-1;
}
else // continue by looking into the parent scope
{
int i=isAccessibleFrom(scope->getOuterScope(),fileScope,item,explicitScopePart);
- //printf("> continue\n");
- return (i==-1) ? -1 : i+1;
+ //printf("> result=%d\n",i);
+ result= (i==-1) ? -1 : i+1;
}
}
+done:
+ g_accessibilityCache.insert(key,new int(result));
+ return result;
}
/* Find the fully qualified class name refered to by the input class
@@ -873,11 +941,19 @@ ClassDef *getResolvedClassRec(Definition *scope,
replaceNamespaceAliases(explicitScopePart,explicitScopePart.length());
name=name.mid(qualifierIndex+2);
}
- if (name.isEmpty()) return 0; // empty name
+ if (name.isEmpty())
+ {
+ //printf("] empty name\n");
+ return 0; // empty name
+ }
DefinitionList *dl = Doxygen::symbolMap->find(name);
//printf("Looking for symbol %s result=%p\n",name.data(),dl);
- if (dl==0) return 0; // symbol not found
+ if (dl==0)
+ {
+ //printf("] no such symbol\n");
+ return 0; // symbol not found
+ }
//printf(" found %d symbol with name %s\n",dl->count(),name.data());
// now we look int the list of Definitions and determine which one is the "best"
@@ -889,7 +965,8 @@ ClassDef *getResolvedClassRec(Definition *scope,
int minDistance=10000; // init at "infinite"
for (dli.toFirst();(d=dli.current());++dli) // foreach definition
{
- //printf(" found type %x name=%s\n",d->definitionType(),d->name().data());
+ //printf(" found type %x name=%s\n",
+ // d->definitionType(),d->name().data());
// only look at classes and members
if (d->definitionType()==Definition::TypeClass ||
d->definitionType()==Definition::TypeMember)
@@ -930,7 +1007,6 @@ ClassDef *getResolvedClassRec(Definition *scope,
bestTypedef = md;
bestTemplSpec = spec;
}
-
}
}
} // if definition accessible
@@ -944,7 +1020,8 @@ ClassDef *getResolvedClassRec(Definition *scope,
{
*pTemplSpec = bestTemplSpec;
}
- //printf("] bestMatch=%s\n",bestMatch?bestMatch->name().data():"<none>");
+ //printf("] bestMatch=%s distance=%d\n",
+ // bestMatch?bestMatch->name().data():"<none>",minDistance);
return bestMatch;
}
@@ -969,10 +1046,14 @@ ClassDef *getResolvedClass(Definition *scope,
{
scope=Doxygen::globalScope;
}
+ //printf("-------- start\n");
+ //printf("getResolvedClass(%s,%s)\n",scope?scope->name().data():"<global>",n);
ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec);
if (result && !result->isLinkable()) result=0; // don't link to artifical classes
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
// n,result?result->name().data():"<none>");
+ //
+ //printf("-------- end\n");
return result;
}
@@ -1296,6 +1377,10 @@ QCString argListToString(ArgumentList *al)
result+="(";
while (a)
{
+ if (!a->attrib.isEmpty())
+ {
+ result+=a->attrib+" ";
+ }
if (!a->name.isEmpty() || !a->array.isEmpty())
{
result+= a->type+" "+a->name+a->array;
@@ -4323,7 +4408,8 @@ void filterLatexString(QTextStream &t,const char *str,
static bool isCzech = theTranslator->idLanguage()=="czech";
static bool isJapanese = theTranslator->idLanguage()=="japanese" ||
theTranslator->idLanguage()=="japanese-en";
- static bool isKorean = theTranslator->idLanguage()=="korean";
+ static bool isKorean = theTranslator->idLanguage()=="korean" ||
+ theTranslator->idLanguage()=="korean-en";
static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
static bool isChinese = theTranslator->idLanguage()=="chinese" ||
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 5c0c191..4194a94 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1377,7 +1377,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
GroupDef *sgd;
for (gli.toFirst();(sgd=gli.current());++gli)
{
- t << " <innergroup refid=\"" << gd->getOutputFileBase()
+ t << " <innergroup refid=\"" << sgd->getOutputFileBase()
<< "\">" << convertToXML(sgd->groupTitle())
<< "</innergroup>" << endl;
}