htFetch method

dynamic htFetch(
  1. String varName
)

Implementation

dynamic htFetch(String varName) {
  switch (varName) {
    case 'modPow':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          modPow(positionalArgs[0], positionalArgs[1]);
    case 'modInverse':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          modInverse(positionalArgs[0]);
    case 'gcd':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          gcd(positionalArgs[0]);
    case 'isEven':
      return isEven;
    case 'isOdd':
      return isOdd;
    case 'bitLength':
      return bitLength;
    case 'toUnsigned':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          toUnsigned(positionalArgs[0]);
    case 'toSigned':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          toSigned(positionalArgs[0]);
    case 'toRadixString':
      return (HTEntity entity,
              {List<dynamic> positionalArgs = const [],
              Map<String, dynamic> namedArgs = const {},
              List<HTType> typeArgs = const []}) =>
          toRadixString(positionalArgs[0]);
    default:
      // ignore: unnecessary_cast
      return (this as num).htFetch(varName);
  }
}