diff options
Diffstat (limited to 'src/docparser.h')
-rw-r--r-- | src/docparser.h | 160 |
1 files changed, 88 insertions, 72 deletions
diff --git a/src/docparser.h b/src/docparser.h index 02c727d..8fcbed6 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -34,6 +34,14 @@ class MemberGroup; class SectionDict; //--------------------------------------------------------------------------- +QString::Direction getTextDirByConfig(const QString &text); +QString::Direction getTextDirByConfig(const DocNode *node); +QString::Direction getTextDirByConfig(const DocPara *para, int nodeIndex); +QCString getDirHtmlClassOfNode(QString::Direction textDir, const char *initValue = NULL); +QCString getDirHtmlClassOfPage(QCString pageTitle); +QCString getHtmlDirEmbedingChar(QString::Direction textDir); +QCString getJsDirEmbedingChar(QString::Direction textDir); +//--------------------------------------------------------------------------- /*! Main entry point for the documentation parser. @@ -157,6 +165,9 @@ class DocNode /*! Returns TRUE iff this node is inside a preformatted section */ bool isPreformatted() const { return m_insidePre; } + virtual QString::Direction getTextDir() const { return QString::DirNeutral; } + virtual QString::Direction getTextBasicDir() const { return QString::DirNeutral; } + protected: /*! Sets whether or not this item is inside a preformatted section */ void setInsidePreformatted(bool p) { m_insidePre = p; } @@ -169,13 +180,13 @@ class DocNode /** Default accept implementation for compound nodes in the abstract * syntax tree. */ -template<class T> class CompAccept +template<class T> class CompAccept : public DocNode { public: CompAccept() { m_children.setAutoDelete(TRUE); } - virtual ~CompAccept() {} - void accept(T *obj, DocVisitor *v) - { + void accept(DocVisitor *v) + { + T *obj = dynamic_cast<T *>(this); v->visitPre(obj); QListIterator<DocNode> cli(m_children); DocNode *n; @@ -184,6 +195,38 @@ template<class T> class CompAccept } const QList<DocNode> &children() const { return m_children; } QList<DocNode> &children() { return m_children; } + QString::Direction getTextDir(int nodeIndex) const + { + unsigned char resultDir = QString::DirNeutral; + for (uint i = nodeIndex; i < m_children.count(); i++) + { + DocNode* node = m_children.at(i); + QString::Direction nodeDir = node->getTextDir(); + resultDir |= nodeDir; + if (resultDir == QString::DirMixed) + return QString::DirMixed; + } + return static_cast<QString::Direction>(resultDir); + } + QString::Direction getTextBasicDir(int nodeIndex) const + { + for (uint i = nodeIndex; i < m_children.count(); i++) + { + DocNode* node = m_children.at(i); + QString::Direction nodeDir = node->getTextBasicDir(); + if (nodeDir != QString::DirNeutral) + return nodeDir; + } + return QString::DirNeutral; + } + virtual QString::Direction getTextDir() const + { + return getTextDir(0); + } + virtual QString::Direction getTextBasicDir() const + { + return getTextBasicDir(0); + } protected: QList<DocNode> m_children; @@ -199,6 +242,8 @@ class DocWord : public DocNode QCString word() const { return m_word; } Kind kind() const { return Kind_Word; } void accept(DocVisitor *v) { v->visit(this); } + virtual QString::Direction getTextDir() const { return QString(word()).direction(); }; + virtual QString::Direction getTextBasicDir() const { return QString(word()).basicDirection(); }; private: QCString m_word; @@ -220,6 +265,8 @@ class DocLinkedWord : public DocNode QCString anchor() const { return m_anchor; } QCString tooltip() const { return m_tooltip; } void accept(DocVisitor *v) { v->visit(this); } + virtual QString::Direction getTextDir() const { return QString(word()).direction(); }; + virtual QString::Direction getTextBasicDir() const { return QString(word()).basicDirection(); }; private: QCString m_word; @@ -240,6 +287,8 @@ class DocURL : public DocNode Kind kind() const { return Kind_URL; } void accept(DocVisitor *v) { v->visit(this); } bool isEmail() const { return m_isEmail; } + virtual QString::Direction getTextDir() const { return QString::DirLTR; }; + virtual QString::Direction getTextBasicDir() const { return QString::DirLTR; }; private: QCString m_url; @@ -616,7 +665,7 @@ class DocCopy : public DocNode }; /** Node representing an auto List */ -class DocAutoList : public CompAccept<DocAutoList>, public DocNode +class DocAutoList : public CompAccept<DocAutoList> { public: DocAutoList(DocNode *parent,int indent,bool isEnumList,int depth); @@ -624,7 +673,6 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode bool isEnumList() const { return m_isEnumList; } int indent() const { return m_indent; } int depth() const { return m_depth; } - void accept(DocVisitor *v) { CompAccept<DocAutoList>::accept(this,v); } int parse(); private: @@ -634,13 +682,12 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode }; /** Node representing an item of a auto list */ -class DocAutoListItem : public CompAccept<DocAutoListItem>, public DocNode +class DocAutoListItem : public CompAccept<DocAutoListItem> { public: DocAutoListItem(DocNode *parent,int indent,int num); Kind kind() const { return Kind_AutoListItem; } int itemNumber() const { return m_itemNum; } - void accept(DocVisitor *v) { CompAccept<DocAutoListItem>::accept(this,v); } int parse(); private: @@ -651,20 +698,19 @@ class DocAutoListItem : public CompAccept<DocAutoListItem>, public DocNode /** Node representing a simple section title */ -class DocTitle : public CompAccept<DocTitle>, public DocNode +class DocTitle : public CompAccept<DocTitle> { public: DocTitle(DocNode *parent) { m_parent = parent; } void parse(); void parseFromString(const QCString &title); Kind kind() const { return Kind_Title; } - void accept(DocVisitor *v) { CompAccept<DocTitle>::accept(this,v); } private: }; /** Node representing an item of a cross-referenced list */ -class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode +class DocXRefItem : public CompAccept<DocXRefItem> { public: DocXRefItem(DocNode *parent,int id,const char *key); @@ -674,7 +720,6 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode QCString title() const { return m_title; } QCString relPath() const { return m_relPath; } QCString key() const { return m_key; } - void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); } bool parse(); private: @@ -687,7 +732,7 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode }; /** Node representing an image */ -class DocImage : public CompAccept<DocImage>, public DocNode +class DocImage : public CompAccept<DocImage> { public: enum Type { Html, Latex, Rtf, DocBook }; @@ -702,7 +747,6 @@ class DocImage : public CompAccept<DocImage>, public DocNode QCString relPath() const { return m_relPath; } QCString url() const { return m_url; } const HtmlAttribList &attribs() const { return m_attribs; } - void accept(DocVisitor *v) { CompAccept<DocImage>::accept(this,v); } void parse(); private: @@ -716,7 +760,7 @@ class DocImage : public CompAccept<DocImage>, public DocNode }; /** Node representing a dot file */ -class DocDotFile : public CompAccept<DocDotFile>, public DocNode +class DocDotFile : public CompAccept<DocDotFile> { public: DocDotFile(DocNode *parent,const QCString &name,const QCString &context); @@ -729,7 +773,6 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode QCString width() const { return m_width; } QCString height() const { return m_height; } QCString context() const { return m_context; } - void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); } private: QCString m_name; QCString m_file; @@ -740,7 +783,7 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode }; /** Node representing a msc file */ -class DocMscFile : public CompAccept<DocMscFile>, public DocNode +class DocMscFile : public CompAccept<DocMscFile> { public: DocMscFile(DocNode *parent,const QCString &name,const QCString &context); @@ -753,7 +796,6 @@ class DocMscFile : public CompAccept<DocMscFile>, public DocNode QCString width() const { return m_width; } QCString height() const { return m_height; } QCString context() const { return m_context; } - void accept(DocVisitor *v) { CompAccept<DocMscFile>::accept(this,v); } private: QCString m_name; QCString m_file; @@ -764,7 +806,7 @@ class DocMscFile : public CompAccept<DocMscFile>, public DocNode }; /** Node representing a dia file */ -class DocDiaFile : public CompAccept<DocDiaFile>, public DocNode +class DocDiaFile : public CompAccept<DocDiaFile> { public: DocDiaFile(DocNode *parent,const QCString &name,const QCString &context); @@ -777,7 +819,6 @@ class DocDiaFile : public CompAccept<DocDiaFile>, public DocNode QCString width() const { return m_width; } QCString height() const { return m_height; } QCString context() const { return m_context; } - void accept(DocVisitor *v) { CompAccept<DocDiaFile>::accept(this,v); } private: QCString m_name; QCString m_file; @@ -788,19 +829,18 @@ class DocDiaFile : public CompAccept<DocDiaFile>, public DocNode }; /** Node representing a VHDL flow chart */ -class DocVhdlFlow : public CompAccept<DocVhdlFlow>, public DocNode +class DocVhdlFlow : public CompAccept<DocVhdlFlow> { public: DocVhdlFlow(DocNode *parent); void parse(); Kind kind() const { return Kind_VhdlFlow; } bool hasCaption() { return !m_children.isEmpty(); } - void accept(DocVisitor *v) { CompAccept<DocVhdlFlow>::accept(this,v); } private: }; /** Node representing a link to some item */ -class DocLink : public CompAccept<DocLink>, public DocNode +class DocLink : public CompAccept<DocLink> { public: DocLink(DocNode *parent,const QCString &target); @@ -810,7 +850,6 @@ class DocLink : public CompAccept<DocLink>, public DocNode QCString relPath() const { return m_relPath; } QCString ref() const { return m_ref; } QCString anchor() const { return m_anchor; } - void accept(DocVisitor *v) { CompAccept<DocLink>::accept(this,v); } private: QCString m_file; @@ -821,7 +860,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode }; /** Node representing a reference to some item */ -class DocRef : public CompAccept<DocRef>, public DocNode +class DocRef : public CompAccept<DocRef> { public: DocRef(DocNode *parent,const QCString &target,const QCString &context); @@ -837,7 +876,6 @@ class DocRef : public CompAccept<DocRef>, public DocNode bool refToSection() const { return m_refType==Section; } bool refToTable() const { return m_refType==Table; } bool isSubPage() const { return m_isSubPage; } - void accept(DocVisitor *v) { CompAccept<DocRef>::accept(this,v); } private: enum RefType { Unknown, Anchor, Section, Table }; @@ -851,7 +889,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode }; /** Node representing an internal reference to some item */ -class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode +class DocInternalRef : public CompAccept<DocInternalRef> { public: DocInternalRef(DocNode *parent,const QCString &target); @@ -860,7 +898,6 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode QCString file() const { return m_file; } QCString relPath() const { return m_relPath; } QCString anchor() const { return m_anchor; } - void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); } private: QCString m_file; @@ -869,7 +906,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode }; /** Node representing a Hypertext reference */ -class DocHRef : public CompAccept<DocHRef>, public DocNode +class DocHRef : public CompAccept<DocHRef> { public: DocHRef(DocNode *parent,const HtmlAttribList &attribs,const QCString &url, @@ -879,7 +916,6 @@ class DocHRef : public CompAccept<DocHRef>, public DocNode QCString url() const { return m_url; } QCString relPath() const { return m_relPath; } Kind kind() const { return Kind_HRef; } - void accept(DocVisitor *v) { CompAccept<DocHRef>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } private: @@ -889,7 +925,7 @@ class DocHRef : public CompAccept<DocHRef>, public DocNode }; /** Node Html heading */ -class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode +class DocHtmlHeader : public CompAccept<DocHtmlHeader> { public: DocHtmlHeader(DocNode *parent,const HtmlAttribList &attribs,int level) : @@ -897,7 +933,6 @@ class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode int level() const { return m_level; } Kind kind() const { return Kind_HtmlHeader; } const HtmlAttribList &attribs() const { return m_attribs; } - void accept(DocVisitor *v) { CompAccept<DocHtmlHeader>::accept(this,v); } int parse(); private: @@ -906,14 +941,13 @@ class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode }; /** Node representing a Html description item */ -class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode +class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle> { public: DocHtmlDescTitle(DocNode *parent,const HtmlAttribList &attribs) : m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlDescTitle; } const HtmlAttribList &attribs() const { return m_attribs; } - void accept(DocVisitor *v) { CompAccept<DocHtmlDescTitle>::accept(this,v); } int parse(); private: @@ -921,14 +955,13 @@ class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode }; /** Node representing a Html description list */ -class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode +class DocHtmlDescList : public CompAccept<DocHtmlDescList> { public: DocHtmlDescList(DocNode *parent,const HtmlAttribList &attribs) : m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlDescList; } const HtmlAttribList &attribs() const { return m_attribs; } - void accept(DocVisitor *v) { CompAccept<DocHtmlDescList>::accept(this,v); } int parse(); private: @@ -936,7 +969,7 @@ class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode }; /** Node representing a normal section */ -class DocSection : public CompAccept<DocSection>, public DocNode +class DocSection : public CompAccept<DocSection> { public: DocSection(DocNode *parent,int level,const QCString &id) : @@ -947,7 +980,6 @@ class DocSection : public CompAccept<DocSection>, public DocNode QCString anchor() const { return m_anchor; } QCString id() const { return m_id; } QCString file() const { return m_file; } - void accept(DocVisitor *v) { CompAccept<DocSection>::accept(this,v); } int parse(); private: @@ -959,7 +991,7 @@ class DocSection : public CompAccept<DocSection>, public DocNode }; /** Node representing a reference to a section */ -class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode +class DocSecRefItem : public CompAccept<DocSecRefItem> { public: DocSecRefItem(DocNode *parent,const QCString &target) : @@ -968,7 +1000,6 @@ class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode QCString target() const { return m_target; } QCString file() const { return m_file; } QCString anchor() const { return m_anchor; } - void accept(DocVisitor *v) { CompAccept<DocSecRefItem>::accept(this,v); } void parse(); private: @@ -978,56 +1009,52 @@ class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode }; /** Node representing a list of section references */ -class DocSecRefList : public CompAccept<DocSecRefList>, public DocNode +class DocSecRefList : public CompAccept<DocSecRefList> { public: DocSecRefList(DocNode *parent) { m_parent = parent; } void parse(); Kind kind() const { return Kind_SecRefList; } - void accept(DocVisitor *v) { CompAccept<DocSecRefList>::accept(this,v); } private: }; /** Node representing an internal section of documentation */ -class DocInternal : public CompAccept<DocInternal>, public DocNode +class DocInternal : public CompAccept<DocInternal> { public: DocInternal(DocNode *parent) { m_parent = parent; } int parse(int); Kind kind() const { return Kind_Internal; } - void accept(DocVisitor *v) { CompAccept<DocInternal>::accept(this,v); } private: }; /** Node representing an block of paragraphs */ -class DocParBlock : public CompAccept<DocParBlock>, public DocNode +class DocParBlock : public CompAccept<DocParBlock> { public: DocParBlock(DocNode *parent) { m_parent = parent; } int parse(); Kind kind() const { return Kind_ParBlock; } - void accept(DocVisitor *v) { CompAccept<DocParBlock>::accept(this,v); } private: }; /** Node representing a simple list */ -class DocSimpleList : public CompAccept<DocSimpleList>, public DocNode +class DocSimpleList : public CompAccept<DocSimpleList> { public: DocSimpleList(DocNode *parent) { m_parent = parent; } Kind kind() const { return Kind_SimpleList; } - void accept(DocVisitor *v) { CompAccept<DocSimpleList>::accept(this,v); } int parse(); private: }; /** Node representing a Html list */ -class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode +class DocHtmlList : public CompAccept<DocHtmlList> { public: enum Type { Unordered, Ordered }; @@ -1035,7 +1062,6 @@ class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode m_type(t), m_attribs(attribs) { m_parent = parent; } Kind kind() const { return Kind_HtmlList; } Type type() const { return m_type; } - void accept(DocVisitor *v) { CompAccept<DocHtmlList>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } int parse(); int parseXml(); @@ -1046,7 +1072,7 @@ class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode }; /** Node representing a simple section */ -class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode +class DocSimpleSect : public CompAccept<DocSimpleSect> { public: enum Type @@ -1084,7 +1110,7 @@ class DocSimpleSectSep : public DocNode }; /** Node representing a parameter section */ -class DocParamSect : public CompAccept<DocParamSect>, public DocNode +class DocParamSect : public CompAccept<DocParamSect> { friend class DocParamList; public: @@ -1102,7 +1128,6 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode int parse(const QCString &cmdName,bool xmlContext,Direction d); Kind kind() const { return Kind_ParamSect; } Type type() const { return m_type; } - void accept(DocVisitor *v) { CompAccept<DocParamSect>::accept(this,v); } bool hasInOutSpecifier() const { return m_hasInOutSpecifier; } bool hasTypeSpecifier() const { return m_hasTypeSpecifier; } @@ -1113,7 +1138,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode }; /** Node representing a paragraph in the documentation tree */ -class DocPara : public CompAccept<DocPara>, public DocNode +class DocPara : public CompAccept<DocPara> { public: DocPara(DocNode *parent) : @@ -1121,7 +1146,6 @@ class DocPara : public CompAccept<DocPara>, public DocNode int parse(); Kind kind() const { return Kind_Para; } bool isEmpty() const { return m_children.isEmpty(); } - void accept(DocVisitor *v) { CompAccept<DocPara>::accept(this,v); } void markFirst(bool v=TRUE) { m_isFirst=v; } void markLast(bool v=TRUE) { m_isLast=v; } bool isFirst() const { return m_isFirst; } @@ -1219,7 +1243,7 @@ class DocSimpleListItem : public DocNode }; /** Node representing a HTML list item */ -class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode +class DocHtmlListItem : public CompAccept<DocHtmlListItem> { public: DocHtmlListItem(DocNode *parent,const HtmlAttribList &attribs,int num) : @@ -1227,7 +1251,6 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode Kind kind() const { return Kind_HtmlListItem; } int itemNumber() const { return m_itemNum; } const HtmlAttribList &attribs() const { return m_attribs; } - void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); } int parse(); int parseXml(); @@ -1237,13 +1260,12 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode }; /** Node representing a HTML description data */ -class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode +class DocHtmlDescData : public CompAccept<DocHtmlDescData> { public: DocHtmlDescData(DocNode *parent) { m_parent = parent; } Kind kind() const { return Kind_HtmlDescData; } const HtmlAttribList &attribs() const { return m_attribs; } - void accept(DocVisitor *v) { CompAccept<DocHtmlDescData>::accept(this,v); } int parse(); private: @@ -1251,7 +1273,7 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode }; /** Node representing a HTML table cell */ -class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode +class DocHtmlCell : public CompAccept<DocHtmlCell> { friend class DocHtmlTable; public: @@ -1264,7 +1286,6 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode bool isFirst() const { return m_isFirst; } bool isLast() const { return m_isLast; } Kind kind() const { return Kind_HtmlCell; } - void accept(DocVisitor *v) { CompAccept<DocHtmlCell>::accept(this,v); } void markFirst(bool v=TRUE) { m_isFirst=v; } void markLast(bool v=TRUE) { m_isLast=v; } const HtmlAttribList &attribs() const { return m_attribs; } @@ -1288,12 +1309,11 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode }; /** Node representing a HTML table caption */ -class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode +class DocHtmlCaption : public CompAccept<DocHtmlCaption> { public: DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs); Kind kind() const { return Kind_HtmlCaption; } - void accept(DocVisitor *v) { CompAccept<DocHtmlCaption>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } int parse(); bool hasCaptionId() const { return m_hasCaptionId; } @@ -1308,7 +1328,7 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode }; /** Node representing a HTML table row */ -class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode +class DocHtmlRow : public CompAccept<DocHtmlRow> { friend class DocHtmlTable; public: @@ -1316,7 +1336,6 @@ class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode m_attribs(attribs), m_visibleCells(-1), m_rowIdx(-1) { m_parent = parent; } Kind kind() const { return Kind_HtmlRow; } uint numCells() const { return m_children.count(); } - void accept(DocVisitor *v) { CompAccept<DocHtmlRow>::accept(this,v); } const HtmlAttribList &attribs() const { return m_attribs; } int parse(); int parseXml(bool header); @@ -1345,7 +1364,7 @@ class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode }; /** Node representing a HTML table */ -class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode +class DocHtmlTable : public CompAccept<DocHtmlTable> { public: DocHtmlTable(DocNode *parent,const HtmlAttribList &attribs) @@ -1374,14 +1393,13 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode }; /** Node representing an HTML blockquote */ -class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote>, public DocNode +class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote> { 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: @@ -1389,23 +1407,21 @@ class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote>, public DocNode }; /** Root node of a text fragment */ -class DocText : public CompAccept<DocText>, public DocNode +class DocText : public CompAccept<DocText> { public: DocText() {} Kind kind() const { return Kind_Text; } - void accept(DocVisitor *v) { CompAccept<DocText>::accept(this,v); } void parse(); bool isEmpty() const { return m_children.isEmpty(); } }; /** Root node of documentation tree */ -class DocRoot : public CompAccept<DocRoot>, public DocNode +class DocRoot : public CompAccept<DocRoot> { public: DocRoot(bool indent,bool sl) : m_indent(indent), m_singleLine(sl) {} Kind kind() const { return Kind_Root; } - void accept(DocVisitor *v) { CompAccept<DocRoot>::accept(this,v); } void parse(); bool indent() const { return m_indent; } bool singleLine() const { return m_singleLine; } |