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

Method EntityNodeToPBData

src/plugin/kernel/src/AFCKernelModule.cpp:2040–2070  ·  view source on GitHub ↗

node all to pb data

Source from the content-addressed store, hash-verified

2038
2039//node all to pb data
2040bool AFCKernelModule::EntityNodeToPBData(
2041 std::shared_ptr<AFIEntity> pEntity, AFMsg::pb_entity_data* pb_data, const ArkMaskType mask /* = 0*/)
2042{
2043 ARK_ASSERT_RET_VAL(pEntity != nullptr && pb_data != nullptr, false);
2044
2045 auto pNodeManager = GetNodeManager(pEntity);
2046 ARK_ASSERT_RET_VAL(pNodeManager != nullptr, false);
2047
2048 auto& data_list = pNodeManager->GetDataList();
2049 for (auto& iter : data_list)
2050 {
2051 auto pNode = iter.second;
2052 if (!pNode)
2053 {
2054 continue;
2055 }
2056
2057 if (!mask.none())
2058 {
2059 auto result = (pNode->GetMask() & mask);
2060 if (!result.any())
2061 {
2062 continue;
2063 }
2064 }
2065
2066 NodeToPBData(pNode, pb_data);
2067 }
2068
2069 return true;
2070}
2071
2072bool AFCKernelModule::EntityTableToPBData(
2073 std::shared_ptr<AFIEntity> pEntity, AFMsg::pb_entity_data* pb_data, const ArkMaskType mask /* = 0*/)

Callers 2

OnViewDataNodeEnterMethod · 0.80
OnSelfDataNodeEnterMethod · 0.80

Calls 2

noneMethod · 0.80
GetMaskMethod · 0.45

Tested by

no test coverage detected