MCPcopy Create free account
hub / github.com/BobbyAnguelov/Esoterica / ReadTypeFromString

Function ReadTypeFromString

Code/Base/Serialization/TypeSerialization.cpp:519–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517 return nullptr;
518 }
519
520 TypeID const typeID( typeAttr.as_string() );
521 auto const pTypeInfo = typeRegistry.GetTypeInfo( typeID );
522 if ( pTypeInfo == nullptr )
523 {
524 log.LogError( "Unknown type encountered: %s", typeID.c_str() );
525 return nullptr;
526 }
527
528 IReflectedType* pTypeInstance = pTypeInfo->CreateType();
529
530 if ( !ReadType( typeRegistry, log, node, pTypeInstance ) )
531 {
532 EE::Delete( pTypeInstance );
533 return nullptr;
534 }
535
536 return pTypeInstance;
537 }
538

Callers 2

UndoMethod · 0.85
RedoMethod · 0.85

Calls 6

ReadXmlFromStringFunction · 0.85
ResetTypeMethod · 0.80
first_childMethod · 0.80
ReadTypeFunction · 0.70
emptyMethod · 0.45
GetTypeInfoMethod · 0.45

Tested by

no test coverage detected