My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
membergroup.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 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 MEMBERGROUP_H
19 #define MEMBERGROUP_H
20 
21 #include <qlist.h>
22 #include "sortdict.h"
23 #include "types.h"
24 
25 #define DOX_NOGROUP -1
26 
27 class MemberList;
28 class MemberDef;
29 class ClassDef;
30 class NamespaceDef;
31 class FileDef;
32 class GroupDef;
33 class OutputList;
34 class Definition;
35 class StorageIntf;
36 class FTextStream;
37 struct ListItemInfo;
38 
41 {
42  public:
43  MemberGroup();
44  MemberGroup(Definition *parent,int id,const char *header,
45  const char *docs,const char *docFile,int docLine);
46  ~MemberGroup();
47  QCString header() const { return grpHeader; }
48  int groupId() const { return grpId; }
49  void insertMember(MemberDef *md);
50  void setAnchors();
52  ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
53  ClassDef *inheritedFrom,const char *inheritId);
55  ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
56  bool showInline=FALSE);
57  void writeDocumentation(OutputList &ol,const char *scopeName,
58  Definition *container,bool showEnumValues,bool showInline);
59  void writeDocumentationPage(OutputList &ol,const char *scopeName,
60  Definition *container);
61  void writeTagFile(FTextStream &);
63  MemberListType lt,
64  ClassDef *inheritedFrom,const QCString &inheritId);
65 
66  const QCString &documentation() const { return doc; }
67  bool allMembersInSameSection() const { return inSameSection; }
69  int countDecMembers(GroupDef *gd=0);
70  int countDocMembers();
74  int varCount() const;
75  int funcCount() const;
76  int enumCount() const;
77  int enumValueCount() const;
78  int typedefCount() const;
79  int protoCount() const;
80  int defineCount() const;
81  int friendCount() const;
82  int numDecMembers() const;
83  int numDocMembers() const;
84  int countInheritableMembers(ClassDef *inheritedFrom) const;
85  void setInGroup(bool b);
87  void setRefItems(const QList<ListItemInfo> *sli);
88  MemberList *members() const { return memberList; }
89  Definition *parent() const { return m_parent; }
90  QCString anchor() const;
91 
92  QCString docFile() const { return m_docFile; }
93  int docLine() const { return m_docLine; }
94 
95  void marshal(StorageIntf *s);
96  void unmarshal(StorageIntf *s);
97 
98  private:
99  MemberList *memberList; // list of all members in the group
101  int grpId;
102  QCString grpHeader;
103  QCString fileName; // base name of the generated file
105  QCString doc;
110  QCString m_docFile;
112  QList<ListItemInfo> *m_xrefListItems;
113 };
114 
116 class MemberGroupList : public QList<MemberGroup>
117 {
118 };
119 
121 class MemberGroupListIterator : public QListIterator<MemberGroup>
122 {
123  public:
125  QListIterator<MemberGroup>(l) {}
126 };
127 
129 class MemberGroupSDict : public SIntDict<MemberGroup>
130 {
131  public:
132  MemberGroupSDict(int size=17) : SIntDict<MemberGroup>(size) {}
134  private:
135  int compareValues(const MemberGroup *item1,const MemberGroup *item2) const
136  {
137  return item1->groupId() - item2->groupId();
138  }
139 };
140 
143 {
145  ~MemberGroupInfo() { delete m_sli; m_sli=0; }
146  void setRefItems(const QList<ListItemInfo> *sli);
147  QCString header;
148  QCString doc;
149  QCString docFile;
150  int docLine;
151  QCString compoundName;
152  QList<ListItemInfo> *m_sli;
153 };
154 
155 #endif