diff options
Diffstat (limited to 'src/groupdef.h')
-rw-r--r-- | src/groupdef.h | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/src/groupdef.h b/src/groupdef.h index 0b682c2..624a680 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -24,8 +24,11 @@ #include "definition.h" #include "dirdef.h" #include "layout.h" +#include "membergroup.h" +#include "linkedmap.h" class MemberList; +class MemberLists; class FileList; class ClassLinkedRefMap; class NamespaceLinkedRefMap; @@ -35,8 +38,7 @@ class NamespaceDef; class GroupList; class OutputList; class NamespaceSDict; -class MemberGroupSDict; -class PageSDict; +class PageLinkedRefMap; class PageDef; class DirDef; class FTVHelp; @@ -61,7 +63,7 @@ class GroupDef : public DefinitionMutable, public Definition virtual bool addClass(const ClassDef *def) = 0; virtual bool addNamespace(const NamespaceDef *def) = 0; virtual void addGroup(const GroupDef *def) = 0; - virtual void addPage(PageDef *def) = 0; + virtual void addPage(const PageDef *def) = 0; virtual void addExample(const PageDef *def) = 0; virtual void addDir(DirDef *dd) = 0; virtual bool insertMember(MemberDef *def,bool docOnly=FALSE) = 0; @@ -90,18 +92,18 @@ class GroupDef : public DefinitionMutable, public Definition virtual Definition *getGroupScope() const = 0; virtual MemberList *getMemberList(MemberListType lt) const = 0; - virtual const QList<MemberList> &getMemberLists() const = 0; + virtual const MemberLists &getMemberLists() const = 0; /* user defined member groups */ - virtual MemberGroupSDict *getMemberGroupSDict() const = 0; + virtual const MemberGroupList &getMemberGroups() const = 0; virtual FileList * getFiles() const = 0; - virtual ClassLinkedRefMap getClasses() const = 0; - virtual NamespaceLinkedRefMap getNamespaces() const = 0; - virtual GroupList * getSubGroups() const = 0; - virtual PageSDict * getPages() const = 0; + virtual const ClassLinkedRefMap &getClasses() const = 0; + virtual const NamespaceLinkedRefMap &getNamespaces() const = 0; + virtual const GroupList &getSubGroups() const = 0; + virtual const PageLinkedRefMap &getPages() const = 0; virtual const DirList & getDirs() const = 0; - virtual PageSDict * getExamples() const = 0; + virtual const PageLinkedRefMap &getExamples() const = 0; virtual bool hasDetailedDescription() const = 0; virtual void sortSubGroups() = 0; @@ -117,36 +119,12 @@ const GroupDef *toGroupDef(const Definition *d); // ------------------ - -/** A sorted dictionary of GroupDef objects. */ -class GroupSDict : public SDict<GroupDef> +class GroupLinkedMap : public LinkedMap<GroupDef> { - public: - GroupSDict(uint size) : SDict<GroupDef>(size) {} - virtual ~GroupSDict() {} - private: - int compareValues(const GroupDef *item1,const GroupDef *item2) const - { - return qstrcmp(item1->groupTitle(),item2->groupTitle()); - } }; -/** A list of GroupDef objects. */ -class GroupList : public QList<GroupDef> +class GroupList : public std::vector<const GroupDef *> { - public: - int compareValues(const GroupDef *item1,const GroupDef *item2) const - { - return qstrcmp(item1->groupTitle(),item2->groupTitle()); - } -}; - -/** An iterator for GroupDef objects in a GroupList. */ -class GroupListIterator : public QListIterator<GroupDef> -{ - public: - GroupListIterator(const GroupList &l) : QListIterator<GroupDef>(l) {} - virtual ~GroupListIterator() {} }; void addClassToGroups (const Entry *root,ClassDef *cd); |