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

Method ValidateName

lib/base/configobject.cpp:77–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75{
76public:
77 bool ValidateName(const String& type, const String& name) const override
78 {
79 Type::Ptr ptype = Type::GetByName(type);
80 auto *dtype = dynamic_cast<ConfigType *>(ptype.get());
81
82 if (!dtype)
83 return false;
84
85 if (!dtype->GetObject(name))
86 return false;
87
88 return true;
89 }
90};
91
92void ConfigObject::ModifyAttribute(const String& attr, const Value& value, bool updateVersion)

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
GetObjectMethod · 0.45

Tested by

no test coverage detected