diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-10-20 18:23:06 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-10-20 18:23:06 (GMT) |
commit | 7c34dd2b1594925d0a012e9ba290bf9c80574db5 (patch) | |
tree | 63a7ba72ad4f8318f818aebfef29beee5811c241 /src/xmlgen.cpp | |
parent | 2c6d31c8bf31028ba2f822c31f4812c2cecab306 (diff) | |
download | Doxygen-7c34dd2b1594925d0a012e9ba290bf9c80574db5.zip Doxygen-7c34dd2b1594925d0a012e9ba290bf9c80574db5.tar.gz Doxygen-7c34dd2b1594925d0a012e9ba290bf9c80574db5.tar.bz2 |
Release-1.2.18-20021020
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r-- | src/xmlgen.cpp | 886 |
1 files changed, 1 insertions, 885 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index cac773f..80054c8 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -41,42 +41,11 @@ // no debug info #define XML_DB(x) do {} while(0) - // debug to stdout //#define XML_DB(x) printf x - // debug inside output //#define XML_DB(x) QCString __t;__t.sprintf x;m_t << __t -// static QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t) -// { -// switch (t) -// { -// case BaseOutputDocInterface::See: return "see"; -// case BaseOutputDocInterface::Return: return "return"; -// case BaseOutputDocInterface::Author: return "author"; -// case BaseOutputDocInterface::Version: return "version"; -// case BaseOutputDocInterface::Since: return "since"; -// case BaseOutputDocInterface::Date: return "date"; -// case BaseOutputDocInterface::Bug: return "bug"; -// case BaseOutputDocInterface::Note: return "note"; -// case BaseOutputDocInterface::Warning: return "warning"; -// case BaseOutputDocInterface::Par: return "par"; -// case BaseOutputDocInterface::Deprecated: return "deprecated"; -// case BaseOutputDocInterface::Pre: return "pre"; -// case BaseOutputDocInterface::Post: return "post"; -// case BaseOutputDocInterface::Invar: return "invariant"; -// case BaseOutputDocInterface::Remark: return "remark"; -// case BaseOutputDocInterface::Attention: return "attention"; -// case BaseOutputDocInterface::Todo: return "todo"; -// case BaseOutputDocInterface::Test: return "test"; -// case BaseOutputDocInterface::RCS: return "rcs"; -// case BaseOutputDocInterface::EnumValues: return "enumvalues"; -// case BaseOutputDocInterface::Examples: return "examples"; -// } -// return "illegal"; -// } - inline void writeXMLString(QTextStream &t,const char *s) { @@ -325,820 +294,6 @@ class XMLCodeGenerator : public BaseCodeDocInterface bool m_insideSpecialHL; }; -// /*! This class is used by the documentation parser. -// * Its methods are called when some XML text or markup -// * needs to be written. -// */ -// class XMLGenerator : public OutputDocInterface -// { -// public: -// -// // helper functions -// -// void startParMode() -// { -// if (!m_inParStack.isEmpty() && !m_inParStack.top()) -// { -// m_inParStack.top() = TRUE; -// m_t << "<para>"; -// XML_DB(("start par at level=%d\n",m_inParStack.count())); -// } -// else if (m_inParStack.isEmpty()) -// { -// m_inParStack.push(TRUE); -// m_t << "<para>"; -// XML_DB(("start par at level=%d\n",m_inParStack.count())); -// } -// } -// void endParMode() -// { -// if (!m_inParStack.isEmpty() && m_inParStack.top()) -// { -// 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 -// -// void docify(const char *s) -// { -// if (m_outputEnabled) -// { -// XML_DB(("(docify \"%s\")\n",s)); -// startParMode(); -// writeXMLString(m_t,s); -// } -// } -// void writeChar(char c) -// { -// char s[2];s[0]=c;s[1]=0; -// docify(s); -// } -// void writeString(const char *text) -// { -// //m_t << text; -// docify(text); -// } -// void startItemList() -// { -// XML_DB(("(startItemList)\n")); -// startParMode(); -// m_t << "<itemizedlist>" << endl;; -// m_inListStack.push(TRUE); -// } -// void startEnumList() -// { -// XML_DB(("(startEnumList)\n")); -// startParMode(); -// m_t << "<orderedlist>"; -// m_inListStack.push(TRUE); -// } -// void writeListItem() -// { -// XML_DB(("(writeListItem)\n")); -// if (!m_inListStack.isEmpty() && m_inListStack.top()) // first element -// { -// m_inListStack.top()=FALSE; -// } -// else // not first element, end previous element first -// { -// endParMode(); -// endNestedPar(); -// m_t << "</listitem>" << endl; -// } -// m_t << "<listitem>"; -// startNestedPar(); -// } -// void endItemList() -// { -// XML_DB(("(endItemList)\n")); -// if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element -// { -// endParMode(); -// endNestedPar(); -// m_t << "</listitem>" << endl; -// } -// m_t << "</itemizedlist>" << endl; -// } -// void endEnumList() -// { -// XML_DB(("(endEnumList)\n")); -// if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element -// { -// endParMode(); -// m_t << "</listitem>" << endl; -// endNestedPar(); -// } -// m_t << "</orderedlist>" << endl; -// } -// void newParagraph() -// { -// XML_DB(("(newParagraph)\n")); -// endParMode(); -// startParMode(); -// } -// void startBold() -// { -// XML_DB(("(startBold)\n")); -// startParMode(); -// m_t << "<bold>"; // non DocBook -// } -// void endBold() -// { -// XML_DB(("(endBold)\n")); -// m_t << "</bold>"; // non DocBook -// } -// void startTypewriter() -// { -// XML_DB(("(startTypewriter)\n")); -// startParMode(); -// m_t << "<computeroutput>"; -// } -// void endTypewriter() -// { -// XML_DB(("(endTypewriter)\n")); -// m_t << "</computeroutput>"; -// } -// void startEmphasis() -// { -// XML_DB(("(startEmphasis)\n")); -// startParMode(); -// m_t << "<emphasis>"; -// } -// void endEmphasis() -// { -// XML_DB(("(endEmphasis)\n")); -// m_t << "</emphasis>"; -// } -// void startCodeFragment() -// { -// XML_DB(("(startCodeFragment)\n")); -// startParMode(); -// m_t << "<programlisting>"; -// } -// void endCodeFragment() -// { -// XML_DB(("(endCodeFragment)\n")); -// m_t << "</programlisting>"; -// } -// void startPreFragment() -// { -// XML_DB(("(startPreFragment)\n")); -// startParMode(); -// m_t << "<preformatted>"; -// } -// void endPreFragment() -// { -// XML_DB(("(endPreFragment)\n")); -// m_t << "</preformatted>"; -// } -// void startVerbatimFragment() -// { -// XML_DB(("(startVerbatimFragment)\n")); -// startParMode(); -// m_t << "<preformatted>"; -// } -// void endVerbatimFragment() -// { -// XML_DB(("(endVerbatimFragment)\n")); -// m_t << "</preformatted>"; -// } -// void writeRuler() -// { -// XML_DB(("(startParMode)\n")); -// startParMode(); -// m_t << "<hruler/>"; -// } -// void startDescription() -// { -// XML_DB(("(startDescription)\n")); -// startParMode(); -// m_t << "<variablelist>"; -// m_inListStack.push(TRUE); -// } -// void endDescription() -// { -// XML_DB(("(endDescription)\n")); -// if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element -// { -// endNestedPar(); -// m_t << "</listitem>" << endl; -// } -// m_t << "</variablelist>"; -// if (!m_inListStack.isEmpty()) m_inListStack.pop(); -// } -// void startDescItem() -// { -// XML_DB(("(startDescItem)\n")); -// if (!m_inListStack.isEmpty() && m_inListStack.top()) // first element -// { -// m_inListStack.top()=FALSE; -// } -// else // not first element, end previous element first -// { -// endNestedPar(); -// m_t << "</listitem>"; -// } -// m_t << "<varlistentry><term>"; -// } -// void endDescItem() -// { -// XML_DB(("(endDescItem)\n")); -// m_t << "</term></varlistentry><listitem>"; -// startNestedPar(); -// } -// void startDescList(SectionTypes st) -// { -// XML_DB(("(startDescList)\n")); -// endParMode(); -// m_t << "<simplesect kind=\"" << sectionTypeToString(st); -// m_t << "\"><title>"; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endDescList() -// { -// XML_DB(("(endDescList)\n")); -// endNestedPar(); -// m_t << "</simplesect>"; -// } -// void startSimpleSect(SectionTypes st,const char *,const char *,const char *) -// { -// XML_DB(("(startSimpleSect)\n")); -// m_t << "<simplesect kind=\"" << sectionTypeToString(st) << "\">"; -// startNestedPar(); -// } -// void endSimpleSect() -// { -// XML_DB(("(endSimpleSect)\n")); -// endNestedPar(); -// m_t << "</simplesect>"; -// } -// void startParamList(ParamListTypes t,const char *) -// { -// XML_DB(("(startParamList)\n")); -// startParMode(); -// QCString kind; -// switch(t) -// { -// case Param: kind="param"; break; -// case RetVal: kind="retval"; break; -// case Exception: kind="exception"; break; -// } -// m_t << "<parameterlist kind=\"" << kind << "\">"; // non DocBook -// startNestedPar(); -// m_inParStack.top() = TRUE; -// m_inParamList = TRUE; -// } -// void endParamList() -// { -// XML_DB(("(endParamList)\n")); -// m_inParamList = FALSE; -// m_t << "</parameterlist>"; -// } -// void endDescTitle() -// { -// m_inParStack.top() = FALSE; -// endNestedPar(); -// XML_DB(("(endDescTitle)\n")); -// m_t << "</title>"; -// if (!m_inParamList) startNestedPar(); -// } -// void writeDescItem() -// { -// XML_DB(("(writeDescItem)\n")); -// } -// void startDescTable() -// { -// XML_DB(("(startDescTable)\n")); -// } -// void endDescTable() -// { -// XML_DB(("(endDescTable)\n")); -// } -// void startDescTableTitle() -// { -// XML_DB(("(startDescTableTitle)\n")); -// m_t << "<parametername>"; // non docbook -// } -// void endDescTableTitle() -// { -// XML_DB(("(endDescTableTitle)\n")); -// m_t << "</parametername>"; // non docbook -// } -// void startDescTableData() -// { -// XML_DB(("(startDescTableData)\n")); -// m_t << "<parameterdescription>"; // non docbook -// startNestedPar(); -// } -// void endDescTableData() -// { -// XML_DB(("(endDescTableData)\n")); -// endNestedPar(); -// m_t << "</parameterdescription>"; // non docbook -// } -// void lineBreak() -// { -// XML_DB(("(lineBreak)\n")); -// startParMode(); -// m_t << "<linebreak/>"; // non docbook -// } -// void writeNonBreakableSpace(int num) -// { -// XML_DB(("(writeNonBreakableSpace)\n")); -// int i;for (i=0;i<num;i++) m_t << " "; -// } -// -// void writeObjectLink(const char *ref,const char *file, -// const char *anchor, const char *text) -// { -// XML_DB(("(writeObjectLink)\n")); -// startParMode(); -// writeXMLLink(m_t,ref,file,anchor,text); -// } -// void writeCodeLink(const char *ref,const char *file, -// const char *anchor,const char *text) -// { -// XML_DB(("(writeCodeLink)\n")); -// writeXMLLink(m_t,ref,file,anchor,text); -// } -// void startHtmlLink(const char *url) -// { -// XML_DB(("(startHtmlLink)\n")); -// startParMode(); -// m_t << "<ulink url=\"" << url << "\">"; -// } -// void endHtmlLink() -// { -// XML_DB(("(endHtmlLink)\n")); -// m_t << "</ulink>"; -// } -// void writeMailLink(const char *url) -// { -// XML_DB(("(writeMailLink)\n")); -// startParMode(); -// m_t << "<email>"; -// docify(url); -// m_t << "</email>"; -// } -// void startSection(const char *id,const char *,SectionInfo::SectionType type) -// { -// XML_DB(("(startSection)\n")); -// endParMode(); -// m_t << "<sect"; -// switch(type) -// { -// case SectionInfo::Page: m_t << "1"; break; -// case SectionInfo::Section: m_t << "2"; break; -// case SectionInfo::Subsection: m_t << "3"; break; -// default: ASSERT(0); break; -// } -// m_t << " id=\"" << id << "\">"; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endSection(const char *,SectionInfo::SectionType type) -// { -// XML_DB(("(endSection)\n")); -// m_t << "</sect"; -// switch(type) -// { -// case SectionInfo::Page: m_t << "1"; break; -// case SectionInfo::Section: m_t << "2"; break; -// case SectionInfo::Subsection: m_t << "3"; break; -// default: ASSERT(0); break; -// } -// m_t << ">"; -// m_inParStack.top() = FALSE; -// endNestedPar(); -// } -// void startSubsection() -// { -// XML_DB(("(startSubsection)\n")); -// endParMode(); -// m_t << "<sect2>"; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endSubsection() -// { -// XML_DB(("(endSubsection)\n")); -// m_t << "</sect2>"; -// m_inParStack.top() = FALSE; -// endNestedPar(); -// } -// void startSubsubsection() -// { -// XML_DB(("(startSubsubsection)\n")); -// endParMode(); -// m_t << "<sect3>"; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endSubsubsection() -// { -// XML_DB(("(endSubsubsection)\n")); -// m_t << "</sect3>"; -// m_inParStack.top() = FALSE; -// endNestedPar(); -// } -// void startCenter() -// { -// XML_DB(("(startCenter)\n")); -// startParMode(); -// m_t << "<center>"; // non docbook -// } -// void endCenter() -// { -// XML_DB(("(endCenter)\n")); -// m_t << "</center>"; // non docbook -// } -// void startSmall() -// { -// XML_DB(("(startSmall)\n")); -// startParMode(); -// m_t << "<small>"; // non docbook -// } -// void endSmall() -// { -// XML_DB(("(endSmall)\n")); -// m_t << "</small>"; // non docbook -// } -// void startSubscript() -// { -// XML_DB(("(startSubscript)\n")); -// startParMode(); -// m_t << "<subscript>"; -// } -// void endSubscript() -// { -// XML_DB(("(endSubscript)\n")); -// m_t << "</subscript>"; -// } -// void startSuperscript() -// { -// XML_DB(("(startSuperscript)\n")); -// startParMode(); -// m_t << "<superscript>"; -// } -// void endSuperscript() -// { -// XML_DB(("(endSuperscript)\n")); -// m_t << "</superscript>"; -// } -// void startTable(bool,int cols) -// { -// XML_DB(("startTable\n")); -// startParMode(); -// m_t << "<table cols=\"" << cols << "\">\n"; -// } -// void endTable(bool hasCaption) -// { -// XML_DB(("endTable\n")); -// if (!hasCaption) m_t << "</row>\n"; -// m_t << "</table>"; -// } -// void startCaption() -// { -// XML_DB(("startCaption")); -// m_t << "</row><caption>"; -// } -// void endCaption() -// { -// XML_DB(("encCaption")); -// m_t << "</caption>"; -// } -// 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>"; -// } -// -// void writeQuote() { m_t << "\""; } -// void writeCopyright() { m_t << "©"; } -// void writeUmlaut(char c) { m_t << "&" << c << "uml;"; } -// void writeAcute(char c) { m_t << "&" << c << "acute;"; } -// void writeGrave(char c) { m_t << "&" << c << "grave;"; } -// void writeCirc(char c) { m_t << "&" << c << "circ;"; } -// void writeTilde(char c) { m_t << "&" << c << "tilde;"; } -// void writeRing(char c) { m_t << "&" << c << "ring;"; } -// void writeSharpS() { m_t << "ß"; } -// void writeCCedil(char c) { m_t << "&" << c << "cedil;"; } -// -// void startTitle() -// { -// XML_DB(("(startTitle)\n")); -// m_t << "<title>"; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endTitle() -// { -// m_inParStack.top() = FALSE; -// endNestedPar(); -// XML_DB(("(endTitle)\n")); -// m_t << "</title>" << endl; -// } -// void writeAnchor(const char *id,const char *name) -// { -// XML_DB(("(writeAnchor)\n")); -// startParMode(); -// m_t << "<anchor id=\"" << id << "_1" << name << "\"/>"; -// } -// void writeSectionRef(const char *,const char *id, -// const char *name,const char *text) -// { -// XML_DB(("(writeSectionRef)\n")); -// startParMode(); -// m_t << "<link linkend=\"" << id << "_1" << name << "\">"; -// docify(text); -// m_t << "</link>"; -// } -// void writeSectionRefItem(const char *,const char *,const char *) -// { -// m_t << "(writeSectionRefItem)"; -// } -// void addIndexItem(const char *primaryie,const char *secondaryie) -// { -// XML_DB(("(addIndexItem)\n")); -// startParMode(); -// m_t << "<indexentry><primaryie>"; -// docify(primaryie); -// m_t << "</primaryie><secondaryie>"; -// docify(secondaryie); -// m_t << "</secondaryie></indexentry>"; -// } -// void writeFormula(const char *id,const char *text) -// { -// XML_DB(("(writeFormula)\n")); -// startParMode(); -// m_t << "<formula id=\"" << id << "\">"; // non Docbook -// docify(text); -// m_t << "</formula>"; -// } -// void startImage(const char *name,const char *size,bool /*caption*/) -// { -// XML_DB(("(startImage)\n")); -// startParMode(); -// m_t << "<image name=\"" << name << "\""; -// if (size) m_t << " size=\"" << size << "\""; -// m_t << ">"; // non docbook -// } -// void endImage(bool) -// { -// XML_DB(("(endImage)\n")); -// m_t << "</image>"; -// } -// void startDotFile(const char *name,bool /*caption*/) -// { -// XML_DB(("(startDotFile)\n")); -// startParMode(); -// m_t << "<dotfile name=\"" << name << "\">"; // non docbook -// } -// void endDotFile(bool) -// { -// XML_DB(("(endDotFile)\n")); -// m_t << "</dotfile>"; -// } -// void startTextLink(const char *name,const char *anchor) -// { -// XML_DB(("(startTextLink)\n")); -// startParMode(); -// m_t << "<ulink url=\"" << name << "#" << anchor << "\">"; -// } -// void endTextLink() -// { -// XML_DB(("(endTextLink)\n")); -// m_t << "</ulink>"; -// } -// void startPageRef() -// { -// XML_DB(("(startPageRef)\n")); -// m_outputEnabled = FALSE; -// } -// void endPageRef(const char *,const char *) -// { -// XML_DB(("(endPageRef)\n")); -// m_outputEnabled = TRUE; -// } -// void writeLineNumber(const char *extRef,const char *compId, -// const char *anchorId,int l) -// { -// XML_DB(("(writeLineNumber)\n")); -// m_t << "<linenumber"; -// m_t << " line=\"" << l << "\""; -// if (compId) -// { -// m_t << " refid=\"" << compId; -// if (anchorId) m_t << "_1" << anchorId; -// m_t << "\" kindref=\""; -// if (anchorId) m_t << "member"; else m_t << "compound"; -// m_t << "\""; -// if (extRef) m_t << " external=\"" << extRef << "\""; -// } -// m_t << "/>"; -// } -// void startCodeLine() -// { -// XML_DB(("(startCodeLine)\n")); -// startParMode(); -// m_t << "<codeline>"; // non DocBook -// } -// void endCodeLine() -// { -// XML_DB(("(endCodeLine)\n")); -// m_t << "</codeline>" << endl; // non DocBook -// } -// void startCodeAnchor(const char *id) -// { -// XML_DB(("(startCodeAnchor)\n")); -// startParMode(); -// m_t << "<anchor id=\"" << id << "\">"; -// } -// void endCodeAnchor() -// { -// XML_DB(("(endCodeAnchor)\n")); -// m_t << "</anchor>"; -// } -// void startFontClass(const char *colorClass) -// { -// XML_DB(("(startFontClass)\n")); -// m_t << "<highlight class=\"" << colorClass << "\">"; // non DocBook -// } -// void endFontClass() -// { -// XML_DB(("(endFontClass)\n")); -// m_t << "</highlight>"; // non DocBook -// } -// void codify(const char *text) -// { -// XML_DB(("(codify \"%s\")\n",text)); -// docify(text); -// } -// void startHtmlOnly() -// { -// XML_DB(("(startHtmlOnly)\n")); -// m_t << "<htmlonly>" << endl; -// } -// void endHtmlOnly() -// { -// XML_DB(("(endHtmlOnly)\n")); -// m_t << "</htmlonly>" << endl; -// } -// void startLatexOnly() -// { -// XML_DB(("(startLatexOnly)\n")); -// m_t << "<latexonly>" << endl; -// } -// void endLatexOnly() -// { -// XML_DB(("(endLatexOnly)\n")); -// m_t << "</latexonly>" << endl; -// } -// void startSectionRefList() -// { -// XML_DB(("(startSectionRefList)\n")); -// } -// void endSectionRefList() -// { -// XML_DB(("(endSectionRefList)\n")); -// } -// void writeCodeAnchor(const char *) -// { -// XML_DB(("(writeCodeAnchor)\n")); -// } -// -// // Generator specific functions -// -// /*! Create a clone of this generator. Uses the copy constructor */ -// OutputDocInterface *clone() -// { -// return new XMLGenerator(this); -// } -// /*! Append the output written to generator \a g to this generator */ -// void append(const OutputDocInterface *g) -// { -// const XMLGenerator *xg = (const XMLGenerator *)g; -// -// //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; -// m_inParamList = xg->m_inParamList; -// } -// /*! constructor. -// */ -// XMLGenerator() -// { -// m_b.setBuffer(m_a); -// m_b.open( IO_WriteOnly ); -// m_t.setDevice(&m_b); -// m_t.setEncoding(QTextStream::Latin1); -// m_inParamList = FALSE; -// m_outputEnabled = TRUE; -// } -// /*! copy constructor */ -// XMLGenerator(const XMLGenerator *xg) -// { -// m_b.setBuffer(m_a); -// m_b.open( IO_WriteOnly ); -// 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; -// m_inParamList = xg->m_inParamList; -// m_outputEnabled = xg->m_outputEnabled; -// } -// /*! destructor */ -// virtual ~XMLGenerator() -// { -// } -// /*! Returns the output written to this generator as a string */ -// QCString getContents() const -// { -// QCString s; -// s.resize(m_a.size()+1); -// memcpy(s.data(),m_a.data(),m_a.size()); -// s.at(m_a.size())='\0'; -// return s; -// } -// -// private: -// // only one destination stream, so these do not have to be implemented -// void pushGeneratorState() {} -// void popGeneratorState() {} -// void disableAllBut(OutputGenerator::OutputType) {} -// void enableAll() {} -// void disableAll() {} -// void disable(OutputGenerator::OutputType) {} -// void enable(OutputGenerator::OutputType) {} -// bool isEnabled(OutputGenerator::OutputType) { return TRUE; } -// -// QTextStream m_t; -// QByteArray m_a; -// QBuffer m_b; -// -// ValStack<bool> m_inParStack; -// ValStack<bool> m_inListStack; -// bool m_inParamList; -// bool m_outputEnabled; -// -// friend void writeXMLCodeBlock(QTextStream &t,FileDef *fd); -// }; static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char *name,int indent) { @@ -1212,20 +367,6 @@ static void writeXMLDocBlock(QTextStream &t, delete xmlCodeGen; delete root; -/* - XMLGenerator *xmlGen = new XMLGenerator; - //xmlGen->startParMode(); - parseDoc(*xmlGen, - fileName, // input definition file - lineNr, // input definition line - scope, // scope (which should not be linked to) - md, // member (which should not be linked to) - stext+"\n" // actual text - ); - xmlGen->endParMode(); - t << xmlGen->getContents(); - delete xmlGen; -*/ } void writeXMLCodeBlock(QTextStream &t,FileDef *fd) @@ -1264,30 +405,6 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c } t << ">" << convertToXML(name) << "</" << tagName << ">" << endl; -#if 0 - Definition *d = rmd->getOuterScope(); - if (d==Doxygen::globalScope) d=rmd->getBodyDef(); - if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef()) - // link to definition in code - { - t << " <" << tagName << " id=\""; - t << rmd->getBodyDef()->getOutputFileBase() - << "_1" // encoded `:' character (see util.cpp:convertNameToFile) - << rmd->anchor() - << "\">" << convertToXML(name) << "</" - << tagName << ">" << endl; - } - else if (rmd->isLinkable() && d && d->isLinkable()) - // link to declaration in documentation (in absense of a definition) - { - t << " <" << tagName << " id=\""; - t << d->getOutputFileBase() - << "_1" // encoded `:' character (see util.cpp:convertNameToFile) - << rmd->anchor() - << "\">" << convertToXML(name) - << "</" << tagName << ">" << endl; - } -#endif } static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def) @@ -2177,8 +1294,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti) QTextStream t(&f); writeXMLHeader(t); - t << " <compounddef id=\""; - if (Config_getBool("CASE_SENSE_NAMES")) t << pi->name; else t << pi->name.lower(); + t << " <compounddef id=\"" << pageName; t << "\" kind=\"page\">" << endl; t << " <compoundname>" << convertToXML(pi->name) << "</compoundname>" << endl; SectionInfo *si = Doxygen::sectionDict.find(pi->name); |