| 10 | using namespace icinga; |
| 11 | |
| 12 | static void TypeRegisterAttributeHandler(const String& fieldName, const Function::Ptr& callback) |
| 13 | { |
| 14 | ScriptFrame *vframe = ScriptFrame::GetCurrentFrame(); |
| 15 | Type::Ptr self = static_cast<Type::Ptr>(vframe->Self); |
| 16 | REQUIRE_NOT_NULL(self); |
| 17 | |
| 18 | int fid = self->GetFieldId(fieldName); |
| 19 | self->RegisterAttributeHandler(fid, [callback](const Object::Ptr& object, [[maybe_unused]] const Value& cookie) { |
| 20 | callback->Invoke({ object }); |
| 21 | }); |
| 22 | } |
| 23 | |
| 24 | Object::Ptr TypeType::GetPrototype() |
| 25 | { |
nothing calls this directly
no test coverage detected