|
Packit |
1c1d7e |
/******************************************************************************
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Copyright (C) 1997-2015 by Dimitri van Heesch.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Permission to use, copy, modify, and distribute this software and its
|
|
Packit |
1c1d7e |
* documentation under the terms of the GNU General Public License is hereby
|
|
Packit |
1c1d7e |
* granted. No representations are made about the suitability of this software
|
|
Packit |
1c1d7e |
* for any purpose. It is provided "as is" without express or implied warranty.
|
|
Packit |
1c1d7e |
* See the GNU General Public License for more details.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Documents produced by Doxygen are derivative works derived from the
|
|
Packit |
1c1d7e |
* input used in their production; they are not affected by this license.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#ifndef GROUPDEF_H
|
|
Packit |
1c1d7e |
#define GROUPDEF_H
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include "sortdict.h"
|
|
Packit |
1c1d7e |
#include "definition.h"
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
class MemberList;
|
|
Packit |
1c1d7e |
class FileList;
|
|
Packit |
1c1d7e |
class ClassSDict;
|
|
Packit |
1c1d7e |
class FileDef;
|
|
Packit |
1c1d7e |
class ClassDef;
|
|
Packit |
1c1d7e |
class NamespaceDef;
|
|
Packit |
1c1d7e |
class GroupList;
|
|
Packit |
1c1d7e |
class OutputList;
|
|
Packit |
1c1d7e |
class NamespaceSDict;
|
|
Packit |
1c1d7e |
class MemberGroupSDict;
|
|
Packit |
1c1d7e |
class MemberNameInfoSDict;
|
|
Packit |
1c1d7e |
class PageSDict;
|
|
Packit |
1c1d7e |
class PageDef;
|
|
Packit |
1c1d7e |
class DirDef;
|
|
Packit |
1c1d7e |
class DirList;
|
|
Packit |
1c1d7e |
class FTVHelp;
|
|
Packit |
1c1d7e |
class Entry;
|
|
Packit |
1c1d7e |
class MemberDef;
|
|
Packit |
1c1d7e |
class FTextStream;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** A model of a group of symbols. */
|
|
Packit |
1c1d7e |
class GroupDef : public Definition
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
GroupDef(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0);
|
|
Packit |
1c1d7e |
~GroupDef();
|
|
Packit |
1c1d7e |
DefType definitionType() const { return TypeGroup; }
|
|
Packit |
1c1d7e |
QCString getOutputFileBase() const;
|
|
Packit |
1c1d7e |
QCString anchor() const { return QCString(); }
|
|
Packit |
1c1d7e |
QCString displayName(bool=TRUE) const { return hasGroupTitle() ? title : Definition::name(); }
|
|
Packit |
1c1d7e |
const char *groupTitle() const { return title; }
|
|
Packit |
1c1d7e |
void setGroupTitle( const char *newtitle );
|
|
Packit |
1c1d7e |
bool hasGroupTitle( ) const { return titleSet; }
|
|
Packit |
1c1d7e |
void addFile(const FileDef *def);
|
|
Packit |
1c1d7e |
bool addClass(const ClassDef *def);
|
|
Packit |
1c1d7e |
bool addNamespace(const NamespaceDef *def);
|
|
Packit |
1c1d7e |
void addGroup(const GroupDef *def);
|
|
Packit |
1c1d7e |
void addParentGroup(const GroupDef *def);
|
|
Packit |
1c1d7e |
void addPage(PageDef *def);
|
|
Packit |
1c1d7e |
void addExample(const PageDef *def);
|
|
Packit |
1c1d7e |
void addDir(const DirDef *dd);
|
|
Packit |
1c1d7e |
bool insertMember(MemberDef *def,bool docOnly=FALSE);
|
|
Packit |
1c1d7e |
void removeMember(MemberDef *md);
|
|
Packit |
1c1d7e |
bool findGroup(const GroupDef *def) const; // true if def is a subgroup of this group
|
|
Packit |
1c1d7e |
void writeDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeMemberPages(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
|
|
Packit |
1c1d7e |
void writeTagFile(FTextStream &);
|
|
Packit |
1c1d7e |
int countMembers() const;
|
|
Packit |
1c1d7e |
bool isLinkableInProject() const;
|
|
Packit |
1c1d7e |
bool isLinkable() const;
|
|
Packit |
1c1d7e |
bool isASubGroup() const;
|
|
Packit |
1c1d7e |
void computeAnchors();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void addMembersToMemberGroup();
|
|
Packit |
1c1d7e |
void distributeMemberGroupDocumentation();
|
|
Packit |
1c1d7e |
void findSectionsInDocumentation();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void addListReferences();
|
|
Packit |
1c1d7e |
void sortMemberLists();
|
|
Packit |
1c1d7e |
bool subGrouping() const { return m_subGrouping; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool visited; // number of times accessed for output - KPW
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//friend void writeGroupTreeNode(OutputList&, GroupDef*, int, FTVHelp*);
|
|
Packit |
1c1d7e |
// make accessible for writing tree view of group in index.cpp - KPW
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void setGroupScope(Definition *d) { groupScope = d; }
|
|
Packit |
1c1d7e |
Definition *getGroupScope() const { return groupScope; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
MemberList *getMemberList(MemberListType lt) const;
|
|
Packit |
1c1d7e |
const QList<MemberList> &getMemberLists() const { return m_memberLists; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/* user defined member groups */
|
|
Packit |
1c1d7e |
MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
FileList * getFiles() const { return fileList; }
|
|
Packit |
1c1d7e |
ClassSDict * getClasses() const { return classSDict; }
|
|
Packit |
1c1d7e |
NamespaceSDict * getNamespaces() const { return namespaceSDict; }
|
|
Packit |
1c1d7e |
GroupList * getSubGroups() const { return groupList; }
|
|
Packit |
1c1d7e |
PageSDict * getPages() const { return pageDict; }
|
|
Packit |
1c1d7e |
DirList * getDirs() const { return dirList; }
|
|
Packit |
1c1d7e |
PageSDict * getExamples() const { return exampleDict; }
|
|
Packit |
1c1d7e |
bool hasDetailedDescription() const;
|
|
Packit |
1c1d7e |
//MemberList* getMembers() const { return allMemberList; }
|
|
Packit |
1c1d7e |
void sortSubGroups();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
protected:
|
|
Packit |
1c1d7e |
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
MemberList *createMemberList(MemberListType lt);
|
|
Packit |
1c1d7e |
void addMemberToList(MemberListType lt,MemberDef *md);
|
|
Packit |
1c1d7e |
void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title);
|
|
Packit |
1c1d7e |
void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title);
|
|
Packit |
1c1d7e |
void removeMemberFromList(MemberListType lt,MemberDef *md);
|
|
Packit |
1c1d7e |
void writeGroupGraph(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeFiles(OutputList &ol,const QCString &title);
|
|
Packit |
1c1d7e |
void writeNamespaces(OutputList &ol,const QCString &title);
|
|
Packit |
1c1d7e |
void writeNestedGroups(OutputList &ol,const QCString &title);
|
|
Packit |
1c1d7e |
void writeDirs(OutputList &ol,const QCString &title);
|
|
Packit |
1c1d7e |
void writeClasses(OutputList &ol,const QCString &title);
|
|
Packit |
1c1d7e |
void writeInlineClasses(OutputList &ol);
|
|
Packit |
1c1d7e |
void writePageDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeDetailedDescription(OutputList &ol,const QCString &title);
|
|
Packit |
1c1d7e |
void writeBriefDescription(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeMemberGroups(OutputList &ol);
|
|
Packit |
1c1d7e |
void startMemberDeclarations(OutputList &ol);
|
|
Packit |
1c1d7e |
void endMemberDeclarations(OutputList &ol);
|
|
Packit |
1c1d7e |
void startMemberDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void endMemberDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeAuthorSection(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeSummaryLinks(OutputList &ol);
|
|
Packit |
1c1d7e |
void updateLanguage(const Definition *);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
QCString title; // title of the group
|
|
Packit |
1c1d7e |
bool titleSet; // true if title is not the same as the name
|
|
Packit |
1c1d7e |
QCString fileName; // base name of the generated file
|
|
Packit |
1c1d7e |
FileList *fileList; // list of files in the group
|
|
Packit |
1c1d7e |
ClassSDict *classSDict; // list of classes in the group
|
|
Packit |
1c1d7e |
NamespaceSDict *namespaceSDict; // list of namespaces in the group
|
|
Packit |
1c1d7e |
GroupList *groupList; // list of sub groups.
|
|
Packit |
1c1d7e |
PageSDict *pageDict; // list of pages in the group
|
|
Packit |
1c1d7e |
PageSDict *exampleDict; // list of examples in the group
|
|
Packit |
1c1d7e |
DirList *dirList; // list of directories in the group
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
MemberList *allMemberList;
|
|
Packit |
1c1d7e |
MemberNameInfoSDict *allMemberNameInfoSDict;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
Definition *groupScope;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
QList<MemberList> m_memberLists;
|
|
Packit |
1c1d7e |
MemberGroupSDict *memberGroupSDict;
|
|
Packit |
1c1d7e |
bool m_subGrouping;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** A sorted dictionary of GroupDef objects. */
|
|
Packit |
1c1d7e |
class GroupSDict : public SDict<GroupDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
GroupSDict(uint size) : SDict<GroupDef>(size) {}
|
|
Packit |
1c1d7e |
virtual ~GroupSDict() {}
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
int compareValues(const GroupDef *item1,const GroupDef *item2) const
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
return qstrcmp(item1->groupTitle(),item2->groupTitle());
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** A list of GroupDef objects. */
|
|
Packit |
1c1d7e |
class GroupList : public QList<GroupDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
int compareValues(const GroupDef *item1,const GroupDef *item2) const
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
return qstrcmp(item1->groupTitle(),item2->groupTitle());
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** An iterator for GroupDef objects in a GroupList. */
|
|
Packit |
1c1d7e |
class GroupListIterator : public QListIterator<GroupDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
GroupListIterator(const GroupList &l) : QListIterator<GroupDef>(l) {}
|
|
Packit |
1c1d7e |
virtual ~GroupListIterator() {}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void addClassToGroups(Entry *root,ClassDef *cd);
|
|
Packit |
1c1d7e |
void addNamespaceToGroups(Entry *root,NamespaceDef *nd);
|
|
Packit |
1c1d7e |
void addGroupToGroups(Entry *root,GroupDef *subGroup);
|
|
Packit |
1c1d7e |
void addMemberToGroups(Entry *root,MemberDef *md);
|
|
Packit |
1c1d7e |
void addPageToGroups(Entry *root,PageDef *pd);
|
|
Packit |
1c1d7e |
void addExampleToGroups(Entry *root,PageDef *eg);
|
|
Packit |
1c1d7e |
void addDirToGroups(Entry *root,DirDef *dd);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#endif
|
|
Packit |
1c1d7e |
|