| 755 | } |
| 756 | |
| 757 | std::vector<ConfigItem::Ptr> ConfigItem::GetItems(const Type::Ptr& type) |
| 758 | { |
| 759 | std::vector<ConfigItem::Ptr> items; |
| 760 | |
| 761 | std::unique_lock<std::mutex> lock(m_Mutex); |
| 762 | |
| 763 | auto it = m_Items.find(type); |
| 764 | |
| 765 | if (it == m_Items.end()) |
| 766 | return items; |
| 767 | |
| 768 | items.reserve(it->second.size()); |
| 769 | |
| 770 | for (const ItemMap::value_type& kv : it->second) { |
| 771 | items.push_back(kv.second); |
| 772 | } |
| 773 | |
| 774 | return items; |
| 775 | } |
| 776 | |
| 777 | std::vector<ConfigItem::Ptr> ConfigItem::GetDefaultTemplates(const Type::Ptr& type) |
| 778 | { |