summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-03-24 11:51:51 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-03-24 11:51:51 (GMT)
commitdeaa34e0c1d990f37fe00e465ac7a22f705904f0 (patch)
tree8d5749ba8d587d7b753162c524b18f7e7cdf6a0b /src
parentaacd1557af129e2bff3514169e04168376a2431b (diff)
downloadDoxygen-deaa34e0c1d990f37fe00e465ac7a22f705904f0.zip
Doxygen-deaa34e0c1d990f37fe00e465ac7a22f705904f0.tar.gz
Doxygen-deaa34e0c1d990f37fe00e465ac7a22f705904f0.tar.bz2
Release-1.8.3.1-20130324
Diffstat (limited to 'src')
-rw-r--r--src/bufstr.h4
-rw-r--r--src/cite.cpp16
-rw-r--r--src/clangparser.cpp720
-rw-r--r--src/clangparser.h35
-rw-r--r--src/classdef.cpp12
-rw-r--r--src/classdef.h1
-rw-r--r--src/code.h2
-rw-r--r--src/code.l53
-rw-r--r--src/commentcnv.l3
-rw-r--r--src/commentscan.l16
-rw-r--r--src/config.xml42
-rwxr-xr-xsrc/configgen.py8
-rw-r--r--src/configoptions.cpp51
-rw-r--r--src/definition.cpp13
-rw-r--r--src/definition.h3
-rw-r--r--src/diagram.h2
-rw-r--r--src/docbookgen.cpp3
-rw-r--r--src/doctokenizer.h1
-rw-r--r--src/dot.cpp18
-rw-r--r--src/doxygen.cpp149
-rw-r--r--src/doxygen.h6
-rw-r--r--src/doxygen.md2
-rw-r--r--src/doxygen.pro.in4
-rw-r--r--src/entry.cpp2
-rw-r--r--src/entry.h1
-rw-r--r--src/filedef.cpp37
-rw-r--r--src/fortrancode.h2
-rw-r--r--src/fortrancode.l16
-rw-r--r--src/fortranscanner.l4
-rw-r--r--src/groupdef.cpp2
-rw-r--r--src/htmlattrib.h3
-rw-r--r--src/htmlgen.cpp7
-rw-r--r--src/htmlgen.h4
-rw-r--r--src/htmlhelp.h1
-rw-r--r--src/language.cpp2
-rw-r--r--src/latexdocvisitor.cpp2
-rw-r--r--src/latexgen.cpp945
-rw-r--r--src/latexgen.h1
-rw-r--r--src/libdoxygen.pro.in2
-rw-r--r--src/mangen.cpp2
-rw-r--r--src/mangen.h1
-rw-r--r--src/markdown.cpp36
-rw-r--r--src/marshal.cpp2
-rw-r--r--src/memberdef.cpp41
-rw-r--r--src/memberdef.h8
-rw-r--r--src/membergroup.cpp6
-rw-r--r--src/memberlist.cpp18
-rw-r--r--src/memberlist.h5
-rw-r--r--src/namespacedef.cpp2
-rw-r--r--src/outputgen.h2
-rw-r--r--src/outputlist.h3
-rw-r--r--src/pre.l68
-rw-r--r--src/printdocvisitor.h1
-rw-r--r--src/pycode.h1
-rw-r--r--src/pycode.l11
-rw-r--r--src/rtfgen.cpp17
-rw-r--r--src/rtfgen.h1
-rw-r--r--src/scanner.l101
-rw-r--r--src/search.css2
-rw-r--r--src/search_css.h2
-rw-r--r--src/settings.h10
-rw-r--r--src/translator_adapter.h36
-rw-r--r--src/translator_ua.h1337
-rw-r--r--src/util.cpp31
-rw-r--r--src/util.h1
-rw-r--r--src/vhdlcode.l9
-rw-r--r--src/vhdldocgen.cpp114
-rw-r--r--src/vhdldocgen.h15
-rw-r--r--src/vhdlparser.y72
-rw-r--r--src/vhdlscanner.h9
-rw-r--r--src/vhdlscanner.l84
-rw-r--r--src/xmlgen.cpp5
72 files changed, 2802 insertions, 1446 deletions
diff --git a/src/bufstr.h b/src/bufstr.h
index 635b4cf..427b012 100644
--- a/src/bufstr.h
+++ b/src/bufstr.h
@@ -18,6 +18,10 @@
#ifndef _BUFSTR_H
#define _BUFSTR_H
+#include <qglobal.h>
+#include <qcstring.h>
+#include <stdlib.h>
+
/*! @brief Buffer used to store strings
*
* This buffer is used append characters and strings. It will automatically
diff --git a/src/cite.cpp b/src/cite.cpp
index 91dd1e1..d4860c8 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -88,11 +88,19 @@ static QCString getListOfBibFiles(const QCString &sep,bool namesOnly)
void CiteDict::writeLatexBibliography(FTextStream &t)
{
- if (m_entries.count()==0) return;
+ if (m_entries.isEmpty())
+ return;
+
QCString style = Config_getString("LATEX_BIB_STYLE");
- if (style.isEmpty()) style="plain";
- t << "\\newpage \\bibliographystyle{" << style << "}" << endl;
- t << "\\bibliography{" << getListOfBibFiles(",",TRUE) << "}" << endl;
+ if (style.isEmpty())
+ style="plain";
+ t << "% Bibliography\n"
+ "\\newpage\n"
+ "\\phantomsection\n"
+ "\\addcontentsline{toc}{part}{" << theTranslator->trCiteReferences() << "}\n"
+ "\\bibliographystyle{" << style << "}\n"
+ "\\bibliography{" << getListOfBibFiles(",",TRUE) << "}\n"
+ "\n";
}
void CiteDict::insert(const char *label)
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
new file mode 100644
index 0000000..c9e192f
--- /dev/null
+++ b/src/clangparser.cpp
@@ -0,0 +1,720 @@
+#include "clangparser.h"
+#include "settings.h"
+#include <stdio.h>
+
+#if USE_LIBCLANG
+#include <clang-c/Index.h>
+#include <qfileinfo.h>
+#include <stdlib.h>
+#include "message.h"
+#include "sortdict.h"
+#include "outputlist.h"
+#include "filedef.h"
+#include "memberdef.h"
+#include "doxygen.h"
+#include "util.h"
+#include "config.h"
+#include "growbuf.h"
+#include "membername.h"
+#include "filename.h"
+#endif
+
+ClangParser *ClangParser::instance()
+{
+ if (!s_instance) s_instance = new ClangParser;
+ return s_instance;
+}
+
+ClangParser *ClangParser::s_instance = 0;
+
+//--------------------------------------------------------------------------
+#if USE_LIBCLANG
+
+class ClangParser::Private
+{
+ public:
+ int getCurrentTokenLine();
+ CXIndex index;
+ CXTranslationUnit tu;
+ QCString fileName;
+ CXToken *tokens;
+ uint numTokens;
+ CXCursor *cursors;
+ uint curLine;
+ uint curToken;
+ CXUnsavedFile uf;
+ QCString source;
+};
+
+static QCString detab(const QCString &s)
+{
+ static int tabSize = Config_getInt("TAB_SIZE");
+ GrowBuf out;
+ int size = s.length();
+ const char *data = s.data();
+ int i=0;
+ int col=0;
+ const int maxIndent=1000000; // value representing infinity
+ int minIndent=maxIndent;
+ while (i<size)
+ {
+ char c = data[i++];
+ switch(c)
+ {
+ case '\t': // expand tab
+ {
+ int stop = tabSize - (col%tabSize);
+ //printf("expand at %d stop=%d\n",col,stop);
+ col+=stop;
+ while (stop--) out.addChar(' ');
+ }
+ break;
+ case '\n': // reset colomn counter
+ out.addChar(c);
+ col=0;
+ break;
+ case ' ': // increment column counter
+ out.addChar(c);
+ col++;
+ break;
+ default: // non-whitespace => update minIndent
+ out.addChar(c);
+ if (c<0 && i<size) // multibyte sequence
+ {
+ out.addChar(data[i++]); // >= 2 bytes
+ if (((uchar)c&0xE0)==0xE0 && i<size)
+ {
+ out.addChar(data[i++]); // 3 bytes
+ }
+ if (((uchar)c&0xF0)==0xF0 && i<size)
+ {
+ out.addChar(data[i++]); // 4 byres
+ }
+ }
+ if (col<minIndent) minIndent=col;
+ col++;
+ }
+ }
+ out.addChar(0);
+ //printf("detab refIndent=%d\n",refIndent);
+ return out.get();
+}
+
+static QStrList getClangOptions()
+{
+ static QCString clangOptions = Config_getString("CLANG_OPTIONS");
+ int p=0,i;
+ QStrList options;
+ while ((i=clangOptions.find(' ',p))!=-1)
+ {
+ QCString opt = clangOptions.mid(p,i-p).stripWhiteSpace();
+ if (!opt.isEmpty())
+ {
+ options.append(opt);
+ }
+ p=i+1;
+ }
+ QCString opt = clangOptions.right(clangOptions.length()-p).stripWhiteSpace();
+ if (!opt.isEmpty())
+ {
+ options.append(opt);
+ }
+ return options;
+}
+
+void ClangParser::start(const char *fileName)
+{
+ static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static QStrList &includePath = Config_getList("INCLUDE_PATH");
+ static QStrList clangOptions = getClangOptions();
+ if (!clangAssistedParsing) return;
+ //printf("ClangParser::start(%s)\n",fileName);
+ p->fileName = fileName;
+ p->index = clang_createIndex(0, 0);
+ p->curLine = 1;
+ p->curToken = 0;
+ char *argv[4+Doxygen::inputPaths.count()+includePath.count()+clangOptions.count()];
+ QDictIterator<void> di(Doxygen::inputPaths);
+ int argc=0;
+ // add include paths for input files
+ for (di.toFirst();di.current();++di,++argc)
+ {
+ QCString inc = QCString("-I")+di.currentKey();
+ argv[argc]=strdup(inc.data());
+ //printf("argv[%d]=%s\n",argc,argv[argc]);
+ }
+ // add external include paths
+ for (uint i=0;i<includePath.count();i++)
+ {
+ QCString inc = QCString("-I")+includePath.at(i);
+ argv[argc++]=strdup(inc.data());
+ }
+ // user specified options
+ for (uint i=0;i<clangOptions.count();i++)
+ {
+ argv[argc++]=strdup(clangOptions.at(i));
+ }
+ // extra options
+ argv[argc++]=strdup("-ferror-limit=0");
+ argv[argc++]=strdup("-x"); // force C++
+ argv[argc++]=strdup("c++");
+ // the file name
+ argv[argc++]=strdup(fileName);
+ static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
+ p->source = detab(fileToString(fileName,filterSourceFiles,TRUE));
+ //printf("source %s ----------\n%s\n-------------\n\n",
+ // fileName,p->source.data());
+ p->uf.Filename = strdup(fileName);
+ p->uf.Contents = p->source.data();
+ p->uf.Length = p->source.length();
+ p->tu = clang_parseTranslationUnit(p->index, 0,
+ argv, argc, &p->uf, 1,
+ CXTranslationUnit_DetailedPreprocessingRecord);
+ for (int i=0;i<argc;++i)
+ {
+ free(argv[i]);
+ }
+
+ if (p->tu)
+ {
+ for (uint i=0, n=clang_getNumDiagnostics(p->tu); i!=n; ++i)
+ {
+ CXDiagnostic diag = clang_getDiagnostic(p->tu, i);
+ CXString string = clang_formatDiagnostic(diag,
+ clang_defaultDiagnosticDisplayOptions());
+ err("%s\n",clang_getCString(string));
+ clang_disposeString(string);
+ }
+ QFileInfo fi(fileName);
+ CXFile f = clang_getFile(p->tu, fileName);
+ CXSourceLocation fileBegin = clang_getLocationForOffset(p->tu, f, 0);
+ CXSourceLocation fileEnd = clang_getLocationForOffset(p->tu, f, p->uf.Length);
+ CXSourceRange fileRange = clang_getRange(fileBegin, fileEnd);
+
+ clang_tokenize(p->tu,fileRange,&p->tokens,&p->numTokens);
+ p->cursors=new CXCursor[p->numTokens];
+ clang_annotateTokens(p->tu,p->tokens,p->numTokens,p->cursors);
+ }
+ else
+ {
+ p->tokens = 0;
+ p->numTokens = 0;
+ p->cursors = 0;
+ err("Failed to parse translation unit %s\n",fileName);
+ }
+}
+
+void ClangParser::finish()
+{
+ static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ if (!clangAssistedParsing) return;
+ //printf("ClangParser::finish()\n");
+ delete[] p->cursors;
+ clang_disposeTokens(p->tu,p->tokens,p->numTokens);
+ clang_disposeTranslationUnit(p->tu);
+ clang_disposeIndex(p->index);
+ free((void *)p->uf.Filename);
+ p->source.resize(0);
+ p->uf.Contents = 0;
+ p->uf.Filename = 0;
+ p->uf.Contents = 0;
+ p->tokens = 0;
+ p->numTokens = 0;
+ p->cursors = 0;
+}
+
+int ClangParser::Private::getCurrentTokenLine()
+{
+ uint l, c;
+ if (numTokens==0) return 1;
+ // guard against filters that reduce the number of lines
+ if (curToken>=numTokens) curToken=numTokens-1;
+ CXSourceLocation start = clang_getTokenLocation(tu,tokens[curToken]);
+ clang_getSpellingLocation(start, 0, &l, &c, 0);
+ return l;
+}
+
+/** Looks for \a symbol which should be found at \a line and returns
+ * a Clang unique identifier for the symbol.
+ */
+QCString ClangParser::lookup(uint line,const char *symbol)
+{
+ //printf("ClangParser::lookup(%d,%s)\n",line,symbol);
+ QCString result;
+ if (symbol==0) return result;
+ static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ if (!clangAssistedParsing) return result;
+
+ int sl = strlen(symbol);
+ uint l = p->getCurrentTokenLine();
+ while (l>=line && p->curToken>0)
+ {
+ if (l==line) // already at the right line
+ {
+ p->curToken--; // linear search to start of the line
+ l = p->getCurrentTokenLine();
+ }
+ else
+ {
+ p->curToken/=2; // binary search backward
+ l = p->getCurrentTokenLine();
+ }
+ }
+ bool found=FALSE;
+ while (l<=line && p->curToken<p->numTokens && !found)
+ {
+ CXString tokenString = clang_getTokenSpelling(p->tu, p->tokens[p->curToken]);
+ //if (l==line)
+ //{
+ // printf("try to match symbol %s with token %s\n",symbol,clang_getCString(tokenString));
+ //}
+ const char *ts = clang_getCString(tokenString);
+ int tl = strlen(ts);
+ int startIndex = p->curToken;
+ if (l==line && strncmp(ts,symbol,tl)==0) // found partial match at the correct line
+ {
+ int offset = tl;
+ while (offset<sl) // symbol spans multiple tokens
+ {
+ //printf("found partial match\n");
+ p->curToken++;
+ if (p->curToken>=p->numTokens)
+ {
+ break; // end of token stream
+ }
+ l = p->getCurrentTokenLine();
+ clang_disposeString(tokenString);
+ tokenString = clang_getTokenSpelling(p->tu, p->tokens[p->curToken]);
+ ts = clang_getCString(tokenString);
+ tl = ts ? strlen(ts) : 0;
+ // skip over any spaces in the symbol
+ char c;
+ while (offset<sl && ((c=symbol[offset])==' ' || c=='\t' || c=='\r' || c=='\n'))
+ {
+ offset++;
+ }
+ if (strncmp(ts,symbol+offset,tl)!=0) // next token matches?
+ {
+ //printf("no match '%s'<->'%s'\n",ts,symbol+offset);
+ break; // no match
+ }
+ //printf("partial match '%s'<->'%s'\n",ts,symbol+offset);
+ offset+=tl;
+ }
+ if (offset==sl) // symbol matches the token(s)
+ {
+ CXCursor c = p->cursors[p->curToken];
+ CXString usr = clang_getCursorUSR(c);
+ //printf("found full match %s usr='%s'\n",symbol,clang_getCString(usr));
+ result = clang_getCString(usr);
+ clang_disposeString(usr);
+ found=TRUE;
+ }
+ else // reset token cursor to start of the search
+ {
+ p->curToken = startIndex;
+ }
+ }
+ clang_disposeString(tokenString);
+ p->curToken++;
+ if (p->curToken<p->numTokens)
+ {
+ l = p->getCurrentTokenLine();
+ }
+ }
+ //if (!found)
+ //{
+ // printf("Did not find symbol %s at line %d :-(\n",symbol,line);
+ //}
+ //else
+ //{
+ // printf("Found symbol %s usr=%s\n",symbol,result.data());
+ //}
+ return result;
+}
+
+static QCString keywordToType(const char *keyword)
+{
+ static bool init=TRUE;
+ static QDict<void> flowKeywords(47);
+ static QDict<void> typeKeywords(47);
+ if (init)
+ {
+ flowKeywords.insert("break",(void*)0x8);
+ flowKeywords.insert("case",(void*)0x8);
+ flowKeywords.insert("catch",(void*)0x8);
+ flowKeywords.insert("continue",(void*)0x8);
+ flowKeywords.insert("default",(void*)0x8);
+ flowKeywords.insert("do",(void*)0x8);
+ flowKeywords.insert("else",(void*)0x8);
+ flowKeywords.insert("finally",(void*)0x8);
+ flowKeywords.insert("for",(void*)0x8);
+ flowKeywords.insert("foreach",(void*)0x8);
+ flowKeywords.insert("for each",(void*)0x8);
+ flowKeywords.insert("goto",(void*)0x8);
+ flowKeywords.insert("if",(void*)0x8);
+ flowKeywords.insert("return",(void*)0x8);
+ flowKeywords.insert("switch",(void*)0x8);
+ flowKeywords.insert("throw",(void*)0x8);
+ flowKeywords.insert("throws",(void*)0x8);
+ flowKeywords.insert("try",(void*)0x8);
+ flowKeywords.insert("while",(void*)0x8);
+ flowKeywords.insert("@try",(void*)0x8);
+ flowKeywords.insert("@catch",(void*)0x8);
+ flowKeywords.insert("@finally",(void*)0x8);
+
+ typeKeywords.insert("bool",(void*)0x8);
+ typeKeywords.insert("char",(void*)0x8);
+ typeKeywords.insert("double",(void*)0x8);
+ typeKeywords.insert("float",(void*)0x8);
+ typeKeywords.insert("int",(void*)0x8);
+ typeKeywords.insert("long",(void*)0x8);
+ typeKeywords.insert("object",(void*)0x8);
+ typeKeywords.insert("short",(void*)0x8);
+ typeKeywords.insert("signed",(void*)0x8);
+ typeKeywords.insert("unsigned",(void*)0x8);
+ typeKeywords.insert("void",(void*)0x8);
+ typeKeywords.insert("wchar_t",(void*)0x8);
+ typeKeywords.insert("size_t",(void*)0x8);
+ typeKeywords.insert("boolean",(void*)0x8);
+ typeKeywords.insert("id",(void*)0x8);
+ typeKeywords.insert("SEL",(void*)0x8);
+ typeKeywords.insert("string",(void*)0x8);
+ typeKeywords.insert("nullptr",(void*)0x8);
+ init=FALSE;
+ }
+ if (flowKeywords[keyword]) return "keywordflow";
+ if (typeKeywords[keyword]) return "keywordtype";
+ return "keyword";
+}
+
+static void writeLineNumber(OutputList &ol,FileDef *fd,uint line)
+{
+ Definition *d = fd ? fd->getSourceDefinition(line) : 0;
+ if (d && d->isLinkable())
+ {
+ MemberDef *md = fd->getSourceMember(line);
+ if (md && md->isLinkable()) // link to member
+ {
+ ol.writeLineNumber(md->getReference(),
+ md->getOutputFileBase(),
+ md->anchor(),
+ line);
+ }
+ else // link to compound
+ {
+ ol.writeLineNumber(d->getReference(),
+ d->getOutputFileBase(),
+ d->anchor(),
+ line);
+ }
+ }
+ else // no link
+ {
+ ol.writeLineNumber(0,0,0,line);
+ }
+}
+
+static void codifyLines(OutputList &ol,FileDef *fd,const char *text,
+ uint &line,uint &column,const char *fontClass=0)
+{
+ if (fontClass) ol.startFontClass(fontClass);
+ const char *p=text,*sp=p;
+ char c;
+ bool done=FALSE;
+ while (!done)
+ {
+ sp=p;
+ while ((c=*p++) && c!='\n') { column++; }
+ if (c=='\n')
+ {
+ line++;
+ int l = (int)(p-sp-1);
+ column=l+1;
+ char *tmp = (char*)malloc(l+1);
+ memcpy(tmp,sp,l);
+ tmp[l]='\0';
+ ol.codify(tmp);
+ free(tmp);
+ if (fontClass) ol.endFontClass();
+ ol.endCodeLine();
+ ol.startCodeLine(TRUE);
+ writeLineNumber(ol,fd,line);
+ if (fontClass) ol.startFontClass(fontClass);
+ }
+ else
+ {
+ ol.codify(sp);
+ done=TRUE;
+ }
+ }
+ if (fontClass) ol.endFontClass();
+}
+
+static void writeMultiLineCodeLink(OutputList &ol,
+ FileDef *fd,uint &line,uint &column,
+ const char *ref,const char *file,
+ const char *anchor,const char *text,
+ const char *tooltip)
+{
+ bool done=FALSE;
+ char *p=(char *)text;
+ while (!done)
+ {
+ char *sp=p;
+ char c;
+ while ((c=*p++) && c!='\n') { column++; }
+ if (c=='\n')
+ {
+ line++;
+ *(p-1)='\0';
+ //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
+ ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ ol.endCodeLine();
+ ol.startCodeLine(TRUE);
+ writeLineNumber(ol,fd,line);
+ }
+ else
+ {
+ //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
+ ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ done=TRUE;
+ }
+ }
+}
+
+void ClangParser::linkInclude(OutputList &ol,FileDef *fd,
+ uint &line,uint &column,const char *text)
+{
+ QCString incName = text;
+ incName = incName.mid(1,incName.length()-2); // strip ".." or <..>
+ FileDef *ifd=0;
+ FileName *fn = Doxygen::inputNameDict->find(incName);
+ if (fn)
+ {
+ bool found=false;
+ FileNameIterator fni(*fn);
+ // for each include name
+ for (fni.toFirst();!found && (ifd=fni.current());++fni)
+ {
+ // see if this source file actually includes the file
+ found = fd->isIncluded(ifd->absFilePath());
+ //printf(" include file %s found=%d\n",ifd->absFilePath().data(),found);
+ }
+ }
+ if (ifd)
+ {
+ ol.writeCodeLink(ifd->getReference(),ifd->getOutputFileBase(),0,text,ifd->briefDescriptionAsTooltip());
+ }
+ else
+ {
+ codifyLines(ol,ifd,text,line,column,"preprocessor");
+ }
+}
+
+void ClangParser::linkMacro(OutputList &ol,FileDef *fd,
+ uint &line,uint &column,const char *text)
+{
+ MemberName *mn=Doxygen::functionNameSDict->find(text);
+ if (mn)
+ {
+ MemberNameIterator mni(*mn);
+ MemberDef *md;
+ for (mni.toFirst();(md=mni.current());++mni)
+ {
+ if (md->isDefine())
+ {
+ writeMultiLineCodeLink(ol,
+ fd,line,column,
+ md->getReference(),
+ md->getOutputFileBase(),
+ md->anchor(),
+ text,
+ md->briefDescriptionAsTooltip()
+ );
+ return;
+ }
+ }
+ }
+ codifyLines(ol,fd,text,line,column);
+}
+
+void ClangParser::linkIdentifier(OutputList &ol,FileDef *fd,
+ uint &line,uint &column,const char *text,int tokenIndex)
+{
+ CXCursor c = p->cursors[tokenIndex];
+ CXCursor r = clang_getCursorReferenced(c);
+ if (!clang_equalCursors(r, c))
+ {
+ c=r; // link to referenced location
+ }
+ CXCursor t = clang_getSpecializedCursorTemplate(c);
+ if (!clang_Cursor_isNull(t) && !clang_equalCursors(t,c))
+ {
+ c=t; // link to template
+ }
+ CXString usr = clang_getCursorUSR(c);
+ const char *usrStr = clang_getCString(usr);
+
+ Definition *d = usrStr ? Doxygen::clangUsrMap->find(usrStr) : 0;
+ //CXCursorKind kind = clang_getCursorKind(c);
+ //if (d==0)
+ //{
+ // printf("didn't find definition for '%s' usr='%s' kind=%d\n",
+ // text,usrStr,kind);
+ //}
+ //else
+ //{
+ // printf("found definition for '%s' usr='%s' name='%s'\n",
+ // text,usrStr,d->name().data());
+ //}
+ if (d && d->isLinkable())
+ {
+ writeMultiLineCodeLink(ol,
+ fd,line,column,
+ d->getReference(),
+ d->getOutputFileBase(),
+ d->anchor(),
+ text,
+ d->briefDescriptionAsTooltip()
+ );
+ }
+ else
+ {
+ codifyLines(ol,fd,text,line,column);
+ }
+ clang_disposeString(usr);
+}
+
+void ClangParser::writeSources(OutputList &ol,FileDef *fd)
+{
+ unsigned int line=1,column=1;
+ QCString lineNumber,lineAnchor;
+ ol.startCodeLine(TRUE);
+ writeLineNumber(ol,fd,line);
+ for (unsigned int i=0;i<p->numTokens;i++)
+ {
+ CXSourceLocation start = clang_getTokenLocation(p->tu, p->tokens[i]);
+ unsigned int l, c;
+ clang_getSpellingLocation(start, 0, &l, &c, 0);
+ if (l > line) column = 1;
+ while (line<l)
+ {
+ line++;
+ ol.endCodeLine();
+ ol.startCodeLine(TRUE);
+ writeLineNumber(ol,fd,line);
+ }
+ while (column<c) { ol.codify(" "); column++; }
+ CXString tokenString = clang_getTokenSpelling(p->tu, p->tokens[i]);
+ char const *s = clang_getCString(tokenString);
+ CXCursorKind cursorKind = clang_getCursorKind(p->cursors[i]);
+ CXTokenKind tokenKind = clang_getTokenKind(p->tokens[i]);
+ printf("%d:%d %s cursorKind=%d tokenKind=%d\n",line,column,s,cursorKind,tokenKind);
+ switch (tokenKind)
+ {
+ case CXToken_Keyword:
+ if (strcmp(s,"operator")==0)
+ {
+ linkIdentifier(ol,fd,line,column,s,i);
+ }
+ else
+ {
+ codifyLines(ol,fd,s,line,column,
+ cursorKind==CXCursor_PreprocessingDirective ? "preprocessor" :
+ keywordToType(s));
+ }
+ break;
+ case CXToken_Literal:
+ if (cursorKind==CXCursor_InclusionDirective)
+ {
+ linkInclude(ol,fd,line,column,s);
+ }
+ else if (s[0]=='"' || s[0]=='\'')
+ {
+ codifyLines(ol,fd,s,line,column,"stringliteral");
+ }
+ else
+ {
+ codifyLines(ol,fd,s,line,column);
+ }
+ break;
+ case CXToken_Comment:
+ codifyLines(ol,fd,s,line,column,"comment");
+ break;
+ //case CXToken_Punctuation: return "CXToken_Punctation";
+ //case CXToken_Identifier: return "CXToken_Indentifier";
+ default:
+ switch (cursorKind)
+ {
+ case CXCursor_PreprocessingDirective:
+ codifyLines(ol,fd,s,line,column,"preprocessor");
+ break;
+ case CXCursor_MacroDefinition:
+ codifyLines(ol,fd,s,line,column,"preprocessor");
+ break;
+ case CXCursor_InclusionDirective:
+ linkInclude(ol,fd,line,column,s);
+ break;
+ case CXCursor_MacroExpansion:
+ linkMacro(ol,fd,line,column,s);
+ break;
+ default:
+ if (tokenKind==CXToken_Identifier)
+ {
+ linkIdentifier(ol,fd,line,column,s,i);
+ }
+ else
+ {
+ codifyLines(ol,fd,s,line,column);
+ }
+ break;
+ }
+ }
+ clang_disposeString(tokenString);
+ }
+ ol.endCodeLine();
+}
+
+ClangParser::ClangParser()
+{
+ p = new Private;
+}
+
+ClangParser::~ClangParser()
+{
+ delete p;
+}
+
+//--------------------------------------------------------------------------
+#else // use stubbed functionality in case libclang support is disabled.
+
+void ClangParser::start(const char *)
+{
+}
+
+void ClangParser::finish()
+{
+}
+
+QCString ClangParser::lookup(uint,const char *)
+{
+ return "";
+}
+
+void ClangParser::writeSources(OutputList &,FileDef *)
+{
+}
+
+ClangParser::ClangParser()
+{
+}
+
+ClangParser::~ClangParser()
+{
+}
+
+
+#endif
+//--------------------------------------------------------------------------
+
diff --git a/src/clangparser.h b/src/clangparser.h
new file mode 100644
index 0000000..fc56b3a
--- /dev/null
+++ b/src/clangparser.h
@@ -0,0 +1,35 @@
+#ifndef CLANGPARSER_H
+#define CLANGPARSER_H
+
+#include <qcstring.h>
+
+class OutputList;
+class FileDef;
+
+class ClangParser
+{
+ public:
+ static ClangParser *instance();
+ void start(const char *fileName);
+ void finish();
+ QCString lookup(uint line,const char *symbol);
+ void writeSources(OutputList &ol,FileDef *fd);
+
+ private:
+ void linkIdentifier(OutputList &ol,FileDef *fd,
+ uint &line,uint &column,
+ const char *text,int tokenIndex);
+ void linkMacro(OutputList &ol,FileDef *fd,
+ uint &line,uint &column,
+ const char *text);
+ void linkInclude(OutputList &ol,FileDef *fd,
+ uint &line,uint &column,
+ const char *text);
+ class Private;
+ Private *p;
+ ClangParser();
+ virtual ~ClangParser();
+ static ClangParser *s_instance;
+};
+
+#endif
diff --git a/src/classdef.cpp b/src/classdef.cpp
index d9ee46d..bb29882 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -3503,8 +3503,9 @@ ClassDef *ClassDef::insertTemplateInstance(const QCString &fileName,
if (templateClass==0)
{
Debug::print(Debug::Classes,0," New template instance class `%s'`%s'\n",name().data(),templSpec.data());
+ QCString tcname = removeRedundantWhiteSpace(localName()+templSpec);
templateClass = new ClassDef(
- fileName,startLine,startColumn,localName()+templSpec,ClassDef::Class);
+ fileName,startLine,startColumn,tcname,ClassDef::Class);
templateClass->setTemplateMaster(this);
templateClass->setOuterScope(getOuterScope());
templateClass->setHidden(isHidden());
@@ -3525,7 +3526,8 @@ ClassDef *ClassDef::getVariableInstance(const char *templSpec)
if (templateClass==0)
{
Debug::print(Debug::Classes,0," New template variable instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec));
- templateClass = new ClassDef("<code>",1,1,name()+templSpec,
+ QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
+ templateClass = new ClassDef("<code>",1,1,tcname,
ClassDef::Class,0,0,FALSE);
templateClass->addMembersToTemplateInstance( this, templSpec );
templateClass->setTemplateMaster(this);
@@ -4164,13 +4166,13 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC
//static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (ml)
{
- ml->writeDeclarations(ol,this,0,0,0,title,subTitle,FALSE,showInline,inheritedFrom);
+ ml->writeDeclarations(ol,this,0,0,0,title,subTitle,definitionType(),FALSE,showInline,inheritedFrom);
if (lt2!=-1)
{
MemberList * ml2 = getMemberList((MemberListType)lt2);
if (ml2)
{
- ml2->writeDeclarations(ol,this,0,0,0,0,0,FALSE,showInline,inheritedFrom);
+ ml2->writeDeclarations(ol,this,0,0,0,0,0,definitionType(),FALSE,showInline,inheritedFrom);
}
}
}
@@ -4226,7 +4228,7 @@ void ClassDef::writePlainMemberDeclaration(OutputList &ol,
if (ml)
{
ml->setInGroup(inGroup);
- ml->writePlainDeclarations(ol,this,0,0,0,inheritedFrom,inheritId);
+ ml->writePlainDeclarations(ol,this,0,0,0,definitionType(),inheritedFrom,inheritId);
}
}
diff --git a/src/classdef.h b/src/classdef.h
index 19bf976..9db5cae 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -72,6 +72,7 @@ class ClassDef : public Definition
* \param startColumn column number where the definition of this compound
* starts.
* \param name the name of this compound (including scope)
+ * \param symId unique Id for this symbol
* \param ct the kind of Compound
* \param ref the tag file from which this compound is extracted
* or 0 if the compound doesn't come from a tag file
diff --git a/src/code.h b/src/code.h
index c2ed7e7..3825ac1 100644
--- a/src/code.h
+++ b/src/code.h
@@ -21,6 +21,8 @@
class CodeOutputInterface;
class FileDef;
class MemberDef;
+class QCString;
+class Definition;
void parseCCode(CodeOutputInterface &,const char *,const QCString &,
bool ,const char *,FileDef *fd,
diff --git a/src/code.l b/src/code.l
index 2269709..2026f0c 100644
--- a/src/code.l
+++ b/src/code.l
@@ -492,7 +492,6 @@ static void startCodeLine()
{
g_currentDefinition = d;
g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr);
- //printf("->startCodeLine(%s)=%p\n",d->name().data(),g_currentMemberDef);
g_insideBody = FALSE;
g_searchingForBody = TRUE;
g_realScope = d->name();
@@ -526,6 +525,7 @@ static void startCodeLine()
g_code->writeLineNumber(0,0,0,g_yyLineNr);
}
}
+ DBG_CTX((stderr,"startCodeLine(%d)\n",g_yyLineNr));
g_code->startCodeLine(g_sourceFileDef && g_lineNumbers);
if (g_currentFontClass)
{
@@ -539,6 +539,7 @@ static void startFontClass(const char *s);
static void endCodeLine()
{
+ DBG_CTX((stderr,"endCodeLine(%d)\n",g_yyLineNr));
endFontClass();
g_code->endCodeLine();
}
@@ -830,13 +831,12 @@ static void updateCallContextForSmartPointer()
}
}
-static const char* fileLocation()
+static QCString fileLocation()
{
- const int maxLen=4096;
- static char floc[maxLen+1];
- floc[maxLen]='\0';
- snprintf(floc,maxLen,"%s:%d:%d",g_sourceFileDef?g_sourceFileDef->absFilePath().data():"[unknown]",g_yyLineNr,g_yyColNr);
- return floc;
+ QCString result = g_sourceFileDef?g_sourceFileDef->absFilePath():QCString("[unknown]");
+ result+=":"+QCString().setNum(g_yyLineNr);
+ result+=":"+QCString().setNum(g_yyColNr);
+ return result;
}
static void addDocCrossReference(MemberDef *src,MemberDef *dst)
@@ -930,8 +930,6 @@ static bool getLinkInScope(const QCString &c, // scope
}
//printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
- ol.linkableSymbol(g_yyLineNr,md->name(),md,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,md->getReference(),
md->getOutputFileBase(),
md->anchor(),
@@ -1048,8 +1046,6 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
g_anchorCount++;
}
}
- ol.linkableSymbol(g_yyLineNr,cd->name(),cd,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),clName,cd->briefDescriptionAsTooltip());
addToSearchIndex(className);
g_theCallContext.setClass(cd);
@@ -1109,8 +1105,6 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
{
text=clName;
}
- ol.linkableSymbol(g_yyLineNr,md->name(),md,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),text,md->briefDescriptionAsTooltip());
addToSearchIndex(clName);
if (g_currentMemberDef)
@@ -1124,8 +1118,6 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
// nothing found, just write out the word
DBG_CTX((stderr,"not found!\n"));
- ol.linkableSymbol(g_yyLineNr,clName,0,
- g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(clName);
addToSearchIndex(clName);
}
@@ -1177,8 +1169,6 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
}
// write the actual link
- ol.linkableSymbol(g_yyLineNr,xmd->name(),xmd,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,xmd->getReference(),
xmd->getOutputFileBase(),xmd->anchor(),memName,xmd->briefDescriptionAsTooltip());
addToSearchIndex(memName);
@@ -1298,8 +1288,6 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
}
}
// nothing found -> write result as is
- ol.linkableSymbol(g_yyLineNr,memName,0,
- g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(memName);
addToSearchIndex(memName);
return;
@@ -1552,8 +1540,6 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
{
if (ctx->method && ctx->method->isLinkable())
{
- g_code->linkableSymbol(g_yyLineNr,ctx->method->name(),ctx->method,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code,
ctx->method->getReference(),
ctx->method->getOutputFileBase(),
@@ -1567,8 +1553,6 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
}
else
{
- g_code->linkableSymbol(g_yyLineNr,pName->data(),0,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
codifyLines(pName->data());
}
}
@@ -1640,8 +1624,6 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
}
else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
{
- g_code->linkableSymbol(g_yyLineNr,ctx->objectVar->name(),ctx->objectVar,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code,
ctx->objectVar->getReference(),
ctx->objectVar->getOutputFileBase(),
@@ -1659,8 +1641,6 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
) // object is class name
{
ClassDef *cd = ctx->objectType;
- g_code->linkableSymbol(g_yyLineNr,cd->name(),cd,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code,
cd->getReference(),
cd->getOutputFileBase(),
@@ -1675,8 +1655,6 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
if (cd && cd->isLinkable())
{
if (ctx->objectType==0) ctx->objectType=cd;
- g_code->linkableSymbol(g_yyLineNr,cd->name(),cd,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code,
cd->getReference(),
cd->getOutputFileBase(),
@@ -1686,8 +1664,6 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
}
else
{
- g_code->linkableSymbol(g_yyLineNr,pObject->data(),0,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
codifyLines(pObject->data());
}
}
@@ -1750,8 +1726,6 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
QCString *pWord = g_wordDict.find(refId);
if (pWord)
{
- g_code->linkableSymbol(g_yyLineNr,pWord->data(),0,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
codifyLines(pWord->data());
}
}
@@ -1831,7 +1805,7 @@ TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
-KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC})
+KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC})
FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"for"|"foreach"|"for each"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while"|"@try"|"@catch"|"@finally")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr")
CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast")
@@ -1986,8 +1960,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN(ObjCParams);
}
<ObjCParams>{ID} {
- g_code->linkableSymbol(g_yyLineNr,yytext,0,
- g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext);
g_parmName=yytext;
g_theVarContext.addVariable(g_parmType,g_parmName);
@@ -2682,8 +2654,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext))
{
- g_code->linkableSymbol(g_yyLineNr,yytext,0,
- g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext);
addToSearchIndex(yytext);
}
@@ -2691,8 +2661,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
else
{
- g_code->linkableSymbol(g_yyLineNr,yytext,0,
- g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext);
addToSearchIndex(yytext);
g_name.resize(0);
@@ -2714,8 +2682,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
DBG_CTX((stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getClass()));
if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext))
{
- g_code->linkableSymbol(g_yyLineNr,yytext,0,
- g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext);
addToSearchIndex(yytext);
}
@@ -3356,7 +3322,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (Config_getBool("STRIP_CODE_COMMENTS"))
{
g_yyLineNr++;
- nextCodeLine();
+ //nextCodeLine();
}
else
{
@@ -3645,6 +3611,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
if (g_needsTermination)
{
endFontClass();
+ DBG_CTX((stderr,"endCodeLine(%d)\n",g_yyLineNr));
g_code->endCodeLine();
}
if (cleanupSourceDef)
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 46b8938..97f5194 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -341,7 +341,8 @@ void replaceComment(int offset);
<Scan>\n { /* new line */
copyToOutput(yytext,(int)yyleng);
}
-<Scan>("//!"|"///"[/]*)/.*\n[ \t]*"//"[\/!][^\/] { /* start C++ style special comment block */
+<Scan>"//!"/.*\n[ \t]*"//"[\/!][^\/] | /* start C++ style special comment block */
+<Scan>("///"[/]*)/[^/].*\n[ \t]*"//"[\/!][^\/] { /* start C++ style special comment block */
if (g_mlBrief)
{
REJECT; // bail out if we do not need to convert
diff --git a/src/commentscan.l b/src/commentscan.l
index b851d81..9b2994a 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1188,11 +1188,23 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
{
// see bug 613024, we need to put the newlines after ending the XRef section.
setOutput(OutputDoc);
- addOutput("\n\n");
+ int i;
+ for (i=0;i<yyleng;)
+ {
+ if (yytext[i]=='\n') addOutput('\n'),i++;
+ else if (strcmp(yytext+i,"\\_linebr")==0) addOutput('\n'),i+=8;
+ else i++;
+ }
}
else if (inContext!=OutputBrief)
{
- addOutput("\n\n");
+ int i;
+ for (i=0;i<yyleng;)
+ {
+ if (yytext[i]=='\n') addOutput('\n'),i++;
+ else if (strcmp(yytext+i,"\\_linebr")==0) addOutput('\n'),i+=8;
+ else i++;
+ }
setOutput(OutputDoc);
}
else // inContext==OutputBrief
diff --git a/src/config.xml b/src/config.xml
index d7c2f18..53e47da 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -49,9 +49,9 @@ The default language is English, other supported languages are:
Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, Persian,
-Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian,
+Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic,
+Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
'>
<value name='Afrikaans'/>
<value name='Arabic'/>
@@ -262,10 +262,10 @@ can mix doxygen, HTML, and XML commands with Markdown formatting.
Disable only in case of backward compatibilities issues.
' defval='1'/>
<option type='bool' id='AUTOLINK_SUPPORT' docs='
-When enabled doxygen tries to link words that correspond to documented classes,
-or namespaces to their corresponding documentation. Such a link can be
-prevented in individual cases by by putting a % sign in front of the word or
-globally by setting AUTOLINK_SUPPORT to NO.
+When enabled doxygen tries to link words that correspond to documented
+classes, or namespaces to their corresponding documentation. Such a link can
+be prevented in individual cases by by putting a % sign in front of the word
+or globally by setting AUTOLINK_SUPPORT to NO.
' defval='1'/>
<option type='bool' id='BUILTIN_STL_SUPPORT' docs='
If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
@@ -736,8 +736,10 @@ invoke to filter for each input file. Doxygen will invoke the filter program
by executing (via popen()) the command &lt;filter&gt; &lt;input-file&gt;, where &lt;filter&gt;
is the value of the INPUT_FILTER tag, and &lt;input-file&gt; is the name of an
input file. Doxygen will then use the output that the filter program writes
-to standard output. If FILTER_PATTERNS is specified, this tag will be
-ignored.
+to standard output. If FILTER_PATTERNS is specified, this tag will be ignored.
+Note that the filter must not add or remove lines; it is applied before the
+code is scanned, but not when the output code is generated. If lines are added
+or removed, the anchors will not be placed correctly.
' defval=''/>
<option type='list' id='FILTER_PATTERNS' format='string' docs='
The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
@@ -762,9 +764,9 @@ FILTER_SOURCE_FILES is enabled.
' depends='FILTER_SOURCE_FILES'/>
<option type='string' id='USE_MDFILE_AS_MAINPAGE' format='string' docs='
If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
-is part of the input, its contents will be placed on the main page (index.html).
-This can be useful if you have a project on for instance GitHub and want reuse
-the introduction page also for the doxygen output.
+is part of the input, its contents will be placed on the main page
+(index.html). This can be useful if you have a project on for instance GitHub
+and want reuse the introduction page also for the doxygen output.
' defval=''/>
</group>
<group name='Source Browser' docs='configuration options related to source browsing'>
@@ -811,6 +813,18 @@ If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
will generate a verbatim copy of the header file for each class for
which an include is specified. Set to NO to disable this.
' defval='1'/>
+ <option type='bool' id='CLANG_ASSISTED_PARSING' setting='USE_LIBCLANG' docs='
+If CLANG_ASSISTED_PARSING is set to YES, then doxygen will use the clang parser
+for better parsing at the cost of reduced performance. This can be particularly
+helpful with template rich C++ code for which doxygen&apos;s built-in
+parser lacks the necessairy type information.
+' defval='0'/>
+ <option type='string' id='CLANG_OPTIONS' settings='USE_LIBCLANG' docs='
+If clang assisted parsing is enabled you can provide the compiler with command
+line options that you would normally use when invoking the compiler. Note that
+the include paths will be set by doxygen based on the files and directory
+specified at INPUT and INCLUDE_PATH.
+' defval='' depends='CLANG_ASSISTED_PARSING'/>
</group>
<group name='Index' docs='configuration options related to the alphabetical class index'>
<option type='bool' id='ALPHABETICAL_INDEX' docs='
@@ -1163,8 +1177,8 @@ script for searching. Instead the search results are written to an XML file
which needs to be processed by an external indexer. Doxygen will invoke an
external search engine pointed to by the SEARCHENGINE_URL option to obtain
the search results. Doxygen ships with an example indexer (doxyindexer) and
-search engine (doxysearch.cgi) which are based on the open source search engine
-library Xapian. See the manual for configuration details.
+search engine (doxysearch.cgi) which are based on the open source search
+engine library Xapian. See the manual for configuration details.
' defval='0' depends='SEARCHENGINE'/>
<option type='string' id='SEARCHENGINE_URL' docs='
The SEARCHENGINE_URL should point to a search engine hosted by a web server
diff --git a/src/configgen.py b/src/configgen.py
index 459ec4d..47c8eb6 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -29,11 +29,14 @@ def parseOption(node):
defval = node.getAttribute('defval')
adefval = node.getAttribute('altdefval')
depends = node.getAttribute('depends')
+ setting = node.getAttribute('setting')
# replace \ by \\, replace " by \", and ' ' by a newline with end string and start string at next line
docC = doc.strip().replace('\\','\\\\').replace('"','\\"').replace(' ','\\n"\n "')
+ if len(setting)>0:
+ print "#if %s" % (setting)
print " //----"
if type=='bool':
- if len(adefval)>0:
+ if len(adefval)>0:
enabled = adefval
elif defval=='1':
enabled = "TRUE"
@@ -94,6 +97,8 @@ def parseOption(node):
print " cl->setWidgetType(ConfigList::FileAndDir);"
elif type=='obsolete':
print " cfg->addObsolete(\"%s\");" % (name)
+ if len(setting)>0:
+ print "#endif"
@@ -121,6 +126,7 @@ def main():
print "#include \"configoptions.h\""
print "#include \"config.h\""
print "#include \"portable.h\""
+ print "#include \"settings.h\""
print ""
print "void addConfigOptions(Config *cfg)"
print "{"
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index e7ffbfe..e4eb361 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -6,6 +6,7 @@
#include "configoptions.h"
#include "config.h"
#include "portable.h"
+#include "settings.h"
void addConfigOptions(Config *cfg)
{
@@ -90,9 +91,9 @@ void addConfigOptions(Config *cfg)
"Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,\n"
"Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,\n"
"Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English\n"
- "messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, Persian,\n"
- "Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,\n"
- "Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.",
+ "messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian,\n"
+ "Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic,\n"
+ "Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.",
"English"
);
ce->addValue("Afrikaans");
@@ -366,10 +367,10 @@ void addConfigOptions(Config *cfg)
//----
cb = cfg->addBool(
"AUTOLINK_SUPPORT",
- "When enabled doxygen tries to link words that correspond to documented classes,\n"
- "or namespaces to their corresponding documentation. Such a link can be\n"
- "prevented in individual cases by by putting a % sign in front of the word or\n"
- "globally by setting AUTOLINK_SUPPORT to NO.",
+ "When enabled doxygen tries to link words that correspond to documented\n"
+ "classes, or namespaces to their corresponding documentation. Such a link can\n"
+ "be prevented in individual cases by by putting a % sign in front of the word\n"
+ "or globally by setting AUTOLINK_SUPPORT to NO.",
TRUE
);
//----
@@ -1033,8 +1034,10 @@ void addConfigOptions(Config *cfg)
"is the value of the INPUT_FILTER tag, and <input-file> is the name of an\n"
"input file. Doxygen will then use the output that the filter program writes\n"
"to standard output.\n"
- "If FILTER_PATTERNS is specified, this tag will be\n"
- "ignored."
+ "If FILTER_PATTERNS is specified, this tag will be ignored.\n"
+ "Note that the filter must not add or remove lines; it is applied before the\n"
+ "code is scanned, but not when the output code is generated. If lines are added\n"
+ "or removed, the anchors will not be placed correctly."
);
cs->setWidgetType(ConfigString::File);
//----
@@ -1071,9 +1074,9 @@ void addConfigOptions(Config *cfg)
cs = cfg->addString(
"USE_MDFILE_AS_MAINPAGE",
"If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that\n"
- "is part of the input, its contents will be placed on the main page (index.html).\n"
- "This can be useful if you have a project on for instance GitHub and want reuse\n"
- "the introduction page also for the doxygen output."
+ "is part of the input, its contents will be placed on the main page\n"
+ "(index.html). This can be useful if you have a project on for instance GitHub\n"
+ "and want reuse the introduction page also for the doxygen output."
);
//---------------------------------------------------------------------------
cfg->addInfo("Source Browser","configuration options related to source browsing");
@@ -1148,6 +1151,26 @@ void addConfigOptions(Config *cfg)
"which an include is specified. Set to NO to disable this.",
TRUE
);
+#if USE_LIBCLANG
+ //----
+ cb = cfg->addBool(
+ "CLANG_ASSISTED_PARSING",
+ "If CLANG_ASSISTED_PARSING is set to YES, then doxygen will use the clang parser\n"
+ "for better parsing at the cost of reduced performance. This can be particularly\n"
+ "helpful with template rich C++ code for which doxygen's built-in\n"
+ "parser lacks the necessairy type information.",
+ FALSE
+ );
+#endif
+ //----
+ cs = cfg->addString(
+ "CLANG_OPTIONS",
+ "If clang assisted parsing is enabled you can provide the compiler with command\n"
+ "line options that you would normally use when invoking the compiler. Note that\n"
+ "the include paths will be set by doxygen based on the files and directory\n"
+ "specified at INPUT and INCLUDE_PATH."
+ );
+ cs->addDependency("CLANG_ASSISTED_PARSING");
//---------------------------------------------------------------------------
cfg->addInfo("Index","configuration options related to the alphabetical class index");
//---------------------------------------------------------------------------
@@ -1698,8 +1721,8 @@ void addConfigOptions(Config *cfg)
"which needs to be processed by an external indexer. Doxygen will invoke an\n"
"external search engine pointed to by the SEARCHENGINE_URL option to obtain\n"
"the search results. Doxygen ships with an example indexer (doxyindexer) and\n"
- "search engine (doxysearch.cgi) which are based on the open source search engine\n"
- "library Xapian. See the manual for configuration details.",
+ "search engine (doxysearch.cgi) which are based on the open source search\n"
+ "engine library Xapian. See the manual for configuration details.",
FALSE
);
cb->addDependency("SEARCHENGINE");
diff --git a/src/definition.cpp b/src/definition.cpp
index e882225..83d4566 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -394,6 +394,16 @@ void Definition::setName(const char *name)
m_name = name;
}
+void Definition::setId(const char *id)
+{
+ if (id==0) return;
+ if (Doxygen::clangUsrMap)
+ {
+ //printf("Definition::setId '%s'->'%s'\n",id,m_name.data());
+ Doxygen::clangUsrMap->insert(id,this);
+ }
+}
+
void Definition::addSectionsToDefinition(QList<SectionInfo> *anchorList)
{
if (!anchorList) return;
@@ -798,12 +808,12 @@ bool readCodeFragment(const char *fileName,
}
// copy until end of line
result+=c;
+ startLine=lineNr;
if (c==':')
{
result+=cn;
if (cn=='\n') lineNr++;
}
- startLine=lineNr;
const int maxLineLength=4096;
char lineStr[maxLineLength];
do
@@ -852,6 +862,7 @@ bool readCodeFragment(const char *fileName,
}
}
result = transcodeCharacterStringToUTF8(result);
+ //fprintf(stderr,"readCodeFragement(%d-%d)=%s\n",startLine,endLine,result.data());
return found;
}
diff --git a/src/definition.h b/src/definition.h
index 285e889..32c733a 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -265,6 +265,9 @@ class Definition : public DefinitionIntf, public LockableObj
/*! Sets a new \a name for the definition */
void setName(const char *name);
+ /*! Sets a unique id for the symbol. Used for libclang integration. */
+ void setId(const char *name);
+
/*! Sets the documentation of this definition to \a d. */
virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
diff --git a/src/diagram.h b/src/diagram.h
index ec08e5e..62cab2e 100644
--- a/src/diagram.h
+++ b/src/diagram.h
@@ -19,6 +19,8 @@
#ifndef DIAGRAM_H
#define DIAGRAM_H
+#include <qglobal.h>
+
class ClassDef;
class TreeDiagram;
class FTextStream;
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index 722117e..335c8dc 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -276,9 +276,6 @@ class DocbookCodeGenerator : public CodeOutputInterface
if (extRef) m_external=extRef;
}
}
- void linkableSymbol(int, const char *,Definition *,Definition *)
- {
- }
void setCurrentDoc(Definition *,const char *,bool)
{
}
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index 3ff73db..8804a41 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -21,6 +21,7 @@
#include <qcstring.h>
#include <qlist.h>
+#include <stdio.h>
#include "htmlattrib.h"
class Definition;
diff --git a/src/dot.cpp b/src/dot.cpp
index 6a902c1..be0a32a 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -92,29 +92,37 @@ static const char svgZoomHeader[] =
;
static const char svgZoomFooter[] =
+// navigation panel
" <g id=\"navigator\" transform=\"translate(0 0)\" fill=\"#404254\">\n"
" <rect fill=\"#f2f5e9\" fill-opacity=\"0.5\" stroke=\"#606060\" stroke-width=\".5\" x=\"0\" y=\"0\" width=\"60\" height=\"60\"/>\n"
+// zoom in
" <use id=\"zoomplus\" xlink:href=\"#zoomPlus\" x=\"17\" y=\"9\" onmousedown=\"handleZoom(evt,'in')\"/>\n"
+// zoom out
" <use id=\"zoomminus\" xlink:href=\"#zoomMin\" x=\"42\" y=\"9\" onmousedown=\"handleZoom(evt,'out')\"/>\n"
+// reset zoom
" <use id=\"reset\" xlink:href=\"#resetDef\" x=\"30\" y=\"36\" onmousedown=\"handleReset()\"/>\n"
+// arrow up
" <g id=\"arrowUp\" xlink:href=\"#dirArrow\" transform=\"translate(30 24)\" onmousedown=\"handlePan(0,-1)\">\n"
" <use xlink:href=\"#rim\" fill=\"#404040\">\n"
" <set attributeName=\"fill\" to=\"#808080\" begin=\"arrowUp.mouseover\" end=\"arrowUp.mouseout\"/>\n"
" </use>\n"
" <path fill=\"none\" stroke=\"white\" stroke-width=\"1.5\" d=\"M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5\"/>\n"
" </g>\n"
+// arrow right
" <g id=\"arrowRight\" xlink:href=\"#dirArrow\" transform=\"rotate(90) translate(36 -43)\" onmousedown=\"handlePan(1,0)\">\n"
" <use xlink:href=\"#rim\" fill=\"#404040\">\n"
" <set attributeName=\"fill\" to=\"#808080\" begin=\"arrowRight.mouseover\" end=\"arrowRight.mouseout\"/>\n"
" </use>\n"
" <path fill=\"none\" stroke=\"white\" stroke-width=\"1.5\" d=\"M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5\"/>\n"
" </g>\n"
+// arrow down
" <g id=\"arrowDown\" xlink:href=\"#dirArrow\" transform=\"rotate(180) translate(-30 -48)\" onmousedown=\"handlePan(0,1)\">\n"
" <use xlink:href=\"#rim\" fill=\"#404040\">\n"
" <set attributeName=\"fill\" to=\"#808080\" begin=\"arrowDown.mouseover\" end=\"arrowDown.mouseout\"/>\n"
" </use>\n"
" <path fill=\"none\" stroke=\"white\" stroke-width=\"1.5\" d=\"M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5\"/>\n"
" </g>\n"
+// arrow left
" <g id=\"arrowLeft\" xlink:href=\"#dirArrow\" transform=\"rotate(270) translate(-36 17)\" onmousedown=\"handlePan(-1,0)\">\n"
" <use xlink:href=\"#rim\" fill=\"#404040\">\n"
" <set attributeName=\"fill\" to=\"#808080\" begin=\"arrowLeft.mouseover\" end=\"arrowLeft.mouseout\"/>\n"
@@ -122,15 +130,7 @@ static const char svgZoomFooter[] =
" <path fill=\"none\" stroke=\"white\" stroke-width=\"1.5\" d=\"M0,-3.0v7 M-2.5,-0.5L0,-3.0L2.5,-0.5\"/>\n"
" </g>\n"
" </g>\n"
-/*
-" <svg viewBox=\"0 0 25 25\" width=\"100%\" height=\"30px\" preserveAspectRatio=\"xMaxYMin meet\"> \n"
-" <g id=\"printButton\" transform=\"scale(0.4 0.4)\" onmousedown=\"handlePrint(evt)\">\n"
-" <rect height=\"23.33753581\" id=\"paper\" rx=\"2\" style=\"fill:#f2f5e9;fill-rule:evenodd;stroke:#111111;stroke-width:3.224;stroke-linejoin:round;\" transform=\"matrix(1.000000,0.000000,-0.339266,0.940691,0.000000,0.000000)\" width=\"25.55231285\" x=\"26.69387353\" y=\"7.36162977\"/>\n"
-" <rect height=\"26.272097\" id=\"body\" rx=\"2\" style=\"fill:#404040;fill-rule:evenodd;stroke:#111111;stroke-width:3.125;stroke-linejoin:round;\" width=\"50\" x=\"4.5295201\" y=\"27.078951\"/>\n"
-" <rect height=\"8.27750969\" id=\"tray\" style=\"fill:#d2d5c9;fill-rule:evenodd;stroke:#111111;stroke-width:3.125;stroke-linecap:round;stroke-linejoin:round;\" width=\"40\" x=\"10.28778839\" y=\"44.96812282\"/>\n"
-" </g>\n"
-" </svg>\n"
-*/
+// link to orginial SVG
" <svg viewBox=\"0 0 15 15\" width=\"100%\" height=\"30px\" preserveAspectRatio=\"xMaxYMin meet\">\n"
" <g id=\"arrow_out\" transform=\"scale(0.3 0.3)\">\n"
" <a xlink:href=\"$orgname\" target=\"_base\">\n"
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index cc4916f..4adc4fc 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -127,6 +127,7 @@ PageSDict *Doxygen::exampleSDict = 0;
SectionDict *Doxygen::sectionDict = 0; // all page sections
CiteDict *Doxygen::citeDict=0; // database of bibliographic references
StringDict Doxygen::aliasDict(257); // aliases
+QDict<void> Doxygen::inputPaths(1009);
FileNameDict *Doxygen::includeNameDict = 0; // include names
FileNameDict *Doxygen::exampleNameDict = 0; // examples
FileNameDict *Doxygen::imageNameDict = 0; // images
@@ -144,7 +145,8 @@ QDict<RefList> *Doxygen::xrefLists = new QDict<RefList>; // dictionary of cross
bool Doxygen::parseSourcesNeeded = FALSE;
QTime Doxygen::runningTime;
SearchIndexIntf *Doxygen::searchIndex=0;
-QDict<DefinitionIntf> *Doxygen::symbolMap;
+QDict<DefinitionIntf> *Doxygen::symbolMap = 0;
+QDict<Definition> *Doxygen::clangUsrMap = 0;
bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0;
QCache<LookupInfo> *Doxygen::lookupCache;
@@ -220,12 +222,20 @@ class Statistics
}
void print()
{
+ bool restore=FALSE;
+ if (Debug::isFlagSet(Debug::Time))
+ {
+ Debug::clearFlag("time");
+ restore=TRUE;
+ }
+ msg("----------------------\n");
QListIterator<stat> sli(stats);
stat *s;
for ( sli.toFirst(); (s=sli.current()); ++sli )
{
msg("Spent %.3f seconds in %s",s->elapsed,s->name);
}
+ if (restore) Debug::setFlag("time");
}
private:
struct stat
@@ -1257,13 +1267,14 @@ static void addClassToContext(EntryNav *rootNav)
tagName = rootNav->tagInfo()->tagName;
refFileName = rootNav->tagInfo()->fileName;
}
- cd=new ClassDef(root->fileName,root->startLine,root->startColumn,fullName,sec,
- tagName,refFileName,TRUE,root->spec&Entry::Enum);
+ cd=new ClassDef(root->fileName,root->startLine,root->startColumn,
+ fullName,sec,tagName,refFileName,TRUE,root->spec&Entry::Enum);
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
fullName.data(),sec,root->tArgLists ? (int)root->tArgLists->count() : -1);
cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->setLanguage(root->lang);
+ cd->setId(root->id);
cd->setHidden(root->hidden);
cd->setArtificial(root->artificial);
cd->setClassSpecifier(root->spec);
@@ -1286,7 +1297,6 @@ static void addClassToContext(EntryNav *rootNav)
//bool found=addNamespace(root,cd);
// the empty string test is needed for extract all case
- cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
cd->insertUsedFile(root->fileName);
// add class to the list
@@ -1713,6 +1723,7 @@ static void buildNamespaceList(EntryNav *rootNav)
nd->setHidden(root->hidden);
nd->setArtificial(root->artificial);
nd->setLanguage(root->lang);
+ nd->setId(root->id);
//printf("Adding namespace to group\n");
addNamespaceToGroups(root,nd);
@@ -1883,6 +1894,7 @@ static void findUsingDirectives(EntryNav *rootNav)
nd->setHidden(root->hidden);
nd->setArtificial(TRUE);
nd->setLanguage(root->lang);
+ nd->setId(root->id);
QListIterator<Grouping> gli(*root->groups);
Grouping *g;
@@ -1992,7 +2004,8 @@ static void findUsingDeclarations(EntryNav *rootNav)
name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
usingCd = new ClassDef(
"<using>",1,1,
- name,ClassDef::Class);
+ name,
+ ClassDef::Class);
Doxygen::hiddenClasses->append(root->name,usingCd);
usingCd->setArtificial(TRUE);
usingCd->setLanguage(root->lang);
@@ -2106,6 +2119,7 @@ static void findUsingDeclImports(EntryNav *rootNav)
newMd->setMemberGroupId(root->mGrpId);
newMd->setMemberSpecifiers(md->getMemberSpecifiers());
newMd->setLanguage(root->lang);
+ newMd->setId(root->id);
rootNav->releaseEntry();
}
@@ -2289,6 +2303,7 @@ static MemberDef *addVariableToClass(
md->setHidden(root->hidden);
md->setArtificial(root->artificial);
md->setLanguage(root->lang);
+ md->setId(root->id);
addMemberToGroups(root,md);
//if (root->mGrpId!=-1)
//{
@@ -2513,6 +2528,7 @@ static MemberDef *addVariableToFile(
md->setMemberGroupId(root->mGrpId);
md->setDefinition(def);
md->setLanguage(root->lang);
+ md->setId(root->id);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
md->setExplicitExternal(root->explicitExternal);
@@ -3053,6 +3069,7 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
md->setMemberGroupId(root->mGrpId);
md->setTypeConstraints(root->typeConstr);
md->setLanguage(root->lang);
+ md->setId(root->id);
md->setBodyDef(fd);
md->setFileDef(fd);
//md->setScopeTemplateArguments(root->tArgList);
@@ -3434,6 +3451,7 @@ static void buildFunctionList(EntryNav *rootNav)
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
+ md->setId(root->id);
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
md->setDocumentation(root->doc,root->docFile,root->docLine);
@@ -4026,8 +4044,10 @@ static void findUsedClassesForClass(EntryNav *rootNav,
if (usedCd==0)
{
usedCd = new ClassDef(
- masterCd->getDefFileName(),masterCd->getDefLine(),masterCd->getDefColumn(),
- usedName,ClassDef::Class);
+ masterCd->getDefFileName(),masterCd->getDefLine(),
+ masterCd->getDefColumn(),
+ usedName,
+ ClassDef::Class);
//printf("making %s a template argument!!!\n",usedCd->name().data());
usedCd->makeTemplateArgument();
usedCd->setUsedOnly(TRUE);
@@ -4076,7 +4096,8 @@ static void findUsedClassesForClass(EntryNav *rootNav,
}
Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", type.data());
usedCd = new ClassDef(
- masterCd->getDefFileName(),masterCd->getDefLine(),masterCd->getDefColumn(),
+ masterCd->getDefFileName(),masterCd->getDefLine(),
+ masterCd->getDefColumn(),
type,ClassDef::Class);
usedCd->setUsedOnly(TRUE);
usedCd->setLanguage(masterCd->getLanguage());
@@ -4598,7 +4619,8 @@ static bool findClassRelation(
if (baseClass==0)
{
baseClass=new ClassDef(root->fileName,root->startLine,root->startColumn,
- baseClassName,ClassDef::Class);
+ baseClassName,
+ ClassDef::Class);
Doxygen::hiddenClasses->append(baseClassName,baseClass);
if (isArtificial) baseClass->setArtificial(TRUE);
baseClass->setLanguage(root->lang);
@@ -4612,7 +4634,8 @@ static bool findClassRelation(
if (baseClass==0)
{
baseClass=new ClassDef(root->fileName,root->startLine,root->startColumn,
- baseClassName,ClassDef::Class);
+ baseClassName,
+ ClassDef::Class);
Doxygen::classSDict->append(baseClassName,baseClass);
if (isArtificial) baseClass->setArtificial(TRUE);
baseClass->setLanguage(root->lang);
@@ -6131,6 +6154,7 @@ static void findMember(EntryNav *rootNav,
//printf("new specialized member %s args=`%s'\n",md->name().data(),funcArgs.data());
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
+ md->setId(root->id);
md->setMemberClass(cd);
md->setTemplateSpecialization(TRUE);
md->setTypeConstraints(root->typeConstr);
@@ -6195,6 +6219,7 @@ static void findMember(EntryNav *rootNav,
mtype,tArgList,root->argList);
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
+ md->setId(root->id);
md->setTypeConstraints(root->typeConstr);
md->setMemberClass(cd);
md->setDefinition(funcDecl);
@@ -6408,6 +6433,7 @@ static void findMember(EntryNav *rootNav,
md->addSectionsToDefinition(root->anchors);
md->setMemberGroupId(root->mGrpId);
md->setLanguage(root->lang);
+ md->setId(root->id);
//md->setMemberDefTemplateArguments(root->mtArgList);
mn->append(md);
cd->insertMember(md);
@@ -6465,6 +6491,7 @@ localObjCMethod:
MemberType_Function,0,root->argList);
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
+ md->setId(root->id);
md->makeImplementationDetail();
md->setMemberClass(cd);
md->setDefinition(funcDecl);
@@ -6793,6 +6820,7 @@ static void findEnums(EntryNav *rootNav)
0,0);
md->setTagInfo(rootNav->tagInfo());
md->setLanguage(root->lang);
+ md->setId(root->id);
if (!isGlobal) md->setMemberClass(cd); else md->setFileDef(fd);
md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setBodyDef(rootNav->fileDef());
@@ -7006,6 +7034,7 @@ static void addEnumValuesToEnums(EntryNav *rootNav)
fmd->setOuterScope(md->getOuterScope());
fmd->setTagInfo(e->tagInfo());
fmd->setLanguage(root->lang);
+ fmd->setId(root->id);
fmd->setDocumentation(root->doc,root->docFile,root->docLine);
fmd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
fmd->addSectionsToDefinition(root->anchors);
@@ -8967,10 +8996,15 @@ int readDir(QFileInfo *fi,
StringDict *resultDict,
bool errorIfNotExist,
bool recursive,
- QDict<void> *killDict
+ QDict<void> *killDict,
+ QDict<void> *paths
)
{
QCString dirName = fi->absFilePath().utf8();
+ if (paths && paths->find(dirName)==0)
+ {
+ paths->insert(dirName,(void*)0x8);
+ }
if (fi->isSymLink())
{
dirName = resolveSymlink(dirName.data());
@@ -9046,7 +9080,7 @@ int readDir(QFileInfo *fi,
cfi->setFile(cfi->absFilePath());
totalSize+=readDir(cfi,fnList,fnDict,exclDict,
patList,exclPatList,resultList,resultDict,errorIfNotExist,
- recursive,killDict);
+ recursive,killDict,paths);
}
}
++it;
@@ -9070,7 +9104,8 @@ int readFileOrDirectory(const char *s,
StringDict *resultDict,
bool recursive,
bool errorIfNotExist,
- QDict<void> *killDict
+ QDict<void> *killDict,
+ QDict<void> *paths
)
{
//printf("killDict=%p count=%d\n",killDict,killDict->count());
@@ -9097,8 +9132,14 @@ int readFileOrDirectory(const char *s,
{
if (fi.isFile())
{
+ QCString dirPath = fi.dirPath(TRUE).utf8();
+ QCString filePath = fi.absFilePath().utf8();
+ if (paths && paths->find(dirPath))
+ {
+ paths->insert(dirPath,(void*)0x8);
+ }
//printf("killDict->find(%s)\n",fi.absFilePath().data());
- if (killDict==0 || killDict->find(fi.absFilePath().utf8())==0)
+ if (killDict==0 || killDict->find(filePath)==0)
{
totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input);
//fiList->inSort(new FileInfo(fi));
@@ -9106,7 +9147,7 @@ int readFileOrDirectory(const char *s,
//printf("New file %s\n",name.data());
if (fnDict)
{
- FileDef *fd=new FileDef(fi.dirPath(TRUE).utf8()+"/",name);
+ FileDef *fd=new FileDef(dirPath+"/",name);
FileName *fn=0;
if (!name.isEmpty() && (fn=(*fnDict)[name]))
{
@@ -9114,7 +9155,7 @@ int readFileOrDirectory(const char *s,
}
else
{
- fn = new FileName(fi.absFilePath().utf8(),name);
+ fn = new FileName(filePath,name);
fn->append(fd);
if (fnList) fnList->inSort(fn);
fnDict->insert(name,fn);
@@ -9123,9 +9164,9 @@ int readFileOrDirectory(const char *s,
QCString *rs=0;
if (resultList || resultDict)
{
- rs=new QCString(fi.absFilePath().utf8());
+ rs=new QCString(filePath);
if (resultList) resultList->append(rs);
- if (resultDict) resultDict->insert(fi.absFilePath().utf8(),rs);
+ if (resultDict) resultDict->insert(filePath,rs);
}
if (killDict) killDict->insert(fi.absFilePath().utf8(),(void *)0x8);
@@ -9135,7 +9176,7 @@ int readFileOrDirectory(const char *s,
{
totalSize+=readDir(&fi,fnList,fnDict,exclDict,patList,
exclPatList,resultList,resultDict,errorIfNotExist,
- recursive,killDict);
+ recursive,killDict,paths);
}
}
}
@@ -9381,8 +9422,6 @@ void initDoxygen()
setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
setlocale(LC_NUMERIC,"C");
- //Doxygen::symbolMap->setAutoDelete(TRUE);
-
Doxygen::runningTime.start();
initPreprocessor();
@@ -9402,7 +9441,10 @@ void initDoxygen()
initNamespaceMemberIndices();
initFileMemberIndices();
- Doxygen::symbolMap = new QDict<DefinitionIntf>(1000);
+ Doxygen::symbolMap = new QDict<DefinitionIntf>(50177);
+#ifdef USE_LIBCLANG
+ Doxygen::clangUsrMap = new QDict<Definition>(50177);
+#endif
Doxygen::inputNameList = new FileNameList;
Doxygen::inputNameList->setAutoDelete(TRUE);
Doxygen::memberNameSDict = new MemberNameSDict(10000);
@@ -9443,6 +9485,19 @@ void initDoxygen()
Doxygen::formulaNameDict = new FormulaDict(1009);
Doxygen::sectionDict = new SectionDict(257);
Doxygen::sectionDict->setAutoDelete(TRUE);
+
+ /**************************************************************************
+ * Initialize some global constants
+ **************************************************************************/
+
+ g_compoundKeywordDict.insert("template class",(void *)8);
+ g_compoundKeywordDict.insert("template struct",(void *)8);
+ g_compoundKeywordDict.insert("class",(void *)8);
+ g_compoundKeywordDict.insert("struct",(void *)8);
+ g_compoundKeywordDict.insert("union",(void *)8);
+ g_compoundKeywordDict.insert("interface",(void *)8);
+ g_compoundKeywordDict.insert("exception",(void *)8);
+
}
void cleanUpDoxygen()
@@ -10010,7 +10065,7 @@ static QCString getQchFileName()
+ QCString(".qch");
}
-void searchInputFiles(StringList &inputFiles)
+void searchInputFiles()
{
QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
bool alwaysRecursive = Config_getBool("RECURSIVE");
@@ -10105,7 +10160,7 @@ void searchInputFiles(StringList &inputFiles)
QDict<void> *killDict = new QDict<void>(10007);
int inputSize=0;
QStrList &inputList=Config_getList("INPUT");
- inputFiles.setAutoDelete(TRUE);
+ g_inputFiles.setAutoDelete(TRUE);
s=inputList.first();
while (s)
{
@@ -10121,10 +10176,11 @@ void searchInputFiles(StringList &inputFiles)
&excludeNameDict,
&Config_getList("FILE_PATTERNS"),
&exclPatterns,
- &inputFiles,0,
+ &g_inputFiles,0,
alwaysRecursive,
TRUE,
- killDict);
+ killDict,
+ &Doxygen::inputPaths);
s=inputList.next();
}
delete killDict;
@@ -10206,18 +10262,6 @@ void parseInput()
}
- /**************************************************************************
- * Initialize some global constants
- **************************************************************************/
-
- g_compoundKeywordDict.insert("template class",(void *)8);
- g_compoundKeywordDict.insert("template struct",(void *)8);
- g_compoundKeywordDict.insert("class",(void *)8);
- g_compoundKeywordDict.insert("struct",(void *)8);
- g_compoundKeywordDict.insert("union",(void *)8);
- g_compoundKeywordDict.insert("interface",(void *)8);
- g_compoundKeywordDict.insert("exception",(void *)8);
-
/**************************************************************************
* Check/create output directorties *
@@ -10312,14 +10356,14 @@ void parseInput()
// prevent search in the output directories
QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
- if (generateHtml) exclPatterns.append(htmlOutput);
- if (generateDocbook) exclPatterns.append(docbookOutput);
- if (generateXml) exclPatterns.append(xmlOutput);
- if (generateLatex) exclPatterns.append(latexOutput);
- if (generateRtf) exclPatterns.append(rtfOutput);
- if (generateMan) exclPatterns.append(manOutput);
+ if (generateHtml) exclPatterns.append(htmlOutput);
+ if (generateDocbook) exclPatterns.append(docbookOutput);
+ if (generateXml) exclPatterns.append(xmlOutput);
+ if (generateLatex) exclPatterns.append(latexOutput);
+ if (generateRtf) exclPatterns.append(rtfOutput);
+ if (generateMan) exclPatterns.append(manOutput);
- searchInputFiles(g_inputFiles);
+ searchInputFiles();
// Notice: the order of the function calls below is very important!
@@ -10756,19 +10800,7 @@ void generateOutput()
g_s.begin("Generating style sheet...\n");
//printf("writing style info\n");
- QCString genString =
- theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"));
g_outputList->writeStyleInfo(0); // write first part
- g_outputList->disableAllBut(OutputGenerator::Latex);
- g_outputList->parseText(genString);
- g_outputList->writeStyleInfo(1); // write second part
- //parseText(*g_outputList,theTranslator->trWrittenBy());
- g_outputList->writeStyleInfo(2); // write third part
- g_outputList->parseText(genString);
- g_outputList->writeStyleInfo(3); // write fourth part
- //parseText(*g_outputList,theTranslator->trWrittenBy());
- g_outputList->writeStyleInfo(4); // write last part
- g_outputList->enableAll();
g_s.end();
static bool searchEngine = Config_getBool("SEARCHENGINE");
@@ -11006,13 +11038,13 @@ void generateOutput()
msg("Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
}
- g_s.print();
if (Debug::isFlagSet(Debug::Time))
{
msg("Total elapsed time: %.3f seconds\n(of which %.3f seconds waiting for external tools to finish)\n",
((double)Doxygen::runningTime.elapsed())/1000.0,
portable_getSysElapsedTime()
);
+ g_s.print();
}
else
{
@@ -11033,6 +11065,7 @@ void generateOutput()
QTextCodec::deleteAllCodecs();
delete Doxygen::symbolCache;
delete Doxygen::symbolMap;
+ delete Doxygen::clangUsrMap;
delete Doxygen::symbolStorage;
g_successfulRun=TRUE;
}
diff --git a/src/doxygen.h b/src/doxygen.h
index 35c92ca..9e55f01 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -103,6 +103,7 @@ class Doxygen
static bool insideMainPage;
static FileNameDict *includeNameDict;
static FileNameDict *exampleNameDict;
+ static QDict<void> inputPaths;
static FileNameDict *inputNameDict;
static FileNameList *inputNameList;
static FileNameDict *imageNameDict;
@@ -130,6 +131,7 @@ class Doxygen
static QTime runningTime;
static SearchIndexIntf *searchIndex;
static QDict<DefinitionIntf> *symbolMap;
+ static QDict<Definition> *clangUsrMap;
static bool outputToWizard;
static QDict<int> *htmlDirMap;
static QCache<LookupInfo> *lookupCache;
@@ -161,6 +163,7 @@ void parseInput();
void generateOutput();
void readAliases();
void readFormulaRepository();
+void cleanUpDoxygen();
int readFileOrDirectory(const char *s,
FileNameList *fnList,
FileNameDict *fnDict,
@@ -171,7 +174,8 @@ int readFileOrDirectory(const char *s,
StringDict *resultDict,
bool recursive,
bool errorIfNotExist=TRUE,
- QDict<void> *killDict = 0
+ QDict<void> *killDict = 0,
+ QDict<void> *paths = 0
);
int readDir(QFileInfo *fi,
FileNameList *fnList,
diff --git a/src/doxygen.md b/src/doxygen.md
index 736c6c6..0cf222e 100644
--- a/src/doxygen.md
+++ b/src/doxygen.md
@@ -92,7 +92,7 @@ For doxygen specific concepts the following subclasses are available
- GroupDef: for storing grouping related data
- PageDef: for storing page related data
-Finally the data for members of classes, namespaces, and files is stored is
+Finally the data for members of classes, namespaces, and files is stored in
the subclass MemberDef.
Producing output
diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in
index e7b05dc..baa53ae 100644
--- a/src/doxygen.pro.in
+++ b/src/doxygen.pro.in
@@ -18,7 +18,7 @@ TEMPLATE = app.t
CONFIG = console warn_on $extraopts
HEADERS = doxygen.h
SOURCES = main.cpp
-unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread %%SQLITE3_LIBS%%
+unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%%
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
win32-msvc:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
@@ -26,7 +26,7 @@ win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL
-win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread %%SQLITE3_LIBS%% -Wl,--as-needed -lole32
+win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%% -Wl,--as-needed -lole32
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
INCLUDEPATH += ../qtools ../libmd5 .
DESTDIR = ../bin
diff --git a/src/entry.cpp b/src/entry.cpp
index afe4090..15263ab 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -133,6 +133,7 @@ Entry::Entry(const Entry &e)
hidden = e.hidden;
artificial = e.artificial;
groupDocType = e.groupDocType;
+ id = e.id;
m_parent = e.m_parent;
m_sublist = new QList<Entry>;
@@ -259,6 +260,7 @@ void Entry::reset()
subGrouping = TRUE;
protection = Public;
groupDocType = GROUPDOC_NORMAL;
+ id.resize(0);
m_sublist->clear();
extends->clear();
groups->clear();
diff --git a/src/entry.h b/src/entry.h
index 6471995..1c8abac 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -267,6 +267,7 @@ class Entry
bool hidden; //!< does this represent an entity that is hidden from the output
bool artificial; //!< Artificially introduced item
GroupDocType groupDocType;
+ QCString id; //!< libclang id
static int num; //!< counts the total number of entries
diff --git a/src/filedef.cpp b/src/filedef.cpp
index ae700e4..9c8e944 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -41,6 +41,8 @@
#include "membergroup.h"
#include "dirdef.h"
#include "config.h"
+#include "clangparser.h"
+#include "settings.h"
//---------------------------------------------------------------------------
@@ -794,7 +796,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
/*! Write a source listing of this file to the output */
void FileDef::writeSource(OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
QCString title = docname;
@@ -843,14 +845,29 @@ void FileDef::writeSource(OutputList &ol)
if (latexSourceCode) ol.enable(OutputGenerator::Latex);
}
- ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
- pIntf->resetCodeParserState();
- ol.startCodeFragment();
- pIntf->parseCode(ol,0,
- fileToString(absFilePath(),filterSourceFiles,TRUE),
- FALSE,0,this
- );
- ol.endCodeFragment();
+#if USE_LIBCLANG
+ static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ if (clangAssistedParsing &&
+ (getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC))
+ {
+ ol.startCodeFragment();
+ ClangParser::instance()->start(absFilePath());
+ ClangParser::instance()->writeSources(ol,this);
+ ClangParser::instance()->finish();
+ ol.endCodeFragment();
+ }
+ else
+#endif
+ {
+ ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
+ pIntf->resetCodeParserState();
+ ol.startCodeFragment();
+ pIntf->parseCode(ol,0,
+ fileToString(absFilePath(),filterSourceFiles,TRUE),
+ FALSE,0,this
+ );
+ ol.endCodeFragment();
+ }
ol.endContents();
endFileWithNavPath(this,ol);
ol.enableAll();
@@ -1659,7 +1676,7 @@ void FileDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCS
}
else
{
- ml->writeDeclarations(ol,0,0,this,0,title,0);
+ ml->writeDeclarations(ol,0,0,this,0,title,0,definitionType());
}
}
}
diff --git a/src/fortrancode.h b/src/fortrancode.h
index 7f59920..4b709c5 100644
--- a/src/fortrancode.h
+++ b/src/fortrancode.h
@@ -21,6 +21,8 @@
class CodeOutputInterface;
class FileDef;
class MemberDef;
+class QCString;
+class Definition;
void parseFortranCode(CodeOutputInterface &,const char *,const QCString &,
bool ,const char *,FileDef *fd,
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 54b33bf..206106f 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -368,16 +368,14 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
}
}
-static const char* fileLocation()
+static QCString fileLocation()
{
- const int maxLen=4096;
- static char floc[maxLen+1];
- floc[maxLen]='\0';
- snprintf(floc,maxLen,"%s:%d:%d",g_sourceFileDef?g_sourceFileDef->absFilePath().data():"[unknown]",g_yyLineNr,1);
- return floc;
+ QCString result = g_sourceFileDef?g_sourceFileDef->absFilePath():QCString("[unknown]");
+ result+=":"+QCString().setNum(g_yyLineNr);
+ result+=":"+QCString().setNum(1);
+ return result;
}
-
/**
generates dictionay entries that are used if REFERENCED_BY_RELATION ... options are set
(e.g. the "referenced by ..." list after the function documentation)
@@ -558,8 +556,6 @@ static bool getLink(UseSDict *usedict, // dictonary with used modules
{
addDocCrossReference(g_currentMemberDef,md);
}
- ol.linkableSymbol(g_yyLineNr,md->name(),md,
- g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,md->getReference(),
md->getOutputFileBase(),
md->anchor(),
@@ -588,7 +584,6 @@ static void generateLink(CodeOutputInterface &ol, char *lname)
}
else
{ // write type or interface link
- ol.linkableSymbol(g_yyLineNr, tmp, cd, g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),tmp);
addToSearchIndex(tmp.data());
}
@@ -601,7 +596,6 @@ static void generateLink(CodeOutputInterface &ol, char *lname)
else
{
// nothing found, just write out the word
- ol.linkableSymbol(g_yyLineNr, tmp, 0, g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
//startFontClass("charliteral"); //test
codifyLines(tmp);
//endFontClass(); //test
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index dcb5caa..8a2103d 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -893,11 +893,13 @@ protected {
pushBuffer(inputStringSemi);
}
+<Initialization,ArrayInitializer>"[" |
<Initialization,ArrayInitializer>"(/" { initializer+=yytext;
initializerArrayScope++;
BEGIN(ArrayInitializer); // initializer may contain comma
}
-<ArrayInitializer>"/)" { initializer+=yytext;
+<ArrayInitializer>"]" |
+<ArrayInitializer>"/)" { initializer+=yytext;
initializerArrayScope--;
if(initializerArrayScope<=0)
{
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 554a0e3..9938120 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -1465,7 +1465,7 @@ void GroupDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC
}
if (ml)
{
- ml->writeDeclarations(ol,0,0,0,this,title,0);
+ ml->writeDeclarations(ol,0,0,0,this,title,0,definitionType());
}
}
diff --git a/src/htmlattrib.h b/src/htmlattrib.h
index 6e9b62d..203fb48 100644
--- a/src/htmlattrib.h
+++ b/src/htmlattrib.h
@@ -15,6 +15,9 @@
#ifndef _HTMLATTRIB_H
#define _HTMLATTRIB_H
+#include <qcstring.h>
+#include <qlist.h>
+
/*! A Html option. A name, value pair */
struct HtmlAttrib
{
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index f19f5d6..df95ede 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1278,7 +1278,7 @@ void HtmlCodeGenerator::codify(const char *str)
m_t << "\\";
m_col++;
break;
- default: m_t << c;
+ default: p=writeUtf8Char(m_t,p-1);
m_col++;
break;
}
@@ -1403,11 +1403,6 @@ void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
if (m_streamSet) m_t << "<a name=\"" << anchor << "\"></a>";
}
-void HtmlCodeGenerator::linkableSymbol(int,const char *,Definition *,Definition *)
-{
-}
-
-
//--------------------------------------------------------------------------
HtmlGenerator::HtmlGenerator() : OutputGenerator()
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 0328a9c..1968f38 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -47,7 +47,6 @@ class HtmlCodeGenerator : public CodeOutputInterface
void startFontClass(const char *s);
void endFontClass();
void writeCodeAnchor(const char *anchor);
- void linkableSymbol(int,const char *,Definition *,Definition *);
void setCurrentDoc(Definition *,const char *,bool) {}
void addWord(const char *,bool) {}
@@ -109,9 +108,6 @@ class HtmlGenerator : public OutputGenerator
{ m_codeGen.endFontClass(); }
void writeCodeAnchor(const char *anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
- void linkableSymbol(int line,const char *symName,
- Definition *symDef,Definition *context)
- { m_codeGen.linkableSymbol(line,symName,symDef,context); }
// ---------------------------
void setCurrentDoc(Definition *context,const char *anchor,bool isSourceFile);
diff --git a/src/htmlhelp.h b/src/htmlhelp.h
index 8ccbf28..85e46e0 100644
--- a/src/htmlhelp.h
+++ b/src/htmlhelp.h
@@ -22,6 +22,7 @@
#define HTMLHELP_H
#include <qstrlist.h>
+#include <qdict.h>
#include "index.h"
#include "ftextstream.h"
diff --git a/src/language.cpp b/src/language.cpp
index 2d24ed8..ab69cf2 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -339,7 +339,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_UA
else if (L_EQUAL("ukrainian"))
{
- theTranslator=new TranslatorDecoder(new TranslatorUkrainian);
+ theTranslator=new TranslatorUkrainian;
}
#endif
#ifdef LANG_GR
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 18b4385..ce20e0d 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -15,6 +15,7 @@
* input used in their production; they are not affected by this license.
*
*/
+#include "htmlattrib.h"
#include <qfileinfo.h>
#include "latexdocvisitor.h"
#include "docparser.h"
@@ -26,7 +27,6 @@
#include "message.h"
#include "parserintf.h"
#include "msc.h"
-#include "htmlattrib.h"
#include "cite.h"
#include "filedef.h"
#include "config.h"
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index e06a3a2..593ca69 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -128,7 +128,9 @@ static void writeLatexMakefile()
<< "\t echo \"Rerunning latex....\" ;\\" << endl
<< "\t " << latex_command << " refman.tex ;\\" << endl
<< "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
- << "\t done" << endl << endl
+ << "\t done" << endl
+ << "\t" << mkidx_command << " refman.idx" << endl
+ << "\t" << latex_command << " refman.tex" << endl << endl
<< "refman_2on1.ps: refman.ps" << endl
<< "\tpsnup -2 refman.ps >refman_2on1.ps" << endl
<< endl
@@ -154,7 +156,9 @@ static void writeLatexMakefile()
<< "\t echo \"Rerunning latex....\" ;\\" << endl
<< "\t pdflatex refman ;\\" << endl
<< "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
- << "\t done" << endl << endl;
+ << "\t done" << endl
+ << "\t" << mkidx_command << " refman.idx" << endl
+ << "\tpdflatex refman" << endl << endl;
}
t << endl
@@ -204,6 +208,8 @@ static void writeMakeBat()
t << "goto :repeat\n";
t << ":skip\n";
t << "endlocal\n";
+ t << mkidx_command << " refman.idx\n";
+ t << latex_command << " refman.tex\n";
t << "dvips -o refman.ps refman.dvi\n";
t << "gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
"-sOutputFile=refman.pdf -c save pop -f refman.ps\n";
@@ -234,6 +240,8 @@ static void writeMakeBat()
t << "goto :repeat\n";
t << ":skip\n";
t << "endlocal\n";
+ t << mkidx_command << " refman.idx\n";
+ t << "pdflatex refman\n";
}
#endif
}
@@ -259,287 +267,287 @@ static void writeDefaultHeaderPart1(FTextStream &t)
{
// part 1
+ // Handle batch mode
+ if (Config_getBool("LATEX_BATCHMODE"))
+ t << "\\batchmode\n";
+
+ // Set document class depending on configuration
+ QCString documentClass;
+ if (Config_getBool("COMPACT_LATEX"))
+ documentClass = "article";
+ else
+ documentClass = "book";
+ t << "\\documentclass[twoside]{" << documentClass << "}\n"
+ "\n";
+
+ // Load required packages
+ t << "% Packages required by doxygen\n"
+ "\\usepackage{calc}\n"
+ "\\usepackage{doxygen}\n"
+ "\\usepackage{graphicx}\n"
+ "\\usepackage[utf8]{inputenc}\n"
+ "\\usepackage{makeidx}\n"
+ "\\usepackage{multicol}\n"
+ "\\usepackage{multirow}\n"
+ "\\usepackage{textcomp}\n"
+ "\\usepackage[table]{xcolor}\n"
+ "\n";
+
+ // Language support
+ QCString languageSupport = theTranslator->latexLanguageSupportCommand();
+ if (!languageSupport.isEmpty())
+ {
+ t << "% NLS support packages\n"
+ << languageSupport
+ << "\n";
+ }
+
+ // Define default fonts
+ t << "% Font selection\n"
+ "\\usepackage[T1]{fontenc}\n"
+ "\\usepackage{mathptmx}\n"
+ "\\usepackage[scaled=.90]{helvet}\n"
+ "\\usepackage{courier}\n"
+ "\\usepackage{amssymb}\n"
+ "\\usepackage{sectsty}\n"
+ "\\renewcommand{\\familydefault}{\\sfdefault}\n"
+ "\\allsectionsfont{%\n"
+ " \\fontseries{bc}\\selectfont%\n"
+ " \\color{darkgray}%\n"
+ "}\n"
+ "\\renewcommand{\\DoxyLabelFont}{%\n"
+ " \\fontseries{bc}\\selectfont%\n"
+ " \\color{darkgray}%\n"
+ "}\n"
+ "\n";
+
+ // Define page & text layout
QCString paperName;
- if (Config_getBool("LATEX_BATCHMODE")) t << "\\batchmode" << endl;
QCString &paperType=Config_getEnum("PAPER_TYPE");
- if (paperType=="a4wide")
- paperName="a4";
- else
+ // "a4wide" package is obsolete (see bug 563698)
+ if (paperType=="a4wide")
+ paperName="a4";
+ else
paperName=paperType;
- t << "\\documentclass";
- //"[" << paperName << "paper";
- //t << "]";
- t << "{";
- if (Config_getBool("COMPACT_LATEX")) t << "article"; else t << "book";
- t << "}\n";
- // the next package is obsolete (see bug 563698)
- //if (paperType=="a4wide") t << "\\usepackage{a4wide}\n";
- t <<
- "\\usepackage["<<paperName<<"paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}\n"
- "\\usepackage{makeidx}\n"
- "\\usepackage{natbib}\n"
- "\\usepackage{graphicx}\n"
- "\\usepackage{multicol}\n"
- "\\usepackage{float}\n"
- "\\usepackage{listings}\n"
- "\\usepackage{color}\n"
- "\\usepackage{ifthen}\n"
- "\\usepackage[table]{xcolor}\n"
- "\\usepackage{textcomp}\n"
- "\\usepackage{alltt}\n"
- //"\\usepackage{ae,aecompl,aeguill}\n"
- ;
- //if (Config_getBool("USE_PDFLATEX"))
- //{
- // t << "\\usepackage{times}" << endl;
- //}
- if (Config_getBool("PDF_HYPERLINKS"))
- {
- t << "\\usepackage{ifpdf}" << endl
- << "\\ifpdf" << endl
- << "\\usepackage[pdftex," << endl
- << " pagebackref=true," << endl
- << " colorlinks=true," << endl
- << " linkcolor=blue," << endl
- << " unicode" << endl
- << " ]{hyperref}" << endl
- << "\\else" << endl
- << "\\usepackage[ps2pdf," << endl
- << " pagebackref=true," << endl
- << " colorlinks=true," << endl
- << " linkcolor=blue," << endl
- << " unicode" << endl
- << " ]{hyperref}" << endl
- << "\\usepackage{pspicture}" << endl
- << "\\fi" << endl;
- }
- // Try to get the command for switching on the language
- // support
- t << "\\usepackage[utf8]{inputenc}" << endl;
- QCString sLanguageSupportCommand(
- theTranslator->latexLanguageSupportCommand());
-
- if (!sLanguageSupportCommand.isEmpty())
- {
- // The command is not empty. Put it to the output.
- // if the command is empty, no output is needed.
- t << sLanguageSupportCommand << endl;
- }
- t << "\\usepackage{mathptmx}\n";
- t << "\\usepackage[scaled=.90]{helvet}\n";
- t << "\\usepackage{courier}\n";
- t << "\\usepackage{sectsty}\n";
- t << "\\usepackage{amssymb}\n";
- t << "\\usepackage[titles]{tocloft}\n";
- t << "\\usepackage{doxygen}\n";
-
- // define option for listings
- t << "\\lstset{language=C++,"
- "inputencoding=utf8,"
- "basicstyle=\\footnotesize,"
- "breaklines=true,"
- "breakatwhitespace=true,"
- "tabsize=" << Config_getInt("TAB_SIZE") <<","
- "numbers=left }" << endl;
-
+ t << "% Page & text layout\n"
+ "\\usepackage{geometry}\n"
+ "\\geometry{%\n"
+ " " << paperName << "paper,%\n"
+ " top=2.5cm,%\n"
+ " bottom=2.5cm,%\n"
+ " left=2.5cm,%\n"
+ " right=2.5cm%\n"
+ "}\n";
+ // \sloppy is obsolete (see bug 563698)
+ // Allow a bit of overflow to go unnoticed by other means
+ t << "\\tolerance=750\n"
+ "\\hfuzz=15pt\n"
+ "\\hbadness=750\n"
+ "\\setlength{\\emergencystretch}{15pt}\n"
+ "\\setlength{\\parindent}{0cm}\n"
+ "\\setlength{\\parskip}{0.2cm}\n";
+ // Redefine paragraph/subparagraph environments, using sectsty fonts
+ t << "\\makeatletter\n"
+ "\\renewcommand{\\paragraph}{%\n"
+ " \\@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%\n"
+ " \\normalfont\\normalsize\\bfseries\\SS@parafont%\n"
+ " }%\n"
+ "}\n"
+ "\\renewcommand{\\subparagraph}{%\n"
+ " \\@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%\n"
+ " \\normalfont\\normalsize\\bfseries\\SS@subparafont%\n"
+ " }%\n"
+ "}\n"
+ "\\makeatother\n"
+ "\n";
+
+ // Headers & footers
+ QCString genString =
+ theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"));
+ t << "% Headers & footers\n"
+ "\\usepackage{fancyhdr}\n"
+ "\\pagestyle{fancyplain}\n"
+ "\\fancyhead[LE]{\\fancyplain{}{\\bfseries\\thepage}}\n"
+ "\\fancyhead[CE]{\\fancyplain{}{}}\n"
+ "\\fancyhead[RE]{\\fancyplain{}{\\bfseries\\leftmark}}\n"
+ "\\fancyhead[LO]{\\fancyplain{}{\\bfseries\\rightmark}}\n"
+ "\\fancyhead[CO]{\\fancyplain{}{}}\n"
+ "\\fancyhead[RO]{\\fancyplain{}{\\bfseries\\thepage}}\n"
+ "\\fancyfoot[LE]{\\fancyplain{}{}}\n"
+ "\\fancyfoot[CE]{\\fancyplain{}{}}\n"
+ "\\fancyfoot[RE]{\\fancyplain{}{\\bfseries\\scriptsize " << genString << " Doxygen }}\n"
+ "\\fancyfoot[LO]{\\fancyplain{}{\\bfseries\\scriptsize " << genString << " Doxygen }}\n"
+ "\\fancyfoot[CO]{\\fancyplain{}{}}\n"
+ "\\fancyfoot[RO]{\\fancyplain{}{}}\n"
+ "\\renewcommand{\\footrulewidth}{0.4pt}\n";
+ if (!Config_getBool("COMPACT_LATEX"))
+ {
+ t << "\\renewcommand{\\chaptermark}[1]{%\n"
+ " \\markboth{#1}{}%\n"
+ "}\n";
+ }
+ t << "\\renewcommand{\\sectionmark}[1]{%\n"
+ " \\markright{\\thesection\\ #1}%\n"
+ "}\n"
+ "\n";
+
+ // ToC, LoF, LoT, bibliography, and index
+ t << "% Indices & bibliography\n"
+ "\\usepackage{natbib}\n"
+ "\\usepackage[titles]{tocloft}\n"
+ "\\setcounter{tocdepth}{3}\n"
+ "\\setcounter{secnumdepth}{5}\n"
+ "\\makeindex\n"
+ "\n";
+
+ // User-specified packages
QStrList &extraPackages = Config_getList("EXTRA_PACKAGES");
- const char *s=extraPackages.first();
- while (s)
- {
- t << "\\usepackage{" << s << "}\n";
- s=extraPackages.next();
- }
- t << "\\makeindex\n"
- "\\setcounter{tocdepth}{3}\n"
- "\\renewcommand{\\footrulewidth}{0.4pt}\n"
- "\\renewcommand{\\familydefault}{\\sfdefault}\n"
- "\\hfuzz=15pt\n" // allow a bit of overflow to go unnoticed
- "\\setlength{\\emergencystretch}{15pt}\n"
- "\\hbadness=750\n"
- "\\tolerance=750\n"
- "\\begin{document}\n";
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ if (!extraPackages.isEmpty()) {
+ t << "% Packages requested by user\n";
+ const char *pkgName=extraPackages.first();
+ while (pkgName)
+ {
+ t << "\\usepackage{" << pkgName << "}\n";
+ pkgName=extraPackages.next();
+ }
+ t << "\n";
+ }
+
+ // Hyperlinks
+ bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ if (pdfHyperlinks)
+ {
+ t << "% Hyperlinks (required, but should be loaded last)\n"
+ "\\usepackage{ifpdf}\n"
+ "\\ifpdf\n"
+ " \\usepackage[pdftex,pagebackref=true]{hyperref}\n"
+ "\\else\n"
+ " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
+ "\\fi\n"
+ "\\hypersetup{%\n"
+ " colorlinks=true,%\n"
+ " linkcolor=blue,%\n"
+ " citecolor=blue,%\n"
+ " unicode%\n"
+ "}\n"
+ "\n";
+ }
+
+ // Custom commands used by the header
+ t << "% Custom commands\n"
+ "\\newcommand{\\clearemptydoublepage}{%\n"
+ " \\newpage{\\pagestyle{empty}\\cleardoublepage}%\n"
+ "}\n"
+ "\n"
+ "\n";
+
+ // End of preamble, now comes the document contents
+ t << "%===== C O N T E N T S =====\n"
+ "\n"
+ "\\begin{document}\n";
+ if (theTranslator->idLanguage()=="greek")
+ t << "\\selectlanguage{greek}\n";
+ t << "\n";
+
+ // Front matter
+ t << "% Titlepage & ToC\n";
+ bool usePDFLatex = Config_getBool("USE_PDFLATEX");
if (pdfHyperlinks && usePDFLatex)
{
- // to avoid duplicate page anchors due to reuse of same numbers for
+ // To avoid duplicate page anchors due to reuse of same numbers for
// the index (be it as roman numbers)
- t << "\\hypersetup{pageanchor=false,citecolor=blue}" << endl;
+ t << "\\hypersetup{pageanchor=false}\n";
}
- if (theTranslator->idLanguage()=="greek") t << "\\selectlanguage{greek}\n";
- t << "\\begin{titlepage}\n"
- "\\vspace*{7cm}\n"
- "\\begin{center}\n"
- "{\\Large ";
-
+ t << "\\pagenumbering{roman}\n"
+ "\\begin{titlepage}\n"
+ "\\vspace*{7cm}\n"
+ "\\begin{center}%\n"
+ "{\\Large ";
}
static void writeDefaultHeaderPart2(FTextStream &t)
{
// part 2
- t << "}\\\\" << endl
- << "\\vspace*{1cm}" << endl
- << "{\\large ";
+ // Finalize project name
+ t << "}\\\\\n"
+ "\\vspace*{1cm}\n"
+ "{\\large ";
}
static void writeDefaultHeaderPart3(FTextStream &t)
{
// part 3
- t << " Doxygen " << versionString << "}\\\\" << endl
- << "\\vspace*{0.5cm}" << endl
- << "{\\small " << dateToString(TRUE) << "}\\\\" << endl
- << "\\end{center}" << endl
- << "\\end{titlepage}" << endl;
- if (!Config_getBool("COMPACT_LATEX")) t << "\\clearemptydoublepage\n";
- t << "\\pagenumbering{roman}\n";
+ // Finalize project number
+ t << " Doxygen " << versionString << "}\\\\\n"
+ "\\vspace*{0.5cm}\n"
+ "{\\small " << dateToString(TRUE) << "}\\\\\n"
+ "\\end{center}\n"
+ "\\end{titlepage}\n";
+ bool compactLatex = Config_getBool("COMPACT_LATEX");
+ if (!compactLatex)
+ t << "\\clearemptydoublepage\n";
+
+ // ToC
t << "\\tableofcontents\n";
- if (!Config_getBool("COMPACT_LATEX")) t << "\\clearemptydoublepage\n";
+ if (!compactLatex)
+ t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{arabic}\n";
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ bool usePDFLatex = Config_getBool("USE_PDFLATEX");
if (pdfHyperlinks && usePDFLatex)
{
- t << "\\hypersetup{pageanchor=true,citecolor=blue}" << endl;
+ // re-enable anchors again
+ t << "\\hypersetup{pageanchor=true}\n";
}
+ t << "\n"
+ "%--- Begin generated contents ---\n";
}
-static void writeDefaultStyleSheetPart1(FTextStream &t)
+static void writeDefaultStyleSheet(FTextStream &t)
{
// part 1
t << "\\NeedsTeXFormat{LaTeX2e}\n"
- "\\ProvidesPackage{doxygen}\n\n";
+ "\\ProvidesPackage{doxygen}\n"
+ "\n";
t << "% Packages used by this style file\n"
"\\RequirePackage{alltt}\n"
"\\RequirePackage{array}\n"
"\\RequirePackage{calc}\n"
- "\\RequirePackage{color}\n"
- "\\RequirePackage{fancyhdr}\n"
+ "\\RequirePackage{float}\n"
+ "\\RequirePackage{ifthen}\n"
"\\RequirePackage{longtable}\n"
"\\RequirePackage{verbatim}\n"
- "\\RequirePackage{ifthen}\n"
+ "\\RequirePackage[table]{xcolor}\n"
"\\RequirePackage{xtab}\n"
- "\\RequirePackage{multirow}\n"
- "\\RequirePackage[table]{xcolor}\n\n";
-
- t << "% Use helvetica font instead of times roman\n"
- "\\RequirePackage{helvet}\n"
- "\\RequirePackage{sectsty}\n"
- "\\RequirePackage{tocloft}\n"
-// "\\allsectionsfont{\\usefont{OT1}{phv}{bc}{n}\\selectfont}\n"
-// "\\providecommand{\\cftchapfont}{%\n"
-// " \\fontsize{11}{13}\\usefont{OT1}{phv}{bc}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftchappagefont}{%\n"
-// " \\fontsize{11}{13}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftsecfont}{%\n"
-// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftsecpagefont}{%\n"
-// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftsubsecfont}{%\n"
-// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftsubsecpagefont}{%\n"
-// " \\fontsize{10}{12}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftsubsubsecfont}{%\n"
-// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftsubsubsecpagefont}{%\n"
-// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftparafont}{%\n"
-// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cftparapagefont}{%\n"
-// " \\fontsize{9}{11}\\usefont{OT1}{phv}{c}{n}\\selectfont\n"
-// "}\n"
-// "\\providecommand{\\cfttoctitlefont}{%\n"
-// " \\fontsize{20}{22}\\usefont{OT1}{phv}{b}{n}\\selectfont\n"
-// "}\n"
- "\\providecommand{\\rmdefault}{phv}\n"
- "\\providecommand{\\bfdefault}{bc}\n"
- "\n\n";
-
- t << "% Setup fancy headings\n"
- "\\pagestyle{fancyplain}\n"
- "\\newcommand{\\clearemptydoublepage}{%\n"
- " \\newpage{\\pagestyle{empty}\\cleardoublepage}%\n"
- "}\n";
- if (!Config_getBool("COMPACT_LATEX"))
- t << "\\renewcommand{\\chaptermark}[1]{%\n"
- " \\markboth{#1}{}%\n"
- "}\n";
- t << "\\renewcommand{\\sectionmark}[1]{%\n"
- " \\markright{\\thesection\\ #1}%\n"
- "}\n";
-
- //t << "\\lhead[\\fancyplain{}{\\bfseries\\thepage}]{%\n"
- // " \\fancyplain{}{\\bfseries\\rightmark}%\n"
- // "}\n";
- //t << "\\rhead[\\fancyplain{}{\\bfseries\\leftmark}]{%\n"
- // " \\fancyplain{}{\\bfseries\\thepage}%\n"
- // "}\n";
- //t << "\\rfoot[\\fancyplain{}{\\bfseries\\scriptsize%\n ";
- t << "\\fancyhead[LE]{\\fancyplain{}{\\bfseries\\thepage}}\n";
- t << "\\fancyhead[CE]{\\fancyplain{}{}}\n";
- t << "\\fancyhead[RE]{\\fancyplain{}{\\bfseries\\leftmark}}\n";
- t << "\\fancyhead[LO]{\\fancyplain{}{\\bfseries\\rightmark}}\n";
- t << "\\fancyhead[CO]{\\fancyplain{}{}}\n";
- t << "\\fancyhead[RO]{\\fancyplain{}{\\bfseries\\thepage}}\n";
-
- t << "\\fancyfoot[LE]{\\fancyplain{}{}}\n";
- t << "\\fancyfoot[CE]{\\fancyplain{}{}}\n";
- t << "\\fancyfoot[RE]{\\fancyplain{}{\\bfseries\\scriptsize ";
-}
-
-static void writeDefaultStyleSheetPart2(FTextStream &t)
-{
- t << "}}\n";
- t << "\\fancyfoot[LO]{\\fancyplain{}{\\bfseries\\scriptsize ";
- //t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize%\n ";
-
-}
-
-static void writeDefaultStyleSheetPart3(FTextStream &t)
-{
- //static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
- t << "}}\n";
- //t << "\\cfoot{}\n\n";
- t << "\\fancyfoot[CO]{\\fancyplain{}{}}\n";
- t << "\\fancyfoot[RO]{\\fancyplain{}{}}\n";
-
- t << "%---------- Internal commands used in this style file ----------------\n\n";
-
- t << "\\newcommand\\tabfill[1]{%\n";
- t << " \\dimen@\\linewidth%\n";
- t << " \\advance\\dimen@\\@totalleftmargin%\n";
- t << " \\advance\\dimen@-\\dimen\\@curtab%\n";
- t << " \\parbox[t]\\dimen@{\\raggedright #1\\ifhmode\\strut\\fi}%\n";
- t << "}\n\n";
-
- t << "\\newcommand{\\ensurespace}[1]{%\n";
- t << " \\begingroup\n";
- t << " \\setlength{\\dimen@}{#1}%\n";
- t << " \\vskip\\z@\\@plus\\dimen@\n";
- t << " \\penalty -100\\vskip\\z@\\@plus -\\dimen@\n";
- t << " \\vskip\\dimen@\n";
- t << " \\penalty 9999%\n";
- t << " \\vskip -\\dimen@\n";
- t << " \\vskip\\z@skip % hide the previous |\\vskip| from |\\addvspace|\n";
- t << " \\endgroup\n";
- t << "}\n\n";
-
- t << "% Generic environment used by all paragraph-based environments defined\n"
- "% below. Note that the command \\title{...} needs to be defined inside\n"
- "% those environments!\n"
- "\\newenvironment{DoxyDesc}[1]{%\n"
- //" \\filbreak%\n"
- " \\ensurespace{4\\baselineskip}%\n"
- " \\begin{list}{}%\n"
+ "\n"
+ "\n";
+ t << "%---------- Internal commands used in this style file ----------------\n"
+ "\n";
+ t << "\\newcommand{\\ensurespace}[1]{%\n"
+ " \\begingroup%\n"
+ " \\setlength{\\dimen@}{#1}%\n"
+ " \\vskip\\z@\\@plus\\dimen@%\n"
+ " \\penalty -100\\vskip\\z@\\@plus -\\dimen@%\n"
+ " \\vskip\\dimen@%\n"
+ " \\penalty 9999%\n"
+ " \\vskip -\\dimen@%\n"
+ " \\vskip\\z@skip% hide the previous |\\vskip| from |\\addvspace|\n"
+ " \\endgroup%\n"
+ "}\n"
+ "\n";
+ t << "\\newcommand{\\DoxyLabelFont}{}\n"
+ "\\newcommand{\\entrylabel}[1]{%\n"
" {%\n"
+ " \\parbox[b]{\\labelwidth-4pt}{%\n"
+ " \\makebox[0pt][l]{\\DoxyLabelFont#1}%\n"
+ " \\vspace{1.5\\baselineskip}%\n"
+ " }%\n"
+ " }%\n"
+ "}\n"
+ "\n";
+ t << "\\newenvironment{DoxyDesc}[1]{%\n"
+ " \\ensurespace{4\\baselineskip}%\n"
+ " \\begin{list}{}{%\n"
" \\settowidth{\\labelwidth}{40pt}%\n"
" \\setlength{\\leftmargin}{\\labelwidth}%\n"
" \\setlength{\\parsep}{0pt}%\n"
@@ -549,8 +557,26 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
" \\item[#1]%\n"
"}{%\n"
" \\end{list}%\n"
- "}\n\n";
- t << "%---------- Commands used by doxygen LaTeX output generator ----------\n\n";
+ "}\n"
+ "\n";
+ t << "\\newsavebox{\\xrefbox}\n"
+ "\\newlength{\\xreflength}\n"
+ "\\newcommand{\\xreflabel}[1]{%\n"
+ " \\sbox{\\xrefbox}{#1}%\n"
+ " \\setlength{\\xreflength}{\\wd\\xrefbox}%\n"
+ " \\ifthenelse{\\xreflength>\\labelwidth}{%\n"
+ " \\begin{minipage}{\\textwidth}%\n"
+ " \\setlength{\\parindent}{0pt}%\n"
+ " \\hangindent=15pt\\bfseries #1\\vspace{1.2\\itemsep}%\n"
+ " \\end{minipage}%\n"
+ " }{%\n"
+ " \\parbox[b]{\\labelwidth}{\\makebox[0pt][l]{\\textbf{#1}}}%\n"
+ " }%\n"
+ "}\n"
+ "\n"
+ "\n";
+ t << "%---------- Commands used by doxygen LaTeX output generator ----------\n"
+ "\n";
t << "% Used by <pre> ... </pre>\n"
"\\newenvironment{DoxyPre}{%\n"
" \\small%\n"
@@ -558,35 +584,25 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
"}{%\n"
" \\end{alltt}%\n"
" \\normalsize%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @code ... @endcode\n"
- "\\newenvironment{DoxyCode}{%\n";
- //if (latexSourceCode)
- //{
- t << "\n\n\\begin{scriptsize}\\begin{alltt}%" << endl;
- //}
- //else
- //{
- // t << " \\footnotesize%\n"
- // " \\verbatim%\n";
- //}
- t << "}{%\n";
- //if (latexSourceCode)
- //{
- t << "\\end{alltt}\\end{scriptsize}%" << endl;
- //}
- //else
- //{
- // t << " \\endverbatim%\n"
- // " \\normalsize%\n";
- //}
- t << "}\n\n";
+ "\\newenvironment{DoxyCode}{%\n"
+ " \\par%\n"
+ " \\scriptsize%\n"
+ " \\begin{alltt}%\n"
+ "}{%\n"
+ " \\end{alltt}%\n"
+ " \\normalsize%\n"
+ "}\n"
+ "\n";
t << "% Used by @example, @include, @includelineno and @dontinclude\n"
"\\newenvironment{DoxyCodeInclude}{%\n"
" \\DoxyCode%\n"
"}{%\n"
" \\endDoxyCode%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @verbatim ... @endverbatim\n"
"\\newenvironment{DoxyVerb}{%\n"
" \\footnotesize%\n"
@@ -594,138 +610,159 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
"}{%\n"
" \\endverbatim%\n"
" \\normalsize%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @verbinclude\n"
"\\newenvironment{DoxyVerbInclude}{%\n"
" \\DoxyVerb%\n"
"}{%\n"
" \\endDoxyVerb%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by numbered lists (using '-#' or <ol> ... </ol>)\n"
"\\newenvironment{DoxyEnumerate}{%\n"
" \\enumerate%\n"
"}{%\n"
" \\endenumerate%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)\n"
"\\newenvironment{DoxyItemize}{%\n"
" \\itemize%\n"
"}{%\n"
" \\enditemize%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by description lists (using <dl> ... </dl>)\n"
"\\newenvironment{DoxyDescription}{%\n"
" \\description%\n"
"}{%\n"
" \\enddescription%\n"
- "}\n\n";
- t << "% Used by @image, @dotfile, and @dot ... @enddot\n"
+ "}\n"
+ "\n";
+ t << "% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc\n"
"% (only if caption is specified)\n"
"\\newenvironment{DoxyImage}{%\n"
" \\begin{figure}[H]%\n"
- " \\begin{center}%\n"
+ " \\begin{center}%\n"
"}{%\n"
- " \\end{center}%\n"
+ " \\end{center}%\n"
" \\end{figure}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc\n"
"% (only if no caption is specified)\n"
"\\newenvironment{DoxyImageNoCaption}{%\n"
"}{%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @attention\n"
"\\newenvironment{DoxyAttention}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @author and @authors\n"
"\\newenvironment{DoxyAuthor}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @date\n"
"\\newenvironment{DoxyDate}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @invariant\n"
"\\newenvironment{DoxyInvariant}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @note\n"
"\\newenvironment{DoxyNote}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @post\n"
"\\newenvironment{DoxyPostcond}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @pre\n"
"\\newenvironment{DoxyPrecond}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @copyright\n"
"\\newenvironment{DoxyCopyright}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @remark\n"
"\\newenvironment{DoxyRemark}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
- t << "% Used by @return\n"
+ "}\n"
+ "\n";
+ t << "% Used by @return and @returns\n"
"\\newenvironment{DoxyReturn}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @since\n"
"\\newenvironment{DoxySince}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @see\n"
"\\newenvironment{DoxySeeAlso}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @version\n"
"\\newenvironment{DoxyVersion}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @warning\n"
"\\newenvironment{DoxyWarning}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
"}{%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @internal\n"
"\\newenvironment{DoxyInternal}[1]{%\n"
" \\paragraph*{#1}%\n"
"}{%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by @par and @paragraph\n"
"\\newenvironment{DoxyParagraph}[1]{%\n"
- " \\begin{list}{}%\n"
- " {%\n"
+ " \\begin{list}{}{%\n"
" \\settowidth{\\labelwidth}{40pt}%\n"
" \\setlength{\\leftmargin}{\\labelwidth}%\n"
" \\setlength{\\parsep}{0pt}%\n"
@@ -735,17 +772,13 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
" \\item[#1]%\n"
"}{%\n"
" \\end{list}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by parameter lists\n"
"\\newenvironment{DoxyParams}[2][]{%\n"
" \\begin{DoxyDesc}{#2}%\n"
- //" \\begin{description}%\n"
" \\item[] \\hspace{\\fill} \\vspace{-40pt}%\n"
- //" \\definecolor{tableShade}{HTML}{F8F8F8}%\n"
- //" \\rowcolors{1}{white}{tableShade}%\n"
- //" \\arrayrulecolor{gray}%\n"
" \\settowidth{\\labelwidth}{40pt}%\n"
- //" \\setlength{\\LTleft}{\\labelwidth}%\n"
" \\setlength{\\LTleft}{0pt}%\n"
" \\setlength{\\tabcolsep}{0.01\\textwidth}%\n"
" \\ifthenelse{\\equal{#1}{}}%\n" // default: name, docs columns
@@ -762,9 +795,9 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
" }\\hline%\n"
"}{%\n"
" \\end{longtable}%\n"
- //" \\end{description}%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used for fields of simple structs\n"
"\\newenvironment{DoxyFields}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
@@ -775,26 +808,23 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
" \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.15\\textwidth}|%\n"
" p{0.15\\textwidth}|%\n"
" p{0.635\\textwidth}|}%\n"
- //"\\hline{\\sf\\textbf{Type}} & {\\sf\\textbf{Name}} & {\\sf\\textbf{Description}}\\endhead%\n"
" \\hline%\n"
"}{%\n"
" \\end{longtable}%\n"
- //" \\end{description}%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
- t << "% is used for parameters within a detailed function description\n"
+ "}\n"
+ "\n";
+ t << "% Used for parameters within a detailed function description\n"
"\\newenvironment{DoxyParamCaption}{%\n"
" \\renewcommand{\\item}[2][]{##1 {\\em ##2}}%\n"
- " }{%\n"
- "}\n\n";
+ "}{%\n"
+ "}\n"
+ "\n";
t << "% Used by return value lists\n"
"\\newenvironment{DoxyRetVals}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
" \\begin{description}%\n"
" \\item[] \\hspace{\\fill} \\vspace{-25pt}%\n"
- //" \\definecolor{tableShade}{HTML}{F8F8F8}%\n"
- //" \\rowcolors{1}{white}{tableShade}%\n"
- //" \\arrayrulecolor{gray}%\n"
" \\setlength{\\tabcolsep}{0.01\\textwidth}%\n"
" \\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.25\\textwidth}|%\n"
" p{0.705\\textwidth}|}%\n"
@@ -803,7 +833,8 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
" \\end{longtable}%\n"
" \\end{description}%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by exception lists\n"
"\\newenvironment{DoxyExceptions}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
@@ -820,7 +851,8 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
" \\end{longtable}%\n"
" \\end{description}%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
+ "}\n"
+ "\n";
t << "% Used by template parameter lists\n"
"\\newenvironment{DoxyTemplParams}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
@@ -837,121 +869,130 @@ static void writeDefaultStyleSheetPart3(FTextStream &t)
" \\end{longtable}%\n"
" \\end{description}%\n"
" \\end{DoxyDesc}%\n"
- "}\n\n";
- t << "\\newcommand{\\doxyref}[3]{\\textbf{#1} (\\textnormal{#2}\\,\\pageref{#3})}\n";
- t << "\\newenvironment{DoxyCompactList}\n";
- t << "{\\begin{list}{}{\n";
- t << " \\setlength{\\leftmargin}{0.5cm}\n";
- t << " \\setlength{\\itemsep}{0pt}\n";
- t << " \\setlength{\\parsep}{0pt}\n";
- t << " \\setlength{\\topsep}{0pt}\n";
- t << " \\renewcommand{\\makelabel}{\\hfill}}}\n";
- t << "{\\end{list}}\n";
- t << "\\newenvironment{DoxyCompactItemize}\n";
- t << "{\n";
- t << " \\begin{itemize}\n";
- t << " \\setlength{\\itemsep}{-3pt}\n";
- t << " \\setlength{\\parsep}{0pt}\n";
- t << " \\setlength{\\topsep}{0pt}\n";
- t << " \\setlength{\\partopsep}{0pt}\n";
- t << "}\n";
- t << "{\\end{itemize}}\n";
- t << "\\newcommand{\\PBS}[1]{\\let\\temp=\\\\#1\\let\\\\=\\temp}\n";
- t << "\\newlength{\\tmplength}\n";
- t << "\\newenvironment{TabularC}[1]\n";
- t << "{\n";
- t << "\\setlength{\\tmplength}\n";
- t << " {\\linewidth/(#1)-\\tabcolsep*2-\\arrayrulewidth*(#1+1)/(#1)}\n";
- t << " \\par\\begin{xtabular*}{\\linewidth}\n";
- t << " {*{#1}{|>{\\PBS\\raggedright\\hspace{0pt}}p{\\the\\tmplength}}|}\n";
- t << "}\n";
- t << "{\\end{xtabular*}\\par}\n";
- t << "\\newcommand{\\entrylabel}[1]{\n";
- t << " {\\parbox[b]{\\labelwidth-4pt}{\\makebox[0pt][l]{%\n";
- t << " \\usefont{OT1}{phv}{bc}{n}\\color{darkgray}#1}\\vspace{1.5\\baselineskip}}}}\n";
- t << "\\newenvironment{Desc}\n";
- t << "{\\begin{list}{}\n";
- t << " {\n";
- t << " \\settowidth{\\labelwidth}{40pt}\n";
- t << " \\setlength{\\leftmargin}{\\labelwidth}\n";
- t << " \\setlength{\\parsep}{0pt}\n";
- t << " \\setlength{\\itemsep}{-4pt}\n";
- t << " \\renewcommand{\\makelabel}{\\entrylabel}\n";
- t << " }\n";
- t << "}\n";
- t << "{\\end{list}}\n";
-
- t << "\\newsavebox{\\xrefbox}\n";
- t << "\\newlength{\\xreflength}\n";
- t << "\\newcommand{\\xreflabel}[1]{%\n";
- t << " \\sbox{\\xrefbox}{#1}%\n";
- t << " \\setlength{\\xreflength}{\\wd\\xrefbox}%\n";
- t << " \\ifthenelse{\\xreflength>\\labelwidth}{%\n";
- t << " \\begin{minipage}{\\textwidth}%\n";
- t << " \\setlength{\\parindent}{0pt}%\n";
- t << " \\hangindent=15pt\\bfseries #1\\vspace{1.2\\itemsep}%\n";
- t << " \\end{minipage}%\n";
- t << " }{%\n";
- t << " \\parbox[b]{\\labelwidth}{\\makebox[0pt][l]{\\textbf{#1}}}%\n";
- t << " }}%\n";
- t << "\\newenvironment{DoxyRefList}{%\n";
- t << " \\begin{list}{}{%\n";
- t << " \\setlength{\\labelwidth}{10pt}%\n";
- t << " \\setlength{\\leftmargin}{\\labelwidth}%\n";
- t << " \\addtolength{\\leftmargin}{\\labelsep}%\n";
- t << " \\renewcommand{\\makelabel}{\\xreflabel}%\n";
- t << " }%\n";
- t << " }%\n";
- t << "{\\end{list}}\n";
- t << "\\newenvironment{DoxyRefDesc}[1]\n";
- t << "{\\begin{list}{}{%\n";
- t << " \\renewcommand\\makelabel[1]{\\textbf{##1}}\n";
- t << " \\settowidth\\labelwidth{\\makelabel{#1}}\n";
- t << " \\setlength\\leftmargin{\\labelwidth+\\labelsep}}}\n";
- t << "{\\end{list}}\n";
- t << "\\newenvironment{Indent}\n";
- t << " {\\begin{list}{}{\\setlength{\\leftmargin}{0.5cm}}\n";
- t << " \\item[]\\ignorespaces}\n";
- t << " {\\unskip\\end{list}}\n";
-
- t << "\\setlength{\\parindent}{0cm}\n";
- t << "\\setlength{\\parskip}{0.2cm}\n";
- t << "\\addtocounter{secnumdepth}{2}\n";
- // \sloppy should not be used, see bug 563698
- //t << "\\sloppy\n";
- t << "\\usepackage[T1]{fontenc}\n";
- t << "\\makeatletter\n";
- t << "\\renewcommand{\\paragraph}{\\@startsection{paragraph}{4}{0ex}%\n";
- t << " {-1.0ex}%\n";
- t << " {1.0ex}%\n";
- t << " {\\usefont{OT1}{phv}{bc}{n}\\color{darkgray}}}\n";
- t << "\\renewcommand{\\subparagraph}{\\@startsection{subparagraph}{5}{0ex}%\n";
- t << " {-1.0ex}%\n";
- t << " {1.0ex}%\n";
- t << " {\\usefont{OT1}{phv}{bc}{n}\\color{darkgray}}}\n";
- t << "\\makeatother\n";
- t << "\\allsectionsfont{\\usefont{OT1}{phv}{bc}{n}\\selectfont\\color{darkgray}}\n";
- t << "\\stepcounter{secnumdepth}\n";
- t << "\\stepcounter{tocdepth}\n";
- t << "\\definecolor{comment}{rgb}{0.5,0.0,0.0}\n";
- t << "\\definecolor{keyword}{rgb}{0.0,0.5,0.0}\n";
- t << "\\definecolor{keywordtype}{rgb}{0.38,0.25,0.125}\n";
- t << "\\definecolor{keywordflow}{rgb}{0.88,0.5,0.0}\n";
- t << "\\definecolor{preprocessor}{rgb}{0.5,0.38,0.125}\n";
- t << "\\definecolor{stringliteral}{rgb}{0.0,0.125,0.25}\n";
- t << "\\definecolor{charliteral}{rgb}{0.0,0.5,0.5}\n";
- t << "\\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}\n";
- t << "\\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}\n";
- t << "\\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}\n";
- t << "\\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}\n";
+ "}\n"
+ "\n";
+ t << "% Used for member lists\n"
+ "\\newenvironment{DoxyCompactItemize}{%\n"
+ " \\begin{itemize}%\n"
+ " \\setlength{\\itemsep}{-3pt}%\n"
+ " \\setlength{\\parsep}{0pt}%\n"
+ " \\setlength{\\topsep}{0pt}%\n"
+ " \\setlength{\\partopsep}{0pt}%\n"
+ "}{%\n"
+ " \\end{itemize}%\n"
+ "}\n"
+ "\n";
+ t << "% Used for member descriptions\n"
+ "\\newenvironment{DoxyCompactList}{%\n"
+ " \\begin{list}{}{%\n"
+ " \\setlength{\\leftmargin}{0.5cm}%\n"
+ " \\setlength{\\itemsep}{0pt}%\n"
+ " \\setlength{\\parsep}{0pt}%\n"
+ " \\setlength{\\topsep}{0pt}%\n"
+ " \\renewcommand{\\makelabel}{\\hfill}%\n"
+ " }%\n"
+ "}{%\n"
+ " \\end{list}%\n"
+ "}\n"
+ "\n";
+ t << "% Used for reference lists (@bug, @deprecated, @todo, etc.)\n"
+ "\\newenvironment{DoxyRefList}{%\n"
+ " \\begin{list}{}{%\n"
+ " \\setlength{\\labelwidth}{10pt}%\n"
+ " \\setlength{\\leftmargin}{\\labelwidth}%\n"
+ " \\addtolength{\\leftmargin}{\\labelsep}%\n"
+ " \\renewcommand{\\makelabel}{\\xreflabel}%\n"
+ " }%\n"
+ "}{%\n"
+ " \\end{list}%\n"
+ "}\n"
+ "\n";
+ t << "% Used by @bug, @deprecated, @todo, etc.\n"
+ "\\newenvironment{DoxyRefDesc}[1]{%\n"
+ " \\begin{list}{}{%\n"
+ " \\renewcommand\\makelabel[1]{\\textbf{##1}}%\n"
+ " \\settowidth\\labelwidth{\\makelabel{#1}}%\n"
+ " \\setlength\\leftmargin{\\labelwidth+\\labelsep}%\n"
+ " }%\n"
+ "}{%\n"
+ " \\end{list}%\n"
+ "}\n"
+ "\n";
+ t << "% Used by parameter lists and simple sections\n"
+ "\\newenvironment{Desc}\n"
+ "{\\begin{list}{}{%\n"
+ " \\settowidth{\\labelwidth}{40pt}%\n"
+ " \\setlength{\\leftmargin}{\\labelwidth}%\n"
+ " \\setlength{\\parsep}{0pt}%\n"
+ " \\setlength{\\itemsep}{-4pt}%\n"
+ " \\renewcommand{\\makelabel}{\\entrylabel}%\n"
+ " }\n"
+ "}{%\n"
+ " \\end{list}%\n"
+ "}\n"
+ "\n";
+ t << "% Used by tables\n"
+ "\\newcommand{\\PBS}[1]{\\let\\temp=\\\\#1\\let\\\\=\\temp}\n"
+ "\\newlength{\\tmplength}\n"
+ "\\newenvironment{TabularC}[1]{%\n"
+ " \\setlength{\\tmplength}{%\n"
+ " \\linewidth/(#1)-\\tabcolsep*2-\\arrayrulewidth*(#1+1)/(#1)%\n"
+ " }%\n"
+ " \\par%\n"
+ " \\begin{xtabular*}{\\linewidth}{%\n"
+ " *{#1}{|>{\\PBS\\raggedright\\hspace{0pt}}p{\\the\\tmplength}}|%\n"
+ " }%\n"
+ "}{%\n"
+ " \\end{xtabular*}%\n"
+ " \\par%\n"
+ "}\n"
+ "\n";
+ t << "% Used for member group headers\n"
+ "\\newenvironment{Indent}{%\n"
+ " \\begin{list}{}{%\n"
+ " \\setlength{\\leftmargin}{0.5cm}%\n"
+ " }%\n"
+ " \\item[]\\ignorespaces%\n"
+ "}{%\n"
+ " \\unskip%\n"
+ " \\end{list}%\n"
+ "}\n"
+ "\n";
+ t << "% Used when hyperlinks are turned off\n"
+ "\\newcommand{\\doxyref}[3]{%\n"
+ " \\textbf{#1} (\\textnormal{#2}\\,\\pageref{#3})%\n"
+ "}\n"
+ "\n";
+ t << "% Used for syntax highlighting\n"
+ "\\definecolor{comment}{rgb}{0.5,0.0,0.0}\n"
+ "\\definecolor{keyword}{rgb}{0.0,0.5,0.0}\n"
+ "\\definecolor{keywordtype}{rgb}{0.38,0.25,0.125}\n"
+ "\\definecolor{keywordflow}{rgb}{0.88,0.5,0.0}\n"
+ "\\definecolor{preprocessor}{rgb}{0.5,0.38,0.125}\n"
+ "\\definecolor{stringliteral}{rgb}{0.0,0.125,0.25}\n"
+ "\\definecolor{charliteral}{rgb}{0.0,0.5,0.5}\n"
+ "\\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}\n"
+ "\\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}\n"
+ "\\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}\n"
+ "\\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}\n";
}
static void writeDefaultFooter(FTextStream &t)
{
+ t << "%--- End generated contents ---\n"
+ "\n";
+
+ // Bibliography
Doxygen::citeDict->writeLatexBibliography(t);
- t << "\\addcontentsline{toc}{part}{" << theTranslator->trRTFGeneralIndex() << "}\n";
- t << "\\printindex\n";
- t << "\\end{document}\n";
+
+ // Index
+ t << "% Index\n"
+ "\\newpage\n"
+ "\\phantomsection\n"
+ "\\addcontentsline{toc}{part}{" << theTranslator->trRTFGeneralIndex() << "}\n"
+ "\\printindex\n"
+ "\n"
+ "\\end{document}\n";
}
void LatexGenerator::writeHeaderFile(QFile &f)
@@ -976,20 +1017,7 @@ void LatexGenerator::writeStyleSheetFile(QFile &f)
{
FTextStream t(&f);
t << "% stylesheet for doxygen " << versionString << endl;
-
- writeDefaultStyleSheetPart1(t);
- QCString &projectName = Config_getString("PROJECT_NAME");
-
- t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName );
- t << " doxygen";
- //t << " " << theTranslator->trWrittenBy() << " ";
- //t << "Dimitri van Heesch \\copyright~1997-2013";
- writeDefaultStyleSheetPart2(t);
- t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName );
- t << " doxygen";
- //t << " << theTranslator->trWrittenBy() << " ";
- //t << "Dimitri van Heesch \\copyright~1997-2013";
- writeDefaultStyleSheetPart3(t);
+ writeDefaultStyleSheet(t);
}
void LatexGenerator::startFile(const char *name,const char *,const char *)
@@ -1454,31 +1482,12 @@ void LatexGenerator::writePageLink(const char *name, bool /*first*/)
void LatexGenerator::writeStyleInfo(int part)
{
- switch(part)
- {
- case 0:
- {
- //QCString pname=Config_getString("PROJECT_NAME").stripWhiteSpace();
- startPlainFile("doxygen.sty");
- writeDefaultStyleSheetPart1(t);
- }
- break;
- case 1:
- case 3:
- t << " Doxygen ";
- break;
- case 2:
- {
- writeDefaultStyleSheetPart2(t);
- }
- break;
- case 4:
- {
- writeDefaultStyleSheetPart3(t);
- endPlainFile();
- }
- break;
- }
+ if (part > 0)
+ return;
+
+ startPlainFile("doxygen.sty");
+ writeDefaultStyleSheet(t);
+ endPlainFile();
}
void LatexGenerator::newParagraph()
diff --git a/src/latexgen.h b/src/latexgen.h
index cbfdde6..54e926d 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -267,7 +267,6 @@ class LatexGenerator : public OutputGenerator
void endFontClass(); // {}
void writeCodeAnchor(const char *) {}
- void linkableSymbol(int,const char *,Definition *,Definition *) {}
void setCurrentDoc(Definition *,const char *,bool) {}
void addWord(const char *,bool) {}
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index 7d9f077..6b1cb7e 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -19,6 +19,7 @@ CONFIG = console warn_on staticlib $extraopts
HEADERS = arguments.h \
bufstr.h \
cite.h \
+ clangparser.h \
classdef.h \
classlist.h \
cmdmapper.h \
@@ -179,6 +180,7 @@ SOURCES = arguments.cpp \
ce_lex.cpp \
ce_parse.cpp \
cite.cpp \
+ clangparser.cpp \
classdef.cpp \
classlist.cpp \
cmdmapper.cpp \
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 6d11df9..32c7a7e 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -313,7 +313,7 @@ void ManGenerator::codify(const char *str)
case '\n': t << "\n"; firstCol=TRUE; col=0; break;
case '\\': t << "\\"; col++; break;
case '\"': c = '\''; // no break!
- default: t << c; firstCol=FALSE; col++; break;
+ default: p=writeUtf8Char(t,p-1); firstCol=FALSE; col++; break;
}
}
//printf("%s",str);fflush(stdout);
diff --git a/src/mangen.h b/src/mangen.h
index 577e634..663f695 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -256,7 +256,6 @@ class ManGenerator : public OutputGenerator
void endLabels();
void writeCodeAnchor(const char *) {}
- void linkableSymbol(int,const char *,Definition *,Definition *) {}
void setCurrentDoc(Definition *,const char *,bool) {}
void addWord(const char *,bool) {}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 50dbdd5..0a31bad 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1176,13 +1176,13 @@ static int isHRuler(const char *data,int size)
static QCString extractTitleId(QCString &title)
{
//static QRegExp r1("^[a-z_A-Z][a-z_A-Z0-9\\-]*:");
- static QRegExp r2("\\{#[a-z_A-Z][a-z_A-Z0-9\\-]*\\}$");
+ static QRegExp r2("\\{#[a-z_A-Z][a-z_A-Z0-9\\-]*\\}");
int l=0;
int i = r2.match(title,0,&l);
- if (i!=-1) // found {#id} style id
+ if (i!=-1 && title.mid(i+l).stripWhiteSpace().isEmpty()) // found {#id} style id
{
QCString id = title.mid(i+2,l-3);
- title = title.left(i)+title.mid(i+l);
+ title = title.left(i);
//printf("found id='%s' title='%s'\n",id.data(),title.data());
return id;
}
@@ -1978,6 +1978,7 @@ static QCString processBlocks(const QCString &s,int indent)
QCString header,id;
convertStringFragment(header,data+pi,i-pi-1);
id = extractTitleId(header);
+ //printf("header='%s' is='%s'\n",header.data(),id.data());
if (!header.isEmpty())
{
if (!id.isEmpty())
@@ -1986,7 +1987,7 @@ static QCString processBlocks(const QCString &s,int indent)
out.addStr(id);
out.addStr(" ");
out.addStr(header);
- out.addStr("\n");
+ out.addStr("\n\n");
SectionInfo *si = new SectionInfo(g_fileName,id,header,
level==1 ? SectionInfo::Section : SectionInfo::Subsection,level);
if (g_current)
@@ -1999,7 +2000,7 @@ static QCString processBlocks(const QCString &s,int indent)
{
out.addStr(level==1?"<h1>":"<h2>");
out.addStr(header);
- out.addStr(level==1?"</h1>\n":"</h2>\n");
+ out.addStr(level==1?"\n</h1>\n":"\n</h2>\n");
}
}
else
@@ -2082,12 +2083,17 @@ static QCString processBlocks(const QCString &s,int indent)
static QCString extractPageTitle(QCString &docs,QCString &id)
{
+ int ln=0;
// first first non-empty line
QCString title;
const char *data = docs.data();
int i=0;
int size=docs.size();
- while (i<size && (data[i]==' ' || data[i]=='\n')) i++;
+ while (i<size && (data[i]==' ' || data[i]=='\n'))
+ {
+ if (data[i]=='\n') ln++;
+ i++;
+ }
if (i>=size) return "";
int end1=i+1;
while (end1<size && data[end1-1]!='\n') end1++;
@@ -2095,13 +2101,16 @@ static QCString extractPageTitle(QCString &docs,QCString &id)
// first line from i..end1
if (end1<size)
{
+ ln++;
// second line form end1..end2
int end2=end1+1;
while (end2<size && data[end2-1]!='\n') end2++;
if (isHeaderline(data+end1,size-end1))
{
convertStringFragment(title,data+i,end1-i-1);
- docs=docs.mid(end2);
+ QCString lns;
+ lns.fill('\n',ln);
+ docs=lns+docs.mid(end2);
id = extractTitleId(title);
//printf("extractPageTitle(title='%s' docs='%s' id='%s')\n",title.data(),docs.data(),id.data());
return title;
@@ -2149,6 +2158,18 @@ static QCString detab(const QCString &s,int &refIndent)
break;
default: // non-whitespace => update minIndent
out.addChar(c);
+ if (c<0 && i<size) // multibyte sequence
+ {
+ out.addChar(data[i++]); // >= 2 bytes
+ if (((uchar)c&0xE0)==0xE0 && i<size)
+ {
+ out.addChar(data[i++]); // 3 bytes
+ }
+ if (((uchar)c&0xF0)==0xF0 && i<size)
+ {
+ out.addChar(data[i++]); // 4 byres
+ }
+ }
if (col<minIndent) minIndent=col;
col++;
}
@@ -2213,6 +2234,7 @@ void MarkdownFileParser::parseInput(const char *fileName,
current->lang = SrcLangExt_Markdown;
current->fileName = fileName;
current->docFile = fileName;
+ current->docLine = 1;
int len = qstrlen(fileBuf);
BufStr input(len);
BufStr output(len);
diff --git a/src/marshal.cpp b/src/marshal.cpp
index daf1850..da71843 100644
--- a/src/marshal.cpp
+++ b/src/marshal.cpp
@@ -391,6 +391,7 @@ void marshalEntry(StorageIntf *s,Entry *e)
marshalBool(s,e->hidden);
marshalBool(s,e->artificial);
marshalInt(s,(int)e->groupDocType);
+ marshalQCString(s,e->id);
}
void marshalEntryTree(StorageIntf *s,Entry *e)
@@ -768,6 +769,7 @@ Entry * unmarshalEntry(StorageIntf *s)
e->hidden = unmarshalBool(s);
e->artificial = unmarshalBool(s);
e->groupDocType = (Entry::GroupDocType)unmarshalInt(s);
+ e->id = unmarshalQCString(s);
return e;
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 0c89554..e01ab6a 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -48,10 +48,6 @@
#define START_MARKER 0x4D454D5B // MEM[
#define END_MARKER 0x4D454D5D // MEM]
-#if defined(_OS_WIN32_)
-#define snprintf _snprintf
-#endif
-
// Put this macro at the start of any method of MemberDef that can directly
// or indirectly access other MemberDefs. It prevents that the content
// pointed to by m_impl gets flushed to disk in the middle of the method call!
@@ -540,7 +536,7 @@ class MemberDefImpl
ClassDef *category;
MemberDef *categoryRelation;
- bool tagDataWritten;
+ unsigned tagDataWritten;
};
MemberDefImpl::MemberDefImpl() :
@@ -670,7 +666,7 @@ void MemberDefImpl::init(Definition *def,
hasDocumentedReturnType = FALSE;
docProvider = 0;
isDMember = def->getDefFileName().right(2).lower()==".d";
- tagDataWritten = FALSE;
+ tagDataWritten = 0; // save separate written status for file, group, class, etc.
}
@@ -1382,8 +1378,8 @@ bool MemberDef::isBriefSectionVisible() const
void MemberDef::writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
- bool inGroup,ClassDef *inheritedFrom,const char *inheritId
- )
+ bool inGroup, const DefType compoundType,
+ ClassDef *inheritedFrom,const char *inheritId)
{
//printf("%s MemberDef::writeDeclaration() inGroup=%d\n",qualifiedName().data(),inGroup);
@@ -1399,7 +1395,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
- _writeTagData();
+ _writeTagData(compoundType);
QCString cname = d->name();
QCString cdname = d->displayName();
@@ -1513,7 +1509,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ltype.left(i), // text
TRUE // autoBreak
);
- getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd);
+ getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd,compoundType);
//ol+=*getAnonymousEnumType()->enumDecl();
linkifyText(TextGeneratorOLImpl(ol),d,m_impl->fileDef,this,ltype.right(ltype.length()-i-l),TRUE);
}
@@ -2436,7 +2432,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.left(i));
- vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
+ vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef(),definitionType());
linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-i-l));
found=TRUE;
@@ -3146,7 +3142,7 @@ void MemberDef::setAnchor()
if (m_impl->tArgList)
{
char buf[20];
- snprintf(buf,20,"%d:",m_impl->tArgList->count());
+ qsnprintf(buf,20,"%d:",m_impl->tArgList->count());
buf[19]='\0';
memAnchor.prepend(buf);
}
@@ -3390,9 +3386,10 @@ Specifier MemberDef::virtualness(int count) const
return v;
}
-void MemberDef::_writeTagData()
-{
- if (m_impl->tagDataWritten) return;
+void MemberDef::_writeTagData(const DefType compoundType)
+{
+ unsigned typeMask = 1 << compoundType;
+ if ((m_impl->tagDataWritten) & typeMask) return; // member already written for this type
static bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty();
// write tag file information of this member
if (generateTagFile && isLinkableInProject())
@@ -3457,12 +3454,13 @@ void MemberDef::_writeTagData()
Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
Doxygen::tagFile << " </member>" << endl;
+ fmd->m_impl->tagDataWritten |= typeMask;
fmd->_addToSearchIndex();
}
}
}
}
- m_impl->tagDataWritten=TRUE;
+ m_impl->tagDataWritten |= typeMask;
}
void MemberDef::_computeIsConstructor()
@@ -3563,7 +3561,8 @@ bool MemberDef::isDestructor() const
}
void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
- ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd)
+ ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
+ const DefType compoundType)
{
KEEP_RESIDENT_DURING_CALL;
@@ -3592,7 +3591,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
{
if (isLinkableInProject() || hasDocumentedEnumValues())
{
- _writeTagData();
+ _writeTagData(compoundType);
writeLink(typeDecl,cd,nd,fd,gd);
}
else
@@ -3639,7 +3638,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
if (fmd->hasDocumentation()) // enum value has docs
{
- fmd->_writeTagData();
+ fmd->_writeTagData(compoundType);
fmd->writeLink(typeDecl,cd,nd,fd,gd);
}
else // no docs for this enum value
@@ -4833,7 +4832,7 @@ void MemberDef::flushToDisk() const
marshalBool (Doxygen::symbolStorage,m_impl->docsForDefinition);
marshalObjPointer (Doxygen::symbolStorage,m_impl->category);
marshalObjPointer (Doxygen::symbolStorage,m_impl->categoryRelation);
- marshalBool (Doxygen::symbolStorage,m_impl->tagDataWritten);
+ marshalUInt (Doxygen::symbolStorage,m_impl->tagDataWritten);
marshalUInt(Doxygen::symbolStorage,END_MARKER);
// function doesn't modify the object conceptually but compiler doesn't know this.
@@ -4938,7 +4937,7 @@ void MemberDef::loadFromDisk() const
m_impl->docsForDefinition = unmarshalBool (Doxygen::symbolStorage);
m_impl->category = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->categoryRelation = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
- m_impl->tagDataWritten = unmarshalBool (Doxygen::symbolStorage);
+ m_impl->tagDataWritten = unmarshalUInt (Doxygen::symbolStorage);
marker = unmarshalUInt(Doxygen::symbolStorage);
assert(marker==END_MARKER);
diff --git a/src/memberdef.h b/src/memberdef.h
index 0b49d6e..dba22e6 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -341,14 +341,16 @@ class MemberDef : public Definition
// output generation
void writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
- bool inGroup,ClassDef *inheritFrom=0,const char *inheritId=0);
+ bool inGroup, const DefType compoundType,
+ ClassDef *inheritFrom=0,const char *inheritId=0);
void writeDocumentation(MemberList *ml,OutputList &ol,
const char *scopeName,Definition *container,
bool inGroup,bool showEnumValues=FALSE,bool
showInline=FALSE);
void writeMemberDocSimple(OutputList &ol,Definition *container);
void writeEnumDeclaration(OutputList &typeDecl,
- ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
+ ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
+ const DefType compoundType);
void warnIfUndocumented();
MemberDef *createTemplateInstanceMember(ArgumentList *formalArgs,
@@ -380,7 +382,7 @@ class MemberDef : public Definition
const QCString &cfname,const QCString &ciname,
const QCString &cname);
void _writeCategoryRelation(OutputList &ol);
- void _writeTagData();
+ void _writeTagData(const DefType);
void _addToSearchIndex();
static int s_indentLevel;
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 61907e5..2df4a89 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -112,7 +112,7 @@ void MemberGroup::writeDeclarations(OutputList &ol,
//printf("MemberGroup::writeDeclarations() %s\n",grpHeader.data());
QCString ldoc = doc;
if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\" id=\""+anchor()+"\"></a>");
- memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,FALSE,showInline);
+ memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,DefinitionIntf::TypeGroup,FALSE,showInline);
}
void MemberGroup::writePlainDeclarations(OutputList &ol,
@@ -121,7 +121,7 @@ void MemberGroup::writePlainDeclarations(OutputList &ol,
)
{
//printf("MemberGroup::writePlainDeclarations() memberList->count()=%d\n",memberList->count());
- memberList->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
+ memberList->writePlainDeclarations(ol,cd,nd,fd,gd,DefinitionIntf::TypeGroup,inheritedFrom,inheritId);
}
void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
@@ -150,7 +150,7 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,ClassDef *cd,
{
MemberList ml(lt);
ml.append(md);
- ml.writePlainDeclarations(ol,cd,0,0,0,inheritedFrom,inheritId);
+ ml.writePlainDeclarations(ol,cd,0,0,0,DefinitionIntf::TypeGroup,inheritedFrom,inheritId);
}
}
}
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 3235b6c..60c1291 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -296,7 +296,8 @@ bool MemberList::declVisible() const
}
void MemberList::writePlainDeclarations(OutputList &ol,
- ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
+ ClassDef *cd,NamespaceDef *nd,FileDef *fd,
+ GroupDef *gd, const DefinitionIntf::DefType compoundType,
ClassDef *inheritedFrom,const char *inheritId
)
{
@@ -336,7 +337,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
case MemberType_Event:
{
if (first) ol.startMemberList(),first=FALSE;
- md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
+ md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId);
break;
}
case MemberType_Enumeration:
@@ -373,7 +374,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberItem(md->anchor(),0,inheritId);
ol.writeString("enum ");
ol.insertMemberAlign();
- md->writeEnumDeclaration(ol,cd,nd,fd,gd);
+ md->writeEnumDeclaration(ol,cd,nd,fd,gd,compoundType);
ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
@@ -409,7 +410,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberList();
first=FALSE;
}
- md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
+ md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId);
break;
}
case MemberType_EnumValue:
@@ -418,7 +419,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{
//printf("EnumValue!\n");
if (first) ol.startMemberList(),first=FALSE;
- md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
+ md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType,inheritedFrom,inheritId);
}
}
break;
@@ -444,7 +445,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberList();
first=FALSE;
}
- md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
+ md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,compoundType);
}
md->setFromAnonymousScope(TRUE);
}
@@ -476,7 +477,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
*/
void MemberList::writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
- const char *title,const char *subtitle, bool showEnumValues,
+ const char *title,const char *subtitle,
+ const DefinitionIntf::DefType compoundType,bool showEnumValues,
bool showInline,ClassDef *inheritedFrom)
{
(void)showEnumValues; // unused
@@ -562,7 +564,7 @@ void MemberList::writeDeclarations(OutputList &ol,
}
else
{
- writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
+ writePlainDeclarations(ol,cd,nd,fd,gd,compoundType,inheritedFrom,inheritId);
}
//printf("memberGroupList=%p\n",memberGroupList);
diff --git a/src/memberlist.h b/src/memberlist.h
index e0d948f..ce5a3d2 100644
--- a/src/memberlist.h
+++ b/src/memberlist.h
@@ -56,11 +56,12 @@ class MemberList : public QList<MemberDef>
void countDocMembers(bool countEnumValues=FALSE);
int countInheritableMembers(ClassDef *inheritedFrom) const;
void writePlainDeclarations(OutputList &ol,
- ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
+ ClassDef *cd,NamespaceDef *nd,FileDef *fd,
+ GroupDef *gd,const DefinitionIntf::DefType compoundType,
ClassDef *inheritedFrom,const char *inheritId);
void writeDeclarations(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
- const char *title,const char *subtitle,
+ const char *title,const char *subtitle,const DefinitionIntf::DefType compoundType,
bool showEnumValues=FALSE,bool showInline=FALSE,
ClassDef *inheritedFrom=0);
void writeDocumentation(OutputList &ol,const char *scopeName,
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index c5fafee..dc5214a 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -965,7 +965,7 @@ MemberList *NamespaceDef::getMemberList(MemberListType lt) const
void NamespaceDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title)
{
MemberList * ml = getMemberList(lt);
- if (ml) ml->writeDeclarations(ol,0,this,0,0,title,0);
+ if (ml) ml->writeDeclarations(ol,0,this,0,0,title,0,DefinitionIntf::TypeNamespace);
}
void NamespaceDef::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title)
diff --git a/src/outputgen.h b/src/outputgen.h
index 0fc7351..52189c2 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -71,8 +71,6 @@ class CodeOutputInterface
virtual void startFontClass(const char *) = 0;
virtual void endFontClass() = 0;
virtual void writeCodeAnchor(const char *name) = 0;
- virtual void linkableSymbol(int line,const char *symName,
- Definition *symDef,Definition *context) = 0;
virtual void setCurrentDoc(Definition *context,const char *anchor,bool isSourceFile) = 0;
virtual void addWord(const char *word,bool hiPriority) = 0;
};
diff --git a/src/outputlist.h b/src/outputlist.h
index 3ce6fe9..59b7f5f 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -493,9 +493,6 @@ class OutputList : public OutputDocInterface
og=outputs->next();
}
}
- void linkableSymbol(int,const char *,Definition *,Definition *) {}
-
-
private:
void debug();
diff --git a/src/pre.l b/src/pre.l
index ab11fb6..b437f5c 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -369,6 +369,7 @@ static bool g_insideCS; // C# has simpler preprocessor
static bool g_isSource;
static bool g_lexInit = FALSE;
+static int g_fenceSize = 0;
static GuardType guardType; // kind of guard for conditional section
//DefineDict* getGlobalDefineDict()
@@ -1669,18 +1670,19 @@ static void startCondSection(const char *sectId)
g_condStack.push(new bool(g_skip));
if (guardType == Guard_Cond)
{
- if (expResult)
+ if (!expResult)
{
g_skip=TRUE;
}
}
else if (guardType == Guard_CondNot)
{
- if (!expResult)
+ if (expResult)
{
g_skip=TRUE;
}
}
+ //printf("startCondSection(%s)=%d expResult=%d\n",sectId,g_skip,expResult);
}
static void endCondSection()
@@ -1795,6 +1797,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x FindDefineArgs
%x ReadString
%x CondLine
+%x SkipCond
%%
@@ -2482,20 +2485,37 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") {
outputArray(yytext,(int)yyleng);
}
-<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
+<SkipCComment>"~~~"[~]* {
+ static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ if (!markdownSupport)
+ {
+ REJECT;
+ }
+ else
+ {
+ outputArray(yytext,(int)yyleng);
+ g_fenceSize=yyleng;
+ BEGIN(SkipVerbatim);
+ }
+ }
+<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"("{"[^}]*"}")?){BN}+ {
outputArray(yytext,(int)yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
}
-<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"){BN}+ {
+<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"("{"[^}]*"}")?){BN}+ {
outputArray(yytext,(int)yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
+ g_fenceSize=0;
if (yytext[1]=='f')
{
g_blockName="f";
}
else
{
- g_blockName=QCString(&yytext[1]).stripWhiteSpace();
+ QCString bn=&yytext[1];
+ int i = bn.find('{'); // for \code{.c}
+ if (i!=-1) bn=bn.left(i);
+ g_blockName=bn.stripWhiteSpace();
}
BEGIN(SkipVerbatim);
}
@@ -2508,7 +2528,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<CondLine>[!()&| \ta-z_A-Z0-9.\-]+ {
startCondSection(yytext);
outputArray(yytext,(int)yyleng);
- BEGIN(g_condCtx);
+ if (g_skip)
+ {
+ BEGIN(SkipCond);
+ }
+ else
+ {
+ BEGIN(g_condCtx);
+ }
}
<SkipCComment,SkipCPPComment>[\\@]"cond"[ \t\r]*/\n {
guardType = Guard_Cond;
@@ -2518,11 +2545,29 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<CondLine>. {
unput(*yytext);
startCondSection(" ");
- BEGIN(g_condCtx);
+ if (g_skip)
+ {
+ BEGIN(SkipCond);
+ }
+ else
+ {
+ BEGIN(g_condCtx);
+ }
}
+<SkipCond>\n { g_yyLineNr++; outputChar('\n'); }
+<SkipCond>. { }
+<SkipCond>[^\/\!*\\@\n]+ { }
+<SkipCond>[\\@]"endcond"/[^a-z_A-Z0-9] {
+ outputArray(yytext,(int)yyleng);
+ endCondSection();
+ }
<SkipCComment,SkipCPPComment>[\\@]"endcond"/[^a-z_A-Z0-9] {
outputArray(yytext,(int)yyleng);
endCondSection();
+ if (!g_skip)
+ {
+ BEGIN(g_condCtx);
+ }
}
<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */
outputArray(yytext,(int)yyleng);
@@ -2535,10 +2580,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipCComment);
}
}
+<SkipVerbatim>"~~~"[~]* {
+ outputArray(yytext,(int)yyleng);
+ if (g_fenceSize==yyleng)
+ {
+ BEGIN(SkipCComment);
+ }
+ }
<SkipVerbatim>"*/"|"/*" {
outputArray(yytext,(int)yyleng);
}
-<SkipCComment,SkipVerbatim>[^*\\@\x06\n\/]+ {
+<SkipCComment,SkipVerbatim>[^*\\@\x06~\n\/]+ {
outputArray(yytext,(int)yyleng);
}
<SkipCComment,SkipVerbatim>\n {
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index eba7bd9..74acd4b 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -19,6 +19,7 @@
#ifndef _PRINTDOCVISITOR_H
#define _PRINTDOCVISITOR_H
+#include <qglobal.h>
#include "docvisitor.h"
/*! Concrete visitor implementation for pretty printing */
diff --git a/src/pycode.h b/src/pycode.h
index 7389985..ef9d47c 100644
--- a/src/pycode.h
+++ b/src/pycode.h
@@ -28,6 +28,7 @@
class CodeOutputInterface;
class FileDef;
class MemberDef;
+class QCString;
class Definition;
extern void parsePythonCode(CodeOutputInterface &,const char *,const QCString &,
diff --git a/src/pycode.l b/src/pycode.l
index 0413f31..19e1119 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -483,13 +483,12 @@ static void codifyLines(char *text)
}
}
-static const char* fileLocation()
+static QCString fileLocation()
{
- const int maxLen=4096;
- static char floc[maxLen+1];
- floc[maxLen]='\0';
- snprintf(floc,maxLen,"%s:%d:%d",g_sourceFileDef?g_sourceFileDef->absFilePath().data():"[unknown]",g_yyLineNr,1);
- return floc;
+ QCString result = g_sourceFileDef?g_sourceFileDef->absFilePath():QCString("[unknown]");
+ result+=":"+QCString().setNum(g_yyLineNr);
+ result+=":"+QCString().setNum(1);
+ return result;
}
static void addDocCrossReference(MemberDef *src,MemberDef *dst)
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 4561cd2..1bdeb55 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1773,21 +1773,6 @@ void RTFGenerator::codify(const char *str)
c=*p++;
-#if 0
- if( MultiByte )
- {
- t << getMultiByte( c );
- MultiByte = FALSE;
- continue;
- }
- if( c >= 0x80 )
- {
- MultiByte = TRUE;
- t << getMultiByte( c );
- continue;
- }
-#endif
-
switch(c)
{
case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
@@ -1800,7 +1785,7 @@ void RTFGenerator::codify(const char *str)
case '{': t << "\\{"; col++; break;
case '}': t << "\\}"; col++; break;
case '\\': t << "\\\\"; col++; break;
- default: t << (char)c; col++; break;
+ default: p=(const unsigned char *)writeUtf8Char(t,(const char *)p-1); col++; break;
}
}
}
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 82f42a3..a580b79 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -257,7 +257,6 @@ class RTFGenerator : public OutputGenerator
void endFontClass() {}
void writeCodeAnchor(const char *) {}
- void linkableSymbol(int,const char *,Definition *,Definition *) {}
void setCurrentDoc(Definition *,const char *,bool) {}
void addWord(const char *,bool) {}
diff --git a/src/scanner.l b/src/scanner.l
index 15e5f86..0423299 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -43,6 +43,8 @@
#include "code.h"
#include "arguments.h"
+#include "clangparser.h"
+
// Toggle for some debugging info
#define DBG_CTX(x) fprintf x
//#define DBG_CTX(x) do { } while(0)
@@ -173,7 +175,6 @@ static QCString g_skipBlockName;
static QCString oldStyleArgType;
static QCString docBackup;
static QCString briefBackup;
-static bool g_inputFromFile;
static int docBlockContext;
static QGString docBlock;
@@ -192,6 +193,8 @@ static QCString g_delimiter;
static int g_column;
+static int g_fencedSize=0;
+
//-----------------------------------------------------------------------------
// forward declarations
@@ -587,19 +590,11 @@ void fixArgumentListForJavaScript(ArgumentList *al)
static int yyread(char *buf,int max_size)
{
int c=0;
- if (g_inputFromFile)
+ while( c < max_size && inputString[inputPosition] )
{
- c = inputFile.readBlock(buf,max_size);
- if (c==-1) yy_fatal_error("input in flex scanner failed");
- }
- else
- {
- while( c < max_size && inputString[inputPosition] )
- {
- *buf = inputString[inputPosition++] ;
- //printf("%d (%c)\n",*buf,*buf);
- c++; buf++;
- }
+ *buf = inputString[inputPosition++] ;
+ //printf("%d (%c)\n",*buf,*buf);
+ c++; buf++;
}
return c;
}
@@ -2128,6 +2123,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN(FindMembers);
}
<FindMembers,FindMemberName>{SCOPENAME} {
+ if (insideCpp || insideObjC)
+ {
+ current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ }
yyBegColNr=yyColNr;
yyBegLineNr=yyLineNr;
lineCount();
@@ -2406,6 +2405,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
*/
<Define>{ID} {
//printf("Define `%s' without args\n",yytext);
+ if (insideCpp || insideObjC)
+ {
+ current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ }
current->bodyLine = yyLineNr;
current->name = yytext;
BEGIN(DefineEnd);
@@ -3336,6 +3339,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<Sharp>. { current->type += *yytext ; }
<FindFields>{ID} {
+ if (insideCpp || insideObjC)
+ {
+ current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ }
current->bodyLine = yyLineNr;
current->name = yytext;
}
@@ -5063,6 +5070,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<CompoundName>{SCOPENAME} {
current->name = yytext ;
+ if (insideCpp || insideObjC)
+ {
+ current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ }
lineCount();
if (current->spec & Entry::Protocol)
{
@@ -5124,6 +5135,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<ClassVar>{ID} {
+ if (insideCpp || insideObjC)
+ {
+ current->id = ClangParser::instance()->lookup(yyLineNr,yytext);
+ }
if (insideIDL && qstrcmp(yytext,"switch")==0)
{
// Corba IDL style union
@@ -5855,6 +5870,12 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
handleCommentBlock(docBlock.data(),FALSE);
BEGIN(docBlockContext);
}
+<DocBlock>^{B}*"*"+/[^/] {
+
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,g_column));
+ docBlock+=indent;
+ }
<DocBlock>^{B}*("//")?{B}*"*"+/[^//a-z_A-Z0-9*] { // start of a comment line
QCString indent;
indent.fill(' ',computeIndent(yytext,g_column));
@@ -5879,18 +5900,26 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
docBlockName.at(1)='}';
}
+ g_fencedSize=0;
BEGIN(DocCopyBlock);
}
<DocBlock>"<"{PRE}">" {
docBlock+=yytext;
docBlockName="<pre>";
+ g_fencedSize=0;
BEGIN(DocCopyBlock);
}
<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9] { // verbatim command (which could contain nested comments!)
docBlock+=yytext;
docBlockName=&yytext[1];
+ g_fencedSize=0;
BEGIN(DocCopyBlock);
}
+<DocBlock>"~~~"[~]* {
+ docBlock+=yytext;
+ g_fencedSize=yyleng;
+ BEGIN(DocCopyBlock);
+ }
<DocBlock>{B}*"<code>" {
if (insideCS)
{
@@ -5903,7 +5932,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
REJECT;
}
}
-<DocBlock>[^@*\/\\\n]+ { // any character that isn't special
+<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
docBlock+=yytext;
}
<DocBlock>\n { // newline
@@ -5946,6 +5975,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
{
REJECT;
}
+ else if (docBlockName=="code")
+ {
+ REJECT;
+ }
else
{
QCString indent;
@@ -5953,7 +5986,26 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
docBlock+=indent;
}
}
-<DocCopyBlock>[^\<@/*\]\$\\\n]+ { // any character that is not special
+<DocCopyBlock>^{B}*"*"+/{BN}* { // start of a comment line
+ if (docBlockName=="code")
+ {
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,0));
+ docBlock+=indent;
+ }
+ else
+ {
+ REJECT;
+ }
+ }
+<DocCopyBlock>"~~~"[~]* {
+ docBlock+=yytext;
+ if (g_fencedSize==yyleng)
+ {
+ BEGIN(DocBlock);
+ }
+ }
+<DocCopyBlock>[^\<@/*\]~\$\\\n]+ { // any character that is not special
docBlock+=yytext;
}
<DocCopyBlock>"/*"|"*/"|"//" {
@@ -6243,7 +6295,6 @@ static void handleParametersCommentBlocks(ArgumentList *al)
static void parseCompounds(Entry *rt)
{
//printf("parseCompounds(%s)\n",rt->name.data());
- g_inputFromFile = FALSE;
EntryListIterator eli(*rt->children());
Entry *ce;
for (;(ce=eli.current());++eli)
@@ -6273,13 +6324,12 @@ static void parseCompounds(Entry *rt)
//current->reset();
if (current) delete current;
current = new Entry;
- initEntry();
gstat = FALSE;
+ initEntry();
int ni=ce->name.findRev("::"); if (ni==-1) ni=0; else ni+=2;
// set default protection based on the compound type
if( ce->section==Entry::CLASS_SEC ) // class
{
-
if (insidePHP || insideD || insideJS)
{
current->protection = protection = Public ;
@@ -6353,11 +6403,9 @@ static void parseCompounds(Entry *rt)
static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
{
initParser();
- //g_inputFromFile = TRUE;
inputString = fileBuf;
inputPosition = 0;
- g_inputFromFile = FALSE;
g_column = 0;
//anonCount = 0; // don't reset per file
@@ -6374,6 +6422,10 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
yyLineNr= 1 ;
yyFileName = fileName;
setContext();
+ if (insideCpp || insideObjC)
+ {
+ ClangParser::instance()->start(fileName);
+ }
rt->lang = language;
msg("Parsing file %s...\n",yyFileName.data());
@@ -6431,6 +6483,11 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
inputFile.close();
anonNSCount++;
+
+ if (insideCpp || insideObjC)
+ {
+ ClangParser::instance()->finish();
+ }
}
}
@@ -6448,20 +6505,17 @@ static void parsePrototype(const QCString &text)
const char *orgInputString;
int orgInputPosition;
YY_BUFFER_STATE orgState;
- bool orgInputFromFile;
// save scanner state
orgState = YY_CURRENT_BUFFER;
yy_switch_to_buffer(yy_create_buffer(scanYYin, YY_BUF_SIZE));
orgInputString = inputString;
orgInputPosition = inputPosition;
- orgInputFromFile = g_inputFromFile;
// set new string
inputString = text;
inputPosition = 0;
g_column = 0;
- g_inputFromFile = FALSE;
scanYYrestart( scanYYin );
BEGIN(Prototype);
scanYYlex();
@@ -6477,7 +6531,6 @@ static void parsePrototype(const QCString &text)
yy_delete_buffer(tmpState);
inputString = orgInputString;
inputPosition = orgInputPosition;
- g_inputFromFile = orgInputFromFile;
//printf("**** parsePrototype end\n");
}
diff --git a/src/search.css b/src/search.css
index e467ae0..a77ab21 100644
--- a/src/search.css
+++ b/src/search.css
@@ -48,7 +48,7 @@
height:19px;
background:url('search_m.png') repeat-x;
border:none;
- width:116px;
+ width:111px;
margin-left:20px;
padding-left:4px;
color: #909090;
diff --git a/src/search_css.h b/src/search_css.h
index 9c3b08a..48c4df9 100644
--- a/src/search_css.h
+++ b/src/search_css.h
@@ -48,7 +48,7 @@
" height:19px;\n"
" background:url('search_m.png') repeat-x;\n"
" border:none;\n"
-" width:116px;\n"
+" width:111px;\n"
" margin-left:20px;\n"
" padding-left:4px;\n"
" color: #909090;\n"
diff --git a/src/settings.h b/src/settings.h
index bd73352..a9fd128 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -1,4 +1,12 @@
#ifndef SETTINGS_H
#define SETTINGS_H
-#define USE_SQLITE3 0
+
+#define USE_SQLITE3 0
+#define USE_LIBCLANG 0
+
+#define IS_SUPPORTED(x) \
+ ((USE_SQLITE3 && strcmp("USE_SQLITE3",(x))==0) || \
+ (USE_LIBCLANG && strcmp("USE_LIBCLANG",(x))==0) || \
+ 0)
+
#endif
diff --git a/src/translator_adapter.h b/src/translator_adapter.h
index adfcdf8..3073517 100644
--- a/src/translator_adapter.h
+++ b/src/translator_adapter.h
@@ -2,12 +2,13 @@
#define TRANSLATOR_ADAPTER_H
#include "version.h"
+#include "translator.h"
/** Base of the translator adapter tree.
*
* This abstract class provides access to the english
* translations, to be used as a substitute for not implemented
- * local translations.
+ * local translations.
*/
class TranslatorAdapterBase : public Translator
{
@@ -22,18 +23,18 @@ class TranslatorAdapterBase : public Translator
const QCString & versionString)
{
return QCString("Warning: The selected output language \"")
- + languageName
+ + languageName
+ "\" has not been updated\nsince "
+ versionString
+ ". As a result some sentences may appear in English.\n\n";
}
-
+
public:
/*! This method is used to generate a warning message to signal
* the user that the translation of his/her language of choice
* needs updating. It must be implemented by the translator
* adapter class (pure virtual).
- *
+ *
* \sa createUpdateNeededMessage()
*/
virtual QCString updateNeededMessage() = 0;
@@ -69,8 +70,8 @@ class TranslatorAdapter_1_8_2 : public TranslatorAdapterBase
};
-/** Adapter class for languages that only contain translations upto
- * version 1.8.0.
+/** Adapter class for languages that only contain translations upto
+ * version 1.8.0.
*/
class TranslatorAdapter_1_8_0 : public TranslatorAdapter_1_8_2
{
@@ -101,7 +102,7 @@ class TranslatorAdapter_1_8_0 : public TranslatorAdapter_1_8_2
};
-/** Adapter class for languages that only contain translations upto
+/** Adapter class for languages that only contain translations upto
* version 1.7.5.
*/
class TranslatorAdapter_1_7_5 : public TranslatorAdapter_1_8_0
@@ -120,7 +121,7 @@ class TranslatorAdapter_1_7_5 : public TranslatorAdapter_1_8_0
{ return english.trDirDepGraph(name); }
};
-/** Adapter class for languages that only contain translations upto
+/** Adapter class for languages that only contain translations upto
* version 1.6.3.
*/
class TranslatorAdapter_1_6_3 : public TranslatorAdapter_1_7_5
@@ -141,7 +142,7 @@ class TranslatorAdapter_1_6_3 : public TranslatorAdapter_1_7_5
{ return english.trDateTime(year,month,day,dayOfWeek,hour,minutes,seconds,includeTime); }
};
-/** Adapter class for languages that only contain translations upto
+/** Adapter class for languages that only contain translations upto
* version 1.6.0.
*/
class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_6_3
@@ -166,7 +167,7 @@ class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_6_3
{ return english.trNoMatches(); }
};
-/** Adapter class for languages that only contain translations upto
+/** Adapter class for languages that only contain translations upto
* version 1.5.4
*/
class TranslatorAdapter_1_5_4 : public TranslatorAdapter_1_6_0
@@ -245,7 +246,7 @@ class TranslatorAdapter_1_5_4 : public TranslatorAdapter_1_6_0
{ return english.trTypeConstraints(); }
};
-/** Adapter class for languages that only contain translations upto
+/** Adapter class for languages that only contain translations upto
* version 1.4.6
*/
class TranslatorAdapter_1_4_6 : public TranslatorAdapter_1_5_4
@@ -264,18 +265,5 @@ class TranslatorAdapter_1_4_6 : public TranslatorAdapter_1_5_4
}
};
-/** Adapter class for languages that only contain translations upto
- * version 1.4.1
- */
-class TranslatorAdapter_1_4_1 : public TranslatorAdapter_1_4_6
-{
- public:
- virtual QCString updateNeededMessage()
- { return createUpdateNeededMessage(idLanguage(),"release 1.4.1"); }
-
- virtual QCString trOverloadText()
- { return english.trOverloadText(); }
-};
-
#endif
diff --git a/src/translator_ua.h b/src/translator_ua.h
index 0b65aea..6ac1681 100644
--- a/src/translator_ua.h
+++ b/src/translator_ua.h
@@ -3,8 +3,8 @@
* Copyright (C) 1997-2013 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
+ * 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.
*
@@ -13,26 +13,14 @@
*
* The translation into Ukrainian was provided by
* Olexij Tkatchenko (olexij.tkatchenko@parcs.de)
+ * Petro Yermolenko (python@i.ua)
*/
#ifndef TRANSLATOR_UA_H
#define TRANSLATOR_UA_H
-class TranslatorUkrainian : public TranslatorAdapter_1_4_1
+class TranslatorUkrainian : public Translator
{
- private:
- /*! The Decode() inline assumes the source written in the
- Koi8-U encoding (maintainer dependent).
- */
- inline QCString decode(const QCString & sInput)
- {
-//#ifdef _WIN32
-// return Koi8RToWindows1251(sInput);
-//#else
- return sInput;
-//#endif
- }
-
public:
/*! Used for identification of the language. */
virtual QCString idLanguage()
@@ -41,155 +29,143 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/* Used to get the command(s) for the language support. */
virtual QCString latexLanguageSupportCommand()
{
-//#ifdef _WIN32
-// return "\\usepackage[cp1251]{inputenc}\n\\usepackage[ukrainian]{babel}\n";
-//#else
- return "\\usepackage[T2A]{fontenc}\n\\usepackage[ukrainian]{babel}\n";
-//#endif
+ return "\\usepackage[T2A]{fontenc}\n\\usepackage[ukrainian]{babel}\n";
}
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{
-//#ifdef _WIN32
-// return "Windows-1251";
-//#else
- return "koi8-u";
-//#endif
+ return "utf-8";
}
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
- { return decode("ҦΦ æ"); }
+ { return "Споріднені фукції"; }
/*! subscript for the related functions. */
virtual QCString trRelatedSubscript()
- { return decode("( )"); }
+ { return "(не методи компонент)"; }
/*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription()
- { return decode(" "); }
+ { return "Детальний опис"; }
/*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation()
- { return decode(" Ц "); }
+ { return "Опис типів користувача"; }
/*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation()
- { return decode(" ̦˦ "); }
+ { return "Опис переліків користувача"; }
/*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
- { return decode(" Ħ "); }
+ { return "Опис методів компонент"; }
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( "" );
+ return "Поля" ;
}
else
{
- return decode( "Φ Φ" );
+ return "Компонентні дані" ;
}
}
/*! this is the text of a link put after brief descriptions. */
virtual QCString trMore()
- { return decode("Φ..."); }
+ { return "Детальніше..."; }
/*! put in the class documentation */
/* Dosn't use when optimization for C is on. */
virtual QCString trListOfAllMembers()
{
- return decode( " Ӧ Ԧ" );
+ return "Список всіх елементів" ;
}
/*! used as the title of the "list of all members" page of a class */
/* Dosn't use when optimization for C is on. */
virtual QCString trMemberList()
{
- return decode( "C Ԧ" );
+ return "Cписок елементів" ;
}
/*! this is the first part of a sentence that is followed by a class name */
/* Dosn't use when optimization for C is on. */
virtual QCString trThisIsTheListOfAllMembers()
- { return decode(" Ԧ"); }
+ { return "Повний список елементів"; }
/*! this is the remainder of the sentence after the class name */
/* Dosn't use when optimization for C is on. */
virtual QCString trIncludingInheritedMembers()
- { return decode(", Ӧ Φ "); }
+ { return ", включаючи всі успадковані елементи"; }
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
virtual QCString trGeneratedAutomatically(const char *s)
- { QCString result=decode(" Doxygen");
- if (s) result+=decode(" ")+s;
- result+=decode(" .");
+ { QCString result="Автоматично створено за допомогою Doxygen";
+ if (s) result+=QCString(" для ")+s;
+ result+=" з тексту програми.";
return result;
}
/*! put after an enum name in the list of all members */
virtual QCString trEnumName()
- { return decode("̦"); }
+ { return "Перелік"; }
/*! put after an enum value in the list of all members */
virtual QCString trEnumValue()
- { return decode(" ̦"); }
+ { return "Елемент переліку"; }
/*! put after an undocumented member in the list of all members */
virtual QCString trDefinedIn()
- { return decode(" "); }
+ { return "визначено в "; }
// quick reference sections
- /*! This is put above each page as a link to the list of all groups of
+ /*! This is put above each page as a link to the list of all groups of
* compounds or files (see the \\group command).
*/
virtual QCString trModules()
- { return decode("Φ ̦"); }
+ { return "Програмні модулі"; }
/*! This is put above each page as a link to the class hierarchy */
virtual QCString trClassHierarchy()
- { return decode("Ȧ Ӧ"); }
+ { return "Ієрархія класів"; }
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( " " );
+ return "Структури даних" ;
}
else
{
- return decode( "" );
+ return "Класи" ;
}
}
/*! This is put above each page as a link to the list of documented files */
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("Φ "); }
+ { return "Файли"; }
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( " " );
+ return "Поля структур" ;
}
else
{
- return decode( " Ӧ" );
+ return "Елементи класів" ;
}
}
@@ -197,34 +173,34 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*??*/
virtual QCString trFileMembers()
{
- return decode( " " );
+ return "Елементи файлу" ;
}
/*! This is put above each page as a link to all related pages. */
virtual QCString trRelatedPages()
- /* ?? ". : " , ,
- . */
- { return decode(" æ"); }
+ /* ?? Вариант перевода "См. также: " более удачный, но не в заголовке,
+ как в данном случае. */
+ { return "Додаткова інформація"; }
/*! This is put above each page as a link to all examples. */
virtual QCString trExamples()
- { return decode(""); }
+ { return "Приклади"; }
/*! This is put above each page as a link to the search engine. */
virtual QCString trSearch()
- { return decode(""); }
+ { return "Пошук"; }
/*! This is an introduction to the class hierarchy. */
virtual QCString trClassHierarchyDescription()
- { return decode(" צ"); }
+ { return "Список успадкувань впорядковано наближено до алфавіту"; }
/*! This is an introduction to the list with all files. */
virtual QCString trFileListDescription(bool extractAll)
{
- QCString result=" ";
- if (!extractAll) result+=" ";
- result+="̦.";
- return decode(result);
+ QCString result="Повний список ";
+ if (!extractAll) result+="документованих ";
+ result+="файлів.";
+ return result;
}
/*! This is an introduction to the annotated compound list. */
@@ -232,117 +208,106 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( " ." );
+ return "Структури даних з коротким описом." ;
}
else
{
- return decode( ", , ' ." );
+ return "Класи, структури, об'єднання та інтерфейси з коротким описом." ;
}
}
/*! This is an introduction to the page with all class members. */
virtual QCString trCompoundMembersDescription(bool extractAll)
{
- QCString result=" Ӧ ";
- if(!extractAll) result+=" ";
+ QCString result="Список всіх ";
+ if(!extractAll) result+="документоаних ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- result+="Ԧ ";
+ result+="елементів структур даних з посиланням на ";
else
- result+="Ԧ Ӧ ";
+ result+="елементів класів даних з посиланням на ";
if(extractAll)
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- result+="æ Ҧ/' .";
+ result+="документацію по структурі/об'єднанню кожного елементу.";
else
- result+="æ .";
+ result+="документацію по класу кожного елементу.";
}
else
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- result += "צצΦ ";
+ result += "відповідні структури";
else
- result += "צצΦ ";
- result+=", .";
+ result += "відповідні класи";
+ result+=", до яких вони належать.";
}
- return decode( result );
+ return result ;
}
/*! This is an introduction to the page with all file members. */
virtual QCString trFileMembersDescription(bool extractAll)
{
- QCString result=" Ӧ ";
- if (!extractAll) result+=" ";
+ QCString result="Список всіх ";
+ if (!extractAll) result+="документованих ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- result+="æ, ͦ, , "
- "̦˦ Ц";
+ result+="функцій, змінних, макровизначень, "
+ "переліків і визначень типів";
}
else
{
- result+="Ԧ ̦ ";
+ result+="елементів файлів ";
}
- result+=" ";
+ result+=" з посиланям на ";
if (extractAll)
- result+=", .";
+ result+="файли, до яких вони належать.";
else
- result+="æ.";
- return decode( result );
+ result+="документацію.";
+ return 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(" Ħ."); }
+ { return "Повний список прикладів."; }
/*! This is an introduction to the page with the list of related pages */
virtual QCString trRelatedPagesDescription()
- { return decode(" Ӧ."); }
+ { return "Повний список додаткових описів."; }
/*! This is an introduction to the page with the list of class/file groups */
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)
+ { return "Повний список модулів."; }
+ // index titles (the project name is prepended for these)
/*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation()
- { return decode("æ"); }
+ { return "Документація"; }
- /*! This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* index of all groups.
*/
virtual QCString trModuleIndex()
- { return decode("צ ̦"); }
+ { return "Алфавітний покажчик модулів"; }
- /*! This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* class hierarchy.
*/
virtual QCString trHierarchicalIndex()
- { return decode("Ȧ Ӧ"); }
+ { return "Ієрархічний покажчик класів"; }
- /*! This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* annotated compound index.
*/
virtual QCString trCompoundIndex()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( "צ " );
+ return "Алфавітний покажчик структур даних" ;
}
else
{
- return decode( "צ Ӧ" );
+ return "Алфавітний покажчик класів" ;
}
}
@@ -350,13 +315,13 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
* list of all files.
*/
virtual QCString trFileIndex()
- { return decode( " " ); }
+ { return "Покажчик файлв" ; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all groups.
*/
virtual QCString trModuleDocumentation()
- { return decode("Φ ̦"); }
+ { return "Програмні Модулі"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions.
@@ -365,11 +330,11 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( " " );
+ return "Структури даних" ;
}
else
{
- return decode( "" );
+ return "Класи" ;
}
}
@@ -377,230 +342,214 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
* the documentation of all files.
*/
virtual QCString trFileDocumentation()
- { return decode(""); }
+ { return "Файли"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples.
*/
virtual QCString trExampleDocumentation()
- { return decode(""); }
+ { return "Приклади"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages.
*/
virtual QCString trPageDocumentation()
- { return decode("æ ͦ"); }
+ { return "Документація по темі"; }
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
- { return decode("צ Ӧ"); }
+ { return "Довідковий посібник"; }
- /*! This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of defines
*/
virtual QCString trDefines()
- { return decode(""); }
+ { return "Макровизначення"; }
- /*! This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of function prototypes
*/
virtual QCString trFuncProtos()
- { return decode(" æ"); }
+ { return "Прототипи фукцій"; }
- /*! This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of typedefs
*/
virtual QCString trTypedefs()
- { return decode(" Ц"); }
+ { return "Визначення типів"; }
- /*! This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of enumerations
*/
virtual QCString trEnumerations()
- { return decode("̦"); }
+ { return "Переліки"; }
- /*! This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of (global) functions
*/
virtual QCString trFunctions()
- { return decode("æ"); }
+ { return "Функції"; }
- /*! This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trVariables()
- { return decode("ͦΦ"); }
+ { return "Змінні"; }
- /*! This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trEnumerationValues()
- { return decode(" ̦˦"); }
+ { return "Елементи переліків"; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
virtual QCString trDefineDocumentation()
- { return decode(" "); }
+ { return "Опис макровизначень"; }
- /*! This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes
*/
virtual QCString trFunctionPrototypeDocumentation()
- { return decode(" Ц æ"); }
+ { return "Опис прототипів функцій"; }
- /*! This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs
*/
virtual QCString trTypedefDocumentation()
- { return decode(" Ц"); }
+ { return "Опис визначень типів"; }
- /*! This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types
*/
virtual QCString trEnumerationTypeDocumentation()
- { return decode(" ̦˦"); }
+ { return "Опис переліків"; }
- /*! 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
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
virtual QCString trFunctionDocumentation()
- { return decode(" æ"); }
+ { return "Опис функцій"; }
- /*! This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables
*/
virtual QCString trVariableDocumentation()
- { return decode(" ͦ"); }
+ { return "Опис змінних"; }
- /*! This is used in the documentation of a file/namespace/group before
+ /*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds
*/
virtual QCString trCompounds()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( " " );
+ return "Структури даних" ;
}
else
- {
- return decode( "" );
+ {
+ return "Класи" ;
}
}
- /*! This is used in the documentation of a group before the list of
+ /*! This is used in the documentation of a group before the list of
* links to documented files
*/
- /*! This is used in the standard footer of each page and indicates when
- * the page was generated
+ /*! This is used in the standard footer of each page and indicates when
+ * the page was generated
*/
virtual QCString trGeneratedAt(const char *date,const char *projName)
- {
- QCString result=decode("æ ");
- if (projName) result+=decode(" ")+projName;
- result+=decode(" ")+date;
- result+=decode(" ");
+ {
+ QCString result="Документація ";
+ if (projName) result+=QCString("до ")+projName;
+ result+=QCString(" створена ")+date;
+ result+=" системою";
return result;
}
/*! This is part of the sentence used in the standard footer of each page.
*/
virtual QCString trWrittenBy()
{
- return decode(":");
+ return "Автор:";
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const char *clName)
{
- return decode(" ")+clName;
+ return QCString("Схема успадкувань для ")+clName;
}
/*! this text is generated when the \\internal command is used. */
virtual QCString trForInternalUseOnly()
- { return decode(" Ҧ "); }
-
- /*! this text is generated when the \\reimp command is used. */
- virtual QCString trReimplementedForInternalReasons()
- /*??*/
- { return decode("ͦ ҦΦ . ͦ API.");
- }
+ { return "Тільки для внутрішнього користування"; }
/*! 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(" "); }
+ { return "Застереження"; }
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
- { return decode("Ӧ"); }
+ { return "Версія"; }
/*! this text is generated when the \\date command is used. */
virtual QCString trDate()
- { return decode(""); }
+ { return "Дата"; }
/*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
- { return decode(""); }
+ { return "Повертає"; }
/*! this text is generated when the \\sa command is used. */
virtual QCString trSeeAlso()
- { return decode(". "); }
+ { return "Див. також"; }
/*! this text is generated when the \\param command is used. */
virtual QCString trParameters()
- { return decode(""); }
+ { return "Аргументи"; }
/*! this text is generated when the \\exception command is used. */
virtual QCString trExceptions()
- { return decode(" æ"); }
+ { return "Обробка виняткових ситуацій"; }
/*! this text is used in the title page of a LaTeX document. */
virtual QCString trGeneratedBy()
- { return decode(" "); }
-
+ { return "Створено системою"; }
+
//////////////////////////////////////////////////////////////////////////
-// new since 0.49-990307
+// new since 0.49-990307
//////////////////////////////////////////////////////////////////////////
-
+
/*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList()
- { return decode("Ԧ "); }
+ { return "Простір імен"; }
/*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool extractAll)
{
- QCString result=" ̦ ";
- if (!extractAll) result+=" ";
- result+="Ҧ .";
- return decode(result);
+ QCString result="Повний список ";
+ if (!extractAll) result+="документованих ";
+ result+="просторів імен.";
+ return result;
}
/*! used in the class documentation as a header before the list of all
* friends of a class
*/
virtual QCString trFriends()
- { return decode("Φ "); }
+ { return "Дружні класи"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
-
+
/*! used in the class documentation as a header before the list of all
- * related classes
+ * related classes
*/
virtual QCString trRelatedFunctionDocumentation()
- { return decode(" Φ Ӧ צצ æ"); }
-
+ { return "Документация до дружніх класів та відповідних функцій"; }
+
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
@@ -611,70 +560,70 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
bool isTemplate)
{
QCString result;
- if (isTemplate)
+ if (isTemplate)
{
- result=" ";
+ result="Шаблон ";
switch(compType)
{
- case ClassDef::Class: result+=""; break;
- case ClassDef::Struct: result+=""; break;
- case ClassDef::Union: result+="'"; break;
- case ClassDef::Interface: result+=""; break;
- case ClassDef::Protocol: result+=""; break;
- case ClassDef::Category: result+="Ҧ"; break;
- case ClassDef::Exception: result+=""; break;
+ case ClassDef::Class: result+="класу"; break;
+ case ClassDef::Struct: result+="структури"; break;
+ case ClassDef::Union: result+="об'єднання"; break;
+ case ClassDef::Interface: result+="інтерфейсу"; break;
+ case ClassDef::Protocol: result+="протоколу"; break;
+ case ClassDef::Category: result+="категорії"; break;
+ case ClassDef::Exception: result+="Виняток"; break;
}
}
else
{
switch(compType)
{
- case ClassDef::Class: result+=""; break;
- case ClassDef::Struct: result+=""; break;
- case ClassDef::Union: result+="'"; break;
- case ClassDef::Interface: result+=""; break;
- case ClassDef::Protocol: result+=""; break;
- case ClassDef::Category: result+="Ҧ"; break;
- case ClassDef::Exception: result+=""; break;
+ case ClassDef::Class: result+="Клас"; break;
+ case ClassDef::Struct: result+="Структура"; break;
+ case ClassDef::Union: result+="Об'єднання"; break;
+ case ClassDef::Interface: result+="Інтерфейс"; break;
+ case ClassDef::Protocol: result+="Протокол"; break;
+ case ClassDef::Category: result+="Категорія"; break;
+ case ClassDef::Exception: result+="Виняток"; break;
}
}
result+=" ";
- return decode(result)+clName;
+ return result+clName;
}
/*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName)
{
- return decode(" ")+fileName;
+ return QCString("Файл ")+fileName;
}
/*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName)
{
- return decode("Ԧ ")+namespaceName;
+ return QCString("Простір імен ")+namespaceName;
}
-
+
virtual QCString trPublicMembers()
- { return decode("Φ "); }
+ { return "Загальнодоступні елементи"; }
virtual QCString trPublicSlots()
- { return decode("Φ "); }
+ { return "Загальнодоступні слоти"; }
virtual QCString trSignals()
- { return decode(""); }
+ { return "Сигнали"; }
virtual QCString trStaticPublicMembers()
- { return decode("Φ Φ "); }
+ { return "Загальнодоступні статичні елементи"; }
virtual QCString trProtectedMembers()
- { return decode("Φ "); }
+ { return "Захищені елементи"; }
virtual QCString trProtectedSlots()
- { return decode("Φ "); }
+ { return "Захищені слоти"; }
virtual QCString trStaticProtectedMembers()
- { return decode("Φ Φ "); }
+ { return "Захищені статичні елементи"; }
virtual QCString trPrivateMembers()
- { return decode("Φ "); }
+ { return "Приватні елементи"; }
virtual QCString trPrivateSlots()
- { return decode("Φ "); }
+ { return "Приватні слоти"; }
virtual QCString trStaticPrivateMembers()
- { return decode("Φ Φ "); }
-
+ { return "Приватні статичні елементи"; }
+
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
*/
@@ -683,29 +632,29 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
QCString result;
int i;
// the inherits list contain `numEntries' classes
- for (i=0;i<numEntries;i++)
+ for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
- result+=generateMarker(i); // generate marker for entry i in the list
+ result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
-
+
if (i!=numEntries-1) // not the last entry, so we need a separator
{
- if (i<numEntries-2) // not the fore last entry
+ if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
- result+=decode( " " );
+ result+= " і " ;
}
}
- return result;
+ return result;
}
-
+
/*! used in class documentation to produce a list of base classes,
* if class diagrams are disabled.
*/
virtual QCString trInheritsList(int numEntries)
{
- return decode("դ ")+trWriteList(numEntries)+".";
+ return "Успадковує клас "+trWriteList(numEntries)+".";
}
/*! used in class documentation to produce a list of super classes,
@@ -713,15 +662,15 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
*/
virtual QCString trInheritedByList(int numEntries)
{
- return decode(" ")+trWriteList(numEntries)+".";
+ return "Успадковано класами "+trWriteList(numEntries)+".";
}
- /*! used in member documentation blocks to produce a list of
+ /*! used in member documentation blocks to produce a list of
* members that are hidden by this one.
*/
virtual QCString trReimplementedFromList(int numEntries)
{
- return decode(" ")+trWriteList(numEntries)+".";
+ return "Переозначення з "+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
@@ -729,37 +678,37 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
*/
virtual QCString trReimplementedInList(int numEntries)
{
- return decode(" ")+trWriteList(numEntries)+".";
+ return "Переозначається в "+trWriteList(numEntries)+".";
}
/*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers()
- { return decode(" "); }
+ { return "Елементи простору імен"; }
/*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll)
{
- QCString result=" ̦ ";
- if (!extractAll) result+=" ";
- result+="Ԧ ";
- if (extractAll)
- result+=" æ :";
- else
- result+=" Ԧ :";
- return decode(result);
+ QCString result="Повний список ";
+ if (!extractAll) result+="документованих ";
+ result+="елеметів простору імен з посиланням ";
+ if (extractAll)
+ result+="на документацію для кожного елементу:";
+ else
+ result+="на простір імен до якого вони належать:";
+ return result;
}
- /*! This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* index of all namespaces.
*/
virtual QCString trNamespaceIndex()
- { return decode("צ "); }
+ { return "Алфавітний покажчик простору імен"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces.
*/
virtual QCString trNamespaceDocumentation()
- { return decode(" "); }
+ { return "Опис простору імен"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990522
@@ -769,7 +718,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
* namespaces in a file.
*/
virtual QCString trNamespaces()
- { return decode( " " ); }
+ { return "Простори імен" ; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990728
@@ -782,41 +731,41 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"æ ";
+ QCString result=(QCString)"Документація ";
switch(compType)
{
case ClassDef::Class:
- if (single) result+=" "; else result+=" Ӧ";
+ if (single) result+="цього класу"; else result+="цих класів";
break;
case ClassDef::Struct:
- if (single) result+="æ "; else result+=" ";
+ if (single) result+="цієї структури"; else result+="цих структур";
break;
case ClassDef::Union:
- if (single) result+=" '"; else result+=" '";
+ if (single) result+="цього об'єднання"; else result+="цих об'єднань";
break;
case ClassDef::Interface:
- if (single) result+=" "; else result+=" Ӧ";
+ if (single) result+="цього інтерфейсу"; else result+="цих інтерфейсів";
+ break;
+ case ClassDef::Protocol:
+ if (single) result+="цього протоколу"; else result+="цих протоколів";
break;
- case ClassDef::Protocol:
- if (single) result+=" "; else result+=" ̦";
- break;
case ClassDef::Category:
- if (single) result+="æ Ҧ"; else result+=" Ҧ";
- break;
+ if (single) result+="цієї категорії"; else result+="цих категорій";
+ break;
case ClassDef::Exception:
- if (single) result+=" "; else result+=" ˦";
+ if (single) result+="цього винятку"; else result+="цих винятків";
break;
}
- result+=" ";
- if (single) result+=":"; else result+=":";
- return decode(result);
+ result+=" була створена з файл";
+ if (single) result+="у:"; else result+="ів:";
+ return result;
}
/*! This is in the (quick) index as a link to the alphabetical compound
* list.
*/
virtual QCString trAlphabeticalList()
- { return decode("צ "); }
+ { return "Алфавітний покажчик"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990901
@@ -824,34 +773,30 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! This is used as the heading text for the retval command. */
virtual QCString trReturnValues()
- { return decode(", "); }
+ { return "Значення, що повертаються"; }
/*! This is in the (quick) index as a link to the main page (index.html)
*/
virtual QCString trMainPage()
- { return decode(" Ҧ"); }
+ { return "Титульна сторінка"; }
- /*! This is used in references to page that are put in the LaTeX
+ /*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page.
*/
virtual QCString trPageAbbreviation()
- { return decode("."); }
+ { return "стор."; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-991106
//////////////////////////////////////////////////////////////////////////
- virtual QCString trSources()
- {
- return decode("ȦΦ .");
- }
virtual QCString trDefinedAtLineInSourceFile()
{
- return decode(". ̦ @1, @0");
+ return "Див. визначення в файлі @1, рядок @0";
}
virtual QCString trDefinedInSourceFile()
{
- return decode(". ̦ @0");
+ return "Див. визначення в файлі @0";
}
//////////////////////////////////////////////////////////////////////////
@@ -860,7 +805,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
virtual QCString trDeprecated()
{
- return decode(" ");
+ return "Не рекомендовано";
}
//////////////////////////////////////////////////////////////////////////
@@ -870,120 +815,120 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const char *clName)
{
- return (QCString)decode(" '˦ ")+clName+":";
+ return (QCString)"Діаграма зв'язків класу "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const char *fName)
{
- return decode(" ̦ ")+fName+":";
+ return QCString("Діаграма включених заголовочних файлів для ")+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
- return decode("()");
+ return "Конструктор(и)";
}
/*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode()
{
- return decode(". ȦΦ .");
+ return "Див. вихідні тексти.";
}
/*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation()
{
- return decode(". æ.");
+ return "Див. документацію.";
}
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
- return decode("");
+ return "Передумови";
}
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
- return decode("");
+ return "Післяумови";
}
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
- return decode("Ҧ");
+ return "Інваріант";
}
/*! Text shown before a multi-line variable/enum initialization */
virtual QCString trInitialValue()
{
- return decode("צ ");
+ return "Початкові значення";
}
/*! Text used the source code in the file index */
virtual QCString trCode()
{
- return decode("ȦΦ ");
+ return "Вихідні тексти";
}
virtual QCString trGraphicalHierarchy()
{
- return decode("Ʀ Ȧ Ӧ");
+ return "Графічна ієрархія класів";
}
virtual QCString trGotoGraphicalHierarchy()
{
- return decode(". Ʀ Ȧ");
+ return "див. графічну ієрархію";
}
virtual QCString trGotoTextualHierarchy()
{
- return decode(". Ȧ");
+ return "див. текстову ієрархію";
}
virtual QCString trPageIndex()
{
- return decode("צ Ӧ");
+ return "Алфавітний покажчик тематичних описів";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.0
//////////////////////////////////////////////////////////////////////////
-
+
virtual QCString trNote()
{
- return decode("");
+ return "Нотатки";
}
virtual QCString trPublicTypes()
{
- return decode("Φ ");
+ return "Загальнодоступні типи";
}
virtual QCString trPublicAttribs()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( " " );
+ return "Поля даних" ;
}
else
{
- return decode( "Φ " );
+ return "Загальнодоступні атрибути" ;
}
}
virtual QCString trStaticPublicAttribs()
{
- return decode("Φ Φ Φ");
+ return "Статичні загальнодоступні данні";
}
virtual QCString trProtectedTypes()
{
- return decode("Φ ");
+ return "Захищені типи";
}
virtual QCString trProtectedAttribs()
{
- return decode("Φ Φ");
+ return "Захищені дані";
}
virtual QCString trStaticProtectedAttribs()
{
- return decode("Φ Φ Φ");
+ return "Статичні захищені дані";
}
virtual QCString trPrivateTypes()
{
- return decode("Φ ");
+ return "Приватні типи";
}
virtual QCString trPrivateAttribs()
{
- return decode("Φ Φ");
+ return "Приватні дані";
}
virtual QCString trStaticPrivateAttribs()
{
- return decode("Φ Φ Φ");
+ return "Приватні статичні дані";
}
@@ -995,13 +940,13 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
virtual QCString trTodo()
/*??*/
{
- return decode("Ȧ ");
+ return "Необхідно зробити";
}
/*! Used as the header of the todo list */
virtual QCString trTodoList()
/*??*/
{
- return decode("̦ ");
+ return "Список завдань";
}
//////////////////////////////////////////////////////////////////////////
@@ -1010,26 +955,26 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
virtual QCString trReferencedBy()
{
- return decode(" ");
+ return "Вживається в";
}
virtual QCString trRemarks()
{
- return decode(".");
+ return "Прим.";
}
virtual QCString trAttention()
{
- return decode("");
+ return "Увага";
}
virtual QCString trInclByDepGraph()
{
- return decode(" ̦, ˦ :");
+ return "Граф файлів, які включають цей файл:";
}
virtual QCString trSince()
/*??*/
{
- return decode(" ");
+ return "Починаючи з";
}
-
+
//////////////////////////////////////////////////////////////////////////
// new since 1.1.5
//////////////////////////////////////////////////////////////////////////
@@ -1037,32 +982,32 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! title of the graph legend page */
virtual QCString trLegendTitle()
{
- return decode("");
+ return "Легенда";
}
/*! page explaining how the dot graph's should be interpreted */
virtual QCString trLegendDocs()
{
- return decode(
- ", .<p>\n"
- " :\n"
+ return
+ "Позначення, що використовуються у графах.<p>\n"
+ "Розглянемо наступний приклад:\n"
"\\code\n"
- "/*! Ҧ */\n"
+ "/*! Невидимий клас через зрізання */\n"
"class Invisible { };\n\n"
- "/*! , צ */\n"
+ "/*! Обмежений клас, відношення успадкування приховане */\n"
"class Truncated : public Invisible { };\n\n"
- "/* */\n"
+ "/* Недокументований клас */\n"
"class Undocumented { };\n\n"
- "/*! */\n"
+ "/*! Загальнодоступне успадкування */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! A template class */\n"
"template<class T> class Templ { };\n\n"
- "/*! */\n"
+ "/*! Захищене успадкування */\n"
"class ProtectedBase { };\n\n"
- "/*! */\n"
+ "/*! Приватне успадкування */\n"
"class PrivateBase { };\n\n"
- "/*! , դ Inherited */\n"
+ "/*! Клас, що використовується класом Inherited */\n"
"class Used { };\n\n"
- "/*! , դ ۦ */\n"
+ "/*! Клас, що успадковує інші класи */\n"
"class Inherited : public PublicBase,\n"
" protected ProtectedBase,\n"
" private PrivateBase,\n"
@@ -1073,51 +1018,50 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
- " \\c MAX_DOT_GRAPH_HEIGHT Ʀæ ̦ "
- " 200, :"
+ "Таким чином, отримуємо наступний граф:"
"<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n"
"<p>\n"
- " Ʀ ͦ:\n"
+ "Прямокутники в цьому графі мають наступний зміст:\n"
"<ul>\n"
- "<li> צ , "
- " .\n"
- "<li> צ .\n"
- "<li> Ӧ צ .\n"
- "<li> צ , \n"
- " Ӧ Цצ /ͦ Φ. Ҧ, "
- " צ ͦ Φ ֦."
+ "<li>Заповнений чорний прямокутник відображає структуру або клас, "
+ "для якого створено граф.\n"
+ "<li>Прямокутник з чорною межею відображає документовану структуру або клас.\n"
+ "<li>Прямокутник з сірою межею відображає недокументовану структуру або клас.\n"
+ "<li>Прямокутник з червоною межею відображає документовану структуру або клас, для яких\n"
+ " не всі співвідношення успадкування/змісту показані. Граф зрізаниЙ, "
+ "якщо він не вміщається у вказані межі."
"</ul>\n"
- "Ҧ ͦ:\n"
+ "Стрілки мають наступний зміст:\n"
"<ul>\n"
- "<li> Ҧ צ צ "
- "ͦ .\n"
- "<li> Ҧ դ Φ.\n"
- "<li> Ҧ դ Φ.\n"
- "<li> Ҧ դ, ͦ "
- " Ӧ դ."
- "Ҧ դ ͦ, "
- " צ ϧ . \n"
- "</ul>\n");
+ "<li>Темносиня стрілка відображає відношення загальнодоступного успадкування "
+ "між двома класами.\n"
+ "<li>Темнозелена стрілка використовується при захищеному успадкуванні.\n"
+ "<li>Темночервона стрілка використовується при приватному успадкуванні.\n"
+ "<li>Пурпурна стрілка використовується, якщо клас міститься в"
+ "іншому класі або ним використовується."
+ "Стрілка етикетується змінною, "
+ "через яку відбувається доступ до вказаної структури або класу. \n"
+ "</ul>\n";
}
/*! text for the link to the legend page */
virtual QCString trLegend()
{
- return decode(". ");
+ return "див. легенду";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
-
+
/*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
- return decode("");
+ return "Тест";
}
/*! Used as the header of the test list */
virtual QCString trTestList()
{
- return decode("̦ Ԧ");
+ return "Список тестів";
}
//////////////////////////////////////////////////////////////////////////
@@ -1127,7 +1071,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! Used as a section header for KDE-2 IDL methods */
virtual QCString trDCOPMethods()
{
- return decode("DCOP ");
+ return "DCOP Методи";
}
//////////////////////////////////////////////////////////////////////////
@@ -1137,79 +1081,69 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
- return decode("Ԧ");
+ return "Властивості";
}
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
- return decode(" ̦ ");
+ return "Повний список властивостей";
}
//////////////////////////////////////////////////////////////////////////
// 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()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- return decode( " " );
+ return "Структури даних" ;
}
else
{
- return decode( "" );
+ return "Класи" ;
}
}
/*! Used as the title of a Java package */
virtual QCString trPackage(const char *name)
{
- return decode(" ")+name;
+ return QCString("Пакет ")+name;
}
/*! Title of the package index page */
virtual QCString trPackageList()
{
- return decode(" ̦ Ԧ");
+ return "Повний список пакетів";
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
- return decode(" ̦ Ԧ.");
+ return "Повний список документованих пакетів.";
}
/*! The link name in the Quick links header for each page */
virtual QCString trPackages()
{
- return decode("");
- }
- /*! Used as a chapter title for Latex & RTF output */
- virtual QCString trPackageDocumentation()
- {
- return decode(" Ԧ");
+ return "Пакети";
}
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
- return decode(":");
+ return "Макровизначення:";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.5
//////////////////////////////////////////////////////////////////////////
-
+
/*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
- return decode("");
+ return "Дефект";
}
/*! Used as the header of the bug list */
virtual QCString trBugList()
{
- return decode("̦ Ԧ");
+ return "Список дефектів";
}
//////////////////////////////////////////////////////////////////////////
@@ -1228,103 +1162,92 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! Used as header RTF general index */
virtual QCString trRTFGeneralIndex()
{
- return decode(" ");
+ return "Предметний покажчик";
}
/*! This is used for translation of the word that will possibly
- * be followed by a single name or by a list of names
+ * be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trClass(bool first_capital, bool singular)
- {
+ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- QCString result((first_capital ? " " : " "));
- return decode(result);
+ QCString result((first_capital ? "Структури даних" : "структури даних"));
+ return result;
}
else
{
- QCString result((first_capital ? "" : ""));
- if(!singular) result+="";
- return decode(result);
+ QCString result((first_capital ? "Клас" : "клас"));
+ if(!singular) result+="и";
+ 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
+ * be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trFile(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "" : ""));
- if (!singular) result+="";
- return decode(result);
+ {
+ QCString result((first_capital ? "Файл" : "файл"));
+ if (!singular) result+="и";
+ 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
+ * be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trNamespace(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "" : ""));
- result+=(singular?" ":" ");
- return decode(result);
+ {
+ QCString result((first_capital ? "Прост" : "прост"));
+ result+=(singular?"ір імен":"ори імен");
+ 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
+ * be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trGroup(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "" : ""));
- result+=(singular ? "" : "");
- return decode(result);
+ {
+ QCString result((first_capital ? "Груп" : "груп"));
+ result+=(singular ? "а" : "и");
+ 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
+ * be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trPage(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Ҧ" : "Ҧ"));
- result+=(singular ? "" : "");
- return decode(result);
+ {
+ QCString result((first_capital ? "Сторінк" : "сторінк"));
+ result+=(singular ? "а" : "и");
+ 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
+ * be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trMember(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "" : ""));
- if (!singular) result+="";
- 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 trField(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "" : ""));
- result+=(singular ? "" : "");
- return decode(result);
+ {
+ QCString result((first_capital ? "Елемент" : "елемент"));
+ if (!singular) result+="и";
+ 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
+ * 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 ? "" : ""));
- result+=(singular ? "" : "");
- return decode(result);
+ {
+ QCString result((first_capital ? "Глобальн" : "глобальн"));
+ result+=(singular ? "ий" : "і");
+ return result;
}
//////////////////////////////////////////////////////////////////////////
@@ -1334,10 +1257,10 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! This text is generated when the \\author command is used and
* for the author section in man pages. */
virtual QCString trAuthor(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "" : ""));
- if (!singular) result+="";
- return decode(result);
+ {
+ QCString result((first_capital ? "Автор" : "автор"));
+ if (!singular) result+="и";
+ return result;
}
//////////////////////////////////////////////////////////////////////////
@@ -1348,19 +1271,19 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
*/
virtual QCString trReferences()
{
- return "դ";
+ return "Використовує";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.13
//////////////////////////////////////////////////////////////////////////
- /*! used in member documentation blocks to produce a list of
+ /*! 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) + ".";
+ return "Реалізує " + trWriteList(numEntries) + ".";
}
/*! used in member documentation blocks to produce a list of
@@ -1368,7 +1291,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
*/
virtual QCString trImplementedInList(int numEntries)
{
- return "̦դ " + trWriteList(numEntries) + ".";
+ return "Реалізує в " + trWriteList(numEntries) + ".";
}
//////////////////////////////////////////////////////////////////////////
@@ -1380,37 +1303,37 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
*/
virtual QCString trRTFTableOfContents()
{
- return "ͦ";
+ return "Зміст";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.17
//////////////////////////////////////////////////////////////////////////
- /*! Used as the header of the list of item that have been
- * flagged deprecated
+ /*! Used as the header of the list of item that have been
+ * flagged deprecated
*/
virtual QCString trDeprecatedList()
{
- return "Ҧ̦ ";
+ return "Застарілі елементи";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.18
//////////////////////////////////////////////////////////////////////////
- /*! Used as a header for declaration section of the events found in
+ /*! Used as a header for declaration section of the events found in
* a C# program
*/
virtual QCString trEvents()
{
- return "Ħ";
+ return "Події";
}
/*! Header used for the documentation section of a class' events. */
virtual QCString trEventDocumentation()
{
- return "æ Ħ";
+ return "Документація подій";
}
//////////////////////////////////////////////////////////////////////////
@@ -1420,83 +1343,83 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
/*! Used as a heading for a list of Java class types with package scope.
*/
virtual QCString trPackageTypes()
- {
- return " Ԧ";
+ {
+ return "Типи пакетів";
}
- /*! Used as a heading for a list of Java class functions with package
- * scope.
+ /*! Used as a heading for a list of Java class functions with package
+ * scope.
*/
virtual QCString trPackageMembers()
- {
- return "æ Ԧ";
+ {
+ return "Функції пакетів";
}
- /*! Used as a heading for a list of static Java class functions with
+ /*! Used as a heading for a list of static Java class functions with
* package scope.
*/
virtual QCString trStaticPackageMembers()
- {
- return "Φ æ Ԧ";
+ {
+ return "Статичні функцію пакетів";
}
-
- /*! Used as a heading for a list of Java class variables with package
+
+ /*! Used as a heading for a list of Java class variables with package
* scope.
*/
virtual QCString trPackageAttribs()
{
- return " Ԧ";
+ return "Атрибути пакетів";
}
-
- /*! Used as a heading for a list of static Java class variables with
+
+ /*! Used as a heading for a list of static Java class variables with
* package scope.
*/
virtual QCString trStaticPackageAttribs()
{
- return "Φ Ԧ";
+ return "Статичні атрибути пакетів";
}
-
+
//////////////////////////////////////////////////////////////////////////
// new since 1.3.1
//////////////////////////////////////////////////////////////////////////
- /*! Used in the quick index of a class/file/namespace member list page
+ /*! 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 "Ӧ";
+ return "Всі";
}
/*! Put in front of the call graph for a function. */
virtual QCString trCallGraph()
{
- return " Ӧ ˦ æ æ:";
+ 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.
+ /*! 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 "";
+ return "Шукати";
}
/*! This string is used as the title for the page listing the search
* results.
*/
virtual QCString trSearchResultsTitle()
{
- return " ";
+ 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
+ * 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.
*/
@@ -1504,24 +1427,24 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
{
if (numDocuments==0)
{
- return " Ԧ צצ .";
+ return "Не знайдено документів відповідно до вашого запиту.";
}
else if (numDocuments==1)
{
- return " <b>1</b> צצ .";
+ return "Було знайдено <b>1</b> документ відповідно до вашого запиту.";
}
- else
+ else
{
- return " <b>$num</b> Ԧ צצ . "
- "ݦ צצԦ .";
+ return "Було знайдено <b>$num</b> документів відповідно до вашого запиту. "
+ "Найкращі відповідності показано спочатку.";
}
}
- /*! This string is put before the list of matched words, for each search
+ /*! 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 "צΦ:";
+ return "Відповідність:";
}
//////////////////////////////////////////////////////////////////////////
@@ -1532,7 +1455,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
*/
virtual QCString trSourceFile(QCString& filename)
{
- return " "+filename;
+ return "Текст програми "+filename;
}
//////////////////////////////////////////////////////////////////////////
@@ -1543,44 +1466,498 @@ class TranslatorUkrainian : public TranslatorAdapter_1_4_1
* hierarchy.
*/
virtual QCString trDirIndex()
- { return " Ǧ"; }
+ { return "Дерево каталогів"; }
/*! This is used as the name of the chapter containing the documentation
* of the directories.
*/
virtual QCString trDirDocumentation()
- { return "æ Ǧ"; }
+ { 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 ""; }
+ { return "Каталоги"; }
- /*! This returns a sentences that introduces the directory hierarchy.
+ /*! This returns a sentences that introduces the directory hierarchy.
* and the fact that it is sorted alphabetically per level
*/
virtual QCString trDirDescription()
- { return " Ǧ "
- " צ:";
+ { 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; }
+ { 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;
+ {
+ QCString result("Каталог");
+ if (!singular) result+="и";
+ 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 "Це перезавантажуваний метод, "
+ "ввкдкний для зручності. Він відрізняється від "
+ "описаної вище функції лише списком аргуметнів.";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used to introduce a caller (or called-by) graph */
+ virtual QCString trCallerGraph()
+ {
+ return "Граф викликів для цієї функції:";
}
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration values
+ */
+ virtual QCString trEnumerationValueDocumentation()
+ { return "Документація переліку"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.5.4 (mainly for Fortran)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! header that is put before the list of member subprograms (Fortran). */
+ virtual QCString trMemberFunctionDocumentationFortran()
+ { return "Документація функції/підпрограми"; }
+
+ /*! This is put above each page as a link to the list of annotated data types (Fortran). */
+ virtual QCString trCompoundListFortran()
+ { return "Список типів даних"; }
+
+ /*! This is put above each page as a link to all members of compounds (Fortran). */
+ virtual QCString trCompoundMembersFortran()
+ { return "Поля даних"; }
+
+ /*! This is an introduction to the annotated compound list (Fortran). */
+ virtual QCString trCompoundListDescriptionFortran()
+ { return "Типи даних з коротким описом:"; }
+
+ /*! This is an introduction to the page with all data types (Fortran). */
+ virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
+ {
+ QCString result="Список усіх ";
+ if (!extractAll)
+ {
+ result+="задокументованих ";
+ }
+ result+="елементів типів даних";
+ result+=" з посиланнями на ";
+ if (!extractAll)
+ {
+ result+="документацію структури даних кожного елемента";
+ }
+ else
+ {
+ result+="типи даних, до яких вони належать:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index (Fortran).
+ */
+ virtual QCString trCompoundIndexFortran()
+ { return "Список типів даних"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all data types (Fortran).
+ */
+ virtual QCString trTypeDocumentation()
+ { return "Документація типів даних"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) subprograms (Fortran).
+ */
+ virtual QCString trSubprograms()
+ { return "Функції/підпрограми"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for subprograms (Fortran)
+ */
+ virtual QCString trSubprogramDocumentation()
+ { return "Документація функцій/підпрограм"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds (Fortran)
+ */
+ virtual QCString trDataTypes()
+ { return "Типи даних"; }
+
+ /*! used as the title of page containing all the index of all modules (Fortran). */
+ virtual QCString trModulesList()
+ { return "Список модулів"; }
+
+ /*! used as an introduction to the modules list (Fortran) */
+ virtual QCString trModulesListDescription(bool extractAll)
+ {
+ QCString result="Список усіх ";
+ if (!extractAll) result+="задокументованих ";
+ result+="модулів з коротким описом:";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a module/type (Fortran) */
+ virtual QCString trCompoundReferenceFortran(const char *clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=(QCString)clName;
+ if (isTemplate)
+ {
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" Модуль"; break;
+ case ClassDef::Struct: result+=" Тип"; break;
+ case ClassDef::Union: result+=" Об'єднання"; break;
+ case ClassDef::Interface: result+=" Інтерфейс"; break;
+ case ClassDef::Protocol: result+=" Протокол"; break;
+ case ClassDef::Category: result+=" Категорія"; break;
+ case ClassDef::Exception: result+=" Виняток"; break;
+ }
+ }
+ else
+ {
+ if (isTemplate) result+=" Шаблон ";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="модуля"; break;
+ case ClassDef::Struct: result+="типу"; break;
+ case ClassDef::Union: result+="об'єднання"; break;
+ case ClassDef::Interface: result+="інтерфейсу"; break;
+ case ClassDef::Protocol: result+="протоколу"; break;
+ case ClassDef::Category: result+="категорії"; break;
+ case ClassDef::Exception: result+="винятка"; break;
+ }
+ }
+ return result;
+ }
+ /*! used as the title of the HTML page of a module (Fortran) */
+ virtual QCString trModuleReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" Модуль";
+ return result;
+ }
+
+ /*! This is put above each page as a link to all members of modules. (Fortran) */
+ virtual QCString trModulesMembers()
+ { return "Елементи модуля"; }
+
+ /*! This is an introduction to the page with all modules members (Fortran) */
+ virtual QCString trModulesMemberDescription(bool extractAll)
+ {
+ QCString result="Список усіх ";
+ if (!extractAll) result+="задокументованих ";
+ result+="елементів модулів з посиланнями на ";
+ if (extractAll)
+ {
+ result+="документацію модуля для кожного елемента:";
+ }
+ else
+ {
+ result+="модулі, до яких вони належать:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all modules (Fortran).
+ */
+ virtual QCString trModulesIndex()
+ { return "Алфавітний покажчик модулів"; }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trModule(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Модул" : "модул"));
+ result+=(singular? "ь": "і");
+ return result;
+ }
+
+ /*! This is put at the bottom of a module documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType,
+ bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Документацію для ";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="цього модуля"; break;
+ case ClassDef::Struct: result+="цього типу"; break;
+ case ClassDef::Union: result+="цього об'єднання"; break;
+ case ClassDef::Interface: result+="цього інтерфейсу"; break;
+ case ClassDef::Protocol: result+="цього протоколу"; break;
+ case ClassDef::Category: result+="цієї категорії"; break;
+ case ClassDef::Exception: result+="цього винятку"; break;
+ }
+ result+=" було згенеровано з ";
+ if (single) result+="наступного файлу:"; else result+="наступних файлів:";
+ 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 trType(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Тип" : "тип"));
+ if (!singular) result+="и";
+ 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 trSubprogram(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Підпрограм" : "підпрограм"));
+ result+= (singular? "а": "и");
+ return result;
+ }
+
+ /*! C# Type Constraint list */
+ virtual QCString trTypeConstraints()
+ {
+ return "Обмеження типу";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.0 (mainly for the new search engine)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! directory relation for \a name */
+ virtual QCString trDirRelation(const char *name)
+ {
+ return "Зв'язок з "+QCString(name);
+ }
+
+ /*! Loading message shown when loading search results */
+ virtual QCString trLoading()
+ {
+ return "Завантаження...";
+ }
+
+ /*! Label used for search results in the global namespace */
+ virtual QCString trGlobalNamespace()
+ {
+ return "Глобальний простір імен";
+ }
+
+ /*! Message shown while searching */
+ virtual QCString trSearching()
+ {
+ return "Пошук...";
+ }
+
+ /*! Text shown when no search results are found */
+ virtual QCString trNoMatches()
+ {
+ return "Нічого не знайдено";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.3 (missing items for the directory pages)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! introduction text for the directory dependency graph */
+ virtual QCString trDirDependency(const char *name)
+ {
+ return (QCString)"Граф залежностей каталогу для "+name;
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the first column mentions the
+ * source file that has a relation to another file.
+ */
+ virtual QCString trFileIn(const char *name)
+ {
+ return (QCString)"Файл у "+name;
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the second column mentions the
+ * destination file that is included.
+ */
+ virtual QCString trIncludesFileIn(const char *name)
+ {
+ return (QCString)"Включає файли в "+name;
+ }
+
+ /** Compiles a date string.
+ * @param year Year in 4 digits
+ * @param month Month of the year: 1=January
+ * @param day Day of the Month: 1..31
+ * @param dayOfWeek Day of the week: 1=Monday..7=Sunday
+ * @param hour Hour of the day: 0..23
+ * @param minutes Minutes in the hour: 0..59
+ * @param seconds Seconds within the minute: 0..59
+ * @param includeTime Include time in the result string?
+ */
+ virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
+ int hour,int minutes,int seconds,
+ bool includeTime)
+ {
+ static const char *days[] = { "Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота","Неділя" };
+ static const char *months[] = { "січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жотня","листопада","грудня" };
+ QCString sdate;
+ sdate.sprintf("%s, %d %s %d",days[dayOfWeek-1],day,months[month-1],year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
+ sdate+=stime;
+ }
+ return sdate;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.7.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Header for the page with bibliographic citations */
+ virtual QCString trCiteReferences()
+ { return "Бібліографічні посилання"; }
+
+ /*! Text for copyright paragraph */
+ virtual QCString trCopyright()
+ { return "Копірайт"; }
+
+ /*! Header for the graph showing the directory dependencies */
+ virtual QCString trDirDepGraph(const char *name)
+ { return QCString("Граф залежностей каталогу для ")+name+":"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Detail level selector shown for hierarchical indices */
+ virtual QCString trDetailLevel()
+ { return "рівень елемента"; }
+
+ /*! Section header for list of template parameters */
+ virtual QCString trTemplateParameters()
+ { return "Параметри шаблона"; }
+
+ /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
+ virtual QCString trAndMore(const QCString &number)
+ { return "і ще "+number+"..."; }
+
+ /*! Used file list for a Java enum */
+ virtual QCString trEnumGeneratedFromFiles(bool single)
+ { QCString result = "Документацію для цього переліку булозгенеровано з ";
+ result += (single? "наступного файла": "наступних файлів");
+ result+=":";
+ return result;
+ }
+
+ /*! Header of a Java enum page (Java enums are represented as classes). */
+ virtual QCString trEnumReference(const char *name)
+ { return QCString(name)+" Перелік"; }
+
+ /*! Used for a section containing inherited members */
+ virtual QCString trInheritedFrom(const char *members,const char *what)
+ { return QCString(members)+" успадковано з "+what; }
+
+ /*! Header of the sections with inherited members specific for the
+ * base class(es)
+ */
+ virtual QCString trAdditionalInheritedMembers()
+ { return "Додаткові успадковані елементи"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "дозволити" : "заборонити";
+ return "клацніть мишкою, щоб "+opt+" синхронізацію панелі";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ {
+ return "Забезпечено категорією @1.";
+ }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ {
+ return "Розширює клас @1.";
+ }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ {
+ return "Методи класу";
+ }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ {
+ return "Методи об'єкта";
+ }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ {
+ return "Документація метода";
+ }
+
+ /*! Used as the title of the design overview picture created for the
+ * VHDL output.
+ */
+ virtual QCString trDesignOverview()
+ {
+ return "Огляд дизайну проекту";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+
};
#endif
diff --git a/src/util.cpp b/src/util.cpp
index bfce13d..f0e0ea4 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1567,6 +1567,7 @@ ClassDef *getResolvedClass(Definition *scope,
QCString *pResolvedType
)
{
+ static bool optimizeOutputVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
g_resolvedTypedefs.clear();
if (scope==0 ||
(scope->definitionType()!=Definition::TypeClass &&
@@ -1583,7 +1584,15 @@ ClassDef *getResolvedClass(Definition *scope,
// n,
// mayBeUnlinkable
// );
- ClassDef *result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec,pResolvedType);
+ ClassDef *result;
+ if (optimizeOutputVhdl)
+ {
+ result = getClass(n);
+ }
+ else
+ {
+ result = getResolvedClassRec(scope,fileScope,n,pTypeDef,pTemplSpec,pResolvedType);
+ }
if (!mayBeUnlinkable && result && !result->isLinkable())
{
if (!mayBeHidden || !result->isHidden())
@@ -6212,7 +6221,7 @@ void addRefItem(const QList<ListItemInfo> *sli,
const char *prefix, const char *name,const char *title,const char *args)
{
//printf("addRefItem(sli=%p,key=%s,prefix=%s,name=%s,title=%s,args=%s)\n",sli,key,prefix,name,title,args);
- if (sli)
+ if (sli && key && key[0]!='@') // check for @ to skip anonymous stuff (see bug427012)
{
QListIterator<ListItemInfo> slii(*sli);
ListItemInfo *lii;
@@ -6729,6 +6738,24 @@ bool checkIfTypedef(Definition *scope,FileDef *fileScope,const char *n)
return FALSE;
}
+const char *writeUtf8Char(FTextStream &t,const char *s)
+{
+ char c=*s++;
+ t << c;
+ if (c<0) // multibyte character
+ {
+ t << *s++;
+ if (((uchar)c&0xE0)==0xE0)
+ {
+ t << *s++; // 111x.xxxx: >=3 byte character
+ }
+ if (((uchar)c&0xF0)==0xF0)
+ {
+ t << *s++; // 1111.xxxx: 4 byte character
+ }
+ }
+ return s;
+}
int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos)
{
diff --git a/src/util.h b/src/util.h
index 444f6ea..daeef09 100644
--- a/src/util.h
+++ b/src/util.h
@@ -380,6 +380,7 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList);
QCString externalLinkTarget();
QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos);
+const char *writeUtf8Char(FTextStream &t,const char *s);
/** Data associated with a HSV colored image. */
struct ColoredImgDataItem
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index 0fd9185..441aa10 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -450,7 +450,6 @@ static void generateFuncLink(CodeOutputInterface &ol,MemberDef* mdef)
addToSearchIndex(memberName);
return;
}
- ol.linkableSymbol(g_yyLineNr,memberName,0,g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(memberName.data());
addToSearchIndex(memberName);
} // generateFuncLink
@@ -493,7 +492,6 @@ static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& m
return;
}
// nothing found, just write out the word
- ol.linkableSymbol(g_yyLineNr,memberName,0,g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(memberName.data());
addToSearchIndex(memberName);
}// generateMemLink
@@ -521,10 +519,6 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
//{
// temp=VhdlDocGen::getClassName(cd);
//}
- ol.linkableSymbol(g_yyLineNr,temp,cd,
- g_currentMemberDef ?
- g_currentMemberDef :
- g_currentDefinition);
writeMultiLineCodeLink(ol,cd->getReference(),
cd->getOutputFileBase(),
cd->anchor(),
@@ -545,7 +539,6 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
}
// nothing found, just write out the word
- ol.linkableSymbol(g_yyLineNr,clName,0,g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(clName);
addToSearchIndex(clName);
}// generateClasss or global link
@@ -1515,7 +1508,7 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString
if (memberDef)
{
ClassDef *dd=memberDef->getClassDef();
- if (dd) g_CurrClass=dd->className();
+ if (dd) g_CurrClass=dd->name();
startLine--;
}
resetVhdlCodeParserState();
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 296031d..25d7fed 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -1974,6 +1974,10 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
// start a new member declaration
bool isAnonymous = annoClassDef; // || m_impl->annMemb || m_impl->annEnumType;
///printf("startMemberItem for %s\n",name().data());
+ int mm=mdef->getMemberSpecifiers();
+ if (mm==VhdlDocGen::MISCELLANEOUS)
+ isAnonymous=TRUE;
+
ol.startMemberItem( mdef->anchor(), isAnonymous ); //? 1 : m_impl->tArgList ? 3 : 0);
// If there is no detailed description we need to write the anchor here.
@@ -1999,7 +2003,6 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
ltype=ltype.replace(reg," ");
QCString largs(mdef->argsString());
largs=largs.replace(reg," ");
- int mm=mdef->getMemberSpecifiers();
mdef->setType(ltype.data());
mdef->setArgsString(largs.data());
//ClassDef * plo=mdef->getClassDef();
@@ -2011,7 +2014,7 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
switch (mm)
{
case VhdlDocGen::MISCELLANEOUS:
- VhdlDocGen::writeCodeFragment(mdef,ol);
+ VhdlDocGen::writeSource(mdef,ol,nn);
break;
case VhdlDocGen::PROCEDURE:
case VhdlDocGen::FUNCTION:
@@ -2265,8 +2268,6 @@ void VhdlDocGen::writePlainVHDLDeclarations(
SDict<QCString> pack(1009);
- ol.pushGeneratorState();
-
bool first=TRUE;
MemberDef *md;
MemberListIterator mli(*mlist);
@@ -2538,50 +2539,52 @@ void VhdlDocGen::writeStringLink(const MemberDef *mdef,QCString mem, OutputList&
VhdlDocGen::startFonts(mem,"vhdlchar",ol);
}// found component
-void VhdlDocGen::writeCodeFragment( MemberDef *mdef,OutputList& ol)
+
+
+void VhdlDocGen::writeSource(MemberDef *mdef,OutputList& ol,QCString & cname)
{
+ ParserInterface *pIntf = Doxygen::parserManager->getParser(".vhd");
+ pIntf->resetCodeParserState();
+
QCString codeFragment=mdef->documentation();
- QStringList qsl=QStringList::split("\n",codeFragment);
- writeLink(mdef,ol);
- ol.docify(" ");
- ol.insertMemberAlign();
- int len= qsl.count();
- for(int j=0;j<len;j++)
+
+ if(cname.isEmpty())
{
- QCString q=qsl[j].utf8();
- VhdlDocGen::writeFormatString(q,ol,mdef);
- ol.lineBreak();
- if (j==2) // only the first three lines are shown
+ writeLink(mdef,ol);
+ int fi=0;
+ int j=0;
+ do {
+ fi=codeFragment.find("\n",++fi);
+ } while(fi>=0 && j++ <3);
+
+ // show only the first four lines
+ if(j==4)
{
- q = "...";
- VhdlDocGen::writeFormatString(q,ol,mdef);
- break;
+ codeFragment=codeFragment.left(fi);
+ codeFragment.append("\n .... ");
}
}
-}
-
-void VhdlDocGen::writeSource(MemberDef *mdef,OutputList& ol,QCString & cname)
-{
- QCString codeFragment=mdef->documentation();
- int start=mdef->getStartBodyLine();
- QStringList qsl=QStringList::split("\n",codeFragment);
+
+ codeFragment.prepend("\n");
+ ol.pushGeneratorState();
ol.startCodeFragment();
- int len = qsl.count();
- QCString lineNumber;
- int j;
- for (j=0;j<len;j++)
- {
- lineNumber.sprintf("%05d",start++);
- lineNumber+=" ";
- ol.startBold();
- ol.docify(lineNumber.data());
- ol.endBold();
- ol.insertMemberAlign();
- QCString q=qsl[j].utf8();
- VhdlDocGen::writeFormatString(q,ol,mdef);
- ol.lineBreak();
- }
+ pIntf->parseCode(ol, // codeOutIntf
+ 0, // scope
+ codeFragment, // input
+ FALSE, // isExample
+ 0, // exampleName
+ mdef->getFileDef(), // fileDef
+ mdef->getStartBodyLine(), // startLine
+ mdef->getEndBodyLine(), // endLine
+ TRUE, // inlineFragment
+ mdef, // memberDef
+ TRUE // show line numbers
+ );
+
ol.endCodeFragment();
+ ol.popGeneratorState();
+
+ if (cname.isEmpty()) return;
mdef->writeSourceDef(ol,cname);
mdef->writeSourceRefs(ol,cname);
@@ -2589,6 +2592,7 @@ void VhdlDocGen::writeSource(MemberDef *mdef,OutputList& ol,QCString & cname)
}
+
QCString VhdlDocGen::convertFileNameToClassName(QCString name)
{
@@ -3069,8 +3073,8 @@ void VhdlDocGen::computeVhdlComponentRelations()
continue;
}
- // if (classEntity==0)
- // err("error: %s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
+ // if (classEntity==0)
+ // err("error: %s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
addInstance(classEntity,ar,cd,cur);
}
@@ -3141,7 +3145,7 @@ ferr:
FileDef *fd=ar->getFileDef();
md->setBodyDef(fd);
-#if 0
+
QCString info="Info: Elaborating entity "+n1;
fd=ar->getFileDef();
info+=" for hierarchy ";
@@ -3150,7 +3154,7 @@ ferr:
label.replace(epr,":");
info+=label;
fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data());
-#endif
+
ar->insertMember(md);
@@ -3198,27 +3202,7 @@ void VhdlDocGen::writeRecUnitDocu(
}
}//#
-void VhdlDocGen::writeCodeFragment(OutputList& ol,int start, QCString & codeFragment,const MemberDef* mdef)
-{
- QStringList qsl=QStringList::split("\n",codeFragment);
- ol.startCodeFragment();
- int len = qsl.count();
- QCString lineNumber;
- int j;
- for (j=0;j<len;j++)
- {
- lineNumber.sprintf("%05d",start++);
- lineNumber+=" ";
- ol.startBold();
- ol.docify(lineNumber.data());
- ol.endBold();
- ol.insertMemberAlign();
- QCString q=qsl[j].utf8();
- VhdlDocGen::writeFormatString(q,ol,mdef);
- ol.docify("\n");
- }
- ol.endCodeFragment();
-}
+
bool VhdlDocGen::isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level)
{
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index 03c37e6..35a35a8 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -25,6 +25,7 @@
#include <qcstring.h>
#include "layout.h"
#include "arguments.h"
+#include "entry.h"
class Entry;
class ClassDef;
@@ -229,9 +230,7 @@ class VhdlDocGen
static ClassDef* findArchitecture(const ClassDef *cd);
static ClassDef* findArchitecture(QCString identifier, QCString entity_name);
- static void writeCodeFragment( MemberDef *mdef,OutputList& ol);
- static void writeCodeFragment (OutputList& ol,int start, QCString & codeFragment,const MemberDef* mdef);
-
+
static void writeSource(MemberDef *mdef,OutputList& ol,QCString & cname);
static void writeAlphbeticalClass(OutputList& ol,const ClassDef* cd,const QCString &);
@@ -250,6 +249,16 @@ class VhdlDocGen
static void setFlowMember( const MemberDef *flowMember);
static const MemberDef *getFlowMember();
+ static bool isVhdlClass (const Entry *cu)
+ {
+ return cu->spec==VhdlDocGen::ENTITY ||
+ cu->spec==VhdlDocGen::PACKAGE ||
+ cu->spec==VhdlDocGen::ARCHITECTURE ||
+ cu->spec==VhdlDocGen::PACKAGE_BODY;
+ }
+
+
+
private:
static void findAllArchitectures(QList<QCString>& ql,const ClassDef *cd);
static bool compareArgList(ArgumentList*,ArgumentList*);
diff --git a/src/vhdlparser.y b/src/vhdlparser.y
index 785451b..19c0a4f 100644
--- a/src/vhdlparser.y
+++ b/src/vhdlparser.y
@@ -53,6 +53,7 @@
#include <stdio.h>
#include <qcstring.h>
#include <qstringlist.h>
+#include "config.h"
#ifndef YYSTYPE
typedef int YYSTYPE;
@@ -64,6 +65,9 @@ struct YYMM
QCString qstr;
};
+
+
+
// define struct instead of union
#define YYSTYPE YYMM
@@ -76,13 +80,20 @@ struct YYMM
#include "entry.h"
#include "arguments.h"
#include "memberdef.h"
+#include "vhdldocgen.h"
//-----------------------------variables ---------------------------------------------------------------------------
-//static MyParserVhdl* myconv=0;
+
+
+
+
static VhdlContainer s_str;
static QList<Entry>instFiles;
+static QList<Entry>libUse;
+
+
static int yyLineNr;
static Entry* lastCompound;
static Entry* currentCompound;
@@ -156,6 +167,7 @@ void initVhdlParser()
current_root=s_str.root;
current=new Entry();
initEntry(current);
+ libUse.clear();
}
QList<Entry> & getVhdlInstList()
@@ -163,6 +175,10 @@ QList<Entry> & getVhdlInstList()
return instFiles;
}
+QList<Entry> & getLibUse()
+{
+ return libUse;
+}
%}
@@ -381,12 +397,13 @@ t_ToolDir
%%
-start: design_file
- | procs_stat
- | subprog_body
-
+start: design_file
+
design_file : design_unit_list
+ /* parse function/process/procedure for vhdlflow */
+ | procs_stat
+ | subprog_body
design_unit_list: design_unit
| design_unit_list design_unit
@@ -441,9 +458,9 @@ context_item : lib_clause
lib_clause : t_LIBRARY idf_list t_Semicolon
{
- if ( parse_sec == 0)
+ if ( parse_sec==0 && Config_getBool("SHOW_INCLUDE_FILES") )
{
- addVhdlType($2,getParsedLine(t_LIBRARY),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,$2.data(),"_library_");
+ addVhdlType($2,getParsedLine(t_LIBRARY),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,$2.data(),"_library_");
}
$$="library "+$2;
}
@@ -453,9 +470,9 @@ use_clause : t_USE sel_list t_Semicolon
QStringList ql1=QStringList::split(",",$2,FALSE);
for (uint j=0;j<ql1.count();j++)
{
- QStringList ql=QStringList::split(".",ql1[j],FALSE);
- QCString it=ql[1].utf8();
- if ( parse_sec == 0 )
+ //QStringList ql=QStringList::split(".",ql1[j],FALSE);
+ QCString it=ql1[j].utf8();
+ if ( parse_sec==0 && Config_getBool("SHOW_INCLUDE_FILES") )
{
addVhdlType(it,getParsedLine(t_USE),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_");
}
@@ -506,8 +523,8 @@ entity_decl_1 : /* empty */ { $$=""; }
;
-arch_body : arch_start arch_body_1 t_BEGIN concurrent_stats t_END arch_body_2 t_Semicolon
-arch_body : arch_start error t_END arch_body_2 t_Semicolon
+arch_body : arch_start arch_body_1 t_BEGIN concurrent_stats t_END arch_body_2 t_Semicolon {lastCompound=0;}
+arch_body : arch_start error t_END arch_body_2 t_Semicolon {lastCompound=0;}
arch_start : t_ARCHITECTURE t_Identifier t_OF t_Identifier t_IS
{
@@ -586,8 +603,8 @@ package_decl_22: gen_interface_list
package_decl_22: gen_interface_list gen_assoc_list
package_decl_22: gen_interface_list gen_assoc_list t_Semicolon
-package_body : pack_body_start error t_END package_body_2 t_Semicolon
-package_body : pack_body_start package_body_1 t_END package_body_2 t_Semicolon
+package_body : pack_body_start error t_END package_body_2 t_Semicolon {lastCompound=0;}
+package_body : pack_body_start package_body_1 t_END package_body_2 t_Semicolon {lastCompound=0;}
pack_body_start : t_PACKAGE t_BODY t_Identifier t_IS
{
$$=$3;
@@ -1803,7 +1820,7 @@ wait_stat_1: t_ON sensitivity_list { $$=" on "+$2; }
comp_end_dec : t_END { lastEntity=0; lastCompound=0; genLabels.resize(0); }
| t_END t_COMPONENT entity_decl_5
| t_END t_ARCHITECTURE entity_decl_5 { lastCompound=0; genLabels.resize(0); }
- | t_END t_ENTITY entity_decl_5 { lastEntity=0; genLabels.resize(0); }
+ | t_END t_ENTITY entity_decl_5 { lastEntity=0;lastCompound=0; genLabels.resize(0); }
| t_END t_Identifier { lastEntity=0; lastCompound=0; genLabels.resize(0); }
iss :/*empty*/ { currP=VhdlDocGen::COMPONENT; }
@@ -2501,11 +2518,8 @@ static void addVhdlType(const QCString &name,int startLine,int section,int spec,
{
static QRegExp reg("[\\s]");
- if (isFuncProcProced() || VhdlDocGen::getFlowMember())
- {
- return;
- }
-
+ if (isFuncProcProced() || VhdlDocGen::getFlowMember()) return;
+
if (parse_sec==GEN_SEC)
{
spec= VhdlDocGen::GENERIC;
@@ -2517,10 +2531,7 @@ static void addVhdlType(const QCString &name,int startLine,int section,int spec,
for (uint u=0;u<ql.count();u++)
{
current->name=ql[u].utf8();
- // if (section==Entry::VARIABLE_SEC && !(spec == VhdlDocGen::USE || spec == VhdlDocGen::LIBRARY) )
- // {
- // current->name.prepend(VhdlDocGen::getRecordNumber());
- // }
+
current->startLine=startLine;
current->bodyLine=startLine;
@@ -2535,17 +2546,20 @@ static void addVhdlType(const QCString &name,int startLine,int section,int spec,
current->type=type;
current->type.replace(reg,"%"); // insert dummy chars because white spaces are removed
current->protection=prot;
+
+ if (!lastCompound && (section==Entry::VARIABLE_SEC) && (spec == VhdlDocGen::USE || spec == VhdlDocGen::LIBRARY) )
+ {
+ libUse.append(new Entry(*current));
+ current->reset();
+ }
newEntry();
}
}
static void newEntry()
{
- if (current->spec==VhdlDocGen::ENTITY ||
- current->spec==VhdlDocGen::PACKAGE ||
- current->spec==VhdlDocGen::ARCHITECTURE ||
- current->spec==VhdlDocGen::PACKAGE_BODY
- )
+
+ if (VhdlDocGen::isVhdlClass(current))
{
current_root->addSubEntry(current);
}
diff --git a/src/vhdlscanner.h b/src/vhdlscanner.h
index 676f881..1eb3c83 100644
--- a/src/vhdlscanner.h
+++ b/src/vhdlscanner.h
@@ -28,7 +28,7 @@
#include <unistd.h>
#include <qfile.h>
#include <qdict.h>
-
+#include "vhdldocgen.h"
#include "entry.h"
class Entry;
@@ -129,8 +129,13 @@ void vhdlParse();
// return the list of component instantiations e.g. foo: component bar
QList<Entry> & getVhdlInstList();
-// returns the list of found configurations
+// returns configuration list
QList<VhdlConfNode>& getVhdlConfiguration();
+// returns library/used list
+QList<Entry> & getLibUse();
+
void isVhdlDocPending();
+
+
#endif
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l
index f844bc1..9eec358 100644
--- a/src/vhdlscanner.l
+++ b/src/vhdlscanner.l
@@ -96,7 +96,7 @@ static QMap<QCString, int> keyMap;
static QList<Entry> lineEntry;
static bool checkMultiComment(QCString& qcs,int line);
static void handleCommentBlock(const QCString &doc,bool brief);
-static void mapLibPackage(const Entry* ce);
+static void mapLibPackage(Entry* ce);
static QList<Entry>* getEntryAtLine(const Entry* ce,int line);
static bool addLibUseClause(const QCString &type);
static Entry* oldEntry;
@@ -819,73 +819,43 @@ void VHDLLanguageScanner::parseCode(CodeOutputInterface &codeOutIntf,
* .....
* and so on..
*/
-static void mapLibPackage(const Entry* ce)
+static void mapLibPackage( Entry* root)
{
- Entry *lastComp=0;
- while (TRUE)
+ QList<Entry> epp=getLibUse();
+ EntryListIterator eli(epp);
+ Entry *rt;
+ for (;(rt=eli.current());++eli)
{
- bool found = FALSE;
- Entry *rt=0;
- //const QList<Entry> *epp=ce->children();
- EntryListIterator eli(*ce->children());
- EntryListIterator eli1=eli;
- for (;(rt=eli.current()),eli1=eli;++eli)
+ if (addLibUseClause(rt->name))
{
- if (rt->spec==VhdlDocGen::LIBRARY || rt->spec==VhdlDocGen::USE)
- // top level library or use statement
+ Entry *current;
+ EntryListIterator eLib(*root->children());
+ bool bFound=FALSE;
+ for (eLib.toFirst();(current=eLib.current());++eLib)
{
- Entry *temp=0;
- if(!addLibUseClause(rt->name))
- {
- rt->spec=-1;
- rt->section=0;
- // continue;
- }
-
- for (;(temp=eli1.current());++eli1) // find next entity
- {
- if (temp->spec==VhdlDocGen::ENTITY ||
- temp->spec==VhdlDocGen::PACKAGE ||
- temp->spec==VhdlDocGen::ARCHITECTURE ||
- temp->spec==VhdlDocGen::PACKAGE_BODY)
+ if (VhdlDocGen::isVhdlClass(current))
+ if (current->startLine > rt->startLine)
{
- Entry *ee=new Entry(*rt); //append a copy to entries sublist
- temp->addSubEntry(ee);
- found=TRUE;
- rt->spec=-1; //nullify entry
- rt->section=0;
- lastComp=temp;
- break;
+ bFound=TRUE;
+ current->addSubEntry(rt);
+ break;
}
- }//for
- if (lastComp && rt->spec!=-1)
- {
- Entry *ee=new Entry(*rt); //append a copy to entries sublist
- lastComp->addSubEntry(ee);
- found=TRUE;
- rt->spec=-1; //nullify entry
- rt->section=0;
- }
- }//if
- }//for
- if (!found) // nothing left to do
- {
- return;
- }
- }//while
+ }//for
+ if (!bFound)
+ {
+ root->addSubEntry(rt);
+ }
+ } //if
+ }// for
+
+ epp.clear();
}//MapLib
static bool addLibUseClause(const QCString &type)
{
- static bool show=Config_getBool("SHOW_INCLUDE_FILES");
static bool showIEEESTD=Config_getBool("FORCE_LOCAL_INCLUDES");
- if (!show) // all libraries and included packages will not be shown
- {
- return FALSE;
- }
-
- if (!showIEEESTD) // all standard packages and libraries will not be shown
+ if (showIEEESTD) // all standard packages and libraries will not be shown
{
if (type.lower().stripPrefix("ieee")) return FALSE;
if (type.lower().stripPrefix("std")) return FALSE;
@@ -990,7 +960,9 @@ int getParsedLine(int object)
void isVhdlDocPending()
{
if (!str_doc.pending)
+ {
return;
+ }
str_doc.pending=FALSE;
oldEntry=0; // prevents endless recursion
iDocLine=str_doc.iDocLine;
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 3f86e53..1ab72ff 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -140,7 +140,7 @@ inline void writeXMLCodeString(FTextStream &t,const char *s, int &col)
case '&': t << "&amp;"; col++; break;
case '\'': t << "&apos;"; col++; break;
case '"': t << "&quot;"; col++; break;
- default: t << c; col++; break;
+ default: s=writeUtf8Char(t,s-1); col++; break;
}
}
}
@@ -348,9 +348,6 @@ class XMLCodeGenerator : public CodeOutputInterface
if (extRef) m_external=extRef;
}
}
- void linkableSymbol(int, const char *,Definition *,Definition *)
- {
- }
void setCurrentDoc(Definition *,const char *,bool)
{
}