summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-07-25 12:37:34 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-07-25 12:37:34 (GMT)
commit5f27d7a0fcea0154d7d68cfb0812e097bb0deff1 (patch)
tree5648b4ab8fb4ca6051647d47c3e8cf8d621e8782 /addon
parent655c12fb6a950ed1b59bbcc29852ce20e45fdc6a (diff)
downloadDoxygen-5f27d7a0fcea0154d7d68cfb0812e097bb0deff1.zip
Doxygen-5f27d7a0fcea0154d7d68cfb0812e097bb0deff1.tar.gz
Doxygen-5f27d7a0fcea0154d7d68cfb0812e097bb0deff1.tar.bz2
Release-1.3.3
Diffstat (limited to 'addon')
-rw-r--r--addon/doxmlparser/doxygen.dtd248
-rw-r--r--addon/doxmlparser/include/doxmlintf.h16
-rw-r--r--addon/doxmlparser/src/dochandler.cpp167
-rw-r--r--addon/doxmlparser/src/dochandler.h92
-rw-r--r--addon/doxmlparser/src/doxmlintf.h16
-rw-r--r--addon/doxmlparser/src/graphhandler.cpp4
-rw-r--r--addon/doxmlparser/src/mainhandler.cpp4
-rw-r--r--addon/doxmlparser/src/memberhandler.cpp8
-rw-r--r--addon/doxmlparser/test/main.cpp32
9 files changed, 238 insertions, 349 deletions
diff --git a/addon/doxmlparser/doxygen.dtd b/addon/doxmlparser/doxygen.dtd
deleted file mode 100644
index 319b776..0000000
--- a/addon/doxmlparser/doxygen.dtd
+++ /dev/null
@@ -1,248 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- DTD describing the grammar used in doxygen's XML output -->
-<!-- Version 0.1 December 25, 2001 -->
-<!-- Defined by Angelo Hulshout, based on works of Dimitri van Heesch -->
-
-<!-- standard character entities -->
-<!ENTITY lt "&#38;#60;">
-<!ENTITY gt "&#62;">
-<!ENTITY amp "&#38;#38;">
-<!ENTITY apos "&#39;">
-<!ENTITY quot "&#34;">
-
-<!--
- Document root
--->
-<!ELEMENT doxygen (compounddef)*>
-
-<!--
- Compound related entities and elements
--->
-<!ENTITY % compound-req.att
- 'id ID #REQUIRED
- kind (group|file|namespace|
- class|struct|union|
- interface|dispinterface|
- valuetype|library) #REQUIRED'
->
-<!ENTITY % ref-req.att 'idref IDREF #REQUIRED'
->
-<!ENTITY % inheritcompref-req.att
- '%ref-req.att;
- prot (public|protected|private) #REQUIRED
- virt (non-virtual|virtual) #REQUIRED'
->
-
-<!ELEMENT compounddef (compoundname,
- basecompoundref*,
- derivedcompoundref*,
- sectiondef*,
- briefdescription,
- detaileddescription,
- inheritancegraph?,
- collaborationgraph?,
- programlisting?,
- sourcecode?,
- location?
- )
->
-<!ATTLIST compounddef %compound-req.att;>
-
-<!ELEMENT compoundname (#PCDATA)>
-
-<!ELEMENT location (#PCDATA)>
-<!ATTLIST location file CDATA #REQUIRED line CDATA #REQUIRED >
-
-<!ELEMENT compoundref EMPTY>
-<!ATTLIST compoundref %ref-req.att;>
-
-<!ELEMENT basecompoundref EMPTY>
-<!ATTLIST basecompoundref %inheritcompref-req.att;>
-
-<!ELEMENT derivedcompoundref EMPTY>
-<!ATTLIST derivedcompoundref %inheritcompref-req.att;>
-
-<!ELEMENT memberdef (#PCDATA|type|name|briefdescription|detaileddescription|location|param|initializer|enumvalue)*>
-<!ATTLIST memberdef kind (define|property|variable|typedef|enum|function|signal|prototype|friend|dcop|slot) #REQUIRED id CDATA #REQUIRED virt (normal|virtual|pure-virtual) #REQUIRED prot (public|protected|private) #REQUIRED>
-
-<!ELEMENT briefdescription (#PCDATA|para)*>
-
-<!ELEMENT detaileddescription (#PCDATA|para)*>
-
-<!--
- Compound attributes related entities and elements
--->
-<!-- required attributes for member sections -->
-<!ENTITY % sec-req.att 'kind (user
- |public-type
- |public-func
- |public-attrib
- |public-slot
- |public-static-func
- |public-static-attrib
- |protected-type
- |protected-func
- |protected-attrib
- |protected-slot
- |protected-static-func
- |protected-static-attrib
- |private-type
- |private-func
- |private-attrib
- |private-slot
- |private-static-func
- |private-static-attrib
- |signal
- |friend
- |related
- |define|prototype|typedef|enum|func|var
- |dcop-func
- |property
- ) #REQUIRED
- '
->
-<!ENTITY % mem-req.att 'id ID #REQUIRED'>
-
-<!-- optional attributes for function -->
-<!ENTITY % func-opt.att 'virt (virtual|pure-virtual) #IMPLIED'>
-
-<!ELEMENT memberref (#PCDATA)>
-<!ATTLIST memberref %ref-req.att;>
-
-<!ELEMENT sectionlist (sectiondef)+>
-
-<!ELEMENT sectiondef (memberdef|memberlist)*>
-<!ATTLIST sectiondef %sec-req.att;>
-
-<!ELEMENT memberlist (functiondef|variabledef|typedef|definedef|enumdef)+>
-
-<!ELEMENT functiondef (type?,name,parameterlist)>
-<!ATTLIST functiondef %mem-req.att; %func-opt.att;>
-
-<!ELEMENT variabledef (type,name,array?,initializer?)>
-<!ATTLIST variabledef %mem-req.att;>
-
-<!ELEMENT parameterlist (title|parametername|parameterdescription)*>
-<!ATTLIST parameterlist kind (param|retval|exception) #REQUIRED>
-
-<!ELEMENT param (attributes?,type?,declname?,defname?,array?,defval?)>
-
-<!ELEMENT parametername (#PCDATA)>
-
-<!ELEMENT parameterdescription (#PCDATA|para)*>
-
-<!ELEMENT defparameterlist (defarg)*>
-
-<!ELEMENT defarg (#PCDATA)>
-
-<!--
- Programming language declaration related entities and elements
--->
-<!ELEMENT name (#PCDATA)>
-
-<!ELEMENT typedef (type,name)>
-<!ATTLIST typedef %mem-req.att;>
-
-<!ELEMENT definedef (name,defparameterlist?,initializer?)>
-<!ATTLIST definedef %mem-req.att;>
-
-<!ELEMENT enumdef (name,enumvaluelist)>
-<!ATTLIST enumdef %mem-req.att;>
-
-<!ELEMENT slotdef (type,name,parameterlist)>
-<!ATTLIST slotdef %mem-req.att;>
-
-<!ELEMENT signaldef (type,name,parameterlist)>
-<!ATTLIST signaldef %mem-req.att;>
-
-<!ELEMENT enumvaluelist (enumvalue)*>
-
-<!ELEMENT enumvalue (name,initializer?)>
-
-<!ELEMENT declname (#PCDATA)>
-
-<!ELEMENT defname (#PCDATA)>
-
-<!ELEMENT type (#PCDATA|memberref|compoundref|compounddef|ref)*>
-
-<!ELEMENT defval (#PCDATA|memberref|compoundref)*>
-
-<!ELEMENT initializer (#PCDATA|memberref|compoundref|ref)*>
-
-<!ELEMENT array (#PCDATA)>
-
-<!ELEMENT attributes (#PCDATA)>
-
-<!--
- Graph related entities and elements
--->
-<!ELEMENT collaborationgraph (node)*>
-
-<!ELEMENT inheritancegraph (node)*>
-
-<!ELEMENT node (label|link|childnode)*>
-<!ATTLIST node id CDATA #REQUIRED>
-
-<!ELEMENT childnode (edgelabel)*>
-<!ATTLIST childnode id CDATA #REQUIRED relation CDATA #REQUIRED>
-
-<!ELEMENT label (#PCDATA)>
-
-<!ELEMENT link EMPTY>
-<!ATTLIST link id CDATA #REQUIRED>
-
-<!ELEMENT edgelabel (#PCDATA)>
-
-<!--
- Source code listing related entities and elements
--->
-<!ELEMENT codeline (#PCDATA|highlight|ref)*>
-
-<!ELEMENT linenumber (#PCDATA|anchor)*>
-<!ATTLIST linenumber line CDATA #IMPLIED refid CDATA #IMPLIED>
-
-<!ELEMENT sourcecode (linenumber|codeline|highlight|ref)*>
-
-<!ELEMENT itemizedlist (listitem)*>
-
-<!ELEMENT listitem (#PCDATA|para)*>
-
-<!ELEMENT programlisting (#PCDATA|linenumber|codeline|linebreak|highlight)*>
-
-<!--
- Hypertext related entities and elements
--->
-<!ELEMENT ulink (#PCDATA)>
-<!ATTLIST ulink url CDATA #REQUIRED>
-
-<!ELEMENT anchor (ref)>
-<!ATTLIST anchor id CDATA #REQUIRED>
-
-<!ELEMENT ref (#PCDATA)>
-<!ATTLIST ref idref CDATA #REQUIRED anchor CDATA #IMPLIED>
-
-<!--
- Documentation layout entities and elements
--->
-<!--ELEMENT highlight (#PCDATA|ref)*-->
-<!ELEMENT highlight ANY>
-<!ATTLIST highlight class (preprocessor|keyword|keywordtype|keywordflow|stringliteral|charliteral|comment) #REQUIRED>
-
-<!ELEMENT linebreak EMPTY>
-
-<!--ELEMENT simplesect (title|para)*-->
-<!ELEMENT simplesect ANY>
-<!ATTLIST simplesect kind (see|return|author|version|since|date|bug|note|warning|par|deprecated|pre|post|invariant|remark|attention|todo|test|rcs|enumvalues|examples) #REQUIRED>
-
-<!--ELEMENT computeroutput (#PCDATA)-->
-<!ELEMENT computeroutput ANY>
-
-<!--ELEMENT emphasis (#PCDATA|ref)*-->
-<!ELEMENT emphasis ANY>
-
-<!--ELEMENT title (#PCDATA|ref)*-->
-<!ELEMENT title ANY>
-
-<!--ELEMENT para (#PCDATA|computeroutput|ref|emphasis|parameterlist|simplesect|ulink|programlisting|itemizedlist|linebreak)*-->
-<!ELEMENT para ANY>
-
diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h
index 3f7762c..51a6191 100644
--- a/addon/doxmlparser/include/doxmlintf.h
+++ b/addon/doxmlparser/include/doxmlintf.h
@@ -32,6 +32,7 @@ class IDocIterator;
class ICompound;
class ISection;
class INode;
+class IDocInternal;
/*! \brief Read only interface to a string.
*/
@@ -165,7 +166,8 @@ class IDoc
TocItem, // 33 -> IDocTocItem
Anchor, // 34 -> IDocAnchor
Symbol, // 35 -> IDocSymbol
- Root // 36 -> IDocRoot
+ Internal, // 36 -> IDocInternal
+ Root // 37 -> IDocRoot
};
virtual Kind kind() const = 0;
};
@@ -397,7 +399,17 @@ class IDocSection : public IDoc
public:
virtual const IString * id() const = 0;
virtual int level() const = 0;
- virtual IDocIterator *title() const = 0;
+ virtual IDocTitle *title() const = 0;
+ virtual IDocIterator *paragraphs() const = 0;
+ virtual IDocIterator *subSections() const = 0;
+ virtual IDocInternal *internal() const = 0;
+};
+
+class IDocInternal : public IDoc
+{
+ public:
+ virtual IDocIterator *paragraphs() const = 0;
+ virtual IDocIterator *subSections() const = 0;
};
class IDocTocList : public IDoc
diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp
index a44f7e1..7a2113a 100644
--- a/addon/doxmlparser/src/dochandler.cpp
+++ b/addon/doxmlparser/src/dochandler.cpp
@@ -2006,20 +2006,25 @@ IDocIterator *ParagraphHandler::contents() const
//----------------------------------------------------------------------
DocSectionHandler::DocSectionHandler(IBaseHandler *parent,int level)
- : m_parent(parent), m_level(level)
+ : m_parent(parent), m_internal(0), m_level(level), m_title(0)
{
- m_children.setAutoDelete(TRUE);
- m_markupHandler = new MarkupHandler(m_children,m_curString);
- setFallBackHandler(m_markupHandler);
- addStartHandler("ref",this,&DocSectionHandler::startRef);
QString sectionKey;
+ m_paragraphs.setAutoDelete(TRUE);
+ m_subsections.setAutoDelete(TRUE);
+ addStartHandler("title",this,&DocSectionHandler::startTitle);
+ addStartHandler("para",this,&DocSectionHandler::startParagraph);
+ if (level<6)
+ {
+ sectionKey.sprintf("sect%d",level+1);
+ addStartHandler(sectionKey,this,&DocSectionHandler::startSubSection);
+ }
+ addStartHandler("internal",this,&DocSectionHandler::startInternal);
sectionKey.sprintf("sect%d",level);
addEndHandler(sectionKey,this,&DocSectionHandler::endDocSection);
}
DocSectionHandler::~DocSectionHandler()
{
- delete m_markupHandler;
}
void DocSectionHandler::startDocSection(const QXmlAttributes& attrib)
@@ -2027,44 +2032,112 @@ void DocSectionHandler::startDocSection(const QXmlAttributes& attrib)
m_parent->setDelegate(this);
debug(2,"Start docsection\n");
m_id = attrib.value("id");
- m_curString="";
}
void DocSectionHandler::endDocSection()
{
- addTextNode();
m_parent->setDelegate(0);
debug(2,"End docsection\n");
}
-void DocSectionHandler::addTextNode()
+void DocSectionHandler::startSubSection(const QXmlAttributes& attrib)
{
- if (!m_curString.isEmpty())
- {
- 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="";
- }
+ DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1);
+ secHandler->startDocSection(attrib);
+ m_subsections.append(secHandler);
}
-void DocSectionHandler::startRef(const QXmlAttributes& attrib)
+void DocSectionHandler::startParagraph(const QXmlAttributes& attrib)
+{
+ ParagraphHandler *parHandler = new ParagraphHandler(this);
+ parHandler->startParagraph(attrib);
+ m_paragraphs.append(parHandler);
+}
+
+void DocSectionHandler::startInternal(const QXmlAttributes& attrib)
+{
+ m_internal = new DocInternalHandler(this,m_level);
+ m_internal->startInternal(attrib);
+}
+
+void DocSectionHandler::startTitle(const QXmlAttributes& attrib)
+{
+ m_title = new TitleHandler(this);
+ m_title->startTitle(attrib);
+}
+
+IDocIterator *DocSectionHandler::paragraphs() const
+{
+ return new DocSectionParaIterator(*this);
+}
+
+IDocIterator *DocSectionHandler::subSections() const
+{
+ return new DocSectionSubIterator(*this);
+}
+
+IDocInternal *DocSectionHandler::internal() const
+{
+ return m_internal;
+}
+
+//----------------------------------------------------------------------
+// DocInternal
+//----------------------------------------------------------------------
+
+DocInternalHandler::DocInternalHandler(IBaseHandler *parent,int level)
+ : m_parent(parent), m_level(level)
+{
+ m_paragraphs.setAutoDelete(TRUE);
+ m_subsections.setAutoDelete(TRUE);
+ addStartHandler("para",this,&DocInternalHandler::startParagraph);
+ QString sectionKey;
+ sectionKey.sprintf("sect%d",level+1);
+ addStartHandler(sectionKey,this,&DocInternalHandler::startSubSection);
+ addEndHandler("internal",this,&DocInternalHandler::endInternal);
+}
+
+DocInternalHandler::~DocInternalHandler()
{
- RefHandler *ref = new RefHandler(this);
- ref->startRef(attrib);
- m_children.append(ref);
}
-IDocIterator *DocSectionHandler::title() const
+void DocInternalHandler::startInternal(const QXmlAttributes&)
{
- return new DocSectionIterator(*this);
+ m_parent->setDelegate(this);
+ debug(2,"Start internal\n");
+}
+
+void DocInternalHandler::endInternal()
+{
+ m_parent->setDelegate(0);
+ debug(2,"End internal\n");
+}
+
+void DocInternalHandler::startSubSection(const QXmlAttributes& attrib)
+{
+ DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1);
+ secHandler->startDocSection(attrib);
+ m_subsections.append(secHandler);
}
+void DocInternalHandler::startParagraph(const QXmlAttributes& attrib)
+{
+ ParagraphHandler *parHandler = new ParagraphHandler(this);
+ parHandler->startParagraph(attrib);
+ m_paragraphs.append(parHandler);
+}
+
+IDocIterator *DocInternalHandler::paragraphs() const
+{
+ return new DocInternalParaIterator(*this);
+}
+
+IDocIterator *DocInternalHandler::subSections() const
+{
+ return new DocInternalSubIterator(*this);
+}
+
+
//----------------------------------------------------------------------
// DocHandler
//----------------------------------------------------------------------
@@ -2079,11 +2152,6 @@ DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent)
addStartHandler("para",this,&DocHandler::startParagraph);
addStartHandler("sect1",this,&DocHandler::startSect1);
- addStartHandler("sect2",this,&DocHandler::startSect2);
- addStartHandler("sect3",this,&DocHandler::startSect3);
- addStartHandler("sect4",this,&DocHandler::startSect4);
- addStartHandler("sect5",this,&DocHandler::startSect5);
- addStartHandler("sect6",this,&DocHandler::startSect6);
addStartHandler("title",this,&DocHandler::startTitle);
addStartHandler("internal");
}
@@ -2118,41 +2186,6 @@ void DocHandler::startSect1(const QXmlAttributes& attrib)
m_children.append(secHandler);
}
-void DocHandler::startSect2(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,2);
- secHandler->startDocSection(attrib);
- m_children.append(secHandler);
-}
-
-void DocHandler::startSect3(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,3);
- secHandler->startDocSection(attrib);
- m_children.append(secHandler);
-}
-
-void DocHandler::startSect4(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,4);
- secHandler->startDocSection(attrib);
- m_children.append(secHandler);
-}
-
-void DocHandler::startSect5(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,5);
- secHandler->startDocSection(attrib);
- m_children.append(secHandler);
-}
-
-void DocHandler::startSect6(const QXmlAttributes& attrib)
-{
- DocSectionHandler *secHandler = new DocSectionHandler(this,6);
- secHandler->startDocSection(attrib);
- m_children.append(secHandler);
-}
-
void DocHandler::startTitle(const QXmlAttributes& attrib)
{
TitleHandler *titleHandler = new TitleHandler(this);
diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h
index 349e955..e508bd6 100644
--- a/addon/doxmlparser/src/dochandler.h
+++ b/addon/doxmlparser/src/dochandler.h
@@ -26,6 +26,7 @@
#include "baseiterator.h"
class ParagraphHandler;
+class DocInternalHandler;
class LinkedTextImpl;
class LinkedTextHandler;
@@ -72,6 +73,7 @@ DEFINE_CLS_IMPL(DocTocList);
DEFINE_CLS_IMPL(DocTocItem);
DEFINE_CLS_IMPL(DocAnchor);
DEFINE_CLS_IMPL(DocSymbol);
+DEFINE_CLS_IMPL(DocInternal);
DEFINE_CLS_IMPL(DocRoot);
//-----------------------------------------------------------------------------
@@ -1186,44 +1188,97 @@ class SymbolHandler : public DocSymbolImpl, public BaseHandler<SymbolHandler>
/*! \brief Node representing a section.
*
*/
-// children: text, ref
-// children handled by MarkupHandler:
-// bold, computeroutput, emphasis, center,
-// small, subscript, superscript.
+// children: title, para, sect(n+1)
class DocSectionHandler : public DocSectionImpl, public BaseHandler<DocSectionHandler>
{
- friend class DocSectionIterator;
+ friend class DocSectionParaIterator;
+ friend class DocSectionSubIterator;
public:
DocSectionHandler(IBaseHandler *parent,int level);
virtual ~DocSectionHandler();
virtual void startDocSection(const QXmlAttributes& attrib);
virtual void endDocSection();
- virtual void startRef(const QXmlAttributes& attrib);
- void addTextNode();
+ virtual void startTitle(const QXmlAttributes& attrib);
+ virtual void startSubSection(const QXmlAttributes& attrib);
+ virtual void startParagraph(const QXmlAttributes& attrib);
+ virtual void startInternal(const QXmlAttributes& attrib);
// IDocSection
virtual Kind kind() const { return DocImpl::Section; }
virtual const IString *id() const { return &m_id; }
virtual int level() const { return m_level; }
- virtual IDocIterator *title() const;
+ virtual IDocTitle *title() const { return m_title; }
+ virtual IDocIterator *paragraphs() const;
+ virtual IDocIterator *subSections() const;
+ virtual IDocInternal *internal() const;
private:
- IBaseHandler *m_parent;
- QList<DocImpl> m_children;
- MarkupHandler *m_markupHandler;
- StringImpl m_id;
- int m_level;
+ IBaseHandler *m_parent;
+ QList<DocImpl> m_paragraphs;
+ QList<DocImpl> m_subsections;
+ DocInternalHandler *m_internal;
+ StringImpl m_id;
+ int m_level;
+ TitleHandler *m_title;
};
-class DocSectionIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
+class DocSectionParaIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
{
public:
- DocSectionIterator(const DocSectionHandler &handler) :
- BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
+ DocSectionParaIterator(const DocSectionHandler &handler) :
+ BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_paragraphs) {}
+};
+
+class DocSectionSubIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
+{
+ public:
+ DocSectionSubIterator(const DocSectionHandler &handler) :
+ BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_subsections) {}
};
//-----------------------------------------------------------------------------
+class DocInternalHandler : public DocInternalImpl, public BaseHandler<DocInternalHandler>
+{
+ public:
+ friend class DocInternalParaIterator;
+ friend class DocInternalSubIterator;
+ DocInternalHandler(IBaseHandler *parent,int level);
+ virtual ~DocInternalHandler();
+ virtual void startInternal(const QXmlAttributes& attrib);
+ virtual void endInternal();
+ virtual void startSubSection(const QXmlAttributes& attrib);
+ virtual void startParagraph(const QXmlAttributes& attrib);
+
+ // IDocInternal
+ virtual Kind kind() const { return DocImpl::Internal; }
+ virtual IDocIterator *paragraphs() const;
+ virtual IDocIterator *subSections() const;
+
+ private:
+ IBaseHandler *m_parent;
+ QList<DocImpl> m_paragraphs;
+ QList<DocImpl> m_subsections;
+ int m_level;
+};
+
+class DocInternalParaIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
+{
+ public:
+ DocInternalParaIterator(const DocInternalHandler &handler) :
+ BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_paragraphs) {}
+};
+
+class DocInternalSubIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
+{
+ public:
+ DocInternalSubIterator(const DocInternalHandler &handler) :
+ BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_subsections) {}
+};
+
+
+//-----------------------------------------------------------------------------
+
/*! \brief Node representing a documentation block.
*
*/
@@ -1236,11 +1291,6 @@ class DocHandler : public DocRootImpl, public BaseHandler<DocHandler>
virtual void endDoc();
virtual void startParagraph(const QXmlAttributes& attrib);
virtual void startSect1(const QXmlAttributes& attrib);
- virtual void startSect2(const QXmlAttributes& attrib);
- virtual void startSect3(const QXmlAttributes& attrib);
- virtual void startSect4(const QXmlAttributes& attrib);
- virtual void startSect5(const QXmlAttributes& attrib);
- virtual void startSect6(const QXmlAttributes& attrib);
virtual void startTitle(const QXmlAttributes& attrib);
DocHandler(IBaseHandler *parent);
diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h
index 3f7762c..51a6191 100644
--- a/addon/doxmlparser/src/doxmlintf.h
+++ b/addon/doxmlparser/src/doxmlintf.h
@@ -32,6 +32,7 @@ class IDocIterator;
class ICompound;
class ISection;
class INode;
+class IDocInternal;
/*! \brief Read only interface to a string.
*/
@@ -165,7 +166,8 @@ class IDoc
TocItem, // 33 -> IDocTocItem
Anchor, // 34 -> IDocAnchor
Symbol, // 35 -> IDocSymbol
- Root // 36 -> IDocRoot
+ Internal, // 36 -> IDocInternal
+ Root // 37 -> IDocRoot
};
virtual Kind kind() const = 0;
};
@@ -397,7 +399,17 @@ class IDocSection : public IDoc
public:
virtual const IString * id() const = 0;
virtual int level() const = 0;
- virtual IDocIterator *title() const = 0;
+ virtual IDocTitle *title() const = 0;
+ virtual IDocIterator *paragraphs() const = 0;
+ virtual IDocIterator *subSections() const = 0;
+ virtual IDocInternal *internal() const = 0;
+};
+
+class IDocInternal : public IDoc
+{
+ public:
+ virtual IDocIterator *paragraphs() const = 0;
+ virtual IDocIterator *subSections() const = 0;
};
class IDocTocList : public IDoc
diff --git a/addon/doxmlparser/src/graphhandler.cpp b/addon/doxmlparser/src/graphhandler.cpp
index a11273d..7816970 100644
--- a/addon/doxmlparser/src/graphhandler.cpp
+++ b/addon/doxmlparser/src/graphhandler.cpp
@@ -110,7 +110,7 @@ void NodeHandler::endNode()
void NodeHandler::startLink(const QXmlAttributes &attrib)
{
- m_link = attrib.value("id");
+ m_link = attrib.value("refid");
}
void NodeHandler::endLink()
@@ -156,7 +156,7 @@ ChildNodeHandler::~ChildNodeHandler()
void ChildNodeHandler::startChildNode(const QXmlAttributes &attrib)
{
debug(2,"startChildNode\n");
- m_id = attrib.value("id");
+ m_id = attrib.value("refid");
m_relationString = attrib.value("relation");
m_relation = s_edgeRelationMapper->stringToNodeRelation(m_relationString);
m_parent->setDelegate(this);
diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp
index d6fcb2b..09d12c7 100644
--- a/addon/doxmlparser/src/mainhandler.cpp
+++ b/addon/doxmlparser/src/mainhandler.cpp
@@ -94,8 +94,8 @@ MainHandler::MainHandler() : m_compoundDict(2999), m_compoundNameDict(2999),
{
m_compounds.setAutoDelete(TRUE);
m_memberNameDict.setAutoDelete(TRUE);
- addStartHandler("doxygen");
- addEndHandler("doxygen");
+ addStartHandler("doxygenindex");
+ addEndHandler("doxygenindex");
addStartHandler("compound",this,&MainHandler::startCompound);
addEndHandler("compound");
addStartHandler("member",this,&MainHandler::startMember);
diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp
index 062ea4a..a46df85 100644
--- a/addon/doxmlparser/src/memberhandler.cpp
+++ b/addon/doxmlparser/src/memberhandler.cpp
@@ -285,7 +285,7 @@ void MemberHandler::startLocation(const QXmlAttributes& attrib)
void MemberHandler::startReferences(const QXmlAttributes& attrib)
{
MemberReference *mr = new MemberReference;
- mr->m_memId = attrib.value("id");
+ mr->m_memId = attrib.value("refid");
m_references.append(mr);
m_curString="";
}
@@ -298,7 +298,7 @@ void MemberHandler::endReferences()
void MemberHandler::startReferencedBy(const QXmlAttributes& attrib)
{
MemberReference *mr = new MemberReference;
- mr->m_memId = attrib.value("id");
+ mr->m_memId = attrib.value("refid");
m_referencedBy.append(mr);
m_curString="";
}
@@ -311,7 +311,7 @@ void MemberHandler::endReferencedBy()
void MemberHandler::startReimplements(const QXmlAttributes& attrib)
{
m_reimplements = new MemberReference;
- m_reimplements->m_memId = attrib.value("id");
+ m_reimplements->m_memId = attrib.value("refid");
m_curString="";
}
@@ -323,7 +323,7 @@ void MemberHandler::endReimplements()
void MemberHandler::startReimplementedBy(const QXmlAttributes& attrib)
{
MemberReference *mr = new MemberReference;
- mr->m_memId = attrib.value("id");
+ mr->m_memId = attrib.value("refid");
m_reimplementedBy.append(mr);
m_curString="";
}
diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp
index c066a24..639cacb 100644
--- a/addon/doxmlparser/test/main.cpp
+++ b/addon/doxmlparser/test/main.cpp
@@ -372,15 +372,45 @@ void DumpDoc(IDoc *doc,int level)
ASSERT(sec!=0);
InPrint(("<section id=`%s' level=%d>\n",
sec->id()->latin1(),sec->level()));
- IDocIterator *di = sec->title();
+ DumpDoc(sec->title(),level+1);
+ IDocIterator *di = sec->paragraphs();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc,level+1);
}
+ di=sec->subSections();
+ for (di->toFirst();(pdoc=di->current());di->toNext())
+ {
+ DumpDoc(pdoc,level+1);
+ }
+ IDocInternal *intern = sec->internal();
+ if (intern)
+ {
+ DumpDoc(intern,level+1);
+ }
InPrint(("</section>\n"));
}
break;
+ case IDoc::Internal:
+ {
+ IDocInternal *intern = dynamic_cast<IDocInternal*>(doc);
+ ASSERT(intern!=0);
+ InPrint(("<internal>\n"));
+ IDocIterator *di = intern->paragraphs();
+ IDoc *pdoc;
+ for (di->toFirst();(pdoc=di->current());di->toNext())
+ {
+ DumpDoc(pdoc,level+1);
+ }
+ di=intern->subSections();
+ for (di->toFirst();(pdoc=di->current());di->toNext())
+ {
+ DumpDoc(pdoc,level+1);
+ }
+ InPrint(("</internal>\n"));
+ }
+ break;
case IDoc::Copy:
{
IDocCopy *cpy = dynamic_cast<IDocCopy*>(doc);