diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-01-10 21:15:46 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-01-10 21:15:46 (GMT) |
commit | fd8b446f8ae60e7d1dc259c6f5fe38c287377d19 (patch) | |
tree | ab92980b31825ec310269f7799b1076422132a3e /src/docparser.h | |
parent | 8a65c23b74c33c38b4d1234e76cec74bd08cea69 (diff) | |
download | Doxygen-fd8b446f8ae60e7d1dc259c6f5fe38c287377d19.zip Doxygen-fd8b446f8ae60e7d1dc259c6f5fe38c287377d19.tar.gz Doxygen-fd8b446f8ae60e7d1dc259c6f5fe38c287377d19.tar.bz2 |
Release-1.7.6.1-20120110
Diffstat (limited to 'src/docparser.h')
-rw-r--r-- | src/docparser.h | 78 |
1 files changed, 42 insertions, 36 deletions
diff --git a/src/docparser.h b/src/docparser.h index 1e1fb0e..4e8587c 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -132,7 +132,8 @@ class DocNode Kind_InternalRef = 45, Kind_Copy = 46, Kind_Text = 47, - Kind_MscFile = 48 + Kind_MscFile = 48, + Kind_HtmlBlockQuote = 49 }; /*! Creates a new node */ DocNode() : m_parent(0), m_insidePre(FALSE) {} @@ -182,6 +183,8 @@ template<class T> class CompAccept for (cli.toFirst();(n=cli.current());++cli) n->accept(v); v->visitPost(obj); } + const QList<DocNode> &children() const { return m_children; } + QList<DocNode> &children() { return m_children; } protected: QList<DocNode> m_children; @@ -508,7 +511,7 @@ class DocIndexEntry : public DocNode //----------------------------------------------------------------------- /*! @brief Node representing a copy of documentation block. */ -class DocCopy : public CompAccept<DocCopy>, public DocNode +class DocCopy : /*public CompAccept<DocCopy>,*/ public DocNode { public: DocCopy(DocNode *parent,const QCString &link,bool copyBrief,bool copyDetails) @@ -516,8 +519,8 @@ class DocCopy : public CompAccept<DocCopy>, public DocNode m_copyBrief(copyBrief), m_copyDetails(copyDetails) { m_parent = parent; } Kind kind() const { return Kind_Copy; } QCString link() const { return m_link; } - void accept(DocVisitor *v) { CompAccept<DocCopy>::accept(this,v); } - void parse(); + void accept(DocVisitor * /*v*/) { /*CompAccept<DocCopy>::accept(this,v);*/ } + void parse(QList<DocNode> &children); private: QCString m_link; @@ -546,6 +549,24 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode int m_depth; }; +/*! @brief Node representing an item of a auto list */ +class DocAutoListItem : public CompAccept<DocAutoListItem>, public DocNode +{ + public: + DocAutoListItem(DocNode *parent,int indent,int num) + : m_indent(indent), m_itemNum(num) + { m_parent = parent; } + Kind kind() const { return Kind_AutoListItem; } + int itemNumber() const { return m_itemNum; } + void accept(DocVisitor *v) { CompAccept<DocAutoListItem>::accept(this,v); } + int parse(); + + private: + int m_indent; + int m_itemNum; +}; + + /*! @brief Node representing a simple section title */ class DocTitle : public CompAccept<DocTitle>, public DocNode @@ -574,7 +595,6 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode QCString key() const { return m_key; } void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); } bool parse(); - const QList<DocNode> &children() const { return m_children; } private: int m_id; @@ -848,7 +868,6 @@ class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode QCString anchor() const { return m_anchor; } void accept(DocVisitor *v) { CompAccept<DocSecRefItem>::accept(this,v); } void parse(); - const QList<DocNode> &children() const { return m_children; } private: QCString m_target; @@ -930,7 +949,6 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode int parseRcs(); int parseXml(); void appendLinkWord(const QCString &word); - const QList<DocNode> &children() const { return m_children; } private: Type m_type; @@ -995,8 +1013,6 @@ class DocPara : public CompAccept<DocPara>, public DocNode void markLast(bool v=TRUE) { m_isLast=v; } bool isFirst() const { return m_isFirst; } bool isLast() const { return m_isLast; } - const QList<DocNode> &children() const { return m_children; } - QList<DocNode> &children() { return m_children; } int handleCommand(const QCString &cmdName); int handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs); @@ -1018,6 +1034,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode void handleInheritDoc(); int handleStartCode(); int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level); + bool injectToken(int tok,const QCString &tokText); private: @@ -1068,28 +1085,6 @@ class DocParamList : public DocNode bool m_isLast; }; -/*! @brief Node representing an item of a auto list */ -class DocAutoListItem : public DocNode -{ - public: - DocAutoListItem(DocNode *parent,int num) : m_itemNum(num) - { m_paragraph=new DocPara(this); m_parent = parent; } - virtual ~DocAutoListItem() { delete m_paragraph; } - Kind kind() const { return Kind_AutoListItem; } - int itemNumber() const { return m_itemNum; } - void accept(DocVisitor *v) - { - v->visitPre(this); - m_paragraph->accept(v); - v->visitPost(this); - } - int parse(); - - private: - DocPara *m_paragraph; - int m_itemNum; -}; - /*! @brief Node representing a simple list item */ class DocSimpleListItem : public DocNode { @@ -1122,7 +1117,6 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); } int parse(); int parseXml(); - const QList<DocNode> &children() const { return m_children; } private: HtmlAttribList m_attribs; @@ -1138,7 +1132,6 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode const HtmlAttribList &attribs() const { return m_attribs; } void accept(DocVisitor *v) { CompAccept<DocHtmlDescData>::accept(this,v); } int parse(); - const QList<DocNode> &children() const { return m_children; } private: HtmlAttribList m_attribs; @@ -1159,7 +1152,6 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode void markFirst(bool v=TRUE) { m_isFirst=v; } void markLast(bool v=TRUE) { m_isLast=v; } const HtmlAttribList &attribs() const { return m_attribs; } - const QList<DocNode> &children() const { return m_children; } int parse(); int parseXml(); @@ -1221,7 +1213,22 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode private: DocHtmlCaption *m_caption; - HtmlAttribList m_attribs; + HtmlAttribList m_attribs; +}; + +/*! @brief Node representing an HTML blockquote */ +class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote>, public DocNode +{ + public: + DocHtmlBlockQuote(DocNode *parent,const HtmlAttribList &attribs) + : m_attribs(attribs) { m_parent = parent; } + Kind kind() const { return Kind_HtmlBlockQuote; } + int parse(); + void accept(DocVisitor *v) { CompAccept<DocHtmlBlockQuote>::accept(this,v); } + const HtmlAttribList &attribs() const { return m_attribs; } + + private: + HtmlAttribList m_attribs; }; /*! @brief Root node of a text fragment */ @@ -1244,7 +1251,6 @@ class DocRoot : public CompAccept<DocRoot>, public DocNode void parse(); bool indent() const { return m_indent; } bool singleLine() const { return m_singleLine; } - const QList<DocNode> &children() const { return m_children; } private: bool m_indent; |