MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetItems

Method GetItems

lib/config/configitem.cpp:757–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757std::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
777std::vector<ConfigItem::Ptr> ConfigItem::GetDefaultTemplates(const Type::Ptr& type)
778{

Callers 2

EndpointMethod · 0.45
GetQueuesForTypeMethod · 0.45

Calls 4

findMethod · 0.80
push_backMethod · 0.80
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected