Skip to content

Instantly share code, notes, and snippets.

@AndrewTheTM
Created October 8, 2012 12:42
Show Gist options
  • Save AndrewTheTM/3852316 to your computer and use it in GitHub Desktop.
Save AndrewTheTM/3852316 to your computer and use it in GitHub Desktop.
Path Reader DLL Interface
public interface voyagerDLL extends Library{
voyagerDLL INSTANCE=(voyagerDLL) Native.loadLibrary("VoyagerFileAccess",voyagerDLL.class);
Pointer PathReaderOpen(String filename, String errMsg, int errBL);
void PathReaderClose(Pointer state);
int PathReaderGetTableNames(Pointer state, String[] names);
int PathReaderGetNumZones(Pointer state);
int PathReaderGetNumTables(Pointer state);
int PathReaderGetNumIterations(Pointer state);
int PathReaderGetHighestVol(Pointer state);
int PathReaderGetMaxPathLen(Pointer state);
int PathReaderGetNumPaths(Pointer state);
int PathReaderReadNext(Pointer state, PathRead_Data pathData);
void PathReaderRewind(Pointer state);
public class PathRead_Data extends Structure<PathRead_Data, PathRead_Data.ByValue, PathRead_Data.ByReference > {
public PointerByReference nodes;
public PointerByReference costs;
public PointerByReference vols;
public int numNodes;
public int numCosts;
public int highestVol;
public int iteration;
public int I;
public int J;
public int table;
public PathRead_Data() {
super();
initFieldOrder();
}
protected void initFieldOrder() {
setFieldOrder(new String[]{"nodes", "costs", "vols", "numNodes", "numCosts", "highestVol", "iteration", "I", "J", "table"});
}
protected ByReference newByReference() { return new ByReference(); }
protected ByValue newByValue() { return new ByValue(); }
protected PathRead_Data newInstance() { return new PathRead_Data(); }
public static PathRead_Data[] newArray(int arrayLength) {
return Structure.newArray(PathRead_Data.class, arrayLength);
}
public static class ByReference extends PathRead_Data implements Structure.ByReference {
};
public static class ByValue extends PathRead_Data implements Structure.ByValue {
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment