本文整理汇总了C++中MultiMap::multiRemoveAll方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiMap::multiRemoveAll方法的具体用法?C++ MultiMap::multiRemoveAll怎么用?C++ MultiMap::multiRemoveAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultiMap
的用法示例。
在下文中一共展示了MultiMap::multiRemoveAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onShutdown
void ServiceManager::onShutdown() {
/*
ownermap.purge();
services.purge();
services_by_guid.purge();
clientmap.purge();
*/
int nlocks = lockmap.getNumPairs();
if (nlocks <= 0) {
//lockmap.purge();
#ifdef GEN_FF // i need this to have clean session restart, feel free to remove the ifdef if you fgeel that should always be done
ownermap.deleteAll();
services.multiRemoveAll();
services_by_guid.deleteAll();
lockmap.deleteAll();
#endif
return;
}
#ifndef _DEBUG
DebugString("-----------------\n");
for (int i = 0; i < nlocks; i++) {
void *ptr = lockmap.enumIndexByPos(i, NULL); ASSERT(ptr != NULL);
StringPrintf s("lock: %d type:'", (int)ptr);
// GUID g = lockermap.enumItemByPos(i, INVALID_GUID);ASSERT(g != INVALID_GUID);
// s += g;
// WaComponent *wac = ComponentManager::getComponentFromGuid(g);
waServiceFactory *was=NULL;
was = lockmap.enumItemByPos(i, NULL);
ASSERT(was != NULL);
GUID type = safe_getServiceType(was);
const char *tname = ServiceManager::getServiceTypeName(type);
if (tname != NULL) {
s += tname;
} else {
/*
FOURCC v = BSWAP(type);
unsigned char bleh[5]=" ";
MEMCPY(bleh, &v, 4);
s += String((char *)bleh);
*/
s += Guid(type).toChar();
}
s += "' from service:'";
s += safe_getServiceName(was);
// s += " wac:";
// if (wac) s += wac->getName();
#ifdef WASABI_COMPILE_COMPONENTS
s += "' owned by:'";
GUID g = INVALID_GUID;
ownermap.getItem(was, &g);
if (g != INVALID_GUID) {
s += g;
WaComponent *wac = ComponentManager::getComponentFromGuid(g);
if (wac) s += wac->getName();
} else s += "(unregistered)";
#else
GUID g;
#endif
s += "' registered lock to '";
g = INVALID_GUID;
//clientmap.getItem(ptr, &g);
s += g;
s += "'\n";
DebugString(s.v());
}
DebugString("-----------------\n");
#endif
#ifdef GEN_FF // i need this to have clean session restart, feel free to remove the ifdef if you fgeel that should always be done
ownermap.deleteAll();
services.multiRemoveAll();
services_by_guid.deleteAll();
lockmap.deleteAll();
#endif
}