本文整理汇总了C++中UIDSet::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ UIDSet::insert方法的具体用法?C++ UIDSet::insert怎么用?C++ UIDSet::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIDSet
的用法示例。
在下文中一共展示了UIDSet::insert方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: locker
void
IMAPFolder::MessageEntriesFetched()
{
_WaitForFolderState();
// Synchronize all pending flags first
UIDToFlagsMap::const_iterator pendingIterator = fPendingFlagsMap.begin();
for (; pendingIterator != fPendingFlagsMap.end(); pendingIterator++)
SyncMessageFlags(pendingIterator->first, pendingIterator->second);
fPendingFlagsMap.clear();
// Delete all local messages that are no longer found on the server
MutexLocker locker(fLock);
UIDSet deleteUIDs;
UIDToRefMap::const_iterator iterator = fRefMap.begin();
for (; iterator != fRefMap.end(); iterator++) {
uint32 uid = iterator->first;
if (fSynchronizedUIDsSet.find(uid) == fSynchronizedUIDsSet.end())
deleteUIDs.insert(uid);
}
fSynchronizedUIDsSet.clear();
locker.Unlock();
UIDSet::const_iterator deleteIterator = deleteUIDs.begin();
for (; deleteIterator != deleteUIDs.end(); deleteIterator++)
_DeleteLocalMessage(*deleteIterator);
}
示例2: main
int main(int argc, char* argv[]) {
UIDSet uids;
if (argc < 3) {
std::cerr << "ERROR: Must have at least two arguments: basename and a UID"
<< std::endl;
return -1;
}
try {
stoi(argv[1], NULL, 10);
std::cerr << "ERROR: First argument must not be an integer"
<< std::endl;
return -1;
} catch (...) {}
std::string basename(std::string(argv[1]) + "_mixed");
if (basename.find("/") != std::string::npos) {
std::cerr << "ERROR: Basename may not contain path separator"
<< std::endl;
return -1;
}
for (int i = 2; i < argc; ++i) {
uids.insert(stoi(argv[i], NULL, 10));
}
ParamSet extraParams;
extraParams.insert(-1); // Don't-care value
SetuidState startState = SetuidState::get();
Explorer explorer(
Graph(VG(), uids, startState),
EG(),
uids,
extraParams);
explorer.exploreAll();
Graph const& graph = explorer.getGraph();
GraphName name(basename, uids, extraParams);
ArchiveWriter<Graph>().write(graph, name);
DotWriter<Graph>().write(graph, name);
return 0;
}