本文整理汇总了C++中MemberList::append方法的典型用法代码示例。如果您正苦于以下问题:C++ MemberList::append方法的具体用法?C++ MemberList::append怎么用?C++ MemberList::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberList
的用法示例。
在下文中一共展示了MemberList::append方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addMemberToList
void GroupDef::addMemberToList(MemberList::ListType lt,MemberDef *md)
{
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
MemberList *ml = createMemberList(lt);
ml->setNeedsSorting(
((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
((ml->listType()&MemberList::documentationLists) && sortMemberDocs));
ml->append(md);
#if 0
if (ml->needsSorting())
ml->inSort(md);
else
ml->append(md);
#endif
}
示例2: addMemberToList
void GroupDef::addMemberToList(MemberListType lt,MemberDef *md)
{
static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
MemberList *ml = createMemberList(lt);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
((ml->listType()&MemberListType_documentationLists) && sortMemberDocs));
ml->append(md);
}
示例3: addMemberToList
void NamespaceDef::addMemberToList(MemberListType lt,MemberDef *md)
{
static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
MemberList *ml = createMemberList(lt);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
((ml->listType()&MemberListType_documentationLists) && sortMemberDocs));
ml->append(md);
#if 0
if (ml->needsSorting())
ml->inSort(md);
else
ml->append(md);
#endif
if (ml->listType()&MemberListType_declarationLists) md->setSectionList(this,ml);
}
示例4: 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);
}
示例5: insertMember
void NamespaceDef::insertMember(MemberDef *md)
{
if (md->isHidden()) return;
MemberList *allMemberList = getMemberList(MemberListType_allMembersList);
if (allMemberList==0)
{
allMemberList = new MemberList(MemberListType_allMembersList);
m_memberLists.append(allMemberList);
}
allMemberList->append(md);
if (m_allMembersDict==0)
{
m_allMembersDict = new MemberSDict;
}
//printf("%s::m_allMembersDict->append(%s)\n",name().data(),md->localName().data());
m_allMembersDict->append(md->localName(),md);
//::addNamespaceMemberNameToIndex(md);
//static bool sortBriefDocs=Config_getBool("SORT_BRIEF_DOCS");
switch(md->memberType())
{
case MemberType_Variable:
addMemberToList(MemberListType_decVarMembers,md);
addMemberToList(MemberListType_docVarMembers,md);
break;
case MemberType_Function:
addMemberToList(MemberListType_decFuncMembers,md);
addMemberToList(MemberListType_docFuncMembers,md);
break;
case MemberType_Typedef:
addMemberToList(MemberListType_decTypedefMembers,md);
addMemberToList(MemberListType_docTypedefMembers,md);
break;
case MemberType_Enumeration:
addMemberToList(MemberListType_decEnumMembers,md);
addMemberToList(MemberListType_docEnumMembers,md);
break;
case MemberType_EnumValue:
break;
case MemberType_Define:
addMemberToList(MemberListType_decDefineMembers,md);
addMemberToList(MemberListType_docDefineMembers,md);
break;
default:
err("NamespaceDef::insertMembers(): "
"member `%s' with class scope `%s' inserted in namespace scope `%s'!\n",
md->name().data(),
md->getClassDef() ? md->getClassDef()->name().data() : "",
name().data());
}
}
示例6: unmarshalUInt
MemberList *unmarshalMemberList(StorageIntf *s)
{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0;
MemberList *result = new MemberList;
assert(count<1000000);
for (i=0;i<count;i++)
{
MemberDef *md = (MemberDef*)unmarshalObjPointer(s);
result->append(md);
}
result->unmarshal(s);
return result;
}
示例7: write
//.........这里部分代码省略.........
}
++bt_id_it;
checkOperationProgress();
}
assert(written == ids_to_write);
assert(written_types.size() + written == _factory->typesById().size());
// Write list of variables
out << (qint32) _factory->vars().size();
#ifdef WRITE_ASCII_FILE
dout << endl << "# List of variables" << endl
<< dec << _factory->vars().size() << endl;
#endif
for (int i = 0; i < _factory->vars().size(); i++) {
out << *_factory->vars().at(i);
#ifdef WRITE_ASCII_FILE
dout << hex << "0x" << _factory->vars().at(i)->id() << " "
<< _factory->vars().at(i)->name() << ", refTypeId = 0x"
<< _factory->vars().at(i)->refTypeId() << endl;
#endif
checkOperationProgress();
}
// Find referencing types with alternatives
QList<RefBaseType*> refTypesWithAlt;
MemberList membersWithAlt;
for (int i = 0; i < _factory->types().count(); ++i) {
BaseType* t = _factory->types().at(i);
// Non-structure types
if (t->type() & ReferencingTypes & ~StructOrUnion) {
RefBaseType* rbt = dynamic_cast<RefBaseType*>(t);
if (rbt->altRefTypeCount() > 0)
refTypesWithAlt.append(rbt);
}
// Structure types
else if (t->type() & StructOrUnion) {
Structured* s = dynamic_cast<Structured*>(t);
for (int j = 0; j < s->members().count(); ++j) {
StructuredMember* m = s->members().at(j);
if (m->altRefTypeCount() > 0)
membersWithAlt.append(m);
}
}
checkOperationProgress();
}
// Find variables with type alternatives
VariableList varsWithAlt;
for (int i = 0; i < _factory->vars().size(); i++) {
Variable* v = _factory->vars().at(i);
if (v->altRefTypeCount() > 0)
varsWithAlt.append(v);
checkOperationProgress();
}
// Write list of types with alternative types
out << (qint32) refTypesWithAlt.size();
#ifdef WRITE_ASCII_FILE
dout << endl << "# List of types with alternative types" << endl
<< dec << refTypesWithAlt.size() << endl;
#endif
for (int i = 0; i < refTypesWithAlt.size(); ++i) {
RefBaseType* rbt = refTypesWithAlt.at(i);
out << (qint32) rbt->id();
rbt->writeAltRefTypesTo(out);