本文整理汇总了C++中DeviceMap::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ DeviceMap::clear方法的具体用法?C++ DeviceMap::clear怎么用?C++ DeviceMap::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeviceMap
的用法示例。
在下文中一共展示了DeviceMap::clear方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Clear
void CParseDevice::Clear()
{
DeviceMap::iterator deviceIter = g_deviceMap.begin();
for (; deviceIter != g_deviceMap.end(); deviceIter++)
{
delete (*deviceIter).second;
}
g_deviceMap.clear();
}
示例2: Clear
void CParseDevice::Clear()
{
pthread_mutex_lock(&dmt);
DeviceMap::iterator deviceIter = g_deviceMap.begin();
for (; deviceIter != g_deviceMap.end(); deviceIter++)
{
delete (*deviceIter).second;
}
g_deviceMap.clear();
pthread_mutex_unlock(&dmt);
}
示例3: logging
/*
* Called when monitor starts, monitors issues that generally happen on reboot.
*/
void monitor::EventMonitor::startOfDay()
{
LogEnterExit logging(__FUNCTION__, __FILE__, __LINE__);
nvm_create_context();
int valid = 0;
get_config_value_int(SQL_KEY_TOPOLOGY_STATE_VALID, &valid);
DeviceMap devMap;
buildDeviceMap(devMap, (bool) valid);
// Detect topology changes if topo is saved
if (valid)
{
std::vector<std::string> replacedUids;
processTopologyNewDimms(devMap, replacedUids);
processTopologyModifiedDimms(devMap, replacedUids);
}
// Detect other issues that only change on reboot
processDeviceStartupStatus(devMap);
// TODO DE4781: Detect address range scrub errors
// Update the saved topology state
saveCurrentTopologyState(devMap);
// On start-up look for deleted namespaces and auto-acknowledge action required events
acknowledgeDeletedNamespaces();
// On start-up look for mixed sku system
processMixedSkuSystem();
// clean up
devMap.clear();
nvm_free_context();
}
示例4:
CParseDevice::CParseDevice()
{
g_deviceMap.clear();
}