Doxygen
groupdef.h
浏览该文件的文档.
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 GROUPDEF_H
19 #define GROUPDEF_H
20 
21 #include <memory>
22 
23 #include "definition.h"
24 #include "dirdef.h"
25 #include "layout.h"
26 #include "membergroup.h"
27 #include "linkedmap.h"
28 
29 class MemberList;
30 class MemberLists;
31 class FileList;
32 class ClassLinkedRefMap;
35 class FileDef;
36 class ClassDef;
37 class ConceptDef;
38 class NamespaceDef;
39 class GroupList;
40 class OutputList;
41 class PageLinkedRefMap;
42 class PageDef;
43 class DirDef;
44 class FTVHelp;
45 class Entry;
46 class MemberDef;
47 
48 /** A model of a group of symbols. */
49 class GroupDef : public DefinitionMutable, public Definition
50 {
51  public:
52  ~GroupDef() {}
53 
54  virtual DefType definitionType() const = 0;
55  virtual QCString getOutputFileBase() const = 0;
56  virtual QCString anchor() const = 0;
57  virtual QCString displayName(bool=TRUE) const = 0;
58  virtual QCString groupTitle() const = 0;
59  virtual void setGroupTitle( const QCString &newtitle ) = 0;
60  virtual bool hasGroupTitle( ) const = 0;
61  virtual void addFile(const FileDef *def) = 0;
62  virtual bool addClass(const ClassDef *def) = 0;
63  virtual bool addConcept(const ConceptDef *def) = 0;
64  virtual bool addNamespace(const NamespaceDef *def) = 0;
65  virtual void addGroup(const GroupDef *def) = 0;
66  virtual void addPage(const PageDef *def) = 0;
67  virtual void addExample(const PageDef *def) = 0;
68  virtual void addDir(DirDef *dd) = 0;
69  virtual bool insertMember(const MemberDef *def,bool docOnly=FALSE) = 0;
70  virtual void removeMember(MemberDef *md) = 0;
71  virtual bool findGroup(const GroupDef *def) const = 0;
72  virtual void writeDocumentation(OutputList &ol) = 0;
73  virtual void writeMemberPages(OutputList &ol) = 0;
74  virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const = 0;
75  virtual void writeTagFile(TextStream &) = 0;
76  virtual size_t numDocMembers() const = 0;
77  virtual bool isLinkableInProject() const = 0;
78  virtual bool isLinkable() const = 0;
79  virtual bool isASubGroup() const = 0;
80  virtual void computeAnchors() = 0;
81  virtual void countMembers() = 0;
82 
83  virtual void addMembersToMemberGroup() = 0;
84  virtual void distributeMemberGroupDocumentation() = 0;
85  virtual void findSectionsInDocumentation() = 0;
86 
87  virtual void addListReferences() = 0;
88  virtual void sortMemberLists() = 0;
89  virtual bool subGrouping() const = 0;
90 
91  virtual void setGroupScope(Definition *d) = 0;
92  virtual Definition *getGroupScope() const = 0;
93 
94  virtual MemberList *getMemberList(MemberListType lt) const = 0;
95  virtual const MemberLists &getMemberLists() const = 0;
96 
97  /* user defined member groups */
98  virtual const MemberGroupList &getMemberGroups() const = 0;
99 
100  virtual const FileList &getFiles() const = 0;
101  virtual const ClassLinkedRefMap &getClasses() const = 0;
102  virtual const ConceptLinkedRefMap &getConcepts() const = 0;
103  virtual const NamespaceLinkedRefMap &getNamespaces() const = 0;
104  virtual const GroupList &getSubGroups() const = 0;
105  virtual const PageLinkedRefMap &getPages() const = 0;
106  virtual const DirList & getDirs() const = 0;
107  virtual const PageLinkedRefMap &getExamples() const = 0;
108  virtual bool hasDetailedDescription() const = 0;
109  virtual void sortSubGroups() = 0;
110 
111 };
112 
113 GroupDef *createGroupDef(const QCString &fileName,int line,const QCString &name,
114  const QCString &title,const QCString &refFileName=QCString());
115 
116 // --- Cast functions
117 
119 const GroupDef *toGroupDef(const Definition *d);
120 
121 // ------------------
122 
123 class GroupLinkedMap : public LinkedMap<GroupDef>
124 {
125 };
126 
127 class GroupList : public std::vector<const GroupDef *>
128 {
129 };
130 
131 void addClassToGroups (const Entry *root,ClassDef *cd);
132 void addConceptToGroups (const Entry *root,ConceptDef *cd);
133 void addNamespaceToGroups(const Entry *root,NamespaceDef *nd);
134 void addGroupToGroups (const Entry *root,GroupDef *subGroup);
135 void addMemberToGroups (const Entry *root,MemberDef *md);
136 void addPageToGroups (const Entry *root,PageDef *pd);
137 void addExampleToGroups (const Entry *root,PageDef *eg);
138 void addDirToGroups (const Entry *root,DirDef *dd);
139 
140 #endif
141 
createGroupDef
GroupDef * createGroupDef(const QCString &fileName, int line, const QCString &name, const QCString &title, const QCString &refFileName=QCString())
Definition: groupdef.cpp:162
GroupDef::getConcepts
virtual const ConceptLinkedRefMap & getConcepts() const =0
GroupDef::insertMember
virtual bool insertMember(const MemberDef *def, bool docOnly=FALSE)=0
GroupDef::addListReferences
virtual void addListReferences()=0
ConceptDef
Definition: conceptdef.h:22
membergroup.h
MemberListType
MemberListType
Definition: types.h:100
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
GroupDef::getClasses
virtual const ClassLinkedRefMap & getClasses() const =0
DirList
A list of directories.
Definition: dirdef.h:181
GroupDef::hasDetailedDescription
virtual bool hasDetailedDescription() const =0
GroupDef::distributeMemberGroupDocumentation
virtual void distributeMemberGroupDocumentation()=0
GroupDef::subGrouping
virtual bool subGrouping() const =0
DirDef
A model of a directory symbol.
Definition: dirdef.h:110
GroupDef::groupTitle
virtual QCString groupTitle() const =0
GroupDef::addNamespace
virtual bool addNamespace(const NamespaceDef *def)=0
GroupDef::getFiles
virtual const FileList & getFiles() const =0
GroupDef::getMemberList
virtual MemberList * getMemberList(MemberListType lt) const =0
PageLinkedRefMap
Definition: pagedef.h:78
addConceptToGroups
void addConceptToGroups(const Entry *root, ConceptDef *cd)
Definition: groupdef.cpp:1339
GroupDef::countMembers
virtual void countMembers()=0
GroupDef::writeDocumentation
virtual void writeDocumentation(OutputList &ol)=0
addExampleToGroups
void addExampleToGroups(const Entry *root, PageDef *eg)
Definition: groupdef.cpp:1540
GroupDef::addClass
virtual bool addClass(const ClassDef *def)=0
GroupDef::getSubGroups
virtual const GroupList & getSubGroups() const =0
MemberLists
Definition: memberlist.h:138
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
GroupDef::getGroupScope
virtual Definition * getGroupScope() const =0
GroupDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
GroupDef::isASubGroup
virtual bool isASubGroup() const =0
linkedmap.h
NamespaceLinkedRefMap
Definition: namespacedef.h:45
GroupDef::addConcept
virtual bool addConcept(const ConceptDef *def)=0
GroupDef::addDir
virtual void addDir(DirDef *dd)=0
PageDef
A model of a page symbol.
Definition: pagedef.h:25
GroupDef
A model of a group of symbols.
Definition: groupdef.h:49
addClassToGroups
void addClassToGroups(const Entry *root, ClassDef *cd)
Definition: groupdef.cpp:1322
GroupDef::writeTagFile
virtual void writeTagFile(TextStream &)=0
OutputList
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
GroupDef::getDirs
virtual const DirList & getDirs() const =0
GroupDef::findSectionsInDocumentation
virtual void findSectionsInDocumentation()=0
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
GroupDef::~GroupDef
~GroupDef()
Definition: groupdef.h:52
GroupLinkedMap
Definition: groupdef.h:123
addPageToGroups
void addPageToGroups(const Entry *root, PageDef *pd)
DefinitionMutable
Definition: definition.h:308
GroupDef::sortMemberLists
virtual void sortMemberLists()=0
FileList
Definition: filedef.h:205
GroupDef::definitionType
virtual DefType definitionType() const =0
GroupDef::getMemberGroups
virtual const MemberGroupList & getMemberGroups() const =0
GroupDef::removeMember
virtual void removeMember(MemberDef *md)=0
GroupDef::addGroup
virtual void addGroup(const GroupDef *def)=0
GroupDef::addFile
virtual void addFile(const FileDef *def)=0
toGroupDef
GroupDef * toGroupDef(Definition *d)
Definition: groupdef.cpp:1766
GroupDef::numDocMembers
virtual size_t numDocMembers() const =0
addDirToGroups
void addDirToGroups(const Entry *root, DirDef *dd)
Definition: groupdef.cpp:1376
TRUE
#define TRUE
Definition: qcstring.h:36
GroupDef::getNamespaces
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
addNamespaceToGroups
void addNamespaceToGroups(const Entry *root, NamespaceDef *nd)
Definition: groupdef.cpp:1357
GroupDef::anchor
virtual QCString anchor() const =0
Definition::DefType
DefType
Definition: definition.h:85
GroupDef::addExample
virtual void addExample(const PageDef *def)=0
dirdef.h
GroupList
Definition: groupdef.h:127
GroupDef::getMemberLists
virtual const MemberLists & getMemberLists() const =0
GroupDef::getPages
virtual const PageLinkedRefMap & getPages() const =0
GroupDef::isLinkable
virtual bool isLinkable() const =0
GroupDef::sortSubGroups
virtual void sortSubGroups()=0
Entry
Represents an unstructured piece of information, about an entity found in the sources.
Definition: entry.h:61
addMemberToGroups
void addMemberToGroups(const Entry *root, MemberDef *md)
Definition: groupdef.cpp:1420
GroupDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
layout.h
definition.h
MemberGroupList
Definition: membergroup.h:109
ConceptLinkedRefMap
Definition: conceptdef.h:67
GroupDef::writeMemberPages
virtual void writeMemberPages(OutputList &ol)=0
GroupDef::getExamples
virtual const PageLinkedRefMap & getExamples() const =0
GroupDef::computeAnchors
virtual void computeAnchors()=0
FileDef
A model of a file symbol.
Definition: filedef.h:73
LinkedMap
Container class representing a vector of objects with keys.
Definition: linkedmap.h:35
addGroupToGroups
void addGroupToGroups(const Entry *root, GroupDef *subGroup)
Definition: groupdef.cpp:1392
GroupDef::displayName
virtual QCString displayName(bool=TRUE) const =0
GroupDef::addMembersToMemberGroup
virtual void addMembersToMemberGroup()=0
GroupDef::writeQuickMemberLinks
virtual void writeQuickMemberLinks(OutputList &ol, const MemberDef *currentMd) const =0
FTVHelp
A class that generates a dynamic tree view side panel.
Definition: ftvhelp.h:36
GroupDef::findGroup
virtual bool findGroup(const GroupDef *def) const =0
GroupDef::hasGroupTitle
virtual bool hasGroupTitle() const =0
GroupDef::setGroupTitle
virtual void setGroupTitle(const QCString &newtitle)=0
MemberList
A list of MemberDef objects as shown in documentation sections.
Definition: memberlist.h:81
ClassLinkedRefMap
Definition: classlist.h:30
GroupDef::addPage
virtual void addPage(const PageDef *def)=0
GroupDef::setGroupScope
virtual void setGroupScope(Definition *d)=0
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108