public static UtilMap <ParsedDataMap, ParsedDataMap> RestoreEmbedded( string utlMapName, SaveInfo info, ref ByteStreamReader bsr, string?keyMapName, string?valMapName) { object?[] customParams = { EMBEDDED, null, keyMapName, EMBEDDED, null, valMapName }; TypeDesc utlMapDesc = new TypeDesc(utlMapName, DescFlags.FTYPEDESC_SAVE, Restore, customParams); return(UtilMap <ParsedDataMap, ParsedDataMap> .Restore(utlMapDesc, info, ref bsr)); }
public static UtilMap <TK, ParsedDataMap> RestoreEmbeddedValue( string utlMapName, SaveInfo info, ref ByteStreamReader bsr, string?valMapName, FieldType keyType, CustomReadFunc?keyReadFunc = null) { object?[] customParams = { keyType, keyReadFunc, null, EMBEDDED, null, valMapName }; TypeDesc utlMapDesc = new TypeDesc(utlMapName, DescFlags.FTYPEDESC_SAVE, Restore, customParams); return(UtilMap <TK, ParsedDataMap> .Restore(utlMapDesc, info, ref bsr)); }
// this was confusing but convenient for UtilVector, but here it's really stupid public static UtilMap <ParsedDataMap, TV> RestoreEmbeddedKey( string utlMapName, SaveInfo info, ref ByteStreamReader bsr, string?keyMapName, FieldType valType, CustomReadFunc?valReadFunc = null) { object?[] customParams = { EMBEDDED, null, keyMapName, valType, valReadFunc, null }; TypeDesc utlMapDesc = new TypeDesc(utlMapName, DescFlags.FTYPEDESC_SAVE, Restore, customParams); return(UtilMap <ParsedDataMap, TV> .Restore(utlMapDesc, info, ref bsr)); }