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

Method OnContainerCallBack

src/plugin/kernel/src/AFCKernelModule.cpp:1623–1642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1621}
1622
1623int AFCKernelModule::OnContainerCallBack(const AFGUID& self, const uint32_t index, const ArkContainerOpType op_type,
1624 const uint32_t src_index, const uint32_t dest_index)
1625{
1626 if (op_type == ArkContainerOpType::OP_DESTROY)
1627 {
1628 // destroy entity
1629 auto pEntity = GetEntity(self);
1630 ARK_ASSERT_RET_VAL(pEntity != nullptr, 0);
1631
1632 auto pContainer = pEntity->FindContainer(index);
1633 ARK_ASSERT_RET_VAL(pContainer != nullptr, 0);
1634
1635 auto pContainerEntity = pContainer->Find(src_index);
1636 ARK_ASSERT_RET_VAL(pContainerEntity != nullptr, 0);
1637
1638 InnerDestroyEntity(pContainerEntity);
1639 }
1640
1641 return 0;
1642}
1643
1644bool AFCKernelModule::DBDataToNode(
1645 std::shared_ptr<AFNodeManager> pNodeManager, const AFMsg::pb_db_entity_data& pb_db_entity_data)

Callers 4

OnContainerPlaceMethod · 0.45
OnContainerSwapMethod · 0.45
OnContainerRemoveMethod · 0.45
OnContainerDestroyMethod · 0.45

Calls 2

FindContainerMethod · 0.45
FindMethod · 0.45

Tested by

no test coverage detected