docsets.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00004  *
00005  * Permission to use, copy, modify, and distribute this software and its
00006  * documentation under the terms of the GNU General Public License is hereby 
00007  * granted. No representations are made about the suitability of this software 
00008  * for any purpose. It is provided "as is" without express or implied warranty.
00009  * See the GNU General Public License for more details.
00010  *
00011  * Documents produced by Doxygen are derivative works derived from the
00012  * input used in their production; they are not affected by this license.
00013  *
00014  */
00015 
00016 #ifndef DOCSETS_H
00017 #define DOCSETS_H
00018 
00019 #include "qtbc.h"
00020 #include <qtextstream.h>
00021 #include <qstrlist.h>
00022 #include "sortdict.h"
00023 
00024 #include "index.h"
00025 
00026 class QFile;
00027 class Definition;
00028 
00033 class DocSets  : public IndexIntf
00034 {
00035 
00036   public:
00037     DocSets();
00038    ~DocSets();
00039     void initialize();
00040     void finalize();
00041     void incContentsDepth();
00042     void decContentsDepth();
00043     void addContentsItem(bool isDir,
00044                          const char *name, 
00045                          const char *ref = 0, 
00046                          const char *file = 0,
00047                          const char *anchor = 0
00048                         );
00049     void addIndexItem(const char *level1, const char *level2, 
00050                       const char *contRef, const char *memRef,
00051                       const char *anchor,const MemberDef *md);
00052     void addIndexFile(const char *name);
00053 
00054   private:
00055     void writeToken(QTextStream &t, const Definition *d,
00056                     const QCString &type, const QCString &lang,
00057                     const char *scope=0, const char *anchor=0,
00058                     const char *decl=0);
00059     struct NodeDef
00060     {
00061       NodeDef(bool d,const QCString &n,const QCString &r,
00062                     const QCString &f,const QCString &a,int i) :
00063                    isDir(d), name(n), ref(r), file(f), anchor(a),id(i) {}
00064       bool isDir;
00065       QCString name;
00066       QCString ref;
00067       QCString file;
00068       QCString anchor;
00069       int id;
00070     };
00071     QCString indent();
00072     QFile *m_nf;
00073     QFile *m_tf;
00074     QTextStream m_nts;
00075     QTextStream m_tts;
00076     int m_dc;
00077     int m_id;
00078     QArray<bool> m_firstNode;
00079     SDict<NodeDef> m_nodes;
00080     SDict<void> m_scopes;
00081 };
00082 
00083 #endif /* DOCSETS_H */
00084 



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