InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/ConnectionConfig.java¶
Packages¶
| Name |
|---|
| com.inscoper.api |
Classes¶
| Name | |
|---|---|
| class | com.inscoper.api.ConnectionConfig Base class for connection configuration. |
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 ConnectionConfig {
private transient long swigCPtr;
private transient boolean swigCMemOwn;
protected ConnectionConfig(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ConnectionConfig 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_ConnectionConfig(swigCPtr);
}
swigCPtr = 0;
}
}
public static ConnectionConfig createProxy(long cPtr, boolean cMemoryOwn) {
if (cPtr == 0) return null;
ConnectionConfig tmp = new ConnectionConfig(cPtr, false);
int type = tmp.getRealType();
switch(type) {
case 1: return new AdvancedConnectionConfig(cPtr, cMemoryOwn); case 2: return new EthernetConnectionConfig(cPtr, cMemoryOwn); case 3: return new USBConnectionConfig(cPtr, cMemoryOwn);
default: return new ConnectionConfig(cPtr, cMemoryOwn);
}
}
{ }
public ConnectionConfig() {
this(InscoperJNI.new_ConnectionConfig__SWIG_0(), true);
}
public ConnectionConfig(short tag) {
this(InscoperJNI.new_ConnectionConfig__SWIG_1(tag), true);
}
public void fromXML(XMLNode connectionNode) throws com.inscoper.api.InscoperException {
InscoperJNI.ConnectionConfig_fromXML(swigCPtr, this, XMLNode.getCPtr(connectionNode), connectionNode);
}
public void toXML(XMLNode xmlParent) throws com.inscoper.api.InscoperException {
InscoperJNI.ConnectionConfig_toXML(swigCPtr, this, XMLNode.getCPtr(xmlParent), xmlParent);
}
public EConnectionType getType() {
return EConnectionType.swigToEnum(InscoperJNI.ConnectionConfig_getType(swigCPtr, this));
}
public int getTag() {
return InscoperJNI.ConnectionConfig_getTag(swigCPtr, this);
}
public void setTag(int tag) {
InscoperJNI.ConnectionConfig_setTag(swigCPtr, this, tag);
}
public static AdvancedConnectionConfig castToAdvancedConnectionConfig(ConnectionConfig connectionConfig) {
long cPtr = InscoperJNI.ConnectionConfig_castToAdvancedConnectionConfig(ConnectionConfig.getCPtr(connectionConfig), connectionConfig);
return (cPtr == 0) ? null : new AdvancedConnectionConfig(cPtr, true);
}
public static USBConnectionConfig castToUSBConnectionConfig(ConnectionConfig connectionConfig) {
long cPtr = InscoperJNI.ConnectionConfig_castToUSBConnectionConfig(ConnectionConfig.getCPtr(connectionConfig), connectionConfig);
return (cPtr == 0) ? null : new USBConnectionConfig(cPtr, true);
}
public static EthernetConnectionConfig castToEthernetConnectionConfig(ConnectionConfig connectionConfig) {
long cPtr = InscoperJNI.ConnectionConfig_castToEthernetConnectionConfig(ConnectionConfig.getCPtr(connectionConfig), connectionConfig);
return (cPtr == 0) ? null : new EthernetConnectionConfig(cPtr, true);
}
public int getRealType() {
return InscoperJNI.ConnectionConfig_getRealType(swigCPtr, this);
}
}
Updated on 2026-09-03 at 12:14:19 +0200