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

Method init_proto

source/binding/NodeJS/src/apis/resource.cpp:404–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void ResourceImpl::init_proto(maajs::ObjectType proto, maajs::FunctionType)
405{
406 MAA_BIND_FUNC(proto, "destroy", ResourceImpl::destroy);
407 MAA_BIND_FUNC(proto, "add_sink", ResourceImpl::add_sink);
408 MAA_BIND_FUNC(proto, "remove_sink", ResourceImpl::remove_sink);
409 MAA_BIND_FUNC(proto, "clear_sinks", ResourceImpl::clear_sinks);
410 MAA_BIND_FUNC(proto, "register_custom_recognition", ResourceImpl::register_custom_recognition);
411 MAA_BIND_FUNC(proto, "unregister_custom_recognition", ResourceImpl::unregister_custom_recognition);
412 MAA_BIND_FUNC(proto, "clear_custom_recognition", ResourceImpl::clear_custom_recognition);
413 MAA_BIND_FUNC(proto, "register_custom_action", ResourceImpl::register_custom_action);
414 MAA_BIND_FUNC(proto, "unregister_custom_action", ResourceImpl::unregister_custom_action);
415 MAA_BIND_FUNC(proto, "clear_custom_action", ResourceImpl::clear_custom_action);
416 MAA_BIND_FUNC(proto, "post_bundle", ResourceImpl::post_bundle);
417 MAA_BIND_FUNC(proto, "post_ocr_model", ResourceImpl::post_ocr_model);
418 MAA_BIND_FUNC(proto, "post_pipeline", ResourceImpl::post_pipeline);
419 MAA_BIND_FUNC(proto, "post_image", ResourceImpl::post_image);
420 MAA_BIND_SETTER(proto, "inference_device", ResourceImpl::set_inference_device);
421 MAA_BIND_SETTER(proto, "inference_execution_provider", ResourceImpl::set_inference_execution_provider);
422 MAA_BIND_FUNC(proto, "override_pipeline", ResourceImpl::override_pipeline);
423 MAA_BIND_FUNC(proto, "override_next", ResourceImpl::override_next);
424 MAA_BIND_FUNC(proto, "override_image", ResourceImpl::override_image);
425 MAA_BIND_FUNC(proto, "get_node_data", ResourceImpl::get_node_data);
426 MAA_BIND_FUNC(proto, "get_node_data_parsed", ResourceImpl::get_node_data_parsed);
427 MAA_BIND_FUNC(proto, "get_default_recognition_param", ResourceImpl::get_default_recognition_param);
428 MAA_BIND_FUNC(proto, "get_default_action_param", ResourceImpl::get_default_action_param);
429 MAA_BIND_FUNC(proto, "clear", ResourceImpl::clear);
430 MAA_BIND_FUNC(proto, "status", ResourceImpl::status);
431 MAA_BIND_FUNC(proto, "wait", ResourceImpl::wait);
432 MAA_BIND_GETTER(proto, "loaded", ResourceImpl::get_loaded);
433 MAA_BIND_GETTER(proto, "hash", ResourceImpl::get_hash);
434 MAA_BIND_GETTER(proto, "node_list", ResourceImpl::get_node_list);
435 MAA_BIND_GETTER(proto, "custom_recognition_list", ResourceImpl::get_custom_recognition_list);
436 MAA_BIND_GETTER(proto, "custom_action_list", ResourceImpl::get_custom_action_list);
437}
438
439maajs::ValueType load_resource(maajs::EnvType env)
440{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected