My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
groupdef.h File Reference
#include "sortdict.h"
#include "definition.h"

Go to the source code of this file.

Classes

class  GroupDef
 
class  GroupSDict
 
class  GroupList
 
class  GroupListIterator
 

Functions

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)
 

Function Documentation

void addClassToGroups ( Entry root,
ClassDef cd 
)

Definition at line 1306 of file groupdef.cpp.

References GroupDef::addClass(), SDict< T >::find(), Grouping::groupname, Entry::groups, Doxygen::groupSDict, and Definition::makePartOfGroup().

Referenced by addClassToContext().

{
QListIterator<Grouping> gli(*root->groups);
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
if (gd->addClass(cd))
{
cd->makePartOfGroup(gd);
}
//printf("Compound %s: in group %s\n",cd->name().data(),gd->groupTitle());
}
}
}
void addDirToGroups ( Entry root,
DirDef dd 
)

Definition at line 1341 of file groupdef.cpp.

References GroupDef::addDir(), SDict< T >::find(), Grouping::groupname, Entry::groups, Doxygen::groupSDict, and Definition::makePartOfGroup().

Referenced by findDirDocumentation().

{
//printf("*** root->groups->count()=%d\n",root->groups->count());
QListIterator<Grouping> gli(*root->groups);
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
//printf("group `%s'\n",g->groupname.data());
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
gd->addDir(dd);
dd->makePartOfGroup(gd);
//printf("Dir %s: in group %s\n",dd->name().data(),g->groupname.data());
}
}
}
void addExampleToGroups ( Entry root,
PageDef eg 
)

Definition at line 1496 of file groupdef.cpp.

References GroupDef::addExample(), SDict< T >::find(), Grouping::groupname, Entry::groups, Doxygen::groupSDict, and Definition::makePartOfGroup().

{
QListIterator<Grouping> gli(*root->groups);
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
gd->addExample(eg);
eg->makePartOfGroup(gd);
//printf("Example %s: in group %s\n",eg->name().data(),s->data());
}
}
}
void addGroupToGroups ( Entry root,
GroupDef subGroup 
)

Definition at line 1359 of file groupdef.cpp.

References GroupDef::addGroup(), Entry::fileName, SDict< T >::find(), GroupDef::findGroup(), Grouping::groupname, Entry::groups, Doxygen::groupSDict, Definition::makePartOfGroup(), Definition::name(), Entry::startLine, and warn().

Referenced by organizeSubGroupsFiltered().

{
//printf("addGroupToGroups for %s groups=%d\n",root->name.data(),
// root->groups?root->groups->count():-1);
QListIterator<Grouping> gli(*root->groups);
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
if (gd==subGroup)
{
warn(root->fileName,root->startLine,"Refusing to add group %s to itself",
gd->name().data());
}
else if (subGroup->findGroup(gd))
{
warn(root->fileName,root->startLine,"Refusing to add group %s to group %s, since the latter is already a "
"subgroup of the former\n", subGroup->name().data(),gd->name().data());
}
else if (!gd->findGroup(subGroup))
{
gd->addGroup(subGroup);
subGroup->makePartOfGroup(gd);
}
}
}
}
void addMemberToGroups ( Entry root,
MemberDef md 
)

Add a member to the group with the highest priority

Definition at line 1390 of file groupdef.cpp.

References Entry::doc, Entry::fileName, SDict< T >::find(), MemberDef::getClassDefOfAnonymousType(), MemberDef::getGroupDef(), MemberDef::getGroupFileName(), MemberDef::getGroupHasDocs(), MemberDef::getGroupPri(), Grouping::getGroupPriName(), MemberDef::getGroupStartLine(), Grouping::GROUPING_LOWEST, Grouping::groupname, Entry::groups, Doxygen::groupSDict, GroupDef::insertMember(), Definition::name(), Grouping::pri, GroupDef::removeMember(), MemberDef::setGroupDef(), ClassDef::setGroupDefForAllMembers(), Entry::startLine, and warn().

Referenced by addInterfaceOrServiceToServiceOrSingleton(), addMemberDocs(), addMethodToClass(), addVariableToClass(), addVariableToFile(), buildFunctionList(), findDefineDocumentation(), findEnumDocumentation(), findEnums(), and findMember().

{
//printf("addMemberToGroups: Root %p = %s, md %p=%s groups=%d\n",
// root, root->name.data(), md, md->name().data(), root->groups->count() );
QListIterator<Grouping> gli(*root->groups);
// Search entry's group list for group with highest pri.
GroupDef *fgd=0;
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
if (!g->groupname.isEmpty() &&
g->pri >= pri)
{
if (fgd && gd!=fgd && g->pri==pri)
{
warn(root->fileName.data(), root->startLine,
"Member %s found in multiple %s groups! "
"The member will be put in group %s, and not in group %s",
md->name().data(), Grouping::getGroupPriName( pri ),
gd->name().data(), fgd->name().data()
);
}
fgd = gd;
pri = g->pri;
}
}
//printf("fgd=%p\n",fgd);
// put member into group defined by this entry?
if (fgd)
{
GroupDef *mgd = md->getGroupDef();
//printf("mgd=%p\n",mgd);
bool insertit = FALSE;
if (mgd==0)
{
insertit = TRUE;
}
else if (mgd!=fgd)
{
bool moveit = FALSE;
// move member from one group to another if
// - the new one has a higher priority
// - the new entry has the same priority, but with docs where the old one had no docs
if (md->getGroupPri()<pri)
{
moveit = TRUE;
}
else
{
if (md->getGroupPri()==pri)
{
if (!root->doc.isEmpty() && !md->getGroupHasDocs())
{
moveit = TRUE;
}
else if (!root->doc.isEmpty() && md->getGroupHasDocs())
{
"Member documentation for %s found several times in %s groups!\n"
"%s:%d: The member will remain in group %s, and won't be put into group %s",
md->name().data(), Grouping::getGroupPriName( pri ),
root->fileName.data(), root->startLine,
mgd->name().data(),
fgd->name().data()
);
}
}
}
if (moveit)
{
//printf("removeMember\n");
mgd->removeMember(md);
insertit = TRUE;
}
}
if (insertit)
{
//printf("insertMember found at %s line %d: %s: related %s\n",
// md->getDefFileName().data(),md->getDefLine(),
// md->name().data(),root->relates.data());
bool success = fgd->insertMember(md);
if (success)
{
//printf("insertMember successful\n");
md->setGroupDef(fgd,pri,root->fileName,root->startLine,
!root->doc.isEmpty());
if (cd)
{
cd->setGroupDefForAllMembers(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
}
}
}
}
}
void addNamespaceToGroups ( Entry root,
NamespaceDef nd 
)

Definition at line 1324 of file groupdef.cpp.

References GroupDef::addNamespace(), SDict< T >::find(), Grouping::groupname, Entry::groups, Doxygen::groupSDict, and Definition::makePartOfGroup().

Referenced by buildNamespaceList().

{
//printf("root->groups->count()=%d\n",root->groups->count());
QListIterator<Grouping> gli(*root->groups);
for (;(g=gli.current());++gli)
{
GroupDef *gd=0;
//printf("group `%s'\n",s->data());
if (!g->groupname.isEmpty() && (gd=Doxygen::groupSDict->find(g->groupname)))
{
if (gd->addNamespace(nd)) nd->makePartOfGroup(gd);
//printf("Namespace %s: in group %s\n",nd->name().data(),s->data());
}
}
}
void addPageToGroups ( Entry root,
PageDef pd 
)