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

Method DelayTableToPB

src/plugin/kernel/src/AFCKernelModule.cpp:1034–1073  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032}
1033
1034bool AFCKernelModule::DelayTableToPB(
1035 const AFDelaySyncTable& table, const uint32_t index, AFMsg::pb_delay_entity& data, AFMsg::pb_entity_data& pb_entity)
1036{
1037 AFMsg::pb_table pb_table;
1038 AFMsg::delay_clear_row clear_row_list;
1039 for (auto& iter : table.row_list_)
1040 {
1041 AFMsg::pb_entity_data pb_row;
1042
1043 auto row_index = iter.first;
1044 auto& row_data = iter.second;
1045 for (auto& iter_row : row_data.node_list_)
1046 {
1047 auto pNode = iter_row;
1048 if (NodeToPBData(pNode, &pb_row))
1049 {
1050 pb_table.mutable_datas_value()->insert({row_index, pb_row});
1051 }
1052 }
1053
1054 if (row_data.need_clear_)
1055 {
1056 clear_row_list.add_row_list(row_index);
1057 }
1058 }
1059
1060 if (table.need_clear_)
1061 {
1062 data.add_clear_tables(index);
1063 }
1064
1065 if (clear_row_list.row_list_size() > 0)
1066 {
1067 data.mutable_clear_rows()->insert({index, clear_row_list});
1068 }
1069
1070 pb_entity.mutable_datas_table()->insert({index, pb_table});
1071
1072 return true;
1073}
1074
1075bool AFCKernelModule::DelayContainerToPB(std::shared_ptr<AFIEntity> pEntity, const AFDelaySyncContainer& container,
1076 const uint32_t index, AFMsg::pb_delay_entity& data)

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected