| 440 | // |
| 441 | |
| 442 | bool CScriptSerialize::ReadValue(const char* name, EScriptSerializeType type, TSerialize ser, IScriptTable* pTable) |
| 443 | { |
| 444 | switch (type) |
| 445 | { |
| 446 | case eSST_Bool: |
| 447 | { |
| 448 | bool temp; |
| 449 | ser.Value(name, temp /*, 'bool'*/); |
| 450 | pTable->SetValue(name, temp); |
| 451 | } |
| 452 | break; |
| 453 | case eSST_Float: |
| 454 | { |
| 455 | float temp; |
| 456 | ser.Value(name, temp); |
| 457 | pTable->SetValue(name, temp); |
| 458 | } |
| 459 | break; |
| 460 | case eSST_Int8: |
| 461 | { |
| 462 | int8 temp; |
| 463 | ser.Value(name, temp, 'i8'); |
| 464 | pTable->SetValue(name, (int)temp); |
| 465 | } |
| 466 | break; |
| 467 | case eSST_Int16: |
| 468 | { |
| 469 | int16 temp; |
| 470 | ser.Value(name, temp, 'i16'); |
| 471 | pTable->SetValue(name, (int)temp); |
| 472 | } |
| 473 | break; |
| 474 | case eSST_Int32: |
| 475 | { |
| 476 | int32 temp; |
| 477 | ser.Value(name, temp, 'i32'); |
| 478 | pTable->SetValue(name, (int)temp); |
| 479 | } |
| 480 | break; |
| 481 | case eSST_String: |
| 482 | { |
| 483 | ser.Value(name, m_tempString); |
| 484 | pTable->SetValue(name, m_tempString.c_str()); |
| 485 | } |
| 486 | break; |
| 487 | case eSST_StringTable: |
| 488 | { |
| 489 | ser.Value(name, m_tempString, 'stab'); |
| 490 | pTable->SetValue(name, m_tempString.c_str()); |
| 491 | } |
| 492 | break; |
| 493 | case eSST_EntityId: |
| 494 | { |
| 495 | EntityId id; |
| 496 | ScriptHandle hdl; |
| 497 | ser.Value(name, id, 'eid'); |
| 498 | hdl.n = id; |
| 499 | pTable->SetValue(name, hdl); |
no test coverage detected