Orb/Doxygen/src/mangen.h
changeset 0 42188c7ea2d9
child 4 468f4c8d3d5b
equal deleted inserted replaced
-1:000000000000 0:42188c7ea2d9
       
     1 /******************************************************************************
       
     2  *
       
     3  * 
       
     4  *
       
     5  * Copyright (C) 1997-2008 by Dimitri van Heesch.
       
     6  *
       
     7  * Permission to use, copy, modify, and distribute this software and its
       
     8  * documentation under the terms of the GNU General Public License is hereby 
       
     9  * granted. No representations are made about the suitability of this software 
       
    10  * for any purpose. It is provided "as is" without express or implied warranty.
       
    11  * See the GNU General Public License for more details.
       
    12  *
       
    13  * Documents produced by Doxygen are derivative works derived from the
       
    14  * input used in their production; they are not affected by this license.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MANGEN_H
       
    19 #define MANGEN_H
       
    20 
       
    21 #include "outputgen.h"
       
    22 
       
    23 class QFile;
       
    24 
       
    25 class ManGenerator : public OutputGenerator
       
    26 {
       
    27   public:
       
    28     ManGenerator();
       
    29    ~ManGenerator();
       
    30     
       
    31     //OutputGenerator *copy()  { return new ManGenerator; } 
       
    32     //OutputGenerator *clone() { return new ManGenerator(*this); }
       
    33     //void append(const OutputGenerator *o);
       
    34     void enable() 
       
    35     { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
       
    36     void disable() { active=FALSE; }
       
    37     void enableIf(OutputType o)  { if (o==Man) active=TRUE;  }
       
    38     void disableIf(OutputType o) { if (o==Man) active=FALSE; }
       
    39     void disableIfNot(OutputType o) { if (o!=Man) active=FALSE; }
       
    40     bool isEnabled(OutputType o) { return (o==Man && active); } 
       
    41     OutputGenerator *get(OutputType o) { return (o==Man) ? this : 0; }
       
    42 
       
    43     void printDoc(DocNode *,const char *);
       
    44 
       
    45     static void init();
       
    46     void startFile(const char *name,const char *manName,const char *title);
       
    47     void writeFooter() {}
       
    48     void endFile();
       
    49     void clearBuffer();
       
    50 
       
    51     void startIndexSection(IndexSections) {}
       
    52     void endIndexSection(IndexSections) {}
       
    53     void writePageLink(const char *,bool) {}
       
    54     void startProjectNumber() {}
       
    55     void endProjectNumber() {}
       
    56     void writeStyleInfo(int) {}
       
    57     void startTitleHead(const char *) {}
       
    58     void endTitleHead(const char *,const char *);
       
    59     void startTitle();
       
    60     void endTitle();
       
    61     
       
    62     void newParagraph();
       
    63     void startParagraph();
       
    64     void endParagraph();
       
    65     void writeString(const char *text);
       
    66     void startIndexListItem() {}
       
    67     void endIndexListItem() {}
       
    68     void startIndexList() {}
       
    69     void endIndexList()   { newParagraph(); } 
       
    70     void startIndexKey() {}
       
    71     void endIndexKey()   {} 
       
    72     void startIndexValue(bool) {}
       
    73     void endIndexValue(const char *,bool)   {} 
       
    74     void startItemList()  {}
       
    75     void endItemList()    { newParagraph(); }
       
    76     void startIndexItem(const char *ref,const char *file);
       
    77     void endIndexItem(const char *ref,const char *file);
       
    78     void docify(const char *text);
       
    79     void codify(const char *text);
       
    80     void writeObjectLink(const char *ref,const char *file,
       
    81                          const char *anchor,const char *name);
       
    82     void writeCodeLink(const char *ref,const char *file,
       
    83                        const char *anchor,const char *name,
       
    84                        const char *tooltip);
       
    85     void startTextLink(const char *,const char *) {}
       
    86     void endTextLink() {}
       
    87     void startHtmlLink(const char *url);
       
    88     void endHtmlLink();
       
    89     void startTypewriter() { t << "\\fC"; firstCol=FALSE; }
       
    90     void endTypewriter()   { t << "\\fP"; firstCol=FALSE; }
       
    91     void startGroupHeader();
       
    92     void endGroupHeader();
       
    93     void startMemberSections() {}
       
    94     void endMemberSections() {}
       
    95     void startMemberHeader();
       
    96     void endMemberHeader();
       
    97     void insertMemberAlign(bool) {}
       
    98     void startMemberSubtitle() {}
       
    99     void endMemberSubtitle() {}
       
   100     //void writeListItem();
       
   101     void startItemListItem();
       
   102     void endItemListItem();
       
   103     void startMemberDocList() {}
       
   104     void endMemberDocList() {}
       
   105     void startMemberList();
       
   106     void endMemberList();
       
   107     void startAnonTypeScope(int);
       
   108     void endAnonTypeScope(int);
       
   109     void startMemberItem(int);
       
   110     void endMemberItem();
       
   111     void startMemberTemplateParams() {}
       
   112     void endMemberTemplateParams() {}
       
   113 
       
   114     void startMemberGroupHeader(bool);
       
   115     void endMemberGroupHeader();
       
   116     void startMemberGroupDocs();
       
   117     void endMemberGroupDocs();
       
   118     void startMemberGroup();
       
   119     void endMemberGroup(bool);
       
   120 
       
   121     void writeRuler()    {}
       
   122     void writeAnchor(const char *,const char *) {}
       
   123     void startCodeFragment();
       
   124     void endCodeFragment();
       
   125     void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
       
   126     void startCodeLine() {}
       
   127     void endCodeLine() { codify("\n"); col=0; }
       
   128     void startEmphasis() { t << "\\fI"; firstCol=FALSE; }
       
   129     void endEmphasis()   { t << "\\fP"; firstCol=FALSE; }
       
   130     void startBold()     { t << "\\fB"; firstCol=FALSE; }
       
   131     void endBold()       { t << "\\fP"; firstCol=FALSE; }
       
   132     void startDescription() {}
       
   133     void endDescription()   {}
       
   134     void startDescItem();
       
   135     void endDescItem();
       
   136     void lineBreak(const char *) { t << "\n.br" << endl; }
       
   137     void writeChar(char c);
       
   138     void startMemberDoc(const char *,const char *,const char *,const char *);
       
   139     void endMemberDoc(bool);
       
   140     void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
       
   141     void endDoxyAnchor(const char *,const char *) {}
       
   142     void startCodeAnchor(const char *) {}
       
   143     void endCodeAnchor() {}
       
   144     void writeLatexSpacing() {}
       
   145     void writeStartAnnoItem(const char *type,const char *file,
       
   146                             const char *path,const char *name);
       
   147     void writeEndAnnoItem(const char *) { t << endl; firstCol=TRUE; }
       
   148     void startSubsection();
       
   149     void endSubsection();
       
   150     void startSubsubsection();
       
   151     void endSubsubsection();
       
   152     void startCenter()        {}
       
   153     void endCenter()          {}
       
   154     void startSmall()         {}
       
   155     void endSmall()           {}
       
   156     void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; }
       
   157     void endMemberDescription()   { t << "\\fP\""; firstCol=FALSE; }
       
   158     void startDescList(SectionTypes);
       
   159     void endDescList()        {}
       
   160     void startSimpleSect(SectionTypes,const char *,const char *,const char *);
       
   161     void endSimpleSect();
       
   162     void startParamList(ParamListTypes,const char *title);
       
   163     void endParamList();
       
   164     //void writeDescItem();
       
   165     void startDescForItem();
       
   166     void endDescForItem();
       
   167     void startSection(const char *,const char *,SectionInfo::SectionType);
       
   168     void endSection(const char *,SectionInfo::SectionType);
       
   169     void addIndexItem(const char *,const char *) {}
       
   170     void startIndent()        {}
       
   171     void endIndent()          {}
       
   172     void writeSynopsis();
       
   173     void startClassDiagram() {}
       
   174     void endClassDiagram(const ClassDiagram &,const char *,const char *) {}
       
   175     void startPageRef() {}
       
   176     void endPageRef(const char *,const char *) {}
       
   177     void startQuickIndices() {}
       
   178     void endQuickIndices() {}
       
   179     void writeQuickLinks(bool,HighlightedItem) {}
       
   180     void startContents() {}
       
   181     void endContents() {}
       
   182     void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
       
   183     
       
   184     void startDescTable() {}
       
   185     void endDescTable() {}
       
   186     void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); }
       
   187     void endDescTableTitle() { endEmphasis(); endBold(); }
       
   188     void startDescTableData() { t << endl; firstCol=TRUE; }
       
   189     void endDescTableData() {}
       
   190 
       
   191     void startDotGraph() {}
       
   192     void endDotGraph(const DotClassGraph &) {}
       
   193     void startInclDepGraph() {}
       
   194     void endInclDepGraph(const DotInclDepGraph &) {}
       
   195     void startGroupCollaboration() {}
       
   196     void endGroupCollaboration(const DotGroupCollaboration &) {}
       
   197     void startCallGraph() {}
       
   198     void endCallGraph(const DotCallGraph &) {}
       
   199     void startDirDepGraph() {} 
       
   200     void endDirDepGraph(const DotDirDeps &) {}
       
   201     void writeGraphicalHierarchy(const DotGfxHierarchyTable &) {}
       
   202 
       
   203     void startTextBlock(bool) {}
       
   204     void endTextBlock(bool) {}
       
   205     void lastIndexPage() {}
       
   206 
       
   207     void startMemberDocPrefixItem() {}
       
   208     void endMemberDocPrefixItem() {}
       
   209     void startMemberDocName(bool) {}
       
   210     void endMemberDocName() {}
       
   211     void startParameterType(bool,const char *) {}
       
   212     void endParameterType() {}
       
   213     void startParameterName(bool) {}
       
   214     void endParameterName(bool,bool,bool) {}
       
   215     void startParameterList(bool) {}
       
   216     void endParameterList() {}
       
   217 
       
   218     void startFontClass(const char *) {}
       
   219     void endFontClass() {}
       
   220 
       
   221     void startConstraintList(const char *);
       
   222     void startConstraintParam();
       
   223     void endConstraintParam();
       
   224     void startConstraintType();
       
   225     void endConstraintType();
       
   226     void startConstraintDocs();
       
   227     void endConstraintDocs();
       
   228     void endConstraintList();
       
   229 
       
   230     void writeCodeAnchor(const char *) {}
       
   231     void linkableSymbol(int,const char *,Definition *,Definition *) {}
       
   232 
       
   233   private:
       
   234     bool firstCol;
       
   235     bool paragraph;
       
   236     int col;
       
   237     bool upperCase;
       
   238     bool insideTabbing;
       
   239     bool inHeader;
       
   240 
       
   241     ManGenerator(const ManGenerator &g);
       
   242     ManGenerator &operator=(const ManGenerator &g);
       
   243 };
       
   244 
       
   245 #endif