get<M, T> method
Implementation
T get<M, T>({String? name}) {
switch (M) {
case const (SPI):
final x = _spi[T];
if (null == x) {
throw Exception('unknown spi $T');
}
final y = x[name];
if (null == y) {
throw Exception('unknown spi name: $name');
}
return y.first.dft;
case const (MPI):
final x = _mpi[T];
if (null == x) {
throw Exception('unknown trait $T');
}
return x.dft;
default:
throw Exception('unknown macro: $M');
}
}