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 
40 /** A class representing a group of members. */
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;
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 &);
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();
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;
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:
93  std::unique_ptr<MemberList> memberList; // list of all members in the group
95  int grpId = 0;
97  QCString fileName; // base name of the generated file
99  bool inSameSection = true;
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 
113 /** Data collected for a member group */
115 {
116  void setRefItems(const RefItemVector &sli);
120  int docLine = -1;
123 };
124 
125 using MemberGroupInfoMap = std::unordered_map< int,std::unique_ptr<MemberGroupInfo> >;
126 
127 #endif
MemberGroup::distributeMemberGroupDocumentation
void distributeMemberGroupDocumentation()
Definition: membergroup.cpp:199
MemberGroup::m_container
const Definition * m_container
Definition: membergroup.h:92
MemberGroup::inDeclSection
MemberList * inDeclSection
Definition: membergroup.h:94
MemberGroupInfo::docFile
QCString docFile
Definition: membergroup.h:119
MemberGroup::inSameSection
bool inSameSection
Definition: membergroup.h:99
MemberGroupInfo::m_sli
RefItemVector m_sli
Definition: membergroup.h:122
MemberGroup::groupId
int groupId() const
Definition: membergroup.h:49
MemberListType
MemberListType
Definition: types.h:100
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
MemberGroup::writeDeclarations
void writeDeclarations(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, bool showInline=FALSE) const
Definition: membergroup.cpp:92
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
types.h
This file contains a number of basic enums and types.
MemberGroup::countInheritableMembers
int countInheritableMembers(const ClassDef *inheritedFrom) const
Definition: membergroup.cpp:193
MemberGroup::numDecEnumValues
int numDecEnumValues() const
Definition: membergroup.cpp:243
MemberGroup::fileName
QCString fileName
Definition: membergroup.h:97
MemberGroup::docFile
QCString docFile() const
Definition: membergroup.h:88
MemberGroup::anchor
QCString anchor() const
Definition: membergroup.cpp:258
MemberGroup::countDocMembers
void countDocMembers()
Definition: membergroup.cpp:183
MemberGroup::header
QCString header() const
Definition: membergroup.h:48
MemberGroup::grpId
int grpId
Definition: membergroup.h:95
RefItem
This struct represents an item in the list of references.
Definition: reflist.h:30
MemberGroup::setAnchors
void setAnchors()
Definition: membergroup.cpp:87
MemberGroup::addListReferences
void addListReferences(Definition *d)
Definition: membergroup.cpp:269
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
MemberGroup::writeDocumentation
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, bool showEnumValues, bool showInline) const
Definition: membergroup.cpp:111
MemberGroup::m_docLine
int m_docLine
Definition: membergroup.h:101
GroupDef
A model of a group of symbols.
Definition: groupdef.h:49
MemberGroupInfo::doc
QCString doc
Definition: membergroup.h:118
MemberGroup::addGroupedInheritedMembers
void addGroupedInheritedMembers(OutputList &ol, const ClassDef *cd, MemberListType lt, const ClassDef *inheritedFrom, const QCString &inheritId) const
Definition: membergroup.cpp:129
OutputList
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
MemberGroup::m_xrefListItems
RefItemVector m_xrefListItems
Definition: membergroup.h:102
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
MemberGroup::writeDocumentationPage
void writeDocumentationPage(OutputList &ol, const QCString &scopeName, const DefinitionMutable *container) const
Definition: membergroup.cpp:118
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
MemberGroup::numDocMembers
int numDocMembers() const
Definition: membergroup.cpp:248
MemberGroupRefList
Definition: membergroup.h:105
MemberGroup::~MemberGroup
~MemberGroup()
Definition: membergroup.cpp:44
DefinitionMutable
Definition: definition.h:308
MemberGroupInfoMap
std::unordered_map< int, std::unique_ptr< MemberGroupInfo > > MemberGroupInfoMap
Definition: membergroup.h:125
MemberGroup::findSectionsInDocumentation
void findSectionsInDocumentation(const Definition *d)
Definition: membergroup.cpp:283
MemberGroup::grpHeader
QCString grpHeader
Definition: membergroup.h:96
MemberGroupInfo::compoundName
QCString compoundName
Definition: membergroup.h:121
MemberListContainer
MemberListContainer
Definition: types.h:196
MemberGroup::documentation
const QCString & documentation() const
Definition: membergroup.h:68
MemberGroup::writePlainDeclarations
void writePlainDeclarations(OutputList &ol, bool inGroup, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const
Definition: membergroup.cpp:102
reflist.h
MemberGroup::container
const Definition * container() const
Definition: membergroup.cpp:188
MemberGroup::MemberGroup
MemberGroup(const Definition *container, int id, const QCString &header, const QCString &docs, const QCString &docFile, int docLine, MemberListContainer con)
Definition: membergroup.cpp:32
MemberGroupInfo
Data collected for a member group
Definition: membergroup.h:114
MemberGroup::docLine
int docLine() const
Definition: membergroup.h:89
MemberGroup::numDecMembers
int numDecMembers() const
Definition: membergroup.cpp:238
MemberGroup::doc
QCString doc
Definition: membergroup.h:98
MemberGroupInfo::header
QCString header
Definition: membergroup.h:117
MemberGroup::setRefItems
void setRefItems(const RefItemVector &sli)
Definition: membergroup.cpp:289
RefItemVector
std::vector< RefItem * > RefItemVector
Definition: reflist.h:132
MemberGroup::memberList
std::unique_ptr< MemberList > memberList
Definition: membergroup.h:93
MemberGroupList
Definition: membergroup.h:109
MemberGroupInfo::docLine
int docLine
Definition: membergroup.h:120
MemberGroup::allMembersInSameSection
bool allMembersInSameSection() const
Definition: membergroup.h:69
MemberGroup::insertMember
void insertMember(const MemberDef *md)
Definition: membergroup.cpp:48
MemberGroup::members
const MemberList & members() const
Definition: membergroup.h:85
MemberGroup::writeTagFile
void writeTagFile(TextStream &)
Definition: membergroup.cpp:294
FileDef
A model of a file symbol.
Definition: filedef.h:73
MemberGroup
A class representing a group of members.
Definition: membergroup.h:41
MemberGroup::addToDeclarationSection
void addToDeclarationSection()
Definition: membergroup.cpp:168
MemberGroupInfo::setRefItems
void setRefItems(const RefItemVector &sli)
Definition: membergroup.cpp:301
MemberGroup::m_docFile
QCString m_docFile
Definition: membergroup.h:100
MemberList
A list of MemberDef objects as shown in documentation sections.
Definition: memberlist.h:81
MemberGroup::countDecMembers
void countDecMembers()
Definition: membergroup.cpp:178
MemberGroup::numDocEnumValues
int numDocEnumValues() const
Definition: membergroup.cpp:253
MemberGroup::setAnonymousEnumType
void setAnonymousEnumType()
Definition: membergroup.cpp:124
MemberGroup::countGroupedInheritedMembers
int countGroupedInheritedMembers(MemberListType lt)
Definition: membergroup.cpp:148
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108