diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 11 | ||||
-rw-r--r-- | src/classdef.h | 1 | ||||
-rw-r--r-- | src/config.h | 4 | ||||
-rw-r--r-- | src/config.l | 17 | ||||
-rw-r--r-- | src/definition.h | 25 | ||||
-rw-r--r-- | src/doc.l | 5 | ||||
-rw-r--r-- | src/doxygen.cpp | 31 | ||||
-rw-r--r-- | src/doxygen.pro.in | 2 | ||||
-rw-r--r-- | src/entry.cpp | 3 | ||||
-rw-r--r-- | src/entry.h | 7 | ||||
-rw-r--r-- | src/filedef.h | 1 | ||||
-rw-r--r-- | src/groupdef.cpp | 22 | ||||
-rw-r--r-- | src/groupdef.h | 1 | ||||
-rw-r--r-- | src/htmlgen.cpp | 6 | ||||
-rw-r--r-- | src/htmlhelp.cpp | 31 | ||||
-rw-r--r-- | src/htmlhelp.h | 6 | ||||
-rw-r--r-- | src/language.cpp | 5 | ||||
-rw-r--r-- | src/memberdef.cpp | 40 | ||||
-rw-r--r-- | src/memberdef.h | 4 | ||||
-rw-r--r-- | src/memberlist.cpp | 38 | ||||
-rw-r--r-- | src/memberlist.h | 2 | ||||
-rw-r--r-- | src/namespacedef.h | 1 | ||||
-rw-r--r-- | src/page.h | 7 | ||||
-rw-r--r-- | src/rtfgen.cpp | 10 | ||||
-rw-r--r-- | src/scanner.l | 116 | ||||
-rw-r--r-- | src/translator_si.h | 671 | ||||
-rw-r--r-- | src/util.cpp | 11 |
27 files changed, 933 insertions, 145 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index 4d56c74..6a505ec 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -386,10 +386,13 @@ void ClassDef::insertMember(MemberDef *md) functionMembers.append(md); break; case Private: - if (Config::sortMembersFlag) - functionMembers.inSort(md); - else - functionMembers.append(md); + if (Config::extractPrivateFlag) + { + if (Config::sortMembersFlag) + functionMembers.inSort(md); + else + functionMembers.append(md); + } break; } break; diff --git a/src/classdef.h b/src/classdef.h index 39c29d1..dd4b16f 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -58,6 +58,7 @@ class ClassDef : public Definition const char *name,CompoundType ct, const char *ref=0,const char *fName=0); ~ClassDef(); + DefType definitionType() { return TypeClass; } QCString getOutputFileBase() const { return fileName; } QCString displayName() const; CompoundType compoundType() const { return compType; } diff --git a/src/config.h b/src/config.h index cec30e6..724f02b 100644 --- a/src/config.h +++ b/src/config.h @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Sun Sep 24 18:38:07 2000 +/* This file was generated by configgen on Sun Oct 1 13:51:26 2000 * from config_templ.h * * DO NOT EDIT! @@ -60,7 +60,7 @@ struct Config static bool hideScopeNames; // hide the name of the scope. static bool verbatimHeaderFlag; // enable/disable generation of verb headers. static bool showIncFileFlag; // show include file in file documentation? - static bool autoBriefFlag; // javadoc comments behaves as Qt comments. + static bool autoBriefFlag; // should javadoc comments behaves as Qt comments. static bool inheritDocsFlag; // inheritance of documentation enabled? static bool inlineInfoFlag; // show info about inline members? static bool sortMembersFlag; // sort members alphabetically? diff --git a/src/config.l b/src/config.l index 0a3302b..204531f 100644 --- a/src/config.l +++ b/src/config.l @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Sun Sep 24 18:38:07 2000 +/* This file was generated by configgen on Sun Oct 1 13:51:26 2000 * from config_templ.l * * DO NOT EDIT! @@ -97,7 +97,7 @@ bool Config::caseSensitiveNames = TRUE; bool Config::hideScopeNames = FALSE; bool Config::verbatimHeaderFlag = TRUE; bool Config::showIncFileFlag = TRUE; -bool Config::autoBriefFlag = TRUE; +bool Config::autoBriefFlag = FALSE; bool Config::inheritDocsFlag = TRUE; bool Config::inlineInfoFlag = TRUE; bool Config::sortMembersFlag = TRUE; @@ -823,7 +823,7 @@ void Config::init() Config::hideScopeNames = FALSE; Config::verbatimHeaderFlag = TRUE; Config::showIncFileFlag = TRUE; - Config::autoBriefFlag = TRUE; + Config::autoBriefFlag = FALSE; Config::inheritDocsFlag = TRUE; Config::inlineInfoFlag = TRUE; Config::sortMembersFlag = TRUE; @@ -1015,8 +1015,8 @@ void writeTemplateConfig(QFile *f,bool sl) t << "# information to generate all constant output in the proper language. \n"; t << "# The default language is English, other supported languages are: \n"; t << "# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, \n"; - t << "# Korean, Hungarian, Spanish, Romanian, Russian, Croatian, Polish, and \n"; - t << "# Portuguese.\n"; + t << "# Korean, Hungarian, Spanish, Romanian, Russian, Croatian, Polish, \n"; + t << "# Portuguese and Slovene.\n"; t << "\n"; } t << "OUTPUT_LANGUAGE = "; @@ -1240,10 +1240,11 @@ void writeTemplateConfig(QFile *f,bool sl) if (!sl) { t << "\n"; - t << "# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen \n"; + t << "# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen \n"; t << "# will interpret the first line (until the first dot) of a JavaDoc-style \n"; - t << "# comment as the brief description. If set to NO, the Javadoc-style will \n"; - t << "# behave just like the Qt-style comments. \n"; + t << "# comment as the brief description. If set to NO, the JavaDoc \n"; + t << "# comments will behave just like the Qt-style comments (thus requiring an \n"; + t << "# explict @brief command for a brief description. \n"; t << "\n"; } t << "JAVADOC_AUTOBRIEF = "; diff --git a/src/definition.h b/src/definition.h index e8f71d7..7332e61 100644 --- a/src/definition.h +++ b/src/definition.h @@ -32,27 +32,32 @@ class MemberDef; class Definition { public: - /*! create a new definition */ + /*! Types of derived classes */ + enum DefType { TypeClass, TypeMember, TypeFile, TypeGroup, TypeNamespace }; + /*! Use this for dynamic inspection of the derived class */ + virtual DefType definitionType() = 0; + + /*! Create a new definition */ Definition( const char *defFileName,int defLine, const char *name,const char *b=0,const char *d=0); - /*! destroys the definition */ + /*! Destroys the definition */ virtual ~Definition(); - /*! returns the name of the definition */ + /*! Returns the name of the definition */ const QCString& name() const { return n; } - /*! returns the base name of the output file that contains this + /*! Returns the base name of the output file that contains this * definition. */ virtual QCString getOutputFileBase() const = 0; /*! Returns the name of the source listing of this file. */ const QCString sourceName() const { return getOutputFileBase()+"-source"; } - /*! returns the detailed description of this definition */ + /*! Returns the detailed description of this definition */ const QCString& documentation() const { return doc; } - /*! returns the brief description of this definition */ + /*! Returns the brief description of this definition */ const QCString& briefDescription() const { return brief; } - /*! sets a new \a name for the definition */ + /*! Sets a new \a name for the definition */ void setName(const char *name) { n=name; } - /*! sets the documentation of this definition to \a d. */ + /*! Sets the documentation of this definition to \a d. */ void setDocumentation(const char *d,bool stripWhiteSpace=TRUE) { if (stripWhiteSpace) @@ -60,11 +65,11 @@ class Definition else doc=d; } - /*! sets the brief description of this definition to \a b. + /*! Sets the brief description of this definition to \a b. * A dot is added to the sentence if not available. */ void setBriefDescription(const char *b); - /*! returns TRUE iff the definition is documented */ + /*! Returns TRUE iff the definition is documented */ virtual bool hasDocumentation(); virtual bool isLinkableInProject() = 0; virtual bool isLinkable() = 0; @@ -984,6 +984,11 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") } } <DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"par"{B}* { + QCString t=yytext; + if (t.contains('\n')>1 && insideItemList) + { + forceEndItemList(); + } BEGIN(DocPar); } <DocPar>[^\n]*{BN} { diff --git a/src/doxygen.cpp b/src/doxygen.cpp index b77c746..e01ef56 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1107,6 +1107,7 @@ static MemberDef *addVariableToClass( md->setDocumentation(root->doc); md->setBriefDescription(root->brief); md->setDefinition(def); + md->setBitfields(root->bitfields); md->addSectionsToDefinition(root->anchors); md->setFromAnnonymousScope(fromAnnScope); md->setFromAnnonymousMember(fromAnnMemb); @@ -2038,6 +2039,22 @@ static void transferRelatedFunctionDocumentation() } //---------------------------------------------------------------------- +static void replaceNamespaceAliases(QCString &scope,int i) +{ + //printf("replaceNamespaceAliases(%s,%d)\n",scope.data(),i); + while (i>0) + { + QCString *s = namespaceAliasDict[scope.left(i)]; + if (s) + { + scope=*s+scope.right(scope.length()-i); + i=s->length(); + } + i=scope.findRev("::",i-1); + } + //printf("replaceNamespaceAliases() result=%s\n",scope.data()); +} + static bool findBaseClassRelation(Entry *root,ClassDef *cd, BaseInfo *bi, @@ -2109,6 +2126,14 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, bool found=baseClass!=0 && baseClass!=cd; NamespaceDef *nd=cd->getNamespaceDef(); + if (!found && (i=baseClassName.findRev("::"))!=-1) + { + // replace any namespace aliases + replaceNamespaceAliases(baseClassName,i); + baseClass=getResolvedClass(baseClassName); + found=baseClass!=0 && baseClass!=cd; + } + if (!found) { FileDef *fd=cd->getFileDef(); @@ -2148,7 +2173,6 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, } if (!found && nd) // class is inside a namespace { - //printf(" class %s inside namespace %s\n",cd->name().data(),nd->name().data()); NamespaceList *nl = nd->getUsedNamespaces(); QCString fName = nd->name()+"::"+baseClassName; found = (baseClass=getResolvedClass(fName))!=0 && root->name!=fName; @@ -2264,18 +2288,21 @@ static void computeClassRelations(Entry *root) if ( ( ( + // is it a compound (class, struct, union, interface ...) root->section & Entry::COMPOUND_MASK ) || ( + // is it a documentation block with inheritance info. (root->section & Entry::COMPOUNDDOC_MASK) && root->extends->count()>0 ) ) && - !root->name.isEmpty() + !root->name.isEmpty() // sanity check ) { ClassDef *cd; + // strip any annonymous scopes first QCString bName=stripAnnonymousNamespaceScope(root->name); Debug::print(Debug::Classes,0," Class %s : \n",bName.data()); if ((cd=getClass(bName))) diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 9280e22..30312b7 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -27,7 +27,7 @@ HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \ translator_it.h formula.h debug.h membergroup.h htmlhelp.h \ translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \ reflist.h page.h sortdict.h translator_hu.h translator_kr.h \ - translator_ro.h + translator_ro.h translator_si.h SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \ memberdef.cpp membername.cpp index.cpp memberlist.cpp \ entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \ diff --git a/src/entry.cpp b/src/entry.cpp index 3e4bc89..a8dfb9b 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -56,6 +56,7 @@ Entry::Entry(const Entry &e) type = e.type.copy(); name = e.name.copy(); args = e.args.copy(); + bitfields = e.bitfields.copy(); exception = e.exception.copy(); program = e.program.copy(); includeFile = e.includeFile.copy(); @@ -197,6 +198,7 @@ void Entry::reset() name.resize(0); type.resize(0); args.resize(0); + bitfields.resize(0); exception.resize(0); program.resize(0); //body.resize(0); @@ -242,6 +244,7 @@ int Entry::getSize() size+=type.length()+1; size+=name.length()+1; size+=args.length()+1; + size+=bitfields.length()+1; size+=exception.length()+1; size+=program.length()+1; //size+=body.length()+1; diff --git a/src/entry.h b/src/entry.h index 7736be7..27035e2 100644 --- a/src/entry.h +++ b/src/entry.h @@ -162,8 +162,6 @@ class Entry int section; // entry type (see Sections); Protection protection; // class protection - //bool sig; // a Qt signal ? - //bool slot; // a Qt slot ? MethodTypes mtype; // signal, slot or dcop method? bool stat; // static ? bool explicitExternal; // explicitly defined as external? @@ -176,6 +174,7 @@ class Entry QCString type; // member type QCString name; // member name QCString args; // member argument string + QCString bitfields; // member's bit fields ArgumentList *argList; // member arguments as a list ArgumentList *tArgList; // template argument list ArgumentList *mtArgList; // member template argument list @@ -183,8 +182,6 @@ class Entry QCString memberSpec; // template specialization of the member QCString program; // the program text QCString initializer; // initial value (for variables) - int bodyLine; // line number of the definition in the source - int endBodyLine; // line number where the definition ends QCString includeFile; // include file (2 arg of \class, must be unique) QCString includeName; // include name (3 arg of \class) QCString doc; // documentation block (partly parsed) @@ -192,6 +189,8 @@ class Entry QCString brief; // brief description (doc block) QCString inside; // name of the class in which documents are found QCString exception; // throw specification + int bodyLine; // line number of the definition in the source + int endBodyLine; // line number where the definition ends int mGrpId; // member group id QList<Entry> *sublist; // entries that are children of this one QList<BaseInfo> *extends; // list of base classes diff --git a/src/filedef.h b/src/filedef.h index 78eb138..dea9e73 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -66,6 +66,7 @@ class FileDef : public Definition FileDef(const char *p,const char *n,const char *ref=0); ~FileDef(); + DefType definitionType() { return TypeFile; } /*! Returns the unique file name (this may include part of the path). */ QCString name() const diff --git a/src/groupdef.cpp b/src/groupdef.cpp index fb17114..eb0611f 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -366,7 +366,7 @@ void GroupDef::writeDocumentation(OutputList &ol) } } - defineMembers.countDocMembers(); + defineMembers.countDocMembers(TRUE); if (defineMembers.totalCount()>0 ) { ol.writeRuler(); @@ -376,7 +376,7 @@ void GroupDef::writeDocumentation(OutputList &ol) defineMembers.writeDocumentation(ol,name(),this); } - protoMembers.countDocMembers(); + protoMembers.countDocMembers(TRUE); if (protoMembers.totalCount()>0 ) { ol.writeRuler(); @@ -386,7 +386,7 @@ void GroupDef::writeDocumentation(OutputList &ol) protoMembers.writeDocumentation(ol,name(),this); } - typedefMembers.countDocMembers(); + typedefMembers.countDocMembers(TRUE); if (typedefMembers.totalCount()>0 ) { ol.writeRuler(); @@ -396,7 +396,7 @@ void GroupDef::writeDocumentation(OutputList &ol) typedefMembers.writeDocumentation(ol,name(),this); } - enumMembers.countDocMembers(); + enumMembers.countDocMembers(TRUE); if (enumMembers.totalCount()>0 ) { ol.writeRuler(); @@ -406,17 +406,7 @@ void GroupDef::writeDocumentation(OutputList &ol) enumMembers.writeDocumentation(ol,name(),this); } - //enumValMembers.countDocMembers(); - //if (enumValMembers.totalCount()>0 ) - //{ - // ol.writeRuler(); - // ol.startGroupHeader(); - // parseText(ol,theTranslator->trEnumerationValueDocumentation()); - // ol.endGroupHeader(); - // enumValMembers.writeDocumentation(ol,name()); - //} - - funcMembers.countDocMembers(); + funcMembers.countDocMembers(TRUE); if (funcMembers.totalCount()>0 ) { ol.writeRuler(); @@ -426,7 +416,7 @@ void GroupDef::writeDocumentation(OutputList &ol) funcMembers.writeDocumentation(ol,name(),this); } - varMembers.countDocMembers(); + varMembers.countDocMembers(TRUE); if (varMembers.totalCount()>0 ) { ol.writeRuler(); diff --git a/src/groupdef.h b/src/groupdef.h index e673f7b..385c6e5 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -41,6 +41,7 @@ class GroupDef : public Definition public: GroupDef(const char *fileName,int line,const char *name,const char *title); ~GroupDef(); + DefType definitionType() { return TypeGroup; } QCString getOutputFileBase() const { return fileName; } const char *groupTitle() const { return title; } void addFile(const FileDef *def); diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 9703d81..40eed09 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -29,6 +29,7 @@ #include "version.h" #include "dot.h" #include "language.h" +#include "htmlhelp.h" #define GROUP_COLOR "#ff8080" @@ -157,6 +158,11 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external) lastTitle=title; if (fileName.right(5)!=".html") fileName+=".html"; startPlainFile(fileName); + if (Config::htmlHelpFlag) + { + HtmlHelp::getInstance()->addIndexFile(fileName); + } + lastFile = fileName; if (header.isEmpty()) { diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 599e39c..064aec2 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -287,9 +287,12 @@ void HtmlHelp::initialize() "<param name=\"ImageType\" value=\"Folder\">\n" "</OBJECT>\n" "<UL>\n"; +} +void HtmlHelp::createProjectFile() +{ /* Write the project file */ - fName = Config::htmlOutputDir + "/index.hhp"; + QCString fName = Config::htmlOutputDir + "/index.hhp"; QFile f(fName); if (f.open(IO_WriteOnly)) { @@ -298,12 +301,23 @@ void HtmlHelp::initialize() "Compatibility=1.1\n" "Full-text search=Yes\n" "Contents file=index.hhc\n" - "Default Window=indexHelp\n" + "Default Window=main\n" "Default topic=index.html\n" "Index file=index.hhk\n" - "Title=" << Config::projectName << endl << endl - << "[FILES]\n" - "index.html"; + "Title=" << Config::projectName << endl << endl; + + t << "[WINDOWS]" << endl; + t << "main=\"" << Config::projectName << "\",\"index.hhc\"," + "\"index.hhk\",\"index.html\",\"index.html\",,,,,0x23520,," + "0x3006,,,,,,,,0" << endl << endl; + + t << "[FILES]" << endl; + char *s = indexFiles.first(); + while (s) + { + t << s << endl; + s=indexFiles.next(); + } f.close(); } else @@ -312,6 +326,11 @@ void HtmlHelp::initialize() } } +void HtmlHelp::addIndexFile(const char *s) +{ + indexFiles.append(s); +} + /*! Finalizes the HTML help. This will finish and close the * contents file (index.hhc) and the index file (index.hhk). * \sa initialize() @@ -331,6 +350,8 @@ void HtmlHelp::finalize() kts.unsetDevice(); kf->close(); delete kf; + + createProjectFile(); } /*! Increase the level of the contents hierarchy. diff --git a/src/htmlhelp.h b/src/htmlhelp.h index f054735..e6db9c3 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -23,6 +23,7 @@ #include "qtbc.h" #include <qtextstream.h> +#include <qstrlist.h> class QFile; class HtmlHelpIndex; @@ -45,12 +46,17 @@ class HtmlHelp const char *anchor = 0); void addIndexItem(const char *level1, const char *level2, const char *ref, const char *anchor); + void addIndexFile(const char *name); + private: + void createProjectFile(); + HtmlHelp(); QFile *cf,*kf; QTextStream cts,kts; HtmlHelpIndex *index; int dc; + QStrList indexFiles; static HtmlHelp *theInstance; }; diff --git a/src/language.cpp b/src/language.cpp index 1c2f997..4fca8c7 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -34,6 +34,7 @@ #include "translator_hu.h" #include "translator_kr.h" #include "translator_ro.h" +#include "translator_si.h" #endif #define L_EQUAL(a) !stricmp(langName,a) @@ -115,6 +116,10 @@ bool setTranslator(const char *langName) { theTranslator=new TranslatorRomanian; } + else if (L_EQUAL("slovene")) + { + theTranslator=new TranslatorSlovene; + } #endif else // use the default language (i.e. english) { diff --git a/src/memberdef.cpp b/src/memberdef.cpp index c3632ed..f9a8ff9 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -450,8 +450,15 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *cd,NamespaceDef *nd, { Definition *d=0; if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else if (gd) d=gd; - if (d==0) return; - ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),anchor(),name()); + if (d==0) { err("Member %s without group! Please report this bug!\n",name().data()); return; } + if (group!=0 && gd==0) // forward link to the group + { + ol.writeObjectLink(group->getReference(),group->getOutputFileBase(),anchor(),name()); + } + else // local link + { + ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),anchor(),name()); + } } @@ -689,19 +696,6 @@ void MemberDef::writeDeclaration(OutputList &ol, // write name if (!name().isEmpty() && name().at(0)!='@') { - //if (grpId!=-1) - //{ - // if (annMemb) - // { - // //printf("anchor=%s ann_anchor=%s\n",anchor(),annMemb->anchor()); - // annMemb->writeLink(ol,cd,nd,fd,gd,inGroup ? memberGroup : 0); - // annMemb->annUsed=annUsed=TRUE; - // } - // else - // writeLink(ol,0,0,0,0,memberGroup); - // //ol.writeBoldString(name()); - //} - //else if (isLinkable()) { if (annMemb) @@ -748,7 +742,11 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.docify(excpString()); } - if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer + if (!bitfields.isEmpty()) // add bitfields + { + linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace()); + } + else if (!init.isEmpty() && initLines==0 && maxInitLines>0) // add initializer { if (!isDefine()) { @@ -797,9 +795,15 @@ void MemberDef::writeDeclaration(OutputList &ol, * all active output formats. */ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, - const char *scopeName,Definition *container) + const char *scopeName, + Definition *container + ) { + // hide global static functions unless extractStaticFlag is enabled if (getClassDef()==0 && isStatic() && !Config::extractStaticFlag) return; + // hide member that are documented in their own group + if (group!=0 && container->definitionType()!=TypeGroup) return; + bool hasDocs = detailsAreVisible(); //printf("MemberDef::writeDocumentation(): type=`%s' def=`%s'\n",type.data(),definition()); if ( @@ -996,7 +1000,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, if (protection()==Protected) sl.append("protected"); else if (protection()==Private) sl.append("private"); if (lvirt==Virtual) sl.append("virtual"); - else if (lvirt==Pure) sl.append("pure virtual"); + else if (lvirt==Pure) sl.append("pure virtual"); if (isSignal()) sl.append("signal"); if (isSlot()) sl.append("slot"); } diff --git a/src/memberdef.h b/src/memberdef.h index 279d5b3..a0c655e 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -73,6 +73,7 @@ class MemberDef : public Definition bool related,MemberType t,const ArgumentList *tal, const ArgumentList *al); ~MemberDef(); + DefType definitionType() { return TypeMember; } QCString getOutputFileBase() const; const char *declaration() const { return decl; } @@ -80,6 +81,7 @@ class MemberDef : public Definition const char *typeString() const { return type; } const char *argsString() const { return args; } const char *excpString() const { return exception; } + const char *bitfieldString() const { return bitfields; } QCString anchor() const; const QCString &initializer() const { return init; } int initializerLines() const { return initLines; } @@ -133,6 +135,7 @@ class MemberDef : public Definition init=init.stripWhiteSpace(); initLines=init.contains('\n'); } + void setBitfields(const char *s) { bitfields = s; } void setMaxInitLines(int lines) { if (lines!=-1) maxInitLines=lines; } void setMemberClass(ClassDef *cd) { classDef=cd; } void setSectionList(MemberList *sl) { section=sl; } @@ -231,6 +234,7 @@ class MemberDef : public Definition NamespaceDef *nspace; // the namespace this member is in. QCString type; // return type QCString args; // function arguments/variable array specifiers + QCString bitfields; // struct member bitfields QCString exception; // exceptions that can be thrown QCString init; // initializer int initLines; // number of lines in the initializer diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 2ad3061..60a4e90 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -110,7 +110,7 @@ void MemberList::countDecMembers(bool inGroup,bool countSubGroups,bool sectionPe //printf("MemberList::countDecMembers(%d)=%d\n",inGroup,m_count); } -void MemberList::countDocMembers() +void MemberList::countDocMembers(bool listOfGroup) { /*varCnt=funcCnt=enumCnt=enumValCnt=typeCnt=protoCnt=defCnt=friendCnt=0;*/ m_count=0; @@ -122,7 +122,9 @@ void MemberList::countDocMembers() bool visibleIfStatic = !(md->getClassDef()==0 && md->isStatic() && !Config::extractStaticFlag); - if (visibleIfStatic && + bool inOwnGroup = (md->getGroupDef()!=0 && !listOfGroup); + + if (visibleIfStatic && !inOwnGroup && (Config::extractAllFlag || md->detailsAreVisible()) ) { @@ -298,6 +300,9 @@ void MemberList::writePlainDeclarations(OutputList &ol, typeDecl.writeChar(' '); } + const uint MAX_ENUM_VALUES_FOR_ONE_LINE = 4; + int enumMemCount=0; + typeDecl.docify("{ "); QList<MemberDef> *fmdl=md->enumFieldList(); if (fmdl) @@ -305,12 +310,17 @@ void MemberList::writePlainDeclarations(OutputList &ol, MemberDef *fmd=fmdl->first(); while (fmd) { - /* in html we start each enum item on a new line */ - typeDecl.pushGeneratorState(); - typeDecl.disableAllBut(OutputGenerator::Html); - typeDecl.lineBreak(); - typeDecl.writeString(" "); - typeDecl.popGeneratorState(); + /* in html we start a new line after a number of items */ + if (fmdl->count()>MAX_ENUM_VALUES_FOR_ONE_LINE + && (enumMemCount%MAX_ENUM_VALUES_FOR_ONE_LINE)==0 + ) + { + typeDecl.pushGeneratorState(); + typeDecl.disableAllBut(OutputGenerator::Html); + typeDecl.lineBreak(); + typeDecl.writeString(" "); + typeDecl.popGeneratorState(); + } if (fmd->hasDocumentation()) // enum value has docs { @@ -334,12 +344,16 @@ void MemberList::writePlainDeclarations(OutputList &ol, typeDecl.disable(OutputGenerator::Man); typeDecl.writeString("\n"); // to prevent too long lines in LaTeX typeDecl.enable(OutputGenerator::Man); + enumMemCount++; } } - typeDecl.pushGeneratorState(); - typeDecl.disableAllBut(OutputGenerator::Html); - typeDecl.lineBreak(); - typeDecl.popGeneratorState(); + if (fmdl->count()>MAX_ENUM_VALUES_FOR_ONE_LINE) + { + typeDecl.pushGeneratorState(); + typeDecl.disableAllBut(OutputGenerator::Html); + typeDecl.lineBreak(); + typeDecl.popGeneratorState(); + } typeDecl.docify(" }"); md->setEnumDecl(typeDecl); int enumVars=0; diff --git a/src/memberlist.h b/src/memberlist.h index 1967ee3..66efdb3 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -42,7 +42,7 @@ class MemberList : public QList<MemberDef> int defineCount() const { return defCnt; } int friendCount() const { return friendCnt; } void countDecMembers(bool inGroup,bool countSubGroups,bool sectionPerType); - void countDocMembers(); + void countDocMembers(bool listOfGroup=FALSE); int totalCount() const { return //varCnt+funcCnt+enumCnt+enumValCnt+typeCnt+ //protoCnt+defCnt+friendCnt; diff --git a/src/namespacedef.h b/src/namespacedef.h index 1156d89..884107e 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -39,6 +39,7 @@ class NamespaceDef : public Definition NamespaceDef(const char *defFileName,int defLine, const char *name,const char *ref=0); ~NamespaceDef(); + DefType definitionType() { return TypeNamespace; } QCString getOutputFileBase() const { return fileName; } void insertUsedFile(const char *fname); void writeDocumentation(OutputList &ol); @@ -49,10 +49,13 @@ class PageSDict : public SDict<PageInfo> } }; -class PageSDictIterator : public SDict<PageInfo>::Iterator +// typedef is to get around Solaris compile problem +typedef SDict<PageInfo>::Iterator _SDictPageInfoIterator; + +class PageSDictIterator : public _SDictPageInfoIterator { public: - PageSDictIterator(const PageSDict &d) : SDict<PageInfo>::Iterator(d) {} + PageSDictIterator(const PageSDict &d) : _SDictPageInfoIterator(d) {} ~PageSDictIterator() {} }; diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index cff0ce4..1cee062 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -488,14 +488,14 @@ bool StyleData::setStyle(const char* s, const char* styleName) if (start < 0) { err("Style sheet '%s' contains no '\\s' clause.\n{%s}\n", styleName, s); - return false; + return FALSE; } s += start; index = (int)atol(s + 2); ASSERT(index > 0); // search for the end of pure formatting codes const char* end = s + len; - bool haveNewDefinition = true; + bool haveNewDefinition = TRUE; for(;;) { if (*end == '{') @@ -518,7 +518,7 @@ bool StyleData::setStyle(const char* s, const char* styleName) } else if (*end == 0) { // no style-definition part, keep default value - haveNewDefinition = false; + haveNewDefinition = FALSE; break; } else // plain name without leading \\snext @@ -534,7 +534,7 @@ bool StyleData::setStyle(const char* s, const char* styleName) definition = new char[size]; memcpy(definition, end, size); } - return true; + return TRUE; } static void loadStylesheet(const char *name, QDict<StyleData>& dict) @@ -591,7 +591,7 @@ void RTFGenerator::init() err("Could not create output directory %s\n",dir.data()); exit(1); } - Rtf_Style.setAutoDelete(true); + Rtf_Style.setAutoDelete(TRUE); // first duplicate strings of Rtf_Style_Default const struct Rtf_Style_Default* def = Rtf_Style_Default; diff --git a/src/scanner.l b/src/scanner.l index 4a74166..c63de52 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -339,6 +339,7 @@ TITLE [tT][iI][tT][lL][eE] %x Bases %x BasesProt %x NextSemi +%x BitFields %x FindMembers %x FindMemberName %x FindFields @@ -501,7 +502,7 @@ TITLE [tT][iI][tT][lL][eE] --curlyCount ; } else - BEGIN( NextSemi ) ; + BEGIN( NextSemi ); } <NextSemi>"'"\\[0-7]{1,3}"'" <NextSemi>"'"\\."'" @@ -512,8 +513,12 @@ TITLE [tT][iI][tT][lL][eE] } <NextSemi>[;,] { unput(*yytext); - BEGIN( FindMembers ) ; + BEGIN( FindMembers ); } +<BitFields>[;,] { + unput(*yytext); + BEGIN( FindMembers ); + } <FindMembers>{B}*"k_dcop"{BN}*":"{BN}* { current->mtype = mtype = DCOP; current->protection = protection = Public ; current->type.resize(0); @@ -779,7 +784,16 @@ TITLE [tT][iI][tT][lL][eE] BEGIN( NSAliasArg ); } <NSAliasArg>({ID}"::")*{ID} { - namespaceAliasDict.insert(aliasName,new QCString(yytext)); + printf("Inserting namespace alias %s::%s->%s\n",current_root->name.data(),aliasName.data(),yytext); + if (current_root->name.isEmpty()) + { + namespaceAliasDict.insert(aliasName,new QCString(yytext)); + } + else + { + namespaceAliasDict.insert(current_root->name+"::"+aliasName, + new QCString(current_root->name+"::"+yytext)); + } } <NSAliasArg>";" { BEGIN( FindMembers ); @@ -997,7 +1011,7 @@ TITLE [tT][iI][tT][lL][eE] <DefineEnd>. <FindMembers>[*&]+ { current->name += yytext ; } -<FindMembers,MemberSpec,Function,NextSemi,ReadInitializer>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" { +<FindMembers,MemberSpec,Function,NextSemi,BitFields,ReadInitializer>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" { lineCount(); if (current->bodyLine==-1) current->bodyLine=yyLineNr; @@ -1019,7 +1033,7 @@ TITLE [tT][iI][tT][lL][eE] BEGIN(AfterDoc); } } -<MemberSpec,FindFields,FindMembers,NextSemi,ReadInitializer>","{BN}*("/**"|"//!"|"/*!"|"///")"<" { +<MemberSpec,FindFields,FindMembers,NextSemi,BitFields,ReadInitializer>","{BN}*("/**"|"//!"|"/*!"|"///")"<" { lineCount(); lastAfterDocContext = YY_START; afterDocTerminator = ','; @@ -1043,7 +1057,10 @@ TITLE [tT][iI][tT][lL][eE] lineCount(); lastAfterDocContext = YY_START; if (YY_START==DefineEnd) + { afterDocTerminator = '\n'; + yyLineNr--; + } else afterDocTerminator = 0; if (yytext[yyleng-3]=='/') @@ -1241,59 +1258,54 @@ TITLE [tT][iI][tT][lL][eE] yyLineNr++; *pCopyCurlyString+=*yytext; } - -<FindMembers>[:;,] { +<FindMembers>":" { + BEGIN(BitFields); + current->bitfields+=":"; + } +<BitFields>. { + current->bitfields+=*yytext; + } +<FindMembers>[;,] { QCString oldType = current->type.copy(); QCString oldDocs = current->doc.copy(); - if ( *yytext != ':') + if (current->bodyLine==-1) { - if (current->bodyLine==-1) - { - current->bodyLine = yyLineNr; - } - current->type=current->type.simplifyWhiteSpace(); - current->args=current->args.simplifyWhiteSpace(); - current->name=current->name.stripWhiteSpace(); - if (!current->name.isEmpty() && current->type.left(8)=="typedef ") - { - // add typedef to dictionary - QCString dest = extractName(current->type.right(current->type.length()-8)); - if (typedefDict[current->name]==0 && !dest.isEmpty()) - { - //printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data()); - typedefDict.insert(current->name, new QCString(dest)); - } - } - current->section = Entry::VARIABLE_SEC ; - current->fileName = yyFileName; - current->startLine = yyLineNr; - //printf("New variable type=`%s' name=`%s' groupId=%d\n",current->type.data(),current->name.data(),current->mGrpId); - current_root->addSubEntry( current ) ; - current = new Entry ; - // variable found - current->section = Entry::EMPTY_SEC ; - current->protection = protection; - current->mtype = Method; - current->virt = Normal; - current->stat = gstat; - current->mGrpId = memberGroupId; + current->bodyLine = yyLineNr; } - // skip expression or bitfield if needed - if ( *yytext == ':') - { - BEGIN( NextSemi ); + current->type=current->type.simplifyWhiteSpace(); + current->args=current->args.simplifyWhiteSpace(); + current->name=current->name.stripWhiteSpace(); + if (!current->name.isEmpty() && current->type.left(8)=="typedef ") + { + // add typedef to dictionary + QCString dest = extractName(current->type.right(current->type.length()-8)); + if (typedefDict[current->name]==0 && !dest.isEmpty()) + { + //printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data()); + typedefDict.insert(current->name, new QCString(dest)); + } } - else + current->section = Entry::VARIABLE_SEC ; + current->fileName = yyFileName; + current->startLine = yyLineNr; + //printf("New variable type=`%s' name=`%s' groupId=%d\n",current->type.data(),current->name.data(),current->mGrpId); + current_root->addSubEntry( current ) ; + current = new Entry ; + // variable found + current->section = Entry::EMPTY_SEC ; + current->protection = protection; + current->mtype = Method; + current->virt = Normal; + current->stat = gstat; + current->mGrpId = memberGroupId; + if ( *yytext == ',' ) { - if ( *yytext == ',' ) - { - int i=oldType.length(); - while (i>0 && (oldType[i-1]=='*' || oldType[i-1]==' ')) i--; - current->type = oldType.left(i); - current->doc = oldDocs; - } - BEGIN( FindMembers ) ; + int i=oldType.length(); + while (i>0 && (oldType[i-1]=='*' || oldType[i-1]==' ')) i--; + current->type = oldType.left(i); + current->doc = oldDocs; } + BEGIN( FindMembers ) ; } <FindMembers>"[" { @@ -2661,7 +2673,7 @@ TITLE [tT][iI][tT][lL][eE] lastDocRelContext = YY_START; BEGIN( ClassDocRelates ); } -<ClassDocRelates>{ID} { +<ClassDocRelates>({ID}"::")*{ID} { current->relates = yytext; BEGIN( lastDocRelContext ); } diff --git a/src/translator_si.h b/src/translator_si.h new file mode 100644 index 0000000..64ea923 --- /dev/null +++ b/src/translator_si.h @@ -0,0 +1,671 @@ +/****************************************************************************** + * + * + * + * Copyright (C) 1997-2000 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +// translation by Matjaz Ostroversnik <matjaz.ostroversnik@zrs-tk.si> + +#ifndef TRANSLATOR_SI_H +#define TRANSLATOR_SI_H + +#include "translator.h" + +class TranslatorSlovene : public Translator +{ + public: + QCString idLanguage() + { return "slovene"; } + /*! Used to get the command(s) for the language support. This method + * was designed for languages which do not prefer babel package. + * If this methods returns empty string, then the latexBabelPackage() + * method is used to generate the command for using the babel package. + */ + QCString latexLanguageSupportCommand() + { + return "\\usepackage[slovene]{babel} \n\\usepackage[latin2]{inputenc} \n\\usepackage[T1]{fontenc}\n"; + } + QCString latexBabelPackage() + { return "slovene"; } + QCString idLanguageCharset() + { +#ifdef _WIN32 + return "windows-1250"; +#else + return "iso-8859-2"; +#endif + } + QCString trRelatedFunctions() + { return "Povezane funkcije"; } + QCString trRelatedSubscript() + { return "(To niso metode.)"; } + QCString trDetailedDescription() + { return "Podroben opis"; } + QCString trMemberTypedefDocumentation() + { return "Opis <code> uporabniško definiranih tipov (typedef) </code>"; } + QCString trMemberEnumerationDocumentation() + { return "Opis <code> naštevnih tipov </code> članova"; } + QCString trEnumerationValueDocumentation() + { return "Opis <code> naštevnih vednosti (enum) </code> "; } + QCString trMemberFunctionDocumentation() + { return "Opis metod"; } + QCString trMemberDataDocumentation() + { return "Opis atributov"; } + QCString trGeneratedFrom(const char *s,bool single) + { + QCString result=(QCString)"Dokumentacija za "+s+ + "je generirana iz "; + if (single) result+="datoteke :"; else result+="naslednih datotek:"; + return result; + } + QCString trMore() + { return "..."; } + QCString trListOfAllMembers() + { return "Seznam vseh metod / atributov."; } + QCString trMemberList() + { return " - Seznam metod in atributov."; } + QCString trThisIsTheListOfAllMembers() + { return "To je seznam metod razreda "; } + QCString trIncludingInheritedMembers() + { return ", vključujoč dedovane metode in atribute."; } + QCString trGeneratedAutomatically(const char *s) + { QCString result="zgenerirano avtomatično z Doxygen-om"; + if (s) result+=(QCString)" za "+s; + result+=" iz programskog koda."; + return result; + } + QCString trEnumName() + { return "enum ime"; } + QCString trEnumValue() + { return "enum vrednost"; } + QCString trDefinedIn() + { return "definirano v"; } + QCString trVerbatimText(const char *f) + { return (QCString)"Ovo je citirani tekst iz include datoteke "+f+"."; } + QCString trModules() + { return "Moduli"; } + QCString trClassHierarchy() + { return "dedovalna hierarhija"; } + QCString trCompoundList() + { return "kratek opis razredov"; } + QCString trFileList() + { return "seznam datotek"; } + QCString trHeaderFiles() + { return "\"Header\" datoteka"; } + QCString trCompoundMembers() + { return "metode in atributi"; } + QCString trFileMembers() + { return "komponente v datotekah"; } + QCString trRelatedPages() + { return "Povezane strani"; } + QCString trExamples() + { return "Primeri"; } + QCString trSearch() + { return "Išči"; } + QCString trClassHierarchyDescription() + { return "Hierarhično drevo je (okvirno) sortirano po abecedi. "; + } + QCString trFileListDescription(bool extractAll) + { + QCString result="Seznam vseh "; + if (!extractAll) result+="dokumentiranih "; + result+="datotek, s kratkim opisom:"; + return result; + } + QCString trCompoundListDescription() + { return "Seznam razredov, množic in struktur " + "s kratkim opisom :"; + } + QCString trCompoundMembersDescription(bool extractAll) + { + QCString result="Seznam vseh "; + if (!extractAll) result+="dokumentiranih "; + result+="metod in atributov s povezavami na "; + if (extractAll) result+="opis posamezne metode in/ali atributa:"; + else result+="opis razreda :"; + return result; + } + QCString trFileMembersDescription(bool extractAll) + { + QCString result="Seznam "; + if (!extractAll) result+="dokumentiranih "; + result+="entite v datotekah "; + if (extractAll) result+="skupaj z opisom datoteke v kateri se nahajajo:"; + else result+="z linki na datoteke v katerih se nahajajo:"; + return result; + } + QCString trHeaderFilesDescription() + { return "Seznam header datotek, ki tvoriju aplikacijski vmesnik (API) :"; } + QCString trExamplesDescription() + { return "Seznam primerov :"; } + QCString trRelatedPagesDescription() + { return "Seznam povezanih strani:"; } + QCString trModulesDescription() + { return "Seznam modulov:"; } + QCString trNoDescriptionAvailable() + { return "Opis ni dostopen"; } + + QCString trDocumentation() + { return "Dokumentacija"; } + QCString trModuleIndex() + { return "seznam modulov"; } + QCString trHierarchicalIndex() + { return "Hierarhični indeks"; } + QCString trCompoundIndex() + { return "abecedni seznam"; } + QCString trFileIndex() + { return "seznam datotek"; } + QCString trModuleDocumentation() + { return "Dokumentacija modulov"; } + QCString trClassDocumentation() + { return "Opis razreda"; } + QCString trFileDocumentation() + { return "Opis datoteke"; } + QCString trExampleDocumentation() + { return "Opis primera"; } + QCString trPageDocumentation() + { return "Dokumentacija povezanih strani"; } + QCString trReferenceManual() + { return "Priročnik"; } + + QCString trDefines() + { return "Makro deklaracije"; } + QCString trFuncProtos() + { return "Prototipi funkcij"; } + QCString trTypedefs() + { return "Uporabniško definirani tipi"; } + QCString trEnumerations() + { return "Naštevni tipi"; } + QCString trFunctions() + { return "Funkcije"; } + QCString trVariables() + { return "Spremenljivke"; } + QCString trEnumerationValues() + { return "Vrednosti naštevnih tipov"; } + QCString trAuthor() + { return "avtor"; } + QCString trDefineDocumentation() + { return "Opis makro definicije"; } + QCString trFunctionPrototypeDocumentation() + { return "Opis prototipa funkcije"; } + QCString trTypedefDocumentation() + { return "Opis uporabniško definiranega tipa"; } + QCString trEnumerationTypeDocumentation() + { return "Opis naštevnega (enum) tipa"; } + QCString trFunctionDocumentation() + { return "Opis funkcije"; } + QCString trVariableDocumentation() + { return "Opis spremenljivke"; } + QCString trCompounds() + { return "Strukture"; } + QCString trFiles() + { return "Datoteke"; } + QCString trGeneratedAt(const char *date,const char *projName) + { + QCString result=(QCString)"Generirano "+date; + if (projName) result+=(QCString)" projekt: "+projName; + result+=(QCString)" generator: "; + return result; + } + QCString trWrittenBy() + { + return "napisal "; + } + QCString trClassDiagram(const char *clName) + { + return (QCString)"Diagram razredov za "+clName; + } + QCString trForInternalUseOnly() + { return "Samo za interno uporabo."; } + QCString trReimplementedForInternalReasons() + { return "Reimplementirano zbog internih razloga; " + "Nema utjecaja na API."; + } + QCString trWarning() + { return "Opozorilo"; } + QCString trBugsAndLimitations() + { return "Napake in omejtive"; } + QCString trVersion() + { return "Verzija"; } + QCString trDate() + { return "Datum"; } + QCString trAuthors() + { return "Avtor(ji)"; } + QCString trReturns() + { return "Rezultat(i)"; } + QCString trSeeAlso() + { return "Glej"; } + QCString trParameters() + { return "Parametri"; } + QCString trExceptions() + { return "Izjeme (Exceptions)"; } + QCString trGeneratedBy() + { return "Izdelano s pomočjo"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990307 +////////////////////////////////////////////////////////////////////////// + + QCString trNamespaceList() + { return "Seznam imenskih prostorov"; } + QCString trNamespaceListDescription(bool extractAll) + { + QCString result="Seznam "; + if (!extractAll) result+="dokumentiranih "; + result+="imenskih prostorov z opisom:"; + return result; + } + QCString trFriends() + { return "Prijatelji (Friends) "; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990405 +////////////////////////////////////////////////////////////////////////// + + QCString trRelatedFunctionDocumentation() + { return "Podatki o poveznih funkcijah"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990425 +////////////////////////////////////////////////////////////////////////// + + QCString trCompoundReference(const char *clName, + ClassDef::CompoundType compType, + bool /*isTemplate*/) + // used as the title of the HTML page of a class/struct/union + { + QCString result="Opis "; + switch(compType) + { + case ClassDef::Class: result+=" razreda "; break; + case ClassDef::Struct: result+=" strukture "; break; + case ClassDef::Union: result+=" unije "; break; + case ClassDef::Interface: result+=" vmesnika (interface) "; break; + case ClassDef::Exception: result+=" izjeme (exception) "; break; + } + result += (QCString)clName; + + return result; + } + QCString trFileReference(const char *fileName) + // used as the title of the HTML page of a file + { + QCString result="Vsebina datoteke "; + result+=fileName; + return result; + } + QCString trNamespaceReference(const char *namespaceName) + // used as the title of the HTML page of a namespace + { + QCString result ="Opis imenskega prostora "; + result+=namespaceName; + + return result; + } + + // these are for the member sections of a class, struct or union + QCString trPublicMembers() + { return "Javne metode"; } + QCString trPublicSlots() + { return "Public slotovi"; } + QCString trSignals() + { return "Programske prekinitve"; } + QCString trStaticPublicMembers() + { return "Statične javne metode in atributi"; } + QCString trProtectedMembers() + { return "Zaščitene metode in atributi"; } + QCString trProtectedSlots() + { return "Zaščiteni sloti"; } + QCString trStaticProtectedMembers() + { return "Statične zaščitene metode in atributi"; } + QCString trPrivateMembers() + { return "Skrite metode in atributi"; } + QCString trPrivateSlots() + { return "Skriti slotovi"; } + QCString trStaticPrivateMembers() + { return "Statične skrite metode in atributi"; } + // end of member sections + + QCString trWriteList(int numEntries) + { + // this function is used to produce a comma-separated list of items. + // use generateMarker(i) to indicate where item i should be put. + QCString result; + int i; + // the inherits list contain `numEntries' classes + 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 + // (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 + result+=", "; + else // the fore last entry + result+=" in "; + } + } + return result; + } + + QCString trInheritsList(int numEntries) + // used in class documentation to produce a list of base classes, + // if class diagrams are disabled. + { + return "Deduje od "+trWriteList(numEntries)+"."; + } + QCString trInheritedByList(int numEntries) + // used in class documentation to produce a list of super classes, + // if class diagrams are disabled. + { + return "Naslijeđena u "+trWriteList(numEntries)+"."; + } + QCString trReimplementedFromList(int numEntries) + // used in member documentation blocks to produce a list of + // members that are hidden by this one. + { + return "Redefinirano v "+trWriteList(numEntries)+"."; + } + QCString trReimplementedInList(int numEntries) + { + // used in member documentation blocks to produce a list of + // all member that overwrite the implementation of this member. + return "Reimplementacija u "+trWriteList(numEntries)+"."; + } + + QCString trNamespaceMembers() + // This is put above each page as a link to all members of namespaces. + { return "Namespace članovi"; } + QCString trNamespaceMemberDescription(bool extractAll) + // This is an introduction to the page with all namespace members + { + QCString result="Lista svih "; + if (!extractAll) result+="dokumentiranih "; + result+="namespace članova s linkovima na "; + if (extractAll) + result+="namespace dokumentaciju svakog člana:"; + else + result+="namespace kojima pripadaju:"; + return result; + } + QCString trNamespaceIndex() + // This is used in LaTeX as the title of the chapter with the + // index of all namespaces. + { return "Indeks namespace-a"; } + QCString trNamespaceDocumentation() + // This is used in LaTeX as the title of the chapter containing + // the documentation of all namespaces. + { return "Podati o imenskih prostorih"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990728 +////////////////////////////////////////////////////////////////////////// + + /*! This is put at the bottom of a class documentation page and is + * followed by a list of files that were used to generate the page. + */ + QCString trGeneratedFromFiles(ClassDef::CompoundType compType, + bool single) + { // here s is one of " Class", " Struct" or " Union" + // single is true implies a single file + QCString result=(QCString)"Opis "; + switch(compType) + { + case ClassDef::Class: result+="razreda"; break; + case ClassDef::Struct: result+="strukture"; break; + case ClassDef::Union: result+="unije"; break; + case ClassDef::Interface: result+="vmesnika (interface)"; break; + case ClassDef::Exception: result+="izjeme (exception)"; break; + } + result+=" je zgrajen na podlagi naslednj"; + if (single) result+="e "; else result+="ih"; + result+=" datotek"; + if (single) result+="e :"; else result+=" :"; + return result; + } + + /*! This is in the (quick) index as a link to the alphabetical compound + * list. + */ + QCString trAlphabeticalList() + { return "abecedni seznam"; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-990901 +////////////////////////////////////////////////////////////////////////// + + /*! This is used as the heading text for the retval command. */ + QCString trReturnValues() + { return "Povratna vrednost"; } + + /*! This is in the (quick) index as a link to the main page (index.html) + */ + QCString trMainPage() + { return "prva stran"; } + + /*! This is used in references to page that are put in the LaTeX + * documentation. It should be an abbreviation of the word page. + */ + QCString trPageAbbreviation() + { return "str."; } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991106 +////////////////////////////////////////////////////////////////////////// + + QCString trSources() + { + return "Izvorne datoteke"; + } + QCString trDefinedAtLineInSourceFile() + { + return "Definirano v @0 vrstici datoteke @1."; + } + QCString trDefinedInSourceFile() + { + return "Definirano v datoteki @0."; + } + +////////////////////////////////////////////////////////////////////////// +// new since 0.49-991205 +////////////////////////////////////////////////////////////////////////// + + QCString trDeprecated() + { + return "Zastarelo"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.0.0 +////////////////////////////////////////////////////////////////////////// + + /*! this text is put before a collaboration diagram */ + QCString trCollaborationDiagram(const char *clName) + { + return (QCString)"Kolaboracijski diagram razreda "+clName+":"; + } + /*! this text is put before an include dependency graph */ + QCString trInclDepGraph(const char *fName) + { + return (QCString)"Graf prikazuje seznam datotek, " + "ki jih datoteka \""+fName+"\" " + "direktno ali indirektno vključuje. Pravokotniki ponazarjajo datoteke, puščice " + "predstavljajo relacije med njimi. " + "Črn pravokotnik ponazarja datoteko "+fName+". Puščice A->B ponazarjajo " + "usmerjeno relacijo \"A vključuje B\"." +; + } + /*! header that is put before the list of constructor/destructors. */ + QCString trConstructorDocumentation() + { + return "Opis konstruktorjev in destruktorjev "; + } + /*! Used in the file documentation to point to the corresponding sources. */ + QCString trGotoSourceCode() + { + return "izvorna koda"; + } + /*! Used in the file sources to point to the corresponding documentation. */ + QCString trGotoDocumentation() + { + return "dokumenacija tekoče datoteke."; + } + /*! Text for the \pre command */ + QCString trPrecondition() + { + return "Predpogoji (preconditions)"; + } + /*! Text for the \post command */ + QCString trPostcondition() + { + return "Naknadni pogoji (posconditions)"; + } + /*! Text for the \invariant command */ + QCString trInvariant() + { + return "Invarianta"; + } + /*! Text shown before a multi-line variable/enum initialization */ + QCString trInitialValue() + { + return "Začetna vrednost / definicija :"; + } + /*! Text used the source code in the file index */ + QCString trCode() + { + return "koda"; + } + QCString trGraphicalHierarchy() + { + return "Hierarhija razredov v grafični obliki"; + } + QCString trGotoGraphicalHierarchy() + { + return "Dedovalna hierarhija v grafični obliki"; + } + QCString trGotoTextualHierarchy() + { + return "Dedovalna hierarhija v tekstovni obliki"; + } + QCString trPageIndex() + { + return "Indeks strani"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.0 +////////////////////////////////////////////////////////////////////////// + + QCString trNote() + { + return "Opomba"; + } + QCString trPublicTypes() + { + return "Javni tipi"; + } + QCString trPublicAttribs() + { + return "Javni atributi"; + } + QCString trStaticPublicAttribs() + { + return "Statični javni atributi"; + } + QCString trProtectedTypes() + { + return "Zaščiteni tipi"; + } + QCString trProtectedAttribs() + { + return "Zaščiteni atributi"; + } + QCString trStaticProtectedAttribs() + { + return "Statični zaščiteni tipi"; + } + QCString trPrivateTypes() + { + return "Skriti tipi"; + } + QCString trPrivateAttribs() + { + return "Skriti atributi"; + } + QCString trStaticPrivateAttribs() + { + return "Statični skriti atributi"; + } +////////////////////////////////////////////////////////////////////////// +// new since 1.1.3 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a marker that is put before a todo item */ + QCString trTodo() + { + return "TODO"; + } + /*! Used as the header of the todo list */ + QCString trTodoList() + { + return "Seznam nedokončanih opravil"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.1.4 +////////////////////////////////////////////////////////////////////////// + + QCString trReferencedBy() + { + return "Uporabniki entitete: "; + } + QCString trRemarks() + { + return "Opomba"; + } + QCString trAttention() + { + return "Pozor"; + } + QCString trInclByDepGraph() + { + return "Graf prikazuje datoteke, ki posredno ali neposredno " + "vključujejo tekočo datoteko. Pravokotniki simbolizirajo datoteke, " + "puščice pa relacije med datotekami. Tekoča datoteka je prikazana " + "kot pravokotnik s črno podlago, ostale pa kot pravokotnik brez podlage. " + "Smer puščice A->B definira relacijo \"A vključuje B\". " + "Vse datoteke, ki torej mejijo na tekočo (t.j. obstaja povezava med črnim in " + "praznim pravokotnikom), jo direktno vključujejo, medtem, ko jo ostale vključujejo " + "le posredno. " + ; + } + QCString trSince() + { + return "Od"; + } + + +}; + +#endif + + + + + + + + diff --git a/src/util.cpp b/src/util.cpp index 36c9e77..e5c484e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1922,7 +1922,8 @@ bool getScopeDefs(const char *docScope,const char *scope, * with name memberName. * 3) "memberName(...)" a specific (overloaded) function or define * with name memberName - * 4) "::memberName a non-function member or define + * 4) "::name a global variable or define + * 4) "#memberName member variable, global variable or define * 5) ("ScopeName::")+"memberName()" * 6) ("ScopeName::")+"memberName(...)" * 7) ("ScopeName::")+"memberName" @@ -1934,7 +1935,9 @@ bool generateRef(OutputList &ol,const char *scName, { //printf("generateRef(scName=%s,name=%s,rt=%s)\n",scName,name,rt); - QCString tmpName = substitute(name,"#","::"); + QCString tsName = name; + bool memberScopeFirst = tsName.find('#')!=-1; + QCString tmpName = substitute(tsName,"#","::"); QCString linkText = rt; int scopePos=tmpName.findRev("::"); int bracePos=tmpName.findRev('('); // reverse is needed for operator()(...) @@ -2021,7 +2024,8 @@ bool generateRef(OutputList &ol,const char *scName, // scopeStr.data(),nameStr.data(),argsStr.data()); // check if nameStr is a member or global. - if (getDefs(scopeStr,nameStr,argsStr,md,cd,fd,nd,gd,scopePos==0)) + if (getDefs(scopeStr,nameStr,argsStr,md,cd,fd,nd,gd, + scopePos==0 && !memberScopeFirst)) { //printf("after getDefs nd=%p\n",nd); QCString anchor; @@ -2118,6 +2122,7 @@ bool generateRef(OutputList &ol,const char *scName, bool generateLink(OutputList &ol,const char *clName, const char *lr,bool inSeeBlock,const char *lt) { + //printf("generateLink clName=`%s' lr=`%s' lt=`%s'\n",clName,lr,lt); QCString linkRef=lr; FileDef *fd; GroupDef *gd; |