summaryrefslogtreecommitdiffstats
path: root/trunk/src/groupdef.h
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2012-03-17 20:33:32 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2012-03-17 20:33:32 (GMT)
commit8f455b66da9db238655242d1213c05affac412d9 (patch)
treefbaf0bfe6a7de14413f6738b180d69d4aeb3a69b /trunk/src/groupdef.h
parentb9ef81152f75067cec55d4b37a4a25658f1f2a60 (diff)
downloadDoxygen-8f455b66da9db238655242d1213c05affac412d9.zip
Doxygen-8f455b66da9db238655242d1213c05affac412d9.tar.gz
Doxygen-8f455b66da9db238655242d1213c05affac412d9.tar.bz2
Release-1.8.0
Diffstat (limited to 'trunk/src/groupdef.h')
-rw-r--r--trunk/src/groupdef.h192
1 files changed, 192 insertions, 0 deletions
diff --git a/trunk/src/groupdef.h b/trunk/src/groupdef.h
new file mode 100644
index 0000000..5c83b81
--- /dev/null
+++ b/trunk/src/groupdef.h
@@ -0,0 +1,192 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2012 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef GROUPDEF_H
+#define GROUPDEF_H
+
+#include "qtbc.h"
+#include "sortdict.h"
+#include "definition.h"
+#include "memberlist.h"
+#include "memberdef.h"
+#include "htmlhelp.h"
+
+class FileList;
+class ClassSDict;
+class FileDef;
+class ClassDef;
+class NamespaceDef;
+class GroupList;
+class OutputList;
+class NamespaceSDict;
+class MemberGroupSDict;
+class MemberNameInfoSDict;
+class PageSDict;
+class PageDef;
+class DirDef;
+class DirList;
+class FTVHelp;
+class Entry;
+
+class GroupDef : public Definition
+{
+ public:
+ GroupDef(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0);
+ ~GroupDef();
+ DefType definitionType() const { return TypeGroup; }
+ QCString getOutputFileBase() const;
+ QCString anchor() const { return QCString(); }
+ QCString displayName() const { return hasGroupTitle() ? title : Definition::name(); }
+ const char *groupTitle() const { return title; }
+ void setGroupTitle( const char *newtitle );
+ bool hasGroupTitle( ) const { return titleSet; }
+ void addFile(const FileDef *def);
+ bool addClass(const ClassDef *def);
+ bool addNamespace(const NamespaceDef *def);
+ void addGroup(const GroupDef *def);
+ void addParentGroup(const GroupDef *def);
+ void addPage(PageDef *def);
+ void addExample(const PageDef *def);
+ void addDir(const DirDef *dd);
+ bool insertMember(MemberDef *def,bool docOnly=FALSE);
+ void removeMember(MemberDef *md);
+ bool containsGroup(const GroupDef *def); // true if def is already a subgroup
+ void writeDocumentation(OutputList &ol);
+ void writeMemberPages(OutputList &ol);
+ void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
+ int countMembers() const;
+ bool isLinkableInProject() const;
+ bool isLinkable() const;
+ bool isASubGroup() const;
+ void computeAnchors();
+
+ void addMembersToMemberGroup();
+ void distributeMemberGroupDocumentation();
+ void findSectionsInDocumentation();
+
+ void addListReferences();
+ void sortMemberLists();
+
+ bool visited; // number of times accessed for output - KPW
+
+ //friend void writeGroupTreeNode(OutputList&, GroupDef*, int, FTVHelp*);
+ // make accessible for writing tree view of group in index.cpp - KPW
+
+ void setGroupScope(Definition *d) { groupScope = d; }
+ Definition *getGroupScope() const { return groupScope; }
+
+ MemberList *getMemberList(MemberList::ListType lt) const;
+ const QList<MemberList> &getMemberLists() const { return m_memberLists; }
+
+ /* user defined member groups */
+ MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; }
+
+ FileList * getFiles() const { return fileList; }
+ ClassSDict * getClasses() const { return classSDict; }
+ NamespaceSDict * getNamespaces() const { return namespaceSDict; }
+ GroupList * getSubGroups() const { return groupList; }
+ PageSDict * getPages() const { return pageDict; }
+ DirList * getDirs() const { return dirList; }
+ PageSDict * getExamples() const { return exampleDict; }
+ //MemberList* getMembers() const { return allMemberList; }
+ void sortSubGroups();
+
+ protected:
+ void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
+
+ private:
+ MemberList *createMemberList(MemberList::ListType lt);
+ void addMemberToList(MemberList::ListType lt,MemberDef *md);
+ void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title);
+ void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title);
+ void removeMemberFromList(MemberList::ListType lt,MemberDef *md);
+ void writeGroupGraph(OutputList &ol);
+ void writeFiles(OutputList &ol,const QCString &title);
+ void writeNamespaces(OutputList &ol,const QCString &title);
+ void writeNestedGroups(OutputList &ol,const QCString &title);
+ void writeDirs(OutputList &ol,const QCString &title);
+ void writeClasses(OutputList &ol,const QCString &title);
+ void writeInlineClasses(OutputList &ol);
+ void writePageDocumentation(OutputList &ol);
+ void writeDetailedDescription(OutputList &ol,const QCString &title);
+ void writeBriefDescription(OutputList &ol);
+ void writeMemberGroups(OutputList &ol);
+ void startMemberDeclarations(OutputList &ol);
+ void endMemberDeclarations(OutputList &ol);
+ void startMemberDocumentation(OutputList &ol);
+ void endMemberDocumentation(OutputList &ol);
+ void writeAuthorSection(OutputList &ol);
+ void writeSummaryLinks(OutputList &ol);
+
+ QCString title; // title of the group
+ bool titleSet; // true if title is not the same as the name
+ QCString fileName; // base name of the generated file
+ FileList *fileList; // list of files in the group
+ ClassSDict *classSDict; // list of classes in the group
+ NamespaceSDict *namespaceSDict; // list of namespaces in the group
+ GroupList *groupList; // list of sub groups.
+ PageSDict *pageDict; // list of pages in the group
+ PageSDict *exampleDict; // list of examples in the group
+ DirList *dirList; // list of directories in the group
+
+ MemberList *allMemberList;
+ MemberNameInfoSDict *allMemberNameInfoSDict;
+
+ Definition *groupScope;
+
+ QList<MemberList> m_memberLists;
+ MemberGroupSDict *memberGroupSDict;
+
+};
+
+class GroupSDict : public SDict<GroupDef>
+{
+ public:
+ GroupSDict(uint size) : SDict<GroupDef>(size) {}
+ virtual ~GroupSDict() {}
+ int compareItems(GCI item1,GCI item2)
+ {
+ return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle());
+ }
+};
+
+class GroupList : public QList<GroupDef>
+{
+ public:
+ int compareItems(GCI item1,GCI item2)
+ {
+ return strcmp(((GroupDef*)item1)->groupTitle(),((GroupDef*)item2)->groupTitle());
+ }
+};
+
+class GroupListIterator : public QListIterator<GroupDef>
+{
+ public:
+ GroupListIterator(const GroupList &l) : QListIterator<GroupDef>(l) {}
+ virtual ~GroupListIterator() {}
+};
+
+void addClassToGroups(Entry *root,ClassDef *cd);
+void addNamespaceToGroups(Entry *root,NamespaceDef *nd);
+void addGroupToGroups(Entry *root,GroupDef *subGroup);
+void addMemberToGroups(Entry *root,MemberDef *md);
+void addPageToGroups(Entry *root,PageDef *pd);
+void addExampleToGroups(Entry *root,PageDef *eg);
+void addDirToGroups(Entry *root,DirDef *dd);
+
+#endif
+