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 
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 
118 GroupDef *toGroupDef(Definition *d);
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 
Definition: groupdef.h:123
virtual QCString getOutputFileBase() const =0
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
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
Represents an unstructured piece of information, about an entity found in the sources.
Definition: entry.h:61
virtual QCString anchor() const =0
virtual QCString name() const =0
Text streaming class that buffers data.
Definition: textstream.h:33
A model of a file symbol.
Definition: filedef.h:73
Definition: conceptdef.h:67
Definition: namespacedef.h:45
Definition: membergroup.h:109
Definition: memberlist.h:138
virtual bool isLinkable() const =0
A list of directories.
Definition: dirdef.h:181
virtual DefType definitionType() const =0
Definition: definition.h:308
Definition: conceptdef.h:22
A model of a directory symbol.
Definition: dirdef.h:110
A list of MemberDef objects as shown in documentation sections.
Definition: memberlist.h:81
Container class representing a vector of objects with keys.
Definition: linkedmap.h:35
Definition: filedef.h:205
A class that generates a dynamic tree view side panel.
Definition: ftvhelp.h:36
A model of a page symbol.
Definition: pagedef.h:25
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
Definition: groupdef.h:127
virtual bool isLinkableInProject() const =0
DefType
Definition: definition.h:85
virtual QCString displayName(bool=TRUE) const =0
Definition: pagedef.h:78
This is an alternative implementation of QCString.
Definition: qcstring.h:108
A model of a group of symbols.
Definition: groupdef.h:49
Definition: classlist.h:30
A abstract class representing of a compound symbol.
Definition: classdef.h:103