00001 /****************************************************************************** 00002 * 00003 * $Id: $ 00004 * 00005 * 00006 * Copyright (C) 1997-2008 by Dimitri van Heesch. 00007 * 00008 * Permission to use, copy, modify, and distribute this software and its 00009 * documentation under the terms of the GNU General Public License is hereby 00010 * granted. No representations are made about the suitability of this software 00011 * for any purpose. It is provided "as is" without express or implied warranty. 00012 * See the GNU General Public License for more details. 00013 * 00014 * Documents produced by Doxygen are derivative works derived from the 00015 * input used in their production; they are not affected by this license. 00016 * 00017 */ 00018 00019 #ifndef _DOCVISITOR_H 00020 #define _DOCVISITOR_H 00021 00022 // ids 00023 const int DocVisitor_Html = 0; 00024 const int DocVisitor_Latex = 1; 00025 const int DocVisitor_XML = 2; 00026 const int DocVisitor_RTF = 3; 00027 const int DocVisitor_Man = 4; 00028 const int DocVisitor_Text = 5; 00029 const int DocVisitor_Other = 6; 00030 00031 // forward declarations 00032 class DocWord; 00033 class DocWhiteSpace; 00034 class DocAutoList; 00035 class DocAutoListItem; 00036 class DocPara; 00037 class DocRoot; 00038 class DocSymbol; 00039 class DocURL; 00040 class DocStyleChange; 00041 class DocSimpleSect; 00042 class DocTitle; 00043 class DocSimpleList; 00044 class DocSimpleListItem; 00045 class DocSection; 00046 class DocVerbatim; 00047 class DocXRefItem; 00048 class DocHtmlList; 00049 class DocHtmlListItem; 00050 class DocHtmlDescList; 00051 class DocHtmlDescTitle; 00052 class DocHtmlDescData; 00053 class DocHtmlTable; 00054 class DocHtmlRow; 00055 class DocHtmlCell; 00056 class DocHtmlCaption; 00057 class DocLineBreak; 00058 class DocHorRuler; 00059 class DocAnchor; 00060 class DocIndexEntry; 00061 class DocInternal; 00062 class DocHRef; 00063 class DocInclude; 00064 class DocIncOperator; 00065 class DocHtmlHeader; 00066 class DocImage; 00067 class DocDotFile; 00068 class DocLink; 00069 class DocRef; 00070 class DocFormula; 00071 class DocSecRefItem; 00072 class DocSecRefList; 00073 //class DocLanguage; 00074 class DocLinkedWord; 00075 class DocParamSect; 00076 class DocParamList; 00077 class DocInternalRef; 00078 class DocCopy; 00079 class DocText; 00080 00083 class DocVisitor 00084 { 00085 int m_id; 00086 public: 00087 DocVisitor(int id) : m_id(id) {} 00088 virtual ~DocVisitor() {} 00089 int id() const { return m_id; } 00090 00094 virtual void visit(DocWord *) = 0; 00095 virtual void visit(DocWhiteSpace *) = 0; 00096 virtual void visit(DocSymbol *) = 0; 00097 virtual void visit(DocURL *) = 0; 00098 virtual void visit(DocStyleChange *) = 0; 00099 virtual void visit(DocVerbatim *) = 0; 00100 virtual void visit(DocLineBreak *) = 0; 00101 virtual void visit(DocHorRuler *) = 0; 00102 virtual void visit(DocAnchor *) = 0; 00103 virtual void visit(DocInclude *) = 0; 00104 virtual void visit(DocIncOperator *) = 0; 00105 virtual void visit(DocFormula *) = 0; 00106 virtual void visit(DocLinkedWord *) = 0; 00107 virtual void visit(DocIndexEntry *) = 0; 00113 virtual void visitPre(DocAutoList *) = 0; 00114 virtual void visitPost(DocAutoList *) = 0; 00115 virtual void visitPre(DocAutoListItem *) = 0; 00116 virtual void visitPost(DocAutoListItem *) = 0; 00117 virtual void visitPre(DocPara *) = 0; 00118 virtual void visitPost(DocPara *) = 0; 00119 virtual void visitPre(DocRoot *) = 0; 00120 virtual void visitPost(DocRoot *) = 0; 00121 virtual void visitPre(DocSimpleSect *) = 0; 00122 virtual void visitPost(DocSimpleSect *) = 0; 00123 virtual void visitPre(DocTitle *) = 0; 00124 virtual void visitPost(DocTitle *) = 0; 00125 virtual void visitPre(DocSimpleList *) = 0; 00126 virtual void visitPost(DocSimpleList *) = 0; 00127 virtual void visitPre(DocSimpleListItem *) = 0; 00128 virtual void visitPost(DocSimpleListItem *) = 0; 00129 virtual void visitPre(DocSection *) = 0; 00130 virtual void visitPost(DocSection *) = 0; 00131 virtual void visitPre(DocHtmlList *) = 0; 00132 virtual void visitPost(DocHtmlListItem *) = 0; 00133 virtual void visitPre(DocHtmlListItem *) = 0; 00134 virtual void visitPost(DocHtmlList *) = 0; 00135 virtual void visitPre(DocHtmlDescList *) = 0; 00136 virtual void visitPost(DocHtmlDescList *) = 0; 00137 virtual void visitPre(DocHtmlDescTitle *) = 0; 00138 virtual void visitPost(DocHtmlDescTitle *) = 0; 00139 virtual void visitPre(DocHtmlDescData *) = 0; 00140 virtual void visitPost(DocHtmlDescData *) = 0; 00141 virtual void visitPre(DocHtmlTable *) = 0; 00142 virtual void visitPost(DocHtmlRow *) = 0; 00143 virtual void visitPre(DocHtmlCell *) = 0; 00144 virtual void visitPost(DocHtmlCell *) = 0; 00145 virtual void visitPre(DocHtmlRow *) = 0; 00146 virtual void visitPost(DocHtmlTable *) = 0; 00147 virtual void visitPre(DocHtmlCaption *) = 0; 00148 virtual void visitPost(DocHtmlCaption *) = 0; 00149 virtual void visitPre(DocInternal *) = 0; 00150 virtual void visitPost(DocInternal *) = 0; 00151 virtual void visitPre(DocHRef *) = 0; 00152 virtual void visitPost(DocHRef *) = 0; 00153 virtual void visitPre(DocHtmlHeader *) = 0; 00154 virtual void visitPost(DocHtmlHeader *) = 0; 00155 virtual void visitPre(DocImage *) = 0; 00156 virtual void visitPost(DocImage *) = 0; 00157 virtual void visitPre(DocDotFile *) = 0; 00158 virtual void visitPost(DocDotFile *) = 0; 00159 virtual void visitPre(DocLink *) = 0; 00160 virtual void visitPost(DocLink *) = 0; 00161 virtual void visitPre(DocRef *) = 0; 00162 virtual void visitPost(DocRef *) = 0; 00163 virtual void visitPre(DocSecRefItem *) = 0; 00164 virtual void visitPost(DocSecRefItem *) = 0; 00165 virtual void visitPre(DocSecRefList *) = 0; 00166 virtual void visitPost(DocSecRefList *) = 0; 00167 //virtual void visitPre(DocLanguage *) = 0; 00168 //virtual void visitPost(DocLanguage *) = 0; 00169 virtual void visitPre(DocParamSect *) = 0; 00170 virtual void visitPost(DocParamSect *) = 0; 00171 virtual void visitPre(DocParamList *) = 0; 00172 virtual void visitPost(DocParamList *) = 0; 00173 virtual void visitPre(DocXRefItem *) = 0; 00174 virtual void visitPost(DocXRefItem *) = 0; 00175 virtual void visitPre(DocInternalRef *) = 0; 00176 virtual void visitPost(DocInternalRef *) = 0; 00177 virtual void visitPre(DocCopy *) = 0; 00178 virtual void visitPost(DocCopy *) = 0; 00179 virtual void visitPre(DocText *) = 0; 00180 virtual void visitPost(DocText *) = 0; 00182 }; 00183 00184 #endif