summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL4
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--addon/doxmlparser/include/doxmlintf.h56
-rw-r--r--addon/doxmlparser/src/compoundhandler.cpp2
-rw-r--r--addon/doxmlparser/src/dochandler.cpp369
-rw-r--r--addon/doxmlparser/src/dochandler.h163
-rw-r--r--addon/doxmlparser/src/doxmlintf.h56
-rw-r--r--addon/doxmlparser/src/mainhandler.cpp2
-rw-r--r--addon/doxmlparser/src/mainhandler.h6
-rw-r--r--addon/doxmlparser/src/memberhandler.cpp58
-rw-r--r--addon/doxmlparser/src/memberhandler.h43
-rw-r--r--addon/doxmlparser/src/paramhandler.cpp10
-rw-r--r--addon/doxmlparser/src/paramhandler.h10
-rw-r--r--addon/doxmlparser/src/sectionhandler.cpp5
-rw-r--r--addon/doxmlparser/src/sectionhandler.h4
-rw-r--r--addon/doxmlparser/test/main.cpp74
-rw-r--r--doc/commands.doc4
-rw-r--r--packages/rpm/doxygen.spec2
-rw-r--r--src/code.l27
-rw-r--r--src/config.l20
-rw-r--r--src/definition.cpp4
-rw-r--r--src/docparser.cpp119
-rw-r--r--src/docparser.h25
-rw-r--r--src/doctokenizer.l10
-rw-r--r--src/docvisitor.h7
-rw-r--r--src/htmldocvisitor.cpp45
-rw-r--r--src/htmldocvisitor.h4
-rw-r--r--src/latexdocvisitor.cpp32
-rw-r--r--src/latexdocvisitor.h4
-rw-r--r--src/mandocvisitor.cpp46
-rw-r--r--src/mandocvisitor.h4
-rw-r--r--src/memberdef.cpp13
-rw-r--r--src/perlmodgen.cpp966
-rw-r--r--src/printdocvisitor.h27
-rw-r--r--src/rtfdocvisitor.cpp49
-rw-r--r--src/rtfdocvisitor.h4
-rw-r--r--src/rtfgen.cpp15
-rw-r--r--src/util.cpp8
-rw-r--r--src/xmldocvisitor.cpp28
-rw-r--r--src/xmldocvisitor.h4
41 files changed, 1623 insertions, 712 deletions
diff --git a/INSTALL b/INSTALL
index a741697..f1ec438 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,6 @@
-DOXYGEN Version 1.2.18-20021030
+DOXYGEN Version 1.2.18-20021106
Please read the installation section of the manual for instructions.
--------
-Dimitri van Heesch (30 October 2002)
+Dimitri van Heesch (06 November 2002)
diff --git a/README b/README
index d0e6c78..fd92766 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.2.18_20021030
+DOXYGEN Version 1.2.18_20021106
Please read INSTALL for compilation instructions.
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (30 October 2002)
+Dimitri van Heesch (dimitri@stack.nl) (06 November 2002)
diff --git a/VERSION b/VERSION
index 298b8b4..5422fca 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.18-20021030
+1.2.18-20021106
diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h
index 7ab2c79..6432ee3 100644
--- a/addon/doxmlparser/include/doxmlintf.h
+++ b/addon/doxmlparser/include/doxmlintf.h
@@ -159,10 +159,13 @@ class IDoc
Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection
- Preformatted, // 30 -> IDocPreformatted
- Verbatim, // 31 -> IDocVerbatim
- Symbol, // 32 -> IDocSymbol
- Root // 33 -> IDocRoot
+ Verbatim, // 30 -> IDocVerbatim
+ Copy, // 31 -> IDocCopy
+ TocList, // 32 -> IDocTocList
+ TocItem, // 33 -> IDocTocItem
+ Anchor, // 34 -> IDocAnchor
+ Symbol, // 35 -> IDocSymbol
+ Root // 36 -> IDocRoot
};
virtual Kind kind() const = 0;
};
@@ -172,14 +175,16 @@ class IDocMarkup : public IDoc
public:
enum Markup
{
- Normal = 0x00,
- Bold = 0x01,
- Emphasis = 0x02,
- ComputerOutput = 0x04,
- Subscript = 0x08,
- Superscript = 0x10,
- SmallFont = 0x20,
- Center = 0x40
+ Normal = 0x000,
+ Bold = 0x001,
+ Emphasis = 0x002,
+ ComputerOutput = 0x004,
+ Subscript = 0x008,
+ Superscript = 0x010,
+ SmallFont = 0x020,
+ Center = 0x040,
+ Preformatted = 0x080,
+ Heading = 0x100
};
};
@@ -194,6 +199,7 @@ class IDocText : public IDocMarkup
public:
virtual const IString * text() const = 0;
virtual int markup() const = 0;
+ virtual int headingLevel() const = 0;
};
class IDocMarkupModifier : public IDoc
@@ -201,6 +207,7 @@ class IDocMarkupModifier : public IDoc
public:
virtual bool enabled() const = 0;
virtual int markup() const = 0;
+ virtual int headingLevel() const = 0;
};
class IDocItemizedList : public IDoc
@@ -278,7 +285,7 @@ class IDocVariableList : public IDoc
class IDocVariableListEntry : public IDoc
{
public:
- virtual const IString * term() const = 0;
+ virtual ILinkedTextIterator * term() const = 0;
virtual IDocPara *description() const = 0;
};
@@ -393,7 +400,20 @@ class IDocSection : public IDoc
virtual IDocIterator *title() const = 0;
};
-class IDocPreformatted : public IDoc
+class IDocTocList : public IDoc
+{
+ public:
+ virtual IDocIterator *elements() const = 0;
+};
+
+class IDocTocItem : public IDoc
+{
+ public:
+ virtual const IString *id() const = 0;
+ virtual const IString *title() const = 0;
+};
+
+class IDocCopy : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
@@ -402,7 +422,15 @@ class IDocPreformatted : public IDoc
class IDocVerbatim : public IDoc
{
public:
+ enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim };
virtual const IString *text() const = 0;
+ virtual Types type() const = 0;
+};
+
+class IDocAnchor : public IDoc
+{
+ public:
+ virtual const IString *id() const = 0;
};
class IDocSymbol : public IDoc
diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp
index df69d2a..4c64a54 100644
--- a/addon/doxmlparser/src/compoundhandler.cpp
+++ b/addon/doxmlparser/src/compoundhandler.cpp
@@ -19,7 +19,9 @@
#include "debug.h"
#include "graphhandler.h"
#include "sectionhandler.h"
+#include "paramhandler.h"
#include "loamhandler.h"
+#include "memberhandler.h"
//----------------------------------------------------------------------------
diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp
index e771761..6bd2476 100644
--- a/addon/doxmlparser/src/dochandler.cpp
+++ b/addon/doxmlparser/src/dochandler.cpp
@@ -13,9 +13,12 @@
*
*/
+#include <qmap.h>
+
#include "dochandler.h"
#include "debug.h"
-#include <qmap.h>
+#include "linkedtexthandler.h"
+
//----------------------------------------------------------------------
@@ -95,7 +98,8 @@ void dochandler_exit()
//----------------------------------------------------------------------
MarkupHandler::MarkupHandler(QList<DocImpl> &children,QString &curString)
- : m_children(children), m_curString(curString), m_curMarkup(IDocMarkup::Normal)
+ : m_children(children), m_curString(curString),
+ m_curMarkup(IDocMarkup::Normal), m_headingLevel(0)
{
addStartHandler("bold",this,&MarkupHandler::startBold);
addEndHandler("bold",this,&MarkupHandler::endBold);
@@ -117,6 +121,27 @@ MarkupHandler::MarkupHandler(QList<DocImpl> &children,QString &curString)
addStartHandler("superscript",this,&MarkupHandler::startSuperscript);
addEndHandler("superscript",this,&MarkupHandler::endSuperscript);
+
+ addStartHandler("preformatted",this,&MarkupHandler::startPreformatted);
+ addEndHandler("preformatted",this,&MarkupHandler::endPreformatted);
+
+ addStartHandler("heading1",this,&MarkupHandler::startHeading1);
+ addEndHandler("heading1",this,&MarkupHandler::endHeading1);
+
+ addStartHandler("heading2",this,&MarkupHandler::startHeading2);
+ addEndHandler("heading2",this,&MarkupHandler::endHeading2);
+
+ addStartHandler("heading3",this,&MarkupHandler::startHeading3);
+ addEndHandler("heading3",this,&MarkupHandler::endHeading3);
+
+ addStartHandler("heading4",this,&MarkupHandler::startHeading4);
+ addEndHandler("heading4",this,&MarkupHandler::endHeading4);
+
+ addStartHandler("heading5",this,&MarkupHandler::startHeading5);
+ addEndHandler("heading5",this,&MarkupHandler::endHeading5);
+
+ addStartHandler("heading6",this,&MarkupHandler::startHeading6);
+ addEndHandler("heading6",this,&MarkupHandler::endHeading6);
}
MarkupHandler::~MarkupHandler()
@@ -127,7 +152,7 @@ void MarkupHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
- m_children.append(new TextNode(m_curString,m_curMarkup));
+ m_children.append(new TextNode(m_curString,m_curMarkup,m_headingLevel));
debug(2,"addTextNode() text=%s markup=%x\n",m_curString.data(),m_curMarkup);
m_curString="";
}
@@ -231,6 +256,117 @@ void MarkupHandler::endSuperscript()
m_curMarkup &= ~IDocMarkup::Superscript;
}
+void MarkupHandler::startPreformatted(const QXmlAttributes & /*attrib*/)
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,TRUE));
+ m_curMarkup |= IDocMarkup::Preformatted;
+}
+
+void MarkupHandler::endPreformatted()
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,FALSE));
+ m_curMarkup &= ~IDocMarkup::Preformatted;
+}
+
+void MarkupHandler::startHeading1(const QXmlAttributes & /*attrib*/)
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,1));
+ m_curMarkup |= IDocMarkup::Heading;
+ m_headingLevel=1;
+}
+
+void MarkupHandler::endHeading1()
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,1));
+ m_curMarkup &= ~IDocMarkup::Heading;
+ m_headingLevel=0;
+}
+
+void MarkupHandler::startHeading2(const QXmlAttributes & /*attrib*/)
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,2));
+ m_curMarkup |= IDocMarkup::Heading;
+ m_headingLevel=2;
+}
+
+void MarkupHandler::endHeading2()
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,2));
+ m_curMarkup &= ~IDocMarkup::Heading;
+ m_headingLevel=0;
+}
+
+void MarkupHandler::startHeading3(const QXmlAttributes & /*attrib*/)
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,3));
+ m_curMarkup |= IDocMarkup::Heading;
+ m_headingLevel=3;
+}
+
+void MarkupHandler::endHeading3()
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,3));
+ m_curMarkup &= ~IDocMarkup::Heading;
+ m_headingLevel=0;
+}
+
+void MarkupHandler::startHeading4(const QXmlAttributes & /*attrib*/)
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,4));
+ m_curMarkup |= IDocMarkup::Heading;
+ m_headingLevel=4;
+}
+
+void MarkupHandler::endHeading4()
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,4));
+ m_curMarkup &= ~IDocMarkup::Heading;
+ m_headingLevel=0;
+}
+
+void MarkupHandler::startHeading5(const QXmlAttributes & /*attrib*/)
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,5));
+ m_curMarkup |= IDocMarkup::Heading;
+ m_headingLevel=5;
+}
+
+void MarkupHandler::endHeading5()
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,5));
+ m_curMarkup &= ~IDocMarkup::Heading;
+ m_headingLevel=0;
+}
+
+void MarkupHandler::startHeading6(const QXmlAttributes & /*attrib*/)
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,TRUE,6));
+ m_curMarkup |= IDocMarkup::Heading;
+ m_headingLevel=6;
+}
+
+void MarkupHandler::endHeading6()
+{
+ addTextNode();
+ m_children.append(new MarkupModifierNode(IDocMarkup::Heading,FALSE,6));
+ m_curMarkup &= ~IDocMarkup::Heading;
+ m_headingLevel=0;
+}
+
+
//----------------------------------------------------------------------
// ListItemHandler
//----------------------------------------------------------------------
@@ -348,6 +484,69 @@ IDocIterator *ItemizedListHandler::elements() const
}
//----------------------------------------------------------------------
+// TocListHandler
+//----------------------------------------------------------------------
+
+TocListHandler::TocListHandler(IBaseHandler *parent) : m_parent(parent)
+{
+ m_children.setAutoDelete(TRUE);
+ addEndHandler("toclist",this,&TocListHandler::endTocList);
+ addStartHandler("tocitem",this,&TocListHandler::startTocItem);
+}
+
+TocListHandler::~TocListHandler()
+{
+}
+
+void TocListHandler::startTocList(const QXmlAttributes& /*attrib*/)
+{
+ m_parent->setDelegate(this);
+}
+
+void TocListHandler::endTocList()
+{
+ m_parent->setDelegate(0);
+}
+
+void TocListHandler::startTocItem(const QXmlAttributes& attrib)
+{
+ TocItemHandler *tiHandler = new TocItemHandler(this);
+ tiHandler->startTocItem(attrib);
+ m_children.append(tiHandler);
+}
+
+IDocIterator *TocListHandler::elements() const
+{
+ return new TocListIterator(*this);
+}
+
+//----------------------------------------------------------------------
+// TocItemHandler
+//----------------------------------------------------------------------
+
+TocItemHandler::TocItemHandler(IBaseHandler *parent) : m_parent(parent)
+{
+ addEndHandler("tocitem",this,&TocItemHandler::endTocItem);
+}
+
+TocItemHandler::~TocItemHandler()
+{
+}
+
+void TocItemHandler::startTocItem(const QXmlAttributes& attrib)
+{
+ m_parent->setDelegate(this);
+ m_id = attrib.value("id");
+ m_curString="";
+}
+
+void TocItemHandler::endTocItem()
+{
+ m_title = m_curString;
+ m_parent->setDelegate(0);
+}
+
+//----------------------------------------------------------------------
// ParameterHandler
//----------------------------------------------------------------------
@@ -663,9 +862,15 @@ void TitleHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
- m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
- debug(2,"addTextNode() text=\"%s\" markup=%x\n",
- m_curString.data(),m_markupHandler->markup());
+ m_children.append(
+ new TextNode(
+ m_curString,
+ m_markupHandler->markup(),
+ m_markupHandler->headingLevel()
+ )
+ );
+ debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
+ m_curString.data(),m_markupHandler->markup(),m_markupHandler->headingLevel());
m_curString="";
}
}
@@ -731,7 +936,7 @@ void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
VariableListEntryHandler::VariableListEntryHandler(IBaseHandler *parent)
- : m_parent(parent), m_description(0)
+ : m_parent(parent), m_description(0), m_linkedTextHandler(0)
{
addStartHandler("term",this,&VariableListEntryHandler::startTerm);
addEndHandler("term",this,&VariableListEntryHandler::endTerm);
@@ -772,12 +977,13 @@ void VariableListEntryHandler::endListItem()
void VariableListEntryHandler::startTerm(const QXmlAttributes& /*attrib*/)
{
m_curString="";
+ m_linkedTextHandler = new LinkedTextHandler(this,m_term);
+ m_linkedTextHandler->start("term");
}
void VariableListEntryHandler::endTerm()
{
- m_term = m_curString;
- debug(2,"term=%s\n",m_term.data());
+ delete m_linkedTextHandler;
}
void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib)
@@ -787,6 +993,10 @@ void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib)
m_description->startParagraph(attrib);
}
+ILinkedTextIterator *VariableListEntryHandler::term() const
+{
+ return new LinkedTextIterator(m_term);
+}
//----------------------------------------------------------------------
@@ -881,7 +1091,7 @@ void HighlightHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
- m_children.append(new TextNode(m_curString,IDocMarkup::Normal));
+ m_children.append(new TextNode(m_curString,IDocMarkup::Normal,0));
debug(2,"addTextNode() text=\"%s\"\n",
m_curString.data());
m_curString="";
@@ -958,7 +1168,7 @@ void CodeLineHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
- m_children.append(new TextNode(m_curString,IDocMarkup::Normal));
+ m_children.append(new TextNode(m_curString,IDocMarkup::Normal,0));
debug(2,"addTextNode() text=\"%s\"\n",
m_curString.data());
m_curString="";
@@ -1063,6 +1273,32 @@ void FormulaHandler::endFormula()
}
//----------------------------------------------------------------------
+// AnchorHandler
+//----------------------------------------------------------------------
+
+AnchorHandler::AnchorHandler(IBaseHandler *parent)
+ : m_parent(parent)
+{
+ addEndHandler("anchor",this,&AnchorHandler::endAnchor);
+}
+
+AnchorHandler::~AnchorHandler()
+{
+}
+
+void AnchorHandler::startAnchor(const QXmlAttributes& attrib)
+{
+ m_id = attrib.value("id");
+ m_parent->setDelegate(this);
+}
+
+void AnchorHandler::endAnchor()
+{
+ debug(2,"anchor id=`%s'\n",m_id.data());
+ m_parent->setDelegate(0);
+}
+
+//----------------------------------------------------------------------
// ImageHandler
//----------------------------------------------------------------------
@@ -1298,33 +1534,45 @@ IDocIterator *TableHandler::rows() const
}
//----------------------------------------------------------------------
-// PreformattedHandler
+// CopyHandler
//----------------------------------------------------------------------
-PreformattedHandler::PreformattedHandler(IBaseHandler *parent)
- : m_parent(parent)
+CopyHandler::CopyHandler(IBaseHandler *parent)
+ : m_parent(parent)
{
m_children.setAutoDelete(TRUE);
- addEndHandler("preformatted",this,&PreformattedHandler::endPreformatted);
+
+ addEndHandler("copydoc",this,&CopyHandler::endCopy);
+
+ addStartHandler("para",this,&CopyHandler::startParagraph);
}
-PreformattedHandler::~PreformattedHandler()
+CopyHandler::~CopyHandler()
{
}
-void PreformattedHandler::startPreformatted(const QXmlAttributes&)
+void CopyHandler::startCopy(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
+ debug(2,"start copy handler\n");
}
-void PreformattedHandler::endPreformatted()
+void CopyHandler::endCopy()
{
+ debug(2,"end copy handler\n");
m_parent->setDelegate(0);
}
-IDocIterator *PreformattedHandler::contents() const
+void CopyHandler::startParagraph(const QXmlAttributes& attrib)
{
- return new PreformattedIterator(*this);
+ ParagraphHandler *parHandler = new ParagraphHandler(this);
+ parHandler->startParagraph(attrib);
+ m_children.append(parHandler);
+}
+
+IDocIterator *CopyHandler::contents() const
+{
+ return new CopyIterator(*this);
}
//----------------------------------------------------------------------
@@ -1332,17 +1580,20 @@ IDocIterator *PreformattedHandler::contents() const
//----------------------------------------------------------------------
VerbatimHandler::VerbatimHandler(IBaseHandler *parent)
- : m_parent(parent)
+ : m_parent(parent), m_type(IDocVerbatim::Invalid)
{
addEndHandler("verbatim",this,&VerbatimHandler::endVerbatim);
+ addEndHandler("latexonly",this,&VerbatimHandler::endVerbatim);
+ addEndHandler("htmlonly",this,&VerbatimHandler::endVerbatim);
}
VerbatimHandler::~VerbatimHandler()
{
}
-void VerbatimHandler::startVerbatim(const QXmlAttributes&)
+void VerbatimHandler::startVerbatim(const QXmlAttributes&,Types type)
{
+ m_type = type;
m_parent->setDelegate(this);
m_curString="";
}
@@ -1353,6 +1604,7 @@ void VerbatimHandler::endVerbatim()
m_parent->setDelegate(0);
}
+
//----------------------------------------------------------------------
// SymbolHandler
//----------------------------------------------------------------------
@@ -1418,8 +1670,9 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("dotfile",this,&ParagraphHandler::startDotFile);
addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry);
addStartHandler("table",this,&ParagraphHandler::startTable);
- addStartHandler("preformatted",this,&ParagraphHandler::startPreformatted);
addStartHandler("verbatim",this,&ParagraphHandler::startVerbatim);
+ addStartHandler("latexonly",this,&ParagraphHandler::startHtmlOnly);
+ addStartHandler("htmlonly",this,&ParagraphHandler::startLatexOnly);
addStartHandler("umlaut",this,&ParagraphHandler::startUmlaut);
addStartHandler("acute",this,&ParagraphHandler::startAcute);
addStartHandler("grave",this,&ParagraphHandler::startGrave);
@@ -1430,6 +1683,9 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("ring",this,&ParagraphHandler::startRing);
addStartHandler("nbsp",this,&ParagraphHandler::startNbsp);
addStartHandler("copy",this,&ParagraphHandler::startCopy);
+ addStartHandler("anchor",this,&ParagraphHandler::startAnchor);
+ addStartHandler("copydoc",this,&ParagraphHandler::startCopyDoc);
+ addStartHandler("toclist",this,&ParagraphHandler::startTocList);
}
ParagraphHandler::~ParagraphHandler()
@@ -1586,19 +1842,27 @@ void ParagraphHandler::startTable(const QXmlAttributes& attrib)
m_children.append(th);
}
-void ParagraphHandler::startPreformatted(const QXmlAttributes& attrib)
+void ParagraphHandler::startVerbatim(const QXmlAttributes& attrib)
{
addTextNode();
- PreformattedHandler *ph = new PreformattedHandler(this);
- ph->startPreformatted(attrib);
- m_children.append(ph);
+ VerbatimHandler *vh = new VerbatimHandler(this);
+ vh->startVerbatim(attrib,IDocVerbatim::Verbatim);
+ m_children.append(vh);
}
-void ParagraphHandler::startVerbatim(const QXmlAttributes& attrib)
+void ParagraphHandler::startHtmlOnly(const QXmlAttributes& attrib)
+{
+ addTextNode();
+ VerbatimHandler *vh = new VerbatimHandler(this);
+ vh->startVerbatim(attrib,IDocVerbatim::HtmlOnly);
+ m_children.append(vh);
+}
+
+void ParagraphHandler::startLatexOnly(const QXmlAttributes& attrib)
{
addTextNode();
VerbatimHandler *vh = new VerbatimHandler(this);
- vh->startVerbatim(attrib);
+ vh->startVerbatim(attrib,IDocVerbatim::LatexOnly);
m_children.append(vh);
}
@@ -1682,13 +1946,43 @@ void ParagraphHandler::startCopy(const QXmlAttributes& attrib)
m_children.append(sh);
}
+void ParagraphHandler::startAnchor(const QXmlAttributes& attrib)
+{
+ addTextNode();
+ AnchorHandler *ah = new AnchorHandler(this);
+ ah->startAnchor(attrib);
+ m_children.append(ah);
+}
+
+void ParagraphHandler::startCopyDoc(const QXmlAttributes& attrib)
+{
+ addTextNode();
+ CopyHandler *ch = new CopyHandler(this);
+ ch->startCopy(attrib);
+ m_children.append(ch);
+}
+
+void ParagraphHandler::startTocList(const QXmlAttributes& attrib)
+{
+ addTextNode();
+ TocListHandler *th = new TocListHandler(this);
+ th->startTocList(attrib);
+ m_children.append(th);
+}
+
void ParagraphHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
- m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
- debug(2,"addTextNode() text=\"%s\" markup=%x\n",
- m_curString.data(),m_markupHandler->markup());
+ m_children.append(
+ new TextNode(
+ m_curString,
+ m_markupHandler->markup(),
+ m_markupHandler->headingLevel()
+ )
+ );
+ debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
+ m_curString.data(),m_markupHandler->markup(),m_markupHandler->headingLevel());
m_curString="";
}
}
@@ -1738,9 +2032,14 @@ void DocSectionHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
- m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
- debug(2,"addTextNode() text=\"%s\" markup=%x\n",
- m_curString.data(),m_markupHandler->markup());
+ m_children.append(
+ new TextNode(m_curString,
+ m_markupHandler->markup(),
+ m_markupHandler->headingLevel()
+ )
+ );
+ debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
+ m_curString.data(),m_markupHandler->markup(),m_markupHandler->headingLevel());
m_curString="";
}
}
diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h
index 37c7df4..7a0bda4 100644
--- a/addon/doxmlparser/src/dochandler.h
+++ b/addon/doxmlparser/src/dochandler.h
@@ -26,6 +26,8 @@
#include "baseiterator.h"
class ParagraphHandler;
+class LinkedTextImpl;
+class LinkedTextHandler;
//-----------------------------------------------------------------------------
@@ -64,8 +66,11 @@ DEFINE_CLS_IMPL(DocTable);
DEFINE_CLS_IMPL(DocRow);
DEFINE_CLS_IMPL(DocEntry);
DEFINE_CLS_IMPL(DocSection);
-DEFINE_CLS_IMPL(DocPreformatted);
DEFINE_CLS_IMPL(DocVerbatim);
+DEFINE_CLS_IMPL(DocCopy);
+DEFINE_CLS_IMPL(DocTocList);
+DEFINE_CLS_IMPL(DocTocItem);
+DEFINE_CLS_IMPL(DocAnchor);
DEFINE_CLS_IMPL(DocSymbol);
DEFINE_CLS_IMPL(DocRoot);
@@ -78,18 +83,20 @@ DEFINE_CLS_IMPL(DocRoot);
class TextNode : public DocTextImpl
{
public:
- TextNode(const QString &t,int markup)
- : m_text(t), m_markup(markup) {}
+ TextNode(const QString &t,int markup,int level)
+ : m_text(t), m_markup(markup), m_headingLevel(level) {}
virtual ~TextNode() {}
// IDocText
virtual Kind kind() const { return DocImpl::Text; }
virtual const IString *text() const { return &m_text; }
virtual int markup() const { return m_markup; }
+ virtual int headingLevel() const { return m_headingLevel; }
private:
StringImpl m_text;
int m_markup;
+ int m_headingLevel;
};
//-----------------------------------------------------------------------------
@@ -100,18 +107,20 @@ class TextNode : public DocTextImpl
class MarkupModifierNode : public DocMarkupModifierImpl
{
public:
- MarkupModifierNode(int markup,bool enabled)
- : m_markup(markup), m_enabled(enabled) {}
+ MarkupModifierNode(int markup,bool enabled,int level=0)
+ : m_markup(markup), m_enabled(enabled), m_headingLevel(level) {}
virtual ~MarkupModifierNode() {}
// IDocMarkupModifier
virtual Kind kind() const { return DocImpl::MarkupModifier; }
virtual bool enabled() const { return m_enabled; }
virtual int markup() const { return m_markup; }
+ virtual int headingLevel() const { return m_headingLevel; }
private:
int m_markup;
bool m_enabled;
+ int m_headingLevel;
};
@@ -126,6 +135,7 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
MarkupHandler(QList<DocImpl> &children,QString &curString);
virtual ~MarkupHandler();
int markup() const { return m_curMarkup; }
+ int headingLevel() const { return m_headingLevel; }
virtual void startBold(const QXmlAttributes &attrib);
virtual void endBold();
@@ -141,6 +151,20 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
virtual void endSubscript();
virtual void startSuperscript(const QXmlAttributes &attrib);
virtual void endSuperscript();
+ virtual void startPreformatted(const QXmlAttributes &attrib);
+ virtual void endPreformatted();
+ virtual void startHeading1(const QXmlAttributes &attrib);
+ virtual void endHeading1();
+ virtual void startHeading2(const QXmlAttributes &attrib);
+ virtual void endHeading2();
+ virtual void startHeading3(const QXmlAttributes &attrib);
+ virtual void endHeading3();
+ virtual void startHeading4(const QXmlAttributes &attrib);
+ virtual void endHeading4();
+ virtual void startHeading5(const QXmlAttributes &attrib);
+ virtual void endHeading5();
+ virtual void startHeading6(const QXmlAttributes &attrib);
+ virtual void endHeading6();
private:
@@ -149,6 +173,7 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
QList<DocImpl> &m_children;
QString &m_curString;
int m_curMarkup;
+ int m_headingLevel;
};
//-----------------------------------------------------------------------------
@@ -190,8 +215,9 @@ class ParagraphHandler : public DocParaImpl,
virtual void startDotFile(const QXmlAttributes& attrib);
virtual void startIndexEntry(const QXmlAttributes& attrib);
virtual void startTable(const QXmlAttributes& attrib);
- virtual void startPreformatted(const QXmlAttributes& attrib);
virtual void startVerbatim(const QXmlAttributes& attrib);
+ virtual void startHtmlOnly(const QXmlAttributes& attrib);
+ virtual void startLatexOnly(const QXmlAttributes& attrib);
virtual void startUmlaut(const QXmlAttributes& attrib);
virtual void startAcute(const QXmlAttributes& attrib);
virtual void startGrave(const QXmlAttributes& attrib);
@@ -202,6 +228,9 @@ class ParagraphHandler : public DocParaImpl,
virtual void startRing(const QXmlAttributes& attrib);
virtual void startNbsp(const QXmlAttributes& attrib);
virtual void startCopy(const QXmlAttributes& attrib);
+ virtual void startAnchor(const QXmlAttributes& attrib);
+ virtual void startCopyDoc(const QXmlAttributes& attrib);
+ virtual void startTocList(const QXmlAttributes& attrib);
ParagraphHandler(IBaseHandler *parent);
virtual ~ParagraphHandler();
@@ -287,6 +316,61 @@ class OrderedListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,Doc
BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
};
+//-----------------------------------------------------------------------------
+
+/*! \brief Node representing table of contents list.
+ *
+ */
+class TocListHandler : public DocTocListImpl, public BaseHandler<TocListHandler>
+{
+ friend class TocListIterator;
+ public:
+ TocListHandler(IBaseHandler *parent);
+ virtual ~TocListHandler();
+ virtual void startTocList(const QXmlAttributes& attrib);
+ virtual void endTocList();
+ virtual void startTocItem(const QXmlAttributes& attrib);
+
+ // IDocTocList
+ virtual Kind kind() const { return DocImpl::TocList; }
+ virtual IDocIterator *elements() const;
+
+ private:
+ IBaseHandler *m_parent;
+ QList<DocImpl> m_children;
+};
+
+class TocListIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
+{
+ public:
+ TocListIterator(const TocListHandler &handler) :
+ BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
+};
+
+//-----------------------------------------------------------------------------
+
+/*! \brief Node representing a table of contents item.
+ *
+ */
+class TocItemHandler : public DocTocItemImpl, public BaseHandler<TocItemHandler>
+{
+ friend class TocItemIterator;
+ public:
+ TocItemHandler(IBaseHandler *parent);
+ virtual ~TocItemHandler();
+ virtual void startTocItem(const QXmlAttributes& attrib);
+ virtual void endTocItem();
+
+ // IDocItem
+ virtual Kind kind() const { return DocImpl::TocItem; }
+ virtual const IString *id() const { return &m_id; }
+ virtual const IString *title() const { return &m_title; }
+
+ private:
+ IBaseHandler *m_parent;
+ StringImpl m_id;
+ StringImpl m_title;
+};
//-----------------------------------------------------------------------------
@@ -619,13 +703,14 @@ class VariableListEntryHandler : public DocVariableListEntryImpl,
// IDocVariableListEntry
virtual Kind kind() const { return DocImpl::VariableListEntry; }
- virtual const IString *term() const { return &m_term; }
+ virtual ILinkedTextIterator *term() const;
virtual IDocPara *description() const { return m_description; }
private:
- IBaseHandler *m_parent;
- StringImpl m_term;
- ParagraphHandler *m_description;
+ IBaseHandler* m_parent;
+ QList<LinkedTextImpl> m_term;
+ ParagraphHandler* m_description;
+ LinkedTextHandler* m_linkedTextHandler;
};
//-----------------------------------------------------------------------------
@@ -832,6 +917,29 @@ class ImageHandler : public DocImageImpl, public BaseHandler<ImageHandler>
StringImpl m_caption;
};
+
+//-----------------------------------------------------------------------------
+/*! \brief Node representing an anchor.
+ *
+ */
+// children: -
+class AnchorHandler : public DocAnchorImpl, public BaseHandler<AnchorHandler>
+{
+ public:
+ AnchorHandler(IBaseHandler *parent);
+ virtual ~AnchorHandler();
+ void startAnchor(const QXmlAttributes& attrib);
+ void endAnchor();
+
+ // IDocAnchor
+ virtual Kind kind() const { return DocImpl::Anchor; }
+ virtual const IString *id() const { return &m_id; }
+
+ private:
+ IBaseHandler *m_parent;
+ StringImpl m_id;
+};
+
//-----------------------------------------------------------------------------
/*! \brief Node representing a dot file.
@@ -990,32 +1098,32 @@ class TableIterator : public BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImp
//-----------------------------------------------------------------------------
-/*! \brief Node representing an preformatted section
+/*! \brief Node representing a copied piece of documentation.
+ *
*/
-class PreformattedHandler : public DocPreformattedImpl,
- public BaseHandler<PreformattedHandler>
+class CopyHandler : public DocCopyImpl, public BaseHandler<CopyHandler>
{
- friend class PreformattedIterator;
+ friend class CopyIterator;
public:
- PreformattedHandler(IBaseHandler *parent);
- virtual ~PreformattedHandler();
- void startPreformatted(const QXmlAttributes& attrib);
- void endPreformatted();
+ CopyHandler(IBaseHandler *parent);
+ virtual ~CopyHandler();
+ virtual void startCopy(const QXmlAttributes& attrib);
+ virtual void endCopy();
+ virtual void startParagraph(const QXmlAttributes& attrib);
- // IDocPreformatted
+ // IDocCopy
+ virtual Kind kind() const { return DocImpl::Copy; }
virtual IDocIterator *contents() const;
- virtual Kind kind() const { return DocImpl::Preformatted; }
private:
IBaseHandler *m_parent;
QList<DocImpl> m_children;
};
-class PreformattedIterator :
- public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
+class CopyIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
{
public:
- PreformattedIterator(const PreformattedHandler &handler) :
+ CopyIterator(const CopyHandler &handler) :
BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
};
@@ -1026,20 +1134,21 @@ class PreformattedIterator :
class VerbatimHandler : public DocVerbatimImpl,
public BaseHandler<VerbatimHandler>
{
- friend class VerbatimIterator;
public:
VerbatimHandler(IBaseHandler *parent);
virtual ~VerbatimHandler();
- void startVerbatim(const QXmlAttributes& attrib);
+ void startVerbatim(const QXmlAttributes& attrib,Types type);
void endVerbatim();
// IDocVerbatim
virtual Kind kind() const { return DocImpl::Verbatim; }
virtual const IString *text() const { return &m_text; }
+ virtual Types type() const { return m_type; }
private:
- IBaseHandler *m_parent;
- StringImpl m_text;
+ IBaseHandler *m_parent;
+ StringImpl m_text;
+ Types m_type;
};
diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h
index 7ab2c79..6432ee3 100644
--- a/addon/doxmlparser/src/doxmlintf.h
+++ b/addon/doxmlparser/src/doxmlintf.h
@@ -159,10 +159,13 @@ class IDoc
Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection
- Preformatted, // 30 -> IDocPreformatted
- Verbatim, // 31 -> IDocVerbatim
- Symbol, // 32 -> IDocSymbol
- Root // 33 -> IDocRoot
+ Verbatim, // 30 -> IDocVerbatim
+ Copy, // 31 -> IDocCopy
+ TocList, // 32 -> IDocTocList
+ TocItem, // 33 -> IDocTocItem
+ Anchor, // 34 -> IDocAnchor
+ Symbol, // 35 -> IDocSymbol
+ Root // 36 -> IDocRoot
};
virtual Kind kind() const = 0;
};
@@ -172,14 +175,16 @@ class IDocMarkup : public IDoc
public:
enum Markup
{
- Normal = 0x00,
- Bold = 0x01,
- Emphasis = 0x02,
- ComputerOutput = 0x04,
- Subscript = 0x08,
- Superscript = 0x10,
- SmallFont = 0x20,
- Center = 0x40
+ Normal = 0x000,
+ Bold = 0x001,
+ Emphasis = 0x002,
+ ComputerOutput = 0x004,
+ Subscript = 0x008,
+ Superscript = 0x010,
+ SmallFont = 0x020,
+ Center = 0x040,
+ Preformatted = 0x080,
+ Heading = 0x100
};
};
@@ -194,6 +199,7 @@ class IDocText : public IDocMarkup
public:
virtual const IString * text() const = 0;
virtual int markup() const = 0;
+ virtual int headingLevel() const = 0;
};
class IDocMarkupModifier : public IDoc
@@ -201,6 +207,7 @@ class IDocMarkupModifier : public IDoc
public:
virtual bool enabled() const = 0;
virtual int markup() const = 0;
+ virtual int headingLevel() const = 0;
};
class IDocItemizedList : public IDoc
@@ -278,7 +285,7 @@ class IDocVariableList : public IDoc
class IDocVariableListEntry : public IDoc
{
public:
- virtual const IString * term() const = 0;
+ virtual ILinkedTextIterator * term() const = 0;
virtual IDocPara *description() const = 0;
};
@@ -393,7 +400,20 @@ class IDocSection : public IDoc
virtual IDocIterator *title() const = 0;
};
-class IDocPreformatted : public IDoc
+class IDocTocList : public IDoc
+{
+ public:
+ virtual IDocIterator *elements() const = 0;
+};
+
+class IDocTocItem : public IDoc
+{
+ public:
+ virtual const IString *id() const = 0;
+ virtual const IString *title() const = 0;
+};
+
+class IDocCopy : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
@@ -402,7 +422,15 @@ class IDocPreformatted : public IDoc
class IDocVerbatim : public IDoc
{
public:
+ enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim };
virtual const IString *text() const = 0;
+ virtual Types type() const = 0;
+};
+
+class IDocAnchor : public IDoc
+{
+ public:
+ virtual const IString *id() const = 0;
};
class IDocSymbol : public IDoc
diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp
index 16d12b3..9de1e47 100644
--- a/addon/doxmlparser/src/mainhandler.cpp
+++ b/addon/doxmlparser/src/mainhandler.cpp
@@ -18,6 +18,8 @@
#include "compoundhandler.h"
#include "sectionhandler.h"
#include "graphhandler.h"
+#include "dochandler.h"
+#include "memberhandler.h"
#include "debug.h"
diff --git a/addon/doxmlparser/src/mainhandler.h b/addon/doxmlparser/src/mainhandler.h
index 8385b57..4a10b4d 100644
--- a/addon/doxmlparser/src/mainhandler.h
+++ b/addon/doxmlparser/src/mainhandler.h
@@ -17,11 +17,11 @@
#define _MAINHANDLER_H
#include <qlist.h>
-#include "basehandler.h"
-#include "compoundhandler.h"
+
#include <doxmlintf.h>
-#include "memberhandler.h"
+#include "basehandler.h"
+class CompoundHandler;
struct CompoundEntry;
struct IndexEntry
diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp
index ad35a91..d19fb82 100644
--- a/addon/doxmlparser/src/memberhandler.cpp
+++ b/addon/doxmlparser/src/memberhandler.cpp
@@ -18,6 +18,8 @@
#include "dochandler.h"
#include "mainhandler.h"
#include "linkedtexthandler.h"
+#include "paramhandler.h"
+#include "compoundhandler.h"
#include "debug.h"
//------------------------------------------------------------------------------
@@ -451,4 +453,60 @@ IMemberIterator *MemberHandler::enumValues() const
return new MemberIterator(m_enumValues);
}
+ILinkedTextIterator *MemberHandler::type() const
+{
+ return new LinkedTextIterator(m_type);
+}
+
+const IString *MemberHandler::typeString() const
+{
+ MemberHandler *that = (MemberHandler *)this;
+ that->m_typeString = LinkedTextHandler::toString(m_type);
+ return &m_typeString;
+}
+
+IParamIterator *MemberHandler::parameters() const
+{
+ return new ParamIterator(m_params);
+}
+
+IParamIterator *MemberHandler::templateParameters() const
+{
+ return m_hasTemplateParamList ? new ParamIterator(m_templateParams) : 0;
+}
+
+IMemberReferenceIterator *MemberHandler::references() const
+{
+ return new MemberReferenceIterator(m_references);
+}
+
+IMemberReferenceIterator *MemberHandler::referencedBy() const
+{
+ return new MemberReferenceIterator(m_referencedBy);
+}
+
+ILinkedTextIterator *MemberHandler::initializer() const
+{
+ return new LinkedTextIterator(m_initializer);
+}
+
+ILinkedTextIterator *MemberHandler::exceptions() const
+{
+ return new LinkedTextIterator(m_exception);
+}
+
+IMemberReferenceIterator *MemberHandler::reimplementedBy() const
+{
+ return new MemberReferenceIterator(m_reimplementedBy);
+}
+
+IDocRoot *MemberHandler::briefDescription() const
+{
+ return m_brief;
+}
+
+IDocRoot *MemberHandler::detailedDescription() const
+{
+ return m_detailed;
+}
diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h
index 6280013..5fc43a4 100644
--- a/addon/doxmlparser/src/memberhandler.h
+++ b/addon/doxmlparser/src/memberhandler.h
@@ -23,14 +23,15 @@
#include "basehandler.h"
#include "baseiterator.h"
-#include "paramhandler.h"
-#include "linkedtexthandler.h"
-#include "dochandler.h"
+#include "stringimpl.h"
class MainHandler;
class CompoundHandler;
class SectionHandler;
class ParamHandler;
+class LinkedTextImpl;
+class LinkedTextHandler;
+class DocHandler;
struct MemberReference : public IMemberReference
{
@@ -159,25 +160,14 @@ class MemberHandler : public IDefine,
{ return m_isConst; }
virtual bool isVolatile() const
{ return m_isVolatile; }
- virtual ILinkedTextIterator *type() const
- { return new LinkedTextIterator(m_type); }
- virtual const IString *typeString() const
- { MemberHandler *that = (MemberHandler *)this;
- that->m_typeString = LinkedTextHandler::toString(m_type);
- return &m_typeString;
- }
- virtual IParamIterator *parameters() const
- { return new ParamIterator(m_params); }
- virtual IParamIterator *templateParameters() const
- { return m_hasTemplateParamList ? new ParamIterator(m_templateParams) : 0; }
- virtual IMemberReferenceIterator *references() const
- { return new MemberReferenceIterator(m_references); }
- virtual IMemberReferenceIterator *referencedBy() const
- { return new MemberReferenceIterator(m_referencedBy); }
- virtual ILinkedTextIterator *initializer() const
- { return new LinkedTextIterator(m_initializer); }
- virtual ILinkedTextIterator *exceptions() const
- { return new LinkedTextIterator(m_exception); }
+ virtual ILinkedTextIterator *type() const;
+ virtual const IString *typeString() const;
+ virtual IParamIterator *parameters() const;
+ virtual IParamIterator *templateParameters() const;
+ virtual IMemberReferenceIterator *references() const;
+ virtual IMemberReferenceIterator *referencedBy() const;
+ virtual ILinkedTextIterator *initializer() const;
+ virtual ILinkedTextIterator *exceptions() const;
virtual int bodyStart() const
{ return m_bodyStart; }
virtual int bodyEnd() const
@@ -188,12 +178,9 @@ class MemberHandler : public IDefine,
{ return m_defLine; }
virtual IMemberReference *reimplements() const
{ return m_reimplements; }
- virtual IMemberReferenceIterator *reimplementedBy() const
- { return new MemberReferenceIterator(m_reimplementedBy); }
- virtual IDocRoot *briefDescription() const
- { return m_brief; }
- virtual IDocRoot *detailedDescription() const
- { return m_detailed; }
+ virtual IMemberReferenceIterator *reimplementedBy() const;
+ virtual IDocRoot *briefDescription() const;
+ virtual IDocRoot *detailedDescription() const;
// IEnum
virtual IMemberIterator *enumValues() const;
diff --git a/addon/doxmlparser/src/paramhandler.cpp b/addon/doxmlparser/src/paramhandler.cpp
index 0278e86..7fa2be4 100644
--- a/addon/doxmlparser/src/paramhandler.cpp
+++ b/addon/doxmlparser/src/paramhandler.cpp
@@ -15,6 +15,7 @@
#include "paramhandler.h"
#include "memberhandler.h"
+#include "linkedtexthandler.h"
#include "debug.h"
TemplateParamListHandler::TemplateParamListHandler(IBaseHandler *parent) : m_parent(parent)
@@ -127,5 +128,14 @@ void ParamHandler::startDefVal(const QXmlAttributes& /*attrib*/)
debug(2,"member defVal\n");
}
+ILinkedTextIterator *ParamHandler::type() const
+{
+ return new LinkedTextIterator(m_type);
+}
+
+ILinkedTextIterator *ParamHandler::defaultValue() const
+{
+ return new LinkedTextIterator(m_defVal);
+}
diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h
index 12cda44..074e2ac 100644
--- a/addon/doxmlparser/src/paramhandler.h
+++ b/addon/doxmlparser/src/paramhandler.h
@@ -24,7 +24,9 @@
#include "stringimpl.h"
#include "basehandler.h"
#include "baseiterator.h"
-#include "linkedtexthandler.h"
+
+class LinkedTextImpl;
+class LinkedTextHandler;
class ParamHandler : public IParam, public BaseHandler<ParamHandler>
@@ -43,14 +45,12 @@ class ParamHandler : public IParam, public BaseHandler<ParamHandler>
virtual ~ParamHandler();
// IParam
- virtual ILinkedTextIterator *type() const
- { return new LinkedTextIterator(m_type); }
+ virtual ILinkedTextIterator *type() const;
virtual const IString * declarationName() const { return &m_declName; }
virtual const IString * definitionName() const { return &m_defName; }
virtual const IString * attrib() const { return &m_attrib; }
virtual const IString * arraySpecifier() const { return &m_array; }
- virtual ILinkedTextIterator *defaultValue() const
- { return new LinkedTextIterator(m_defVal); }
+ virtual ILinkedTextIterator *defaultValue() const;
private:
IBaseHandler *m_parent;
diff --git a/addon/doxmlparser/src/sectionhandler.cpp b/addon/doxmlparser/src/sectionhandler.cpp
index a1d9c44..dee05f0 100644
--- a/addon/doxmlparser/src/sectionhandler.cpp
+++ b/addon/doxmlparser/src/sectionhandler.cpp
@@ -16,6 +16,7 @@
#include "mainhandler.h"
#include "compoundhandler.h"
#include "sectionhandler.h"
+#include "memberhandler.h"
#include "debug.h"
class SectionTypeMap
@@ -126,4 +127,8 @@ void SectionHandler::initialize(CompoundHandler *ch)
}
}
+IMemberIterator *SectionHandler::members() const
+{
+ return new MemberIterator(m_members);
+}
diff --git a/addon/doxmlparser/src/sectionhandler.h b/addon/doxmlparser/src/sectionhandler.h
index 9ecc85e..36705ea 100644
--- a/addon/doxmlparser/src/sectionhandler.h
+++ b/addon/doxmlparser/src/sectionhandler.h
@@ -22,7 +22,6 @@
#include <doxmlintf.h>
#include "basehandler.h"
-#include "memberhandler.h"
class MainHandler;
@@ -50,8 +49,7 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler>
{ return &m_kindString; }
virtual SectionKind kind() const
{ return m_kind; }
- virtual IMemberIterator *members() const
- { return new MemberIterator(m_members); }
+ virtual IMemberIterator *members() const;
virtual bool isStatic() const
{
return m_kind==PubStatFuncs || m_kind==PubStatAttribs ||
diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp
index 067dfc9..3addfa9 100644
--- a/addon/doxmlparser/test/main.cpp
+++ b/addon/doxmlparser/test/main.cpp
@@ -73,14 +73,16 @@ void DumpDoc(IDoc *doc,int level)
{
IDocText *txt = dynamic_cast<IDocText*>(doc);
ASSERT(txt!=0);
- InPrint(("<text value=`%s' markup=%d/>\n",txt->text()->latin1(),txt->markup()));
+ InPrint(("<text value=`%s' markup=%d headingLevel=%d/>\n",
+ txt->text()->latin1(),txt->markup(),txt->headingLevel()));
}
break;
case IDoc::MarkupModifier:
{
IDocMarkupModifier *md = dynamic_cast<IDocMarkupModifier*>(doc);
ASSERT(md!=0);
- InPrint(("<markup modifier enabled=%d markup=%d/>\n",md->enabled(),md->markup()));
+ InPrint(("<markup modifier enabled=%d markup=%d headingLevel=%d/>\n",
+ md->enabled(),md->markup(),md->headingLevel()));
}
break;
case IDoc::ItemizedList:
@@ -203,7 +205,10 @@ void DumpDoc(IDoc *doc,int level)
{
IDocVariableListEntry *vle = dynamic_cast<IDocVariableListEntry*>(doc);
ASSERT(vle!=0);
- InPrint(("<variablelistentry term=%s>\n",vle->term()->latin1()));
+ ILinkedTextIterator *lti = vle->term();
+ QString term = linkedTextToString(lti);
+ lti->release();
+ InPrint(("<variablelistentry term=%s>\n",term.latin1()));
DumpDoc(vle->description(),level+1);
InPrint(("<variablelistentry/>\n"));
}
@@ -255,7 +260,7 @@ void DumpDoc(IDoc *doc,int level)
DumpDoc(cl,level+1);
}
cli->release();
- InPrint(("<programlisting/>\n"));
+ InPrint(("</programlisting>\n"));
}
break;
case IDoc::CodeLine:
@@ -270,7 +275,7 @@ void DumpDoc(IDoc *doc,int level)
DumpDoc(ce,level+1);
}
cei->release();
- InPrint(("<codeline/>\n"));
+ InPrint(("</codeline>\n"));
}
break;
case IDoc::Highlight:
@@ -373,31 +378,70 @@ void DumpDoc(IDoc *doc,int level)
{
DumpDoc(pdoc,level+1);
}
- InPrint(("<section/>\n"));
+ InPrint(("</section>\n"));
+ }
+ break;
+ case IDoc::Copy:
+ {
+ IDocCopy *cpy = dynamic_cast<IDocCopy*>(doc);
+ ASSERT(cpy!=0);
+ InPrint(("<copydoc>\n"));
+ IDocIterator *di = cpy->contents();
+ IDoc *pdoc;
+ for (di->toFirst();(pdoc=di->current());di->toNext())
+ {
+ DumpDoc(pdoc,level+1);
+ }
+ di->release();
+ InPrint(("<copydoc/>\n"));
}
break;
- case IDoc::Preformatted:
+ case IDoc::TocItem:
{
- InPrint(("<preformatted>\n"));
- IDocPreformatted *pf = dynamic_cast<IDocPreformatted*>(doc);
- ASSERT(pf!=0);
- IDocIterator *di = pf->contents();
+ IDocTocItem *ti = dynamic_cast<IDocTocItem*>(doc);
+ ASSERT(ti!=0);
+ InPrint(("<tocitem id=\"%s\" title=\"%s\"/>\n",
+ ti->id()->latin1(),ti->title()->latin1()));
+ }
+ break;
+ case IDoc::TocList:
+ {
+ IDocTocList *tl = dynamic_cast<IDocTocList*>(doc);
+ ASSERT(tl!=0);
+ InPrint(("<toclist>\n"));
+ IDocIterator *di = tl->elements();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc,level+1);
}
di->release();
- InPrint(("<preformatted/>\n"));
+ InPrint(("<toclist/>\n"));
}
break;
case IDoc::Verbatim:
{
- InPrint(("<verbatim>\n"));
IDocVerbatim *vt = dynamic_cast<IDocVerbatim*>(doc);
ASSERT(vt!=0);
+ const char *s=0;
+ switch (vt->type())
+ {
+ case IDocVerbatim::Verbatim: s="verbatim"; break;
+ case IDocVerbatim::HtmlOnly: s="htmlonly"; break;
+ case IDocVerbatim::LatexOnly: s="latexonly"; break;
+ default:
+ printf("Invalid verbatim type!\n");
+ }
+ InPrint(("<verbatim %s>\n",s));
InPrint(("%s",vt->text()->latin1()));
- InPrint(("<verbatim/>\n"));
+ InPrint(("</verbatim>\n"));
+ }
+ break;
+ case IDoc::Anchor:
+ {
+ IDocAnchor *anc = dynamic_cast<IDocAnchor*>(doc);
+ ASSERT(anc!=0);
+ InPrint(("<anchor id='%s'/>\n",anc->id()->latin1()));
}
break;
case IDoc::Symbol:
@@ -420,7 +464,7 @@ void DumpDoc(IDoc *doc,int level)
DumpDoc(pdoc,level+1);
}
di->release();
- InPrint(("<root/>\n"));
+ InPrint(("</root>\n"));
}
break;
diff --git a/doc/commands.doc b/doc/commands.doc
index 42d4c8d..c2bb972 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -319,7 +319,7 @@ doxygen. Unrecognized commands are treated as normal text.
If your comment block \e is in front of the function
declaration or definition this command can (and to avoid redundancy
- should) be ommitted.
+ should) be omitted.
A full function declaration including arguments should be specified after the
\\fn command on a \e single line, since the argument ends at the end
@@ -745,7 +745,7 @@ See section \ref memgroup for an example.
\par Example:
\verbatim
- /*! Uncoditionally shown documentation.
+ /*! Unconditionally shown documentation.
* \if Cond1
* Only included if Cond1 is set.
* \endif
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
index ec9ada9..69cd6af 100644
--- a/packages/rpm/doxygen.spec
+++ b/packages/rpm/doxygen.spec
@@ -1,6 +1,6 @@
Summary: A documentation system for C/C++.
Name: doxygen
-Version: 1.2.18_20021030
+Version: 1.2.18_20021106
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
diff --git a/src/code.l b/src/code.l
index 79fc82a..4c08b2c 100644
--- a/src/code.l
+++ b/src/code.l
@@ -521,7 +521,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
{
QCString scope = name.left(scopeEnd);
QCString locName = name.right(name.length()-scopeEnd-2);
- //printf("name=%s scope=%s\n",locName.data(),scope.data());
+ //printf("explicit scope: name=%s scope=%s\n",locName.data(),scope.data());
ClassDef *mcd = getClass(scope); // TODO: check namespace as well
if (mcd && !locName.isEmpty())
{
@@ -539,20 +539,21 @@ static MemberDef *setCallContextForVar(const QCString &name)
ClassDef *mcd = g_theVarContext.findVariable(name);
if (mcd) // local variable
{
- //printf("local var `%s'\n",name.data());
+ //printf("local var `%s' mcd=%s\n",name.data(),mcd->name().data());
g_theCallContext.setClass(mcd);
- return 0;
}
-
- // look for a class member
- mcd = getClass(g_classScope);
- if (mcd)
+ else
{
- MemberDef *md=mcd->getMemberByName(name);
- if (md)
+ // look for a class member
+ mcd = getClass(g_classScope);
+ if (mcd)
{
- g_theCallContext.setClass(stripClassName(md->typeString()));
- return md;
+ MemberDef *md=mcd->getMemberByName(name);
+ if (md)
+ {
+ g_theCallContext.setClass(stripClassName(md->typeString()));
+ return md;
+ }
}
}
@@ -613,6 +614,7 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int *clNameLen=0)
{
int i=0;
+ //printf("generateClassOrGlobalLink(clName=%s)\n",clName);
if (*clName=='~') // correct for matching negated values i.s.o. destructors.
{
g_code->codify("~");
@@ -634,6 +636,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
}
if (cd && cd->isLinkable()) // is it a linkable class
{
+ //printf("is linkable class %s\n",clName);
if (g_exampleBlock)
{
QCString anchor;
@@ -654,10 +657,12 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
if (cd==0) // not a class, see if it is a global enum/variable/typedef.
{
MemberDef *md = setCallContextForVar(clName);
+ //printf("is a global md=%p\n",md);
if (md)
{
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
+ //printf("definition %s\n",d?d->name().data():"<none>");
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable() && md->isLinkable())
{
diff --git a/src/config.l b/src/config.l
index ab77a02..a2ace80 100644
--- a/src/config.l
+++ b/src/config.l
@@ -2206,10 +2206,28 @@ void Config::create()
"PERLMOD_LATEX",
"If the PERLMOD_LATEX tag is set to YES Doxygen will generate \n"
"the necessary Makefile rules, Perl scripts and LaTeX code to be able \n"
- "to generate PDF and DVI output from the Perl module output.\n",
+ "to generate PDF and DVI output from the Perl module output. \n",
FALSE
);
cb->addDependency("GENERATE_PERLMOD");
+ cb = addBool(
+ "PERLMOD_PRETTY",
+ "If the PERLMOD_PRETTY tag is set to YES the Perl module output will be \n"
+ "nicely formatted so it can be parsed by a human reader. This is useful \n"
+ "if you want to understand what is going on. On the other hand, if this \n"
+ "tag is set to NO the size of the Perl module output will be much smaller \n"
+ "and Perl will parse it just the same. \n",
+ TRUE
+ );
+ cb->addDependency("GENERATE_PERLMOD");
+ cs = addString(
+ "PERLMOD_MAKEVAR_PREFIX",
+ "The names of the make variables in the generated doxyrules.make file \n"
+ "are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. \n"
+ "This is useful so different doxyrules.make files included by the same \n"
+ "Makefile don't overwrite each other's variables."
+ );
+ cs->addDependency("GENERATE_PERLMOD");
//-----------------------------------------------------------------------------------------------
addInfo( "Preprocessor","Configuration options related to the preprocessor ");
diff --git a/src/definition.cpp b/src/definition.cpp
index 6fa80dd..f3b556a 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -259,9 +259,9 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
if (Config_getBool("SOURCE_BROWSER") && m_startBodyLine!=-1 && m_bodyDef)
{
- //ol.disable(OutputGenerator::RTF);
+ ol.disable(OutputGenerator::RTF);
ol.newParagraph();
- //ol.enableAll();
+ ol.enableAll();
QCString refText = theTranslator->trDefinedAtLineInSourceFile();
int lineMarkerPos = refText.find("@0");
diff --git a/src/docparser.cpp b/src/docparser.cpp
index a5f07f5..4b15a2b 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -327,7 +327,7 @@ static bool insidePRE(DocNode *n)
{
while (n)
{
- if (n->kind()==DocNode::Kind_HtmlPre) return TRUE;
+ if (n->isPreformatted()) return TRUE;
n=n->parent();
}
return FALSE;
@@ -539,15 +539,17 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
return tok==TK_NEWPARA ? TK_NEWPARA : RetVal_OK;
}
-static void handleStyleEnter(DocNode *parent,QList<DocNode> &children,DocStyleChange::Style s)
+static void handleStyleEnter(DocNode *parent,QList<DocNode> &children,
+ DocStyleChange::Style s,const HtmlAttribList *attribs)
{
DBG(("HandleStyleEnter\n"));
- DocStyleChange *sc= new DocStyleChange(parent,g_nodeStack.count(),s,TRUE);
+ DocStyleChange *sc= new DocStyleChange(parent,g_nodeStack.count(),s,TRUE,attribs);
children.append(sc);
g_styleStack.push(sc);
}
-static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,DocStyleChange::Style s,const char *tagName)
+static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,
+ DocStyleChange::Style s,const char *tagName)
{
DBG(("HandleStyleLeave\n"));
if (g_styleStack.isEmpty() || // no style change
@@ -576,13 +578,14 @@ static void handlePendingStyleCommands(DocNode *parent,QList<DocNode> &children)
const char *cmd="";
switch (sc->style())
{
- case DocStyleChange::Bold: cmd = "b"; break;
- case DocStyleChange::Italic: cmd = "em"; break;
- case DocStyleChange::Code: cmd = "code"; break;
- case DocStyleChange::Center: cmd = "center"; break;
- case DocStyleChange::Small: cmd = "small"; break;
- case DocStyleChange::Subscript: cmd = "subscript"; break;
- case DocStyleChange::Superscript: cmd = "superscript"; break;
+ case DocStyleChange::Bold: cmd = "b"; break;
+ case DocStyleChange::Italic: cmd = "em"; break;
+ case DocStyleChange::Code: cmd = "code"; break;
+ case DocStyleChange::Center: cmd = "center"; break;
+ case DocStyleChange::Small: cmd = "small"; break;
+ case DocStyleChange::Subscript: cmd = "subscript"; break;
+ case DocStyleChange::Superscript: cmd = "superscript"; break;
+ case DocStyleChange::Preformatted: cmd = "preformatted"; break;
}
warn(g_fileName,doctokenizerYYlineno,"Error: end of paragraph without end of style "
"command </%s>",cmd);
@@ -597,12 +600,14 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
{
Definition *compound=0;
MemberDef *member=0;
+ QString name = g_token->name;
+ if (name.at(0)=='#') name=name.right(name.length()-1);
if (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member))
{
if (member) // member link
{
children.append(new
- DocLinkedWord(parent,g_token->name,
+ DocLinkedWord(parent,name,
compound->getReference(),
compound->getOutputFileBase(),
member->anchor()
@@ -612,7 +617,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
else // compound link
{
children.append(new
- DocLinkedWord(parent,g_token->name,
+ DocLinkedWord(parent,name,
compound->getReference(),
compound->getOutputFileBase(),
""
@@ -791,17 +796,29 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case HTML_BOLD:
if (!g_token->endTag)
{
- handleStyleEnter(parent,children,DocStyleChange::Bold);
+ handleStyleEnter(parent,children,DocStyleChange::Bold,&g_token->attribs);
}
else
{
handleStyleLeave(parent,children,DocStyleChange::Bold,tokenName);
}
break;
+ case HTML_PRE:
+ if (!g_token->endTag)
+ {
+ handleStyleEnter(parent,children,DocStyleChange::Preformatted,&g_token->attribs);
+ parent->setInsidePreformatted(TRUE);
+ }
+ else
+ {
+ handleStyleLeave(parent,children,DocStyleChange::Preformatted,tokenName);
+ parent->setInsidePreformatted(FALSE);
+ }
+ break;
case HTML_CODE:
if (!g_token->endTag)
{
- handleStyleEnter(parent,children,DocStyleChange::Code);
+ handleStyleEnter(parent,children,DocStyleChange::Code,&g_token->attribs);
}
else
{
@@ -811,7 +828,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case HTML_EMPHASIS:
if (!g_token->endTag)
{
- handleStyleEnter(parent,children,DocStyleChange::Italic);
+ handleStyleEnter(parent,children,DocStyleChange::Italic,&g_token->attribs);
}
else
{
@@ -821,7 +838,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case HTML_SUB:
if (!g_token->endTag)
{
- handleStyleEnter(parent,children,DocStyleChange::Subscript);
+ handleStyleEnter(parent,children,DocStyleChange::Subscript,&g_token->attribs);
}
else
{
@@ -831,7 +848,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case HTML_SUP:
if (!g_token->endTag)
{
- handleStyleEnter(parent,children,DocStyleChange::Superscript);
+ handleStyleEnter(parent,children,DocStyleChange::Superscript,&g_token->attribs);
}
else
{
@@ -841,7 +858,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case HTML_CENTER:
if (!g_token->endTag)
{
- handleStyleEnter(parent,children,DocStyleChange::Center);
+ handleStyleEnter(parent,children,DocStyleChange::Center,&g_token->attribs);
}
else
{
@@ -851,7 +868,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
case HTML_SMALL:
if (!g_token->endTag)
{
- handleStyleEnter(parent,children,DocStyleChange::Small);
+ handleStyleEnter(parent,children,DocStyleChange::Small,&g_token->attribs);
}
else
{
@@ -1614,7 +1631,7 @@ QString DocLink::parse(bool isJavaLink)
}
goto endlink;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\ref",
+ warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\link",
g_token->name.data());
break;
}
@@ -1628,7 +1645,6 @@ QString DocLink::parse(bool isJavaLink)
if (isJavaLink) // special case to detect closing }
{
QString w = g_token->name;
- uint l=w.length();
int p;
if (w=="}")
{
@@ -1636,6 +1652,7 @@ QString DocLink::parse(bool isJavaLink)
}
else if ((p=w.find('}'))!=-1)
{
+ uint l=w.length();
m_children.append(new DocWord(this,w.left(p)));
if ((uint)p<l-1) // something left after the } (for instance a .)
{
@@ -2494,6 +2511,7 @@ enddesclist:
//---------------------------------------------------------------------------
+#if 0
int DocHtmlPre::parse()
{
int rv;
@@ -2515,6 +2533,7 @@ int DocHtmlPre::parse()
ASSERT(n==this);
return rv==RetVal_EndPre ? RetVal_OK : rv;
}
+#endif
//---------------------------------------------------------------------------
@@ -3524,33 +3543,37 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval=RetVal_ListItem;
}
break;
- case HTML_PRE:
- {
- DocHtmlPre *pre = new DocHtmlPre(this,tagHtmlAttribs);
- m_children.append(pre);
- retval=pre->parse();
- }
- break;
+ //case HTML_PRE:
+ // {
+ // DocHtmlPre *pre = new DocHtmlPre(this,tagHtmlAttribs);
+ // m_children.append(pre);
+ // retval=pre->parse();
+ // }
+ // break;
case HTML_BOLD:
- handleStyleEnter(this,m_children,DocStyleChange::Bold);
+ handleStyleEnter(this,m_children,DocStyleChange::Bold,&g_token->attribs);
break;
case HTML_CODE:
- handleStyleEnter(this,m_children,DocStyleChange::Code);
+ handleStyleEnter(this,m_children,DocStyleChange::Code,&g_token->attribs);
break;
case HTML_EMPHASIS:
- handleStyleEnter(this,m_children,DocStyleChange::Italic);
+ handleStyleEnter(this,m_children,DocStyleChange::Italic,&g_token->attribs);
break;
case HTML_SUB:
- handleStyleEnter(this,m_children,DocStyleChange::Subscript);
+ handleStyleEnter(this,m_children,DocStyleChange::Subscript,&g_token->attribs);
break;
case HTML_SUP:
- handleStyleEnter(this,m_children,DocStyleChange::Superscript);
+ handleStyleEnter(this,m_children,DocStyleChange::Superscript,&g_token->attribs);
break;
case HTML_CENTER:
- handleStyleEnter(this,m_children,DocStyleChange::Center);
+ handleStyleEnter(this,m_children,DocStyleChange::Center,&g_token->attribs);
break;
case HTML_SMALL:
- handleStyleEnter(this,m_children,DocStyleChange::Small);
+ handleStyleEnter(this,m_children,DocStyleChange::Small,&g_token->attribs);
+ break;
+ case HTML_PRE:
+ handleStyleEnter(this,m_children,DocStyleChange::Preformatted,&g_token->attribs);
+ setInsidePreformatted(TRUE);
break;
case HTML_P:
retval=TK_NEWPARA;
@@ -3737,16 +3760,16 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
// ignore </li> tags
}
break;
- case HTML_PRE:
- if (!insidePRE(this))
- {
- warn(g_fileName,doctokenizerYYlineno,"Error: found </pre> tag without matching <pre>");
- }
- else
- {
- retval=RetVal_EndPre;
- }
- break;
+ //case HTML_PRE:
+ // if (!insidePRE(this))
+ // {
+ // warn(g_fileName,doctokenizerYYlineno,"Error: found </pre> tag without matching <pre>");
+ // }
+ // else
+ // {
+ // retval=RetVal_EndPre;
+ // }
+ // break;
case HTML_BOLD:
handleStyleLeave(this,m_children,DocStyleChange::Bold,"b");
break;
@@ -3768,6 +3791,10 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_SMALL:
handleStyleLeave(this,m_children,DocStyleChange::Small,"small");
break;
+ case HTML_PRE:
+ handleStyleLeave(this,m_children,DocStyleChange::Preformatted,"preformatted");
+ setInsidePreformatted(FALSE);
+ break;
case HTML_P:
// ignore </p> tag
break;
diff --git a/src/docparser.h b/src/docparser.h
index 1c78ada4..346623e 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -80,7 +80,7 @@ class DocNode
Kind_XRefItem = 15,
Kind_HtmlList = 16,
Kind_HtmlListItem = 17,
- Kind_HtmlPre = 18,
+ //Kind_HtmlPre = 18,
Kind_HtmlDescList = 19,
Kind_HtmlDescData = 20,
Kind_HtmlDescTitle = 21,
@@ -112,7 +112,9 @@ class DocNode
Kind_Copy = 47,
Kind_Text = 48
};
- /*! Destructor. */
+ /*! Creates a new node */
+ DocNode() : m_insidePre(FALSE) {}
+ /*! Destroys a node. */
virtual ~DocNode() {}
/*! Returns the kind of node. Provides runtime type information */
virtual Kind kind() const = 0;
@@ -122,6 +124,12 @@ class DocNode
* @param v Abstract visitor.
*/
virtual void accept(DocVisitor *v) = 0;
+ /*! Returns TRUE iff this node is inside a preformatted section */
+ bool isPreformatted() const { return m_insidePre; }
+ /*! Sets whether or not this item is inside a preformatted section */
+ void setInsidePreformatted(bool p) { m_insidePre = p; }
+ private:
+ bool m_insidePre;
};
/*! @brief Default accept implementation for compound nodes in the abstract
@@ -254,22 +262,26 @@ class DocStyleChange : public DocNode
{
public:
enum Style { Bold, Italic, Code, Center, Small,
- Subscript, Superscript
+ Subscript, Superscript, Preformatted
};
- DocStyleChange(DocNode *parent,uint position,Style s,bool enable) :
- m_parent(parent), m_position(position), m_style(s), m_enable(enable) {}
+ DocStyleChange(DocNode *parent,uint position,Style s,bool enable,
+ const HtmlAttribList *attribs=0) :
+ m_parent(parent), m_position(position), m_style(s), m_enable(enable)
+ { if (attribs) m_attribs=*attribs; }
Kind kind() const { return Kind_StyleChange; }
Style style() const { return m_style; }
bool enable() const { return m_enable; }
uint position() const { return m_position; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
+ const HtmlAttribList &attribs() const { return m_attribs; }
private:
DocNode *m_parent;
uint m_position;
Style m_style;
bool m_enable;
+ HtmlAttribList m_attribs;
};
/*! @brief Node representing a special symbol */
@@ -1024,7 +1036,7 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
HtmlAttribList m_attribs;
};
-
+#if 0
/*! @brief Node representing a preformatted HTML section */
class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
{
@@ -1041,6 +1053,7 @@ class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
DocNode * m_parent;
HtmlAttribList m_attribs;
};
+#endif
/*! @brief Node representing a HTML table cell */
class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 4f34a00..f92a6f3 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -219,7 +219,7 @@ URLMASK (([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+))([({]{URLCHAR}*[)}])?
FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
FILEECHAR [a-z_A-Z0-9\-\+]
FILEMASK {FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*
-LINKMASK [^ \t\n\r\\@<&$]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))?
+LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))?
SPCMD1 {CMD}[a-z_A-Z0-9]+
SPCMD2 {CMD}[\\@<>&$#%~]
SPCMD3 {CMD}form#[0-9]+
@@ -234,12 +234,12 @@ OPDEL {BLANK}+"delete"({BLANK}*"[]")?
OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"
OPCAST {BLANK}+[^(\r\n.,]+
OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
-LNKWORD1 {SCOPEMASK}
+LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
-WORD1 [^ \t\n\r\\@<>&$#,.]+
+WORD1 [^ \t\n\r\\@<>{}&$#,.]+|"{"|"}"
WORD2 "."|","
-WORD1NQ [^ \t\n\r\\@<>&$#,."]+
+WORD1NQ [^ \t\n\r\\@<>{}&$#,."]+
WORD2NQ "."|","
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
@@ -618,7 +618,7 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
<*>\n {
warn(g_fileName,yylineno,"Error: Unexpected new line character");
}
-<*>[\\@<>&$#%~] { /* unescaped special character */
+<*>[\\@<>&$#%~] { /* unescaped special character */
//warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext);
g_token->name = yytext;
return TK_COMMAND;
diff --git a/src/docvisitor.h b/src/docvisitor.h
index e9cc03a..eb94e08 100644
--- a/src/docvisitor.h
+++ b/src/docvisitor.h
@@ -38,7 +38,7 @@ class DocVerbatim;
class DocXRefItem;
class DocHtmlList;
class DocHtmlListItem;
-class DocHtmlPre;
+//class DocHtmlPre;
class DocHtmlDescList;
class DocHtmlDescTitle;
class DocHtmlDescData;
@@ -75,6 +75,7 @@ class DocText;
class DocVisitor
{
public:
+ virtual ~DocVisitor() {}
/*! @name Visitor functions for leaf nodes
* @{
*/
@@ -119,8 +120,8 @@ class DocVisitor
virtual void visitPost(DocHtmlListItem *) = 0;
virtual void visitPre(DocHtmlListItem *) = 0;
virtual void visitPost(DocHtmlList *) = 0;
- virtual void visitPre(DocHtmlPre *) = 0;
- virtual void visitPost(DocHtmlPre *) = 0;
+ //virtual void visitPre(DocHtmlPre *) = 0;
+ //virtual void visitPost(DocHtmlPre *) = 0;
virtual void visitPre(DocHtmlDescList *) = 0;
virtual void visitPost(DocHtmlDescList *) = 0;
virtual void visitPre(DocHtmlDescTitle *) = 0;
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index b9ef2d6..982dc39 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -133,26 +133,37 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
switch (s->style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "<b>"; else m_t << "</b>";
+ if (s->enable()) m_t << "<b" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</b>";
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "<em>"; else m_t << "</em>";
+ if (s->enable()) m_t << "<em" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</em>";
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "<code>"; else m_t << "</code>";
+ if (s->enable()) m_t << "<code" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</code>";
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "<sub>"; else m_t << "</sub>";
+ if (s->enable()) m_t << "<sub" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sub>";
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "<sup>"; else m_t << "</sup>";
+ if (s->enable()) m_t << "<sup" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sup>";
break;
case DocStyleChange::Center:
- if (s->enable()) m_t << "<center>"; else m_t << "</center>";
+ if (s->enable()) m_t << "<center" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</center>";
break;
case DocStyleChange::Small:
- if (s->enable()) m_t << "<small>"; else m_t << "</small>";
+ if (s->enable()) m_t << "<small" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</small>";
break;
+ case DocStyleChange::Preformatted:
+ if (s->enable())
+ {
+ m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">\n";
+ m_insidePre=TRUE;
+ }
+ else
+ {
+ m_insidePre=FALSE;
+ m_t << "</pre>\n";
+ }
}
}
@@ -434,17 +445,17 @@ void HtmlDocVisitor::visitPost(DocHtmlListItem *)
m_t << "</li>\n";
}
-void HtmlDocVisitor::visitPre(DocHtmlPre *p)
-{
- m_t << "<pre" << htmlAttribsToString(p->attribs()) << ">\n";
- m_insidePre=TRUE;
-}
+//void HtmlDocVisitor::visitPre(DocHtmlPre *p)
+//{
+// m_t << "<pre" << htmlAttribsToString(p->attribs()) << ">\n";
+// m_insidePre=TRUE;
+//}
-void HtmlDocVisitor::visitPost(DocHtmlPre *)
-{
- m_insidePre=FALSE;
- m_t << "</pre>\n";
-}
+//void HtmlDocVisitor::visitPost(DocHtmlPre *)
+//{
+// m_insidePre=FALSE;
+// m_t << "</pre>\n";
+//}
void HtmlDocVisitor::visitPre(DocHtmlDescList *dl)
{
diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h
index 0c49685..c2202a7 100644
--- a/src/htmldocvisitor.h
+++ b/src/htmldocvisitor.h
@@ -76,8 +76,8 @@ class HtmlDocVisitor : public DocVisitor
void visitPost(DocHtmlList *) ;
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
- void visitPre(DocHtmlPre *);
- void visitPost(DocHtmlPre *);
+ //void visitPre(DocHtmlPre *);
+ //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index ce71479..e226168 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -203,6 +203,18 @@ void LatexDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small:
if (s->enable()) m_t << "\\footnotesize "; else m_t << "\\normalsize ";
break;
+ case DocStyleChange::Preformatted:
+ if (s->enable())
+ {
+ m_t << "\\small\\begin{alltt}";
+ m_insidePre=TRUE;
+ }
+ else
+ {
+ m_insidePre=FALSE;
+ m_t << "\\end{alltt}\\normalsize " << endl;
+ }
+ break;
}
}
@@ -499,17 +511,17 @@ void LatexDocVisitor::visitPost(DocHtmlListItem *)
{
}
-void LatexDocVisitor::visitPre(DocHtmlPre *)
-{
- m_t << "\\small\\begin{alltt}";
- m_insidePre=TRUE;
-}
+//void LatexDocVisitor::visitPre(DocHtmlPre *)
+//{
+// m_t << "\\small\\begin{alltt}";
+// m_insidePre=TRUE;
+//}
-void LatexDocVisitor::visitPost(DocHtmlPre *)
-{
- m_insidePre=FALSE;
- m_t << "\\end{alltt}\\normalsize " << endl;
-}
+//void LatexDocVisitor::visitPost(DocHtmlPre *)
+//{
+// m_insidePre=FALSE;
+// m_t << "\\end{alltt}\\normalsize " << endl;
+//}
void LatexDocVisitor::visitPre(DocHtmlDescList *)
{
diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h
index fbd2e3b..2d52dd7 100644
--- a/src/latexdocvisitor.h
+++ b/src/latexdocvisitor.h
@@ -76,8 +76,8 @@ class LatexDocVisitor : public DocVisitor
void visitPost(DocHtmlList *s);
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
- void visitPre(DocHtmlPre *);
- void visitPost(DocHtmlPre *);
+ //void visitPre(DocHtmlPre *);
+ //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index edc7ede..c5b1230 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -151,6 +151,22 @@ void ManDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small:
/* not supported */
break;
+ case DocStyleChange::Preformatted:
+ if (s->enable())
+ {
+ if (!m_firstCol) m_t << endl;
+ m_t << ".PP" << endl;
+ m_t << ".nf" << endl;
+ m_insidePre=TRUE;
+ }
+ else
+ {
+ m_insidePre=FALSE;
+ if (!m_firstCol) m_t << endl;
+ m_t << ".PP" << endl;
+ m_firstCol=TRUE;
+ }
+ break;
}
}
@@ -468,21 +484,21 @@ void ManDocVisitor::visitPost(DocHtmlListItem *)
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocHtmlPre *)
-{
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_t << ".nf" << endl;
- m_insidePre=TRUE;
-}
-
-void ManDocVisitor::visitPost(DocHtmlPre *)
-{
- m_insidePre=FALSE;
- if (!m_firstCol) m_t << endl;
- m_t << ".PP" << endl;
- m_firstCol=TRUE;
-}
+//void ManDocVisitor::visitPre(DocHtmlPre *)
+//{
+// if (!m_firstCol) m_t << endl;
+// m_t << ".PP" << endl;
+// m_t << ".nf" << endl;
+// m_insidePre=TRUE;
+//}
+//
+//void ManDocVisitor::visitPost(DocHtmlPre *)
+//{
+// m_insidePre=FALSE;
+// if (!m_firstCol) m_t << endl;
+// m_t << ".PP" << endl;
+// m_firstCol=TRUE;
+//}
void ManDocVisitor::visitPre(DocHtmlDescList *)
{
diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h
index 2b61abf..cb3f5cc 100644
--- a/src/mandocvisitor.h
+++ b/src/mandocvisitor.h
@@ -76,8 +76,8 @@ class ManDocVisitor : public DocVisitor
void visitPost(DocHtmlList *s);
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
- void visitPre(DocHtmlPre *);
- void visitPost(DocHtmlPre *);
+ //void visitPre(DocHtmlPre *);
+ //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 7e2e454..cc8e0f2 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1271,6 +1271,15 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.newParagraph();
ol.popGeneratorState();
}
+ else if(!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
+ !Config_getBool("BRIEF_MEMBER_DESC")))
+ {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::RTF);
+ ol.newParagraph();
+ ol.popGeneratorState();
+ }
+
//printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n",
// defArgList,
@@ -1375,7 +1384,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write class that contains a member that is reimplemented by this one
if (bcd->isLinkable())
{
+ ol.disable(OutputGenerator::RTF);
ol.newParagraph();
+ ol.enableAll();
QCString reimplFromLine;
if (bmd->virtualness()!=Pure && bcd->compoundType()!=ClassDef::Interface)
@@ -1449,7 +1460,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
mli.toFirst();
// write the list of classes that overwrite this member
+ ol.disable(OutputGenerator::RTF);
ol.newParagraph();
+ ol.enableAll();
QCString reimplInLine;
if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface))
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 596aa0b..66c57f9 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -102,14 +102,31 @@ class PerlModOutput
{
public:
- PerlModOutput() : m_stream(0), m_indentation(0) { m_spaces[0] = 0; }
+ bool m_pretty;
+
+ inline PerlModOutput(bool pretty)
+ : m_pretty(pretty), m_stream(0), m_indentation(false), m_blockstart(true)
+ {
+ m_spaces[0] = 0;
+ }
+
virtual ~PerlModOutput() { }
inline void setPerlModOutputStream(PerlModOutputStream *os) { m_stream = os; }
inline PerlModOutput &openSave() { iopenSave(); return *this; }
inline PerlModOutput &closeSave(QString &s) { icloseSave(s); return *this; }
-
+
+ inline PerlModOutput &continueBlock()
+ {
+ if (m_blockstart)
+ m_blockstart = false;
+ else
+ m_stream->add(',');
+ indent();
+ return *this;
+ }
+
inline PerlModOutput &add(char c) { m_stream->add(c); return *this; }
inline PerlModOutput &add(const char *s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; }
@@ -118,12 +135,24 @@ public:
inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; }
PerlModOutput &addQuoted(const char *s) { iaddQuoted(s); return *this; }
- inline PerlModOutput &indent() { m_stream->add(m_spaces); return *this; }
+
+ inline PerlModOutput &indent()
+ {
+ if (m_pretty) {
+ m_stream->add('\n');
+ m_stream->add(m_spaces);
+ }
+ return *this;
+ }
inline PerlModOutput &open(char c, const char *s = 0) { iopen(c, s); return *this; }
inline PerlModOutput &close(char c = 0) { iclose(c); return *this; }
inline PerlModOutput &addField(const char *s) { iaddField(s); return *this; }
+ inline PerlModOutput &addFieldQuotedChar(const char *field, char content)
+ {
+ iaddFieldQuotedChar(field, content); return *this;
+ }
inline PerlModOutput &addFieldQuotedString(const char *field, const char *content)
{
iaddFieldQuotedString(field, content); return *this;
@@ -146,6 +175,7 @@ protected:
void decIndent();
void iaddQuoted(const char *);
+ void iaddFieldQuotedChar(const char *, char);
void iaddFieldQuotedString(const char *, const char *);
void iaddField(const char *);
@@ -156,6 +186,7 @@ private:
PerlModOutputStream *m_stream;
int m_indentation;
+ bool m_blockstart;
QStack<PerlModOutputStream> m_saved;
char m_spaces[PERLOUTPUT_MAX_INDENTATION * 2 + 2];
@@ -203,9 +234,19 @@ void PerlModOutput::iaddQuoted(const char *s)
inline void PerlModOutput::iaddField(const char *s)
{
- indent();
+ continueBlock();
m_stream->add(s);
- m_stream->add(" => ");
+ m_stream->add(m_pretty ? " => " : "=>");
+}
+
+void PerlModOutput::iaddFieldQuotedChar(const char *field, char content)
+{
+ iaddField(field);
+ m_stream->add('\'');
+ if (content == '\'')
+ m_stream->add('\\');
+ m_stream->add(content);
+ m_stream->add('\'');
}
void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content)
@@ -215,7 +256,7 @@ void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content
iaddField(field);
m_stream->add('\'');
iaddQuoted(content);
- m_stream->add("',\n");
+ m_stream->add('\'');
}
void PerlModOutput::iopen(char c, const char *s)
@@ -223,10 +264,10 @@ void PerlModOutput::iopen(char c, const char *s)
if (s != 0)
iaddField(s);
else
- indent();
+ continueBlock();
m_stream->add(c);
- m_stream->add('\n');
incIndent();
+ m_blockstart = true;
}
void PerlModOutput::iclose(char c)
@@ -235,7 +276,7 @@ void PerlModOutput::iclose(char c)
indent();
if (c != 0)
m_stream->add(c);
- m_stream->add(",\n");
+ m_blockstart = false;
}
/*! @brief Concrete visitor implementation for PerlMod output. */
@@ -243,7 +284,7 @@ class PerlModDocVisitor : public DocVisitor
{
public:
PerlModDocVisitor(PerlModOutput &);
- virtual ~PerlModDocVisitor() {}
+ virtual ~PerlModDocVisitor() { }
void finish();
@@ -292,8 +333,8 @@ public:
void visitPost(DocHtmlList *) ;
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
- void visitPre(DocHtmlPre *);
- void visitPost(DocHtmlPre *);
+ //void visitPre(DocHtmlPre *);
+ //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
@@ -358,6 +399,8 @@ private:
void singleItem(const char *);
void openSubBlock(const char * = 0);
void closeSubBlock();
+ void openOther();
+ void closeOther();
//--------------------------------------
// state variables
@@ -365,6 +408,7 @@ private:
PerlModOutput &m_output;
bool m_textmode;
+ bool m_textblockstart;
QString m_other;
};
@@ -397,6 +441,7 @@ void PerlModDocVisitor::openItem(const char *name)
void PerlModDocVisitor::closeItem()
{
+ leaveText();
m_output.closeHash();
}
@@ -413,9 +458,10 @@ void PerlModDocVisitor::leaveText()
{
if (!m_textmode)
return;
- m_output.add("\'\n");
- closeItem();
m_textmode = false;
+ m_output
+ .add('\'')
+ .closeHash();
}
void PerlModDocVisitor::singleItem(const char *name)
@@ -427,6 +473,7 @@ void PerlModDocVisitor::singleItem(const char *name)
void PerlModDocVisitor::openSubBlock(const char *s)
{
m_output.openList(s);
+ m_textblockstart = true;
}
void PerlModDocVisitor::closeSubBlock()
@@ -435,6 +482,20 @@ void PerlModDocVisitor::closeSubBlock()
m_output.closeList();
}
+void PerlModDocVisitor::openOther()
+{
+ leaveText();
+ m_output.openSave();
+}
+
+void PerlModDocVisitor::closeOther()
+{
+ QString other;
+ leaveText();
+ m_output.closeSave(other);
+ m_other += other;
+}
+
void PerlModDocVisitor::visit(DocWord *w)
{
enterText();
@@ -459,6 +520,8 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
{
char c = 0;
const char *s = 0;
+ const char *accent = 0;
+ const char *symbol = 0;
switch(sy->symbol())
{
case DocSymbol::At: c = '@'; break;
@@ -469,27 +532,41 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
case DocSymbol::Hash: c = '#'; break;
case DocSymbol::Percent: c = '%'; break;
case DocSymbol::Quot: c = '"'; break;
- case DocSymbol::Szlig: c = 'ß'; break;
case DocSymbol::Nbsp: c = ' '; break;
- case DocSymbol::Uml: c = sy->letter(); break;
- case DocSymbol::Acute: c = sy->letter(); break;
- case DocSymbol::Grave: c = sy->letter(); break;
- case DocSymbol::Circ: c = sy->letter(); break;
- case DocSymbol::Tilde: c = sy->letter(); break;
- case DocSymbol::Cedil: c = sy->letter(); break;
- case DocSymbol::Ring: c = sy->letter(); break;
+ case DocSymbol::Uml: accent = "umlaut"; break;
+ case DocSymbol::Acute: accent = "acute"; break;
+ case DocSymbol::Grave: accent = "grave"; break;
+ case DocSymbol::Circ: accent = "circ"; break;
+ case DocSymbol::Tilde: accent = "tilde"; break;
+ case DocSymbol::Cedil: accent = "cedilla"; break;
+ case DocSymbol::Ring: accent = "ring"; break;
case DocSymbol::BSlash: s = "\\\\"; break;
- case DocSymbol::Copy: s = "(c)"; break;
+ case DocSymbol::Copy: symbol = "copyright"; break;
+ case DocSymbol::Szlig: symbol = "szlig"; break;
case DocSymbol::Apos: s = "\\\'"; break;
case DocSymbol::Unknown:
err("Error: unknown symbol found\n");
break;
}
- enterText();
- if (c != 0)
+ if (c != 0) {
+ enterText();
m_output.add(c);
- else
+ } else if (s != 0) {
+ enterText();
m_output.add(s);
+ } else if (symbol != 0) {
+ leaveText();
+ openItem("symbol");
+ m_output.addFieldQuotedString("symbol", symbol);
+ closeItem();
+ } else if (accent != 0) {
+ leaveText();
+ openItem("accent");
+ m_output
+ .addFieldQuotedString("accent", accent)
+ .addFieldQuotedChar("letter", sy->letter());
+ closeItem();
+ }
}
void PerlModDocVisitor::visit(DocURL *u)
@@ -501,18 +578,26 @@ void PerlModDocVisitor::visit(DocURL *u)
void PerlModDocVisitor::visit(DocLineBreak *) { singleItem("linebreak"); }
void PerlModDocVisitor::visit(DocHorRuler *) { singleItem("hruler"); }
+
void PerlModDocVisitor::visit(DocStyleChange *s)
{
+ const char *style = 0;
switch (s->style())
{
- case DocStyleChange::Bold: break; // bold
- case DocStyleChange::Italic: break; // italic
- case DocStyleChange::Code: break; // code
- case DocStyleChange::Subscript: break; // subscript
- case DocStyleChange::Superscript: break; // superscript
- case DocStyleChange::Center: break; // center
- case DocStyleChange::Small: break; // small
+ case DocStyleChange::Bold: style = "bold"; break;
+ case DocStyleChange::Italic: style = "italic"; break;
+ case DocStyleChange::Code: style = "code"; break;
+ case DocStyleChange::Subscript: style = "subscript"; break;
+ case DocStyleChange::Superscript: style = "superscript"; break;
+ case DocStyleChange::Center: style = "center"; break;
+ case DocStyleChange::Small: style = "small"; break;
+ case DocStyleChange::Preformatted: style = "preformatted"; break;
+
}
+ openItem("style");
+ m_output.addFieldQuotedString("style", style)
+ .addFieldBoolean("enable", s->enable());
+ closeItem();
}
void PerlModDocVisitor::visit(DocVerbatim *s)
@@ -616,22 +701,45 @@ void PerlModDocVisitor::visit(DocIndexEntry *)
void PerlModDocVisitor::visitPre(DocAutoList *l)
{
- openItem(l->isEnumList() ? "ordered_list" : "itemized_list");
+ openItem("list");
+ m_output.addFieldQuotedString("style", l->isEnumList() ? "ordered" : "itemized");
openSubBlock("content");
}
-void PerlModDocVisitor::visitPost(DocAutoList *) { closeSubBlock(); closeItem(); }
-void PerlModDocVisitor::visitPre(DocAutoListItem *) { openSubBlock(); }
-void PerlModDocVisitor::visitPost(DocAutoListItem *) { closeSubBlock(); }
+void PerlModDocVisitor::visitPost(DocAutoList *)
+{
+ closeSubBlock();
+ closeItem();
+}
+
+void PerlModDocVisitor::visitPre(DocAutoListItem *)
+{
+ openSubBlock();
+}
+
+void PerlModDocVisitor::visitPost(DocAutoListItem *)
+{
+ closeSubBlock();
+}
+
void PerlModDocVisitor::visitPre(DocPara *)
{
+ if (m_textblockstart)
+ m_textblockstart = false;
+ else
+ singleItem("parbreak");
+ /*
openItem("para");
openSubBlock("content");
+ */
}
+
void PerlModDocVisitor::visitPost(DocPara *)
{
+ /*
closeSubBlock();
closeItem();
+ */
}
void PerlModDocVisitor::visitPre(DocRoot *)
@@ -644,7 +752,6 @@ void PerlModDocVisitor::visitPost(DocRoot *)
void PerlModDocVisitor::visitPre(DocSimpleSect *s)
{
- leaveText();
const char *type = 0;
switch (s->type())
{
@@ -667,15 +774,14 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
err("Error: unknown simple section found\n");
break;
}
- m_output.openSave().openList(type);
+ openOther();
+ openSubBlock(type);
}
void PerlModDocVisitor::visitPost(DocSimpleSect *)
{
- QString content;
- leaveText();
- m_output.closeList().closeSave(content);
- m_other += content;
+ closeSubBlock();
+ closeOther();
}
void PerlModDocVisitor::visitPre(DocTitle *)
@@ -692,44 +798,63 @@ void PerlModDocVisitor::visitPost(DocTitle *)
void PerlModDocVisitor::visitPre(DocSimpleList *)
{
- openItem("itemized_list");
+ openItem("list");
+ m_output.addFieldQuotedString("style", "itemized");
openSubBlock("content");
}
-void PerlModDocVisitor::visitPost(DocSimpleList *) { closeSubBlock(); }
+
+void PerlModDocVisitor::visitPost(DocSimpleList *)
+{
+ closeSubBlock();
+ closeItem();
+}
+
void PerlModDocVisitor::visitPre(DocSimpleListItem *) { openSubBlock(); }
void PerlModDocVisitor::visitPost(DocSimpleListItem *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocSection *s)
{
- QString sect = "sect" + (s->level() + 1);
+ QString sect = QString("sect%1").arg(s->level());
openItem(sect);
openSubBlock("content");
}
-void PerlModDocVisitor::visitPost(DocSection *) { closeSubBlock(); }
-void PerlModDocVisitor::visitPre(DocHtmlList *l)
+void PerlModDocVisitor::visitPost(DocSection *)
{
- openItem((l->type() == DocHtmlList::Ordered) ? "ordered_list" : "itemized_list");
- openSubBlock("content");
+ closeSubBlock();
+ closeItem();
}
-void PerlModDocVisitor::visitPost(DocHtmlList *) { closeSubBlock(); }
-void PerlModDocVisitor::visitPre(DocHtmlListItem *) { openSubBlock(); }
-void PerlModDocVisitor::visitPost(DocHtmlListItem *) { closeSubBlock(); }
-void PerlModDocVisitor::visitPre(DocHtmlPre *)
+void PerlModDocVisitor::visitPre(DocHtmlList *l)
{
- openItem("preformatted");
+ openItem("list");
+ m_output.addFieldQuotedString("style", (l->type() == DocHtmlList::Ordered) ? "ordered" : "itemized");
openSubBlock("content");
- //m_insidePre=TRUE;
}
-void PerlModDocVisitor::visitPost(DocHtmlPre *)
+void PerlModDocVisitor::visitPost(DocHtmlList *)
{
- //m_insidePre=FALSE;
closeSubBlock();
closeItem();
}
+void PerlModDocVisitor::visitPre(DocHtmlListItem *) { openSubBlock(); }
+void PerlModDocVisitor::visitPost(DocHtmlListItem *) { closeSubBlock(); }
+
+//void PerlModDocVisitor::visitPre(DocHtmlPre *)
+//{
+// openItem("preformatted");
+// openSubBlock("content");
+// //m_insidePre=TRUE;
+//}
+
+//void PerlModDocVisitor::visitPost(DocHtmlPre *)
+//{
+// //m_insidePre=FALSE;
+// closeSubBlock();
+// closeItem();
+//}
+
void PerlModDocVisitor::visitPre(DocHtmlDescList *)
{
#if 0
@@ -943,10 +1068,12 @@ void PerlModDocVisitor::visitPre(DocRef *ref)
openItem("ref");
if (!ref->hasLinkText())
m_output.addFieldQuotedString("text", ref->targetTitle());
+ openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocRef *)
{
+ closeSubBlock();
closeItem();
}
@@ -1002,15 +1129,14 @@ void PerlModDocVisitor::visitPre(DocParamSect *s)
err("Error: unknown parameter section found\n");
break;
}
- m_output.openSave().openList(type);
+ openOther();
+ openSubBlock(type);
}
void PerlModDocVisitor::visitPost(DocParamSect *)
{
- leaveText();
- QString content;
- m_output.closeList().closeSave(content);
- m_other += content;
+ closeSubBlock();
+ closeOther();
}
void PerlModDocVisitor::visitPre(DocParamList *pl)
@@ -1048,10 +1174,14 @@ void PerlModDocVisitor::visitPre(DocXRefItem *)
m_output.add("</xreftitle>");
m_output.add("<xrefdescription>");
#endif
+ openItem("xrefitem");
+ openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocXRefItem *)
{
+ closeSubBlock();
+ closeItem();
#if 0
m_output.add("</xrefdescription>");
m_output.add("</xrefsect>");
@@ -1062,10 +1192,12 @@ void PerlModDocVisitor::visitPre(DocInternalRef *ref)
{
openItem("ref");
addLink(0,ref->file(),ref->anchor());
+ openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocInternalRef *)
{
+ closeSubBlock();
closeItem();
}
@@ -1133,7 +1265,7 @@ static void addPerlModDocBlock(PerlModOutput &output,
{
QCString stext = text.stripWhiteSpace();
if (stext.isEmpty())
- output.addField(name).add("{},\n");
+ output.addField(name).add("{}");
else {
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE);
output.openHash(name);
@@ -1181,38 +1313,40 @@ class PerlModGenerator
{
public:
- PerlModOutput output;
+ PerlModOutput m_output;
- QString pathDoxyModelPM;
+ QString pathDoxyStructurePM;
QString pathDoxyDocsTex;
QString pathDoxyFormatTex;
QString pathDoxyLatexTex;
QString pathDoxyLatexDVI;
QString pathDoxyLatexPDF;
- QString pathDoxyTemplateTex;
+ QString pathDoxyStructureTex;
QString pathDoxyDocsPM;
QString pathDoxyLatexPL;
- QString pathDoxyLatexTemplatePL;
+ QString pathDoxyLatexStructurePL;
QString pathDoxyRules;
QString pathMakefile;
- void generatePerlModForMember(MemberDef *md,Definition *);
- void generatePerlModSection(Definition *d,
- MemberList *ml,const char *name,const char *header=0);
- void addListOfAllMembers(ClassDef *cd, PerlModOutput &output);
- void generatePerlModForClass(ClassDef *cd, PerlModOutput &output);
- void generatePerlModForNamespace(NamespaceDef *nd, PerlModOutput &output);
- void generatePerlModForFile(FileDef *fd, PerlModOutput &output);
- void generatePerlModForGroup(GroupDef *gd, PerlModOutput &output);
- void generatePerlModForPage(PageInfo *pi, PerlModOutput &output);
+ inline PerlModGenerator(bool pretty) : m_output(pretty) { }
+
+ void generatePerlModForMember(MemberDef *md, Definition *);
+ void generatePerlModSection(Definition *d, MemberList *ml,
+ const char *name, const char *header=0);
+ void addListOfAllMembers(ClassDef *cd);
+ void generatePerlModForClass(ClassDef *cd);
+ void generatePerlModForNamespace(NamespaceDef *nd);
+ void generatePerlModForFile(FileDef *fd);
+ void generatePerlModForGroup(GroupDef *gd);
+ void generatePerlModForPage(PageInfo *pi);
bool createOutputFile(QFile &f, const char *s);
bool createOutputDir(QDir &perlModDir);
bool generateDoxyLatexTex();
bool generateDoxyFormatTex();
- bool generateDoxyModelPM();
+ bool generateDoxyStructurePM();
bool generateDoxyLatexPL();
- bool generateDoxyLatexTemplatePL();
+ bool generateDoxyLatexStructurePL();
bool generateDoxyRules();
bool generateMakefile();
bool generatePerlModOutput();
@@ -1222,7 +1356,6 @@ public:
void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *)
{
-
// + declaration/definition arg lists
// + reimplements
// + reimplementedBy
@@ -1261,26 +1394,26 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *)
else if (md->getNamespaceDef())
scopeName=md->getNamespaceDef()->name();
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("kind", memType)
.addFieldQuotedString("name", md->name())
.addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuotedString("protection", getProtectionName(md->protection()))
.addFieldBoolean("static", md->isStatic());
- addPerlModDocBlock(output,"brief",md->getDefFileName(),md->getDefLine(),scopeName,md,md->briefDescription());
- addPerlModDocBlock(output,"detailed",md->getDefFileName(),md->getDefLine(),scopeName,md,md->documentation());
+ addPerlModDocBlock(m_output,"brief",md->getDefFileName(),md->getDefLine(),scopeName,md,md->briefDescription());
+ addPerlModDocBlock(m_output,"detailed",md->getDefFileName(),md->getDefLine(),scopeName,md,md->documentation());
if (md->memberType()!=MemberDef::Define &&
md->memberType()!=MemberDef::Enumeration)
- output.addFieldQuotedString("type", md->typeString());
+ m_output.addFieldQuotedString("type", md->typeString());
if (isFunc) //function
{
ArgumentList *al = md->argumentList();
- output.addFieldBoolean("const", al && al->constSpecifier)
+ m_output.addFieldBoolean("const", al && al->constSpecifier)
.addFieldBoolean("volatile", al && al->volatileSpecifier);
- output.openList("parameters");
+ m_output.openList("parameters");
ArgumentList *declAl = md->declArgumentList();
ArgumentList *defAl = md->argumentList();
if (declAl && declAl->count()>0)
@@ -1291,80 +1424,80 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *)
for (declAli.toFirst();(a=declAli.current());++declAli)
{
Argument *defArg = defAli.current();
- output.openHash();
+ m_output.openHash();
if (!a->name.isEmpty())
- output.addFieldQuotedString("declaration_name", a->name);
+ m_output.addFieldQuotedString("declaration_name", a->name);
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
- output.addFieldQuotedString("definition_name", defArg->name);
+ m_output.addFieldQuotedString("definition_name", defArg->name);
if (!a->type.isEmpty())
- output.addFieldQuotedString("type", a->type);
+ m_output.addFieldQuotedString("type", a->type);
if (!a->array.isEmpty())
- output.addFieldQuotedString("array", a->array);
+ m_output.addFieldQuotedString("array", a->array);
if (!a->defval.isEmpty())
- output.addFieldQuotedString("default_value", a->defval);
+ m_output.addFieldQuotedString("default_value", a->defval);
if (!a->attrib.isEmpty())
- output.addFieldQuotedString("attributes", a->attrib);
+ m_output.addFieldQuotedString("attributes", a->attrib);
- output.closeHash();
+ m_output.closeHash();
if (defArg) ++defAli;
}
}
- output.closeList();
+ m_output.closeList();
}
else if (md->memberType()==MemberDef::Define &&
md->argsString()!=0) // define
{
- output.openList("parameters");
+ m_output.openList("parameters");
ArgumentListIterator ali(*md->argumentList());
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", a->type)
.closeHash();
}
- output.closeList();
+ m_output.closeList();
}
if (!md->initializer().isEmpty())
- output.addFieldQuotedString("initializer", md->initializer());
+ m_output.addFieldQuotedString("initializer", md->initializer());
if (md->excpString())
- output.addFieldQuotedString("exceptions", md->excpString());
+ m_output.addFieldQuotedString("exceptions", md->excpString());
if (md->memberType()==MemberDef::Enumeration) // enum
{
if (md->enumFieldList())
{
- output.openList("values");
+ m_output.openList("values");
MemberListIterator emli(*md->enumFieldList());
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", emd->name());
if (!emd->initializer().isEmpty())
- output.addFieldQuotedString("initializer", emd->initializer());
+ m_output.addFieldQuotedString("initializer", emd->initializer());
- addPerlModDocBlock(output,"brief",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription());
+ addPerlModDocBlock(m_output,"brief",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription());
- addPerlModDocBlock(output,"detailed",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->documentation());
+ addPerlModDocBlock(m_output,"detailed",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->documentation());
- output.closeHash();
+ m_output.closeHash();
}
- output.closeList();
+ m_output.closeList();
}
}
MemberDef *rmd = md->reimplements();
if (rmd)
- output.openHash("reimplements")
+ m_output.openHash("reimplements")
.addFieldQuotedString("name", rmd->name())
.closeHash();
@@ -1372,15 +1505,15 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *)
if (rbml)
{
MemberListIterator mli(*rbml);
- output.openList("reimplemented_by");
+ m_output.openList("reimplemented_by");
for (mli.toFirst();(rmd=mli.current());++mli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", rmd->name())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
- output.closeHash();
+ m_output.closeHash();
}
void PerlModGenerator::generatePerlModSection(Definition *d,
@@ -1388,25 +1521,25 @@ void PerlModGenerator::generatePerlModSection(Definition *d,
{
if (ml->count()==0) return; // empty list
- output.openHash(name);
+ m_output.openHash(name);
if (header)
- output.addFieldQuotedString("header", header);
+ m_output.addFieldQuotedString("header", header);
- output.openList("members");
+ m_output.openList("members");
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generatePerlModForMember(md,d);
}
- output.closeList()
+ m_output.closeList()
.closeHash();
}
-void PerlModGenerator::addListOfAllMembers(ClassDef *cd, PerlModOutput &output)
+void PerlModGenerator::addListOfAllMembers(ClassDef *cd)
{
- output.openList("all_members");
+ m_output.openList("all_members");
MemberNameInfoSDict::Iterator mnii(*cd->memberNameInfoSDict());
MemberNameInfo *mni;
for (mnii.toFirst();(mni=mnii.current());++mnii)
@@ -1420,22 +1553,22 @@ void PerlModGenerator::addListOfAllMembers(ClassDef *cd, PerlModOutput &output)
Definition *d=md->getGroupDef();
if (d==0) d = cd;
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", md->name())
.addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuotedString("protection", getProtectionName(mi->prot));
if (!mi->ambiguityResolutionScope.isEmpty())
- output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope);
+ m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope);
- output.addFieldQuotedString("scope", cd->name())
+ m_output.addFieldQuotedString("scope", cd->name())
.closeHash();
}
}
- output.closeList();
+ m_output.closeList();
}
-void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &output)
+void PerlModGenerator::generatePerlModForClass(ClassDef *cd)
{
// + brief description
// + detailed description
@@ -1457,48 +1590,48 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances.
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", cd->name());
if (cd->baseClasses()->count()>0)
{
- output.openList("base");
+ m_output.openList("base");
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", bcd->classDef->displayName())
.addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuotedString("protection", getProtectionName(bcd->prot))
.closeHash();
- output.closeList();
+ m_output.closeList();
}
if (cd->subClasses()->count()>0)
{
- output.openList("derived");
+ m_output.openList("derived");
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", bcd->classDef->displayName())
.addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuotedString("protection", getProtectionName(bcd->prot))
.closeHash();
- output.closeList();
+ m_output.closeList();
}
ClassSDict *cl = cd->getInnerClasses();
if (cl)
{
- output.openList("inner");
+ m_output.openList("inner");
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", cd->name())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
IncludeInfo *ii=cd->includeInfo();
@@ -1508,19 +1641,19 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp
if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
if (!nm.isEmpty())
{
- output.openHash("includes");
+ m_output.openHash("includes");
#if 0
if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
t << " id=\"" << ii->fileDef->getOutputFileBase() << "\"";
#endif
- output.addFieldBoolean("local", ii->local)
+ m_output.addFieldBoolean("local", ii->local)
.addFieldQuotedString("name", nm)
.closeHash();
}
}
- addTemplateList(cd,output);
- addListOfAllMembers(cd,output);
+ addTemplateList(cd,m_output);
+ addListOfAllMembers(cd);
MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
@@ -1550,8 +1683,8 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp
generatePerlModSection(cd,&cd->friends,"friend_methods");
generatePerlModSection(cd,&cd->related,"related_methods");
- addPerlModDocBlock(output,"brief",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription());
- addPerlModDocBlock(output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->documentation());
+ addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription());
+ addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->documentation());
#if 0
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
@@ -1579,10 +1712,10 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp
t << "/>" << endl;
#endif
- output.closeHash();
+ m_output.closeHash();
}
-void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd, PerlModOutput &output)
+void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd)
{
// + contained class definitions
// + contained namespace definitions
@@ -1595,33 +1728,33 @@ void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd, PerlModOutp
if (nd->isReference()) return; // skip external references
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", nd->name());
ClassSDict *cl = nd->classSDict;
if (cl)
{
- output.openList("classes");
+ m_output.openList("classes");
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", cd->name())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
NamespaceSDict *nl = nd->namespaceSDict;
if (nl)
{
- output.openList("namespaces");
+ m_output.openList("namespaces");
NamespaceSDict::Iterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", nd->name())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
MemberGroupSDict::Iterator mgli(*nd->memberGroupSDict);
@@ -1636,13 +1769,13 @@ void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd, PerlModOutp
generatePerlModSection(nd,&nd->decFuncMembers,"functions");
generatePerlModSection(nd,&nd->decVarMembers,"variables");
- addPerlModDocBlock(output,"brief",nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription());
- addPerlModDocBlock(output,"detailed",nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation());
+ addPerlModDocBlock(m_output,"brief",nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription());
+ addPerlModDocBlock(m_output,"detailed",nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation());
- output.closeHash();
+ m_output.closeHash();
}
-void PerlModGenerator::generatePerlModForFile(FileDef *fd, PerlModOutput &output)
+void PerlModGenerator::generatePerlModForFile(FileDef *fd)
{
// + includes files
// + includedby files
@@ -1660,37 +1793,37 @@ void PerlModGenerator::generatePerlModForFile(FileDef *fd, PerlModOutput &output
if (fd->isReference()) return;
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", fd->name());
QListIterator<IncludeInfo> ili1(*fd->includeFileList());
IncludeInfo *inc;
- output.openList("includes");
+ m_output.openList("includes");
for (ili1.toFirst();(inc=ili1.current());++ili1)
{
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", inc->includeName);
if (inc->fileDef && !inc->fileDef->isReference())
{
- output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase());
+ m_output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase());
}
- output.closeHash();
+ m_output.closeHash();
}
- output.closeList();
+ m_output.closeList();
QListIterator<IncludeInfo> ili2(*fd->includedByFileList());
- output.openList("included_by");
+ m_output.openList("included_by");
for (ili2.toFirst();(inc=ili2.current());++ili2)
{
- output.openHash()
- .addFieldQuotedString("name => ", inc->includeName);
+ m_output.openHash()
+ .addFieldQuotedString("name", inc->includeName);
if (inc->fileDef && !inc->fileDef->isReference())
{
- output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase());
+ m_output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase());
}
- output.closeHash();
+ m_output.closeHash();
}
- output.closeList();
+ m_output.closeList();
generatePerlModSection(fd,&fd->decDefineMembers,"defines");
generatePerlModSection(fd,&fd->decProtoMembers,"prototypes");
@@ -1699,13 +1832,13 @@ void PerlModGenerator::generatePerlModForFile(FileDef *fd, PerlModOutput &output
generatePerlModSection(fd,&fd->decFuncMembers,"functions");
generatePerlModSection(fd,&fd->decVarMembers,"variables");
- addPerlModDocBlock(output,"brief",fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription());
- addPerlModDocBlock(output,"detailed",fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation());
+ addPerlModDocBlock(m_output,"brief",fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription());
+ addPerlModDocBlock(m_output,"detailed",fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation());
- output.closeHash();
+ m_output.closeHash();
}
-void PerlModGenerator::generatePerlModForGroup(GroupDef *gd, PerlModOutput &output)
+void PerlModGenerator::generatePerlModForGroup(GroupDef *gd)
{
// + members
// + member groups
@@ -1721,73 +1854,73 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd, PerlModOutput &outp
if (gd->isReference()) return; // skip external references
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", gd->name())
.addFieldQuotedString("title", gd->groupTitle());
FileList *fl = gd->getFiles();
if (fl)
{
- output.openList("files");
+ m_output.openList("files");
QListIterator<FileDef> fli(*fl);
FileDef *fd = fl->first();
for (fli.toFirst();(fd=fli.current());++fli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", fd->name())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
ClassSDict *cl = gd->getClasses();
if (cl)
{
- output.openList("classes");
+ m_output.openList("classes");
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", cd->name())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
NamespaceList *nl = gd->getNamespaces();
if (nl)
{
- output.openList("namespaces");
+ m_output.openList("namespaces");
NamespaceListIterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", nd->name())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
PageSDict *pl = gd->getPages();
if (pl)
{
- output.openList("pages");
+ m_output.openList("pages");
PageSDict::Iterator pli(*pl);
PageInfo *pi;
for (pli.toFirst();(pi=pli.current());++pli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("title", pi->title)
.closeHash();
- output.closeList();
+ m_output.closeList();
}
GroupList *gl = gd->getSubGroups();
if (gl)
{
- output.openList("groups");
+ m_output.openList("groups");
GroupListIterator gli(*gl);
GroupDef *sgd;
for (gli.toFirst();(sgd=gli.current());++gli)
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("title", gd->groupTitle())
.closeHash();
- output.closeList();
+ m_output.closeList();
}
MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict);
@@ -1802,13 +1935,13 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd, PerlModOutput &outp
generatePerlModSection(gd,&gd->decFuncMembers,"functions");
generatePerlModSection(gd,&gd->decVarMembers,"variables");
- addPerlModDocBlock(output,"brief",gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription());
- addPerlModDocBlock(output,"detailed",gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation());
+ addPerlModDocBlock(m_output,"brief",gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription());
+ addPerlModDocBlock(m_output,"detailed",gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation());
- output.closeHash();
+ m_output.closeHash();
}
-void PerlModGenerator::generatePerlModForPage(PageInfo *pi, PerlModOutput &output)
+void PerlModGenerator::generatePerlModForPage(PageInfo *pi)
{
// + name
// + title
@@ -1816,14 +1949,15 @@ void PerlModGenerator::generatePerlModForPage(PageInfo *pi, PerlModOutput &outpu
if (pi->isReference()) return;
- output.openHash()
+ m_output.openHash()
.addFieldQuotedString("name", pi->name);
SectionInfo *si = Doxygen::sectionDict.find(pi->name);
if (si)
- output.addFieldQuotedString("title", si->title);
+ m_output.addFieldQuotedString("title", si->title);
- addPerlModDocBlock(output,"detailed",pi->defFileName,pi->defLine,0,0,pi->doc);
+ addPerlModDocBlock(m_output,"detailed",pi->defFileName,pi->defLine,0,0,pi->doc);
+ m_output.closeHash();
}
bool PerlModGenerator::generatePerlModOutput()
@@ -1834,24 +1968,24 @@ bool PerlModGenerator::generatePerlModOutput()
QTextStream outputTextStream(&outputFile);
PerlModOutputStream outputStream(&outputTextStream);
- output.setPerlModOutputStream(&outputStream);
- output.add("$doxydocs =\n").openHash();
+ m_output.setPerlModOutputStream(&outputStream);
+ m_output.add("$doxydocs=").openHash();
- output.openList("classes");
+ m_output.openList("classes");
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
- generatePerlModForClass(cd,output);
- output.closeList();
+ generatePerlModForClass(cd);
+ m_output.closeList();
- output.openList("namespaces");
+ m_output.openList("namespaces");
NamespaceSDict::Iterator nli(Doxygen::namespaceSDict);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
- generatePerlModForNamespace(nd,output);
- output.closeList();
+ generatePerlModForNamespace(nd);
+ m_output.closeList();
- output.openList("files");
+ m_output.openList("files");
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
for (;(fn=fnli.current());++fnli)
@@ -1859,27 +1993,27 @@ bool PerlModGenerator::generatePerlModOutput()
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
- generatePerlModForFile(fd,output);
+ generatePerlModForFile(fd);
}
- output.closeList();
+ m_output.closeList();
- output.openList("groups");
+ m_output.openList("groups");
GroupSDict::Iterator gli(Doxygen::groupSDict);
GroupDef *gd;
for (;(gd=gli.current());++gli)
- generatePerlModForGroup(gd,output);
- output.closeList();
+ generatePerlModForGroup(gd);
+ m_output.closeList();
- output.openList("pages");
+ m_output.openList("pages");
PageSDict::Iterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
- generatePerlModForPage(pi,output);
+ generatePerlModForPage(pi);
if (Doxygen::mainPage)
- generatePerlModForPage(Doxygen::mainPage,output);
- output.closeList();
+ generatePerlModForPage(Doxygen::mainPage);
+ m_output.closeList();
- output.closeHash().add(";\n1;\n");
+ m_output.closeHash().add(";\n1;\n");
return true;
}
@@ -1943,10 +2077,10 @@ bool PerlModGenerator::createOutputDir(QDir &perlModDir)
return true;
}
-bool PerlModGenerator::generateDoxyModelPM()
+bool PerlModGenerator::generateDoxyStructurePM()
{
QFile doxyModelPM;
- if (!createOutputFile(doxyModelPM, pathDoxyModelPM))
+ if (!createOutputFile(doxyModelPM, pathDoxyStructurePM))
return false;
QTextStream doxyModelPMStream(&doxyModelPM);
@@ -2006,7 +2140,7 @@ bool PerlModGenerator::generateDoxyModelPM()
"\t];\n"
"}\n"
"\n"
- "$doxymodel =\n"
+ "$doxystructure =\n"
" [ \"hash\", \"Root\",\n"
" {\n"
"\tfiles =>\n"
@@ -2026,6 +2160,20 @@ bool PerlModGenerator::generateDoxyModelPM()
"\t },\n"
"\t ],\n"
"\t ],\n"
+ "\tpages =>\n"
+ "\t [ \"list\", \"Pages\",\n"
+ "\t [ \"hash\", \"Page\",\n"
+ "\t {\n"
+ "\t\tname => [ \"string\", \"PageName\" ],\n"
+ "\t\tdetailed =>\n"
+ "\t\t [ \"hash\", \"PageDetailed\",\n"
+ "\t\t {\n"
+ "\t\t doc => [ \"doc\", \"PageDetailedDoc\" ],\n"
+ "\t\t },\n"
+ "\t\t ],\n"
+ "\t },\n"
+ "\t ],\n"
+ "\t ],\n"
"\tclasses =>\n"
"\t [ \"list\", \"Classes\",\n"
"\t [ \"hash\", \"Class\",\n"
@@ -2064,67 +2212,90 @@ bool PerlModGenerator::generateDoxyRules()
return false;
bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
+ QString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
QTextStream doxyRulesStream(&doxyRules);
doxyRulesStream <<
- "DOXYEXECPATH = " << pathDoxyExec << "\n"
- "DOXYFILE = " << pathDoxyfile << "\n"
- "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n"
- "DOXYMODEL_PM = " << pathDoxyModelPM << "\n"
- "DOXYRULES = " << pathDoxyRules << "\n";
+ prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" <<
+ prefix << "DOXYFILE = " << pathDoxyfile << "\n" <<
+ prefix << "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n" <<
+ prefix << "DOXYSTRUCTURE_PM = " << pathDoxyStructurePM << "\n" <<
+ prefix << "DOXYRULES = " << pathDoxyRules << "\n";
if (perlmodLatex)
doxyRulesStream <<
- "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n"
- "DOXYLATEXTEMPLATE_PL = " << pathDoxyLatexTemplatePL << "\n"
- "DOXYTEMPLATE_TEX = " << pathDoxyTemplateTex << "\n"
- "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n"
- "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n"
- "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n"
- "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n"
- "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n";
+ prefix << "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n" <<
+ prefix << "DOXYLATEXSTRUCTURE_PL = " << pathDoxyLatexStructurePL << "\n" <<
+ prefix << "DOXYSTRUCTURE_TEX = " << pathDoxyStructureTex << "\n" <<
+ prefix << "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n" <<
+ prefix << "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n" <<
+ prefix << "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n" <<
+ prefix << "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n" <<
+ prefix << "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n";
doxyRulesStream <<
"\n"
".PHONY: clean-perlmod\n"
- "clean-perlmod:\n"
- "\trm -f $(DOXYMODEL_PM) $(DOXYDOCS_PM)";
+ "clean-perlmod::\n"
+ "\trm -f $(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
+ "\t$(" << prefix << "DOXYDOCS_PM)";
if (perlmodLatex)
doxyRulesStream <<
" \\\n"
- "\t$(DOXYLATEX_PL) $(DOXYLATEXTEMPLATE_PL) \\\n"
- "\t$(DOXYDOCS_TEX) $(DOXYTEMPLATE_TEX) \\\n"
- "\t$(DOXYFORMAT_TEX) $(DOXYLATEX_TEX) \\\n"
- "\t$(DOXYLATEX_PDF) $(DOXYLATEX_DVI) \\\n"
- "\t$(addprefix $(DOXYLATEX_TEX:tex=),out aux log)";
+ "\t$(" << prefix << "DOXYLATEX_PL) \\\n"
+ "\t$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
+ "\t$(" << prefix << "DOXYDOCS_TEX) \\\n"
+ "\t$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
+ "\t$(" << prefix << "DOXYFORMAT_TEX) \\\n"
+ "\t$(" << prefix << "DOXYLATEX_TEX) \\\n"
+ "\t$(" << prefix << "DOXYLATEX_PDF) \\\n"
+ "\t$(" << prefix << "DOXYLATEX_DVI) \\\n"
+ "\t$(addprefix $(" << prefix << "DOXYLATEX_TEX:tex=),out aux log)";
doxyRulesStream << "\n\n";
doxyRulesStream <<
- "$(DOXYRULES) $(DOXYMAKEFILE) $(DOXYMODEL_PM) $(DOXYDOCS_PM)";
+ "$(" << prefix << "DOXYRULES) \\\n"
+ "$(" << prefix << "DOXYMAKEFILE) \\\n"
+ "$(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
+ "$(" << prefix << "DOXYDOCS_PM)";
if (perlmodLatex) {
doxyRulesStream <<
" \\\n"
- "$(DOXYLATEX_PL) $(DOXYLATEXTEMPLATE_PL) \\\n"
- "$(DOXYFORMAT_TEX) $(DOXYLATEX_TEX)";
+ "$(" << prefix << "DOXYLATEX_PL) \\\n"
+ "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
+ "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
+ "$(" << prefix << "DOXYLATEX_TEX)";
}
doxyRulesStream <<
- ": $(DOXYFILE)\n"
- "\tcd $(DOXYEXECPATH) ; doxygen \"$<\"\n";
+ ": \\\n"
+ "\t$(" << prefix << "DOXYFILE)\n"
+ "\tcd $(" << prefix << "DOXY_EXEC_PATH) ; doxygen \"$<\"\n";
if (perlmodLatex) {
doxyRulesStream <<
"\n"
- "$(DOXYDOCS_TEX): $(DOXYLATEX_PL) $(DOXYDOCS_PM)\n"
+ "$(" << prefix << "DOXYDOCS_TEX): \\\n"
+ "$(" << prefix << "DOXYLATEX_PL) \\\n"
+ "$(" << prefix << "DOXYDOCS_PM)\n"
"\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
"\n"
- "$(DOXYTEMPLATE_TEX): $(DOXYLATEXTEMPLATE_PL) $(DOXYMODEL_PM)\n"
+ "$(" << prefix << "DOXYSTRUCTURE_TEX): \\\n"
+ "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
+ "$(" << prefix << "DOXYSTRUCTURE_PM)\n"
"\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
"\n"
- "$(DOXYLATEX_PDF) $(DOXYLATEX_DVI): $(DOXYLATEX_TEX) $(DOXYFORMAT_TEX) $(DOXYTEMPLATE_TEX) $(DOXYDOCS_TEX)\n"
+ "$(" << prefix << "DOXYLATEX_PDF) \\\n"
+ "$(" << prefix << "DOXYLATEX_DVI): \\\n"
+ "$(" << prefix << "DOXYLATEX_TEX) \\\n"
+ "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
+ "$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
+ "$(" << prefix << "DOXYDOCS_TEX)\n"
"\n"
- "$(DOXYLATEX_PDF): $(DOXYLATEX_TEX)\n"
+ "$(" << prefix << "DOXYLATEX_PDF): \\\n"
+ "$(" << prefix << "DOXYLATEX_TEX)\n"
"\tpdflatex -interaction=nonstopmode \"$<\"\n"
"\n"
- "$(DOXYLATEX_DVI): $(DOXYLATEX_TEX)\n"
+ "$(" << prefix << "DOXYLATEX_DVI): \\\n"
+ "$(" << prefix << "DOXYLATEX_TEX)\n"
"\tlatex -interaction=nonstopmode \"$<\"\n";
}
@@ -2138,6 +2309,7 @@ bool PerlModGenerator::generateMakefile()
return false;
bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
+ QString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
QTextStream makefileStream(&makefile);
makefileStream <<
@@ -2150,47 +2322,43 @@ bool PerlModGenerator::generateMakefile()
if (perlmodLatex) {
makefileStream <<
- "pdf: $(DOXYLATEX_PDF)\n"
- "dvi: $(DOXYLATEX_DVI)\n";
+ "pdf: $(" << prefix << "DOXYLATEX_PDF)\n"
+ "dvi: $(" << prefix << "DOXYLATEX_DVI)\n";
}
return true;
}
-bool PerlModGenerator::generateDoxyLatexTemplatePL()
+bool PerlModGenerator::generateDoxyLatexStructurePL()
{
- QFile doxyLatexTemplatePL;
- if (!createOutputFile(doxyLatexTemplatePL, pathDoxyLatexTemplatePL))
+ QFile doxyLatexStructurePL;
+ if (!createOutputFile(doxyLatexStructurePL, pathDoxyLatexStructurePL))
return false;
- QTextStream doxyLatexTemplatePLStream(&doxyLatexTemplatePL);
- doxyLatexTemplatePLStream <<
- "use DoxyModel;\n"
+ QTextStream doxyLatexStructurePLStream(&doxyLatexStructurePL);
+ doxyLatexStructurePLStream <<
+ "use DoxyStructure;\n"
"\n"
- "sub template($) {\n"
- "\tmy $model = $_[0];\n"
- "\tmy ($type, $name) = @$model[0, 1];\n"
- "\tif ($type eq \"string\") {\n"
- "\t\tprint \"\\\\def\\\\\" . $name . \"#1{#1}%\\n\";\n"
- "\t} elsif ($type eq \"doc\") {\n"
- "\t\tprint \"\\\\def\\\\\" . $name . \"#1{#1}%\\n\";\n"
- "\t} elsif ($type eq \"hash\") {\n"
- "\t\tmy ($key, $value);\n"
- "\t\twhile (($key, $submodel) = each %{$$model[2]}) {\n"
- "\t\t\tmy $subname = $$submodel[1];\n"
- "\t\t\tprint \"\\\\def\\\\\" . $subname . \"Empty{}%\\n\";\n"
- "\t\t\tprint \"\\\\def\\\\field\" . $subname . \"Empty{\\\\\" . $subname . \"Empty}%\\n\";\n"
- "\t\t\ttemplate($submodel);\n"
+ "sub process($) {\n"
+ "\tmy $node = $_[0];\n"
+ "\tmy ($type, $name) = @$node[0, 1];\n"
+ "\tmy $command;\n"
+ "\tif ($type eq \"string\") { $command = \"String\" }\n"
+ "\telsif ($type eq \"doc\") { $command = \"Doc\" }\n"
+ "\telsif ($type eq \"hash\") {\n"
+ "\t\t$command = \"Hash\";\n"
+ "\t\tfor my $subnode (values %{$$node[2]}) {\n"
+ "\t\t\tprocess($subnode);\n"
"\t\t}\n"
- "\t\tprint \"\\\\def\\\\\" . $name . \"{}%\\n\";\n"
- "\t} elsif ($type eq \"list\") {\n"
- "\t\ttemplate($$model[2]);\n"
- "\t\tprint \"\\\\def\\\\\" . $name . \"#1{#1}%\\n\";\n"
- "\t\tprint \"\\\\def\\\\\" . $name . \"Sep{}%\\n\";\n"
"\t}\n"
+ "\telsif ($type eq \"list\") {\n"
+ "\t\t$command = \"List\";\n"
+ "\t\tprocess($$node[2]);\n"
+ "\t}\n"
+ "\tprint \"\\\\\" . $command . \"Node{\" . $name . \"}%\\n\";\n"
"}\n"
"\n"
- "template($doxymodel);\n";
+ "process($doxystructure);\n";
return true;
}
@@ -2203,16 +2371,17 @@ bool PerlModGenerator::generateDoxyLatexPL()
QTextStream doxyLatexPLStream(&doxyLatexPL);
doxyLatexPLStream <<
- "use DoxyModel;\n"
+ "use DoxyStructure;\n"
"use DoxyDocs;\n"
"\n"
"sub latex_quote($) {\n"
"\tmy $text = $_[0];\n"
"\t$text =~ s/\\\\/\\\\textbackslash /g;\n"
+ "\t$text =~ s/\\|/\\\\textbar /g;\n"
+ "\t$text =~ s/</\\\\textless /g;\n"
+ "\t$text =~ s/>/\\\\textgreater /g;\n"
"\t$text =~ s/~/\\\\textasciitilde /g;\n"
- "\t$text =~ s/</\\\\textasciiless /g;\n"
- "\t$text =~ s/>/\\\\textasciigreater /g;\n"
- "\t$text =~ s/\\\\^/\\\\textasciicircum /g;\n"
+ "\t$text =~ s/\\^/\\\\textasciicircum /g;\n"
"\t$text =~ s/[\\$&%#_{}]/\\\\$&/g;\n"
"\tprint $text;\n"
"}\n"
@@ -2223,17 +2392,43 @@ bool PerlModGenerator::generateDoxyLatexPL()
"\t\tmy $type = $$item{type};\n"
"\t\tif ($type eq \"text\") {\n"
"\t\t\tlatex_quote($$item{content});\n"
- "\t\t} elsif ($type eq \"para\") {\n"
- "\t\t\tgenerate_doc($$item{content});\n"
- "#\t\t\tprint \"\\\\par\\n\";\n"
- "\t\t} elsif ($type eq \"bold\") {\n"
- "\t\t\tprint \"\\\\textbf{\";\n"
- "\t\t\tgenerate_doc($$item{content});\n"
- "\t\t\tprint \"}\";\n"
- "\t\t} elsif ($type eq \"emphasis\") {\n"
- "\t\t\tprint \"\\\\textit{\";\n"
- "\t\t\tgenerate_doc($$item{content});\n"
- "\t\t\tprint \"}\";\n"
+ "\t\t} elsif ($type eq \"parbreak\") {\n"
+ "\t\t\tprint \"\\n\\n\";\n"
+ "\t\t} elsif ($type eq \"style\") {\n"
+ "\t\t\tmy $style = $$item{style};\n"
+ "\t\t\tif ($$item{enable} eq \"yes\") {\n"
+ "\t\t\t\tif ($style eq \"bold\") { print '\\bfseries'; }\n"
+ "\t\t\t\tif ($style eq \"italic\") { print '\\itshape'; }\n"
+ "\t\t\t\tif ($style eq \"code\") { print '\\ttfamily'; }\n"
+ "\t\t\t} else {\n"
+ "\t\t\t\tif ($style eq \"bold\") { print '\\mdseries'; }\n"
+ "\t\t\t\tif ($style eq \"italic\") { print '\\upshape'; }\n"
+ "\t\t\t\tif ($style eq \"code\") { print '\\rmfamily'; }\n"
+ "\t\t\t}\n"
+ "\t\t\tprint '{}';\n"
+ "\t\t} elsif ($type eq \"symbol\") {\n"
+ "\t\t\tmy $symbol = $$item{symbol};\n"
+ "\t\t\tif ($symbol eq \"copyright\") { print '\\copyright'; }\n"
+ "\t\t\telsif ($symbol eq \"szlig\") { print '\\ss'; }\n"
+ "\t\t\tprint '{}';\n"
+ "\t\t} elsif ($type eq \"accent\") {\n"
+ "\t\t\tmy ($accent) = $$item{accent};\n"
+ "\t\t\tif ($accent eq \"umlaut\") { print '\\\"'; }\n"
+ "\t\t\telsif ($accent eq \"acute\") { print '\\\\\\''; }\n"
+ "\t\t\telsif ($accent eq \"grave\") { print '\\`'; }\n"
+ "\t\t\telsif ($accent eq \"circ\") { print '\\^'; }\n"
+ "\t\t\telsif ($accent eq \"tilde\") { print '\\~'; }\n"
+ "\t\t\telsif ($accent eq \"cedilla\") { print '\\c'; }\n"
+ "\t\t\telsif ($accent eq \"ring\") { print '\\r'; }\n"
+ "\t\t\tprint \"{\" . $$item{letter} . \"}\"; \n"
+ "\t\t} elsif ($type eq \"list\") {\n"
+ "\t\t\tmy $env = ($$item{style} eq \"ordered\") ? \"enumerate\" : \"itemize\";\n"
+ "\t\t\tprint \"\\n\\\\begin{\" . $env .\"}\";\n"
+ "\t\t \tfor my $subitem (@{$$item{content}}) {\n"
+ "\t\t\t\tprint \"\\n\\\\item \";\n"
+ "\t\t\t\tgenerate_doc($subitem);\n"
+ "\t\t \t}\n"
+ "\t\t\tprint \"\\n\\\\end{\" . $env .\"}\";\n"
"\t\t} elsif ($type eq \"url\") {\n"
"\t\t\tlatex_quote($$item{content});\n"
"\t\t}\n"
@@ -2241,8 +2436,8 @@ bool PerlModGenerator::generateDoxyLatexPL()
"}\n"
"\n"
"sub generate($$) {\n"
- "\tmy ($item, $model) = @_;\n"
- "\tmy ($type, $name) = @$model[0, 1];\n"
+ "\tmy ($item, $node) = @_;\n"
+ "\tmy ($type, $name) = @$node[0, 1];\n"
"\tif ($type eq \"string\") {\n"
"\t\tprint \"\\\\\" . $name . \"{\";\n"
"\t\tlatex_quote($item);\n"
@@ -2253,17 +2448,17 @@ bool PerlModGenerator::generateDoxyLatexPL()
"\t\t\tgenerate_doc($item);\n"
"\t\t\tprint \"}%\\n\";\n"
"\t\t} else {\n"
- "\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
+ "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
"\t\t}\n"
"\t} elsif ($type eq \"hash\") {\n"
"\t\tmy ($key, $value);\n"
- "\t\twhile (($key, $submodel) = each %{$$model[2]}) {\n"
- "\t\t\tmy $subname = $$submodel[1];\n"
- "\t\t\tprint \"\\\\def\\\\field\" . $subname . \"{\";\n"
+ "\t\twhile (($key, $subnode) = each %{$$node[2]}) {\n"
+ "\t\t\tmy $subname = $$subnode[1];\n"
+ "\t\t\tprint \"\\\\Defcs{field\" . $subname . \"}{\";\n"
"\t\t\tif ($$item{$key}) {\n"
- "\t\t\t\tgenerate($$item{$key}, $submodel);\n"
+ "\t\t\t\tgenerate($$item{$key}, $subnode);\n"
"\t\t\t} else {\n"
- "\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n"
+ "#\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n"
"\t\t\t}\n"
"\t\t\tprint \"}%\\n\";\n"
"\t\t}\n"
@@ -2276,17 +2471,17 @@ bool PerlModGenerator::generateDoxyLatexPL()
"\t\t\t\tif ($index) {\n"
"\t\t\t\t\tprint \"\\\\\" . $name . \"Sep%\\n\";\n"
"\t\t\t\t}\n"
- "\t\t\t\tgenerate($subitem, $$model[2]);\n"
+ "\t\t\t\tgenerate($subitem, $$node[2]);\n"
"\t\t\t\t$index++;\n"
"\t\t\t}\n"
"\t\t\tprint \"}%\\n\";\n"
"\t\t} else {\n"
- "\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
+ "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
"\t\t}\n"
"\t}\n"
"}\n"
"\n"
- "generate($doxydocs, $doxymodel);\n";
+ "generate($doxydocs, $doxystructure);\n";
return true;
}
@@ -2299,51 +2494,56 @@ bool PerlModGenerator::generateDoxyFormatTex()
QTextStream doxyFormatTexStream(&doxyFormatTex);
doxyFormatTexStream <<
- "\\input{" << pathDoxyTemplateTex << "}\n"
+ "\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n"
+ "\\Defcs{Empty}{}\n"
+ "\\def\\IfEmpty#1{\\expandafter\\ifx\\csname#1\\endcsname\\Empty}\n"
+ "\n"
+ "\\def\\StringNode#1{\\Defcs{#1}##1{##1}}\n"
+ "\\def\\DocNode#1{\\Defcs{#1}##1{##1}}\n"
+ "\\def\\ListNode#1{\\Defcs{#1}##1{##1}\\Defcs{#1Sep}{}}\n"
+ "\\def\\HashNode#1{\\Defcs{#1}{}}\n"
+ "\n"
+ "\\input{" << pathDoxyStructureTex << "}\n"
"\n"
"\\newbox\\BoxA\n"
"\\dimendef\\DimenA=151\\relax\n"
"\\dimendef\\DimenB=152\\relax\n"
"\\countdef\\ZoneDepth=151\\relax\n"
"\n"
- "\\def\\Ifxcscs#1#2{%\n"
- "\\expandafter\\let\\expandafter\\Ifxcscsa\\csname#1\\endcsname%\n"
- "\\expandafter\\let\\expandafter\\Ifxcscsb\\csname#2\\endcsname%\n"
- "\\ifx\\Ifxcscsa\\Ifxcscsb}%\n"
+ "\\def\\Cs#1{\\csname#1\\endcsname}\n"
+ "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}\n"
+ "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}\n"
+ "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}\n"
"\n"
- "\\def\\Cs#1{\\csname#1\\endcsname}%\n"
- "\\def\\Defcs#1{\\expandafter\\def\\csname#1\\endcsname}%\n"
- "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}%\n"
- "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}%\n"
- "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}%\n"
- "\n"
- "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax%\n"
- "\\raggedright#1\\vskip 0.5mm\\relax} }}%\n"
+ "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax\n"
+ "\\raggedright#1\\vskip 0.5mm\\relax} }}\n"
"\n"
"\\def\\Zone#1#2#3{%\n"
- "\\Defcs{#1}{\n"
- "\\advance\\ZoneDepth1\\relax%\n"
- "\\Letcs{Mode\\number\\ZoneDepth}0%\n"
- "\\Letcs{Present\\number\\ZoneDepth}0%\n"
- "#2%\n"
+ "\\Defcs{Test#1}{#2}%\n"
+ "\\Defcs{Emit#1}{#3}%\n"
+ "\\Defcs{#1}{%\n"
+ "\\advance\\ZoneDepth1\\relax\n"
+ "\\Letcs{Mode\\number\\ZoneDepth}0\\relax\n"
+ "\\Letcs{Present\\number\\ZoneDepth}0\\relax\n"
+ "\\Cs{Test#1}\n"
"\\expandafter\\if\\Cs{Present\\number\\ZoneDepth}1%\n"
- "\\advance\\ZoneDepth-1\\relax%\n"
- "\\Letcs{Present\\number\\ZoneDepth}1%\n"
+ "\\advance\\ZoneDepth-1\\relax\n"
+ "\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
"\\expandafter\\if\\Cs{Mode\\number\\ZoneDepth}1%\n"
- "\\advance\\ZoneDepth1\\relax%\n"
- "\\Letcs{Mode\\number\\ZoneDepth}1%\n"
- "#3%\n"
- "\\advance\\ZoneDepth-1\\relax\\fi%\n"
- "\\advance\\ZoneDepth1\\relax\\fi%\n"
- "\\advance\\ZoneDepth-1\\relax}}%\n"
+ "\\advance\\ZoneDepth1\\relax\n"
+ "\\Letcs{Mode\\number\\ZoneDepth}1\\relax\n"
+ "\\Cs{Emit#1}\n"
+ "\\advance\\ZoneDepth-1\\relax\\fi\n"
+ "\\advance\\ZoneDepth1\\relax\\fi\n"
+ "\\advance\\ZoneDepth-1\\relax}}\n"
"\n"
"\\def\\Member#1#2{%\n"
- "\\Defcs{Test#1}{\\Cs{field#1Detailed}%\n"
- "\\Ifxcscs{field#1DetailedDoc}{field#1DetailedDocEmpty}\\else\\Letcs{Present#1}1\\fi}\n"
- "\\Defcs{#1}{\\Letcs{Present#1}0%\n"
- "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1%\n"
- "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}%\n"
- "%\n"
+ "\\Defcs{Test#1}{\\Cs{field#1Detailed}\n"
+ "\\IfEmpty{field#1DetailedDoc}\\else\\Letcs{Present#1}1\\fi}\n"
+ "\\Defcs{#1}{\\Letcs{Present#1}0\\relax\n"
+ "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
+ "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}\n"
+ "\n"
"\\def\\TypedefMemberList#1#2{%\n"
"\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
"\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
@@ -2369,40 +2569,48 @@ bool PerlModGenerator::generateDoxyFormatTex()
"\\Defcs{#1PDBlocksSep}{\\vskip 2mm\\relax}%\n"
"%\n"
"\\Defcs{#1PDBlocks}##1{%\n"
- "\\Heading{Parameters:}\\vskip 1.5mm\\relax%\n"
- "\\DimenA0pt\\relax%\n"
+ "\\Heading{Parameters:}\\vskip 1.5mm\\relax\n"
+ "\\DimenA0pt\\relax\n"
"\\Defcs{#1PDBlock}{\\setbox\\BoxA\\hbox{\\Cs{field#1PDParams}}%\n"
"\\ifdim\\DimenA<\\wd\\BoxA\\DimenA\\wd\\BoxA\\fi}%\n"
"##1%\n"
"\\advance\\DimenA3mm\\relax\n"
- "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax%\n"
- "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax%\n"
- "\\Cs{field#1PDParams}}\\hfill%\n"
+ "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax\n"
+ "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax\n"
+ "\\Cs{field#1PDParams}}\\hfill\n"
"\\vtop{\\hsize\\DimenB\\relax\\Cs{field#1PDDoc}}}}%\n"
- "##1}%\n"
- "%\n"
- "\\Defcs{#1ParamName}##1{\\textit{##1}}%\n"
- "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}%\n"
- "\\Defcs{#1ParamsSep}{, }%\n"
- "%\n"
- "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
- "\\Defcs{#1See}##1{\\See{##1}}%\n"
- "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}%\n"
+ "##1}\n"
+ "\n"
+ "\\Defcs{#1ParamName}##1{\\textit{##1}}\n"
+ "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}\n"
+ "\\Defcs{#1ParamsSep}{, }\n"
+ "\n"
+ "\\Defcs{#1Name}##1{\\textbf{##1}}\n"
+ "\\Defcs{#1See}##1{\\See{##1}}\n"
+ "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}\n"
"\\Defcs{field#1Title}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}(\\Cs{field#1Params})}}%\n"
"%\n"
"\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
- "\\Member{#1}{\n"
- "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}%\n"
+ "\\Member{#1}{%\n"
+ "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}\n"
"\\Cs{field#1Return}\\Cs{field#1PDBlocks}\\Cs{field#1See}\\vskip 5mm\\relax}}\n"
"\n"
- "\\TypedefMemberList{FileTypedef}{Typedefs}%\n"
- "\\VariableMemberList{FileVariable}{Variables}%\n"
- "\\FunctionMemberList{FileFunction}{Functions}%\n"
+ "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}\n"
+ "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}\n"
+ "\n"
+ "\\def\\FileSubzones{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}\n"
"\n"
- "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}%\n"
+ "\\def\\ClassSubzones{%\n"
+ "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods\n"
+ "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods\n"
+ "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}\n"
"\n"
- "\\def\\TestFile{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}%\n"
- "\\Zone{File}{\\TestFile}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\TestFile}%\n"
+ "\\Member{Page}{\\subsection{\\fieldPageName}\\fieldPageDetailedDoc}\n"
+ "\n"
+ "\\TypedefMemberList{FileTypedef}{Typedefs}\n"
+ "\\VariableMemberList{FileVariable}{Variables}\n"
+ "\\FunctionMemberList{FileFunction}{Functions}\n"
+ "\\Zone{File}{\\FileSubzones}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\FileSubzones}\n"
"\n"
"\\TypedefMemberList{ClassPublicTypedef}{Public Typedefs}\n"
"\\TypedefMemberList{ClassProtectedTypedef}{Protected Typedefs}\n"
@@ -2413,36 +2621,29 @@ bool PerlModGenerator::generateDoxyFormatTex()
"\\FunctionMemberList{ClassPublicMethod}{Public Methods}\n"
"\\FunctionMemberList{ClassProtectedMethod}{Protected Methods}\n"
"\\FunctionMemberList{ClassPrivateMethod}{Private Methods}\n"
+ "\\Zone{Class}{\\ClassSubzones}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\ClassSubzones}\n"
"\n"
- "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}%\n"
- "\n"
- "\\def\\TestClass{%\n"
- "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods%\n"
- "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods%\n"
- "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}%\n"
- "\n"
- "\\Zone{Class}{\\TestClass}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\TestClass}%\n"
- "\n"
- "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}%\n"
- "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}%\n"
+ "\\Zone{AllPages}{\\fieldPages}{\\section{Pages}\\fieldPages}\n"
+ "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}\n"
+ "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}\n"
"\n"
- "\\newlength{\\oldparskip}%\n"
- "\\newlength{\\oldparindent}%\n"
- "\\newlength{\\oldfboxrule}%\n"
+ "\\newlength{\\oldparskip}\n"
+ "\\newlength{\\oldparindent}\n"
+ "\\newlength{\\oldfboxrule}\n"
"\n"
- "\\ZoneDepth0%\n"
- "\\Letcs{Mode0}1%\n"
+ "\\ZoneDepth0\\relax\n"
+ "\\Letcs{Mode0}1\\relax\n"
"\n"
"\\def\\EmitDoxyDocs{%\n"
- "\\setlength{\\oldparskip}{\\parskip}%\n"
- "\\setlength{\\oldparindent}{\\parindent}%\n"
- "\\setlength{\\oldfboxrule}{\\fboxrule}%\n"
- "\\setlength{\\parskip}{0cm}%\n"
- "\\setlength{\\parindent}{0cm}%\n"
- "\\setlength{\\fboxrule}{1pt}%\n"
- "\\AllFiles\\AllClasses%\n"
- "\\setlength{\\parskip}{\\oldparskip}%\n"
- "\\setlength{\\parindent}{\\oldparindent}%\n"
+ "\\setlength{\\oldparskip}{\\parskip}\n"
+ "\\setlength{\\oldparindent}{\\parindent}\n"
+ "\\setlength{\\oldfboxrule}{\\fboxrule}\n"
+ "\\setlength{\\parskip}{0cm}\n"
+ "\\setlength{\\parindent}{0cm}\n"
+ "\\setlength{\\fboxrule}{1pt}\n"
+ "\\AllPages\\AllFiles\\AllClasses\n"
+ "\\setlength{\\parskip}{\\oldparskip}\n"
+ "\\setlength{\\parindent}{\\oldparindent}\n"
"\\setlength{\\fboxrule}{\\oldfboxrule}}\n";
return true;
@@ -2467,6 +2668,7 @@ bool PerlModGenerator::generateDoxyLatexTex()
"\n"
"\\begin{document}\n"
"\\input{" << pathDoxyDocsTex << "}\n"
+ "\\sloppy\n"
"\\EmitDoxyDocs\n"
"\\end{document}\n";
@@ -2490,29 +2692,29 @@ void PerlModGenerator::generate()
bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
pathDoxyDocsPM = perlModDir.absPath() + "/DoxyDocs.pm";
- pathDoxyModelPM = perlModDir.absPath() + "/DoxyModel.pm";
+ pathDoxyStructurePM = perlModDir.absPath() + "/DoxyStructure.pm";
pathMakefile = perlModDir.absPath() + "/Makefile";
pathDoxyRules = perlModDir.absPath() + "/doxyrules.make";
if (perlmodLatex) {
- pathDoxyTemplateTex = perlModDir.absPath() + "/doxytemplate.tex";
+ pathDoxyStructureTex = perlModDir.absPath() + "/doxystructure.tex";
pathDoxyFormatTex = perlModDir.absPath() + "/doxyformat.tex";
pathDoxyLatexTex = perlModDir.absPath() + "/doxylatex.tex";
pathDoxyLatexDVI = perlModDir.absPath() + "/doxylatex.dvi";
pathDoxyLatexPDF = perlModDir.absPath() + "/doxylatex.pdf";
pathDoxyDocsTex = perlModDir.absPath() + "/doxydocs.tex";
pathDoxyLatexPL = perlModDir.absPath() + "/doxylatex.pl";
- pathDoxyLatexTemplatePL = perlModDir.absPath() + "/doxylatex-template.pl";
+ pathDoxyLatexStructurePL = perlModDir.absPath() + "/doxylatex-structure.pl";
}
if (!(generatePerlModOutput()
- && generateDoxyModelPM()
+ && generateDoxyStructurePM()
&& generateMakefile()
&& generateDoxyRules()))
return;
if (perlmodLatex) {
- if (!(generateDoxyLatexTemplatePL()
+ if (!(generateDoxyLatexStructurePL()
&& generateDoxyLatexPL()
&& generateDoxyLatexTex()
&& generateDoxyFormatTex()))
@@ -2522,7 +2724,7 @@ void PerlModGenerator::generate()
void generatePerlMod()
{
- PerlModGenerator pmg;
+ PerlModGenerator pmg(Config_getBool("PERLMOD_PRETTY"));
pmg.generate();
}
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index 7d7c102..de53e8a 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -121,6 +121,9 @@ class PrintDocVisitor : public DocVisitor
case DocStyleChange::Small:
if (s->enable()) printf("<small>"); else printf("</small>");
break;
+ case DocStyleChange::Preformatted:
+ if (s->enable()) printf("<pre>"); else printf("</pre>");
+ break;
}
}
void visit(DocVerbatim *s)
@@ -330,18 +333,18 @@ class PrintDocVisitor : public DocVisitor
indent_post();
printf("</li>\n");
}
- void visitPre(DocHtmlPre *)
- {
- indent_pre();
- printf("<pre>\n");
- m_insidePre=TRUE;
- }
- void visitPost(DocHtmlPre *)
- {
- m_insidePre=FALSE;
- indent_post();
- printf("</pre>\n");
- }
+ //void visitPre(DocHtmlPre *)
+ //{
+ // indent_pre();
+ // printf("<pre>\n");
+ // m_insidePre=TRUE;
+ //}
+ //void visitPost(DocHtmlPre *)
+ //{
+ // m_insidePre=FALSE;
+ // indent_post();
+ // printf("</pre>\n");
+ //}
void visitPre(DocHtmlDescList *)
{
indent_pre();
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index bf2731a..a11e857 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -28,7 +28,7 @@
#include "message.h"
RTFDocVisitor::RTFDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
- : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_indentLevel(0)
+ : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_indentLevel(1)
{
}
@@ -48,7 +48,7 @@ void RTFDocVisitor::incIndentLevel()
void RTFDocVisitor::decIndentLevel()
{
- if (m_indentLevel>0) m_indentLevel--;
+ if (m_indentLevel>1) m_indentLevel--;
}
//--------------------------------------
@@ -259,6 +259,21 @@ void RTFDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small:
if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
break;
+ case DocStyleChange::Preformatted:
+ if (s->enable())
+ {
+ m_t << "{" << endl;
+ m_t << "\\par" << endl;
+ m_t << rtf_Style_Reset << getStyle("CodeExample");
+ m_insidePre=TRUE;
+ }
+ else
+ {
+ m_insidePre=FALSE;
+ m_t << "\\par" << endl;
+ m_t << "}" << endl;
+ }
+ break;
}
}
@@ -585,20 +600,20 @@ void RTFDocVisitor::visitPost(DocHtmlListItem *)
{
}
-void RTFDocVisitor::visitPre(DocHtmlPre *)
-{
- m_t << "{" << endl;
- m_t << "\\par" << endl;
- m_t << rtf_Style_Reset << getStyle("CodeExample");
- m_insidePre=TRUE;
-}
+//void RTFDocVisitor::visitPre(DocHtmlPre *)
+//{
+// m_t << "{" << endl;
+// m_t << "\\par" << endl;
+// m_t << rtf_Style_Reset << getStyle("CodeExample");
+// m_insidePre=TRUE;
+//}
-void RTFDocVisitor::visitPost(DocHtmlPre *)
-{
- m_insidePre=FALSE;
- m_t << "\\par" << endl;
- m_t << "}" << endl;
-}
+//void RTFDocVisitor::visitPost(DocHtmlPre *)
+//{
+// m_insidePre=FALSE;
+// m_t << "\\par" << endl;
+// m_t << "}" << endl;
+//}
void RTFDocVisitor::visitPre(DocHtmlDescList *)
{
@@ -875,8 +890,8 @@ void RTFDocVisitor::visitPost(DocLanguage *)
void RTFDocVisitor::visitPre(DocParamSect *s)
{
m_t << "{"; // start param list
- m_t << "{\\b "; // start bold
m_t << "\\par" << endl;
+ m_t << "{\\b "; // start bold
switch(s->type())
{
case DocParamSect::Param:
@@ -896,7 +911,7 @@ void RTFDocVisitor::visitPre(DocParamSect *s)
void RTFDocVisitor::visitPost(DocParamSect *)
{
- m_t << "\\par" << endl;
+ //m_t << "\\par" << endl;
decIndentLevel();
m_t << "}" << endl;
}
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index 119eff9..40487d1 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -76,8 +76,8 @@ class RTFDocVisitor : public DocVisitor
void visitPost(DocHtmlList *s);
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
- void visitPre(DocHtmlPre *);
- void visitPost(DocHtmlPre *);
+ //void visitPre(DocHtmlPre *);
+ //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 19fc945..7965c9c 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1439,14 +1439,14 @@ void RTFGenerator::startDescription()
{
DBG_RTF(t << "{\\comment (startDescription)}" << endl)
t << "{" << endl;
- t << rtf_Style_Reset << rtf_CList_DepthStyle();
+ t << rtf_Style_Reset << rtf_DList_DepthStyle();
}
void RTFGenerator::endDescription()
{
DBG_RTF(t << "{\\comment (endDescription)}" << endl)
- t << "}";
newParagraph();
+ t << "}";
}
void RTFGenerator::startDescItem()
@@ -1758,6 +1758,7 @@ void RTFGenerator::writeRTFReference(const char *label)
void RTFGenerator::startCodeFragment()
{
+ DBG_RTF(t << "{\\comment (startCodeFragment) }" << endl)
t << "{" << endl;
newParagraph();
t << rtf_Style_Reset << rtf_Code_DepthStyle();
@@ -1974,8 +1975,11 @@ void RTFGenerator::endTextBlock()
void RTFGenerator::newParagraph()
{
+ if (!m_omitParagraph)
+ {
DBG_RTF(t << "{\\comment (newParagraph)}" << endl)
- if (!m_omitParagraph) t << "\\par" << endl;
+ t << "\\par" << endl;
+ }
m_omitParagraph = FALSE;
}
@@ -2177,6 +2181,7 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl
void RTFGenerator::startDotGraph()
{
+ DBG_RTF(t << "{\\comment (startDotGraph)}" << endl)
}
void RTFGenerator::endDotGraph(DotClassGraph &g)
@@ -2193,10 +2198,13 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
+ newParagraph();
+ DBG_RTF(t << "{\\comment (endDotGraph)}" << endl)
}
void RTFGenerator::startInclDepGraph()
{
+ DBG_RTF(t << "{\\comment (startInclDepGraph)}" << endl)
}
void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
@@ -2212,6 +2220,7 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
+ DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl)
}
/** Tests the integrity of the result by counting brackets.
diff --git a/src/util.cpp b/src/util.cpp
index 2141530..56f61c3 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -3827,18 +3827,14 @@ void filterLatexString(QTextStream &t,const char *str,
case '>': t << "$>$"; break;
case '|': t << "$|$"; break;
case '~': t << "$\\sim$"; break;
- case '[': if (Config_getBool("PDF_HYPERLINKS"))
+ case '[': if (Config_getBool("PDF_HYPERLINKS") || insideItem)
t << "\\mbox{[}";
- else if (insideItem)
- t << "\\[";
else
t << "[";
break;
case ']': if (pc=='[') t << "$\\,$";
- if (Config_getBool("PDF_HYPERLINKS"))
+ if (Config_getBool("PDF_HYPERLINKS") || insideItem)
t << "\\mbox{]}";
- else if (insideItem)
- t << "\\]";
else
t << "]";
break;
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index ca021c6..be8ca04 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -138,6 +138,18 @@ void XmlDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small:
if (s->enable()) m_t << "<small>"; else m_t << "</small> ";
break;
+ case DocStyleChange::Preformatted:
+ if (s->enable())
+ {
+ m_t << "<preformatted>";
+ m_insidePre=TRUE;
+ }
+ else
+ {
+ m_t << "</preformatted> ";
+ m_insidePre=FALSE;
+ }
+ break;
}
}
@@ -412,18 +424,6 @@ void XmlDocVisitor::visitPost(DocHtmlListItem *)
m_t << "</listitem>\n";
}
-void XmlDocVisitor::visitPre(DocHtmlPre *)
-{
- m_t << "<preformatted>\n";
- m_insidePre=TRUE;
-}
-
-void XmlDocVisitor::visitPost(DocHtmlPre *)
-{
- m_insidePre=FALSE;
- m_t << "</preformatted>\n";
-}
-
void XmlDocVisitor::visitPre(DocHtmlDescList *)
{
m_t << "<variablelist>\n";
@@ -517,12 +517,12 @@ void XmlDocVisitor::visitPost(DocHRef *)
void XmlDocVisitor::visitPre(DocHtmlHeader *header)
{
- m_t << "<sect" << header->level() << ">";
+ m_t << "<heading" << header->level() << ">";
}
void XmlDocVisitor::visitPost(DocHtmlHeader *header)
{
- m_t << "</sect" << header->level() << ">\n";
+ m_t << "</heading" << header->level() << ">\n";
}
void XmlDocVisitor::visitPre(DocImage *img)
diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h
index 045f868..95f5afe 100644
--- a/src/xmldocvisitor.h
+++ b/src/xmldocvisitor.h
@@ -76,8 +76,8 @@ class XmlDocVisitor : public DocVisitor
void visitPost(DocHtmlList *) ;
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
- void visitPre(DocHtmlPre *);
- void visitPost(DocHtmlPre *);
+ //void visitPre(DocHtmlPre *);
+ //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);