docsets.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef DOCSETS_H
17 #define DOCSETS_H
18 
19 #include "sortdict.h"
20 #include "ftextstream.h"
21 #include "index.h"
22 
23 class QFile;
24 class Definition;
25 
26 /** A class that generates docset files.
27  *
28  * These files can be used to create context help
29  * for use within Apple's Xcode 3.0 development environment
30  */
31 class DocSets : public IndexIntf
32 {
33 
34  public:
35  DocSets();
36  ~DocSets();
37  void initialize();
38  void finalize();
39  void incContentsDepth();
40  void decContentsDepth();
41  void addContentsItem(bool isDir,
42  const char *name,
43  const char *ref,
44  const char *file,
45  const char *anchor,
46  bool separateIndex,
47  bool addToNavIndex,
48  Definition *def
49  );
50  void addIndexItem(Definition *context,MemberDef *md,
51  const char *sectionAnchor,const char *title);
52  void addIndexFile(const char *name);
53  void addImageFile(const char *) {}
54  void addStyleSheetFile(const char *) {}
55 
56  private:
57  void writeToken(FTextStream &t, const Definition *d,
58  const QCString &type, const QCString &lang,
59  const char *scope=0, const char *anchor=0,
60  const char *decl=0);
61  struct NodeDef
62  {
63  NodeDef(bool d,const QCString &n,const QCString &r,
64  const QCString &f,const QCString &a,int i) :
65  isDir(d), name(n), ref(r), file(f), anchor(a),id(i) {}
66  bool isDir;
71  int id;
72  };
73  QCString indent();
78  int m_dc;
79  int m_id;
83 };
84 
85 #endif /* DOCSETS_H */
86 
static QCString name
Definition: declinfo.cpp:673
QCString file
Definition: docsets.h:69
~DocSets()
Definition: docsets.cpp:37
static QCString scope
Definition: declinfo.cpp:668
void addStyleSheetFile(const char *)
Definition: docsets.h:54
void addContentsItem(bool isDir, const char *name, const char *ref, const char *file, const char *anchor, bool separateIndex, bool addToNavIndex, Definition *def)
Definition: docsets.cpp:232
void incContentsDepth()
Definition: docsets.cpp:209
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void addIndexItem(Definition *context, MemberDef *md, const char *sectionAnchor, const char *title)
Definition: docsets.cpp:277
DocSets()
Definition: docsets.cpp:28
SDict< NodeDef > m_nodes
Definition: docsets.h:81
QFile * m_tf
Definition: docsets.h:75
QFile * m_nf
Definition: docsets.h:74
void decContentsDepth()
Definition: docsets.cpp:221
void addIndexFile(const char *name)
Definition: docsets.cpp:530
Definition: sortdict.h:73
QCString name
Definition: docsets.h:67
SDict< void > m_scopes
Definition: docsets.h:82
std::void_t< T > n
const double a
QCString indent()
Definition: docsets.cpp:202
void addImageFile(const char *)
Definition: docsets.h:53
QArray< bool > m_firstNode
Definition: docsets.h:80
FTextStream m_tts
Definition: docsets.h:77
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
void writeToken(FTextStream &t, const Definition *d, const QCString &type, const QCString &lang, const char *scope=0, const char *anchor=0, const char *decl=0)
Definition: docsets.cpp:486
Abstract interface for index generators.
Definition: index.h:30
FTextStream m_nts
Definition: docsets.h:76
int m_dc
Definition: docsets.h:78
int m_id
Definition: docsets.h:79
QCString ref
Definition: docsets.h:68
void finalize()
Definition: docsets.cpp:181
NodeDef(bool d, const QCString &n, const QCString &r, const QCString &f, const QCString &a, int i)
Definition: docsets.h:63
QCString anchor
Definition: docsets.h:70
void initialize()
Definition: docsets.cpp:43