~ubuntu-branches/ubuntu/oneiric/swig1.3/oneiric

« back to all changes in this revision

Viewing changes to Examples/test-suite/java/template_methods_runme.java

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-12-06 10:27:08 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206102708-t37t62i45n595w0e
Tags: 1.3.33-2ubuntu1
* Merge with Debian; remaining changes:
  - Drop support for pike.
  - Use python2.5 instead of python2.4.
  - Clean Runtime/ as well.
  - Force a few environment variables.
* debian/Rules (clean): Remove Lib/ocaml/swigp4.ml.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
import template_methods.*;
 
3
 
 
4
public class template_methods_runme {
 
5
 
 
6
  static {
 
7
    try {
 
8
        System.loadLibrary("template_methods");
 
9
    } catch (UnsatisfiedLinkError e) {
 
10
      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);
 
11
      System.exit(1);
 
12
    }
 
13
  }
 
14
 
 
15
  public static void main(String argv[]) {
 
16
    float num = (float)1.1;
 
17
 
 
18
    // Global templated functions
 
19
    int i = template_methods.convolve1Bool();
 
20
    template_methods.convolve1Bool(true);
 
21
    i = template_methods.convolve2Float();
 
22
    template_methods.convolve3FloatRenamed(num);
 
23
    i = template_methods.convolve4Float();
 
24
    template_methods.convolve4FloatRenamed(num);
 
25
    i = template_methods.convolve5FloatRenamed();
 
26
    template_methods.convolve5FloatRenamed(num);
 
27
 
 
28
 
 
29
    // Static templated methods
 
30
    Klass k = new Klass();
 
31
    boolean b = k.KlassTMethodBoolRenamed(true);
 
32
    k.KlassTMethodBool();
 
33
    b = Klass.KlassStaticTMethodBoolRenamed(true);
 
34
    Klass.KlassStaticTMethodBool();
 
35
  }
 
36
}
 
37