| 42 | namespace classificator |
| 43 | { |
| 44 | void Load() |
| 45 | { |
| 46 | LOG(LDEBUG, ("Reading of classificator started")); |
| 47 | |
| 48 | Platform & p = GetPlatform(); |
| 49 | |
| 50 | MapStyle const originMapStyle = GetStyleReader().GetCurrentStyle(); |
| 51 | |
| 52 | for (size_t i = 0; i < MapStyleCount; ++i) |
| 53 | { |
| 54 | auto const mapStyle = static_cast<MapStyle>(i); |
| 55 | // Read the merged style only if it was requested. |
| 56 | if (mapStyle != MapStyleMerged || originMapStyle == MapStyleMerged) |
| 57 | { |
| 58 | GetStyleReader().SetCurrentStyle(mapStyle); |
| 59 | ReadCommon(p.GetReader("classificator.txt"), p.GetReader("types.txt")); |
| 60 | |
| 61 | drule::LoadRules(); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | GetStyleReader().SetCurrentStyle(originMapStyle); |
| 66 | |
| 67 | LOG(LDEBUG, ("Reading of classificator finished")); |
| 68 | } |
| 69 | |
| 70 | void LoadTypes(std::string const & classificatorFileStr, std::string const & typesFileStr) |
| 71 | { |