toInt method Null safety

int toInt()

Return an integer.

Implementation

int toInt() {
  switch (this) {
    case ObjectType.context:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_CONTEXT;
    case ObjectType.buffer:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_BUFFER;
    case ObjectType.bufferGenerator:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_BUFFER_GENERATOR;
    case ObjectType.streamingGenerator:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_STREAMING_GENERATOR;
    case ObjectType.noiseGenerator:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_NOISE_GENERATOR;
    case ObjectType.directSource:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_DIRECT_SOURCE;
    case ObjectType.angularPannedSource:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_ANGULAR_PANNED_SOURCE;
    case ObjectType.scalarPannedSource:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_SCALAR_PANNED_SOURCE;
    case ObjectType.source3d:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_SOURCE_3D;
    case ObjectType.globalEcho:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_GLOBAL_ECHO;
    case ObjectType.globalFdnReverb:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_GLOBAL_FDN_REVERB;
    case ObjectType.streamHandle:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_STREAM_HANDLE;
    case ObjectType.automationBatch:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_AUTOMATION_BATCH;
    case ObjectType.fastSineBankGenerator:
      return SYZ_OBJECT_TYPE.SYZ_OTYPE_FAST_SINE_BANK_GENERATOR;
  }
}