1 /* Allan CORNET */
2 /* INRIA 2007 */
3 /* Completion.i */
4 /**
5  * Windows: swig -java -package org.scilab.modules.console -outdir ../java/org/scilab/modules/console/ DropFiles.i
6  * Other: Use the option --enable-build-swig to the configure
7 */
8 
9 %module DropFiles
10 
11 %include "../../../jvm/src/jni/scilab_typemaps.i"
12 
13 %{
14 #include "../c/dropFiles.h"
15 #include "machine.h"
16 #include "sci_malloc.h"
17 %}
18 
19 /* JavaDoc for DropFilesJNI class */
20 %pragma(java) jniclassclassmodifiers=%{
21 /* It is generated code. Disable checkstyle */
22 //CHECKSTYLE:OFF
23  /**
24    * @author Allan CORNET
25    * @copyright INRIA 2007
26    */
27 public class%}
28 
29 /* Constructor for DropFilesJNI class */
30 %pragma(java) jniclasscode="
31   /**
32     * Constructor
33     */
34   protected DropFilesJNI() {
35     throw new UnsupportedOperationException();
36   }";
37 
38 /* static load of library */
39 %pragma(java) jniclasscode=%{
40   static {
41     try {
42         System.loadLibrary("sciconsole");
catch(SecurityException e)43     } catch (SecurityException e) {
44         System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
45         System.err.println(e.getLocalizedMessage());
46         System.exit(-1);
47     } catch (UnsatisfiedLinkError e) {
48            System.err.println("The native library sciconsole does not exist or cannot be found.");
49         if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
50            System.err.println(e.getLocalizedMessage());
51            System.err.println("Current java.library.path is : "+System.getProperty("java.library.path"));
52            System.exit(-1);
53         }else{
54            System.err.println("Continuing anyway because of CONTINUE_ON_JNI_ERROR");
55         }
56     }
57   }
58 %}
59 
60 /* JavaDoc for DropFiles class */
61 %pragma(java) moduleclassmodifiers="
62  /**
63    * @author Allan CORNET
64    * @copyright INRIA 2007
65    */
66 public class";
67 
68 /* Constructor for DropFiles class */
69 %pragma(java) modulecode="
70  /**
71    * Constructor
72    */
73  protected DropFiles() {
74     throw new UnsupportedOperationException();
75  }";
76 
77 /* JavaDoc */
78 %javamethodmodifiers dropFiles(char **files) "
79 /**
80 * drop function on all types for scilab
81 * @param files list of files
82 * @return true or false
83 */
84 public";
85 BOOL dropFiles(char **files);
86