add function jsetfield
[scilab.git] / scilab / modules / external_objects_java / sci_gateway / c / gw_external_objects_java.c
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
4  *
5  * This file must be used under the terms of the CeCILL.
6  * This source file is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution.  The terms
8  * are also available at
9  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10  *
11  */
12 /*--------------------------------------------------------------------------*/
13 #include "gw_external_objects_java.h"
14 #include "api_scilab.h"
15 #include "callFunctionFromGateway.h"
16 #include "MALLOC.h"
17 /*--------------------------------------------------------------------------*/
18 /*  interface function */
19 /*--------------------------------------------------------------------------*/
20 static gw_generic_table Tab[] =
21 {
22     {sci_jimport, "jimport"},
23     {sci_jgetclassname, "jgetclassname"},
24     {sci_jwrap, "jwrap"},
25     {sci_jgetmethods, "jgetmethods"},
26     {sci_jgetfields, "jgetfields"},
27     {sci_jgetfield, "jgetfield"},
28     {sci_jcompile, "jcompile"},
29     {sci_jnewInstance, "jnewInstance"},
30     {sci_jremove, "jremove"},
31     {sci_jexists, "jexists"},
32     {sci_junwrap, "junwrap"},
33     {sci_junwraprem, "junwraprem"},
34     {sci_jenableTrace, "jenableTrace"},
35     {sci_jdisableTrace, "jdisableTrace"},
36     {sci_jdeff, "jdeff"},
37     {sci_jvoid, "jvoid"},
38     {sci_jarray, "jarray"},
39     {sci_jcast, "jcast"},
40     {sci_jallowClassReloading, "jallowClassReloading"},
41     {sci_jwrapinfloat, "jwrapinfloat"},
42     {sci_jsetfield, "jsetfield"}
43 };
44
45 /*--------------------------------------------------------------------------*/
46 int gw_external_objects_java(void)
47 {
48     Rhs = Max(0, Rhs);
49
50     if (pvApiCtx == NULL)
51     {
52         pvApiCtx = (StrCtx *) MALLOC(sizeof(StrCtx));
53     }
54
55     pvApiCtx->pstName = (char *)Tab[Fin - 1].name;
56     callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
57     return 0;
58 }
59
60 /*--------------------------------------------------------------------------*/