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

Method ContainerToPBData

src/plugin/kernel/src/AFCKernelModule.cpp:1908–1930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1906}
1907
1908bool AFCKernelModule::ContainerToPBData(std::shared_ptr<AFIContainer> pContainer, AFMsg::pb_container* pb_data)
1909{
1910 ARK_ASSERT_RET_VAL(pContainer != nullptr && pb_data != nullptr, false);
1911
1912 for (auto index = pContainer->First(); index > 0; index = pContainer->Next())
1913 {
1914 auto pEntity = pContainer->Find(index);
1915 if (nullptr == pEntity)
1916 {
1917 continue;
1918 }
1919
1920 AFMsg::pb_entity pb_entity;
1921 if (!EntityToPBData(pEntity, &pb_entity))
1922 {
1923 continue;
1924 }
1925
1926 pb_data->mutable_datas_value()->insert({index, pb_entity});
1927 }
1928
1929 return true;
1930}
1931
1932bool AFCKernelModule::RowToPBData(AFIRow* pRow, const uint32_t index, AFMsg::pb_entity_data* pb_data)
1933{

Callers

nothing calls this directly

Calls 4

FirstMethod · 0.45
NextMethod · 0.45
FindMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected