outputlist.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * $Id: outputlist.h,v 1.47 2001/03/19 19:27:41 root Exp $
00004  *
00005  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00006  *
00007  * Permission to use, copy, modify, and distribute this software and its
00008  * documentation under the terms of the GNU General Public License is hereby 
00009  * granted. No representations are made about the suitability of this software 
00010  * for any purpose. It is provided "as is" without express or implied warranty.
00011  * See the GNU General Public License for more details.
00012  *
00013  * Documents produced by Doxygen are derivative works derived from the
00014  * input used in their production; they are not affected by this license.
00015  *
00016  */
00017 
00018 #ifndef OUTPUTLIST_H
00019 #define OUTPUTLIST_H
00020 
00021 #include "qtbc.h"
00022 #include <qlist.h>
00023 #include "index.h" // for IndexSections
00024 #include "outputgen.h"
00025 
00026 #define FORALLPROTO1(arg1) \
00027   void forall(void (OutputGenerator::*func)(arg1),arg1)
00028 #define FORALLPROTO2(arg1,arg2) \
00029   void forall(void (OutputGenerator::*func)(arg1,arg2),arg1,arg2)
00030 #define FORALLPROTO3(arg1,arg2,arg3) \
00031   void forall(void (OutputGenerator::*func)(arg1,arg2,arg3),arg1,arg2,arg3)
00032 #define FORALLPROTO4(arg1,arg2,arg3,arg4) \
00033   void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4),arg1,arg2,arg3,arg4)
00034 #define FORALLPROTO5(arg1,arg2,arg3,arg4,arg5) \
00035   void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4,arg5),arg1,arg2,arg3,arg4,arg5)
00036   
00037 class ClassDiagram;
00038 class DotClassGraph;
00039 class DotDirDeps;
00040 class DotInclDepGraph;
00041 class DotGfxHierarchyTable;
00042 class SectionDict;
00043 class DotGroupCollaboration;
00044 
00045 class OutputList : public OutputDocInterface
00046 {
00047   public:
00048     OutputList(bool);
00049     virtual ~OutputList();
00050 
00051     void add(const OutputGenerator *);
00052     
00053     void disableAllBut(OutputGenerator::OutputType o);
00054     void enableAll();
00055     void disableAll();
00056     void disable(OutputGenerator::OutputType o);
00057     void enable(OutputGenerator::OutputType o);
00058     bool isEnabled(OutputGenerator::OutputType o);
00059     void pushGeneratorState();
00060     void popGeneratorState();
00061 
00062 
00064     // OutputDocInterface implementation
00066 
00067     void parseDoc(const char *fileName,int startLine,
00068                   Definition *ctx,MemberDef *md,const QCString &docStr,
00069                   bool indexWords,bool isExample,const char *exampleName=0,
00070                   bool singleLine=FALSE,bool linkFromIndex=FALSE);
00071     void parseText(const QCString &textStr);
00072     
00073 
00074     void startIndexSection(IndexSections is)
00075     { forall(&OutputGenerator::startIndexSection,is); }
00076     void endIndexSection(IndexSections is)
00077     { forall(&OutputGenerator::endIndexSection,is); }
00078     void writePageLink(const char *name,bool first)
00079     { forall(&OutputGenerator::writePageLink,name,first); }
00080     void startProjectNumber()
00081     { forall(&OutputGenerator::startProjectNumber); }
00082     void endProjectNumber()
00083     { forall(&OutputGenerator::endProjectNumber); }
00084     void writeStyleInfo(int part) 
00085     { forall(&OutputGenerator::writeStyleInfo,part); }
00086     void startFile(const char *name,const char *manName,const char *title)
00087     { forall(&OutputGenerator::startFile,name,manName,title); }
00088     void writeFooter()
00089     { forall(&OutputGenerator::writeFooter); }
00090     void endFile() 
00091     { forall(&OutputGenerator::endFile); }
00092     void startTitleHead(const char *fileName) 
00093     { forall(&OutputGenerator::startTitleHead,fileName); }
00094     void endTitleHead(const char *fileName,const char *name)
00095     { forall(&OutputGenerator::endTitleHead,fileName,name); }
00096     void startTitle() 
00097     { forall(&OutputGenerator::startTitle); }
00098     void endTitle() 
00099     { forall(&OutputGenerator::endTitle); }
00100     void newParagraph() 
00101     { forall(&OutputGenerator::newParagraph); }
00102     void startParagraph() 
00103     { forall(&OutputGenerator::startParagraph); }
00104     void endParagraph() 
00105     { forall(&OutputGenerator::endParagraph); }
00106     void writeString(const char *text) 
00107     { forall(&OutputGenerator::writeString,text); }
00108     void startIndexList() 
00109     { forall(&OutputGenerator::startIndexList); }
00110     void endIndexList() 
00111     { forall(&OutputGenerator::endIndexList); }
00112     void startIndexKey()
00113     { forall(&OutputGenerator::startIndexKey); }
00114     void endIndexKey()
00115     { forall(&OutputGenerator::endIndexKey); }
00116     void startIndexValue(bool b)
00117     { forall(&OutputGenerator::startIndexValue,b); }
00118     void endIndexValue(const char *name,bool b)
00119     { forall(&OutputGenerator::endIndexValue,name,b); }
00120     void startItemList() 
00121     { forall(&OutputGenerator::startItemList); }
00122     void endItemList() 
00123     { forall(&OutputGenerator::endItemList); }
00124     void startIndexItem(const char *ref,const char *file)
00125     { forall(&OutputGenerator::startIndexItem,ref,file); }
00126     void endIndexItem(const char *ref,const char *file)
00127     { forall(&OutputGenerator::endIndexItem,ref,file); }
00128     void docify(const char *s)
00129     { forall(&OutputGenerator::docify,s); }
00130     void codify(const char *s)
00131     { forall(&OutputGenerator::codify,s); }
00132     void writeObjectLink(const char *ref,const char *file,
00133                          const char *anchor, const char *name)
00134     { forall(&OutputGenerator::writeObjectLink,ref,file,anchor,name); }
00135     void writeCodeLink(const char *ref,const char *file,
00136                        const char *anchor,const char *name,
00137                        const char *tooltip)
00138     { forall(&OutputGenerator::writeCodeLink,ref,file,anchor,name,tooltip); }
00139     void startTextLink(const char *file,const char *anchor)
00140     { forall(&OutputGenerator::startTextLink,file,anchor); }
00141     void endTextLink()
00142     { forall(&OutputGenerator::endTextLink); }
00143     void startHtmlLink(const char *url)
00144     { forall(&OutputGenerator::startHtmlLink,url); }
00145     void endHtmlLink()
00146     { forall(&OutputGenerator::endHtmlLink); }
00147     void writeStartAnnoItem(const char *type,const char *file, 
00148                             const char *path,const char *name)
00149     { forall(&OutputGenerator::writeStartAnnoItem,type,file,path,name); }
00150     void writeEndAnnoItem(const char *name)
00151     { forall(&OutputGenerator::writeEndAnnoItem,name); }
00152     void startTypewriter() 
00153     { forall(&OutputGenerator::startTypewriter); }
00154     void endTypewriter() 
00155     { forall(&OutputGenerator::endTypewriter); }
00156     void startGroupHeader()
00157     { forall(&OutputGenerator::startGroupHeader); }
00158     void endGroupHeader()
00159     { forall(&OutputGenerator::endGroupHeader); }
00160     void writeListItem() 
00161     { forall(&OutputGenerator::writeListItem); }
00162     void startMemberSections()
00163     { forall(&OutputGenerator::startMemberSections); }
00164     void endMemberSections()
00165     { forall(&OutputGenerator::endMemberSections); }
00166     void startMemberHeader()
00167     { forall(&OutputGenerator::startMemberHeader); }
00168     void endMemberHeader()
00169     { forall(&OutputGenerator::endMemberHeader); }
00170     void startMemberSubtitle()
00171     { forall(&OutputGenerator::startMemberSubtitle); }
00172     void endMemberSubtitle()
00173     { forall(&OutputGenerator::endMemberSubtitle); }
00174     void startMemberDocList() 
00175     { forall(&OutputGenerator::startMemberDocList); }
00176     void endMemberDocList() 
00177     { forall(&OutputGenerator::endMemberDocList); }
00178     void startMemberList() 
00179     { forall(&OutputGenerator::startMemberList); }
00180     void endMemberList() 
00181     { forall(&OutputGenerator::endMemberList); }
00182     void startAnonTypeScope(int i1) 
00183     { forall(&OutputGenerator::startAnonTypeScope,i1); }
00184     void endAnonTypeScope(int i1) 
00185     { forall(&OutputGenerator::endAnonTypeScope,i1); }
00186     void startMemberItem(int i1) 
00187     { forall(&OutputGenerator::startMemberItem,i1); }
00188     void endMemberItem() 
00189     { forall(&OutputGenerator::endMemberItem); }
00190     void startMemberTemplateParams() 
00191     { forall(&OutputGenerator::startMemberTemplateParams); }
00192     void endMemberTemplateParams() 
00193     { forall(&OutputGenerator::endMemberTemplateParams); }
00194     void startMemberGroupHeader(bool b) 
00195     { forall(&OutputGenerator::startMemberGroupHeader,b); }
00196     void endMemberGroupHeader()
00197     { forall(&OutputGenerator::endMemberGroupHeader); }
00198     void startMemberGroupDocs()
00199     { forall(&OutputGenerator::startMemberGroupDocs); }
00200     void endMemberGroupDocs()
00201     { forall(&OutputGenerator::endMemberGroupDocs); }
00202     void startMemberGroup()
00203     { forall(&OutputGenerator::startMemberGroup); }
00204     void endMemberGroup(bool last)
00205     { forall(&OutputGenerator::endMemberGroup,last); }
00206     void insertMemberAlign(bool templ=FALSE) 
00207     { forall(&OutputGenerator::insertMemberAlign,templ); }
00208     void writeRuler() 
00209     { forall(&OutputGenerator::writeRuler); }
00210     void writeAnchor(const char *fileName,const char *name)
00211     { forall(&OutputGenerator::writeAnchor,fileName,name); }
00212     void startCodeFragment() 
00213     { forall(&OutputGenerator::startCodeFragment); }
00214     void endCodeFragment() 
00215     { forall(&OutputGenerator::endCodeFragment); }
00216     void startCodeLine() 
00217     { forall(&OutputGenerator::startCodeLine); }
00218     void endCodeLine() 
00219     { forall(&OutputGenerator::endCodeLine); }
00220     void writeLineNumber(const char *ref,const char *file,const char *anchor,
00221                          int lineNumber) 
00222     { forall(&OutputGenerator::writeLineNumber,ref,file,anchor,lineNumber); }
00223     void startEmphasis() 
00224     { forall(&OutputGenerator::startEmphasis); }
00225     void endEmphasis() 
00226     { forall(&OutputGenerator::endEmphasis); }
00227     void writeChar(char c)
00228     { forall(&OutputGenerator::writeChar,c); }
00229     void startMemberDoc(const char *clName,const char *memName,
00230                         const char *anchor,const char *title)
00231     { forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title); }
00232     void endMemberDoc(bool hasArgs) 
00233     { forall(&OutputGenerator::endMemberDoc,hasArgs); }
00234     void startDoxyAnchor(const char *fName,const char *manName,
00235                          const char *anchor, const char *name,
00236                          const char *args)
00237     { forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name,args); }
00238     void endDoxyAnchor(const char *fn,const char *anchor)
00239     { forall(&OutputGenerator::endDoxyAnchor,fn,anchor); }
00240     void startCodeAnchor(const char *label)
00241     { forall(&OutputGenerator::startCodeAnchor,label); }
00242     void endCodeAnchor()
00243     { forall(&OutputGenerator::endCodeAnchor); }
00244     void writeLatexSpacing() 
00245     { forall(&OutputGenerator::writeLatexSpacing); }
00246     void startDescription() 
00247     { forall(&OutputGenerator::startDescription); }
00248     void endDescription() 
00249     { forall(&OutputGenerator::endDescription); }
00250     void startDescItem() 
00251     { forall(&OutputGenerator::startDescItem); }
00252     void endDescItem() 
00253     { forall(&OutputGenerator::endDescItem); }
00254     void startSubsection() 
00255     { forall(&OutputGenerator::startSubsection); }
00256     void endSubsection() 
00257     { forall(&OutputGenerator::endSubsection); }
00258     void startSubsubsection() 
00259     { forall(&OutputGenerator::startSubsubsection); }
00260     void endSubsubsection() 
00261     { forall(&OutputGenerator::endSubsubsection); }
00262     void startCenter() 
00263     { forall(&OutputGenerator::startCenter); }
00264     void endCenter() 
00265     { forall(&OutputGenerator::endCenter); }
00266     void startSmall() 
00267     { forall(&OutputGenerator::startSmall); }
00268     void endSmall() 
00269     { forall(&OutputGenerator::endSmall); }
00270     void lineBreak() 
00271     { forall(&OutputGenerator::lineBreak); }
00272     void startBold() 
00273     { forall(&OutputGenerator::startBold); }
00274     void endBold() 
00275     { forall(&OutputGenerator::endBold); }
00276     void startMemberDescription() 
00277     { forall(&OutputGenerator::startMemberDescription); }
00278     void endMemberDescription() 
00279     { forall(&OutputGenerator::endMemberDescription); }
00280     void startSimpleSect(SectionTypes t,const char *file,const char *anchor,
00281                          const char *title) 
00282     { forall(&OutputGenerator::startSimpleSect,t,file,anchor,title); }
00283     void endSimpleSect() 
00284     { forall(&OutputGenerator::endSimpleSect); }
00285     void startParamList(ParamListTypes t,const char *title) 
00286     { forall(&OutputGenerator::startParamList,t,title); }
00287     void endParamList() 
00288     { forall(&OutputGenerator::endParamList); }
00289     void writeDescItem() 
00290     { forall(&OutputGenerator::writeDescItem); }
00291     void startIndent() 
00292     { forall(&OutputGenerator::startIndent); }
00293     void endIndent() 
00294     { forall(&OutputGenerator::endIndent); }
00295     void startSection(const char *lab,const char *title,SectionInfo::SectionType t)
00296     { forall(&OutputGenerator::startSection,lab,title,t); }
00297     void endSection(const char *lab,SectionInfo::SectionType t)
00298     { forall(&OutputGenerator::endSection,lab,t); }
00299     void addIndexItem(const char *s1,const char *s2)
00300     { forall(&OutputGenerator::addIndexItem,s1,s2); }
00301     void writeSynopsis() 
00302     { forall(&OutputGenerator::writeSynopsis); }
00303     void startClassDiagram()
00304     { forall(&OutputGenerator::startClassDiagram); }
00305     void endClassDiagram(const ClassDiagram &d,const char *f,const char *n)
00306     { forall(&OutputGenerator::endClassDiagram,d,f,n); }
00307     void startPageRef()
00308     { forall(&OutputGenerator::startPageRef); }
00309     void endPageRef(const char *c,const char *a)
00310     { forall(&OutputGenerator::endPageRef,c,a); }
00311     void startQuickIndices()
00312     { forall(&OutputGenerator::startQuickIndices); }
00313     void endQuickIndices()
00314     { forall(&OutputGenerator::endQuickIndices); }
00315     void writeQuickLinks(bool compact,HighlightedItem hli)
00316     { forall(&OutputGenerator::writeQuickLinks,compact,hli); }
00317     void startContents()
00318     { forall(&OutputGenerator::startContents); }
00319     void endContents()
00320     { forall(&OutputGenerator::endContents); }
00321     void writeNonBreakableSpace(int num)
00322     { forall(&OutputGenerator::writeNonBreakableSpace,num); }
00323     void startDescTable()
00324     { forall(&OutputGenerator::startDescTable); }
00325     void endDescTable()
00326     { forall(&OutputGenerator::endDescTable); }
00327     void startDescTableTitle()
00328     { forall(&OutputGenerator::startDescTableTitle); }
00329     void endDescTableTitle()
00330     { forall(&OutputGenerator::endDescTableTitle); }
00331     void startDescTableData()
00332     { forall(&OutputGenerator::startDescTableData); }
00333     void endDescTableData()
00334     { forall(&OutputGenerator::endDescTableData); }
00335     void startDotGraph()
00336     { forall(&OutputGenerator::startDotGraph); }
00337     void endDotGraph(const DotClassGraph &g)
00338     { forall(&OutputGenerator::endDotGraph,g); }
00339     void startInclDepGraph()
00340     { forall(&OutputGenerator::startInclDepGraph); }
00341     void endInclDepGraph(const DotInclDepGraph &g)
00342     { forall(&OutputGenerator::endInclDepGraph,g); }
00343     void startCallGraph()
00344     { forall(&OutputGenerator::startCallGraph); }
00345     void endCallGraph(const DotCallGraph &g)
00346     { forall(&OutputGenerator::endCallGraph,g); }
00347     void startDirDepGraph()
00348     { forall(&OutputGenerator::startDirDepGraph); }
00349     void endDirDepGraph(const DotDirDeps &g)
00350     { forall(&OutputGenerator::endDirDepGraph,g); }
00351     void startGroupCollaboration()
00352     { forall(&OutputGenerator::startGroupCollaboration); }
00353     void endGroupCollaboration(const DotGroupCollaboration &g)
00354     { forall(&OutputGenerator::endGroupCollaboration,g); }
00355     void writeGraphicalHierarchy(const DotGfxHierarchyTable &g)
00356     { forall(&OutputGenerator::writeGraphicalHierarchy,g); }
00357     void startTextBlock(bool dense=FALSE)
00358     { forall(&OutputGenerator::startTextBlock,dense); }
00359     void endTextBlock(bool paraBreak=FALSE)
00360     { forall(&OutputGenerator::endTextBlock,paraBreak); }
00361     void lastIndexPage()
00362     { forall(&OutputGenerator::lastIndexPage); }
00363     void startMemberDocPrefixItem()
00364     { forall(&OutputGenerator::startMemberDocPrefixItem); }
00365     void endMemberDocPrefixItem()
00366     { forall(&OutputGenerator::endMemberDocPrefixItem); }
00367     void startMemberDocName(bool align)
00368     { forall(&OutputGenerator::startMemberDocName,align); }
00369     void endMemberDocName()
00370     { forall(&OutputGenerator::endMemberDocName); }
00371     void startParameterType(bool first,const char *key)
00372     { forall(&OutputGenerator::startParameterType,first,key); }
00373     void endParameterType()
00374     { forall(&OutputGenerator::endParameterType); }
00375     void startParameterName(bool one)
00376     { forall(&OutputGenerator::startParameterName,one); }
00377     void endParameterName(bool last,bool one,bool bracket)
00378     { forall(&OutputGenerator::endParameterName,last,one,bracket); }
00379     void startParameterList(bool openBracket)
00380     { forall(&OutputGenerator::startParameterList,openBracket); }
00381     void endParameterList()
00382     { forall(&OutputGenerator::endParameterList); }
00383 
00384     void startConstraintList(const char *header) 
00385     { forall(&OutputGenerator::startConstraintList,header); }
00386     void startConstraintParam() 
00387     { forall(&OutputGenerator::startConstraintParam); }
00388     void endConstraintParam() 
00389     { forall(&OutputGenerator::endConstraintParam); }
00390     void startConstraintType()
00391     { forall(&OutputGenerator::startConstraintType); }
00392     void endConstraintType()
00393     { forall(&OutputGenerator::endConstraintType); }
00394     void startConstraintDocs()
00395     { forall(&OutputGenerator::startConstraintDocs); }
00396     void endConstraintDocs()
00397     { forall(&OutputGenerator::endConstraintDocs); }
00398     void endConstraintList()
00399     { forall(&OutputGenerator::endConstraintList); }
00400     void startFontClass(const char *c)
00401     { forall(&OutputGenerator::startFontClass,c); }
00402     void endFontClass()
00403     { forall(&OutputGenerator::endFontClass); }
00404     void writeCodeAnchor(const char *name)
00405     { forall(&OutputGenerator::writeCodeAnchor,name); }
00406     void startPlainFile(const char *name)
00407     { 
00408       OutputGenerator *og=outputs->first();
00409       while (og)
00410       {
00411         if (og->isEnabled()) (og->startPlainFile)(name);
00412         og=outputs->next();
00413       }
00414     }
00415     void endPlainFile() 
00416     { 
00417       OutputGenerator *og=outputs->first();
00418       while (og)
00419       {
00420         if (og->isEnabled()) (og->endPlainFile)();
00421         og=outputs->next();
00422       }
00423     }
00424     void linkableSymbol(int,const char *,Definition *,Definition *) {}
00425 
00426 
00427 
00428   private:
00429     void debug();
00430     void clear();
00431     
00432     void forall(void (OutputGenerator::*func)());
00433     FORALLPROTO1(const char *);
00434     FORALLPROTO1(char);
00435     FORALLPROTO1(IndexSections);
00436     FORALLPROTO1(int);
00437     FORALLPROTO1(const DotClassGraph &);
00438     FORALLPROTO1(const DotInclDepGraph &);
00439     FORALLPROTO1(const DotCallGraph &);
00440     FORALLPROTO1(const DotGroupCollaboration &);
00441     FORALLPROTO1(const DotDirDeps &);
00442     FORALLPROTO1(const DotGfxHierarchyTable &);
00443     FORALLPROTO1(SectionTypes);
00444 #if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
00445     FORALLPROTO1(bool);
00446     FORALLPROTO2(bool,int);
00447     FORALLPROTO2(bool,bool);
00448     FORALLPROTO4(const char *,const char *,const char *,int);
00449 #endif
00450     FORALLPROTO2(int,bool);
00451     FORALLPROTO2(bool,HighlightedItem);
00452     FORALLPROTO2(bool,const char *);
00453     FORALLPROTO2(ParamListTypes,const char *);
00454     FORALLPROTO2(const char *,const char *);
00455     FORALLPROTO2(const char *,bool);
00456     FORALLPROTO2(const char *,SectionInfo::SectionType);
00457     FORALLPROTO3(bool,bool,bool);
00458     FORALLPROTO3(const char *,const char *,bool);
00459     FORALLPROTO3(const char *,const char *,SectionInfo::SectionType);
00460     FORALLPROTO3(uchar,uchar,uchar);
00461     FORALLPROTO3(const char *,const char *,const char *);
00462     FORALLPROTO3(const ClassDiagram &,const char *,const char *);
00463     FORALLPROTO4(SectionTypes,const char *,const char *,const char *);
00464     FORALLPROTO4(const char *,const char *,const char *,const char *);
00465     FORALLPROTO4(const char *,const char *,const char *,bool);
00466     FORALLPROTO5(const char *,const char *,const char *,const char *,const char *);
00467   
00468     OutputList(const OutputList &ol);
00469     QList<OutputGenerator> *outputs;
00470 };
00471 
00472 #endif



Generated on Mon Mar 31 10:58:41 2008 by  doxygen 1.5.1