1 /******************************************************************************
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
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.
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
25 #define DOX_NOGROUP -1
39 /** A class representing a group of members. */
44 MemberGroup(Definition *parent,int id,const char *header,
45 const char *docs,const char *docFile,int docLine);
47 QCString header() const { return grpHeader; }
48 int groupId() const { return grpId; }
49 void insertMember(MemberDef *md);
51 void writePlainDeclarations(OutputList &ol,
52 ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
53 ClassDef *inheritedFrom,const char *inheritId);
54 void writeDeclarations(OutputList &ol,
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 &);
62 void addGroupedInheritedMembers(OutputList &ol,ClassDef *cd,
64 ClassDef *inheritedFrom,const QCString &inheritId);
66 const QCString &documentation() const { return doc; }
67 bool allMembersInSameSection() const { return inSameSection; }
68 void addToDeclarationSection();
69 int countDecMembers(GroupDef *gd=0);
70 int countDocMembers();
71 int countGroupedInheritedMembers(MemberListType lt);
72 void distributeMemberGroupDocumentation();
73 void findSectionsInDocumentation();
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);
86 void addListReferences(Definition *d);
87 void setRefItems(const QList<ListItemInfo> *sli);
88 MemberList *members() const { return memberList; }
89 Definition *parent() const { return m_parent; }
90 QCString anchor() const;
92 QCString docFile() const { return m_docFile; }
93 int docLine() const { return m_docLine; }
95 void marshal(StorageIntf *s);
96 void unmarshal(StorageIntf *s);
99 MemberList *memberList; // list of all members in the group
100 MemberList *inDeclSection;
103 QCString fileName; // base name of the generated file
109 Definition *m_parent;
112 QList<ListItemInfo> *m_xrefListItems;
115 /** A list of MemberGroup objects. */
116 class MemberGroupList : public QList<MemberGroup>
120 /** An iterator for MemberGroup objects in a MemberGroupList. */
121 class MemberGroupListIterator : public QListIterator<MemberGroup>
124 MemberGroupListIterator(const MemberGroupList &l) :
125 QListIterator<MemberGroup>(l) {}
128 /** A sorted dictionary of MemberGroup objects. */
129 class MemberGroupSDict : public SIntDict<MemberGroup>
132 MemberGroupSDict(int size=17) : SIntDict<MemberGroup>(size) {}
133 ~MemberGroupSDict() {}
135 int compareValues(const MemberGroup *item1,const MemberGroup *item2) const
137 return item1->groupId() - item2->groupId();
141 /** Data collected for a member group */
142 struct MemberGroupInfo
144 MemberGroupInfo() : docLine(-1), m_sli(0) {}
145 ~MemberGroupInfo() { delete m_sli; m_sli=0; }
146 void setRefItems(const QList<ListItemInfo> *sli);
151 QCString compoundName;
152 QList<ListItemInfo> *m_sli;