Root/
Source at commit 1322 created 12 years 8 months ago. By meklort, Add doxygen to utils folder | |
---|---|
1 | /******************************************************************************␊ |
2 | *␊ |
3 | * $Id: groupdef.h,v 1.18 2001/03/19 19:27:40 root Exp $␊ |
4 | *␊ |
5 | * Copyright (C) 1997-2011 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 "qtbc.h"␊ |
22 | #include "sortdict.h"␊ |
23 | #include "definition.h"␊ |
24 | #include "memberlist.h"␊ |
25 | #include "memberdef.h"␊ |
26 | #include "htmlhelp.h"␊ |
27 | ␊ |
28 | class FileList;␊ |
29 | class ClassSDict;␊ |
30 | class FileDef;␊ |
31 | class ClassDef;␊ |
32 | class NamespaceDef;␊ |
33 | class GroupList;␊ |
34 | class OutputList;␊ |
35 | class NamespaceSDict;␊ |
36 | class MemberGroupSDict;␊ |
37 | class MemberNameInfoSDict;␊ |
38 | class PageSDict;␊ |
39 | class PageDef;␊ |
40 | class DirDef;␊ |
41 | class DirList;␊ |
42 | class FTVHelp;␊ |
43 | ␊ |
44 | class GroupDef : public Definition␊ |
45 | {␊ |
46 | public:␊ |
47 | GroupDef(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0);␊ |
48 | ~GroupDef();␊ |
49 | DefType definitionType() const { return TypeGroup; }␊ |
50 | QCString getOutputFileBase() const;␊ |
51 | const char *groupTitle() const { return title; }␊ |
52 | void setGroupTitle( const char *newtitle );␊ |
53 | bool hasGroupTitle( ) { return titleSet; }␊ |
54 | void addFile(const FileDef *def); ␊ |
55 | bool addClass(const ClassDef *def);␊ |
56 | bool addNamespace(const NamespaceDef *def);␊ |
57 | void addGroup(const GroupDef *def);␊ |
58 | void addParentGroup(const GroupDef *def);␊ |
59 | void addPage(PageDef *def);␊ |
60 | void addExample(const PageDef *def);␊ |
61 | void addDir(const DirDef *dd);␊ |
62 | bool insertMember(MemberDef *def,bool docOnly=FALSE);␊ |
63 | void removeMember(MemberDef *md);␊ |
64 | bool containsGroup(const GroupDef *def); // true if def is already a subgroup␊ |
65 | void writeDocumentation(OutputList &ol);␊ |
66 | void writeMemberPages(OutputList &ol);␊ |
67 | void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;␊ |
68 | int countMembers() const;␊ |
69 | bool isLinkableInProject() const␊ |
70 | {␊ |
71 | return !isReference();␊ |
72 | }␊ |
73 | bool isLinkable() const␊ |
74 | {␊ |
75 | return TRUE;␊ |
76 | }␊ |
77 | bool isASubGroup() const;␊ |
78 | void computeAnchors();␊ |
79 | ␊ |
80 | void addMembersToMemberGroup();␊ |
81 | void distributeMemberGroupDocumentation();␊ |
82 | void findSectionsInDocumentation();␊ |
83 | ␊ |
84 | void addListReferences();␊ |
85 | void sortMemberLists();␊ |
86 | ␊ |
87 | bool visited; // number of times accessed for output - KPW␊ |
88 | ␊ |
89 | friend void writeGroupTreeNode(OutputList&, GroupDef*, int, FTVHelp*); ␊ |
90 | // make accessible for writing tree view of group in index.cpp - KPW␊ |
91 | ␊ |
92 | void setGroupScope(Definition *d) { groupScope = d; }␊ |
93 | Definition *getGroupScope() const { return groupScope; }␊ |
94 | ␊ |
95 | MemberList *getMemberList(MemberList::ListType lt) const;␊ |
96 | const QList<MemberList> &getMemberLists() const { return m_memberLists; }␊ |
97 | ␊ |
98 | /* user defined member groups */␊ |
99 | MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; }␊ |
100 | ␊ |
101 | FileList * getFiles() const { return fileList; }␊ |
102 | ClassSDict * getClasses() const { return classSDict; }␊ |
103 | NamespaceSDict * getNamespaces() const { return namespaceSDict; }␊ |
104 | GroupList * getSubGroups() const { return groupList; }␊ |
105 | PageSDict * getPages() const { return pageDict; }␊ |
106 | DirList * getDirs() const { return dirList; }␊ |
107 | //MemberList* getMembers() const { return allMemberList; }␊ |
108 | ␊ |
109 | protected:␊ |
110 | void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);␊ |
111 | ␊ |
112 | private: ␊ |
113 | MemberList *createMemberList(MemberList::ListType lt);␊ |
114 | void addMemberToList(MemberList::ListType lt,MemberDef *md);␊ |
115 | void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title);␊ |
116 | void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title);␊ |
117 | void removeMemberFromList(MemberList::ListType lt,MemberDef *md);␊ |
118 | void writeGroupGraph(OutputList &ol);␊ |
119 | void writeFiles(OutputList &ol,const QCString &title);␊ |
120 | void writeNamespaces(OutputList &ol,const QCString &title);␊ |
121 | void writeNestedGroups(OutputList &ol,const QCString &title);␊ |
122 | void writeDirs(OutputList &ol,const QCString &title);␊ |
123 | void writeClasses(OutputList &ol,const QCString &title);␊ |
124 | void writeInlineClasses(OutputList &ol);␊ |
125 | void writePageDocumentation(OutputList &ol);␊ |
126 | void writeDetailedDescription(OutputList &ol,const QCString &title);␊ |
127 | void writeBriefDescription(OutputList &ol);␊ |
128 | void writeMemberGroups(OutputList &ol);␊ |
129 | void startMemberDeclarations(OutputList &ol);␊ |
130 | void endMemberDeclarations(OutputList &ol);␊ |
131 | void startMemberDocumentation(OutputList &ol);␊ |
132 | void endMemberDocumentation(OutputList &ol);␊ |
133 | void writeAuthorSection(OutputList &ol);␊ |
134 | void writeSummaryLinks(OutputList &ol);␊ |
135 | ␊ |
136 | QCString title; // title of the group␊ |
137 | bool titleSet; // true if title is not the same as the name␊ |
138 | QCString fileName; // base name of the generated file␊ |
139 | FileList *fileList; // list of files in the group␊ |
140 | ClassSDict *classSDict; // list of classes in the group␊ |
141 | NamespaceSDict *namespaceSDict; // list of namespaces in the group␊ |
142 | GroupList *groupList; // list of sub groups.␊ |
143 | PageSDict *pageDict; // list of pages in the group␊ |
144 | PageSDict *exampleDict; // list of examples in the group␊ |
145 | DirList *dirList; // list of directories in the group␊ |
146 | ␊ |
147 | MemberList *allMemberList;␊ |
148 | MemberNameInfoSDict *allMemberNameInfoSDict;␊ |
149 | ␊ |
150 | Definition *groupScope;␊ |
151 | ␊ |
152 | QList<MemberList> m_memberLists;␊ |
153 | MemberGroupSDict *memberGroupSDict;␊ |
154 | ␊ |
155 | };␊ |
156 | ␊ |
157 | class GroupSDict : public SDict<GroupDef>␊ |
158 | {␊ |
159 | public:␊ |
160 | GroupSDict(uint size) : SDict<GroupDef>(size) {}␊ |
161 | virtual ~GroupSDict() {}␊ |
162 | int compareItems(GCI item1,GCI item2)␊ |
163 | {␊ |
164 | return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle());␊ |
165 | }␊ |
166 | };␊ |
167 | ␊ |
168 | class GroupList : public QList<GroupDef>␊ |
169 | {␊ |
170 | public:␊ |
171 | int compareItems(GCI item1,GCI item2)␊ |
172 | {␊ |
173 | return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle());␊ |
174 | }␊ |
175 | };␊ |
176 | ␊ |
177 | class GroupListIterator : public QListIterator<GroupDef>␊ |
178 | {␊ |
179 | public:␊ |
180 | GroupListIterator(const GroupList &l) : QListIterator<GroupDef>(l) {}␊ |
181 | virtual ~GroupListIterator() {}␊ |
182 | };␊ |
183 | ␊ |
184 | void addClassToGroups(Entry *root,ClassDef *cd);␊ |
185 | void addNamespaceToGroups(Entry *root,NamespaceDef *nd);␊ |
186 | void addGroupToGroups(Entry *root,GroupDef *subGroup);␊ |
187 | void addMemberToGroups(Entry *root,MemberDef *md);␊ |
188 | void addPageToGroups(Entry *root,PageDef *pd);␊ |
189 | void addExampleToGroups(Entry *root,PageDef *eg);␊ |
190 | void addDirToGroups(Entry *root,DirDef *dd);␊ |
191 | ␊ |
192 | #endif␊ |
193 | ␊ |
194 |