void MapModuleNoticeContainer::loadMapSupCoverage( DataBuffer* db ){ MC2_ASSERT(db != NULL); // Read number of elements uint32 nbrElements = db->readNextLong(); for (uint32 i=0; i<nbrElements; i++){ // Read bounding box uint32 maxLat = db->readNextLong(); uint32 minLat = db->readNextLong(); uint32 maxLon = db->readNextLong(); uint32 minLon = db->readNextLong(); MC2BoundingBox bBox; bBox.setMaxLat(maxLat); bBox.setMinLat(minLat); bBox.setMaxLon(maxLon); bBox.setMinLon(minLon); // Read supplier name. MapGenEnums::mapSupplier mapSupplier = static_cast<MapGenEnums::mapSupplier>(db->readNextLong()); m_mapSupCoverage.push_back(make_pair(bBox, mapSupplier)); } mc2dbg << "[MMNC]: Loaded " << m_mapSupCoverage.size() << " map supplier coverage bounding boxes." << endl; // Read coverage tree. nbrElements = db->readNextLong(); m_mapSupCoverageTree.reserve(nbrElements); for (uint32 i=0; i<nbrElements; i++){ uint32 parent = db->readNextLong(); uint32 child = db->readNextLong(); m_mapSupCoverageTree.push_back(make_pair(parent, child)); } MC2_ASSERT(m_mapSupCoverageTree.size() == nbrElements); // Load map supplier names. uint32 nbrToRead = db->readNextLong(); for (uint32 i=0; i<nbrToRead; i++){ NameCollection tmpNames; MapGenEnums::mapSupplier mapSup = static_cast<MapGenEnums::mapSupplier>(db->readNextLong()); tmpNames.load(db); m_mapSupNamesByMapSup.insert(make_pair(mapSup, tmpNames)); } mc2dbg << "[MMNC]: Loaded " << m_mapSupNamesByMapSup.size() << " map supplier names." << endl; } // MapModuleNoticeContainer::loadMapSupCoverage