external_objects_java: remove useless files 18/13018/1
Simon Marchetto [Mon, 28 Oct 2013 11:03:24 +0000 (12:03 +0100)]
Change-Id: I32d4010e15f5589a9913ded0e2eda5e21e87e191

scilab/modules/external_objects_java/src/cpp/ScilabObjects.giws.xml [deleted file]
scilab/modules/external_objects_java/src/cpp/ScilabObjectsCPP.cpp [deleted file]
scilab/modules/external_objects_java/src/cpp/WrapAsDirectBuffer.cpp [deleted file]
scilab/modules/external_objects_java/src/cpp/builder_cpp.sce [deleted file]
scilab/modules/external_objects_java/src/cpp/wrapwithcast.hpp [deleted file]

diff --git a/scilab/modules/external_objects_java/src/cpp/ScilabObjects.giws.xml b/scilab/modules/external_objects_java/src/cpp/ScilabObjects.giws.xml
deleted file mode 100644 (file)
index d69a225..0000000
+++ /dev/null
@@ -1,266 +0,0 @@
-<!--*
-    * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-    * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
-    *
-    * 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-en.txt
-    *
-    *-->
-
-<package name="org.scilab.forge.jims">
-    
-    <object name="ScilabJavaObject">
-        <method name="invoke" returnType="int" modifier="static">
-            <param type="int" name="id" />
-            <param type="String" name="methodName" />
-            <param type="int[]" name="args" />
-        </method>
-        
-        <method name="initScilabJavaObject" returnType="void" modifier="static" />
-        
-        <method name="garbageCollect" returnType="void" modifier="static" />
-        
-        <method name="getRepresentation" returnType="String" modifier="static">
-            <param type="int" name="id" />
-        </method>
-        
-        <method name="isValidJavaObject" returnType="boolean" modifier="static">
-            <param type="int" name="id" />
-        </method>
-        
-        <method name="enableTrace" returnType="void" modifier="static">
-            <param type="String" name="filename" />
-        </method>
-        
-        <method name="disableTrace" returnType="void" modifier="static" />
-        
-        <method name="setField" returnType="void" modifier="static">
-            <param type="int" name="id" />
-            <param type="String" name="fieldName" />
-            <param type="int" name="idarg" />
-        </method>
-        
-        <method name="getField" returnType="int" modifier="static">
-            <param type="int" name="id" />
-            <param type="String" name="fieldName" />
-        </method>
-        
-        <method name="getFieldType" returnType="int" modifier="static">
-            <param type="int" name="id" />
-            <param type="String" name="fieldName" />
-        </method>
-        
-        <method name="javaCast" returnType="int" modifier="static">
-            <param type="int" name="id" />
-            <param type="String" name="objName" />
-        </method>
-        
-        <method name="javaCast" returnType="int" modifier="static">
-            <param type="int" name="id" />
-            <param type="int" name="classId" />
-        </method>
-        
-        <method name="getClassName" returnType="String" modifier="static">
-            <param type="int" name="id" />
-        </method>
-        
-        <method name="getArrayElement" returnType="int" modifier="static">
-            <param type="int" name="id" />
-            <param type="int[]" name="index" />
-        </method>
-        
-        <method name="setArrayElement" returnType="void" modifier="static">
-            <param type="int" name="id" />
-            <param type="int[]" name="index" />
-            <param type="int" name="idArg" />
-        </method>
-        
-        <method name="removeScilabJavaObject" returnType="void" modifier="static">
-            <param type="int" name="id" />
-        </method>
-        
-        <method name="limitDirectBuffer" returnType="void" modifier="static">
-            <param type="int" name="id" />
-        </method>
-        
-        <method name="isUnwrappable" returnType="int" modifier="static">
-            <param type="int" name="id" />
-        </method>
-        
-        <method name="wrapDouble" returnType="int" modifier="static">
-            <param type="double" name="x" />
-        </method>
-        
-        <method name="wrapDouble" returnType="int" modifier="static">
-            <param type="double[]" name="x" />
-        </method>
-        
-        <method name="wrapDouble" returnType="int" modifier="static">
-            <param type="double[][]" name="x" />
-        </method>
-        
-        <method name="wrapInt" returnType="int" modifier="static">
-            <param type="int" name="x" />
-        </method>
-        
-        <method name="wrapInt" returnType="int" modifier="static">
-            <param type="int[]" name="x" />
-        </method>
-        
-        <method name="wrapInt" returnType="int" modifier="static">
-            <param type="int[][]" name="x" />
-        </method>
-        
-        <method name="wrapUInt" returnType="int" modifier="static">
-            <param type="long" name="x" />
-        </method>
-        
-        <method name="wrapUInt" returnType="int" modifier="static">
-            <param type="long[]" name="x" />
-        </method>
-        
-        <method name="wrapUInt" returnType="int" modifier="static">
-            <param type="long[][]" name="x" />
-        </method>
-        
-        <method name="wrapByte" returnType="int" modifier="static">
-            <param type="byte" name="x" />
-        </method>
-        
-        <method name="wrapByte" returnType="int" modifier="static">
-            <param type="byte[]" name="x" />
-        </method>
-        
-        <method name="wrapByte" returnType="int" modifier="static">
-            <param type="byte[][]" name="x" />
-        </method>
-        
-        <method name="wrapUByte" returnType="int" modifier="static">
-            <param type="short" name="x" />
-        </method>
-        
-        <method name="wrapUByte" returnType="int" modifier="static">
-            <param type="short[]" name="x" />
-        </method>
-        
-        <method name="wrapUByte" returnType="int" modifier="static">
-            <param type="short[][]" name="x" />
-        </method>
-        
-        <method name="wrapShort" returnType="int" modifier="static">
-            <param type="short" name="x" />
-        </method>
-        
-        <method name="wrapShort" returnType="int" modifier="static">
-            <param type="short[]" name="x" />
-        </method>
-        
-        <method name="wrapShort" returnType="int" modifier="static">
-            <param type="short[][]" name="x" />
-        </method>
-        
-        <method name="wrapUShort" returnType="int" modifier="static">
-            <param type="int" name="x" />
-        </method>
-        
-        <method name="wrapUShort" returnType="int" modifier="static">
-            <param type="int[]" name="x" />
-        </method>
-        
-        <method name="wrapUShort" returnType="int" modifier="static">
-            <param type="int[][]" name="x" />
-        </method>
-        
-        <method name="wrapString" returnType="int" modifier="static">
-            <param type="String" name="x" />
-        </method>
-        
-        <method name="wrapString" returnType="int" modifier="static">
-            <param type="String[]" name="x" />
-        </method>
-        
-        <method name="wrapString" returnType="int" modifier="static">
-            <param type="String[][]" name="x" />
-        </method>
-        
-        <method name="wrapBoolean" returnType="int" modifier="static">
-            <param type="boolean" name="x" />
-        </method>
-        
-        <method name="wrapBoolean" returnType="int" modifier="static">
-            <param type="boolean[]" name="x" />
-        </method>
-        
-        <method name="wrapBoolean" returnType="int" modifier="static">
-            <param type="boolean[][]" name="x" />
-        </method>
-        
-        <method name="wrapChar" returnType="int" modifier="static">
-            <param type="char" name="x" />
-        </method>
-        
-        <method name="wrapChar" returnType="int" modifier="static">
-            <param type="char[]" name="x" />
-        </method>
-        
-        <method name="wrapChar" returnType="int" modifier="static">
-            <param type="char[][]" name="x" />
-        </method>
-        
-        <method name="wrapFloat" returnType="int" modifier="static">
-            <param type="float" name="x" />
-        </method>
-        
-        <method name="wrapFloat" returnType="int" modifier="static">
-            <param type="float[]" name="x" />
-        </method>
-        
-        <method name="wrapFloat" returnType="int" modifier="static">
-            <param type="float[][]" name="x" />
-        </method>
-        
-        <method name="wrapLong" returnType="int" modifier="static">
-            <param type="long" name="x" />
-        </method>
-        
-        <method name="wrapLong" returnType="int" modifier="static">
-            <param type="long[]" name="x" />
-        </method>
-        
-        <method name="wrapLong" returnType="int" modifier="static">
-            <param type="long[][]" name="x" />
-        </method>
-        
-    </object>
-    
-    <object name="ScilabJavaClass">
-        <method name="newInstance" returnType="int" modifier="static">
-            <param type="int" name="id" />
-            <param type="int[]" name="args" />
-        </method>
-    </object>
-    
-    <object name="ScilabClassLoader">
-        <method name="loadJavaClass" returnType="int" modifier="static">
-            <param type="String" name="name" />
-            <param type="boolean" name="allowReload" />
-        </method>
-    </object>
-    
-    <object name="ScilabJavaArray">
-        <method name="newInstance" returnType="int" modifier="static">
-            <param type="String" name="name" />
-            <param type="int[]" name="args" />
-        </method>
-    </object>
-    
-    <object name="ScilabJavaCompiler">
-        <method name="compileCode" returnType="int" modifier="static">
-            <param type="String" name="classname" />
-            <param type="String[]" name="code" />
-        </method>
-    </object>
-</package>
diff --git a/scilab/modules/external_objects_java/src/cpp/ScilabObjectsCPP.cpp b/scilab/modules/external_objects_java/src/cpp/ScilabObjectsCPP.cpp
deleted file mode 100644 (file)
index 3e3f61e..0000000
+++ /dev/null
@@ -1,640 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
- *
- * 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-en.txt
- *
- */
-/* ------------------------------------------------------------------------- */
-#include <string.h>
-#ifdef _MSC_VER
-#include "strdup_windows.h"
-#endif
-#include "OptionsHelper.hxx"
-#include "ScilabObjects.hxx"
-#include "ScilabClassLoader.hxx"
-#include "ScilabJavaClass.hxx"
-//#include "ScilabJavaObjectHelper.hxx"
-#include "ScilabJavaArray.hxx"
-#include "ScilabJavaCompiler.hxx"
-#include "GiwsException.hxx"
-#include "NoMoreScilabMemoryException.hxx"
-//#include "wrap.hpp"
-#include "wrapwithcast.hpp"
-//#include "unwrap.hpp"
-#include "WrapAsDirectBufferTemplate.hpp"
-/* ------------------------------------------------------------------------- */
-using namespace org_scilab_modules_external_objects_java;
-/* ------------------------------------------------------------------------- */
-/*
- * Syntax: wrapForType(type, Type)
- * type: the Scilab data type
- * Type: used for the function name
- */
-wrapForType(double, Double)
-wrapForType(int, Int)
-wrapForType(byte, Byte)
-wrapForType(short, Short)
-wrapForType(unsigned short, Char)
-
-#ifdef __SCILAB_INT64__
-wrapForType(long long, Long)
-#endif
-/* ------------------------------------------------------------------------- */
-/*
- * Syntax: wrapWithCastForType(type, castType, Type)
- * type: the Scilab data type
- * castType: datas are copied and casted (into castType)
- * Type: used for the function name
- */
-wrapWithCastForType(unsigned int, long long, UInt)
-wrapWithCastForType(unsigned char, short, UByte)
-wrapWithCastForType(unsigned short, int, UShort)
-wrapWithCastForType(int, bool, Boolean)
-wrapWithCastForType(double, float, Float)
-/* ------------------------------------------------------------------------- */
-/*
- * Syntax: unwrapForType(type,ScilabType,JNIType,Type)
- * type: used for the function name (unwrap##type(...))
- * ScilabType: the type in Scilab
- * JNIType: the type in JNI
- * Type: used for the functions wrapper
- */
-unwrapForType(double, double, jdouble, Double)
-unwrapForType(int, int, jint, Int)
-unwrapForType(boolean, int, jboolean, Boolean)
-unwrapForType(byte, char, jbyte, Byte)
-unwrapForType(short, short, jshort, Short)
-unwrapForType(char, unsigned short, jchar, Char)
-unwrapForType(long, long, jlong, Long)
-unwrapForType(float, double, jfloat, Float)
-/* ------------------------------------------------------------------------- */
-
-wrapIntoDirectBuffer(Double, double)
-wrapIntoDirectBuffer(Int, int)
-wrapIntoDirectBuffer(Char, char)
-wrapIntoDirectBuffer(Short, short)
-wrapIntoDirectBuffer(Long, long)
-wrapIntoDirectBuffer(Byte, byte)
-wrapIntoDirectBuffer(Float, float)
-/* ------------------------------------------------------------------------- */
-void unwrapstring(int id, int pos, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObjectHelper::unwrapString(vm, id, pos);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-        catch (org_scilab_modules_external_objects_java::NoMoreScilabMemoryException e)
-        {
-            *errmsg = strdup(e.what());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-void unwraprowstring(int id, int pos, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObjectHelper::unwrapRowString(vm, id, pos);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-        catch (org_scilab_modules_external_objects_java::NoMoreScilabMemoryException e)
-        {
-            *errmsg = strdup(e.what());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-void unwrapmatstring(int id, int pos, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObjectHelper::unwrapMatString(vm, id, pos);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-        catch (org_scilab_modules_external_objects_java::NoMoreScilabMemoryException e)
-        {
-            *errmsg = strdup(e.what());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-void initscilabjavaobject(char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObject::initScilabJavaObject(vm);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-        catch (org_scilab_modules_external_objects_java::NoMoreScilabMemoryException e)
-        {
-            *errmsg = strdup(e.what());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-void garbagecollect(char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObject::garbageCollect(vm);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-int createjavaarray(char *className, int* dims, int len, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaArray::newInstance(vm, className, dims, len);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int loadjavaclass(char *className, char allowReload, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabClassLoader::loadJavaClass(vm, className, getAllowReload() == 0 ? false : true);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-char* getrepresentation(int id, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            char *rep = ScilabJavaObject::getRepresentation(vm, id);
-            char *returnedRep = NULL;
-            if (rep)
-            {
-                returnedRep = strdup(rep);
-            }
-            return returnedRep;
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return NULL;
-        }
-    }
-
-    return NULL;
-}
-/* ------------------------------------------------------------------------- */
-int isvalidjavaobject(int id)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        bool b = ScilabJavaObject::isValidJavaObject(vm, id);
-        return b ? 1 : 0;
-    }
-
-    return 0;
-}
-/* ------------------------------------------------------------------------- */
-int newinstance(int id, int *args, int argsSize, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaClass::newInstance(vm, id, args, argsSize);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int invoke(int id, char *methodName, int *args, int argsSize, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::invoke(vm, id, methodName, args, argsSize);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-void setfield(int id, char *fieldName, int idarg, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::setField(vm, id, fieldName, idarg);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return;
-        }
-    }
-
-    return;
-}
-/* ------------------------------------------------------------------------- */
-int getfield(int id, char *fieldName, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::getField(vm, id, fieldName);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int getfieldtype(int id, char *fieldName, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::getFieldType(vm, id, fieldName);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int getarrayelement(int id, int *index, int length, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::getArrayElement(vm, id, index, length);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-void setarrayelement(int id, int *index, int length, int idArg, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObject::setArrayElement(vm, id, index, length, idArg);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-int javacast(int id, char *objName, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::javaCast(vm, id, objName);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int javacastwithid(int id, int classId, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::javaCast(vm, id, classId);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-            return -1;
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-void removescilabjavaobject(int id)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        ScilabJavaObject::removeScilabJavaObject(vm, id);
-    }
-}
-/* ------------------------------------------------------------------------- */
-void getaccessiblemethods(int id, int pos, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObjectHelper::getMethodResult(vm, "getAccessibleMethods", id, pos);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-        catch (org_scilab_modules_external_objects_java::NoMoreScilabMemoryException e)
-        {
-            *errmsg = strdup(e.what());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-void getaccessiblefields(int id, int pos, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObjectHelper::getMethodResult(vm, "getAccessibleFields", id, pos);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-        catch (org_scilab_modules_external_objects_java::NoMoreScilabMemoryException e)
-        {
-            *errmsg = strdup(e.what());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-char* getclassname(int id, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return strdup(ScilabJavaObject::getClassName(vm, id));
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-        catch (org_scilab_modules_external_objects_java::NoMoreScilabMemoryException e)
-        {
-            *errmsg = strdup(e.what());
-        }
-    }
-    return NULL;
-}
-/* ------------------------------------------------------------------------- */
-int wrapSingleString(char *x)
-{
-    JavaVM *vm = getScilabJavaVM();
-    if (vm)
-    {
-        return ScilabJavaObject::wrapString(vm, x);
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int wrapRowString(char **x, int len)
-{
-    JavaVM *vm = getScilabJavaVM();
-    if (vm)
-    {
-        return ScilabJavaObject::wrapString(vm, x, len);
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int wrapMatString(char **x, int r, int c)
-{
-    JavaVM *vm = getScilabJavaVM();
-    if (vm)
-    {
-        if (getMethodOfConv())
-        {
-            char ***xx = new char**[r];
-            int i, j, k;
-            for (i = 0; i < r; i++)
-            {
-                xx[i] = new char*[c];
-                for (j = 0; j < c; j++)
-                {
-                    int len = strlen(x[j * r + i]) + 1;
-                    xx[i][j] = new char[len];
-                    memcpy(xx[i][j], x[j * r + i], len);
-                }
-            }
-            k = ScilabJavaObject::wrapString(vm, xx, r, c);
-            for (i = 0; i < r; i++)
-            {
-                for (j = 0; j < c; j++)
-                {
-                    delete [] xx[i][j];
-                }
-                delete [] xx[i];
-            }
-            delete [] xx;
-            return k;
-        }
-        else
-        {
-            char ***xx = new char**[c];
-            int i;
-            xx[0] = x;
-            for (i = 1; i < c; xx[i] = xx[i++ - 1] + r)
-            {
-                ;
-            }
-            i = ScilabJavaObject::wrapString(vm, xx, c, r);
-            delete [] xx;
-            return i;
-        }
-    }
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int isunwrappable(int id, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaObject::isUnwrappable(vm, id);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-int compilecode(char *className, char **code, int size, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            return ScilabJavaCompiler::compileCode(vm, className, code, size);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-    }
-
-    return -1;
-}
-/* ------------------------------------------------------------------------- */
-void releasedirectbuffer(void **ref, int* id, int len, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObjectHelper::releaseDirectBuffer(vm, ref, id, len);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-void enabletrace(char *filename, char **errmsg)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        try
-        {
-            ScilabJavaObject::enableTrace(vm, filename);
-        }
-        catch (GiwsException::JniException e)
-        {
-            *errmsg = strdup(e.getJavaDescription().c_str());
-        }
-    }
-}
-/* ------------------------------------------------------------------------- */
-void disabletrace()
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        ScilabJavaObject::disableTrace(vm);
-    }
-}
-/* ------------------------------------------------------------------------- */
diff --git a/scilab/modules/external_objects_java/src/cpp/WrapAsDirectBuffer.cpp b/scilab/modules/external_objects_java/src/cpp/WrapAsDirectBuffer.cpp
deleted file mode 100644 (file)
index c0a9ff9..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
- *
- * 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-en.txt
- *
- */
-/*--------------------------------------------------------------------------*/
-#include <string.h>
-#ifdef _MSC_VER
-#include <Windows.h>
-#endif
-#include <jni.h>
-#include "ScilabJavaObject.hxx"
-//#include "ScilabJavaObjectHelper.hxx"
-/*--------------------------------------------------------------------------*/
-#define SCILABJAVAOBJECT "org/scilab/forge/jims/ScilabJavaObject"
-/*--------------------------------------------------------------------------*/
-void ScilabJavaObjectHelper::releaseDirectBuffer(JavaVM * jvm_, void** ref, int* javaID, int len)
-{
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass(SCILABJAVAOBJECT);
-
-    int i = 0;
-    for (; i < len; i++)
-    {
-        curEnv->DeleteGlobalRef((jobject)(ref[i]));
-        org_scilab_modules_external_objects_java::ScilabJavaObject::limitDirectBuffer(jvm_, javaID[i]);
-        org_scilab_modules_external_objects_java::ScilabJavaObject::removeScilabJavaObject(jvm_, javaID[i]);
-    }
-}
-/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/external_objects_java/src/cpp/builder_cpp.sce b/scilab/modules/external_objects_java/src/cpp/builder_cpp.sce
deleted file mode 100644 (file)
index baa0afa..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
-// Copyright (C) 2011 - Allan CORNET
-//
-// 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-en.txt
-//
-function build_cpp()
-    LDFLAGS = "";
-    CFLAGS = "";
-    if getos() == "Windows" then
-        CFLAGS = "-D_MSC_VER";
-    end
-    here = get_absolute_file_path("builder_cpp.sce");
-
-    src_cpp = ["WrapAsDirectBuffer.cpp"; ..
-    "ScilabObjectsCPP.cpp"; ..
-    "NoMoreScilabMemoryException.cpp"; ..
-    "OptionsHelper.cpp"];
-
-    src_jni = ["ScilabJavaObject.cpp"; ..
-    "ScilabJavaCompiler.cpp"; ..
-    "ScilabJavaClass.cpp"; ..
-    "ScilabJavaArray.cpp"; ..
-    "ScilabClassLoader.cpp"; ..
-    "GiwsException.cpp"];
-
-    if (getos() == "Windows") then
-        src_cpp = [src_cpp; ..
-        "dllMain.cpp"];
-    end
-
-    jdk_home = getenv("JAVA_HOME", "");
-    if (getos() <> "Windows") then
-        if jdk_home <> "" then
-            if ~isdir(fullpath(jdk_home + "/include")) then
-                jdk_home = jdk_home + "/../";
-            end
-        end
-    end
-
-    if jdk_home == "" then
-        if getos() <> "Darwin" then
-            jdk_home = fullpath(system_getproperty("java.home") + "/../");
-        else
-            jdk_home = fullpath(system_getproperty("java.home"));
-        end
-    end
-
-
-    if ~isdir(fullpath(jdk_home + "/include")) then
-        error("JDK include directory not found.")
-    end
-
-    if (getos() == "Windows") then
-        CFLAGS = "-I" + jdk_home + "\include" + " -I" + jdk_home + "\include\win32";
-    elseif (getos() == "Linux") then
-        CFLAGS = "-I" + jdk_home + "/include" + " -I" + jdk_home + "/include/linux";
-    else
-        CFLAGS = "-I" + jdk_home + "/include";
-    end
-
-    if getos() <> "Windows" then
-        LDFLAGS = "-L" + fullpath(here + "../c/") + " " + ..
-        "-L" + fullpath(here + "../../sci_gateway/c");
-    end
-    CFLAGS = CFLAGS + " -I" + fullpath(here) + " -I" + fullpath(here + "../jni");
-    CFLAGS = CFLAGS + " -I" + fullpath(here + "../include/") + " -I"  + fullpath(jdk_home + "/include") + " -I" + fullpath(SCI + "/modules/jvm/includes");
-
-    tbx_build_src("jims_cpp", [src_cpp; src_jni], "cpp", here, "", LDFLAGS, CFLAGS);
-endfunction
-
-build_cpp();
-clear build_cpp
diff --git a/scilab/modules/external_objects_java/src/cpp/wrapwithcast.hpp b/scilab/modules/external_objects_java/src/cpp/wrapwithcast.hpp
deleted file mode 100644 (file)
index 679296e..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
- *
- * 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-en.txt
- *
- */
-/*--------------------------------------------------------------------------*/
-template <typename T, typename U,class V>
-int wrapSingleWithCast(T x)
-{
-    JavaVM *vm = getScilabJavaVM();
-    if (vm)
-    {
-        return V::wrap(vm, static_cast<U>(x));
-    }
-
-    return -1;
-}
-/*--------------------------------------------------------------------------*/
-template <typename T, typename U, class V>
-int wrapRowWithCast(T *x, int len)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        int i;
-        U *l = new U[len];
-        for (i = 0; i < len ; i++)
-        {
-            l[i] = static_cast<U>(x[i]);
-        }
-
-        return V::wrap(vm, l, len);
-    }
-
-    return -1;
-}
-/*--------------------------------------------------------------------------*/
-template <typename T, typename U, class V>
-int wrapMatWithCast(T *x, int r, int c)
-{
-    JavaVM *vm = getScilabJavaVM ();
-    if (vm)
-    {
-        if (getMethodOfConv())
-        {
-            U **xx = new U*[r];
-            int i, j;
-            for (i = 0; i < r; i++)
-            {
-                xx[i] = new U[c];
-                for (j = 0; j < c; j++)
-                {
-                    xx[i][j] = static_cast<U>(x[j * r + i]);
-                }
-            }
-            j = V::wrap(vm, xx, r, c);
-            for (i = 0; i < r; delete [] xx[i++]);
-            delete [] xx;
-            return j;
-        }
-        else
-        {
-            U **xx = new U*[c];
-            int i, j;
-            for (i = 0; i < c; i++)
-            {
-                xx[i] = new U[r];
-                for (j = 0; j < r; j++)
-                {
-                    xx[i][j] = static_cast<U>(x[i * r + j]);
-                }
-            }
-            j = V::wrap(vm, xx, c, r);
-            for (i = 0; i < c; delete [] xx[i++]);
-            delete [] xx;
-            return j;
-        }
-    }
-
-    return -1;
-}
-/*--------------------------------------------------------------------------*/