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

Method OnTableCallBackEvent

samples/sample3/Sample3Module.cpp:515–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515int Sample3Module::OnTableCallBackEvent(
516 const AFGUID& self, const TABLE_EVENT_DATA& data, const AFIData& old_value, const AFIData& new_value)
517{
518 std::cout << "---------- OnTableCallBackEvent start----------" << std::endl;
519
520 if (data.op_type_ == (size_t)ArkTableOpType::TABLE_ADD)
521 {
522 std::cout << "table name: " << data.table_name_ << " row : " << data.row_ << std::endl;
523 }
524 else
525 {
526 std::cout << "table name: " << data.table_name_ << " row : " << data.row_
527 << " data index : " << data.data_index_ << " old value : " << old_value.ToString()
528 << " new value : " << new_value.ToString() << std::endl;
529 }
530
531 std::cout << "---------- OnTableCallBackEvent end----------" << std::endl;
532
533 return 0;
534}
535
536int Sample3Module::OnContainerCallBackEvent(const AFGUID& self, const uint32_t index, const ArkContainerOpType op_type,
537 const uint32_t src_index, const uint32_t dest_index)

Callers

nothing calls this directly

Calls 1

ToStringMethod · 0.45

Tested by

no test coverage detected