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

Method locate_object

source/binding/NodeJS/src/apis/tasker.cpp:391–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391maajs::ValueType TaskerImpl::locate_object(maajs::EnvType env, MaaTasker* tsk)
392{
393 if (auto obj = ExtContext::get(env)->taskers.find(tsk)) {
394 return *obj;
395 }
396 else {
397 return maajs::CallCtorHelper(ExtContext::get(env)->taskerCtor, std::to_string(reinterpret_cast<uintptr_t>(tsk)));
398 }
399}
400
401void TaskerImpl::init_bind(maajs::ObjectType self)
402{

Callers

nothing calls this directly

Calls 2

CallCtorHelperFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected