| 296 | } |
| 297 | |
| 298 | void Dae::initializeCache() const |
| 299 | { |
| 300 | if (!mCacheInitialized) |
| 301 | { |
| 302 | mCacheInitialized = true; |
| 303 | |
| 304 | if (auto root_node = root()) |
| 305 | { |
| 306 | const auto & nodes = root_node.selectNodes("//*[@id]"); |
| 307 | for (const auto & node : nodes) |
| 308 | { |
| 309 | string id = node.attribute("id").value(); |
| 310 | mIdCache.insert(id); |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | } |
| 315 | } |