virtual ~CellList() { for (IntCells::iterator it = intCells.begin(); it!=intCells.end(); ++it) delete it->second; for (ExtCells::iterator it = extCells.begin(); it!=extCells.end(); ++it) delete it->second; }
const ESM::Cell *searchExtByRegion (const std::string& id) const { std::string id2 = toLower (id); for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter) if (toLower (iter->second->region)==id) return iter->second; return 0; }
const ESM::Cell *searchExtByName (const std::string& id) const { for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter) { if (toLower (iter->second->name) == toLower (id)) return iter->second; } return 0; }
const Cell *searchExtByName (const std::string& id) const { for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter) { const ExtCellsCol& column = iter->second; for (ExtCellsCol::const_iterator iter = column.begin(); iter!=column.end(); ++iter) { if (iter->second->name==id) return iter->second; } } return 0; }
~CellList() { for (IntCells::iterator it = intCells.begin(); it!=intCells.end(); ++it) delete it->second; for (ExtCells::iterator it = extCells.begin(); it!=extCells.end(); ++it) { ExtCellsCol& col = it->second; for (ExtCellsCol::iterator it = col.begin(); it!=col.end(); ++it) { delete it->second; } } }
const Cell *searchExtByRegion (const std::string& id) const { std::string id2 = toLower (id); for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter) { const ExtCellsCol& column = iter->second; for (ExtCellsCol::const_iterator iter = column.begin(); iter!=column.end(); ++iter) { if (toLower (iter->second->region)==id) return iter->second; } } return 0; }