org.robovm.llvm.binding.ValueRefArray Maven / Gradle / Ivy
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.4
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.robovm.llvm.binding;
public class ValueRefArray {
private long swigCPtr;
protected boolean swigCMemOwn;
protected ValueRefArray(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(ValueRefArray obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
LLVMJNI.delete_ValueRefArray(swigCPtr);
}
swigCPtr = 0;
}
}
public void setValue(ValueRef value) {
LLVMJNI.ValueRefArray_value_set(swigCPtr, this, ValueRef.getCPtr(value));
}
public ValueRef getValue() {
long cPtr = LLVMJNI.ValueRefArray_value_get(swigCPtr, this);
return (cPtr == 0) ? null : new ValueRef(cPtr, false);
}
public ValueRefArray(int nelements) {
this(LLVMJNI.new_ValueRefArray(nelements), true);
}
public ValueRef get(int index) {
long cPtr = LLVMJNI.ValueRefArray_get(swigCPtr, this, index);
return (cPtr == 0) ? null : new ValueRef(cPtr, false);
}
public void set(int index, ValueRef value) {
LLVMJNI.ValueRefArray_set(swigCPtr, this, index, ValueRef.getCPtr(value));
}
}