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  virtual DefType definitionType() const = 0;
53  virtual QCString getOutputFileBase() const = 0;
54  virtual QCString anchor() const = 0;
55  virtual QCString displayName(bool=TRUE) const = 0;
56  virtual QCString groupTitle() const = 0;
57  virtual void setGroupTitle( const QCString &newtitle ) = 0;
58  virtual bool hasGroupTitle( ) const = 0;
59  virtual void addFile(const FileDef *def) = 0;
60  virtual bool addClass(const ClassDef *def) = 0;
61  virtual bool addConcept(const ConceptDef *def) = 0;
62  virtual bool addNamespace(const NamespaceDef *def) = 0;
63  virtual void addGroup(const GroupDef *def) = 0;
64  virtual void addPage(const PageDef *def) = 0;
65  virtual void addExample(const PageDef *def) = 0;
66  virtual void addDir(DirDef *dd) = 0;
67  virtual bool insertMember(const MemberDef *def,bool docOnly=FALSE) = 0;
68  virtual void removeMember(MemberDef *md) = 0;
69  virtual bool findGroup(const GroupDef *def) const = 0;
70  virtual void writeDocumentation(OutputList &ol) = 0;
71  virtual void writeMemberPages(OutputList &ol) = 0;
72  virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const = 0;
73  virtual void writeTagFile(TextStream &) = 0;
74  virtual size_t numDocMembers() const = 0;
75  virtual bool isLinkableInProject() const = 0;
76  virtual bool isLinkable() const = 0;
77  virtual bool isASubGroup() const = 0;
78  virtual void computeAnchors() = 0;
79  virtual void countMembers() = 0;
80 
81  virtual void addMembersToMemberGroup() = 0;
82  virtual void distributeMemberGroupDocumentation() = 0;
83  virtual void findSectionsInDocumentation() = 0;
84 
85  virtual void addListReferences() = 0;
86  virtual void sortMemberLists() = 0;
87  virtual bool subGrouping() const = 0;
88 
89  virtual void setGroupScope(Definition *d) = 0;
90  virtual Definition *getGroupScope() const = 0;
91 
92  virtual MemberList *getMemberList(MemberListType lt) const = 0;
93  virtual const MemberLists &getMemberLists() const = 0;
94 
95  /* user defined member groups */
96  virtual const MemberGroupList &getMemberGroups() const = 0;
97 
98  virtual const FileList &getFiles() const = 0;
99  virtual const ClassLinkedRefMap &getClasses() const = 0;
100  virtual const ConceptLinkedRefMap &getConcepts() const = 0;
101  virtual const NamespaceLinkedRefMap &getNamespaces() const = 0;
102  virtual const GroupList &getSubGroups() const = 0;
103  virtual const PageLinkedRefMap &getPages() const = 0;
104  virtual const DirList & getDirs() const = 0;
105  virtual const PageLinkedRefMap &getExamples() const = 0;
106  virtual bool hasDetailedDescription() const = 0;
107  virtual void sortSubGroups() = 0;
108 
109 };
110 
111 GroupDef *createGroupDef(const QCString &fileName,int line,const QCString &name,
112  const QCString &title,const QCString &refFileName=QCString());
113 
114 // --- Cast functions
115 
116 GroupDef *toGroupDef(Definition *d);
117 const GroupDef *toGroupDef(const Definition *d);
118 
119 // ------------------
120 
121 class GroupLinkedMap : public LinkedMap<GroupDef>
122 {
123 };
124 
125 class GroupList : public std::vector<const GroupDef *>
126 {
127 };
128 
129 void addClassToGroups (const Entry *root,ClassDef *cd);
130 void addConceptToGroups (const Entry *root,ConceptDef *cd);
131 void addNamespaceToGroups(const Entry *root,NamespaceDef *nd);
132 void addGroupToGroups (const Entry *root,GroupDef *subGroup);
133 void addMemberToGroups (const Entry *root,MemberDef *md);
134 void addPageToGroups (const Entry *root,PageDef *pd);
135 void addExampleToGroups (const Entry *root,PageDef *eg);
136 void addDirToGroups (const Entry *root,DirDef *dd);
137 
138 #endif
139 
Definition: groupdef.h:121
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:34
A model of a file symbol.
Definition: filedef.h:72
Definition: conceptdef.h:69
Definition: namespacedef.h:45
Definition: membergroup.h:108
Definition: memberlist.h:138
virtual bool isLinkable() const =0
A list of directories.
Definition: dirdef.h:179
virtual DefType definitionType() const =0
Definition: definition.h:303
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:202
A class that generates a dynamic tree view side panel.
Definition: ftvhelp.h:38
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:125
virtual bool isLinkableInProject() const =0
DefType
Definition: definition.h:80
virtual QCString displayName(bool=TRUE) const =0
Definition: pagedef.h:76
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