PageRenderTime 26ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/java/template_default_class_parms_typedef_runme.java

#
Java | 86 lines | 75 code | 11 blank | 0 comment | 0 complexity | 9dc07404fb4d1a49831b67d0811d142a MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import template_default_class_parms_typedef.*;
  2. public class template_default_class_parms_typedef_runme {
  3. static {
  4. try {
  5. System.loadLibrary("template_default_class_parms_typedef");
  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);
  8. System.exit(1);
  9. }
  10. }
  11. public static void main(String argv[]) {
  12. {
  13. DefaultBar bar = new DefaultBar(20.0, new SomeType(), 10);
  14. double d = bar.getCType();
  15. bar.setCType(d);
  16. SomeType s = bar.getDType();
  17. bar.setDType(s);
  18. int i = bar.getEType();
  19. bar.setEType(i);
  20. d = bar.method(d, s, i);
  21. d = bar.method_1(d, s, i);
  22. d = bar.method_2(d, s, i);
  23. d = bar.method_3(d, s, i);
  24. bar = new DefaultBar(true, 20.0, new SomeType(), 10);
  25. bar = new DefaultBar(true, true, 20.0, new SomeType(), 10);
  26. bar = new DefaultBar(true, true, true, 20.0, new SomeType(), 10);
  27. }
  28. {
  29. DefaultFoo foo = new DefaultFoo(new SomeType());
  30. SomeType s = foo.getTType();
  31. s = foo.method(s);
  32. s = foo.method_A(s);
  33. s = foo.method_B(s);
  34. s = foo.method_C(s);
  35. foo = new DefaultFoo(new SomeType(), new SomeType());
  36. foo = new DefaultFoo(new SomeType(), new SomeType(), new SomeType());
  37. foo = new DefaultFoo(new SomeType(), new SomeType(), new SomeType(), new SomeType());
  38. }
  39. {
  40. BarAnotherTypeBool bar = new BarAnotherTypeBool(new AnotherType(), true, 10);
  41. AnotherType a = bar.getCType();
  42. bar.setCType(a);
  43. boolean b = bar.getDType();
  44. bar.setDType(b);
  45. int i = bar.getEType();
  46. bar.setEType(i);
  47. a = bar.method(a, b, i);
  48. a = bar.method_1(a, b, i);
  49. a = bar.method_2(a, b, i);
  50. a = bar.method_3(a, b, i);
  51. bar = new BarAnotherTypeBool(true, new AnotherType(), true, 10);
  52. bar = new BarAnotherTypeBool(true, true, new AnotherType(), true, 10);
  53. bar = new BarAnotherTypeBool(true, true, true, new AnotherType(), true, 10);
  54. }
  55. {
  56. FooAnotherType foo = new FooAnotherType(new AnotherType());
  57. AnotherType a = foo.getTType();
  58. foo.setTType(a);
  59. a = foo.method(a);
  60. a = foo.method_A(a);
  61. a = foo.method_B(a);
  62. a = foo.method_C(a);
  63. foo = new FooAnotherType(new AnotherType(), new AnotherType());
  64. foo = new FooAnotherType(new AnotherType(), new AnotherType(), new AnotherType());
  65. foo = new FooAnotherType(new AnotherType(), new AnotherType(), new AnotherType(), new AnotherType());
  66. }
  67. {
  68. UsesBarDouble u = new UsesBarDouble();
  69. u.use_A(10.1, new SomeType(), 10);
  70. u.use_B(10.1, new SomeType(), 10);
  71. u.use_C(10.1, new SomeType(), 10);
  72. u.use_D(10.1, new SomeType(), 10);
  73. }
  74. }
  75. }