本文整理汇总了C++中MemberList::findRef方法的典型用法代码示例。如果您正苦于以下问题:C++ MemberList::findRef方法的具体用法?C++ MemberList::findRef怎么用?C++ MemberList::findRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberList
的用法示例。
在下文中一共展示了MemberList::findRef方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: insertMember
/*! Adds member definition \a md to the list of all members of this file */
void FileDef::insertMember(MemberDef *md)
{
if (md->isHidden()) return;
//printf("%s:FileDef::insertMember(%s (=%p) list has %d elements)\n",
// name().data(),md->name().data(),md,allMemberList.count());
MemberList *allMemberList = getMemberList(MemberList::allMembersList);
if (allMemberList && allMemberList->findRef(md)!=-1) // TODO optimize the findRef!
{
return;
}
if (allMemberList==0)
{
allMemberList = new MemberList(MemberList::allMembersList);;
m_memberLists.append(allMemberList);
}
allMemberList->append(md);
//::addFileMemberNameToIndex(md);
switch (md->memberType())
{
case MemberDef::Variable:
case MemberDef::Property:
addMemberToList(MemberList::decVarMembers,md);
addMemberToList(MemberList::docVarMembers,md);
break;
case MemberDef::Function:
addMemberToList(MemberList::decFuncMembers,md);
addMemberToList(MemberList::docFuncMembers,md);
break;
case MemberDef::Typedef:
addMemberToList(MemberList::decTypedefMembers,md);
addMemberToList(MemberList::docTypedefMembers,md);
break;
case MemberDef::Enumeration:
addMemberToList(MemberList::decEnumMembers,md);
addMemberToList(MemberList::docEnumMembers,md);
break;
case MemberDef::EnumValue: // enum values are shown inside their enums
break;
case MemberDef::Define:
addMemberToList(MemberList::decDefineMembers,md);
addMemberToList(MemberList::docDefineMembers,md);
break;
default:
err("FileDef::insertMembers(): "
"member `%s' with class scope `%s' inserted in file scope `%s'!\n",
md->name().data(),
md->getClassDef() ? md->getClassDef()->name().data() : "<global>",
name().data());
}
//addMemberToGroup(md,groupId);
}