Skip to content

InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/DriverDescription.java

Packages

Name
com.inscoper.api

Classes

Name
class com.inscoper.api.DriverDescription
DriverDescription base class.

Source code

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.3.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.inscoper.api;
import com.inscoper.api.logging.*;

public class DriverDescription {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected DriverDescription(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(DriverDescription obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        InscoperJNI.delete_DriverDescription(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static DriverDescription createProxy(long cPtr, boolean cMemoryOwn) {
    if (cPtr == 0) return null;
    DriverDescription tmp = new DriverDescription(cPtr, false);
    int type = tmp.getRealType();
    switch(type) {
         case 1: return new CustomDriverDescription(cPtr, cMemoryOwn);   case 2: return new MicroManagerDriverDescription(cPtr, cMemoryOwn);   case 3: return new ExternalDriverDescription(cPtr, cMemoryOwn);   case 4: return new InscoperBoxDriverDescription(cPtr, cMemoryOwn); 
        default: return new DriverDescription(cPtr, cMemoryOwn);
    }
  }

  { }

  public EDriverType getDriverType() {
    return EDriverType.swigToEnum(InscoperJNI.DriverDescription_getDriverType(swigCPtr, this));
  }

  public boolean isEqual(DriverDescription other) {
    return InscoperJNI.DriverDescription_isEqual(swigCPtr, this, DriverDescription.getCPtr(other), other);
  }

  public static CustomDriverDescription castToCustomDriverDescription(DriverDescription driverDescription) {
    long cPtr = InscoperJNI.DriverDescription_castToCustomDriverDescription(DriverDescription.getCPtr(driverDescription), driverDescription);
    return (cPtr == 0) ? null : new CustomDriverDescription(cPtr, true);
  }

  public static InscoperBoxDriverDescription castToInscoperBoxDriverDescription(DriverDescription driverDescription) {
    long cPtr = InscoperJNI.DriverDescription_castToInscoperBoxDriverDescription(DriverDescription.getCPtr(driverDescription), driverDescription);
    return (cPtr == 0) ? null : new InscoperBoxDriverDescription(cPtr, true);
  }

  public static MicroManagerDriverDescription castToMicroManagerDriverDescription(DriverDescription driverDescription) {
    long cPtr = InscoperJNI.DriverDescription_castToMicroManagerDriverDescription(DriverDescription.getCPtr(driverDescription), driverDescription);
    return (cPtr == 0) ? null : new MicroManagerDriverDescription(cPtr, true);
  }

  public static ExternalDriverDescription castToExternalDriverDescription(DriverDescription driverDescription) {
    long cPtr = InscoperJNI.DriverDescription_castToExternalDriverDescription(DriverDescription.getCPtr(driverDescription), driverDescription);
    return (cPtr == 0) ? null : new ExternalDriverDescription(cPtr, true);
  }

  public int getRealType() {
    return InscoperJNI.DriverDescription_getRealType(swigCPtr, this);
  }

}

Updated on 2026-09-03 at 12:14:19 +0200