MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / AddNodeCallBack

Method AddNodeCallBack

src/plugin/kernel/src/AFCKernelModule.cpp:415–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415bool AFCKernelModule::AddNodeCallBack(
416 const std::string& class_name, const std::string& name, DATA_NODE_EVENT_FUNCTOR&& cb, const int32_t prio)
417{
418 auto pClassMeta = m_pClassModule->FindMeta(class_name);
419 ARK_ASSERT_RET_VAL(pClassMeta != nullptr, false);
420
421 auto index = pClassMeta->GetIndex(name);
422 if (index == 0)
423 {
424 return false;
425 }
426
427 AddNodeCallBack(class_name, index, std::forward<DATA_NODE_EVENT_FUNCTOR>(cb), prio);
428
429 return true;
430}
431
432bool AFCKernelModule::AddTableCallBack(
433 const std::string& class_name, const std::string& name, DATA_TABLE_EVENT_FUNCTOR&& cb, const int32_t prio)

Callers 1

DataCallBackTestMethod · 0.45

Calls 5

FindDataMetaMethod · 0.80
AddDataCallBackMethod · 0.80
FindMetaMethod · 0.45
GetIndexMethod · 0.45

Tested by

no test coverage detected