* Retrieves a configuration item by type and name. * * @param type The type of the ConfigItem that is to be looked up. * @param name The name of the ConfigItem that is to be looked up. * @returns The configuration item. */
| 375 | * @returns The configuration item. |
| 376 | */ |
| 377 | ConfigItem::Ptr ConfigItem::GetByTypeAndName(const Type::Ptr& type, const String& name) |
| 378 | { |
| 379 | std::unique_lock<std::mutex> lock(m_Mutex); |
| 380 | |
| 381 | auto it = m_Items.find(type); |
| 382 | |
| 383 | if (it == m_Items.end()) |
| 384 | return nullptr; |
| 385 | |
| 386 | auto it2 = it->second.find(name); |
| 387 | |
| 388 | if (it2 == it->second.end()) |
| 389 | return nullptr; |
| 390 | |
| 391 | return it2->second; |
| 392 | } |
| 393 | |
| 394 | bool ConfigItem::CommitNewItems(const ActivationContext::Ptr& context, WorkQueue& upq, std::vector<ConfigItem::Ptr>& newItems) |
| 395 | { |