diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2002-02-18 21:34:02 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2002-02-18 21:34:02 (GMT) |
commit | fa7e820834f7e7648a24accbbaa998092034c80f (patch) | |
tree | 714079396631ac6488c45cce3d6acfb51e31f9a8 /addon/doxmlparser | |
parent | 37dc8d4605e2fa9a924a08597580d471445acc08 (diff) | |
download | Doxygen-fa7e820834f7e7648a24accbbaa998092034c80f.zip Doxygen-fa7e820834f7e7648a24accbbaa998092034c80f.tar.gz Doxygen-fa7e820834f7e7648a24accbbaa998092034c80f.tar.bz2 |
Release-1.2.14
Diffstat (limited to 'addon/doxmlparser')
-rw-r--r-- | addon/doxmlparser/Doxyfile | 2 | ||||
-rw-r--r-- | addon/doxmlparser/include/doxmlintf.h | 5 | ||||
-rw-r--r-- | addon/doxmlparser/src/dochandler.cpp | 5 | ||||
-rw-r--r-- | addon/doxmlparser/src/dochandler.h | 18 | ||||
-rw-r--r-- | addon/doxmlparser/src/doxmlintf.h | 5 | ||||
-rw-r--r-- | addon/doxmlparser/test/main.cpp | 20 |
6 files changed, 47 insertions, 8 deletions
diff --git a/addon/doxmlparser/Doxyfile b/addon/doxmlparser/Doxyfile index 50d205a..faf4bee 100644 --- a/addon/doxmlparser/Doxyfile +++ b/addon/doxmlparser/Doxyfile @@ -151,7 +151,7 @@ PERL_PATH = # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO -HAVE_DOT = YES +HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES TEMPLATE_RELATIONS = YES diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h index 0ca2cc8..03a8b3a 100644 --- a/addon/doxmlparser/include/doxmlintf.h +++ b/addon/doxmlparser/include/doxmlintf.h @@ -249,10 +249,15 @@ class IDocRef : public IDoc class IDocVariableList : public IDoc { + public: + virtual IDocIterator *entries() const = 0; }; class IDocVariableListEntry : public IDoc { + public: + virtual QString term() const = 0; + virtual IDocPara *description() const = 0; }; class IDocHRuler : public IDoc diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp index 344e457..12a3a24 100644 --- a/addon/doxmlparser/src/dochandler.cpp +++ b/addon/doxmlparser/src/dochandler.cpp @@ -805,6 +805,11 @@ void VariableListHandler::startListItem(const QXmlAttributes& attrib) m_curEntry->startListItem(attrib); } +IDocIterator *VariableListHandler::entries() const +{ + return new VariableListIterator(*this); +} + //---------------------------------------------------------------------- // HighlightHandler //---------------------------------------------------------------------- diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h index 3aaef72..0161576 100644 --- a/addon/doxmlparser/src/dochandler.h +++ b/addon/doxmlparser/src/dochandler.h @@ -533,7 +533,8 @@ class SimpleSectHandler : public IDocSimpleSect, /* \brief Node representing an named item of a VariableList. * */ -class VariableListEntryHandler : public IDocVariableListEntry, public BaseHandler<VariableListEntryHandler> +class VariableListEntryHandler : public IDocVariableListEntry, + public BaseHandler<VariableListEntryHandler> { public: virtual void startVarListEntry(const QXmlAttributes& attrib); @@ -549,6 +550,8 @@ class VariableListEntryHandler : public IDocVariableListEntry, public BaseHandle // IDocVariableListEntry virtual Kind kind() const { return VariableListEntry; } + virtual QString term() const { return m_term; } + virtual IDocPara *description() const { return m_description; } private: IBaseHandler *m_parent; @@ -562,8 +565,11 @@ class VariableListEntryHandler : public IDocVariableListEntry, public BaseHandle * */ // children: varlistentry, listitem -class VariableListHandler : public IDocVariableList, public BaseHandler<VariableListHandler> +class VariableListHandler : public IDocVariableList, + public BaseHandler<VariableListHandler> { + friend class VariableListIterator; + public: virtual void startVariableList(const QXmlAttributes& attrib); virtual void endVariableList(); @@ -575,6 +581,7 @@ class VariableListHandler : public IDocVariableList, public BaseHandler<Variable // IDocVariableList virtual Kind kind() const { return VariableList; } + virtual IDocIterator *entries() const; private: IBaseHandler *m_parent; @@ -582,6 +589,13 @@ class VariableListHandler : public IDocVariableList, public BaseHandler<Variable VariableListEntryHandler *m_curEntry; }; +class VariableListIterator : public BaseIterator<IDocIterator,IDoc,VariableListEntryHandler> +{ + public: + VariableListIterator(const VariableListHandler &handler) : + BaseIterator<IDocIterator,IDoc,VariableListEntryHandler>(handler.m_entries) {} +}; + //----------------------------------------------------------------------------- /*! \brief Node representing a highlighted text fragment. diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h index 0ca2cc8..03a8b3a 100644 --- a/addon/doxmlparser/src/doxmlintf.h +++ b/addon/doxmlparser/src/doxmlintf.h @@ -249,10 +249,15 @@ class IDocRef : public IDoc class IDocVariableList : public IDoc { + public: + virtual IDocIterator *entries() const = 0; }; class IDocVariableListEntry : public IDoc { + public: + virtual QString term() const = 0; + virtual IDocPara *description() const = 0; }; class IDocHRuler : public IDoc diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp index 092c025..c90883e 100644 --- a/addon/doxmlparser/test/main.cpp +++ b/addon/doxmlparser/test/main.cpp @@ -116,9 +116,7 @@ void DumpDoc(IDoc *doc) { IDocParameterList *list = dynamic_cast<IDocParameterList*>(doc); printf(" --- parameter list type=%d --- \n",list->listType()); - IDocListItem *li = dynamic_cast<IDocListItem*>(doc); - ASSERT(li!=0); - IDocIterator *di = li->contents(); + IDocIterator *di = list->params(); IDoc *pdoc; for (di->toFirst();(pdoc=di->current());di->toNext()) { @@ -166,14 +164,26 @@ void DumpDoc(IDoc *doc) break; case IDoc::VariableList: { - IDocVariableList *vl = dynamic_cast<IDocVariableList*>(vl); + printf(" --- start variablelist --- \n"); + IDocVariableList *vl = dynamic_cast<IDocVariableList*>(doc); ASSERT(vl!=0); + IDocIterator *di = vl->entries(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc); + } + di->release(); + printf(" --- end variablelist --- \n"); } break; case IDoc::VariableListEntry: { - IDocVariableListEntry *vle = dynamic_cast<IDocVariableListEntry*>(vle); + IDocVariableListEntry *vle = dynamic_cast<IDocVariableListEntry*>(doc); ASSERT(vle!=0); + printf(" --- start variablelistentry term=%s --- \n",vle->term().data()); + DumpDoc(vle->description()); + printf(" --- end variablelistentry --- \n"); } break; case IDoc::HRuler: |