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 
39 /** A class representing a group of members. */
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;
103  QCString fileName; // base name of the generated file
113 };
114 
115 /** A list of MemberGroup objects. */
116 class MemberGroupList : public QList<MemberGroup>
117 {
118 };
119 
120 /** An iterator for MemberGroup objects in a MemberGroupList. */
121 class MemberGroupListIterator : public QListIterator<MemberGroup>
122 {
123  public:
126 };
127 
128 /** A sorted dictionary of MemberGroup objects. */
129 class MemberGroupSDict : public SIntDict<MemberGroup>
130 {
131  public:
134  private:
135  int compareValues(const MemberGroup *item1,const MemberGroup *item2) const
136  {
137  return item1->groupId() - item2->groupId();
138  }
139 };
140 
141 /** Data collected for a member group */
143 {
144  MemberGroupInfo() : m_sli(0), docLine(-1) {}
145  ~MemberGroupInfo() { delete m_sli; m_sli=0; }
146  void setRefItems(const QList<ListItemInfo> *sli);
150  int docLine;
153 };
154 
155 #endif
int typedefCount() const
QCString header() const
Definition: membergroup.h:47
This file contains a number of basic enums and types.
MemberGroupListIterator(const MemberGroupList &l)
Definition: membergroup.h:124
Definition * m_parent
Definition: membergroup.h:109
int countDecMembers(GroupDef *gd=0)
int enumValueCount() const
void writePlainDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom, const char *inheritId)
void writeTagFile(FTextStream &)
MemberList * members() const
Definition: membergroup.h:88
int countGroupedInheritedMembers(MemberListType lt)
int m_numDocMembers
Definition: membergroup.h:108
void setRefItems(const QList< ListItemInfo > *sli)
const bool FALSE
Definition: qglobal.h:370
Abstract interface for file based memory storage operations.
Definition: store.h:27
QList< ListItemInfo > * m_sli
Definition: membergroup.h:152
int countDocMembers()
int compareValues(const MemberGroup *item1, const MemberGroup *item2) const
Definition: membergroup.h:135
void writeDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool showInline=FALSE)
QCString grpHeader
Definition: membergroup.h:102
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
QCString header
Definition: membergroup.h:147
int numDocMembers() const
int enumCount() const
static QStrList * l
Definition: config.cpp:1044
bool inSameSection
Definition: membergroup.h:106
int defineCount() const
void addGroupedInheritedMembers(OutputList &ol, ClassDef *cd, MemberListType lt, ClassDef *inheritedFrom, const QCString &inheritId)
int numDecMembers() const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void writeDocumentation(OutputList &ol, const char *scopeName, Definition *container, bool showEnumValues, bool showInline)
bool allMembersInSameSection() const
Definition: membergroup.h:67
int protoCount() const
int groupId() const
Definition: membergroup.h:48
MemberList * inDeclSection
Definition: membergroup.h:100
Definition * parent() const
Definition: membergroup.h:89
QCString docFile() const
Definition: membergroup.h:92
void setInGroup(bool b)
void addToDeclarationSection()
int funcCount() const
MemberGroupSDict(int size=17)
Definition: membergroup.h:132
MemberList * memberList
Definition: membergroup.h:99
QCString m_docFile
Definition: membergroup.h:110
Definition * scope
Definition: membergroup.h:104
void writeDocumentationPage(OutputList &ol, const char *scopeName, Definition *container)
QCString fileName
Definition: membergroup.h:103
int countInheritableMembers(ClassDef *inheritedFrom) const
static bool * b
Definition: config.cpp:1043
void setAnchors()
const QCString & documentation() const
Definition: membergroup.h:66
QCString doc
Definition: membergroup.h:105
MemberListType
Definition: types.h:104
QCString docFile
Definition: membergroup.h:149
int docLine() const
Definition: membergroup.h:93
void distributeMemberGroupDocumentation()
void findSectionsInDocumentation()
void marshal(StorageIntf *s)
static QCString * s
Definition: config.cpp:1042
QCString anchor() const
int m_numDecMembers
Definition: membergroup.h:107
QList< ListItemInfo > * m_xrefListItems
Definition: membergroup.h:112
int varCount() const
QCString compoundName
Definition: membergroup.h:151
void unmarshal(StorageIntf *s)
void addListReferences(Definition *d)
int friendCount() const
void insertMember(MemberDef *md)
Definition: membergroup.cpp:69