| 1888 | } |
| 1889 | |
| 1890 | bool AFCKernelModule::TableToPBData(AFITable* pTable, const uint32_t index, AFMsg::pb_table* pb_data) |
| 1891 | { |
| 1892 | ARK_ASSERT_RET_VAL(pTable != nullptr && index > 0 && pb_data != nullptr, false); |
| 1893 | |
| 1894 | for (AFIRow* pRow = pTable->First(); pRow != nullptr; pRow = pTable->Next()) |
| 1895 | { |
| 1896 | AFMsg::pb_entity_data row_data; |
| 1897 | if (!RowToPBData(pRow, pRow->GetRow(), &row_data)) |
| 1898 | { |
| 1899 | continue; |
| 1900 | } |
| 1901 | |
| 1902 | pb_data->mutable_datas_value()->insert({index, row_data}); |
| 1903 | } |
| 1904 | |
| 1905 | return true; |
| 1906 | } |
| 1907 | |
| 1908 | bool AFCKernelModule::ContainerToPBData(std::shared_ptr<AFIContainer> pContainer, AFMsg::pb_container* pb_data) |
| 1909 | { |