membergroup.h 3.81 KB
Newer Older
1 2
/******************************************************************************
 *
3
 * 
4
 *
5
 * Copyright (C) 1997-2008 by Dimitri van Heesch.
6 7 8 9 10 11 12
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation under the terms of the GNU General Public License is hereby 
 * granted. No representations are made about the suitability of this software 
 * for any purpose. It is provided "as is" without express or implied warranty.
 * See the GNU General Public License for more details.
 *
Dimitri van Heesch's avatar
Dimitri van Heesch committed
13 14
 * Documents produced by Doxygen are derivative works derived from the
 * input used in their production; they are not affected by this license.
15 16 17 18 19 20 21 22
 *
 */

#ifndef MEMBERGROUP_H
#define MEMBERGROUP_H

#include "qtbc.h"
#include <qlist.h>
23
#include <qfile.h>
24
#include "sortdict.h"
25

Dimitri van Heesch's avatar
Dimitri van Heesch committed
26
#define DOX_NOGROUP -1
27 28

class MemberDef;
29 30 31
class ClassDef;
class NamespaceDef;
class FileDef;
32
class MemberList;
33
class GroupDef;
34
class OutputList;
35
class Definition;
36
class StorageIntf;
37

38
class MemberGroup 
39 40
{
  public:
41
    MemberGroup();
42 43
    MemberGroup(Definition *parent,int id,const char *header,
                const char *docs,const char *docFile);
44 45
   ~MemberGroup();
    QCString header() const { return grpHeader; }
46
    int groupId() const { return grpId; }
Dimitri van Heesch's avatar
Dimitri van Heesch committed
47
    void insertMember(MemberDef *md);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
48
    void setAnchors(ClassDef *);
49
    void writePlainDeclarations(OutputList &ol,
50
               ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
51 52
    void writeDeclarations(OutputList &ol,
               ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
53 54

    void writeDocumentation(OutputList &ol,const char *scopeName,
55 56
               Definition *container);
    void writeDocumentationPage(OutputList &ol,const char *scopeName,
57
               Definition *container);
58
    QCString documentation() { return doc; }
Dimitri van Heesch's avatar
Dimitri van Heesch committed
59 60
    bool allMembersInSameSection() { return inSameSection; }
    void addToDeclarationSection();
61 62
    int countDecMembers();
    int countDocMembers();
63
    void distributeMemberGroupDocumentation();
64
    void findSectionsInDocumentation();
65 66 67 68 69 70 71 72 73 74 75
    int varCount() const;
    int funcCount() const;
    int enumCount() const;
    int enumValueCount() const;
    int typedefCount() const;
    int protoCount() const;
    int defineCount() const;
    int friendCount() const;
    int numDecMembers() const;
    int numDocMembers() const;
    void setInGroup(bool b);
76
    void addListReferences(Definition *d);
77
    MemberList *members() const { return memberList; }
78
    Definition *parent() const { return m_parent; }
79

80 81 82
    void marshal(StorageIntf *s);
    void unmarshal(StorageIntf *s);

83
  private: 
Dimitri van Heesch's avatar
Dimitri van Heesch committed
84
    MemberList *memberList;      // list of all members in the group
85
    MemberList *inDeclSection;
86 87
    int grpId;
    QCString grpHeader;
Dimitri van Heesch's avatar
Dimitri van Heesch committed
88
    QCString fileName;           // base name of the generated file
89 90
    Definition *scope;
    QCString doc;
Dimitri van Heesch's avatar
Dimitri van Heesch committed
91
    bool inSameSection;
92
    int  m_numDecMembers;
93
    int  m_numDocMembers;
94
    Definition *m_parent;
95
    QCString m_docFile;
96 97 98 99 100 101 102 103 104 105 106 107 108
};

class MemberGroupList : public QList<MemberGroup>
{
};

class MemberGroupListIterator : public QListIterator<MemberGroup>
{
  public:
    MemberGroupListIterator(const MemberGroupList &l) : 
      QListIterator<MemberGroup>(l) {}
};

109 110 111 112 113 114 115
class MemberGroupSDict : public SIntDict<MemberGroup>
{
  public:
    MemberGroupSDict(int size=17) : SIntDict<MemberGroup>(size) {}
   ~MemberGroupSDict() {}
};

116 117 118 119 120
struct MemberGroupInfo
{
  QCString header;
  QCString doc;
  QCString docFile;
121
  QCString compoundName;
122 123
};

124 125 126 127 128 129 130 131 132 133 134 135 136 137
//class MemberGroupDict : public QIntDict<MemberGroup>
//{
//  public:
//    MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
//   ~MemberGroupDict() {}
//};

//class MemberGroupDictIterator : public QIntDictIterator<MemberGroup>
//{
//  public:
//    MemberGroupDictIterator(const MemberGroupDict &d) : 
//      QIntDictIterator<MemberGroup>(d) {}
//   ~MemberGroupDictIterator() {}
//};
138

139
#endif