| 82 | } |
| 83 | |
| 84 | std::string EditJournal::ToString(osm::JournalEntry const & journalEntry) |
| 85 | { |
| 86 | switch (journalEntry.journalEntryType) |
| 87 | { |
| 88 | case osm::JournalEntryType::TagModification: |
| 89 | { |
| 90 | TagModData const & tagModData = std::get<TagModData>(journalEntry.data); |
| 91 | return ToString(journalEntry.journalEntryType) |
| 92 | .append(": Key ") |
| 93 | .append(tagModData.key) |
| 94 | .append(" changed from \"") |
| 95 | .append(tagModData.old_value) |
| 96 | .append("\" to \"") |
| 97 | .append(tagModData.new_value) |
| 98 | .append("\""); |
| 99 | } |
| 100 | case osm::JournalEntryType::ObjectCreated: |
| 101 | { |
| 102 | ObjCreateData const & objCreatedData = std::get<ObjCreateData>(journalEntry.data); |
| 103 | return ToString(journalEntry.journalEntryType) |
| 104 | .append(": ") |
| 105 | .append(classif().GetReadableObjectName(objCreatedData.type)) |
| 106 | .append(" (") |
| 107 | .append(std::to_string(objCreatedData.type)) |
| 108 | .append(")"); |
| 109 | } |
| 110 | case osm::JournalEntryType::LegacyObject: |
| 111 | { |
| 112 | LegacyObjData const & legacyObjData = std::get<LegacyObjData>(journalEntry.data); |
| 113 | return ToString(journalEntry.journalEntryType).append(": version=\"").append(legacyObjData.version).append("\""); |
| 114 | } |
| 115 | case osm::JournalEntryType::BusinessReplacement: |
| 116 | { |
| 117 | BusinessReplacementData const & businessReplacementData = std::get<BusinessReplacementData>(journalEntry.data); |
| 118 | return ToString(journalEntry.journalEntryType) |
| 119 | .append(": Category changed from ") |
| 120 | .append(classif().GetReadableObjectName(businessReplacementData.old_type)) |
| 121 | .append(" to ") |
| 122 | .append(classif().GetReadableObjectName(businessReplacementData.new_type)); |
| 123 | } |
| 124 | default: UNREACHABLE(); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | std::string EditJournal::ToString(osm::JournalEntryType journalEntryType) |
| 129 | { |
nothing calls this directly
no test coverage detected