com.alibaba.fastffi.stdcxx.StdVectorLite_cxx_0x2128e224 Maven / Gradle / Ivy
The newest version!
package com.alibaba.fastffi.stdcxx;
import com.alibaba.fastffi.CXXOperator;
import com.alibaba.fastffi.CXXReference;
import com.alibaba.fastffi.FFIForeignType;
import com.alibaba.fastffi.FFIPointerImpl;
import com.alibaba.fastffi.FFISynthetic;
import com.alibaba.fastffi.FFITypeFactory;
import com.alibaba.fastffi.clang.ASTUnit;
import java.lang.Object;
import java.lang.String;
import java.lang.UnsatisfiedLinkError;
@FFIForeignType(
value = "std::vector>",
factory = StdVectorLite_cxx_0x2128e224Factory.class
)
@FFISynthetic("com.alibaba.fastffi.stdcxx.StdVectorLite")
public class StdVectorLite_cxx_0x2128e224 extends FFIPointerImpl implements StdVectorLite> {
public static final int SIZE;
public static final int HASH_SHIFT;
static {
try {
System.loadLibrary("llvm4jni");
} catch (UnsatisfiedLinkError e) {
System.load(FFITypeFactory.findNativeLibrary(StdVectorLite_cxx_0x2128e224.class, "llvm4jni"));
}
}
static {
SIZE = _elementSize$$$();
assert SIZE > 0;
HASH_SHIFT = 31 - Integer.numberOfLeadingZeros(1 + SIZE);
assert HASH_SHIFT > 0;
}
public StdVectorLite_cxx_0x2128e224(final long address) {
super(address);
}
private static final native int _elementSize$$$();
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
StdVectorLite_cxx_0x2128e224 that = (StdVectorLite_cxx_0x2128e224) o;
return this.address == that.address;
}
public int hashCode() {
return (int) (address >> HASH_SHIFT);
}
public String toString() {
return getClass().getName() + "@" + Long.toHexString(address);
}
@CXXOperator("delete")
public void delete() {
nativeDelete(address);
}
@CXXOperator("delete")
public static native void nativeDelete(long ptr);
@CXXOperator("[]")
@CXXReference
public UniquePtr get(int index) {
long ret$ = nativeGet(address, index); return (new com.alibaba.fastffi.stdcxx.UniquePtr_cxx_0xcf30570(ret$));
}
@CXXOperator("[]")
@CXXReference
public static native long nativeGet(long ptr, int index0);
public StdVectorLite.Factory> getFactory() {
return StdVectorLite_cxx_0x2128e224Factory.INSTANCE;
}
public long size() {
return nativeSize(address);
}
public static native long nativeSize(long ptr);
public static native long nativeCreateFactory0();
}