当前位置: 首页>>代码示例>>C++>>正文


C++ UIDSet::end方法代码示例

本文整理汇总了C++中UIDSet::end方法的典型用法代码示例。如果您正苦于以下问题:C++ UIDSet::end方法的具体用法?C++ UIDSet::end怎么用?C++ UIDSet::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIDSet的用法示例。


在下文中一共展示了UIDSet::end方法的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);
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:30,代码来源:IMAPFolder.cpp

示例2:

GraphName::GraphName(
    std::string const& basename,
    UIDSet const& uidSet,
    ParamSet const& paramSet) {
    std::vector<int> uids, params;
    for (UIDSet::const_iterator it = uidSet.begin(), ie = uidSet.end();
         it != ie; ++it) {
        uids.push_back(static_cast<int>(*it));
    }
    std::sort(uids.begin(), uids.end());
    for (ParamSet::const_iterator it = paramSet.begin(), ie = paramSet.end();
         it != ie; ++it) {
        params.push_back(*it);
    }
    std::sort(params.begin(), params.end());

    std::stringstream ss;
    ss << basename << "__u_";
    for (std::vector<int>::iterator it = uids.begin(), ie = uids.end();
         it != ie; ++it) {
        ss << *it;
        if (it +1 != uids.end()) {
            ss << "_";
        }
    }
    ss << "__p_";
    for (std::vector<int>::iterator it = params.begin(), ie = params.end();
         it != ie; ++it) {
        ss << *it;
        if (it +1 != params.end()) {
            ss << "_";
        }
    }

    name = ss.str();
}
开发者ID:mdittmer,项目名称:unix-process-identity,代码行数:36,代码来源:GraphName.cpp


注:本文中的UIDSet::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。