diff options
Diffstat (limited to 'src/groupdef.h')
-rw-r--r-- | src/groupdef.h | 166 |
1 files changed, 57 insertions, 109 deletions
diff --git a/src/groupdef.h b/src/groupdef.h index be4475f..2649de7 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -42,122 +42,70 @@ class MemberDef; class FTextStream; /** A model of a group of symbols. */ -class GroupDef : public Definition +class GroupDef : virtual 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(bool=TRUE) 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 findGroup(const GroupDef *def) const; // true if def is a subgroup of this group - void writeDocumentation(OutputList &ol); - void writeMemberPages(OutputList &ol); - void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const; - void writeTagFile(FTextStream &); - 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 subGrouping() const { return m_subGrouping; } - - 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(MemberListType lt) const; - const QList<MemberList> &getMemberLists() const { return m_memberLists; } + ~GroupDef() {} + + virtual DefType definitionType() const = 0; + virtual QCString getOutputFileBase() const = 0; + virtual QCString anchor() const = 0; + virtual QCString displayName(bool=TRUE) const = 0; + virtual const char *groupTitle() const = 0; + virtual void setGroupTitle( const char *newtitle ) = 0; + virtual bool hasGroupTitle( ) const = 0; + virtual void addFile(const FileDef *def) = 0; + 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 addExample(const PageDef *def) = 0; + virtual void addDir(const DirDef *dd) = 0; + virtual bool insertMember(MemberDef *def,bool docOnly=FALSE) = 0; + virtual void removeMember(MemberDef *md) = 0; + virtual bool findGroup(const GroupDef *def) const = 0; + virtual void writeDocumentation(OutputList &ol) = 0; + virtual void writeMemberPages(OutputList &ol) = 0; + virtual void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const = 0; + virtual void writeTagFile(FTextStream &) = 0; + virtual int countMembers() const = 0; + virtual bool isLinkableInProject() const = 0; + virtual bool isLinkable() const = 0; + virtual bool isASubGroup() const = 0; + virtual void computeAnchors() = 0; + + virtual void addMembersToMemberGroup() = 0; + virtual void distributeMemberGroupDocumentation() = 0; + virtual void findSectionsInDocumentation() = 0; + + virtual void addListReferences() = 0; + virtual void sortMemberLists() = 0; + virtual bool subGrouping() const = 0; + + virtual void setGroupScope(Definition *d) = 0; + virtual Definition *getGroupScope() const = 0; + + virtual MemberList *getMemberList(MemberListType lt) const = 0; + virtual const QList<MemberList> &getMemberLists() const = 0; /* 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; } - bool hasDetailedDescription() const; - //MemberList* getMembers() const { return allMemberList; } - void sortSubGroups(); - - protected: - void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); - - private: - MemberList *createMemberList(MemberListType lt); - void addMemberToList(MemberListType lt,MemberDef *md); - void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title); - void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title); - void removeMemberFromList(MemberListType 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); - void updateLanguage(const Definition *); - - 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; - bool m_subGrouping; + virtual MemberGroupSDict *getMemberGroupSDict() const = 0; + + virtual FileList * getFiles() const = 0; + virtual ClassSDict * getClasses() const = 0; + virtual NamespaceSDict * getNamespaces() const = 0; + virtual GroupList * getSubGroups() const = 0; + virtual PageSDict * getPages() const = 0; + virtual DirList * getDirs() const = 0; + virtual PageSDict * getExamples() const = 0; + virtual bool hasDetailedDescription() const = 0; + virtual void sortSubGroups() = 0; }; +GroupDef *createGroupDef(const char *fileName,int line,const char *name, + const char *title,const char *refFileName=0); + /** A sorted dictionary of GroupDef objects. */ class GroupSDict : public SDict<GroupDef> { |