5
System.loadLibrary("example");
6
} catch (UnsatisfiedLinkError e) {
7
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
12
public static void main(String argv[])
14
// Print out the value of some enums
15
System.out.println("*** color ***");
16
System.out.println(" " + color.RED + " = " + color.RED.swigValue());
17
System.out.println(" " + color.BLUE + " = " + color.BLUE.swigValue());
18
System.out.println(" " + color.GREEN + " = " + color.GREEN.swigValue());
20
System.out.println("\n*** Foo::speed ***");
21
System.out.println(" Foo::" + Foo.speed.IMPULSE + " = " + Foo.speed.IMPULSE.swigValue());
22
System.out.println(" Foo::" + Foo.speed.WARP + " = " + Foo.speed.WARP.swigValue());
23
System.out.println(" Foo::" + Foo.speed.LUDICROUS + " = " + Foo.speed.LUDICROUS.swigValue());
25
System.out.println("\nTesting use of enums with functions\n");
27
example.enum_test(color.RED, Foo.speed.IMPULSE);
28
example.enum_test(color.BLUE, Foo.speed.WARP);
29
example.enum_test(color.GREEN, Foo.speed.LUDICROUS);
31
System.out.println( "\nTesting use of enum with class method" );
34
f.enum_test(Foo.speed.IMPULSE);
35
f.enum_test(Foo.speed.WARP);
36
f.enum_test(Foo.speed.LUDICROUS);