blob: 71632af076aaaab6edd4fc69117a5c713199f5c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) INRIA - 2010 - Sylvestre Ledru
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
*/
/* ScilabCommons.i */
/**
* Windows: swig -java -package org.scilab.modules.commons -outdir ../java/org/scilab/modules/commons/ ScilabCommons.i
* Other: Use the option --enable-build-swig to the configure
*/
%module ScilabCommons
%{
#include "../../../core/includes/SCIHOME.h"
#include "../../../core/includes/tmpdir.h"
#include "../../../fileio/includes/createtempfilename.h"
#include "../../../localization/includes/setgetlanguage.h"
#include "../../../core/includes/getversion.h"
#include "../../../core/includes/setieee.h"
#include "../../../core/includes/setformat.h"
%}
/* JavaDoc for ScilabCommonsJNI class */
%pragma(java) jniclassclassmodifiers=%{
/* It is generated code. Disable checkstyle */
//CHECKSTYLE:OFF
/**
* Some commons values from Scilab engine to Java
* @author Sylvestre LEDRU
* @copyright DIGITEO 2010
*/
public class%}
/* Constructor for ScilabCommonsJNI class */
%pragma(java) jniclasscode="
/**
* Constructor
*/
protected ScilabCommonsJNI() {
throw new UnsupportedOperationException();
}";
/* static load of library */
%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("scicommons");
} catch (SecurityException e) {
System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
System.err.println(e.getLocalizedMessage());
System.exit(-1);
} catch (UnsatisfiedLinkError e) {
System.err.println("The native library scicommons does not exist or cannot be found.");
if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
System.err.println(e.getLocalizedMessage());
System.err.println("Current java.library.path is : "+System.getProperty("java.library.path"));
System.exit(-1);
}else{
System.err.println("Continuing anyway because of CONTINUE_ON_JNI_ERROR");
}
}
}
%}
/* JavaDoc for ScilabCommons class */
%pragma(java) moduleclassmodifiers="
/**
* Some commons values from Scilab engine to Java
* @author Sylvestre LEDRU
* @copyright DIGITEO 2010
*/
public class";
/* Constructor for ScilabCommons class */
%pragma(java) modulecode="
/**
* Constructor
*/
protected ScilabCommons() {
throw new UnsupportedOperationException();
}";
/* JavaDoc */
%javamethodmodifiers getSCIHOME() "
/**
* Get SCIHOME variable from Scilab
* @return SCIHOME value
*/
public";
char* getSCIHOME();
/* JavaDoc */
%javamethodmodifiers getTMPDIR() "
/**
* returns TMPDIR directory value
* @return TMPDIR value
*/
public";
char *getTMPDIR(void);
/* JavaDoc */
%javamethodmodifiers getScilabLanguage() "
/**
* returns Scilab current language
* @return language
*/
public";
char *getlanguage(void);
/* JavaDoc */
%javamethodmodifiers createTempFileName() "
/**
* Create file with unique file name in TMPDIR
* TMPDIR/PREFIX[XXXXXXX]
* @param prefix the file prefix
* @param bShortFormat set 1 for a 8.5 filename, 0 otherwise
* @return a unique filename
*/
public";
char *createtempfilename(const char* prefix, int bShortFormat);
/* JavaDoc */
%javamethodmodifiers getScilabIeeeMode() "
/**
* returns the Scilab ieee mode
* @return ieee mode
*/
public";
int getieee(void);
/* JavaDoc */
%javamethodmodifiers setScilabIeeeMode(int) "
/**
* Set the Scilab ieee mode
*/
public";
void setieee(int);
/* JavaDoc */
%javamethodmodifiers setformat(const char *, int) "
/**
* Set the Scilab ieee mode
*/
public";
void setformat(const char * format, int width);
/* JavaDoc */
%javamethodmodifiers getformat() "
/**
* returns the Scilab format (\"v\" or \"e\")
* @return format
*/
public";
char * getformat();
/* JavaDoc */
%javamethodmodifiers getformatwidth() "
/**
* returns the Scilab format width
* @return format
*/
public";
int getformatwidth();
/* JavaDoc */
%javamethodmodifiers getScilabVersionMajor() "
/**
* returns the Scilab version major number
* @return version major
*/
public";
int getScilabVersionMajor();
/* JavaDoc */
%javamethodmodifiers getScilabVersionMinor() "
/**
* returns the Scilab version minor number
* @return version minor
*/
public";
int getScilabVersionMinor();
/* JavaDoc */
%javamethodmodifiers getScilabVersionMaintenance() "
/**
* returns the Scilab version maintenance number
* @return version maintenance
*/
public";
int getScilabVersionMaintenance();
/* JavaDoc */
%javamethodmodifiers getScilabVersionTimestamp() "
/**
* returns the Scilab version timestamp number
* @return version timestamp
*/
public";
int getScilabVersionTimestamp();
/* JavaDoc */
%javamethodmodifiers getScilabVersionAsString() "
/**
* returns the Scilab version as string
* @return version Scilab version as a string
*/
public";
char* getScilabVersionAsString();
|