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

Method GetTemplates

lib/base/scriptutils.cpp:448–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448Array::Ptr ScriptUtils::GetTemplates(const Type::Ptr& type)
449{
450 if (!type)
451 BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid type: Must not be null"));
452
453 ArrayData result;
454
455 for (const ConfigItem::Ptr& item : ConfigItem::GetItems(type)) {
456 if (item->IsAbstract())
457 result.push_back(GetTargetForTemplate(item));
458 }
459
460 return new Array(std::move(result));
461}
462
463ConfigObject::Ptr ScriptUtils::GetObject(const Value& vtype, const String& name)
464{

Callers

nothing calls this directly

Calls 3

GetTargetForTemplateFunction · 0.85
push_backMethod · 0.80
IsAbstractMethod · 0.45

Tested by

no test coverage detected