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

Method GetDefaultTemplates

lib/config/configitem.cpp:777–795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776
777std::vector<ConfigItem::Ptr> ConfigItem::GetDefaultTemplates(const Type::Ptr& type)
778{
779 std::vector<ConfigItem::Ptr> items;
780
781 std::unique_lock<std::mutex> lock(m_Mutex);
782
783 auto it = m_DefaultTemplates.find(type);
784
785 if (it == m_DefaultTemplates.end())
786 return items;
787
788 items.reserve(it->second.size());
789
790 for (const ItemMap::value_type& kv : it->second) {
791 items.push_back(kv.second);
792 }
793
794 return items;
795}
796
797void ConfigItem::RemoveIgnoredItems(const String& allowedConfigPath)
798{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected