Remove all agents not on this list
| 104 | |
| 105 | // Remove all agents not on this list |
| 106 | void keep(std::list<DataType>* pKeepList) |
| 107 | { |
| 108 | for (InternalMapIter mapIter = m_Map.begin() ; mapIter != m_Map.end() ;) |
| 109 | { |
| 110 | DataType pObject = mapIter->second ; |
| 111 | |
| 112 | // For lists, you have to use std::find, they don't have a member function |
| 113 | if (std::find(pKeepList->begin(), pKeepList->end(), pObject) != pKeepList->end()) |
| 114 | { |
| 115 | mapIter++ ; |
| 116 | } |
| 117 | else |
| 118 | { |
| 119 | m_Map.erase(mapIter++) ; // changed by voigtjr |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | DataType find(char const* pName) const |
| 125 | { |
no test coverage detected