diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-11-18 14:52:40 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-11-18 14:52:40 (GMT) |
commit | c736b03f16a88b6654ff9c1ae680e46b86e50218 (patch) | |
tree | 066b0bffed86445dbe3d494eaf31515f5b743e8c /src | |
parent | fba77445463c412e6b514174df590fdce58838cf (diff) | |
download | Doxygen-c736b03f16a88b6654ff9c1ae680e46b86e50218.zip Doxygen-c736b03f16a88b6654ff9c1ae680e46b86e50218.tar.gz Doxygen-c736b03f16a88b6654ff9c1ae680e46b86e50218.tar.bz2 |
Release-1.2.12
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 1 | ||||
-rw-r--r-- | src/code.l | 51 | ||||
-rw-r--r-- | src/config.l | 28 | ||||
-rw-r--r-- | src/definition.cpp | 2 | ||||
-rw-r--r-- | src/definition.h | 6 | ||||
-rw-r--r-- | src/doc.l | 6 | ||||
-rw-r--r-- | src/dot.cpp | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 5 | ||||
-rw-r--r-- | src/htmlgen.cpp | 20 | ||||
-rw-r--r-- | src/htmlgen.h | 3 | ||||
-rw-r--r-- | src/latexgen.h | 3 | ||||
-rw-r--r-- | src/mangen.h | 3 | ||||
-rw-r--r-- | src/outputgen.h | 4 | ||||
-rw-r--r-- | src/outputlist.cpp | 1 | ||||
-rw-r--r-- | src/outputlist.h | 12 | ||||
-rw-r--r-- | src/rtfgen.h | 3 | ||||
-rw-r--r-- | src/scanner.l | 20 | ||||
-rw-r--r-- | src/translator_hr.h | 72 | ||||
-rw-r--r-- | src/xmlgen.cpp | 144 |
19 files changed, 313 insertions, 73 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index a9cf53b..4b1b949 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1591,6 +1591,7 @@ bool ClassDef::isVisibleInHierarchy() // documented or shown anyway or documentation is external (hasDocumentation() || !Config_getBool("HIDE_UNDOC_CLASSES") || + (m_templateMaster && m_templateMaster->hasDocumentation()) || isReference() ) && // is not part of an unnamed namespace or shown anyway @@ -330,12 +330,12 @@ static void startCodeLine() //if (g_currentFontClass) { g_code->endFontClass(); } if (g_sourceFileDef) { - QCString lineNumber,lineAnchor; - lineNumber.sprintf("%05d",g_yyLineNr); - lineAnchor.sprintf("l%05d",g_yyLineNr); + //QCString lineNumber,lineAnchor; + //lineNumber.sprintf("%05d",g_yyLineNr); + //lineAnchor.sprintf("l%05d",g_yyLineNr); Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr); - g_code->startLineNumber(); + //g_code->startLineNumber(); if (!g_includeCodeFragment && d && d->isLinkableInProject()) { g_currentDefinition = d; @@ -347,16 +347,19 @@ static void startCodeLine() //printf("Real scope: `%s'\n",g_realScope.data()); g_bodyCurlyCount = 0; if (g_currentMemberDef) anchor=g_currentMemberDef->getBodyAnchor(); - g_code->startCodeAnchor(lineAnchor); - g_code->writeCodeLink(d->getReference(),d->getOutputFileBase(), - anchor,lineNumber); - g_code->endCodeAnchor(); + //g_code->startCodeAnchor(lineAnchor); + //g_code->writeCodeLink(d->getReference(),d->getOutputFileBase(), + // anchor,lineNumber); + //g_code->endCodeAnchor(); + g_code->writeLineNumber(d->getReference(),d->getOutputFileBase(), + anchor,g_yyLineNr); } else { - g_code->codify(lineNumber); + //g_code->codify(lineNumber); + g_code->writeLineNumber(0,0,0,g_yyLineNr); } - g_code->endLineNumber(); + //g_code->endLineNumber(); } g_code->startCodeLine(); if (g_currentFontClass) @@ -556,12 +559,32 @@ static MemberDef *setCallContextForVar(const QCString &name) if ((mn=Doxygen::functionNameSDict[name])) { //printf("global var `%s'\n",name.data()); - if (mn->count()>=1) - // TODO: if count>1 link to static members in the same file only + if (mn->count()==1) // global defined only once { MemberDef *md=mn->getFirst(); - g_theCallContext.setClass(stripClassName(md->typeString())); - return md; + if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef) + { + g_theCallContext.setClass(stripClassName(md->typeString())); + return md; + } + return 0; + } + else if (mn->count()>1) // global defined more than once + { + MemberDef *md=mn->first(); + while (md) + { + //printf("mn=%p md=%p md->getBodyDef()=%p g_sourceFileDef=%p\n", + // mn,md, + // md->getBodyDef(),g_sourceFileDef); + if (md->getBodyDef()==g_sourceFileDef) + { + g_theCallContext.setClass(stripClassName(md->typeString())); + return md; + } + md=mn->next(); + } + return 0; } } return 0; diff --git a/src/config.l b/src/config.l index 5094011..670be6a 100644 --- a/src/config.l +++ b/src/config.l @@ -994,8 +994,10 @@ void Config::check() QStrList &inputSources=Config_getList("INPUT"); if (inputSources.count()==0) { - config_err("Error: tag INPUT: no input files specified after the INPUT tag.\n"); - exit(1); + //config_err("Error: tag INPUT: no input files specified after the INPUT tag.\n"); + //exit(1); + inputSources.append(QDir::currentDirPath()); + //config_warn("Warning: no files after the INPUT tag, defaulting to the current dir\n"); } else { @@ -1016,7 +1018,23 @@ void Config::check() QStrList &filePatternList = Config_getList("FILE_PATTERNS"); if (filePatternList.isEmpty()) { - filePatternList.append("*"); + filePatternList.append("*.c"); + filePatternList.append("*.cc"); + filePatternList.append("*.cxx"); + filePatternList.append("*.cpp"); + filePatternList.append("*.c++"); + filePatternList.append("*.java"); + filePatternList.append("*.ii"); + filePatternList.append("*.ixx"); + filePatternList.append("*.ipp"); + filePatternList.append("*.i++"); + filePatternList.append("*.inl"); + filePatternList.append("*.h"); + filePatternList.append("*.hh"); + filePatternList.append("*.hxx"); + filePatternList.append("*.hpp"); + filePatternList.append("*.h++"); + filePatternList.append("*.idl"); } // add default pattern if needed @@ -1509,7 +1527,9 @@ void Config::create() "If the value of the INPUT tag contains directories, you can use the \n" "FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n" "and *.h) to filter out the source-files in the directories. If left \n" - "blank all files are included. \n" + "blank file matching one of the following patterns are included: \n" + "*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n" + "*.h++ *.idl \n" ); cb = addBool( "RECURSIVE", diff --git a/src/definition.cpp b/src/definition.cpp index dcd1517..56b3edf 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -334,6 +334,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName) initParseCodeContext(); //printf("Read:\n`%s'\n\n",codeFragment.data()); if (definitionType()==TypeMember) setParameterList((MemberDef *)this); + ol.newParagraph(); ol.startCodeFragment(); parseCode(ol,scopeName,codeFragment,FALSE,0, m_bodyDef,actualStart,actualEnd,TRUE); @@ -418,7 +419,6 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, } parseText(ol,ldefLine.right(ldefLine.length()-index)); ol.writeString("."); - ol.newParagraph(); } ol.popGeneratorState(); } diff --git a/src/definition.h b/src/definition.h index 0b9d4ff..fed4c52 100644 --- a/src/definition.h +++ b/src/definition.h @@ -123,6 +123,9 @@ class Definition virtual void addInnerCompound(Definition *d); virtual void setOuterScope(Definition *d) { m_outerScope = d; } + MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; } + MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; } + protected: int m_startBodyLine; // line number of the start of the definition int m_endBodyLine; // line number of the end of the definition @@ -147,9 +150,6 @@ class Definition QCString m_doc; // detailed description QCString m_ref; // reference to external documentation SectionDict *m_sectionDict; // dictionary of all sections - //MemberList *m_sourceRefList; // list of entities that refer to this - // // entity in their definition - //MemberDict *m_sourceRefDict; MemberSDict *m_sourceRefByDict; MemberSDict *m_sourceRefsDict; int m_testId; // id for test list item @@ -406,7 +406,7 @@ static void skipLine(OutputDocInterface &od,const char *key) found=TRUE; od.writeString(" "); parseCode(od,className,s,exampleDoc,exampleName); - od.writeString("\n"); + //od.writeString("\n"); } else if (includeFileOffset==includeFileLength) found=TRUE; } @@ -451,7 +451,7 @@ static void showLine(OutputDocInterface &od,const char *key) { od.writeString(" "); parseCode(od,className,s,exampleDoc,exampleName); - od.writeString("\n"); + //od.writeString("\n"); } } @@ -469,7 +469,7 @@ static void showUntil(OutputDocInterface &od,const char *key) { od.writeString(" "); parseCode(od,className,s,exampleDoc,exampleName); - od.writeString("\n"); + //od.writeString("\n"); if (s.find(key)!=-1) found=TRUE; } if (includeFileOffset==includeFileLength) found=TRUE; diff --git a/src/dot.cpp b/src/dot.cpp index 48bf311..fae5b93 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -837,6 +837,8 @@ int DotClassGraph::m_curNodeNumber; void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, const char *label,int distance,const char *usedName,const char *templSpec,bool base) { + if (Config_getBool("HIDE_UNDOC_CLASSES") && !cd->isLinkable()) return; + int edgeStyle = (label || prot==EdgeInfo::Orange) ? EdgeInfo::Dashed : EdgeInfo::Solid; QCString className; if (usedName) // name is a typedef diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 6db5d5d..571cc41 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1385,7 +1385,6 @@ static MemberDef *addVariableToFile( } } - //printf("Adding member=%s\n",md->name().data()); // add member definition to the list of globals if (mn) { @@ -1395,8 +1394,6 @@ static MemberDef *addVariableToFile( { mn = new MemberName(name); mn->append(md); - //Doxygen::functionNameDict.insert(name,mn); - //Doxygen::functionNameList.append(mn); Doxygen::functionNameSDict.append(name,mn); } root->section = Entry::EMPTY_SEC; @@ -5805,7 +5802,7 @@ static bool openOutputFile(const char *outFile,QFile &f) dir.rename(fi.fileName(),fi.fileName()+".bak"); } f.setName(outFile); - fileOpened = f.open(IO_WriteOnly); + fileOpened = f.open(IO_WriteOnly|IO_Translate); } return fileOpened; } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 6193223..54b815c 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1113,3 +1113,23 @@ void HtmlGenerator::writeNonBreakableSpace(int n) t << " "; } } + +void HtmlGenerator::writeLineNumber(const char *ref,const char *file, + const char *anchor,int l) +{ + QCString lineNumber,lineAnchor; + lineNumber.sprintf("%05d",l); + lineAnchor.sprintf("l%05d",l); + + if (file) + { + startCodeAnchor(lineAnchor); + writeCodeLink(ref,file,anchor,lineNumber); + endCodeAnchor(); + } + else + { + codify(lineNumber); + } + codify(" "); +} diff --git a/src/htmlgen.h b/src/htmlgen.h index 40a37bc..75c2a00 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -124,8 +124,7 @@ class HtmlGenerator : public OutputGenerator void endCodeFragment() { t << "</pre></div>"; } void startPreFragment() { t << "<pre>"; } void endPreFragment() { t << "</pre>"; } - void startLineNumber() {} - void endLineNumber() { t << " "; } + void writeLineNumber(const char *,const char *,const char *,int); void startCodeLine() { col=0; } void endCodeLine() { codify("\n"); } //void writeBoldString(const char *text) diff --git a/src/latexgen.h b/src/latexgen.h index fd37132..51947c2 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -122,8 +122,7 @@ class LatexGenerator : public OutputGenerator void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl; insidePre=FALSE; } - void startLineNumber() {} - void endLineNumber() { t << " "; } + void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void startCodeLine() { col=0; } void endCodeLine() { codify("\n"); } //void writeBoldString(const char *text) diff --git a/src/mangen.h b/src/mangen.h index a5f15fe..ea944be 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -114,8 +114,7 @@ class ManGenerator : public OutputGenerator void endCodeFragment(); void startPreFragment() { startCodeFragment(); } void endPreFragment() { endCodeFragment(); } - void startLineNumber() {} - void endLineNumber() { t << " "; } + void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void startCodeLine() {} void endCodeLine() { codify("\n"); col=0; } //void writeBoldString(const char *text) diff --git a/src/outputgen.h b/src/outputgen.h index ed73543..1e8e509 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -248,8 +248,8 @@ class BaseOutputDocInterface virtual void endPageRef(const char *,const char *) = 0; - virtual void startLineNumber() = 0; - virtual void endLineNumber() = 0; + virtual void writeLineNumber(const char *ref,const char *file, + const char *anchor,int lineNumber) = 0; virtual void startCodeLine() = 0; virtual void endCodeLine() = 0; virtual void startCodeAnchor(const char *label) = 0; diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 9688dde..34c67c7 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -278,6 +278,7 @@ FORALL3(const char *a1,const char *a2,bool a3,a1,a2,a3) FORALL3(uchar a1,uchar a2,uchar a3,a1,a2,a3) FORALL4(const char *a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4) FORALL4(const char *a1,const char *a2,const char *a3,bool a4,a1,a2,a3,a4) +FORALL4(const char *a1,const char *a2,const char *a3,int a4,a1,a2,a3,a4) //-------------------------------------------------------------------------- diff --git a/src/outputlist.h b/src/outputlist.h index 619792c..8a49235 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -214,10 +214,13 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startCodeLine); } void endCodeLine() { forall(&OutputGenerator::endCodeLine); } - void startLineNumber() - { forall(&OutputGenerator::startLineNumber); } - void endLineNumber() - { forall(&OutputGenerator::endLineNumber); } + //void startLineNumber() + //{ forall(&OutputGenerator::startLineNumber); } + //void endLineNumber() + //{ forall(&OutputGenerator::endLineNumber); } + void writeLineNumber(const char *ref,const char *file,const char *anchor, + int lineNumber) + { forall(&OutputGenerator::writeLineNumber,ref,file,anchor,lineNumber); } void startEmphasis() { forall(&OutputGenerator::startEmphasis); } void endEmphasis() @@ -485,6 +488,7 @@ class OutputList : public OutputDocInterface FORALLPROTO3(ClassDiagram &,const char *,const char *); FORALLPROTO4(const char *,const char *,const char *,const char *); FORALLPROTO4(const char *,const char *,const char *,bool); + FORALLPROTO4(const char *,const char *,const char *,int); OutputList(const OutputList &ol); QList<OutputGenerator> *outputs; diff --git a/src/rtfgen.h b/src/rtfgen.h index a1a9f56..980aea6 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -114,8 +114,7 @@ class RTFGenerator : public OutputGenerator void endCodeFragment(); void startPreFragment() { startCodeFragment(); } void endPreFragment() { endCodeFragment(); } - void startLineNumber() {} - void endLineNumber() { t << " "; } + void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void startCodeLine() { col=0; } void endCodeLine() { lineBreak(); } //void writeBoldString(const char *text) diff --git a/src/scanner.l b/src/scanner.l index fc6a7eb..93cac98 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1699,6 +1699,26 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } } } +<ReadBody>"}"{BN}+"typedef"{BN}+ { //err("ReadBody count=%d\n",curlyCount); + if ( curlyCount>0 ) + { + current->program += yytext ; + --curlyCount ; + } + else + { + lineCount(); + isTypedef = TRUE; + current->endBodyLine = yyLineNr; + QCString &cn = current->name; + QCString rn = current_root->name.copy(); + if (!cn.isEmpty() && !rn.isEmpty()) + { + prependScope(); + } + BEGIN( TypedefName ); + } + } <TypedefName>{ID} { if (current->section == Entry::ENUM_SEC) { diff --git a/src/translator_hr.h b/src/translator_hr.h index 54cfaaa..e985734 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -39,10 +39,16 @@ // - Removed obsolete method trVerbatimHeadert() // - Method latexBabelPackage() removed, ude latexLanguageSupportCommand // +// 2001/11/13 +// - inherits from Translator +// - Added strings for 1.2.11 +// - better output for C documentation (trCompoundMembersDescription(), trClassDocumentation()) +// + #ifndef TRANSLATOR_HR_H #define TRANSLATOR_HR_H -class TranslatorCroatian : public TranslatorAdapter_1_2_11 +class TranslatorCroatian : public Translator { private: /*! to avoid macro redefinition from translator_cz.h */ @@ -156,19 +162,37 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_11 QCString trCompoundMembersDescription(bool extractAll) { QCString result="Popis svih "; - if (!extractAll) result+="dokumentiranih "; - result+="članova klasa s linkovima na "; - if (extractAll) result+="dokumentaciju svakog člana:"; - else result+="dokumentaciju klase :"; + if (!extractAll) + result+="dokumentiranih "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + result+="članova klasa s linkovima na "; + else + result+="članova struktura s linkovima na "; + + if (extractAll) + { + result+="dokumentaciju svakog člana:"; + } + else + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + result+="dokumentaciju klase :"; + else + result +="dokumentaciju strukture"; + } return decode(result); } QCString trFileMembersDescription(bool extractAll) { QCString result="Popis svih "; - if (!extractAll) result+="dokumentiranih "; + if (!extractAll) + result+="dokumentiranih "; result+="članova s linkovima na "; - if (extractAll) result+="dokumentaciju datoteke u kojima se nalaze:"; - else result+="datoteke u kojima se nalaze:"; + if (extractAll) + result+="dokumentaciju datoteke u kojima se nalaze:"; + else + result+="datoteke u kojima se nalaze:"; return decode(result); } QCString trHeaderFilesDescription() @@ -189,13 +213,31 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_11 QCString trHierarchicalIndex() { return "Hijerarhijsko kazalo"; } QCString trCompoundIndex() - { return "Skupno kazalo "; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Kazalo struktura podataka"; + } + else + { + return "Skupno kazalo "; + } + } QCString trFileIndex() { return "Kazalo datoteka"; } QCString trModuleDocumentation() { return "Dokumentacija modula"; } QCString trClassDocumentation() - { return "Dokumentacija klasa"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Dokumentacija struktura podataka"; + } + else + { + return "Dokumentacija klasa"; + } + } QCString trFileDocumentation() { return "Dokumentacija datoteka"; } QCString trExampleDocumentation() @@ -967,6 +1009,16 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_11 return result; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "Reference"; + } }; #endif diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 463d16a..361b68c 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -35,6 +35,8 @@ #include <qfile.h> #include <qtextstream.h> +#define XML_DB(x) + QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t) { switch (t) @@ -147,6 +149,10 @@ template<class T> class ValStack { return m_sp==0; } + uint count() const + { + return m_sp; + } private: QArray<T> m_values; @@ -170,11 +176,13 @@ class XMLGenerator : public OutputDocInterface { m_inParStack.top() = TRUE; m_t << "<para>" << endl; + XML_DB(("start par at level=%d\n",m_inParStack.count());) } else if (m_inParStack.isEmpty()) { m_inParStack.push(TRUE); m_t << "<para>" << endl; + XML_DB(("start par at level=%d\n",m_inParStack.count());) } } void endParMode() @@ -183,18 +191,25 @@ class XMLGenerator : public OutputDocInterface { m_inParStack.top() = FALSE; m_t << "</para>" << endl; + XML_DB(("end par at level=%d\n",m_inParStack.count());) } } void startNestedPar() { m_inParStack.push(FALSE); + XML_DB(("enter par level=%d\n",m_inParStack.count());) } void endNestedPar() { + XML_DB(("leave par level=%d\n",m_inParStack.count());) if (m_inParStack.pop()) { m_t << "</para>" << endl; } + else + { + XML_DB(("ILLEGAL par level!\n");) + } } // Standard generator functions to be implemented by all generators @@ -503,27 +518,47 @@ class XMLGenerator : public OutputDocInterface } void startTable(int cols) { + XML_DB(("startTable\n");) startParMode(); - m_t << "<table><tgroup cols=\"" << cols << "\"><tbody>\n"; + m_t << "<table cols=\"" << cols << "\">\n"; } void endTable() { - m_t << "</row>\n</tbody></tgroup></table>"; + XML_DB(("endTable\n");) + m_t << "</row>\n</table>"; } void nextTableRow() { + XML_DB(("nextTableRow\n");) m_t << "<row><entry>"; + + // we need manually add a para here because cells are + // parsed before the table is generated, and thus + // are already parsed as if they are inside a paragraph. + m_t << "<para>"; } void endTableRow() { + XML_DB(("endTableRow\n");) m_t << "</row>" << endl; } void nextTableColumn() { + XML_DB(("nextTableColumn\n");) m_t << "<entry>"; + + // we need manually add a para here because cells are + // parsed before the table is generated, and thus + // are already parsed as if they are inside a paragraph. + m_t << "<para>"; } void endTableColumn() { + XML_DB(("endTableColumn\n");) + // we need manually add a para here because cells are + // parsed before the table is generated, and thus + // are already parsed as if they are inside a paragraph. + m_t << "</para>"; m_t << "</entry>"; } @@ -614,13 +649,16 @@ class XMLGenerator : public OutputDocInterface void endPageRef(const char *,const char *) { } - void startLineNumber() - { - m_t << "<linenumber>"; - } - void endLineNumber() + void writeLineNumber(const char *,const char *file, // TODO: support external references + const char *anchor,int l) { - m_t << "</linenumber>"; + m_t << "<linenumber"; + m_t << " line=\"" << l << "\""; + if (file) + { + m_t << " refid=\"" << file << "_1" << anchor << "\""; + } + m_t << "/>"; } void startCodeLine() { @@ -665,15 +703,7 @@ class XMLGenerator : public OutputDocInterface { const XMLGenerator *xg = (const XMLGenerator *)g; - //if (m_inPar && !mifgen->m_inParStart) - //{ - // endParMode(); - //} - //else if (!m_inPar && mifgen->m_inParStart) - //{ - // startParMode(); - //} - //printf("Appending \n>>>>\n`%s'\n<<<<\n and \n>>>>\n`%s'\n<<<<\n",getContents().data(),mifgen->getContents().data()); + //printf("Appending \n>>>>\n`%s'\n<<<<\n and \n>>>>\n`%s'\n<<<<\n",getContents().data(),xg->getContents().data()); m_t << xg->getContents(); m_inParStack = xg->m_inParStack; m_inListStack = xg->m_inListStack; @@ -697,6 +727,9 @@ class XMLGenerator : public OutputDocInterface m_t.setDevice(&m_b); m_t.setEncoding(QTextStream::Latin1); + //printf("Cloning >>%s<< m_parStack.count()=%d\n", + // xg->getContents().data(),xg->m_inParStack.count()); + // copy state variables m_inParStack = xg->m_inParStack; m_inListStack = xg->m_inListStack; @@ -779,6 +812,18 @@ void writeXMLCodeBlock(QTextStream &t,FileDef *fd) void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def) { + + // + declaration + // - reimplements + // - reimplementedBy + // - exceptions + // - const/volatile specifiers + // - examples + // + source definition + // - source references + // - source referenced by + // - include code + if (md->memberType()==MemberDef::EnumValue) return; QCString scopeName; @@ -942,9 +987,67 @@ void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def) t << " <detaileddescription>" << endl; writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md->name(),md->documentation()); t << " </detaileddescription>" << endl; - t << " <location file=\"" - << md->getDefFileName() << "\" line=\"" - << md->getDefLine() << "\"/>" << endl; + if (md->getDefLine()!=-1) + { + t << " <location file=\"" + << md->getDefFileName() << "\" line=\"" + << md->getDefLine() << "\"/>" << endl; + } + + printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers()); + if (md->getReferencesMembers()) + { + MemberSDict::Iterator mdi(*md->getReferencesMembers()); + MemberDef *rmd; + for (mdi.toFirst();(rmd=mdi.current());++mdi) + { + if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef()) + { + t << " <references id=\""; + t << rmd->getBodyDef()->getOutputFileBase() + << "_1" // encoded `:' character (see util.cpp:convertNameToFile) + << rmd->anchor() + << "\" line=\"" + << rmd->getStartBodyLine() + << "\">"; + QCString scope = rmd->getScopeString(); + QCString name = rmd->name(); + if (!scope.isEmpty() && scope!=def->name()) + { + name.prepend(scope+"::"); + } + writeXMLString(t,name); + t << "</references>" << endl; + } + } + } + if (md->getReferencedByMembers()) + { + MemberSDict::Iterator mdi(*md->getReferencedByMembers()); + MemberDef *rmd; + for (mdi.toFirst();(rmd=mdi.current());++mdi) + { + if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef()) + { + t << " <referencedby id=\""; + t << rmd->getBodyDef()->getOutputFileBase() + << "_1" // encoded `:' character (see util.cpp:convertNameToFile) + << rmd->anchor() + << "\" line=\"" + << rmd->getStartBodyLine() + << "\">"; + QCString scope = rmd->getScopeString(); + QCString name = rmd->name(); + if (!scope.isEmpty() && scope!=def->name()) + { + name.prepend(scope+"::"); + } + writeXMLString(t,name); + t << "</referencedby>" << endl; + } + } + } + t << " </memberdef>" << endl; } @@ -980,6 +1083,7 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t) // + user defined member sections // + standard member sections // + detailed member documentation + // - examples if (cd->isReference()) return; // skip external references. if (cd->name().find('@')!=-1) return; // skip anonymous compounds. |