summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in2
-rw-r--r--src/code.l44
-rw-r--r--src/commentscan.l29
-rw-r--r--src/docparser.cpp3
-rw-r--r--src/doctokenizer.l13
-rw-r--r--src/doxygen.cpp2
-rw-r--r--src/namespacedef.cpp77
-rw-r--r--src/scanner.l158
-rw-r--r--src/translator.h20
-rw-r--r--src/translator_ua.h271
-rw-r--r--src/xmlgen.cpp5
11 files changed, 490 insertions, 134 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index cdbf22e..45c958c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -46,7 +46,7 @@ clean: Makefile.libdoxygen Makefile.libdoxycfg Makefile.doxygen Makefile.doxytag
distclean: clean
-$(RM) scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
- ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \
+ ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp commentscan.cpp \
declinfo.cpp defargs.cpp commentcnv.cpp doctokenizer.cpp
FORCE:
diff --git a/src/code.l b/src/code.l
index cdcd53a..8909de0 100644
--- a/src/code.l
+++ b/src/code.l
@@ -290,23 +290,32 @@ static VariableContext g_theVarContext;
class CallContext
{
public:
+ struct Ctx
+ {
+ Ctx() : name(g_name), type(g_type), cd(0) {}
+ QCString name;
+ QCString type;
+ ClassDef *cd;
+ };
+
CallContext()
{
- m_classList.append(0);
+ m_classList.append(new Ctx);
+ m_classList.setAutoDelete(TRUE);
}
virtual ~CallContext() {}
void setClass(ClassDef *cd)
{
- if (cd)
+ Ctx *ctx = m_classList.getLast();
+ if (ctx)
{
DBG_CTX((stderr,"** Set call context %s (%p)\n",cd==0 ? "<null>" : cd->name().data(),cd));
- m_classList.removeLast();
- m_classList.append(cd);
+ ctx->cd=cd;
}
}
void pushScope()
{
- m_classList.append(0);
+ m_classList.append(new Ctx);
DBG_CTX((stderr,"** Push call context %d\n",m_classList.count()));
}
void popScope()
@@ -314,6 +323,12 @@ class CallContext
if (m_classList.count()>1)
{
DBG_CTX((stderr,"** Pop call context %d\n",m_classList.count()));
+ Ctx *ctx = m_classList.getLast();
+ if (ctx)
+ {
+ g_name = ctx->name;
+ g_type = ctx->type;
+ }
m_classList.removeLast();
}
else
@@ -324,16 +339,20 @@ class CallContext
void clear()
{
DBG_CTX((stderr,"** Clear call context\n"));
- m_classList.clear();
- m_classList.append(0);
+ Ctx *ctx = m_classList.getLast();
+ if (ctx)
+ {
+ ctx->cd=0;
+ }
}
ClassDef *getClass() const
{
- return m_classList.getLast();
+ Ctx *ctx = m_classList.getLast();
+ if (ctx) return ctx->cd; else return 0;
}
private:
- QList<ClassDef> m_classList;
+ QList<Ctx> m_classList;
};
static CallContext g_theCallContext;
@@ -761,7 +780,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
{
cd=getResolvedClass(d,g_sourceFileDef,className.left(i),&md);
}
- //printf("is found as a type %s\n",cd?cd->name().data():"<null>");
+ //fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>");
}
else
{
@@ -928,7 +947,7 @@ static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const
if (mcd)
{
MemberDef *xmd = mcd->getMemberByName(memName);
- //printf("generateClassMemberLink(class=%s,member=%s)=%p\n",mcd->name().data(),memName,xmd);
+ //fprintf(stderr,"generateClassMemberLink(class=%s,member=%s)=%p\n",mcd->name().data(),memName,xmd);
if (xmd)
{
// extract class definition of the return type in order to resolve
@@ -967,7 +986,7 @@ static bool generateClassMemberLink(BaseCodeDocInterface &ol,ClassDef *mcd,const
// add usage reference
if (g_currentDefinition && g_currentMemberDef &&
- xmd!=g_currentMemberDef && g_insideBody)
+ /*xmd!=g_currentMemberDef &&*/ g_insideBody)
{
addDocCrossReference(g_currentMemberDef,xmd);
}
@@ -2415,6 +2434,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
if (*yytext==';') g_searchingForBody=FALSE;
if (!g_inClass && !g_type.isEmpty())
{
+ //fprintf(stderr,"add variable g_type=%s g_name=%s)\n",g_type.data(),g_name.data());
g_theVarContext.addVariable(g_type,g_name);
}
g_parmType.resize(0);g_parmName.resize(0);
diff --git a/src/commentscan.l b/src/commentscan.l
index e31eda3..f489d32 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -412,6 +412,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
sectionTitle,SectionInfo::Anchor);
Doxygen::sectionDict.insert(anchorLabel,si);
docEntry->anchors->append(si);
+ outputXRef.resize(0);
}
//current->brief = slString; // restore orginial brief desc.
}
@@ -643,7 +644,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
* grouping commands (e.g. @{ and @})
*/
-<Comment>{CMD}{CMD}[a-z_A-Z]*{B}* { // escaped command
+<Comment>{CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command
addOutput(yytext);
}
<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!)
@@ -1116,8 +1117,8 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<SectionLabel>{LABELID} { // first argyment
sectionLabel=yytext;
+ addOutput(yytext);
sectionTitle.resize(0);
- current->doc+=yytext;
BEGIN(SectionTitle);
}
<SectionLabel>{DOCNL} { // missing argument
@@ -1151,15 +1152,19 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
}
<SectionTitle>[^\n@\\]* { // any character without special meaning
sectionTitle+=yytext;
- current->doc+=yytext;
+ addOutput(yytext);
+ }
+<SectionTitle>("\\\\"|"@@"){ID} { // unescape escaped command
+ sectionTitle+=&yytext[1];
+ addOutput(yytext);
}
-<SectionTitle>("\\\\"|"@@") { // unescape escaped command
- sectionTitle+=*yytext;
- current->doc+=*yytext;
+<SectionTitle>{CMD}[$@\\&~<>#%] { // unescape escaped character
+ sectionTitle+=yytext[1];
+ addOutput(yytext);
}
<SectionTitle>. { // anything else
sectionTitle+=yytext;
- current->doc+=yytext;
+ addOutput(*yytext);
}
/* ----- handle arguments of the anchor command ------- */
@@ -1168,7 +1173,7 @@ SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
SectionInfo *si = new SectionInfo(yyFileName,yytext,0,SectionInfo::Anchor);
Doxygen::sectionDict.insert(yytext,si);
current->anchors->append(si);
- addOutput(yytext);
+ addOutput(yytext);
BEGIN( Comment );
}
<AnchorLabel>{DOCNL} { // missing argument
@@ -1646,8 +1651,9 @@ static void handleSection(const QCString &s)
BEGIN(SectionLabel);
}
-static void handleAnchor(const QCString &)
+static void handleAnchor(const QCString &s)
{
+ addOutput("@"+s+" ");
BEGIN(AnchorLabel);
}
@@ -1825,8 +1831,8 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
/* in,out */ Protection &prot
)
{
- //fprintf(stderr,"isBrief=%d isJavaDocStyle=%d\n",
- // isBrief,isJavaDocStyle);
+ //fprintf(stderr,"parseCommentBlock() isBrief=%d isJavaDocStyle=%d lineNr=%d\n",
+ // isBrief,isJavaDocStyle,lineNr);
initParser();
guards.setAutoDelete(TRUE);
guards.clear();
@@ -1840,6 +1846,7 @@ bool parseCommentBlock(/* in,out */ Entry *curEntry,
//inBody = foundInBody;
protection = prot;
needNewEntry = FALSE;
+ outputXRef.resize(0);
setOutput( isBrief || isJavaDocStyle ? OutputBrief : OutputDoc );
briefEndsAtDot = isJavaDocStyle;
commentScanYYrestart( commentScanYYin );
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 38ed3ce..9a60a6b 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1332,7 +1332,7 @@ static void readTextFileByName(const QString &file,QString &text)
FileDef *fd;
if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig)))
{
- text = fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"));
+ text = fileToString(fd->absFilePath(),FALSE);
}
else if (ambig)
{
@@ -5126,6 +5126,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_paramsFound.clear();
g_sectionDict = 0; //sections;
+ //printf("Starting comment block at %s:%d\n",g_fileName.data(),startLine);
doctokenizerYYlineno=startLine;
doctokenizerYYinit(input,g_fileName);
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index e77f1b2..b92ca77 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -252,6 +252,18 @@ static void handleHtmlTag()
g_token->endTag = startNamePos==2;
}
+static QString stripEmptyLines(const char *s)
+{
+ int result=0,p=0;
+ for (;;)
+ {
+ int c;
+ while ((c=s[p]) && (c==' ' || c=='\t' || c=='\r')) p++;
+ if (s[p]=='\n') result=++p; else break;
+ }
+ return &s[result];
+}
+
//--------------------------------------------------------------------------
#undef YY_INPUT
@@ -565,6 +577,7 @@ REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
g_token->verb+=yytext;
}
<St_Verbatim>{CMD}"endverbatim" {
+ g_token->verb=stripEmptyLines(g_token->verb);
return RetVal_OK;
}
<St_Verbatim>[^\\@\n]+ |
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 44c7796..063887a 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -8775,7 +8775,7 @@ void generateOutput()
}
Doxygen::tagFile.setDevice(tag);
Doxygen::tagFile.setEncoding(QTextStream::Latin1);
- Doxygen::tagFile << "<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?>" << endl;
+ Doxygen::tagFile << "<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>" << endl;
Doxygen::tagFile << "<tagfile>" << endl;
}
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index fab4850..8ced35a 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -516,7 +516,17 @@ void NamespaceDef::combineUsingRelations()
void NamespaceSDict::writeDeclaration(OutputList &ol,bool localName)
{
- if (count()==0) return;
+ if (count()==0) return; // no namespaces in the list
+
+ SDict<NamespaceDef>::Iterator ni(*this);
+ NamespaceDef *nd;
+ bool found=FALSE;
+ for (ni.toFirst();(nd=ni.current()) && !found;++ni)
+ {
+ if (nd->isLinkable()) found=TRUE;
+ }
+ if (!found) return; // no linkable namespaces in the list
+
// write list of namespaces
ol.startMemberHeader();
bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
@@ -530,41 +540,42 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,bool localName)
}
ol.endMemberHeader();
ol.startMemberList();
- SDict<NamespaceDef>::Iterator ni(*this);
- NamespaceDef *nd;
for (ni.toFirst();(nd=ni.current());++ni)
{
- ol.startMemberItem(0);
- if (javaOpt)
- {
- ol.docify("package ");
- }
- else
- {
- ol.docify("namespace ");
- }
- ol.insertMemberAlign();
- QCString name;
- if (localName)
- {
- name = nd->localName();
- }
- else
- {
- name = nd->displayName();
- }
- ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name);
- if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ if (nd->isLinkable())
{
- Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
- }
- ol.endMemberItem();
- if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
- {
- ol.startMemberDescription();
- ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE);
- ol.endMemberDescription();
- ol.newParagraph();
+ ol.startMemberItem(0);
+ if (javaOpt)
+ {
+ ol.docify("package ");
+ }
+ else
+ {
+ ol.docify("namespace ");
+ }
+ ol.insertMemberAlign();
+ QCString name;
+ if (localName)
+ {
+ name = nd->localName();
+ }
+ else
+ {
+ name = nd->displayName();
+ }
+ ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name);
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
+ }
+ ol.endMemberItem();
+ if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ {
+ ol.startMemberDescription();
+ ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE);
+ ol.endMemberDescription();
+ ol.newParagraph();
+ }
}
}
ol.endMemberList();
diff --git a/src/scanner.l b/src/scanner.l
index 0c04c87..4e4b720 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -183,6 +183,7 @@ static QCString docBlock;
static QCString docBlockName;
static bool docBlockInBody;
static bool docBlockJavaStyle;
+static char docBlockTerm;
//-----------------------------------------------------------------------------
@@ -336,51 +337,8 @@ static void addMemberGroupDocs()
//-----------------------------------------------------------------
-static void handleCommentBlock(const QCString &doc,bool brief)
-{
- if (brief)
- {
- current->briefFile = yyFileName;
- current->briefLine = yyLineNr;
- }
- else
- {
- current->docFile = yyFileName;
- current->docLine = yyLineNr;
- }
- if (docBlockInBody)
- {
- if (previous==0)
- {
- ASSERT(previous!=0); // shouldn't happen
- return;
- }
- if (!previous->doc.isEmpty())
- { // start a new paragraph for the next piece of text found in the body
- previous->doc=previous->doc.stripWhiteSpace()+"\n\n";
- }
- }
- if (parseCommentBlock(
- docBlockInBody ? previous : current,
- doc, // text
- yyFileName, // file
- yyLineNr, // line
- docBlockInBody ? FALSE : brief,
- docBlockInBody ? FALSE : docBlockJavaStyle,
- protection)
- ) // need to start a new entry
- {
- if (current->section==Entry::MEMBERGRP_SEC)
- {
- addMemberGroupDocs();
- }
- current_root->addSubEntry(current);
- previous = current;
- current = new Entry ;
- initEntry();
- }
-}
-
+static void startCommentBlock(bool);
+static void handleCommentBlock(const QCString &doc,bool brief);
//-----------------------------------------------------------------
static void addXRefItem(bool inBody,const char *listName,const char *itemTitle,const char *listTitle)
@@ -2034,7 +1992,26 @@ IDLATTR ("["[^\]]*"]"){BN}*
<FindMembers,MemberSpec,Function,NextSemi,BitFields,ReadInitializer,OldStyleArgs>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount();
if (current->bodyLine==-1)
+ {
current->bodyLine=yyLineNr;
+ }
+#ifdef COMMENTSCAN
+ docBlockContext = YY_START;
+ docBlockInBody = FALSE;
+ docBlockJavaStyle = yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF");
+ docBlock.resize(0);
+ docBlockTerm = ';';
+ if (yytext[yyleng-3]=='/')
+ {
+ startCommentBlock(TRUE);
+ BEGIN( DocLine );
+ }
+ else
+ {
+ startCommentBlock(FALSE);
+ BEGIN( DocBlock );
+ }
+#else
lastAfterDocContext = YY_START;
afterDocTerminator = ';';
if (yytext[yyleng-3]=='/')
@@ -2060,9 +2037,27 @@ IDLATTR ("["[^\]]*"]"){BN}*
current->docFile = yyFileName;
BEGIN(AfterDoc);
}
+#endif
}
<MemberSpec,FindFields,FindMembers,NextSemi,BitFields,ReadInitializer,OldStyleArgs>","{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount();
+#ifdef COMMENTSCAN
+ docBlockContext = YY_START;
+ docBlockInBody = FALSE;
+ docBlockJavaStyle = yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF");
+ docBlock.resize(0);
+ docBlockTerm = ',';
+ if (yytext[yyleng-3]=='/')
+ {
+ startCommentBlock(TRUE);
+ BEGIN( DocLine );
+ }
+ else
+ {
+ startCommentBlock(FALSE);
+ BEGIN( DocBlock );
+ }
+#else
lastAfterDocContext = YY_START;
afterDocTerminator = ',';
if (yytext[yyleng-3]=='/')
@@ -2088,6 +2083,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
current->docFile = yyFileName;
BEGIN(AfterDoc);
}
+#endif
}
<DefineEnd,FindFields,FindFieldArg,ReadInitializer,OldStyleArgs>{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount();
@@ -4142,6 +4138,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
docBlockInBody = YY_START==SkipCurly;
docBlockJavaStyle = FALSE;
docBlock.resize(0);
+ startCommentBlock(FALSE);
BEGIN( DocBlock );
#else
BEGIN( Doc );
@@ -4179,6 +4176,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
current->brief.resize(0);
}
}
+ startCommentBlock(FALSE);
BEGIN( DocBlock );
#else
if (!Config_getBool("JAVADOC_AUTOBRIEF")) // use the Qt style
@@ -4243,6 +4241,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
docBlockInBody = YY_START==SkipCurly;
docBlockJavaStyle = FALSE;
docBlock.resize(0);
+ startCommentBlock(TRUE);
BEGIN( DocLine );
#else
BEGIN( LineDoc );
@@ -4270,6 +4269,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
docBlockInBody = YY_START==SkipCurly;
docBlockJavaStyle = FALSE;
docBlock.resize(0);
+ startCommentBlock(TRUE);
BEGIN( DocLine );
#else
BEGIN( LineDoc );
@@ -4296,8 +4296,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
else
{
if ((insideJava || insideCS || insideD) &&
- current->name.isEmpty() &&
- current->type.isEmpty()
+ current->name.isEmpty()
)
{
// static Java initializer
@@ -4305,6 +4304,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
if (current->stat)
{
current->name="[static initializer]";
+ current->type.resize(0);
}
else
{
@@ -4365,7 +4365,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
}
<DocBlock>^{B}*"*"+/{BN}+ { // start of a comment line
}
-<DocBlock>("@@"|"\\\\"){ID} { // escaped command
+<DocBlock>("@@"|"\\\\"){ID}/[^a-z_A-Z0-9] { // escaped command
docBlock+=yytext;
}
<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"dot"|"code")/[^a-z_A-Z0-9] { // verbatim command (which could contain nested comments!)
@@ -4399,9 +4399,12 @@ IDLATTR ("["[^\]]*"]"){BN}*
REJECT;
}
}
-<DocCopyBlock>[^@\*\\\n]+ { // any character that is not special
+<DocCopyBlock>[^@/*\\\n]+ { // any character that is not special
docBlock+=yytext;
}
+<DocCopyBlock>"/*"|"*/"|"//" {
+ docBlock+=yytext;
+ }
<DocCopyBlock>\n { // newline
docBlock+=*yytext;
yyLineNr++;
@@ -5259,6 +5262,7 @@ IDLATTR ("["[^\]]*"]"){BN}*
}
<AnchorLabel>{LABELID} {
SectionInfo *si = new SectionInfo(yyFileName,yytext,0,SectionInfo::Anchor);
+ printf("New anchor file=%s label=%s\n",yyFileName,yytext);
Doxygen::sectionDict.insert(yytext,si);
current->anchors->append(si);
current->doc+=yytext;
@@ -6142,6 +6146,62 @@ IDLATTR ("["[^\]]*"]"){BN}*
//----------------------------------------------------------------------------
+static void startCommentBlock(bool brief)
+{
+ if (brief)
+ {
+ current->briefFile = yyFileName;
+ current->briefLine = yyLineNr;
+ }
+ else
+ {
+ current->docFile = yyFileName;
+ current->docLine = yyLineNr;
+ }
+}
+
+static void handleCommentBlock(const QCString &doc,bool brief)
+{
+ if (docBlockInBody)
+ {
+ if (previous==0)
+ {
+ ASSERT(previous!=0); // shouldn't happen
+ goto exit;
+ }
+ if (!previous->doc.isEmpty())
+ { // start a new paragraph for the next piece of text found in the body
+ previous->doc=previous->doc.stripWhiteSpace()+"\n\n";
+ }
+ }
+ if (parseCommentBlock(
+ docBlockInBody ? previous : current,
+ doc, // text
+ yyFileName, // file
+ brief ? current->briefLine : current->docLine, // line of block start
+ docBlockInBody ? FALSE : brief,
+ docBlockInBody ? FALSE : docBlockJavaStyle,
+ protection)
+ ) // need to start a new entry
+ {
+ if (current->section==Entry::MEMBERGRP_SEC)
+ {
+ addMemberGroupDocs();
+ }
+ current_root->addSubEntry(current);
+ previous = current;
+ current = new Entry ;
+ initEntry();
+ }
+
+exit:
+ if (docBlockTerm)
+ {
+ unput(docBlockTerm);
+ docBlockTerm=0;
+ }
+}
+
#ifndef COMMENTSCAN
static void startGroup()
{
diff --git a/src/translator.h b/src/translator.h
index b5f9c9f..360d35b 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -92,7 +92,7 @@ class Translator
virtual QCString trClassHierarchy() = 0;
virtual QCString trCompoundList() = 0;
virtual QCString trFileList() = 0;
- virtual QCString trHeaderFiles() = 0;
+ //virtual QCString trHeaderFiles() = 0;
virtual QCString trCompoundMembers() = 0;
virtual QCString trFileMembers() = 0;
virtual QCString trRelatedPages() = 0;
@@ -103,11 +103,11 @@ class Translator
virtual QCString trCompoundListDescription() = 0;
virtual QCString trCompoundMembersDescription(bool extractAll) = 0;
virtual QCString trFileMembersDescription(bool extractAll) = 0;
- virtual QCString trHeaderFilesDescription() = 0;
+ //virtual QCString trHeaderFilesDescription() = 0;
virtual QCString trExamplesDescription() = 0;
virtual QCString trRelatedPagesDescription() = 0;
virtual QCString trModulesDescription() = 0;
- virtual QCString trNoDescriptionAvailable() = 0;
+ //virtual QCString trNoDescriptionAvailable() = 0;
// index titles (the project name is prepended for these)
@@ -133,7 +133,7 @@ class Translator
virtual QCString trFunctionPrototypeDocumentation() = 0;
virtual QCString trTypedefDocumentation() = 0;
virtual QCString trEnumerationTypeDocumentation() = 0;
- virtual QCString trEnumerationValueDocumentation() = 0;
+ //virtual QCString trEnumerationValueDocumentation() = 0;
virtual QCString trFunctionDocumentation() = 0;
virtual QCString trVariableDocumentation() = 0;
virtual QCString trCompounds() = 0;
@@ -141,9 +141,9 @@ class Translator
virtual QCString trWrittenBy() = 0;
virtual QCString trClassDiagram(const char *clName) = 0;
virtual QCString trForInternalUseOnly() = 0;
- virtual QCString trReimplementedForInternalReasons() = 0;
+ //virtual QCString trReimplementedForInternalReasons() = 0;
virtual QCString trWarning() = 0;
- virtual QCString trBugsAndLimitations() = 0;
+ //virtual QCString trBugsAndLimitations() = 0;
virtual QCString trVersion() = 0;
virtual QCString trDate() = 0;
virtual QCString trReturns() = 0;
@@ -223,7 +223,7 @@ class Translator
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
- virtual QCString trSources() = 0;
+ //virtual QCString trSources() = 0;
virtual QCString trDefinedAtLineInSourceFile() = 0;
virtual QCString trDefinedInSourceFile() = 0;
@@ -317,13 +317,13 @@ class Translator
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
- virtual QCString trInterfaces() = 0;
+ //virtual QCString trInterfaces() = 0;
virtual QCString trClasses() = 0;
virtual QCString trPackage(const char *name) = 0;
virtual QCString trPackageList() = 0;
virtual QCString trPackageListDescription() = 0;
virtual QCString trPackages() = 0;
- virtual QCString trPackageDocumentation() = 0;
+ //virtual QCString trPackageDocumentation() = 0;
virtual QCString trDefineValue() = 0;
//////////////////////////////////////////////////////////////////////////
@@ -349,7 +349,7 @@ class Translator
virtual QCString trGroup(bool first_capital, bool singular) = 0;
virtual QCString trPage(bool first_capital, bool singular) = 0;
virtual QCString trMember(bool first_capital, bool singular) = 0;
- virtual QCString trField(bool first_capital, bool singular) = 0;
+ //virtual QCString trField(bool first_capital, bool singular) = 0;
virtual QCString trGlobal(bool first_capital, bool singular) = 0;
//////////////////////////////////////////////////////////////////////////
diff --git a/src/translator_ua.h b/src/translator_ua.h
index c817527..fac3a10 100644
--- a/src/translator_ua.h
+++ b/src/translator_ua.h
@@ -20,7 +20,7 @@
#ifndef TRANSLATOR_UA_H
#define TRANSLATOR_UA_H
-class TranslatorUkrainian : public TranslatorAdapter_1_2_11
+class TranslatorUkrainian : public Translator
{
private:
/*! The Decode() inline assumes the source written in the
@@ -302,11 +302,11 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
/*! This is an introduction to the page with the list of related pages */
virtual QCString trRelatedPagesDescription()
- { return decode("Полный список додаткових опис╕в."); }
+ { return decode("Повний список додаткових опис╕в."); }
/*! This is an introduction to the page with the list of class/file groups */
virtual QCString trModulesDescription()
- { return decode("Полный список модул╕в."); }
+ { return decode("Повний список модул╕в."); }
/*! This sentences is used in the annotated class/file lists if no brief
* description is given.
@@ -622,8 +622,8 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
case ClassDef::Struct: result+="структури"; break;
case ClassDef::Union: result+="об'╓днання"; break;
case ClassDef::Interface: result+="╕нтерфейсу"; break;
- case ClassDef::Protocol: result+="protocol"; break; // translate me!
- case ClassDef::Category: result+="category"; break; // translate me!
+ case ClassDef::Protocol: result+="протоколу"; break;
+ case ClassDef::Category: result+="категор╕╖"; break;
case ClassDef::Exception: result+="Виняток"; break;
}
}
@@ -635,8 +635,8 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
case ClassDef::Struct: result+="Структура"; break;
case ClassDef::Union: result+="Об'╓днання"; break;
case ClassDef::Interface: result+="╤нтерфейс"; break;
- case ClassDef::Protocol: result+="protocol"; break; // translate me!
- case ClassDef::Category: result+="category"; break; // translate me!
+ case ClassDef::Protocol: result+="Протокол"; break;
+ case ClassDef::Category: result+="Категор╕я"; break;
case ClassDef::Exception: result+="Виняток"; break;
}
}
@@ -800,10 +800,10 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
if (single) result+="цього ╕нтерфейсу"; else result+="цих ╕нтерфейс╕в";
break;
case ClassDef::Protocol:
- if (single) result+="protocol"; else result+="protocols"; // translate me!
+ if (single) result+="цього протоколу"; else result+="цих протокол╕в";
break;
case ClassDef::Category:
- if (single) result+="category"; else result+="categories"; // translate me!
+ if (single) result+="ц╕╓╖ категор╕╖"; else result+="цих категор╕й";
break;
case ClassDef::Exception:
if (single) result+="цього винятку"; else result+="цих винятк╕в";
@@ -826,7 +826,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
/*! This is used as the heading text for the retval command. */
virtual QCString trReturnValues()
- { return decode("Значения, що повертаються"); }
+ { return decode("Значення, що повертаються"); }
/*! This is in the (quick) index as a link to the main page (index.html)
*/
@@ -1024,7 +1024,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
}
virtual QCString trInclByDepGraph()
{
- return decode("Граф файлов, як╕ включають цей файл:");
+ return decode("Граф файл╕в, як╕ включають цей файл:");
}
virtual QCString trSince()
/*??*/
@@ -1048,11 +1048,11 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
"Позначення, що використовуються у графах.<p>\n"
"Розглянемо наступний приклад:\n"
"\\code\n"
- "/*! Невидимый класс из-за усечения */\n"
+ "/*! Невидимий клас через зр╕зання */\n"
"class Invisible { };\n\n"
"/*! Обмежений клас, в╕дношення успадкування приховане */\n"
"class Truncated : public Invisible { };\n\n"
- "/* Недокументований класс */\n"
+ "/* Недокументований клас */\n"
"class Undocumented { };\n\n"
"/*! Загальнодоступне успадкування */\n"
"class PublicBase : public Truncated { };\n\n"
@@ -1089,7 +1089,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
"Стр╕лки мають наступний зм╕ст:\n"
"<ul>\n"
"<li>Темносиня стр╕лка в╕добража╓ в╕дношення загальнодоступного успадкування "
- "м╕ь двома класами.\n"
+ "м╕ж двома класами.\n"
"<li>Темнозелена стр╕лка використову╓ться при захищеному успадкуванн╕.\n"
"<li>Темночервона стр╕лка використову╓ться при приватному успадкуванн╕.\n"
"<li>Пурпурна стр╕лка використову╓ться, якщо клас м╕ститься в"
@@ -1338,6 +1338,249 @@ class TranslatorUkrainian : public TranslatorAdapter_1_2_11
if (!singular) result+="и";
return decode(result);
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.11
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is put before the list of members referenced by a member
+ */
+ virtual QCString trReferences()
+ {
+ return "Використову╓";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.13
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are implemented by this one.
+ */
+ virtual QCString trImplementedFromList(int numEntries)
+ {
+ return "Реал╕зу╓ " + trWriteList(numEntries) + ".";
+ }
+
+ /*! used in member documentation blocks to produce a list of
+ * all members that implement this abstract member.
+ */
+ virtual QCString trImplementedInList(int numEntries)
+ {
+ return "Реал╕зу╓ в " + trWriteList(numEntries) + ".";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.16
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in RTF documentation as a heading for the Table
+ * of Contents.
+ */
+ virtual QCString trRTFTableOfContents()
+ {
+ return "Зм╕ст";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.17
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as the header of the list of item that have been
+ * flagged deprecated
+ */
+ virtual QCString trDeprecatedList()
+ {
+ return "Застар╕л╕ елементи";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.18
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a header for declaration section of the events found in
+ * a C# program
+ */
+ virtual QCString trEvents()
+ {
+ return "Под╕╖";
+ }
+
+ /*! Header used for the documentation section of a class' events. */
+ virtual QCString trEventDocumentation()
+ {
+ return "Документац╕я под╕й";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a heading for a list of Java class types with package scope.
+ */
+ virtual QCString trPackageTypes()
+ {
+ return "Типи пакет╕в";
+ }
+
+ /*! Used as a heading for a list of Java class functions with package
+ * scope.
+ */
+ virtual QCString trPackageMembers()
+ {
+ return "Функц╕╖ пакет╕в";
+ }
+
+ /*! Used as a heading for a list of static Java class functions with
+ * package scope.
+ */
+ virtual QCString trStaticPackageMembers()
+ {
+ return "Статичн╕ функц╕ю пакет╕в";
+ }
+
+ /*! Used as a heading for a list of Java class variables with package
+ * scope.
+ */
+ virtual QCString trPackageAttribs()
+ {
+ return "Атрибути пакет╕в";
+ }
+
+ /*! Used as a heading for a list of static Java class variables with
+ * package scope.
+ */
+ virtual QCString trStaticPackageAttribs()
+ {
+ return "Статичн╕ атрибути пакет╕в";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used in the quick index of a class/file/namespace member list page
+ * to link to the unfiltered list of all members.
+ */
+ virtual QCString trAll()
+ {
+ return "Вс╕";
+ }
+ /*! Put in front of the call graph for a function. */
+ virtual QCString trCallGraph()
+ {
+ return "Граф вс╕х виклик╕в ц╕╓╖ функц╕╖:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! When the search engine is enabled this text is put in the header
+ * of each page before the field where one can enter the text to search
+ * for.
+ */
+ virtual QCString trSearchForIndex()
+ {
+ return "Шукати";
+ }
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ {
+ return "Результати пошуку";
+ }
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
+ {
+ return "Не знайдено документ╕в в╕дпов╕дно до вашого запиту.";
+ }
+ else if (numDocuments==1)
+ {
+ return "Було знайдено <b>1</b> документ в╕дпов╕дно до вашого запиту.";
+ }
+ else
+ {
+ return "Було знайдено <b>$num</b> документ╕в в╕дпов╕дно до вашого запиту. "
+ "Найкращ╕ в╕дпов╕дност╕ показано спочатку.";
+ }
+ }
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ {
+ return "В╕дпов╕дн╕сть:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return "Текст програми "+filename;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Дерево каталог╕в"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Документац╕я каталог╕в"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of a HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Каталоги"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Дерево каталог╕в впорядковано наближено "
+ "до алфав╕ту:";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result="Дов╕дник каталогу "; result+=dirName; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in sigular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool, bool singular)
+ {
+ QCString result("Каталог");
+ if (!singular) result+="и";
+ return result;
+ }
+
};
#endif
+
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 682ad44..2030789 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -493,6 +493,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
// - body code
// + template arguments
// (templateArguments(), definitionTemplateParameterLists())
+ // - call graph
// enum values are written as part of the enum
if (md->memberType()==MemberDef::EnumValue) return;
@@ -896,7 +897,7 @@ static void writeInnerClasses(const ClassSDict *cl,QTextStream &t)
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
- if (cd->name().find('@')!=-1) // skip anonymous scopes
+ if (cd->name().find('@')==-1) // skip anonymous scopes
{
t << " <innerclass refid=\"" << cd->getOutputFileBase()
<< "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
@@ -913,7 +914,7 @@ static void writeInnerNamespaces(const NamespaceSDict *nl,QTextStream &t)
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
- if (nd->name().find('@')!=-1) // skip anonymouse scopes
+ if (nd->name().find('@')==-1) // skip anonymouse scopes
{
t << " <innernamespace refid=\"" << nd->getOutputFileBase()
<< "\">" << convertToXML(nd->name()) << "</innernamespace>" << endl;