* Create a property descriptor */
| 1458 | * Create a property descriptor |
| 1459 | */ |
| 1460 | FPropertyDesc* FPropertyDesc::Create(FProperty *InProperty) |
| 1461 | { |
| 1462 | // #lizard forgives |
| 1463 | |
| 1464 | FPropertyDesc* PropertyDesc = nullptr; |
| 1465 | int32 Type = ::GetPropertyType(InProperty); |
| 1466 | switch (Type) |
| 1467 | { |
| 1468 | case CPT_Byte: |
| 1469 | { |
| 1470 | const FByteProperty* TempByteProperty = CastField<FByteProperty>(InProperty); |
| 1471 | if (TempByteProperty->Enum) |
| 1472 | { |
| 1473 | } |
| 1474 | } |
| 1475 | case CPT_Int8: |
| 1476 | case CPT_Int16: |
| 1477 | case CPT_Int: |
| 1478 | case CPT_Int64: |
| 1479 | case CPT_UInt16: |
| 1480 | case CPT_UInt32: |
| 1481 | case CPT_UInt64: |
| 1482 | { |
| 1483 | PropertyDesc = new FIntegerPropertyDesc(InProperty); |
| 1484 | break; |
| 1485 | } |
| 1486 | case CPT_Float: |
| 1487 | case CPT_Double: |
| 1488 | { |
| 1489 | PropertyDesc = new FFloatPropertyDesc(InProperty); |
| 1490 | break; |
| 1491 | } |
| 1492 | case CPT_Enum: |
| 1493 | { |
| 1494 | PropertyDesc = new FEnumPropertyDesc(InProperty); |
| 1495 | break; |
| 1496 | } |
| 1497 | case CPT_Bool: |
| 1498 | { |
| 1499 | PropertyDesc = new FBoolPropertyDesc(InProperty); |
| 1500 | break; |
| 1501 | } |
| 1502 | case CPT_ObjectReference: |
| 1503 | case CPT_WeakObjectReference: |
| 1504 | case CPT_LazyObjectReference: |
| 1505 | { |
| 1506 | PropertyDesc = new FObjectPropertyDesc(InProperty, false); |
| 1507 | break; |
| 1508 | } |
| 1509 | case CPT_SoftObjectReference: |
| 1510 | { |
| 1511 | PropertyDesc = new FSoftObjectPropertyDesc(InProperty); |
| 1512 | //PropertyDesc = new FObjectPropertyDesc(InProperty, true); |
| 1513 | break; |
| 1514 | } |
| 1515 | case CPT_Interface: |
| 1516 | { |
| 1517 | PropertyDesc = new FInterfacePropertyDesc(InProperty); |
no test coverage detected