doxygen
membergroup.h
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2021 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 MEMBERGROUP_H
17 #define MEMBERGROUP_H
18 
19 #include <vector>
20 #include <map>
21 #include <memory>
22 
23 #include "types.h"
24 #include "reflist.h"
25 
26 #define DOX_NOGROUP -1
27 
28 class MemberList;
29 class MemberDef;
30 class ClassDef;
31 class NamespaceDef;
32 class FileDef;
33 class GroupDef;
34 class OutputList;
35 class Definition;
36 class DefinitionMutable;
37 class RefItem;
38 class TextStream;
39 
42 {
43  public:
44  //MemberGroup();
45  MemberGroup(const Definition *container,int id,const QCString &header,
46  const QCString &docs,const QCString &docFile,int docLine,MemberListContainer con);
47  ~MemberGroup();
48  QCString header() const { return grpHeader; }
49  int groupId() const { return grpId; }
50  void insertMember(const MemberDef *md);
51  void setAnchors();
52  void writePlainDeclarations(OutputList &ol,bool inGroup,
53  const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
54  int indentLevel, const ClassDef *inheritedFrom,const QCString &inheritId) const;
55  void writeDeclarations(OutputList &ol,
56  const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
57  bool showInline=FALSE) const;
58  void writeDocumentation(OutputList &ol,const QCString &scopeName,
59  const Definition *container,bool showEnumValues,bool showInline) const;
60  void writeDocumentationPage(OutputList &ol,const QCString &scopeName,
61  const DefinitionMutable *container) const;
62  void writeTagFile(TextStream &);
63  void addGroupedInheritedMembers(OutputList &ol,const ClassDef *cd,
64  MemberListType lt,
65  const ClassDef *inheritedFrom,const QCString &inheritId) const;
66  void setAnonymousEnumType();
67 
68  const QCString &documentation() const { return doc; }
69  bool allMembersInSameSection() const { return inSameSection; }
71  void countDecMembers();
72  void countDocMembers();
73  int countGroupedInheritedMembers(MemberListType lt);
74  void distributeMemberGroupDocumentation();
75  void findSectionsInDocumentation(const Definition *d);
76  int numDecMembers() const;
77  int numDecEnumValues() const;
78  int numDocMembers() const;
79  int numDocEnumValues() const;
80  const Definition *container() const;
81 
82  int countInheritableMembers(const ClassDef *inheritedFrom) const;
83  void addListReferences(Definition *d);
84  void setRefItems(const RefItemVector &sli);
85  const MemberList &members() const { return *memberList.get(); }
86  QCString anchor() const;
87 
88  QCString docFile() const { return m_docFile; }
89  int docLine() const { return m_docLine; }
90 
91  private:
92  const Definition *m_container;
93  std::unique_ptr<MemberList> memberList; // list of all members in the group
94  MemberList *inDeclSection = 0;
95  int grpId = 0;
96  QCString grpHeader;
97  QCString fileName; // base name of the generated file
98  QCString doc;
99  bool inSameSection = true;
100  QCString m_docFile;
101  int m_docLine;
102  RefItemVector m_xrefListItems;
103 };
104 
105 class MemberGroupRefList : public std::vector<MemberGroup *>
106 {
107 };
108 
109 class MemberGroupList : public std::vector< std::unique_ptr<MemberGroup> >
110 {
111 };
112 
115 {
116  void setRefItems(const RefItemVector &sli);
117  QCString header;
118  QCString doc;
119  QCString docFile;
120  int docLine = -1;
121  QCString compoundName;
122  RefItemVector m_sli;
123 };
124 
125 using MemberGroupInfoMap = std::unordered_map< int,std::unique_ptr<MemberGroupInfo> >;
126 
127 #endif
This file contains a number of basic enums and types.
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
This struct represents an item in the list of references.
Definition: reflist.h:30
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
Text streaming class that buffers data.
Definition: textstream.h:34
A model of a file symbol.
Definition: filedef.h:73
Data collected for a member group.
Definition: membergroup.h:114
Definition: membergroup.h:109
A class representing a group of members.
Definition: membergroup.h:41
Definition: definition.h:308
void addToDeclarationSection()
Definition: membergroup.cpp:168
A list of MemberDef objects as shown in documentation sections.
Definition: memberlist.h:81
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
This is an alternative implementation of QCString.
Definition: qcstring.h:108
Definition: membergroup.h:105
A model of a group of symbols.
Definition: groupdef.h:49
A abstract class representing of a compound symbol.
Definition: classdef.h:103