| 1292 | } |
| 1293 | |
| 1294 | void ObjectIdentifier::setDocumentName(ObjectIdentifier::String&& name, bool force) |
| 1295 | { |
| 1296 | if (name.getString().empty()) { |
| 1297 | force = false; |
| 1298 | } |
| 1299 | documentNameSet = force; |
| 1300 | _cache.clear(); |
| 1301 | if (!name.getString().empty() && _DocumentMap) { |
| 1302 | if (name.isRealString()) { |
| 1303 | auto iter = _DocumentMap->find(name.toString()); |
| 1304 | if (iter != _DocumentMap->end()) { |
| 1305 | documentName = String(iter->second, true); |
| 1306 | return; |
| 1307 | } |
| 1308 | } |
| 1309 | else { |
| 1310 | auto iter = _DocumentMap->find(name.getString()); |
| 1311 | if (iter != _DocumentMap->end()) { |
| 1312 | documentName = String(iter->second, false, true); |
| 1313 | return; |
| 1314 | } |
| 1315 | } |
| 1316 | } |
| 1317 | documentName = std::move(name); |
| 1318 | } |
| 1319 | |
| 1320 | ObjectIdentifier::String ObjectIdentifier::getDocumentName() const |
| 1321 | { |