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

Method AddContainerCallBack

src/plugin/kernel/src/AFCKernelModule.cpp:483–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483bool AFCKernelModule::AddContainerCallBack(
484 const std::string& class_name, const uint32_t index, CONTAINER_EVENT_FUNCTOR&& cb, const int32_t prio)
485{
486 auto pClassMeta = m_pClassModule->FindMeta(class_name);
487 ARK_ASSERT_RET_VAL(pClassMeta != nullptr, false);
488
489 auto pContainerMeta = pClassMeta->FindContainerMeta(index);
490 ARK_ASSERT_RET_VAL(pContainerMeta != nullptr, false);
491
492 auto pCallBack = pClassMeta->GetClassCallBackManager();
493 ARK_ASSERT_RET_VAL(pCallBack != nullptr, false);
494
495 pCallBack->AddContainerCallBack(index, std::forward<CONTAINER_EVENT_FUNCTOR>(cb), prio);
496
497 return true;
498}
499
500bool AFCKernelModule::AddCommonContainerCallBack(CONTAINER_EVENT_FUNCTOR&& cb, const int32_t prio)
501{

Callers 1

ContainerCallBackTestMethod · 0.45

Calls 3

FindContainerMetaMethod · 0.80
FindMetaMethod · 0.45

Tested by

no test coverage detected