diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-09-23 17:28:38 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-09-23 17:28:38 (GMT) |
commit | 86502f97ecaea3254217d723b5f10b6405495184 (patch) | |
tree | 66859557d84fe96d692e8d6ee0a72d639a25b283 /addon/xmlparse/dochandler.h | |
parent | 4ce0e4344711a79781e2f6d64f2553ab4b45c4a5 (diff) | |
download | Doxygen-86502f97ecaea3254217d723b5f10b6405495184.zip Doxygen-86502f97ecaea3254217d723b5f10b6405495184.tar.gz Doxygen-86502f97ecaea3254217d723b5f10b6405495184.tar.bz2 |
Release-1.2.10-20010923
Diffstat (limited to 'addon/xmlparse/dochandler.h')
-rw-r--r-- | addon/xmlparse/dochandler.h | 151 |
1 files changed, 143 insertions, 8 deletions
diff --git a/addon/xmlparse/dochandler.h b/addon/xmlparse/dochandler.h index 4dc50c5..c805371 100644 --- a/addon/xmlparse/dochandler.h +++ b/addon/xmlparse/dochandler.h @@ -53,7 +53,13 @@ class DocNode ListItem, ParameterList, Parameter, - SimpleSect + SimpleSect, + Title, + Ref, + VariableList, + VariableListEntry, + HRuler, + LineBreak }; DocNode(NodeKind k) : m_kind(k) {} virtual ~DocNode() {} @@ -223,6 +229,85 @@ class ParameterListHandler : public DocNode, //----------------------------------------------------------------------------- +/* \brief Node representing a horizontal ruler + * + */ +class LineBreakHandler : public DocNode, public BaseHandler<LineBreakHandler> +{ + public: + LineBreakHandler(IBaseHandler *parent); + virtual ~LineBreakHandler(); + + void startLineBreak(const QXmlAttributes& attrib); + void endLineBreak(); + + private: + IBaseHandler *m_parent; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a horizontal ruler + * + */ +class HRulerHandler : public DocNode, public BaseHandler<HRulerHandler> +{ + public: + HRulerHandler(IBaseHandler *parent); + virtual ~HRulerHandler(); + + void startHRuler(const QXmlAttributes& attrib); + void endHRuler(); + + private: + IBaseHandler *m_parent; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing a reference to another item + * + */ +class RefHandler : public DocNode, public BaseHandler<RefHandler> +{ + public: + RefHandler(IBaseHandler *parent); + virtual ~RefHandler(); + void startRef(const QXmlAttributes& attrib); + void endRef(); + private: + IBaseHandler *m_parent; + QCString m_refId; + QCString m_anchor; + QCString m_linkText; +}; + +//----------------------------------------------------------------------------- + +/* \brief Node representing the title of a section + * + */ +// children: text, ref +// children handled by MarkupHandler: +// bold, computeroutput, emphasis, center, +// small, subscript, superscript. +class TitleHandler : public DocNode, public BaseHandler<TitleHandler> +{ + public: + TitleHandler(IBaseHandler *parent); + virtual ~TitleHandler(); + virtual void startTitle(const QXmlAttributes& attrib); + virtual void endTitle(); + virtual void startRef(const QXmlAttributes& attrib); + void addTextNode(); + private: + IBaseHandler *m_parent; + QList<DocNode> m_children; + MarkupHandler *m_markupHandler; +}; + +//----------------------------------------------------------------------------- + /* \brief Node representing a simple section with an unnumbered header. * */ @@ -244,15 +329,58 @@ class SimpleSectHandler : public DocNode, virtual void startSimpleSect(const QXmlAttributes& attrib); virtual void endSimpleSect(); virtual void startTitle(const QXmlAttributes& attrib); - virtual void endTitle(); virtual void startParagraph(const QXmlAttributes& attrib); private: IBaseHandler *m_parent; ParagraphHandler *m_paragraph; Types m_type; - // TODO: a title can also contain links (for todo sections for instance!) - QString m_title; + TitleHandler *m_title; +}; + +//----------------------------------------------------------------------------- + +class VariableListEntryHandler : public DocNode, public BaseHandler<VariableListEntryHandler> +{ + public: + virtual void startVarListEntry(const QXmlAttributes& attrib); + virtual void endVarListEntry(); + virtual void startListItem(const QXmlAttributes& attrib); + virtual void endListItem(); + virtual void startTerm(const QXmlAttributes& attrib); + virtual void endTerm(); + virtual void startParagraph(const QXmlAttributes& attrib); + + VariableListEntryHandler(IBaseHandler *parent); + virtual ~VariableListEntryHandler(); + + private: + IBaseHandler *m_parent; + QString m_term; + ParagraphHandler *m_description; +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing a list of named items. + * + */ +// children: varlistentry, listitem +class VariableListHandler : public DocNode, public BaseHandler<VariableListHandler> +{ + public: + virtual void startVariableList(const QXmlAttributes& attrib); + virtual void endVariableList(); + virtual void startVarListEntry(const QXmlAttributes& attrib); + virtual void startListItem(const QXmlAttributes& attrib); + + VariableListHandler(IBaseHandler *parent); + virtual ~VariableListHandler(); + + private: + IBaseHandler *m_parent; + QList<VariableListEntryHandler> m_entries; + VariableListEntryHandler *m_curEntry; }; //----------------------------------------------------------------------------- @@ -260,10 +388,13 @@ class SimpleSectHandler : public DocNode, /*! \brief Node representing a paragraph of text and commands. * */ -// children: itemizedlist, orderedlist, parameterlist, simplesect, -// programlisting, hruler, variablelist, -// linebreak, nonbreakablespace, ref, ulink, email, -// table, link, indexentry, formula, image, dotfile, ref +// children: itemizedlist, orderedlist, parameterlist, simplesect, ref, +// variablelist, hruler, linebreak, +// TODO: +// ulink, email, link +// table, +// programlisting, +// indexentry, formula, image, dotfile // children handled by MarkupHandler: // bold, computeroutput, emphasis, center, // small, subscript, superscript. @@ -276,6 +407,10 @@ class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler> virtual void startOrderedList(const QXmlAttributes& attrib); virtual void startParameterList(const QXmlAttributes& attrib); virtual void startSimpleSect(const QXmlAttributes& attrib); + virtual void startRef(const QXmlAttributes& attrib); + virtual void startVariableList(const QXmlAttributes& attrib); + virtual void startHRuler(const QXmlAttributes& attrib); + virtual void startLineBreak(const QXmlAttributes& attrib); ParagraphHandler(IBaseHandler *parent); virtual ~ParagraphHandler(); |