本文整理汇总了C++中MultiMap::multiHaveItem方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiMap::multiHaveItem方法的具体用法?C++ MultiMap::multiHaveItem怎么用?C++ MultiMap::multiHaveItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultiMap
的用法示例。
在下文中一共展示了MultiMap::multiHaveItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: registerService
int ServiceManager::registerService(waServiceFactory *service, GUID owner) {
ASSERT(owner != INVALID_GUID);
if (owner == INVALID_GUID) return 0;
GUID svctype = GetServiceTypeL(service);
cs.enter();
if (!services.multiHaveItem(svctype, service)) {
services.multiAddItem(svctype, service);
ownermap.addItem(service, owner);
GUID svcguid = service->getGuid();
if (svcguid != INVALID_GUID) services_by_guid.addItem(svcguid, service);
}
cs.leave();
service->serviceNotify(SvcNotify::ONREGISTERED);
#ifdef WASABI_COMPILE_SYSCB
CallbackManager::issueCallback(SysCallback::SERVICE,
SvcCallback::ONREGISTER,
reinterpret_cast<long>(&svctype), reinterpret_cast<long>(service));
#endif
return 1;
}
示例2: deregisterService
int ServiceManager::deregisterService(waServiceFactory *service, int internal) {
GUID svctype = GetServiceTypeL(service);
// make sure it was there
cs.enter();
if (services.multiHaveItem(svctype, service)) {
// make sure there aren't still services issued by this guy
// ASSERT(internal || !lockmap.reverseGetItem(service));
services.multiDelItem(svctype, service);
ownermap.delItem(service);
services_by_guid.reverseDelItem(service);
}
cs.leave();
service->serviceNotify(SvcNotify::ONDEREGISTERED);
#ifdef WASABI_COMPILE_SYSCB
CallbackManager::issueCallback(SysCallback::SERVICE,
SvcCallback::ONDEREGISTER,
reinterpret_cast<long>(&svctype), reinterpret_cast<long>(service));
#endif
return 1;
}
示例3: isValidService
int ServiceManager::isValidService(GUID svctype, waServiceFactory *service) {
INCRITICALSECTION(cs);
return services.multiHaveItem(svctype, service);
}