getSimpleCodecs method
match and return the types which are simple and not parametrized
Implementation
Codec? getSimpleCodecs(String simpleCodecs) {
switch (simpleCodecs.toLowerCase()) {
case 'bitvec':
return BitSequenceCodec(BitStore.U8, BitOrder.LSB);
case 'bool':
return BoolCodec.codec;
case 'u8':
return U8Codec.codec;
case 'u16':
return U16Codec.codec;
case 'u32':
return U32Codec.codec;
case 'u64':
return U64Codec.codec;
case 'u128':
return U128Codec.codec;
case 'u256':
return U256Codec.codec;
case 'string':
case 'text':
case 'str':
return StrCodec.codec;
case 'i8':
return I8Codec.codec;
case 'i16':
return I16Codec.codec;
case 'i32':
return I32Codec.codec;
case 'i64':
return I64Codec.codec;
case 'i128':
return I128Codec.codec;
case 'i256':
return I256Codec.codec;
case 'donotconstruct':
throw Exception('Type DoNotConstruct found.');
case 'null':
return NullCodec.codec;
default:
return null;
}
}