diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2004-10-28 19:06:37 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2004-10-28 19:06:37 (GMT) |
commit | 62d6edc6d0b299e93384e678748b635eb1bfe9b9 (patch) | |
tree | 60eda1cf44aa3fb80b441c3d949200b6ffb7c43d /src | |
parent | 50828c3c773e8095785c010c1aad3891076742f4 (diff) | |
download | Doxygen-62d6edc6d0b299e93384e678748b635eb1bfe9b9.zip Doxygen-62d6edc6d0b299e93384e678748b635eb1bfe9b9.tar.gz Doxygen-62d6edc6d0b299e93384e678748b635eb1bfe9b9.tar.bz2 |
Release-1.3.9.1-20041028
Diffstat (limited to 'src')
-rw-r--r-- | src/code.l | 39 | ||||
-rw-r--r-- | src/dirdef.cpp | 318 | ||||
-rw-r--r-- | src/dirdef.h | 41 | ||||
-rw-r--r-- | src/doctokenizer.l | 2 | ||||
-rw-r--r-- | src/dot.cpp | 24 | ||||
-rw-r--r-- | src/doxygen.cpp | 32 | ||||
-rw-r--r-- | src/index.cpp | 3 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 8 | ||||
-rw-r--r-- | src/latexdocvisitor.h | 3 | ||||
-rw-r--r-- | src/latexgen.cpp | 30 | ||||
-rw-r--r-- | src/latexgen.h | 1 | ||||
-rw-r--r-- | src/rtfdocvisitor.cpp | 8 | ||||
-rw-r--r-- | src/rtfgen.cpp | 20 | ||||
-rw-r--r-- | src/scanner.l | 20 | ||||
-rw-r--r-- | src/translator_sr.h | 134 | ||||
-rw-r--r-- | src/util.cpp | 27 |
16 files changed, 550 insertions, 160 deletions
@@ -760,11 +760,14 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, { cd=getResolvedClass(d,g_sourceFileDef,className.left(i),&md); } - //printf("is not found as a variable %s\n",cd?cd->name().data():"<null>"); + //printf("is found as a type %s\n",cd?cd->name().data():"<null>"); } else { - if (lcd!=VariableContext::dummyContext) g_theCallContext.setClass(lcd); + if (lcd!=VariableContext::dummyContext) + { + g_theCallContext.setClass(lcd); + } //fprintf(stderr,"is a local variable!\n"); } if (cd && cd->isLinkable()) // is it a linkable class @@ -802,6 +805,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, { if (md==0) // not found as a typedef { + //printf("setCallContextForVar(%s)\n",clName); md = setCallContextForVar(clName); if (md && g_currentDefinition) { @@ -820,10 +824,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName, if (md) { //printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>"); - //Definition *d = md->getOuterScope()==Doxygen::globalScope ? - // md->getBodyDef() : md->getOuterScope(); - //printf("definition %s\n",d?d->name().data():"<none>"); - //if (md->getGroupDef()) d = md->getGroupDef(); if (md->isLinkable()) { writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName); @@ -1085,6 +1085,7 @@ static void generateFunctionLink(BaseCodeDocInterface &ol,char *funcName) ClassDef *ccd=0; QCString locScope=g_classScope.copy(); QCString locFunc=removeRedundantWhiteSpace(funcName); + //fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()); int i=locFunc.findRev("::"); if (i>0) { @@ -1493,7 +1494,11 @@ KEYWORD ("asm"|"auto"|"class"|"const"|"const_cast"|"delete"|"dynamic_cast"|"enum FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"for"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while") TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"boolean"|"id"|"SEL") CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) - +ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++" +ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|=" +LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!" +BITOP "&"|"|"|"^"|"<<"|">>"|"~" +OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} %option noyywrap %x SkipString @@ -1827,7 +1832,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) g_code->codify(yytext); g_curlyCount++; g_inClass=TRUE; - if (YY_START==ClassVar) + if (YY_START==ClassVar && g_curClassName.isEmpty()) { g_curClassName = g_name.copy(); } @@ -1841,9 +1846,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) { g_scopeStack.push(CLASSBLOCK); pushScope(g_curClassName); - //printf("***** g_curClassName=%s\n",g_curClassName.data()); + //fprintf(stderr,"***** g_curClassName=%s\n",g_curClassName.data()); if (getResolvedClass(g_currentDefinition,g_sourceFileDef,g_curClassName)==0) { + //printf("Adding new class %s\n",g_curClassName.data()); ClassDef *ncd=new ClassDef("<code>",1, g_curClassName,ClassDef::Class,0,0,FALSE); g_codeClassSDict.append(g_curClassName,ncd); @@ -1981,6 +1987,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) codifyLines(yytext); endFontClass(); g_name.resize(0);g_type.resize(0); + BEGIN(FuncCall); } <Body>[\\|\)\+\-\/\%\~\!] { g_code->codify(yytext); @@ -2027,7 +2034,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) g_name+=yytext; } <Body>{SCOPENAME}/{B}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" - generateClassOrGlobalLink(*g_code,yytext,TRUE); + generateClassOrGlobalLink(*g_code,yytext/*,TRUE*/); addType(); g_name+=yytext; } @@ -2382,9 +2389,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) g_theVarContext.pushScope(); } } +<MemberCall2,FuncCall>{OPERATOR} { // operator + g_code->codify(yytext); + g_parmType.resize(0);g_parmName.resize(0); + } <MemberCall2,FuncCall>")" { g_theVarContext.addVariable(g_parmType,g_parmName); g_theCallContext.popScope(); + g_theCallContext.setClass(0); g_code->codify(yytext); if (--g_bracketCount<=0) { @@ -2404,8 +2416,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) g_theVarContext.addVariable(g_type,g_name); } g_parmType.resize(0);g_parmName.resize(0); - g_theCallContext.popScope(); - g_theCallContext.setClass(0); + //g_theCallContext.popScope(); + //g_theCallContext.setClass(0); if (*yytext==';' || g_insideBody) { if (!g_insideBody) @@ -2432,7 +2444,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) g_theVarContext.pushScope(); } g_theVarContext.addVariable(g_parmType,g_parmName); - g_theCallContext.popScope(); + //g_theCallContext.popScope(); g_parmType.resize(0);g_parmName.resize(0); int index = g_name.findRev("::"); if (index!=-1) @@ -2540,7 +2552,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'")) generateFunctionLink(*g_code,yytext); } <FuncCall>([a-z_A-Z][a-z_A-Z0-9]*)/("."|"->") { - //g_code->codify(yytext); g_name=yytext; generateClassOrGlobalLink(*g_code,yytext); BEGIN( MemberCall2 ); diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 6e192af..34743ea 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -4,6 +4,7 @@ #include "util.h" #include "outputlist.h" #include "language.h" +#include "message.h" //---------------------------------------------------------------------- // method implementation @@ -27,9 +28,13 @@ DirDef::DirDef(const char *path) : Definition(path,1,path) } m_subdirs.setAutoDelete(TRUE); - m_fileList = new FileList; + m_fileList = new FileList; m_classSDict = new ClassSDict(17); - m_dirCount = g_dirCount++; + m_usedDirs = new QDict<UsedDir>(257); + m_usedDirs->setAutoDelete(TRUE); + m_dirCount = g_dirCount++; + m_level=-1; + m_parent=0; } DirDef::~DirDef() @@ -40,6 +45,7 @@ void DirDef::addSubDir(DirDef *subdir) { m_subdirs.inSort(subdir); subdir->setOuterScope(this); + subdir->m_parent=this; } void DirDef::addFile(FileDef *fd) @@ -250,6 +256,136 @@ void DirDef::writeNavigationPath(OutputList &ol) ol.popGeneratorState(); } +void DirDef::setLevel() +{ + if (m_level==-1) // level not set before + { + DirDef *p = parent(); + if (p) + { + p->setLevel(); + m_level = p->level()+1; + } + else + { + m_level = 0; + } + } +} + +/** Add as "uses" dependency between \a this dir and \a dir, + * that was caused by a dependency on file \a fd. + */ +void DirDef::addUsesDependency(DirDef *dir,FileDef *fd,bool inherited) +{ + if (this==dir) return; // do not add self-dependencies + //printf(" > add dependency %s->%s due to %s\n",shortName().data(), + // dir->shortName().data(),fd->name().data()); + + // levels match => add direct dependency + bool added=FALSE; + UsedDir *usedDir = m_usedDirs->find(dir->getOutputFileBase()); + if (usedDir) // dir dependency already present + { + FileDef *usedFd = usedDir->findFile(fd->getOutputFileBase()); + if (usedFd==0) // new file dependency + { + //printf(" => new file\n"); + usedDir->addFile(fd); + added=TRUE; + } + else + { + // dir & file dependency already added + } + } + else // new directory dependency + { + //printf(" => new file\n"); + usedDir = new UsedDir(dir,inherited); + usedDir->addFile(fd); + m_usedDirs->insert(dir->getOutputFileBase(),usedDir); + added=TRUE; + } + if (added && dir->parent()) + { + // add relation to parent of used dir + addUsesDependency(dir->parent(),fd,inherited); + } + if (parent()) + { + // add relation for the parent of this dir as well + parent()->addUsesDependency(dir,fd,TRUE); + } +} + +/** Computes the dependencies between directories + */ +void DirDef::computeDependencies() +{ + FileList *fl = m_fileList; + if (fl) + { + QListIterator<FileDef> fli(*fl); + FileDef *fd; + for (fli.toFirst();(fd=fli.current());++fli) // foreach file in dir dd + { + //printf("** dir=%s file=%s\n",shortName().data(),fd->name().data()); + QList<IncludeInfo> *ifl = fd->includeFileList(); + if (ifl) + { + QListIterator<IncludeInfo> ifli(*ifl); + IncludeInfo *ii; + for (ifli.toFirst();(ii=ifli.current());++ifli) // foreach include file + { + //printf(" > %s\n",ii->includeName.data()); + if (ii->fileDef && ii->fileDef->isLinkable()) // linkable file + { + DirDef *usedDir = ii->fileDef->getDirDef(); + if (usedDir) + { + // add dependency: thisDir->usedDir + addUsesDependency(usedDir,ii->fileDef,FALSE); + } + } + } + } + } + } +} + +bool DirDef::isParentOf(DirDef *dir) const +{ + if (dir->parent()==this) // this is a parent of dir + return TRUE; + else if (dir->parent()) // repeat for the parent of dir + return isParentOf(dir->parent()); + else + return FALSE; +} + +//---------------------------------------------------------------------- + +UsedDir::UsedDir(DirDef *dir,bool inherited) : + m_dir(dir), m_inherited(inherited) +{ +} + +UsedDir::~UsedDir() +{ +} + +void UsedDir::addFile(FileDef *fd) +{ + m_files.insert(fd->getOutputFileBase(),fd); +} + +FileDef *UsedDir::findFile(const char *name) +{ + QCString n=name; + return n.isEmpty() ? 0 : m_files.find(n); +} + //---------------------------------------------------------------------- // helper functions @@ -302,6 +438,103 @@ DirDef *DirDef::mergeDirectoryInTree(const QCString &path) return dir; } +void DirDef::writeDepGraph(QTextStream &t) +{ + t << "digraph G {\n"; + t << " compound=true\n"; + + QDict<DirDef> dirsInGraph(257); + + dirsInGraph.insert(getOutputFileBase(),this); + if (isCluster()) + { + t << " subgraph cluster" << getOutputFileBase() << " {\n"; + t << " " << getOutputFileBase() << " [shape=plaintext label=\"" + << shortName() << "\"];\n"; + + // add nodes for sub directories + QListIterator<DirDef> sdi(m_subdirs); + DirDef *sdir; + for (sdi.toFirst();(sdir=sdi.current());++sdi) + { + t << " " << sdir->getOutputFileBase() << " [shape=box label=\"" + << sdir->shortName() << "\""; + if (sdir->isCluster()) + { + t << " color=\"red\" fillcolor=\"white\" style=\"filled\""; + } + t << "];\n"; + dirsInGraph.insert(sdir->getOutputFileBase(),sdir); + } + t << " }\n"; + } + else + { + t << getOutputFileBase() << " [shape=box label=\"" << shortName() << "\"];\n"; + } + + // add nodes for other used directories + QDictIterator<UsedDir> udi(*m_usedDirs); + UsedDir *udir; + //printf("*** For dir %s\n",shortName().data()); + for (udi.toFirst();(udir=udi.current());++udi) + // for each used dir (=directly used or a parent of a directly used dir) + { + const DirDef *usedDir=udir->dir(); + DirDef *dir=this; + while (dir) + { + //printf("*** check relation %s->%s same_parent=%d !%s->isParentOf(%s)=%d\n", + // dir->shortName().data(),usedDir->shortName().data(), + // dir->parent()==usedDir->parent(), + // usedDir->shortName().data(), + // shortName().data(), + // !usedDir->isParentOf(this) + // ); + if (dir!=usedDir && dir->parent()==usedDir->parent() && !usedDir->isParentOf(this)) + // include if both have the same parent (or no parent) + { + t << " " << usedDir->getOutputFileBase() << " [shape=box label=\"" + << usedDir->shortName() << "\""; + if (usedDir->isCluster()) + { + t << " color=\"red\" fillcolor=\"white\" style=\"filled\""; + } + t << "];\n"; + dirsInGraph.insert(usedDir->getOutputFileBase(),usedDir); + break; + } + dir=dir->parent(); + } + } + + // add relations between all selected directories + DirDef *dir; + QDictIterator<DirDef> di(dirsInGraph); + for (di.toFirst();(dir=di.current());++di) // foreach dir in the graph + { + QDictIterator<UsedDir> udi(*dir->usedDirs()); + UsedDir *udir; + for (udi.toFirst();(udir=udi.current());++udi) // foreach used dir + { + const DirDef *usedDir=udir->dir(); + if ((dir!=this || !udir->inherited()) && // only show direct dependendies for this dir + (usedDir!=this || !udir->inherited()) && // only show direct dependendies for this dir + !usedDir->isParentOf(dir) && // don't point to own parent + dirsInGraph.find(usedDir->getOutputFileBase())) // only point to nodes that are in the graph + { + int nrefs = udir->files().count(); + t << " " << dir->getOutputFileBase() << "->" + << usedDir->getOutputFileBase(); + t << " [headlabel=\"" << nrefs << "\" headhref=\"http://www.doxygen.org\"]"; + t << ";\n"; + } + } + } + + t << "}\n"; +} + //---------------------------------------------------------------------- // external functions @@ -356,6 +589,87 @@ void buildDirectories() } } +void computeDirDependencies() +{ + DirDef *dir; + DirSDict::Iterator sdi(Doxygen::directories); + // compute nesting level for each directory + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + dir->setLevel(); + } + // compute uses dependencies between directories + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + dir->computeDependencies(); + } + +#if 0 + printf("-------------------------------------------------------------\n"); + // print dependencies (for debugging) + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + if (dir->usedDirs()) + { + QDictIterator<UsedDir> udi(*dir->usedDirs()); + UsedDir *usedDir; + for (udi.toFirst();(usedDir=udi.current());++udi) + { + printf("%s depends on %s due to ", + dir->shortName().data(),usedDir->dir()->shortName().data()); + QDictIterator<FileDef> fdi(usedDir->files()); + FileDef *fd; + for (fdi.toFirst();(fd=fdi.current());++fdi) + { + printf("%s ",fd->name().data()); + } + printf("\n"); + } + } + } + printf("^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^\n"); +#endif +} + + +void writeDirDependencyGraph(const char *dirName) +{ + QString path; + DirDef *dir; + DirSDict::Iterator sdi(Doxygen::directories); + QFile htmlPage(QCString(dirName)+"/dirdeps.html"); + if (htmlPage.open(IO_WriteOnly)) + { + QTextStream out(&htmlPage); + out << "<html><body>"; + for (sdi.toFirst();(dir=sdi.current());++sdi) + { + path=dirName; + path+="/"; + path+=dir->getOutputFileBase(); + path+="_dep.dot"; + out << "<h4>" << dir->displayName() << "</h4>" << endl; + out << "<img src=\"" << dir->getOutputFileBase() << "_dep.gif\">" << endl; + QFile f(path); + if (f.open(IO_WriteOnly)) + { + QTextStream t(&f); + dir->writeDepGraph(t); + } + f.close(); + QCString dotArgs(4096); + QCString outFile = QCString(dirName)+"/"+dir->getOutputFileBase()+"_dep.gif"; + dotArgs.sprintf("%s -Tgif -o %s",path.data(),outFile.data()); + if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + { + err("Problems running dot. Check your installation!\n"); + } + } + out << "</body></html>"; + } + htmlPage.close(); +} + void generateDirDocs(OutputList &ol) { DirDef *dir; diff --git a/src/dirdef.h b/src/dirdef.h index 90ede70..09034a2 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -29,6 +29,8 @@ class ClassSDict; class QStrList; class FileDef; class OutputList; +class UsedDir; +class QTextStream; class DirDef; @@ -43,6 +45,8 @@ class DirDef : public Definition public: DirDef(const char *path); virtual ~DirDef(); + + // accessors virtual DefType definitionType() { return TypeDir; } virtual QCString getOutputFileBase() const; virtual bool isLinkableInProject() const { return !isReference() && hasDocumentation(); } @@ -53,19 +57,30 @@ class DirDef : public Definition FileList * getFiles() const { return m_fileList; } ClassSDict * getClasses() const { return m_classSDict; } void addFile(FileDef *fd); + const QList<DirDef> &subDirs() const { return m_subdirs; } + bool isCluster() const { return m_subdirs.count()>0; } + int level() const { return m_level; } + DirDef *parent() const { return m_parent; } + const QDict<UsedDir> *usedDirs() const { return m_usedDirs; } + bool isParentOf(DirDef *dir) const; + + // generate output void writeDetailedDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol); void writeNavigationPath(OutputList &ol); - const QList<DirDef> &subDirs() const { return m_subdirs; } - + void writeDepGraph(QTextStream &t); static DirDef *mergeDirectoryInTree(const QCString &path); bool visited; private: + friend void computeDirDependencies(); void writePathFragment(OutputList &ol); + void setLevel(); static DirDef *createNewDir(const char *path); static bool matchPath(const QCString &path,QStrList &l); + void addUsesDependency(DirDef *usedDir,FileDef *fd,bool inherited); + void computeDependencies(); DirList m_subdirs; QCString m_dispName; @@ -73,6 +88,26 @@ class DirDef : public Definition FileList *m_fileList; // list of files in the group ClassSDict *m_classSDict; // list of classes in the group int m_dirCount; + int m_level; + DirDef *m_parent; + QDict<UsedDir> *m_usedDirs; +}; + +class UsedDir +{ + public: + UsedDir(DirDef *dir,bool inherited); + virtual ~UsedDir(); + void addFile(FileDef *fd); + FileDef *findFile(const char *name); + const QDict<FileDef> &files() const { return m_files; } + const DirDef *dir() const { return m_dir; } + bool inherited() const { return m_inherited; } + + private: + DirDef *m_dir; + QDict<FileDef> m_files; + bool m_inherited; }; inline int DirList::compareItems(GCI item1,GCI item2) @@ -93,5 +128,7 @@ class DirSDict : public SDict<DirDef> void buildDirectories(); void generateDirDocs(OutputList &ol); +void computeDirDependencies(); +void writeDirDependencyGraph(const char *file); #endif diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 62d8886..dc02f64 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -297,7 +297,7 @@ SCOPESEP "::"|"#"|"." SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP} SCOPEKEYS ":"({ID}":")* SCOPECPP {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")? -SCOPEOBJC {ID}{SCOPEKEYS}? +SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}? SCOPEMASK {SCOPECPP}|{SCOPEOBJC} FUNCARG "("{FUNCCHAR}*")" OPNEW {BLANK}+"new"({BLANK}*"[]")? diff --git a/src/dot.cpp b/src/dot.cpp index 670911e..4627a8f 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -2338,30 +2338,8 @@ bool DotCallGraph::isTrivial() const //------------------------------------------------------------- -DotDirDeps::DotDirDeps(DirDef *dd) +DotDirDeps::DotDirDeps(DirDef *) { - FileList *fl = dd->getFiles(); - if (fl) - { - QListIterator<FileDef> fli(*fl); - FileDef *fd; - for (fli.toFirst();(fd=fli.current());++fli) // foreach file in dir dd - { - QList<IncludeInfo> *ifl = fd->includeFileList(); - if (ifl) - { - QListIterator<IncludeInfo> ifli(*ifl); - IncludeInfo *ii; - for (ifli.toFirst();(ii=ifli.current());++ifli) // foreach include file - { - if (ii->fileDef) - { - // add dependency - } - } - } - } - } } DotDirDeps::~DotDirDeps() diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 57ad6a8..0e57ce1 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1222,20 +1222,26 @@ static void findUsingDeclarations(Entry *root) // with the most inner scope and going to the most outer scope (i.e. // file scope). + QCString name = substitute(root->name,".","::"); MemberDef *mtd=0; - usingCd = getResolvedClass(nd,fd,root->name,&mtd); + usingCd = getResolvedClass(nd,fd,name,&mtd); //printf("%s -> %p\n",root->name.data(),usingCd); if (usingCd==0) // definition not in the input => add an artificial class { Debug::print(Debug::Classes,0," New using class `%s' (sec=0x%08x)! #tArgLists=%d\n", - root->name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); + name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); usingCd = new ClassDef( "<using>",1, root->name,ClassDef::Class); Doxygen::hiddenClasses.append(root->name,usingCd); usingCd->setClassIsArtificial(); } + else + { + Debug::print(Debug::Classes,0," Found used class %s in scope=%s\n", + usingCd->name().data(),nd?nd->name().data():fd->name().data()); + } if (mtd) // add the typedef to the correct scope { @@ -8344,6 +8350,10 @@ void parseInput() buildClassDocList(root); resolveClassNestingRelations(); + msg("Searching for members imported via using declarations...\n"); + findUsingDeclImports(root); + findUsingDeclarations(root); + msg("Building example list...\n"); buildExampleList(root); @@ -8379,10 +8389,6 @@ void parseInput() findEnums(root); findEnumDocumentation(root); - msg("Searching for members imported via using declarations...\n"); - findUsingDeclImports(root); - findUsingDeclarations(root); - msg("Searching for member function documentation...\n"); findObjCMethodDefinitions(root); findMemberDocumentation(root); // may introduce new members ! @@ -8442,6 +8448,8 @@ void parseInput() msg("Adding todo/test/bug list items...\n"); addListReferences(); + msg("Computing dependencies between directories...\n"); + computeDirDependencies(); } void generateOutput() @@ -8640,8 +8648,7 @@ void generateOutput() writeGraphInfo(*outputList); } - //msg("Generating search index...\n"); - //generateSearchIndex(); + //writeDirDependencyGraph(Config_getString("HTML_OUTPUT")); if (Config_getBool("GENERATE_RTF")) { @@ -8664,15 +8671,6 @@ void generateOutput() Doxygen::formulaList.generateBitmaps(Config_getString("HTML_OUTPUT")); } - // This is confusing people, so I removed it - //if (Config_getBool("SEARCHENGINE") || Config_getList("TAGFILES").count()>0) - //{ - // msg("\nNow copy the file\n\n %s\n\nto the directory where the CGI binaries are " - // "located and don't forget to run\n\n",(Config_getString("HTML_OUTPUT")+"/"+Config_getString("CGI_NAME")).data()); - // msg(" %s/installdox\n\nto replace any dummy links.\n\n", - // Config_getString("HTML_OUTPUT").data()); - //} - if (Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP")) { HtmlHelp::getInstance()->finalize(); diff --git a/src/index.cpp b/src/index.cpp index d4d2fc4..0e93381 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2873,7 +2873,8 @@ void writeDirTreeNode(OutputList &ol, DirDef *dd,int level) ftvHelp->incContentsDepth(); } - ol.writeIndexItem(dd->getReference(),dd->getOutputFileBase(),dd->shortName()); + ol.writeIndexItem(dd->getReference(),dd->getOutputFileBase(), + dd->shortName()); if (dd->isReference()) { ol.startTypewriter(); diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 0e3316a..c83a499 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -79,8 +79,10 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s) } -LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) - : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE) +LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci, + bool insideTabbing) + : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), + m_insideItem(FALSE), m_hide(FALSE), m_insideTabbing(insideTabbing) { } @@ -979,7 +981,7 @@ void LatexDocVisitor::visitPost(DocText *) void LatexDocVisitor::filter(const char *str) { - filterLatexString(m_t,str,FALSE,m_insidePre,m_insideItem); + filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem); } void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor) diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h index e6d8d10..195c843 100644 --- a/src/latexdocvisitor.h +++ b/src/latexdocvisitor.h @@ -30,7 +30,7 @@ class QString; class LatexDocVisitor : public DocVisitor { public: - LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci); + LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci,bool insideTabbing); //-------------------------------------- // visitor functions for leaf nodes @@ -154,6 +154,7 @@ class LatexDocVisitor : public DocVisitor bool m_insidePre; bool m_insideItem; bool m_hide; + bool m_insideTabbing; QStack<bool> m_enabled; }; diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 0554b19..87dca72 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -102,7 +102,6 @@ LatexGenerator::LatexGenerator() : OutputGenerator() //printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n"); insideTabbing=FALSE; firstDescItem=TRUE; - insidePre=FALSE; m_indent=0; } @@ -110,31 +109,6 @@ LatexGenerator::~LatexGenerator() { } -//LatexGenerator::LatexGenerator(const LatexGenerator &g) -// : OutputGenerator(g) -//{ -// col=g.col; -//} - -//void LatexGenerator::append(const OutputGenerator *g) -//{ -// t << g->getContents(); -// col+=((LatexGenerator *)g)->col; -// insideTabbing=insideTabbing || ((LatexGenerator *)g)->insideTabbing; -// firstDescItem = ((LatexGenerator *)g)->firstDescItem; -// insidePre = insidePre || ((LatexGenerator *)g)->insidePre; -// //printf("LatexGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), -// // insideTabbing ? "TRUE" : "FALSE" ); -//} - -//OutputGenerator *LatexGenerator::copy() -//{ -// LatexGenerator *result = new LatexGenerator; -// result->insideTabbing=insideTabbing; -// result->insidePre=insidePre; -// return result; -//} - void LatexGenerator::init() { QCString dir=Config_getString("LATEX_OUTPUT"); @@ -1260,7 +1234,7 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) //void LatexGenerator::docifyStatic(QTextStream &t,const char *str) void LatexGenerator::docify(const char *str) { - filterLatexString(t,str,insideTabbing,insidePre); + filterLatexString(t,str,insideTabbing,FALSE); } void LatexGenerator::codify(const char *str) @@ -1548,7 +1522,7 @@ void LatexGenerator::endParamList() void LatexGenerator::printDoc(DocNode *n) { - LatexDocVisitor *visitor = new LatexDocVisitor(t,*this); + LatexDocVisitor *visitor = new LatexDocVisitor(t,*this,insideTabbing); n->accept(visitor); delete visitor; } diff --git a/src/latexgen.h b/src/latexgen.h index 7b2be4f..faf9f98 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -212,7 +212,6 @@ class LatexGenerator : public OutputGenerator int col; bool insideTabbing; bool firstDescItem; - bool insidePre; QCString relPath; int m_indent; }; diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index a878abc..d85d323 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -990,9 +990,9 @@ void RTFDocVisitor::visitPre(DocImage *img) m_t << "\\par" << endl; m_t << "{" << endl; m_t << rtf_Style_Reset << endl; - m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; + m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; m_t << img->name(); - m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; m_t << "}" << endl; m_lastIsPara=TRUE; } @@ -1381,9 +1381,9 @@ void RTFDocVisitor::writeDotFile(const QString &fileName) if (!m_lastIsPara) m_t << "\\par" << endl; m_t << "{" << endl; m_t << rtf_Style_Reset; - m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; + m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; m_t << baseName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); - m_t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; m_t << "}" << endl; m_lastIsPara=TRUE; } diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 73e24e4..f243d1b 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -549,8 +549,8 @@ void RTFGenerator::endIndexSection(IndexSections is) t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n"; if (rtf_logoFilename) { - t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE " << rtf_logoFilename; - t << " \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n"; + t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << rtf_logoFilename; + t << "\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n"; } if (rtf_company) { @@ -1717,8 +1717,8 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d, // display the file t << "{" << endl; t << rtf_Style_Reset << endl; - t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; - t << fileName << ".png"; + t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; + t << fileName << ".png\""; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; } @@ -2206,9 +2206,9 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) // display the file t << "{" << endl; t << rtf_Style_Reset << endl; - t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; + t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); - t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; newParagraph(); DBG_RTF(t << "{\\comment (endDotGraph)}" << endl) @@ -2229,9 +2229,9 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) // display the file t << "{" << endl; t << rtf_Style_Reset << endl; - t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; + t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); - t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl) } @@ -2251,9 +2251,9 @@ void RTFGenerator::endCallGraph(DotCallGraph &g) // display the file t << "{" << endl; t << rtf_Style_Reset << endl; - t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE "; + t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \""; t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); - t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; + t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << "}" << endl; DBG_RTF(t << "{\\comment (endCallGraph)}" << endl) } diff --git a/src/scanner.l b/src/scanner.l index 870590c..9cd310e 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -669,6 +669,7 @@ ID "$"?[a-z_A-Z][a-z_A-Z0-9]* LABELID [a-z_A-Z][a-z_A-Z0-9\-]* SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPENAME "$"?(({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) +TSCOPE {ID}("<"[a-z_A-Z0-9 \t\*\&]*">")? CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID}) ATTR ({B}+[^>\n]*)? A [aA] @@ -2694,10 +2695,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] } } <ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; } -<ReadBody,ReadNSBody,ReadBodyIntf>"'#" { current->program += yytext ; } -<FindMembers>"("/({BN}*{ID}{BN}*"::")*{ID}{BN}*")"{BN}*"(" | /* typedef void (A::func_t)(args...) */ -<FindMembers>("("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */ +<FindMembers>"("/({BN}*{TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */ +<FindMembers>("("({BN}*{TSCOPE}{BN}*"::")*({BN}*"*"{BN}*)+)+ { /* typedef void (A::*ptr_t)(args...) */ current->bodyLine = yyLineNr; lineCount(); addType(current); @@ -3620,7 +3620,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] BEGIN( FindMembers ); } } -<ClassVar>"," // Multiple class forward declaration +<ClassVar>"," { + if (isTypedef) + { + // multiple types in one typedef + unput(','); + current->type.prepend("typedef "); + BEGIN(FindMembers); + } + else + { + // Multiple class forward declaration + } + } <ClassVar>{ID} { if (insideIDL && strcmp(yytext,"switch")==0) { diff --git a/src/translator_sr.h b/src/translator_sr.h index 30d143b..67abee4 100644 --- a/src/translator_sr.h +++ b/src/translator_sr.h @@ -18,10 +18,10 @@ #ifndef TRANSLATOR_SR_H #define TRANSLATOR_SR_H -// translation by Dejan D. M. Milosavljevic <dmilos@email.com>;<dmilosx@ptt.yu> +// translation by Dejan D. M. Milosavljevic <dmilos@email.com>;<dmilosx@ptt.yu>;<office@ddmrm.com> // // 10x 2 Ivana Miletic for gramatical consutation. -class TranslatorSerbian : public TranslatorAdapter_1_3_8 +class TranslatorSerbian : public Translator { private: QCString decode(const QCString& sInput) @@ -80,15 +80,15 @@ private: /*! used in the compound documentation before a list of related functions. */ virtual QCString trRelatedFunctions() - { return "Povezane funkcije"; } + { return decode( "Povezane funkcije" ); } /*! subscript for the related functions. */ virtual QCString trRelatedSubscript() - { return decode( "(To nisu funkcije članice.)" ); } // tj. metode + { return decode( "(To nisu funkcije članice.)" ); } /*! header that is put before the detailed description of files, classes and namespaces. */ virtual QCString trDetailedDescription() - { return decode( "Detaljno objašnjenje" ); } + { return decode( "Opširnije objašnjenje" ); } // detalj je francuska rec. /*! header that is put before the list of typedefs. */ virtual QCString trMemberTypedefDocumentation() @@ -140,22 +140,22 @@ private: */ virtual QCString trGeneratedAutomatically(const char *s) { QCString result="Napravljeno automatski Doxygen-om"; - if (s) result+=(QCString)" za "+s; + if( s ) result+=(QCString)" za " + s; result+=" od izvornog koda."; - return result; + return decode( result ); } /*! put after an enum name in the list of all members */ virtual QCString trEnumName() - { return "ime enum-a "; } + { return decode( "ime enum-a " ); } /*! put after an enum value in the list of all members */ virtual QCString trEnumValue() - { return "vrednost enum-a"; } + { return decode( "vrednost enum-a" ); } /*! put after an undocumented member in the list of all members */ virtual QCString trDefinedIn() - { return "definisano u"; } + { return decode( "definisano u" ); } // quick reference sections @@ -163,32 +163,32 @@ private: * compounds or files (see the \\group command). */ virtual QCString trModules() - { return "Moduli"; } + { return decode( "Moduli" ); } /*! This is put above each page as a link to the class hierarchy */ virtual QCString trClassHierarchy() - { return "Stablo klasa"; } + { return decode( "Stablo klasa" ); } /*! 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 "Sve strukture"; + return decode( "Sve strukture" ); } else { - return "Sve klase"; + return decode( "Sve klase" ); } } /*! This is put above each page as a link to the list of documented files */ virtual QCString trFileList() - { return "Spisak datoteka"; } + { return decode( "Spisak datoteka" ); } /*! This is put above each page as a link to the list of all verbatim headers */ virtual QCString trHeaderFiles() - { return "Zaglavlja"; } + { return decode( "Zaglavlja" ); } /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() @@ -208,11 +208,11 @@ private: { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return decode("Članovi datoteke"); + return decode( "Članovi datoteke" ); } else { - return decode("Članovi datoteke"); + return decode( "Članovi datoteke" ); } } @@ -330,7 +330,7 @@ private: /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() - { return "Spisak primera:"; } + { return decode( "Spisak primera:" ); } /*! This is an introduction to the page with the list of related pages */ virtual QCString trRelatedPagesDescription() @@ -338,26 +338,26 @@ private: /*! This is an introduction to the page with the list of class/file groups */ virtual QCString trModulesDescription() - { return "Spisak svih modula:"; } + { return decode( "Spisak svih modula:" ); } /*! This sentences is used in the annotated class/file lists if no brief * description is given. */ virtual QCString trNoDescriptionAvailable() - { return "Opis nije dostupan"; } + { return decode( "Opis nije dostupan" ); } // index titles (the project name is prepended for these) /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() - { return "Dokumentacija"; } + { return decode("Dokumentacija" ); } /*! This is used in LaTeX as the title of the chapter with the * index of all groups. */ virtual QCString trModuleIndex() - { return "Index modula"; } + { return decode( "Index modula" ); } /*! This is used in LaTeX as the title of the chapter with the * class hierarchy. @@ -384,13 +384,13 @@ private: * list of all files. */ virtual QCString trFileIndex() - { return "Indeks datoteka"; } + { return decode( "Indeks datoteka" ); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. */ virtual QCString trModuleDocumentation() - { return "Dokumentacija modula"; } + { return decode( "Dokumentacija modula" ); } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all classes, structs and unions. @@ -533,8 +533,8 @@ private: */ virtual QCString trGeneratedAt(const char *date,const char *projName) { - QCString result=(QCString)"Napravljeno "+date; - if (projName) result+=(QCString)" za "+projName; + QCString result=(QCString)"Napravljeno " + date; + if ( projName ) result+=(QCString)" za " + projName; result+=(QCString)" od"; return decode( result ); } @@ -548,7 +548,7 @@ private: /*! this text is put before a class diagram */ virtual QCString trClassDiagram(const char *clName) { - return decode( QCString("Dijagram nasleđivanja za klasu ") + clName+":" ); + return decode( QCString("Dijagram nasleđivanja za klasu ") + clName + ":" ); } /*! this text is generated when the \\internal command is used. */ @@ -569,7 +569,7 @@ private: /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() - { return "Verzija"; } + { return "Verzija"; } // inacica /*! this text is generated when the \\date command is used. */ virtual QCString trDate() @@ -609,7 +609,7 @@ private: QCString result="Spisak svih "; if (!extractAll) result+="dokumentovanih "; result+="prostora imena sa kratkim opisom:"; - return result; + return decode( result ); } /*! used in the class documentation as a header before the list of all @@ -626,7 +626,7 @@ private: * related classes */ virtual QCString trRelatedFunctionDocumentation() - { return "Dokumentacija prijateljskih funkcija ili klasa"; } + { return decode( "Dokumentacija prijateljskih funkcija ili klasa" ); } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 @@ -645,8 +645,8 @@ private: case ClassDef::Struct: result+="strukture "; break; case ClassDef::Union: result+="unije "; break; case ClassDef::Interface: result+="interfejsa "; break; - case ClassDef::Protocol: result+="protocol "; break; // translate me! - case ClassDef::Category: result+="category "; break; // translate me! + case ClassDef::Protocol: result+="protokola "; break; // grcka rec + case ClassDef::Category: result+="kategorije "; break; // case ClassDef::Exception: result+="izuzetka "; break; } if (isTemplate) result += "šablona "; @@ -660,7 +660,7 @@ private: { QCString result = "Opis datoteke "; result += fileName; - return result; + return decode( result ); } /*! used as the title of the HTML page of a namespace */ @@ -805,8 +805,8 @@ private: case ClassDef::Struct: result+="ove strukture"; break; case ClassDef::Union: result+="ove unije"; break; case ClassDef::Interface: result+="ovog interfejsa"; break; - case ClassDef::Protocol: result+="protocol"; break; // translate me! - case ClassDef::Category: result+="category"; break; // translate me! + case ClassDef::Protocol: result+="ovog protokola"; break; + case ClassDef::Category: result+="ove kategorije"; break; case ClassDef::Exception: result+="ovog izuzetka"; break; } result+=" je napravljena iz "; @@ -1084,7 +1084,7 @@ private: "<ul>\n" "<li>Puni crni predstavlja strukturu ili klasu za koju je graf napravljen.\n" "<li>Sa crnom ivicom predstavlja dokumentovanu strukturu ili klasu.\n" - "<li>Sa sivom icivom predstavlja nedokumentovanu strukturu ili klasu.\n" + "<li>Sa sivom ivicom predstavlja nedokumentovanu strukturu ili klasu.\n" "<li>Sa crvenom ivicom predstavlja dokumentovanu strukturu ili klasu\n" "za koju nije prikazan graf nasleđivanja/korišćenja. Graf je odsečen " "ako ne stane unutar određenih granica." @@ -1156,7 +1156,7 @@ private: /*! Used for Java interfaces in the summary section of Java packages */ virtual QCString trInterfaces() { - return "Interfejsi"; + return "Interfejsi"; // Radna okruzenja. Ali to je dve reci. } /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() @@ -1473,7 +1473,7 @@ private: */ virtual QCString trStaticPackageAttribs() { - return decode( "Statički atributi u paketu" ); // Zajednicki clanovi u paketu + return decode( "Statički atributi u paketu" ); // Zajednicki clanovi u paketu } ////////////////////////////////////////////////////////////////////////// @@ -1549,6 +1549,62 @@ private: return decode( "Pronađeno:" ); } +////////////////////////////////////////////////////////////////////////// +// new since 1.3.8 +////////////////////////////////////////////////////////////////////////// + + /*! This is used in HTML as the title of page with source code for file filename + */ + virtual QCString trSourceFile(QCString& filename) + { + return decode( "Izvorni kod datoteke " + filename ) ; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.3.9 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the name of the chapter containing the directory + * hierarchy. + */ + virtual QCString trDirIndex() + { return decode( "Stablo direktorijuma" ); } + + /*! This is used as the name of the chapter containing the documentation + * of the directories. + */ + virtual QCString trDirDocumentation() + { return decode( "Dokumentacija direktorijuma" ); } + + /*! 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 decode( "direktorijumi" ); } + + /*! This returns a sentences that introduces the directory hierarchy. + * and the fact that it is sorted alphabetically per level + */ + virtual QCString trDirDescription() + { return decode( "Stablo direktorijuma slozeno priblizno abecednim redom" ); + } + + /*! 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=dirName; result+="Opis direktorijuma"; return decode( 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 first_capital, bool singular) + { + QCString result((first_capital ? "Direktorijum" : "direktorijum")); + if (!singular) result+="i"; + return decode( result ); + } + }; diff --git a/src/util.cpp b/src/util.cpp index 10d3ea2..6b011bd 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -833,6 +833,7 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item) if (scope->definitionType()==Definition::TypeNamespace) { NamespaceDef *nscope = (NamespaceDef*)scope; + //printf(" %s is namespace with %d used classes\n",nscope->name().data(),nscope->getUsedClasses()); SDict<Definition> *cl = nscope->getUsedClasses(); if (accessibleViaUsingClass(cl,fileScope,item)) { @@ -1074,7 +1075,7 @@ ClassDef *getResolvedClassRec(Definition *scope, ClassDef *bestMatch=0; - //printf(" found %d symbol with name %s\n",dl->count(),name.data()); + //printf(" found %d symbol(s) with name %s\n",dl->count(),name.data()); // now we look int the list of Definitions and determine which one is the "best" DefinitionListIterator dli(*dl); Definition *d; @@ -1084,7 +1085,7 @@ ClassDef *getResolvedClassRec(Definition *scope, int count=0; for (dli.toFirst();(d=dli.current());++dli,++count) // foreach definition { - //fprintf(stderr," found type %x name=%s (%d/%d)\n", + //printf(" found type %x name=%s (%d/%d)\n", // d->definitionType(),d->name().data(),count,dl->count()); // only look at classes and members @@ -1377,9 +1378,8 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, bool keepSpaces) { //printf("`%s'\n",text); - static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9:]*"); + static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9.:]*"); QCString txtStr=text; - QCString scopeName; int strLen = txtStr.length(); //printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d\n", // scope?scope->name().data():"<none>", @@ -1429,6 +1429,9 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, } // get word from string QCString word=txtStr.mid(newIndex,matchLen); + QCString matchWord = substitute(word,".","::"); + //printf("linkifyText word=%s matchWord=%s scope=%s\n", + // word.data(),matchWord.data(),scope?scope->name().data():"<none>"); bool found=FALSE; if (!insideString) { @@ -1439,7 +1442,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, GroupDef *gd=0; MemberDef *typeDef=0; - if ((cd=getResolvedClass(scope,fileScope,word,&typeDef))) + if ((cd=getResolvedClass(scope,fileScope,matchWord,&typeDef))) { // add link to the result if (external ? cd->isLinkable() : cd->isLinkableInProject()) @@ -1459,7 +1462,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, found=TRUE; } } - else if ((cd=getClass(word+"-p"))) // search for Obj-C protocols as well + else if ((cd=getClass(matchWord+"-p"))) // search for Obj-C protocols as well { // add link to the result if (external ? cd->isLinkable() : cd->isLinkableInProject()) @@ -1469,7 +1472,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, } } - + QCString scopeName; if (scope && (scope->definitionType()==Definition::TypeClass || scope->definitionType()==Definition::TypeNamespace @@ -1478,9 +1481,10 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, { scopeName=scope->name(); } - //if (!found) printf("Trying to link %s in %s\n",word.data(),scName); + //printf("ScopeName=%s\n",scopeName.data()); + //if (!found) printf("Trying to link %s in %s\n",word.data(),scopeName.data()); if (!found && - getDefs(scopeName,word,0,md,cd,fd,nd,gd) && + getDefs(scopeName,matchWord,0,md,cd,fd,nd,gd) && (md->isTypedef() || md->isEnumerate() || md->isReference() || md->isVariable() ) && @@ -1501,7 +1505,6 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, if (!found) // add word to the result { - //ol.docify(word); out.writeString(word,keepSpaces); } // set next start point in the string @@ -1722,6 +1725,10 @@ QCString getFileFilter(const char* name) { // found a match! QCString filterName = fs.mid(i_equals+1); + if (filterName.find(' ')!=-1) + { // add quotes if the name has spaces + filterName="\""+filterName+"\""; + } return filterName; } } |