| 156 | } |
| 157 | |
| 158 | bool AFClassCallBackManager::OnTableCallBack(const AFGUID& self, const ArkMaskType mask, AFINode* pNode, |
| 159 | const TABLE_EVENT_DATA& event_data, const AFIData& old_data, const AFIData& new_data) |
| 160 | { |
| 161 | // sync call back |
| 162 | if (mask.test((size_t)ArkDataMask::PF_REAL_TIME)) |
| 163 | { |
| 164 | for (auto& iter : table_sync_call_back_list_) |
| 165 | { |
| 166 | auto mask_value = iter.first; |
| 167 | if (!mask.test((size_t)mask_value)) |
| 168 | { |
| 169 | continue; |
| 170 | } |
| 171 | |
| 172 | iter.second(self, event_data, mask_value, new_data); |
| 173 | } |
| 174 | } |
| 175 | else |
| 176 | { |
| 177 | UpdateDelayTableList( |
| 178 | self, mask, event_data.table_index_, event_data.row_, (ArkTableOpType)event_data.op_type_, pNode); |
| 179 | } |
| 180 | |
| 181 | // common call back |
| 182 | auto iter_call_backs = table_call_backs_list_.find(event_data.table_index_); |
| 183 | if (iter_call_backs != table_call_backs_list_.end()) |
| 184 | { |
| 185 | for (auto& iter : iter_call_backs->second) |
| 186 | { |
| 187 | iter.second(self, event_data, old_data, new_data); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | return true; |
| 192 | } |
| 193 | |
| 194 | bool AFClassCallBackManager::OnContainerCallBack(const AFGUID& self, const uint32_t index, const ArkMaskType mask, |
| 195 | const ArkContainerOpType op_type, uint32_t src_index, uint32_t dest_index, |