本文整理汇总了C++中IdList::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ IdList::clear方法的具体用法?C++ IdList::clear怎么用?C++ IdList::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IdList
的用法示例。
在下文中一共展示了IdList::clear方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetIds
void BadUserDialog::GetIds(IdList &theList)
{
ListArea *aList = mIsSimple?mSimpleUserList.get():mUserList.get();
theList.clear();
aList->RewindSelections();
while(aList->HasMoreSelections())
{
BadUserItem *anItem = (BadUserItem *)aList->GetNextSelection();
theList.push_back(anItem->mColInt[1]);
}
}
示例2: idsOfAllChildrenOf
IdList Repository::idsOfAllChildrenOf(Id id) const
{
IdList result;
result.clear();
result.append(id);
IdList list = mObjects[id]->children();
for (const Id &childId : list) {
result.append(idsOfAllChildrenOf(childId));
}
return result;
}
示例3: logCycle
void
FunctionDefinitionRecursion::determineCycles(const Model& m)
{
IdIter it;
IdRange range;
IdList variables;
IdMap logged;
std::string id;
variables.clear();
/* create a list of variables that are cycles ie (x, x) */
for (it = mIdMap.begin(); it != mIdMap.end(); it++)
{
if ((*it).first == (*it).second)
{
id = (*it).first;
if (!variables.contains(id))
{
variables.append(id);
}
}
}
/* loop thru other dependencies for each; if the dependent is also
* in the list then this is the cycle
* keep a record of logged dependencies to avoid logging twice
*/
for (unsigned int n = 0; n < variables.size(); n++)
{
id = variables.at((int)n);
range = mIdMap.equal_range(id);
for (it = range.first; it != range.second; it++)
{
if (((*it).second != id)
&& (variables.contains((*it).second))
&& !alreadyExistsInMap(logged,
pair<const std::string, std::string>(id, (*it).second))
&& !alreadyExistsInMap(logged,
pair<const std::string, std::string>((*it).second, id)))
{
logCycle(m.getFunctionDefinition(id), m.getFunctionDefinition((*it).second));
logged.insert(pair<const std::string, std::string>(id, (*it).second));
}
}
}
}
示例4: GetSessionList
void Debugger::GetSessionList(IdList& output) const
{
output.clear();
for (auto& itr : m_sessions)
output.push_back(itr.first);
}