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

Method AddTableCallBack

src/plugin/kernel/src/AFCKernelModule.cpp:432–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432bool AFCKernelModule::AddTableCallBack(
433 const std::string& class_name, const std::string& name, DATA_TABLE_EVENT_FUNCTOR&& cb, const int32_t prio)
434{
435 auto pClassMeta = m_pClassModule->FindMeta(class_name);
436 ARK_ASSERT_RET_VAL(pClassMeta != nullptr, false);
437
438 auto index = pClassMeta->GetIndex(name);
439 if (index == 0)
440 {
441 return false;
442 }
443
444 AddTableCallBack(class_name, index, std::forward<DATA_TABLE_EVENT_FUNCTOR>(cb), prio);
445
446 return true;
447}
448
449bool AFCKernelModule::AddNodeCallBack(
450 const std::string& class_name, const uint32_t index, DATA_NODE_EVENT_FUNCTOR&& cb, const int32_t prio)

Callers 1

TableCallBackTestMethod · 0.45

Calls 4

FindTableMetaMethod · 0.80
FindMetaMethod · 0.45
GetIndexMethod · 0.45

Tested by

no test coverage detected