| 573 | } |
| 574 | |
| 575 | int CScriptRMI::SerializeFunction(IFunctionHandler* pH, void* pBuffer, int nSize) |
| 576 | { |
| 577 | SmartScriptTable serTable; |
| 578 | ScriptHandle hdl; |
| 579 | pH->GetParam(1, serTable); |
| 580 | pH->GetParam(2, hdl); |
| 581 | SSerializeFunctionParams* p = (SSerializeFunctionParams*) hdl.ptr; |
| 582 | |
| 583 | SSynchedPropertyInfo* pInfo = (SSynchedPropertyInfo*) pBuffer; |
| 584 | int nProperties = nSize / sizeof(SSynchedPropertyInfo); |
| 585 | |
| 586 | if (p->ser.IsReading()) |
| 587 | { |
| 588 | for (int i = 0; i < nProperties; i++) |
| 589 | if (!m_pThis->ReadValue(pInfo[i].name, pInfo[i].type, p->ser, serTable.GetPtr())) |
| 590 | return pH->EndFunction(false); |
| 591 | } |
| 592 | else |
| 593 | { |
| 594 | for (int i = 0; i < nProperties; i++) |
| 595 | if (!m_pThis->WriteValue(pInfo[i].name, pInfo[i].type, p->ser, serTable.GetPtr())) |
| 596 | return pH->EndFunction(false); |
| 597 | } |
| 598 | return pH->EndFunction(true); |
| 599 | } |
| 600 | |
| 601 | // one-time validation of entity tables |
| 602 | bool CScriptRMI::ValidateDispatchTable(const char* clazz, SmartScriptTable dispatch, SmartScriptTable methods, bool bServerTable) |
nothing calls this directly
no test coverage detected