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

Method DBDataToContainer

src/plugin/kernel/src/AFCKernelModule.cpp:1594–1621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1592}
1593
1594bool AFCKernelModule::DBDataToContainer(
1595 std::shared_ptr<AFIEntity> pEntity, const std::string& name, const AFMsg::pb_db_container& pb_data)
1596{
1597 auto pContainer = pEntity->FindContainer(name);
1598 if (nullptr == pContainer)
1599 {
1600 return false;
1601 }
1602
1603 auto pCContainer = std::dynamic_pointer_cast<AFCContainer>(pContainer);
1604 if (nullptr == pCContainer)
1605 {
1606 return false;
1607 }
1608
1609 for (auto& iter : pb_data.datas_value())
1610 {
1611 auto pContainerEntity = CreateEntity(iter.second);
1612 if (nullptr == pContainerEntity)
1613 {
1614 continue;
1615 }
1616
1617 pCContainer->InitEntityList(iter.first, pContainerEntity);
1618 }
1619
1620 return true;
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)

Callers

nothing calls this directly

Calls 2

InitEntityListMethod · 0.80
FindContainerMethod · 0.45

Tested by

no test coverage detected