MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / locate_object

Method locate_object

source/binding/NodeJS/src/apis/controller.cpp:332–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332maajs::ValueType ControllerImpl::locate_object(maajs::EnvType env, MaaController* ctrl)
333{
334 if (auto obj = ExtContext::get(env)->controllers.find(ctrl)) {
335 return *obj;
336 }
337 else {
338 return maajs::CallCtorHelper(ExtContext::get(env)->controllerCtor, std::to_string(reinterpret_cast<uintptr_t>(ctrl)));
339 }
340}
341
342void ControllerImpl::init_bind(maajs::ObjectType self)
343{

Callers

nothing calls this directly

Calls 2

CallCtorHelperFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected