Doxygen
Loading...
Searching...
No Matches
groupdef.h
Go to the documentation of this file.
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
29class MemberList;
30class MemberLists;
31class FileList;
36class FileDef;
37class ClassDef;
38class ConceptDef;
39class NamespaceDef;
40class GroupList;
41class OutputList;
43class PageDef;
44class DirDef;
45class FTVHelp;
46class Entry;
47class MemberDef;
48class ModuleDef;
49
50/** A model of a group of symbols. */
52{
53 public:
54 ABSTRACT_BASE_CLASS(GroupDef)
55
56 virtual QCString groupTitle() const = 0;
57 virtual void setGroupTitle( const QCString &newtitle ) = 0;
58 virtual bool hasGroupTitle( ) const = 0;
59 virtual void addFile(FileDef *def) = 0;
60 virtual bool containsFile(const FileDef *def) const = 0;
61 virtual bool addClass(ClassDef *def) = 0;
62 virtual bool addConcept(ConceptDef *def) = 0;
63 virtual bool addModule(ModuleDef *def) = 0;
64 virtual bool addNamespace(NamespaceDef *def) = 0;
65 virtual void addGroup(GroupDef *def) = 0;
66 virtual void addPage(PageDef *def) = 0;
67 virtual void addExample(PageDef *def) = 0;
68 virtual void addDir(DirDef *dd) = 0;
69 virtual bool insertMember(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, int hierarchyLevel) = 0;
74 virtual void writeTagFile(TextStream &) = 0;
75 virtual size_t numDocMembers() const = 0;
76 virtual bool isVisibleInHierarchy() const = 0;
77 virtual bool isASubGroup() const = 0;
78 virtual void computeAnchors() = 0;
79 virtual void countMembers() = 0;
80
81 virtual void addMembersToMemberGroup() = 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 ModuleLinkedRefMap &getModules() const = 0;
102 virtual const NamespaceLinkedRefMap &getNamespaces() const = 0;
103 virtual const GroupList &getSubGroups() const = 0;
104 virtual const PageLinkedRefMap &getPages() const = 0;
105 virtual const DirList & getDirs() const = 0;
106 virtual const PageLinkedRefMap &getExamples() const = 0;
107 virtual bool hasDetailedDescription() const = 0;
108 virtual void sortSubGroups() = 0;
109
110 // group graph related members
111 virtual bool hasGroupGraph() const = 0;
112 virtual void overrideGroupGraph(bool e) = 0;
113};
114
115std::unique_ptr<GroupDef> createGroupDef(const QCString &fileName,int line,const QCString &name,
116 const QCString &title,const QCString &refFileName=QCString());
117
118// --- Cast functions
119
120GroupDef *toGroupDef(Definition *d);
121const GroupDef *toGroupDef(const Definition *d);
122
123// ------------------
124
125class GroupLinkedMap : public LinkedMap<GroupDef>
126{
127};
128
129class GroupList : public std::vector<GroupDef *>
130{
131};
132
133void addClassToGroups (const Entry *root,ClassDef *cd);
134void addConceptToGroups (const Entry *root,ConceptDef *cd);
135void addModuleToGroups (const Entry *root,ModuleDef *mod);
136void addNamespaceToGroups(const Entry *root,NamespaceDef *nd);
137void addGroupToGroups (const Entry *root,GroupDef *subGroup);
138void addMemberToGroups (const Entry *root,MemberDef *md);
139void addPageToGroups (const Entry *root,PageDef *pd);
140void addExampleToGroups (const Entry *root,PageDef *eg);
141void addDirToGroups (const Entry *root,DirDef *dd);
142
143#endif
144
A abstract class representing of a compound symbol.
Definition classdef.h:104
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual const QCString & name() const =0
A model of a directory symbol.
Definition dirdef.h:110
Represents an unstructured piece of information, about an entity found in the sources.
Definition entry.h:116
A class that generates a dynamic tree view side panel.
Definition ftvhelp.h:41
A model of a file symbol.
Definition filedef.h:99
A model of a group of symbols.
Definition groupdef.h:52
virtual size_t numDocMembers() const =0
virtual void writeTagFile(TextStream &)=0
virtual void countMembers()=0
virtual bool hasDetailedDescription() const =0
virtual void addDir(DirDef *dd)=0
virtual void writeMemberPages(OutputList &ol, int hierarchyLevel)=0
virtual void addExample(PageDef *def)=0
virtual const DirList & getDirs() const =0
virtual const GroupList & getSubGroups() const =0
virtual bool hasGroupGraph() const =0
virtual QCString groupTitle() const =0
virtual const FileList & getFiles() const =0
virtual const MemberLists & getMemberLists() const =0
virtual void overrideGroupGraph(bool e)=0
virtual bool addClass(ClassDef *def)=0
virtual void sortSubGroups()=0
virtual bool addModule(ModuleDef *def)=0
virtual const PageLinkedRefMap & getExamples() const =0
virtual void addPage(PageDef *def)=0
virtual void removeMember(MemberDef *md)=0
virtual void findSectionsInDocumentation()=0
virtual void computeAnchors()=0
virtual bool containsFile(const FileDef *def) const =0
virtual bool addNamespace(NamespaceDef *def)=0
virtual void setGroupScope(Definition *d)=0
virtual void writeDocumentation(OutputList &ol)=0
virtual void distributeMemberGroupDocumentation()=0
virtual void addListReferences()=0
virtual void sortMemberLists()=0
virtual const MemberGroupList & getMemberGroups() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const PageLinkedRefMap & getPages() const =0
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
virtual bool subGrouping() const =0
virtual bool isASubGroup() const =0
virtual void addGroup(GroupDef *def)=0
virtual bool insertMember(MemberDef *def, bool docOnly=FALSE)=0
virtual bool findGroup(const GroupDef *def) const =0
virtual void addFile(FileDef *def)=0
virtual Definition * getGroupScope() const =0
virtual bool isVisibleInHierarchy() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
virtual bool addConcept(ConceptDef *def)=0
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual void setGroupTitle(const QCString &newtitle)=0
virtual void addMembersToMemberGroup()=0
virtual bool hasGroupTitle() const =0
virtual const ModuleLinkedRefMap & getModules() const =0
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:108
An abstract interface of a namespace symbol.
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:314
A model of a page symbol.
Definition pagedef.h:26
#define ABSTRACT_BASE_CLASS(cls)
Macro to implement rule of 5 for an abstract base class.
Definition construct.h:20
void addNamespaceToGroups(const Entry *root, NamespaceDef *nd)
void addGroupToGroups(const Entry *root, GroupDef *subGroup)
void addClassToGroups(const Entry *root, ClassDef *cd)
void addDirToGroups(const Entry *root, DirDef *dd)
void addModuleToGroups(const Entry *root, ModuleDef *mod)
GroupDef * toGroupDef(Definition *d)
void addConceptToGroups(const Entry *root, ConceptDef *cd)
void addPageToGroups(const Entry *root, PageDef *pd)
std::unique_ptr< GroupDef > createGroupDef(const QCString &fileName, int line, const QCString &name, const QCString &title, const QCString &refFileName=QCString())
Definition groupdef.cpp:174
void addExampleToGroups(const Entry *root, PageDef *eg)
void addMemberToGroups(const Entry *root, MemberDef *md)
#define FALSE
Definition qcstring.h:34