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

Method TableCallBackTest

samples/sample3/Sample3Module.cpp:190–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190void Sample3Module::TableCallBackTest()
191{
192 std::cout << GET_CLASS_NAME(Sample3Module) << ", TableTest" << std::endl;
193
194 m_pKernelModule->AddTableCallBack(
195 AFEntityMetaPlayer::self_name(), AFEntityMetaPlayer::items(), this, &Sample3Module::OnTableCallBackEvent);
196
197 auto pEntity = CreateAnPlayerAndInit();
198 ARK_ASSERT_RET_NONE(pEntity != nullptr);
199
200 AFITable* pTable = pEntity->FindTable(RECORD_NAME);
201 ARK_ASSERT_RET_NONE(pTable != nullptr);
202
203 auto pRowData = pTable->AddRow(0);
204 ARK_ASSERT_RET_NONE(pRowData != nullptr);
205
206 pRowData->SetInt32(col_count, 22);
207
208 pRowData->SetInt32(col_count, 33);
209}
210
211void Sample3Module::ContainerCallBackTest()
212{

Callers

nothing calls this directly

Calls 4

AddRowMethod · 0.80
AddTableCallBackMethod · 0.45
FindTableMethod · 0.45
SetInt32Method · 0.45

Tested by

no test coverage detected