remove useless Scilab API C++ 98/18698/3
Antoine ELIAS [Sun, 20 Nov 2016 09:30:30 +0000 (10:30 +0100)]
Change-Id: I3969c7524a7eede3e61f556d038896cca996bf8b

30 files changed:
scilab/contrib/toolbox_skeleton/sci_gateway/cpp/sci_cpp_find.cxx
scilab/contrib/toolbox_skeleton/sci_gateway/cpp/sci_cpperror.cpp
scilab/contrib/toolbox_skeleton/sci_gateway/cpp/sci_cppfoo.cpp
scilab/contrib/toolbox_skeleton/sci_gateway/cpp/sci_cppmultiplybypi.cpp
scilab/contrib/toolbox_skeleton/sci_gateway/cpp/sci_cppsub.cpp
scilab/contrib/toolbox_skeleton/sci_gateway/cpp/sci_cppsum.cpp
scilab/modules/api_scilab/Makefile.am
scilab/modules/api_scilab/Makefile.in
scilab/modules/api_scilab/api_scilab.vcxproj
scilab/modules/api_scilab/api_scilab.vcxproj.filters
scilab/modules/api_scilab/includes/api_boolean.hxx [deleted file]
scilab/modules/api_scilab/includes/api_common.hxx [deleted file]
scilab/modules/api_scilab/includes/api_double.hxx [deleted file]
scilab/modules/api_scilab/includes/api_handle.hxx [deleted file]
scilab/modules/api_scilab/includes/api_int.hxx [deleted file]
scilab/modules/api_scilab/includes/api_list.hxx [deleted file]
scilab/modules/api_scilab/includes/api_scilab.hxx [deleted file]
scilab/modules/api_scilab/includes/api_sparse.hxx [deleted file]
scilab/modules/api_scilab/includes/api_string.hxx [deleted file]
scilab/modules/api_scilab/includes/api_variable.hxx [deleted file]
scilab/modules/api_scilab/src/cpp/api_boolean_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_common_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_double_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_handle_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_int_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_list_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_pointer_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_sparse_cpp.cpp [deleted file]
scilab/modules/api_scilab/src/cpp/api_string_cpp.cpp [deleted file]
scilab/modules/elementary_functions/sci_gateway/cpp/sci_abs.cpp

index d727ddb..a3e3a66 100644 (file)
@@ -12,154 +12,154 @@ extern "C"
 #include "sci_malloc.h"
 #include <localization.h>
 
-    /* ==================================================================== */
-    int sci_cpp_find(char *fname, void* pvApiCtx) 
-    {
-        SciErr sciErr;
-
-        int m1 = 0, n1 = 0;
-        int *piAddressVarOne = NULL;
-        char *pStVarOne = NULL;
-        int lenStVarOne = 0;
-        int iType1 = 0;
-
-        int m2 = 0, n2 = 0;
-        int *piAddressVarTwo = NULL;
-        char *pStVarTwo = NULL;
-        int lenStVarTwo = 0;
-        int iType2 = 0;
-
-        /* Check the number of input argument */
-        CheckInputArgument(pvApiCtx, 2,2); 
-
-        /* Check the number of output argument */
-        CheckOutputArgument(pvApiCtx, 1,1);
-
-        /* get Address of inputs */
-        sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        }     
-        sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        } 
-
-        /* checks types */
-        sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType1);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        } 
-
-        if ( iType1 != sci_strings )
-        {
-            Scierror(999,_("%s: Wrong type for input argument #%d: string expected.\n"),fname,1);
-            return 0;
-        }
-
-        sciErr = getVarType(pvApiCtx, piAddressVarTwo, &iType2);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        } 
-
-        if ( iType2 != sci_strings )
-        {
-            Scierror(999,_("%s: Wrong type for input argument #%d: string expected.\n"),fname,2);
-            return 0;
-        }
-
-        /* get strings */
-
-        sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne,&m1,&n1,&lenStVarOne,&pStVarOne);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        } 
-
-        /* check size */
-        if ( (m1 != n1) && (n1 != 1) ) 
-        {
-            Scierror(999,_("%s: Wrong size for input argument #%d: string expected.\n"),fname,1);
-            return 0;
-        }
-        /* alloc string */
-        pStVarOne = (char*)MALLOC(sizeof(char)*(lenStVarOne + 1));
-        /* get string One */
-        sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne,&m1,&n1,&lenStVarOne,&pStVarOne);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        } 
-
-        sciErr = getMatrixOfString(pvApiCtx, piAddressVarTwo,&m2,&n2,&lenStVarTwo,&pStVarTwo);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        } 
-
-        if ( (m2 != n2) && (n2 != 1) ) 
-        {
-            Scierror(999,_("%s: Wrong size for input argument #%d: string expected.\n"),fname,2);
-            return 0;
-        }
-        /* alloc string */
-        pStVarTwo = (char*)MALLOC(sizeof(char)*(lenStVarTwo + 1));
-        /* get string Two */
-        sciErr = getMatrixOfString(pvApiCtx, piAddressVarTwo,&m2,&n2,&lenStVarTwo,&pStVarTwo);
-        if(sciErr.iErr)
-        {
-            printError(&sciErr, 0);
-            return 0;
-        } 
-
-
-        std::string myMessage (pStVarOne);
-        if (pStVarOne)
-        {
-            FREE(pStVarOne); 
-            pStVarOne = NULL;
-        }
-
-        std::string search(pStVarTwo);
-        if (pStVarTwo)
-        {
-            FREE(pStVarTwo);
-            pStVarTwo = NULL;
-        }
-
-        /* Where we will store the position */
-        double dOut = 0.0;
-        if (myMessage.find(search) != std::string::npos) 
-        {
-            /* The actual operation */
-            dOut = myMessage.find(search); 
-        } 
-        else 
-        {
-            dOut = -1; /* Substring not found */
-        }
-
-        /* create result on stack */
-        int m_out = 1;
-        int n_out = 1;
-
-        createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, m_out, n_out, &dOut);
-
-        AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1; 
+int sci_cpp_find(char *fname, void* pvApiCtx);
+}
 
+/* ==================================================================== */
+int sci_cpp_find(char *fname, void* pvApiCtx) 
+{
+    SciErr sciErr;
+
+    int m1 = 0, n1 = 0;
+    int *piAddressVarOne = NULL;
+    char *pStVarOne = NULL;
+    int lenStVarOne = 0;
+    int iType1 = 0;
+
+    int m2 = 0, n2 = 0;
+    int *piAddressVarTwo = NULL;
+    char *pStVarTwo = NULL;
+    int lenStVarTwo = 0;
+    int iType2 = 0;
+
+    /* Check the number of input argument */
+    CheckInputArgument(pvApiCtx, 2,2); 
+
+    /* Check the number of output argument */
+    CheckOutputArgument(pvApiCtx, 1,1);
+
+    /* get Address of inputs */
+    sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    }     
+    sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    } 
+
+    /* checks types */
+    sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType1);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    } 
+
+    if ( iType1 != sci_strings )
+    {
+        Scierror(999,_("%s: Wrong type for input argument #%d: string expected.\n"),fname,1);
         return 0;
     }
-    /* ==================================================================== */ 
-} /* extern "C" */
-/* ==================================================================== */
+
+    sciErr = getVarType(pvApiCtx, piAddressVarTwo, &iType2);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    } 
+
+    if ( iType2 != sci_strings )
+    {
+        Scierror(999,_("%s: Wrong type for input argument #%d: string expected.\n"),fname,2);
+        return 0;
+    }
+
+    /* get strings */
+
+    sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne,&m1,&n1,&lenStVarOne,&pStVarOne);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    } 
+
+    /* check size */
+    if ( (m1 != n1) && (n1 != 1) ) 
+    {
+        Scierror(999,_("%s: Wrong size for input argument #%d: string expected.\n"),fname,1);
+        return 0;
+    }
+    /* alloc string */
+    pStVarOne = (char*)MALLOC(sizeof(char)*(lenStVarOne + 1));
+    /* get string One */
+    sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne,&m1,&n1,&lenStVarOne,&pStVarOne);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    } 
+
+    sciErr = getMatrixOfString(pvApiCtx, piAddressVarTwo,&m2,&n2,&lenStVarTwo,&pStVarTwo);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    } 
+
+    if ( (m2 != n2) && (n2 != 1) ) 
+    {
+        Scierror(999,_("%s: Wrong size for input argument #%d: string expected.\n"),fname,2);
+        return 0;
+    }
+    /* alloc string */
+    pStVarTwo = (char*)MALLOC(sizeof(char)*(lenStVarTwo + 1));
+    /* get string Two */
+    sciErr = getMatrixOfString(pvApiCtx, piAddressVarTwo,&m2,&n2,&lenStVarTwo,&pStVarTwo);
+    if(sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    } 
+
+
+    std::string myMessage (pStVarOne);
+    if (pStVarOne)
+    {
+        FREE(pStVarOne); 
+        pStVarOne = NULL;
+    }
+
+    std::string search(pStVarTwo);
+    if (pStVarTwo)
+    {
+        FREE(pStVarTwo);
+        pStVarTwo = NULL;
+    }
+
+    /* Where we will store the position */
+    double dOut = 0.0;
+    if (myMessage.find(search) != std::string::npos) 
+    {
+        /* The actual operation */
+        dOut = myMessage.find(search); 
+    } 
+    else 
+    {
+        dOut = -1; /* Substring not found */
+    }
+
+    /* create result on stack */
+    int m_out = 1;
+    int n_out = 1;
+
+    createMatrixOfDouble(pvApiCtx, nbInputArgument(pvApiCtx) + 1, m_out, n_out, &dOut);
+
+    AssignOutputVariable(pvApiCtx, 1) = nbInputArgument(pvApiCtx) + 1; 
+
+    return 0;
+}
index 528f4a1..5ebde46 100644 (file)
@@ -2,22 +2,26 @@
 /* Template toolbox_skeleton */
 /* This file is released under the 3-clause BSD license. See COPYING-BSD. */
 /* ==================================================================== */
-#include "api_scilab.hxx"
+#include "function.hxx"
+
+extern "C"
+{
 #include "Scierror.h"
 #include "localization.h"
+}
 
 /* ==================================================================== */
-api_scilab::Status sci_cpperror(api_scilab::input &in, int _iRetCount, api_scilab::output &out)
+types::Function::ReturnValue sci_cpperror(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
     if (in.size() != 1)
     {
         Scierror(999, _d("toolbox_skeleton", "%s: I'm waiting for only one argument.\n"), "cerror");
-        return api_scilab::Error;
+        return types::Function::Error;
     }
     else
     {
         Scierror(999, _d("toolbox_skeleton", "%s: Yeah! %d is a good number of arguments but I prefer fail, sorry.\n"), "cerror", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 }
 /* ==================================================================== */
index f9a45ae..33773a7 100644 (file)
@@ -3,10 +3,17 @@
 /* Example detail in "API_scilab getting started" help page */
 /* This file is released under the 3-clause BSD license. See COPYING-BSD. */
 /* ==================================================================== */
-#include "api_scilab.hxx"
+#include "double.hxx"
+#include "bool.hxx"
+#include "function.hxx"
 
+extern "C" 
+{
+#include "Scierror.h"
+#include "localization.h"
+}
 /* ==================================================================== */
-api_scilab::Status sci_cppfoo(api_scilab::input &in, int _iRetCount, api_scilab::output &out)
+types::Function::ReturnValue sci_cppfoo(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
     ////////// Check the number of input and output arguments //////////
     /* --> [c, d] = foo(a, b) */
@@ -14,48 +21,48 @@ api_scilab::Status sci_cppfoo(api_scilab::input &in, int _iRetCount, api_scilab:
     if (in.size() != 2)
     {
         Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "cppfoo", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     /* check that we have only 2 output argument */
     if (_iRetCount != 2)
     {
         Scierror(78, _("%s: Wrong number of output argument(s): %d expected."), "cppfoo", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     ////////// Manage the first input argument (double) //////////
 
     /* Check that the first input argument is a real matrix (and not complex) */
-    if (api_scilab::isDouble(in[0]) == false || api_scilab::getAsDouble(in[0])->isComplex())
+    if (in[0]->isDouble() == false)
     {
         Scierror(999, _("%s: Wrong type for input argument #%d: A real matrix expected.\n"), "cppfoo", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Double* pdbl = api_scilab::getAsDouble(in[0]);
+    types::Double* pdbl = in[0]->getAs<types::Double>();
 
     ////////// Manage the second input argument (boolean) //////////
-    if (api_scilab::isBool(in[1]) == false)
+    if (in[1]->isBool() == false)
     {
         Scierror(999, _("%s: Wrong type for input argument #%d: A boolean matrix expected.\n"), "cppfoo", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Bool* pb = api_scilab::getAsBool(in[1]);
+    types::Bool* pb = in[1]->getAs<types::Bool>();
 
 
     ////////// Application code //////////
     // Could be replaced by a call to a library
 
-    api_scilab::Double* pOut1 = new api_scilab::Double(pdbl->getDims(), pdbl->getDimsArray());
+    types::Double* pOut1 = new types::Double(pdbl->getDims(), pdbl->getDimsArray());
     for (int i = 0 ; i < pdbl->getSize() ; ++i)
     {
         /* For each element of the matrix, multiply by 2 */
         pOut1->set(i, pdbl->get(i) * 2);
     }
 
-    api_scilab::Bool* pOut2 = new api_scilab::Bool(pb->getDims(), pb->getDimsArray());
+    types::Bool* pOut2 = new types::Bool(pb->getDims(), pb->getDimsArray());
     for (int i = 0 ; i < pb->getSize() ; ++i)
     {
         /* For each element of the matrix, invert the value */
@@ -63,16 +70,11 @@ api_scilab::Status sci_cppfoo(api_scilab::input &in, int _iRetCount, api_scilab:
     }
 
     ////////// return output parameters //////////
-    out.push_back(api_scilab::getReturnVariable(pOut1));
-    out.push_back(api_scilab::getReturnVariable(pOut2));
+    out.push_back(pOut1);
+    out.push_back(pOut2);
 
-    //clear api variables
-    delete pdbl;
-    delete pb;
-    delete pOut1;
-    delete pOut2;
     //return gateway status
-    return api_scilab::OK;
+    return types::Function::OK;
 }
 /* ==================================================================== */
 
index 94808ec..27c30d6 100644 (file)
@@ -2,15 +2,18 @@
 /* Template toolbox_skeleton */
 /* This file is released under the 3-clause BSD license. See COPYING-BSD. */
 /* ==================================================================== */
-#include "api_scilab.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
+#include "Scierror.h"
+#include "localization.h"
 #include "multiplybypi.h"
 }
 
 /* ==================================================================== */
-api_scilab::Status sci_cppmultiplybypi(api_scilab::input &in, int _iRetCount, api_scilab::output &out)
+types::Function::ReturnValue sci_cppmultiplybypi(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
     /* --> result = multiplybypi(8) */
     /* --> result = multiplybypi([12, 42; 42, 12]) */
@@ -19,28 +22,28 @@ api_scilab::Status sci_cppmultiplybypi(api_scilab::input &in, int _iRetCount, ap
     if (in.size() != 1)
     {
         Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "cppmultiplybypi", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     /* check that we have only 1 output argument */
     if (_iRetCount != 1)
     {
         Scierror(78, _("%s: Wrong number of output argument(s): %d expected."), "cppmultiplybypi", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     /* check input type */
-    if (api_scilab::isDouble(in[0]) == false)
+    if (in[0]->isDouble() == false)
     {
         Scierror(999, _("%s: Wrong type for input argument #%d: A matrix expected.\n"), "cppmultiplybypi", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     /* get matrix */
-    api_scilab::Double* pdblIn = api_scilab::getAsDouble(in[0]);
+    types::Double* pdblIn = in[0]->getAs<types::Double>();
 
     //create output variable
-    api_scilab::Double* pdblOut = new api_scilab::Double(pdblIn->getDims(), pdblIn->getDimsArray());
+    types::Double* pdblOut = new types::Double(pdblIn->getDims(), pdblIn->getDimsArray());
 
     /* The difference with the csum & csub is that we give the argument as copy
      * and not as reference */
@@ -51,13 +54,10 @@ api_scilab::Status sci_cppmultiplybypi(api_scilab::input &in, int _iRetCount, ap
     }
 
     //set output paramter
-    out.push_back(api_scilab::getReturnVariable(pdblOut));
+    out.push_back(pdblOut);
 
-    //clear api variables
-    delete pdblIn;
-    delete pdblOut;
     //return gateway status
-    return api_scilab::OK;
+    return types::Function::OK;
 }
 /* ==================================================================== */
 
index 3eceb02..8c24527 100644 (file)
@@ -2,15 +2,18 @@
 /* Template toolbox_skeleton */
 /* This file is released under the 3-clause BSD license. See COPYING-BSD. */
 /* ==================================================================== */
-#include "api_scilab.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
+#include "Scierror.h"
+#include "localization.h"
 #include "csub.h"
 }
 
 /* ==================================================================== */
-api_scilab::Status sci_cppsub(api_scilab::input &in, int _iRetCount, api_scilab::output &out)
+types::Function::ReturnValue sci_cppsub(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
     /* --> result = csub(3,8)
 
@@ -18,58 +21,54 @@ api_scilab::Status sci_cppsub(api_scilab::input &in, int _iRetCount, api_scilab:
     if (in.size() != 2)
     {
         Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "cpp_sub", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     /* check that we have only 1 output argument */
     if (_iRetCount != 1)
     {
         Scierror(78, _("%s: Wrong number of output argument(s): %d expected."), "cpp_sub", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    if (api_scilab::isDouble(in[0]) == false)
+    if (in[0]->isDouble() == false)
     {
         Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), "cpp_sub", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Double* pIn1 = api_scilab::getAsDouble(in[0]);
+    types::Double* pIn1 = in[0]->getAs<types::Double>();
 
     if (in[1]->isDouble() == false)
     {
         Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), "cpp_sub", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Double* pIn2 = api_scilab::getAsDouble(in[1]);
+    types::Double* pIn2 = in[1]->getAs<types::Double>();
 
     /* check size */
     if (pIn1->getSize() != 1)
     {
         Scierror(999, _("%s: Wrong size for input argument #%d: A scalar expected.\n"), "cpp_sub", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     if (pIn2->getSize() != 1)
     {
         Scierror(999, _("%s: Wrong size for input argument #%d: A scalar expected.\n"), "cpp_sub", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Double* pOut = new api_scilab::Double(1, 1);
+    types::Double* pOut = new types::Double(1, 1);
     /* call c function csub */
     csub(pIn1->get(), pIn2->get(), pOut->get());
 
     /* return result */
-    out.push_back(api_scilab::getReturnVariable(pOut));
+    out.push_back(pOut);
 
-    //clear api variables
-    delete pIn2;
-    delete pIn1;
-    delete pOut;
     //return gateway status
-    return api_scilab::OK;
+    return types::Function::OK;
 }
 /* ==================================================================== */
 
index 41f9607..b909758 100644 (file)
@@ -2,15 +2,18 @@
 /* Template toolbox_skeleton */
 /* This file is released under the 3-clause BSD license. See COPYING-BSD. */
 /* ==================================================================== */
-#include "api_scilab.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
+#include "Scierror.h"
+#include "localization.h"
 #include "csum.h"
 }
 
 /* ==================================================================== */
-api_scilab::Status sci_cppsum(api_scilab::input &in, int _iRetCount, api_scilab::output &out)
+types::Function::ReturnValue sci_cppsum(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
     /* --> result = csum(3,8)
 
@@ -18,57 +21,53 @@ api_scilab::Status sci_cppsum(api_scilab::input &in, int _iRetCount, api_scilab:
     if (in.size() != 2)
     {
         Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "cpp_sum", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     /* check that we have only 1 output argument */
     if (_iRetCount != 1)
     {
         Scierror(78, _("%s: Wrong number of output argument(s): %d expected."), "cpp_sum", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    if (api_scilab::isDouble(in[0]) == false)
+    if (in[0]->isDouble() == false)
     {
         Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), "cpp_sum", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Double* pIn1 = api_scilab::getAsDouble(in[0]);
+    types::Double* pIn1 = in[0]->getAs<types::Double>();
     if (in[1]->isDouble() == false)
     {
         Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), "cpp_sum", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Double* pIn2 = api_scilab::getAsDouble(in[1]);
+    types::Double* pIn2 = in[1]->getAs<types::Double>();
 
     /* check size */
     if (pIn1->getSize() != 1)
     {
         Scierror(999, _("%s: Wrong size for input argument #%d: A scalar expected.\n"), "cpp_sum", 1);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
     if (pIn2->getSize() != 1)
     {
         Scierror(999, _("%s: Wrong size for input argument #%d: A scalar expected.\n"), "cpp_sum", 2);
-        return api_scilab::Error;
+        return types::Function::Error;
     }
 
-    api_scilab::Double* pOut = new api_scilab::Double(1, 1);
+    types::Double* pOut = new types::Double(1, 1);
     /* call c function csub */
     csum(pIn1->get(), pIn2->get(), pOut->get());
 
     /* return result */
-    out.push_back(api_scilab::getReturnVariable(pOut));
+    out.push_back(pOut);
 
-    //clear api variables
-    delete pIn2;
-    delete pIn1;
-    delete pOut;
     //return gateway status
-    return api_scilab::OK;
+    return types::Function::OK;
 }
 /* ==================================================================== */
 
index 76b87c1..f3d82ee 100644 (file)
@@ -22,15 +22,6 @@ API_SCILAB_CXX_SOURCES = \
     src/cpp/api_stack_optional.cpp \
     src/cpp/returnProperty.cpp \
     src/cpp/returnPropertyList.cpp \
-    src/cpp/api_boolean_cpp.cpp \
-    src/cpp/api_common_cpp.cpp \
-    src/cpp/api_double_cpp.cpp \
-    src/cpp/api_int_cpp.cpp \
-    src/cpp/api_list_cpp.cpp \
-    src/cpp/api_sparse_cpp.cpp \
-    src/cpp/api_string_cpp.cpp \
-    src/cpp/api_pointer_cpp.cpp \
-    src/cpp/api_handle_cpp.cpp \
     src/cpp/api_template_safe.cpp \
     src/cpp/api_template_unsafe.cpp \
     src/cpp/api_error.cpp
@@ -110,17 +101,6 @@ includes/api_stack_handle.h \
 includes/api_stack_optional.h \
 includes/api_scilab.h \
 includes/dynlib_api_scilab.h \
-includes/api_boolean.hxx \
-includes/api_common.hxx \
-includes/api_double.hxx \
-includes/api_handle.hxx \
-includes/api_int.hxx \
-includes/api_list.hxx \
-includes/api_pointer.hxx \
-includes/api_scilab.hxx \
-includes/api_sparse.hxx \
-includes/api_string.hxx \
-includes/api_variable.hxx \
 includes/api_boolean.h \
 includes/api_cell.h \
 includes/api_common.h \
index f86621c..41dd571 100644 (file)
@@ -195,15 +195,6 @@ am__objects_1 = src/cpp/libsciapi_scilab_la-api_stack_boolean.lo \
        src/cpp/libsciapi_scilab_la-api_stack_optional.lo \
        src/cpp/libsciapi_scilab_la-returnProperty.lo \
        src/cpp/libsciapi_scilab_la-returnPropertyList.lo \
-       src/cpp/libsciapi_scilab_la-api_boolean_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_common_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_double_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_int_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_list_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_sparse_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_string_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_pointer_cpp.lo \
-       src/cpp/libsciapi_scilab_la-api_handle_cpp.lo \
        src/cpp/libsciapi_scilab_la-api_template_safe.lo \
        src/cpp/libsciapi_scilab_la-api_template_unsafe.lo \
        src/cpp/libsciapi_scilab_la-api_error.lo
@@ -592,15 +583,6 @@ API_SCILAB_CXX_SOURCES = \
     src/cpp/api_stack_optional.cpp \
     src/cpp/returnProperty.cpp \
     src/cpp/returnPropertyList.cpp \
-    src/cpp/api_boolean_cpp.cpp \
-    src/cpp/api_common_cpp.cpp \
-    src/cpp/api_double_cpp.cpp \
-    src/cpp/api_int_cpp.cpp \
-    src/cpp/api_list_cpp.cpp \
-    src/cpp/api_sparse_cpp.cpp \
-    src/cpp/api_string_cpp.cpp \
-    src/cpp/api_pointer_cpp.cpp \
-    src/cpp/api_handle_cpp.cpp \
     src/cpp/api_template_safe.cpp \
     src/cpp/api_template_unsafe.cpp \
     src/cpp/api_error.cpp
@@ -671,17 +653,6 @@ includes/api_stack_handle.h \
 includes/api_stack_optional.h \
 includes/api_scilab.h \
 includes/dynlib_api_scilab.h \
-includes/api_boolean.hxx \
-includes/api_common.hxx \
-includes/api_double.hxx \
-includes/api_handle.hxx \
-includes/api_int.hxx \
-includes/api_list.hxx \
-includes/api_pointer.hxx \
-includes/api_scilab.hxx \
-includes/api_sparse.hxx \
-includes/api_string.hxx \
-includes/api_variable.hxx \
 includes/api_boolean.h \
 includes/api_cell.h \
 includes/api_common.h \
@@ -887,24 +858,6 @@ src/cpp/libsciapi_scilab_la-returnProperty.lo:  \
        src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
 src/cpp/libsciapi_scilab_la-returnPropertyList.lo:  \
        src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_boolean_cpp.lo:  \
-       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_common_cpp.lo:  \
-       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_double_cpp.lo:  \
-       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_int_cpp.lo: src/cpp/$(am__dirstamp) \
-       src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_list_cpp.lo: src/cpp/$(am__dirstamp) \
-       src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_sparse_cpp.lo:  \
-       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_string_cpp.lo:  \
-       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_pointer_cpp.lo:  \
-       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
-src/cpp/libsciapi_scilab_la-api_handle_cpp.lo:  \
-       src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
 src/cpp/libsciapi_scilab_la-api_template_safe.lo:  \
        src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
 src/cpp/libsciapi_scilab_la-api_template_unsafe.lo:  \
@@ -923,15 +876,7 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_boolean_cpp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_common_cpp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_double_cpp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_error.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_handle_cpp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_int_cpp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_list_cpp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_pointer_cpp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_sparse_cpp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_stack_boolean.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_stack_boolean_sparse.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_stack_common.Plo@am__quote@
@@ -946,7 +891,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_stack_poly.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_stack_sparse.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_stack_string.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_string_cpp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_template_safe.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_template_unsafe.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciapi_scilab_la-returnProperty.Plo@am__quote@
@@ -1088,69 +1032,6 @@ src/cpp/libsciapi_scilab_la-returnPropertyList.lo: src/cpp/returnPropertyList.cp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-returnPropertyList.lo `test -f 'src/cpp/returnPropertyList.cpp' || echo '$(srcdir)/'`src/cpp/returnPropertyList.cpp
 
-src/cpp/libsciapi_scilab_la-api_boolean_cpp.lo: src/cpp/api_boolean_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_boolean_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_boolean_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_boolean_cpp.lo `test -f 'src/cpp/api_boolean_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_boolean_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_boolean_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_boolean_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_boolean_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_boolean_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_boolean_cpp.lo `test -f 'src/cpp/api_boolean_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_boolean_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_common_cpp.lo: src/cpp/api_common_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_common_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_common_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_common_cpp.lo `test -f 'src/cpp/api_common_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_common_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_common_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_common_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_common_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_common_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_common_cpp.lo `test -f 'src/cpp/api_common_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_common_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_double_cpp.lo: src/cpp/api_double_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_double_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_double_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_double_cpp.lo `test -f 'src/cpp/api_double_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_double_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_double_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_double_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_double_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_double_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_double_cpp.lo `test -f 'src/cpp/api_double_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_double_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_int_cpp.lo: src/cpp/api_int_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_int_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_int_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_int_cpp.lo `test -f 'src/cpp/api_int_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_int_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_int_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_int_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_int_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_int_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_int_cpp.lo `test -f 'src/cpp/api_int_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_int_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_list_cpp.lo: src/cpp/api_list_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_list_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_list_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_list_cpp.lo `test -f 'src/cpp/api_list_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_list_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_list_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_list_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_list_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_list_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_list_cpp.lo `test -f 'src/cpp/api_list_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_list_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_sparse_cpp.lo: src/cpp/api_sparse_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_sparse_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_sparse_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_sparse_cpp.lo `test -f 'src/cpp/api_sparse_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_sparse_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_sparse_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_sparse_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_sparse_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_sparse_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_sparse_cpp.lo `test -f 'src/cpp/api_sparse_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_sparse_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_string_cpp.lo: src/cpp/api_string_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_string_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_string_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_string_cpp.lo `test -f 'src/cpp/api_string_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_string_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_string_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_string_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_string_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_string_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_string_cpp.lo `test -f 'src/cpp/api_string_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_string_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_pointer_cpp.lo: src/cpp/api_pointer_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_pointer_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_pointer_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_pointer_cpp.lo `test -f 'src/cpp/api_pointer_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_pointer_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_pointer_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_pointer_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_pointer_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_pointer_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_pointer_cpp.lo `test -f 'src/cpp/api_pointer_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_pointer_cpp.cpp
-
-src/cpp/libsciapi_scilab_la-api_handle_cpp.lo: src/cpp/api_handle_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_handle_cpp.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_handle_cpp.Tpo -c -o src/cpp/libsciapi_scilab_la-api_handle_cpp.lo `test -f 'src/cpp/api_handle_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_handle_cpp.cpp
-@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_handle_cpp.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_handle_cpp.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='src/cpp/api_handle_cpp.cpp' object='src/cpp/libsciapi_scilab_la-api_handle_cpp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciapi_scilab_la-api_handle_cpp.lo `test -f 'src/cpp/api_handle_cpp.cpp' || echo '$(srcdir)/'`src/cpp/api_handle_cpp.cpp
-
 src/cpp/libsciapi_scilab_la-api_template_safe.lo: src/cpp/api_template_safe.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciapi_scilab_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciapi_scilab_la-api_template_safe.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_template_safe.Tpo -c -o src/cpp/libsciapi_scilab_la-api_template_safe.lo `test -f 'src/cpp/api_template_safe.cpp' || echo '$(srcdir)/'`src/cpp/api_template_safe.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_template_safe.Tpo src/cpp/$(DEPDIR)/libsciapi_scilab_la-api_template_safe.Plo
index 07ca77c..60cd44a 100644 (file)
@@ -299,30 +299,21 @@ cd .. &gt;nul
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="src\cpp\api_stack_boolean.cpp" />
-    <ClCompile Include="src\cpp\api_boolean_cpp.cpp" />
     <ClCompile Include="src\cpp\api_stack_boolean_sparse.cpp" />
     <ClCompile Include="src\cpp\api_template_safe.cpp" />
     <ClCompile Include="src\cpp\api_stack_common.cpp" />
-    <ClCompile Include="src\cpp\api_common_cpp.cpp" />
     <ClCompile Include="src\cpp\api_error.cpp" />
     <ClCompile Include="src\cpp\api_stack_double.cpp" />
-    <ClCompile Include="src\cpp\api_double_cpp.cpp" />
     <ClCompile Include="src\cpp\api_stack_error.cpp" />
     <ClCompile Include="src\cpp\api_stack_handle.cpp" />
-    <ClCompile Include="src\cpp\api_handle_cpp.cpp" />
     <ClCompile Include="src\cpp\api_stack_hypermat.cpp" />
     <ClCompile Include="src\cpp\api_stack_int.cpp" />
-    <ClCompile Include="src\cpp\api_int_cpp.cpp" />
     <ClCompile Include="src\cpp\api_stack_list.cpp" />
-    <ClCompile Include="src\cpp\api_list_cpp.cpp" />
     <ClCompile Include="src\cpp\api_stack_optional.cpp" />
     <ClCompile Include="src\cpp\api_stack_pointer.cpp" />
-    <ClCompile Include="src\cpp\api_pointer_cpp.cpp" />
     <ClCompile Include="src\cpp\api_stack_poly.cpp" />
     <ClCompile Include="src\cpp\api_stack_sparse.cpp" />
-    <ClCompile Include="src\cpp\api_sparse_cpp.cpp" />
     <ClCompile Include="src\cpp\api_stack_string.cpp" />
-    <ClCompile Include="src\cpp\api_string_cpp.cpp" />
     <ClCompile Include="src\cpp\api_template_unsafe.cpp" />
     <ClCompile Include="src\cpp\returnProperty.cpp" />
     <ClCompile Include="src\cpp\returnPropertyList.cpp" />
@@ -337,31 +328,21 @@ cd .. &gt;nul
     <ClInclude Include="includes\api_optional.h" />
     <ClInclude Include="includes\api_poly.h" />
     <ClInclude Include="includes\api_stack_boolean.h" />
-    <ClInclude Include="includes\api_boolean.hxx" />
     <ClInclude Include="includes\api_stack_boolean_sparse.h" />
     <ClInclude Include="includes\api_cell.h" />
     <ClInclude Include="includes\api_stack_common.h" />
-    <ClInclude Include="includes\api_common.hxx" />
     <ClInclude Include="includes\api_double.h" />
     <ClInclude Include="includes\api_error.h" />
     <ClInclude Include="includes\api_stack_double.h" />
-    <ClInclude Include="includes\api_double.hxx" />
     <ClInclude Include="includes\api_stack_error.h" />
     <ClInclude Include="includes\api_stack_handle.h" />
-    <ClInclude Include="includes\api_handle.hxx" />
     <ClInclude Include="includes\api_stack_hypermat.h" />
     <ClInclude Include="includes\api_stack_int.h" />
-    <ClInclude Include="includes\api_int.hxx" />
-    <ClInclude Include="includes\api_list.hxx" />
     <ClInclude Include="includes\api_stack_optional.h" />
     <ClInclude Include="includes\api_pointer.hxx" />
-    <ClInclude Include="includes\api_scilab.hxx" />
-    <ClInclude Include="includes\api_sparse.hxx" />
     <ClInclude Include="includes\api_string.h" />
-    <ClInclude Include="includes\api_string.hxx" />
     <ClInclude Include="includes\api_struct.h" />
     <ClInclude Include="includes\api_pointer.h" />
-    <ClInclude Include="includes\api_variable.hxx" />
     <ClInclude Include="includes\returnProperty.h" />
     <ClInclude Include="includes\returnPropertyList.h" />
     <ClInclude Include="src\cpp\api_internal_boolean_sparse.h" />
index ed6b0c2..7432c70 100644 (file)
     <ClCompile Include="src\cpp\returnPropertyList.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\cpp\api_double_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_common_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_string_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_int_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_boolean_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_sparse_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_handle_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_pointer_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="src\cpp\api_list_cpp.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\cpp\api_stack_double.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClInclude Include="includes\returnPropertyList.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="includes\api_scilab.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_double.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_common.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_string.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_variable.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_int.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_boolean.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_sparse.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="includes\api_handle.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="includes\api_pointer.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="includes\api_list.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="includes\api_struct.h">
       <Filter>Header Files</Filter>
     </ClInclude>
diff --git a/scilab/modules/api_scilab/includes/api_boolean.hxx b/scilab/modules/api_scilab/includes/api_boolean.hxx
deleted file mode 100644 (file)
index 48f4cf5..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_BOOLEAN_HXX__
-#define __API_BOOLEAN_HXX__
-
-#include "bool.hxx"
-#include "api_variable.hxx"
-
-namespace api_scilab
-{
-class API_SCILAB_IMPEXP Bool : public MatrixT<int, types::Bool>
-{
-private :
-    //internal constructor for existing variable
-    Bool(types::Bool& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    Bool(bool _bVal);
-    Bool(int _bVal);
-    Bool(int _iRows, int _iCols);
-    Bool(int _iDims, int* _piDims);
-    Bool(int _iRows, int _iCols, int **_piData);
-    virtual ~Bool()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static Bool* getAsBool(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabBool;
-    }
-};
-}
-
-#ifdef _MSC_VER
-template class api_scilab::MatrixT<int, types::Bool>;
-#endif
-
-#endif /* !__API_BOOLEAN_HXX__ */
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/includes/api_common.hxx b/scilab/modules/api_scilab/includes/api_common.hxx
deleted file mode 100644 (file)
index c885530..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_COMMON_HXX__
-#define __API_COMMON_HXX__
-
-#include "api_scilab.hxx"
-#include "types.hxx"
-#include "function.hxx"
-
-namespace api_scilab
-{
-const types::Function::ReturnValue OK = types::Function::OK;
-const types::Function::ReturnValue Error = types::Function::Error;
-typedef types::Function::ReturnValue Status;
-typedef types::typed_list input;
-typedef types::typed_list output;
-typedef types::typed_list optional;
-API_SCILAB_IMPEXP types::InternalType::ScilabType getType(types::InternalType* _pIT);
-API_SCILAB_IMPEXP types::InternalType* getReturnVariable(Variable* _pVar);
-
-API_SCILAB_IMPEXP Variable* getAsVariable(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP bool isMatrix(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Matrix* getAsMatrix(types::InternalType* _pIT);
-
-/*Double*/
-API_SCILAB_IMPEXP bool isDouble(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Double* getAsDouble(types::InternalType* _pIT);
-
-/*String*/
-API_SCILAB_IMPEXP bool isString(types::InternalType* _pIT);
-API_SCILAB_IMPEXP String* getAsString(types::InternalType* _pIT);
-
-/*Boolean*/
-API_SCILAB_IMPEXP bool isBoolean(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isBool(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Bool* getAsBool(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Bool* getAsBoolean(types::InternalType* _pIT);
-
-/*Int*/
-API_SCILAB_IMPEXP bool isInt(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isInt8(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isUInt8(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isInt16(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isUInt16(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isInt32(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isUInt32(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isInt64(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isUInt64(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP Int8* getAsInt8(types::InternalType* _pIT);
-API_SCILAB_IMPEXP UInt8* getAsUInt8(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Int16* getAsInt16(types::InternalType* _pIT);
-API_SCILAB_IMPEXP UInt16* getAsUInt16(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Int32* getAsInt32(types::InternalType* _pIT);
-API_SCILAB_IMPEXP UInt32* getAsUInt32(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Int64* getAsInt64(types::InternalType* _pIT);
-API_SCILAB_IMPEXP UInt64* getAsUInt64(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP bool isSparse(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Sparse* getAsSparse(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP bool isHandle(types::InternalType* _pIT);
-API_SCILAB_IMPEXP bool isGraphicHandle(types::InternalType* _pIT);
-API_SCILAB_IMPEXP GraphicHandle* getAsHandle(types::InternalType* _pIT);
-API_SCILAB_IMPEXP GraphicHandle* getAsGraphicHandle(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP bool isPointer(types::InternalType* _pIT);
-API_SCILAB_IMPEXP Pointer* getAsPointer(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP bool isList(types::InternalType* _pIT);
-API_SCILAB_IMPEXP List* getAsList(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP bool isTList(types::InternalType* _pIT);
-API_SCILAB_IMPEXP TList* getAsTList(types::InternalType* _pIT);
-
-API_SCILAB_IMPEXP bool isMList(types::InternalType* _pIT);
-API_SCILAB_IMPEXP MList* getAsMList(types::InternalType* _pIT);
-}
-
-#endif /* ! __API_COMMON_HXX__ */
-
diff --git a/scilab/modules/api_scilab/includes/api_double.hxx b/scilab/modules/api_scilab/includes/api_double.hxx
deleted file mode 100644 (file)
index c711126..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_DOUBLE_HXX__
-#define __API_DOUBLE_HXX__
-
-#include "double.hxx"
-#include "api_variable.hxx"
-
-namespace api_scilab
-{
-class API_SCILAB_IMPEXP Double : public MatrixT<double, types::Double>
-{
-private :
-    //internal constructor for existing variable
-    Double(types::Double& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    Double(double _dbl);
-    Double(double _dblR, double _dblI);
-    Double(int _iRows, int _iCols, bool _bComplex = false);
-    Double(int _iRows, int _iCols, double** _pdbl);
-    Double(int _iRows, int _iCols, double** _pdblR, double** _pdblI);
-    Double(int _iDims, int* _piDims, bool _bComplex = false);
-    virtual ~Double()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static Double* getAsDouble(types::InternalType* _pdbl);
-    static Double* Empty();
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabDouble;
-    }
-};
-}
-
-#ifdef _MSC_VER
-template class api_scilab::MatrixT<double, types::Double>;
-#endif
-
-#endif /* !__API_DOUBLE_HXX__ */
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/includes/api_handle.hxx b/scilab/modules/api_scilab/includes/api_handle.hxx
deleted file mode 100644 (file)
index cd5980d..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_HANDLE_HXX__
-#define __API_HANDLE_HXX__
-
-#include "graphichandle.hxx"
-#include "api_variable.hxx"
-
-namespace api_scilab
-{
-class API_SCILAB_IMPEXP GraphicHandle : public MatrixT<long long, types::GraphicHandle>
-{
-private :
-    //internal constructor for existing variable
-    GraphicHandle(types::GraphicHandle& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    GraphicHandle(long long _handle);
-    GraphicHandle(int _iRows, int _iCols);
-    GraphicHandle(int _iDims, int* _piDims);
-    virtual ~GraphicHandle()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static GraphicHandle* getAsGraphicHandle(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabHandle;
-    }
-};
-}
-
-#ifdef _MSC_VER
-template class api_scilab::MatrixT<long long, types::GraphicHandle>;
-#endif
-
-#endif /* !__API_HANDLE_HXX__ */
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/includes/api_int.hxx b/scilab/modules/api_scilab/includes/api_int.hxx
deleted file mode 100644 (file)
index 75add9f..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_INT_HXX__
-#define __API_INT_HXX__
-
-#include "int.hxx"
-#include "api_variable.hxx"
-
-namespace api_scilab
-{
-class API_SCILAB_IMPEXP Int8 : public MatrixT<char, types::Int8>
-{
-private :
-    //internal constructor for existing variable
-    Int8(types::Int8& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    Int8(char _cVal);
-    Int8(int _iRows, int _iCols);
-    Int8(int _iDims, int* _piDims);
-    Int8(int _iRows, int _iCols, char** _pcData);
-    virtual ~Int8()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static Int8* getAsInt8(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabInt8;
-    }
-};
-
-class API_SCILAB_IMPEXP UInt8 : public MatrixT<unsigned char, types::UInt8>
-{
-private :
-    //internal constructor for existing variable
-    UInt8(types::UInt8& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    UInt8(unsigned char _ucVal);
-    UInt8(int _iRows, int _iCols);
-    UInt8(int _iDims, int* _piDims);
-    UInt8(int _iRows, int _iCols, unsigned char** _pucData);
-    virtual ~UInt8()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static UInt8* getAsUInt8(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabUInt8;
-    }
-};
-
-class API_SCILAB_IMPEXP Int16 : public MatrixT<short, types::Int16>
-{
-private :
-    //internal constructor for existing variable
-    Int16(types::Int16& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    Int16(short _sVal);
-    Int16(int _iRows, int _iCols);
-    Int16(int _iDims, int* _piDims);
-    Int16(int _iRows, int _iCols, short** _psData);
-    virtual ~Int16()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static Int16* getAsInt16(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabInt16;
-    }
-};
-
-class API_SCILAB_IMPEXP UInt16 : public MatrixT<unsigned short, types::UInt16>
-{
-private :
-    //internal constructor for existing variable
-    UInt16(types::UInt16& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    UInt16(unsigned short _usVal);
-    UInt16(int _iRows, int _iCols);
-    UInt16(int _iDims, int* _piDims);
-    UInt16(int _iRows, int _iCols, unsigned short** _pusData);
-    virtual ~UInt16()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static UInt16* getAsUInt16(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabUInt16;
-    }
-};
-
-class API_SCILAB_IMPEXP Int32 : public MatrixT<int, types::Int32>
-{
-private :
-    //internal constructor for existing variable
-    Int32(types::Int32& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    Int32(int _iVal);
-    Int32(int _iRows, int _iCols);
-    Int32(int _iDims, int* _piDims);
-    Int32(int _iRows, int _iCols, int** _piData);
-    virtual ~Int32()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static Int32* getAsInt32(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabInt32;
-    }
-};
-
-class API_SCILAB_IMPEXP UInt32 : public MatrixT<unsigned int, types::UInt32>
-{
-private :
-    //internal constructor for existing variable
-    UInt32(types::UInt32& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    UInt32(unsigned int _uiVal);
-    UInt32(int _iRows, int _iCols);
-    UInt32(int _iDims, int* _piDims);
-    UInt32(int _iRows, int _iCols, unsigned int** _puiData);
-    virtual ~UInt32()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static UInt32* getAsUInt32(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabUInt32;
-    }
-};
-
-class API_SCILAB_IMPEXP Int64 : public MatrixT<long long, types::Int64>
-{
-private :
-    //internal constructor for existing variable
-    Int64(types::Int64& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    Int64(long long _llVal);
-    Int64(int _iRows, int _iCols);
-    Int64(int _iDims, int* _piDims);
-    Int64(int _iRows, int _iCols, long long** _pllData);
-    virtual ~Int64()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static Int64* getAsInt64(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabInt64;
-    }
-};
-
-class API_SCILAB_IMPEXP UInt64 : public MatrixT<unsigned long long, types::UInt64>
-{
-private :
-    //internal constructor for existing variable
-    UInt64(types::UInt64& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    UInt64(unsigned long long _ullVal);
-    UInt64(int _iRows, int _iCols);
-    UInt64(int _iDims, int* _piDims);
-    UInt64(int _iRows, int _iCols, unsigned long long** _pullData);
-    virtual ~UInt64()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static UInt64* getAsUInt64(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabUInt64;
-    }
-};
-
-}
-
-#ifdef _MSC_VER
-template class api_scilab::MatrixT<char, types::Int8>;
-template class api_scilab::MatrixT<unsigned char, types::UInt8>;
-
-template class api_scilab::MatrixT<short, types::Int16>;
-template class api_scilab::MatrixT<unsigned short, types::UInt16>;
-
-template class api_scilab::MatrixT<int, types::Int32>;
-template class api_scilab::MatrixT<unsigned int, types::UInt32>;
-
-template class api_scilab::MatrixT<long long, types::Int64>;
-template class api_scilab::MatrixT<unsigned long long, types::UInt64>;
-#endif
-
-#endif /* !__API_DOUBLE_HXX__ */
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/includes/api_list.hxx b/scilab/modules/api_scilab/includes/api_list.hxx
deleted file mode 100644 (file)
index fe21985..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_LIST_HXX__
-#define __API_LIST_HXX__
-
-#include "list.hxx"
-#include "tlist.hxx"
-#include "mlist.hxx"
-#include "api_string.hxx"
-
-namespace api_scilab
-{
-class API_SCILAB_IMPEXP List : public Variable
-{
-protected :
-    types::List* data;
-    //internal constructor for existing variable
-    List(types::List& _p)
-    {
-        data = &_p;
-        created = false;
-    }
-
-public :
-    List();
-
-    virtual ~List()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-    void* getReturnVariable()
-    {
-        return (void*)data;
-    }
-    virtual types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabList;
-    }
-    static List* getAsList(types::InternalType* _pIT);
-    virtual int getSize();
-
-    virtual Variable* get(const int _iIndex);
-    virtual bool set(const int _iIndex, Variable* _pV);
-
-};
-
-class API_SCILAB_IMPEXP TList : public List
-{
-private:
-    TList(types::TList& _p)
-    {
-        data = &_p;
-        created = false;
-    }
-public :
-    TList();
-
-    virtual types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabTList;
-    }
-    static TList* getAsTList(types::InternalType* _pIT);
-
-    bool exists(const std::wstring& _sKey);
-    Variable* getField(const std::wstring& _sKey);
-    int getIndexFromString(const std::wstring& _sKey);
-    bool set(const std::wstring& _sKey, Variable* _pIT);
-    String* getFieldNames();
-};
-
-class API_SCILAB_IMPEXP MList : public TList
-{
-private:
-    MList(types::MList& _p)
-    {
-        data = &_p;
-        created = false;
-    }
-public :
-    MList();
-
-    virtual types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabMList;
-    }
-    static MList* getAsMList(types::InternalType* _pIT);
-};
-}
-
-#endif /* !__API_LIST_HXX__ */
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/includes/api_scilab.hxx b/scilab/modules/api_scilab/includes/api_scilab.hxx
deleted file mode 100644 (file)
index c592430..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
-*
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
-*/
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_SCILAB_HXX__
-#define __API_SCILAB_HXX__
-
-#include "dynlib_api_scilab.h"
-#include "api_variable.hxx"
-#include "api_double.hxx"
-#include "api_string.hxx"
-#include "api_boolean.hxx"
-#include "api_int.hxx"
-#include "api_sparse.hxx"
-#include "api_handle.hxx"
-#include "api_pointer.hxx"
-#include "api_list.hxx"
-#include "api_common.hxx"
-#include "function.hxx"
-
-extern "C"
-{
-#include "Scierror.h"
-#include "localization.h"
-}
-#endif /* ! __API_SCILAB_HXX__ */
-
diff --git a/scilab/modules/api_scilab/includes/api_sparse.hxx b/scilab/modules/api_scilab/includes/api_sparse.hxx
deleted file mode 100644 (file)
index fdac2b4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_SPARSE_HXX__
-#define __API_SPARSE_HXX__
-
-#include "sparse.hxx"
-#include "api_double.hxx"
-#include "api_variable.hxx"
-
-namespace api_scilab
-{
-class API_SCILAB_IMPEXP Sparse : public Variable
-{
-private :
-    types::Sparse* data;
-    //internal constructor for existing variable
-    Sparse(types::Sparse& _sp)
-    {
-        data = &_sp;
-        created = false;
-    }
-
-public :
-    Sparse(Double& _pdbl);
-    Sparse(int _iRows, int _iCols, bool _bComplex = false);
-    Sparse(Double& _dblAadj, Double& _dblAdjncy, Double& _dblSrc, std::size_t _iRows, std::size_t _iCols);
-    virtual ~Sparse()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-    void* getReturnVariable()
-    {
-        return (void*)data;
-    }
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabSparse;
-    }
-    static Sparse* getAsSparse(types::InternalType* _pIT);
-
-    int getSize();
-    int getRows();
-    int getCols();
-
-    bool isScalar();
-    void setComplex(bool _bComplex);
-    bool isComplex();
-
-    double getReal(int _iRows, int _iCols) const;
-    double getReal(int _iIndex) const;
-    double get(int _iRows, int _iCols) const;
-    double get(int _iIndex) const;
-    std::complex<double> getImg(int _iRows, int _iCols) const;
-    std::complex<double> getImg(int _iIndex) const;
-
-    int* getNbItemByRow(int* _piNbItemByRows);
-    int* getColPos(int* _piColPos);
-    int nonZeros() const;
-
-};
-}
-
-#endif /* !__API_SPARSE_HXX__ */
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/includes/api_string.hxx b/scilab/modules/api_scilab/includes/api_string.hxx
deleted file mode 100644 (file)
index 1e53156..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4275 )
-#endif
-
-#ifndef __API_STRING_HXX__
-#define __API_STRING_HXX__
-
-#include "string.hxx"
-#include "api_variable.hxx"
-
-namespace api_scilab
-{
-class API_SCILAB_IMPEXP String : public MatrixT<wchar_t*, types::String>
-{
-private :
-    //internal constructor for existing variable
-    String(types::String& _pdbl)
-    {
-        data = &_pdbl;
-        created = false;
-    }
-
-public :
-    String(int _iRows, int _iCols);
-    String(int _iDims, int* _piDims);
-    String(int _iRows, int _iCols, wchar_t** _pstData);
-    String(const wchar_t *_pstData);
-    String(const char *_pstData);
-
-    virtual ~String()
-    {
-        if (created)
-        {
-            delete data;
-        }
-    };
-
-    static String* getAsString(types::InternalType* _pdbl);
-
-    types::InternalType::ScilabType getType()
-    {
-        return types::InternalType::ScilabString;
-    }
-};
-}
-
-#ifdef _MSC_VER
-template class api_scilab::MatrixT<wchar_t*, types::String>;
-#endif
-
-#endif /* !__API_STRING_HXX__ */
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/includes/api_variable.hxx b/scilab/modules/api_scilab/includes/api_variable.hxx
deleted file mode 100644 (file)
index 11eb254..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
-*
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
-*/
-
-
-#ifndef __API_VARIABLE_HXX__
-#define __API_VARIABLE_HXX__
-
-#include "dynlib_api_scilab.h"
-#include "internal.hxx"
-
-namespace api_scilab
-{
-class Variable
-{
-private :
-protected :
-    bool created;
-public :
-    Variable() {};
-    virtual ~Variable() {};
-
-    virtual types::InternalType::ScilabType getType() = 0;
-    void setReturnVariable()
-    {
-        created = false;
-    }
-
-    virtual void* getReturnVariable() = 0;
-    virtual int getSize() = 0;
-};
-
-class Matrix : public Variable
-{
-public :
-    Matrix() {};
-    virtual ~Matrix() {};
-
-    virtual int getDims() = 0;
-    virtual int* getDimsArray() = 0;
-    virtual int getRows() = 0;
-    virtual int getCols() = 0;
-    virtual int getSize() = 0;
-    virtual bool isScalar() = 0;
-    virtual bool isVector() = 0;
-    virtual bool isRowVector() = 0;
-    virtual bool isColVector() = 0;
-    virtual bool isHypermatrix() = 0;
-};
-
-template<class XType> //XType is types::Double for example
-class VariableT : public Matrix
-{
-protected :
-    XType* data;
-
-public :
-    VariableT(): data(nullptr) {};
-    virtual ~VariableT() {};
-
-    virtual void* getReturnVariable()
-    {
-        return (void*)data;
-    }
-
-};
-
-template<class Type, class XType> //Type is double and XType is Double
-class MatrixT : public VariableT<XType>
-{
-public :
-    virtual Type* getReal()
-    {
-        return get();
-    }
-    virtual Type* get()
-    {
-        if (this->data)
-        {
-            return this->data->get();
-        }
-
-        return NULL;
-    }
-
-    virtual Type* getImg()
-    {
-        if (this->data)
-        {
-            return this->data->getImg();
-        }
-
-        return NULL;
-    }
-
-    virtual Type getReal(int _iIndex)
-    {
-        return get(_iIndex);
-    }
-    virtual Type get(int _iIndex)
-    {
-        if (this->data)
-        {
-            return this->data->get(_iIndex);
-        }
-
-        return 0;
-    }
-
-
-    virtual Type getImg(int _iIndex)
-    {
-        if (this->data)
-        {
-            return this->data->getImg(_iIndex);
-        }
-
-        return 0;
-    }
-
-    virtual Type getReal(int* _piCoordinates)
-    {
-        return get(_piCoordinates);
-    }
-    virtual Type get(int* _piCoordinates)
-    {
-        if (this->data)
-        {
-            int index = this->data->getIndex(_piCoordinates);
-            return this->data->get(index);
-        }
-
-        return 0;
-    }
-
-    virtual Type getImg(int* _piCoordinates)
-    {
-        if (this->data)
-        {
-            int index = this->data->getIndex(_piCoordinates);
-            return this->data->getImg(index);
-        }
-
-        return 0;
-    }
-
-    virtual void setReal(int _iIndex, Type _dbl)
-    {
-        set(_iIndex, _dbl);
-    }
-    virtual void set(int _iIndex, Type _dbl)
-    {
-        if (this->data)
-        {
-            this->data->set(_iIndex, _dbl);
-        }
-    }
-
-    virtual void setImg(int _iIndex, Type _dbl)
-    {
-        if (this->data)
-        {
-            this->data->setImg(_iIndex, _dbl);
-        }
-    }
-
-    virtual void setReal(int* _piCoordinates, Type _dbl)
-    {
-        set(_piCoordinates, _dbl);
-    }
-    virtual void set(int* _piCoordinates, Type _dbl)
-    {
-        if (this->data)
-        {
-            int index = this->data->getIndex(_piCoordinates);
-            this->data->set(index, _dbl);
-        }
-    }
-
-    virtual void setImg(int* _piCoordinates, Type _dbl)
-    {
-        if (this->data)
-        {
-            int index = this->data->getIndex(_piCoordinates);
-            this->data->setImg(index, _dbl);
-        }
-    }
-
-    virtual void setReal(Type* _pdblCopy)
-    {
-        set(_pdblCopy);
-    }
-    virtual void set(Type* _pdblCopy)
-    {
-        if (this->data)
-        {
-            this->data->set(_pdblCopy);
-        }
-    }
-
-    virtual void setImg(Type* _pdblCopy)
-    {
-        if (this->data)
-        {
-            this->data->setImg(_pdblCopy);
-        }
-    }
-
-    virtual int getDims()
-    {
-        if (this->data)
-        {
-            return this->data->getDims();
-        }
-
-        return 0;
-    }
-
-    virtual int* getDimsArray()
-    {
-        if (this->data)
-        {
-            return this->data->getDimsArray();
-        }
-
-        return NULL;
-    }
-
-    virtual int getRows()
-    {
-        if (this->data)
-        {
-            return this->data->getRows();
-        }
-
-        return 0;
-    }
-
-    virtual int getCols()
-    {
-        if (this->data)
-        {
-            return this->data->getCols();
-        }
-
-        return 0;
-    }
-
-    virtual int getSize()
-    {
-        if (this->data)
-        {
-            return this->data->getSize();
-        }
-
-        return 0;
-    }
-
-    virtual bool isScalar()
-    {
-        if (this->data)
-        {
-            return this->data->getSize() == 1;
-        }
-
-        return false;
-    }
-
-    virtual bool isVector()
-    {
-        if (this->data)
-        {
-            return this->data->isVector();
-        }
-
-        return false;
-    }
-
-    virtual bool isRowVector()
-    {
-        if (this->data)
-        {
-            if (this->data->isVector() && this->data->getDimsArray()[0] != 1)
-            {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    virtual bool isColVector()
-    {
-        if (this->data)
-        {
-            if (this->data->isVector() && this->data->getDimsArray()[1] != 1)
-            {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    virtual bool isHypermatrix()
-    {
-        if (this->data)
-        {
-            return this->data->getDims() > 2;
-        }
-
-        return false;
-    }
-
-    virtual bool isComplex()
-    {
-        if (this->data)
-        {
-            return this->data->isComplex();
-        }
-
-        return false;
-    }
-
-    virtual void setComplex(bool _bComplex)
-    {
-        if (this->data)
-        {
-            this->data->setComplex(_bComplex);
-        }
-    }
-
-};
-
-template <class XType>
-class Container : public VariableT<XType>
-{
-
-};
-}
-#endif /* ! __API_VARIABLE_HXX__ */
-
diff --git a/scilab/modules/api_scilab/src/cpp/api_boolean_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_boolean_cpp.cpp
deleted file mode 100644 (file)
index 5d8e47e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_boolean.hxx"
-
-namespace api_scilab
-{
-Bool::Bool(bool _bVal)
-{
-    data = new types::Bool(_bVal ? 1 : 0);
-    created = true;
-}
-
-Bool::Bool(int _bVal)
-{
-    data = new types::Bool(_bVal);
-    created = true;
-}
-
-Bool::Bool(int _iRows, int _iCols)
-{
-    data = new types::Bool(_iRows, _iCols);
-    created = true;
-}
-
-Bool::Bool(int _iDims, int* _piDims)
-{
-    data = new types::Bool(_iDims, _piDims);
-    created = true;
-}
-
-Bool::Bool(int _iRows, int _iCols, int **_piData)
-{
-    data = new types::Bool(_iRows, _iCols, _piData);
-    created = true;
-}
-
-Bool* Bool::getAsBool(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isBool())
-    {
-        return new Bool(*_pIT->getAs<types::Bool>());
-    }
-
-    return NULL;
-}
-}
diff --git a/scilab/modules/api_scilab/src/cpp/api_common_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_common_cpp.cpp
deleted file mode 100644 (file)
index 9423162..0000000
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_common.hxx"
-
-namespace api_scilab
-{
-types::InternalType::ScilabType getType(types::InternalType* _pIT)
-{
-    if (_pIT)
-    {
-        return _pIT->getType();
-    }
-
-    return types::InternalType::ScilabNull;
-}
-
-types::InternalType* getReturnVariable(Variable* _pVar)
-{
-    _pVar->setReturnVariable();
-    return (types::InternalType*)_pVar->getReturnVariable();
-}
-
-Variable* getAsVariable(types::InternalType* _pIT)
-{
-    Variable* pOut = NULL;
-
-    switch (_pIT->getType())
-    {
-        case types::InternalType::ScilabDouble :
-        {
-            return getAsDouble(_pIT);
-        }
-        case types::InternalType::ScilabString :
-        {
-            return getAsString(_pIT);
-        }
-        case types::InternalType::ScilabBool :
-        {
-            return getAsBoolean(_pIT);
-        }
-        case types::InternalType::ScilabSparse :
-        {
-            return getAsSparse(_pIT);
-        }
-        case types::InternalType::ScilabSparseBool :
-        {
-            //return getAsSparseBool(_pIT);
-            return NULL;
-        }
-        case types::InternalType::ScilabHandle :
-        {
-            return getAsHandle(_pIT);
-        }
-        case types::InternalType::ScilabUserType :
-        {
-            return getAsPointer(_pIT);
-        }
-        case types::InternalType::ScilabList :
-        {
-            return getAsList(_pIT);
-        }
-        case types::InternalType::ScilabMList :
-        {
-            return getAsMList(_pIT);
-        }
-        case types::InternalType::ScilabTList :
-        {
-            return getAsTList(_pIT);
-        }
-        case types::InternalType::ScilabPolynom :
-        {
-            //return getAsPolynom(_pIT);
-            return NULL;
-        }
-        case types::InternalType::ScilabStruct :
-        {
-            //return getAsStruct(_pIT);
-            return NULL;
-        }
-        default:
-        {
-            return NULL;
-        }
-    }
-
-    return NULL;
-}
-
-bool isMatrix(types::InternalType* _pIT)
-{
-    switch (_pIT->getType())
-    {
-        case types::InternalType::ScilabDouble :
-        case types::InternalType::ScilabString :
-        case types::InternalType::ScilabBool :
-        case types::InternalType::ScilabInt8 :
-        case types::InternalType::ScilabUInt8 :
-        case types::InternalType::ScilabInt16 :
-        case types::InternalType::ScilabUInt16 :
-        case types::InternalType::ScilabInt32 :
-        case types::InternalType::ScilabUInt32 :
-        case types::InternalType::ScilabInt64 :
-        case types::InternalType::ScilabUInt64 :
-        case types::InternalType::ScilabSparse :
-        case types::InternalType::ScilabSparseBool :
-        case types::InternalType::ScilabHandle :
-        {
-            return true;
-        }
-        default :
-        {
-            return false;
-        }
-    }
-}
-
-Matrix* getAsMatrix(types::InternalType* _pIT)
-{
-    if (isMatrix(_pIT))
-    {
-        return dynamic_cast<Matrix*>(getAsVariable(_pIT));
-    }
-
-    return NULL;
-}
-
-/* Double */
-bool isDouble(types::InternalType* _pIT)
-{
-    return _pIT->isDouble();
-}
-
-Double* getAsDouble(types::InternalType* _pIT)
-{
-    if (_pIT->isDouble())
-    {
-        return Double::getAsDouble(_pIT);
-    }
-
-    return NULL;
-}
-
-/* String */
-bool isString(types::InternalType* _pIT)
-{
-    return _pIT->isString();
-}
-
-String* getAsString(types::InternalType* _pIT)
-{
-    if (_pIT->isString())
-    {
-        return String::getAsString(_pIT);
-    }
-
-    return NULL;
-}
-
-/* Boolean */
-bool isBoolean(types::InternalType* _pIT)
-{
-    return _pIT->isBool();
-}
-
-bool isBool(types::InternalType* _pIT)
-{
-    return _pIT->isBool();
-}
-
-Bool* getAsBoolean(types::InternalType* _pIT)
-{
-    if (_pIT->isBool())
-    {
-        return Bool::getAsBool(_pIT);
-    }
-
-    return NULL;
-}
-
-Bool* getAsBool(types::InternalType* _pIT)
-{
-    if (_pIT->isBool())
-    {
-        return Bool::getAsBool(_pIT);
-    }
-
-    return NULL;
-}
-
-/* Int */
-bool isInt(types::InternalType* _pIT)
-{
-    return _pIT->isInt();
-}
-
-bool isInt8(types::InternalType* _pIT)
-{
-    return _pIT->isInt8();
-}
-
-bool isUInt8(types::InternalType* _pIT)
-{
-    return _pIT->isUInt8();
-}
-
-bool isInt16(types::InternalType* _pIT)
-{
-    return _pIT->isInt16();
-}
-
-bool isUInt16(types::InternalType* _pIT)
-{
-    return _pIT->isUInt16();
-}
-
-bool isInt32(types::InternalType* _pIT)
-{
-    return _pIT->isInt32();
-}
-
-bool isUInt32(types::InternalType* _pIT)
-{
-    return _pIT->isUInt32();
-}
-
-bool isInt64(types::InternalType* _pIT)
-{
-    return _pIT->isInt64();
-}
-
-bool isUInt64(types::InternalType* _pIT)
-{
-    return _pIT->isUInt64();
-}
-
-Int8* getAsInt8(types::InternalType* _pIT)
-{
-    if (_pIT->isInt8())
-    {
-        return Int8::getAsInt8(_pIT);
-    }
-
-    return NULL;
-}
-
-UInt8* getAsUInt8(types::InternalType* _pIT)
-{
-    if (_pIT->isUInt8())
-    {
-        return UInt8::getAsUInt8(_pIT);
-    }
-
-    return NULL;
-}
-
-Int16* getAsInt16(types::InternalType* _pIT)
-{
-    if (_pIT->isInt16())
-    {
-        return Int16::getAsInt16(_pIT);
-    }
-
-    return NULL;
-}
-
-UInt16* getAsUInt16(types::InternalType* _pIT)
-{
-    if (_pIT->isUInt16())
-    {
-        return UInt16::getAsUInt16(_pIT);
-    }
-
-    return NULL;
-}
-
-Int32* getAsInt32(types::InternalType* _pIT)
-{
-    if (_pIT->isInt32())
-    {
-        return Int32::getAsInt32(_pIT);
-    }
-
-    return NULL;
-}
-
-UInt32* getAsUInt32(types::InternalType* _pIT)
-{
-    if (_pIT->isUInt32())
-    {
-        return UInt32::getAsUInt32(_pIT);
-    }
-
-    return NULL;
-}
-
-Int64* getAsInt64(types::InternalType* _pIT)
-{
-    if (_pIT->isInt64())
-    {
-        return Int64::getAsInt64(_pIT);
-    }
-
-    return NULL;
-}
-
-UInt64* getAsUInt64(types::InternalType* _pIT)
-{
-    if (_pIT->isUInt64())
-    {
-        return UInt64::getAsUInt64(_pIT);
-    }
-
-    return NULL;
-}
-
-/* Sparse */
-bool isSparse(types::InternalType* _pIT)
-{
-    return _pIT->isSparse();
-}
-
-Sparse* getAsSparse(types::InternalType* _pIT)
-{
-    if (_pIT->isSparse())
-    {
-        return Sparse::getAsSparse(_pIT);
-    }
-
-    return NULL;
-}
-
-bool isHandle(types::InternalType* _pIT)
-{
-    return _pIT->isHandle();
-}
-
-bool isGraphicHandle(types::InternalType* _pIT)
-{
-    return _pIT->isHandle();
-}
-
-GraphicHandle* getAsHandle(types::InternalType* _pIT)
-{
-    if (_pIT->isHandle())
-    {
-        return GraphicHandle::getAsGraphicHandle(_pIT);
-    }
-
-    return NULL;
-}
-
-GraphicHandle* getAsGraphicHandle(types::InternalType* _pIT)
-{
-    if (_pIT->isHandle())
-    {
-        return GraphicHandle::getAsGraphicHandle(_pIT);
-    }
-
-    return NULL;
-}
-
-bool isPointer(types::InternalType* _pIT)
-{
-    return _pIT->isPointer();
-}
-
-Pointer* getAsPointer(types::InternalType* _pIT)
-{
-    if (_pIT->isPointer())
-    {
-        return Pointer::getAsPointer(_pIT);
-    }
-
-    return NULL;
-}
-
-bool isList(types::InternalType* _pIT)
-{
-    return _pIT->isList();
-}
-
-List* getAsList(types::InternalType* _pIT)
-{
-    if (_pIT->isList())
-    {
-        return List::getAsList(_pIT);
-    }
-
-    return NULL;
-}
-
-bool isTList(types::InternalType* _pIT)
-{
-    return _pIT->isTList();
-}
-
-TList* getAsTList(types::InternalType* _pIT)
-{
-    if (_pIT->isTList())
-    {
-        return TList::getAsTList(_pIT);
-    }
-
-    return NULL;
-}
-
-bool isMList(types::InternalType* _pIT)
-{
-    return _pIT->isMList();
-}
-
-MList* getAsMList(types::InternalType* _pIT)
-{
-    if (_pIT->isMList())
-    {
-        return MList::getAsMList(_pIT);
-    }
-
-    return NULL;
-}
-
-}
diff --git a/scilab/modules/api_scilab/src/cpp/api_double_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_double_cpp.cpp
deleted file mode 100644 (file)
index 2860116..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_double.hxx"
-
-namespace api_scilab
-{
-Double* Double::Empty()
-{
-    return new Double(0, 0);
-}
-
-Double::Double(double _dbl)
-{
-    data = new types::Double(_dbl);
-    created = true;
-}
-
-Double::Double(double _dblR, double _dblI)
-{
-    data = new types::Double(_dblR, _dblI);
-    created = true;
-}
-
-Double::Double(int _iRows, int _iCols, bool _bComplex)
-{
-    data = new types::Double(_iRows, _iCols, _bComplex);
-    created = true;
-}
-
-Double::Double(int _iRows, int _iCols, double** _pdbl)
-{
-    data = new types::Double(_iRows, _iCols, _pdbl);
-    created = true;
-}
-
-Double::Double(int _iRows, int _iCols, double** _pdblR, double** _pdblI)
-{
-    data = new types::Double(_iRows, _iCols, _pdblR, _pdblI);
-    created = true;
-}
-
-Double::Double(int _iDims, int* _piDims, bool _bComplex)
-{
-    data = new types::Double(_iDims, _piDims, _bComplex);
-    created = true;
-}
-
-Double* Double::getAsDouble(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isDouble())
-    {
-        return new Double(*_pIT->getAs<types::Double>());
-    }
-
-    return NULL;
-}
-}
diff --git a/scilab/modules/api_scilab/src/cpp/api_handle_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_handle_cpp.cpp
deleted file mode 100644 (file)
index fb18180..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_handle.hxx"
-
-namespace api_scilab
-{
-GraphicHandle::GraphicHandle(long long _handle)
-{
-    data = new types::GraphicHandle(_handle);
-    created = true;
-}
-
-GraphicHandle::GraphicHandle(int _iRows, int _iCols)
-{
-    data = new types::GraphicHandle(_iRows, _iCols);
-    created = true;
-}
-
-GraphicHandle::GraphicHandle(int _iDims, int* _piDims)
-{
-    data = new types::GraphicHandle(_iDims, _piDims);
-    created = true;
-}
-
-GraphicHandle* GraphicHandle::getAsGraphicHandle(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isHandle())
-    {
-        return new GraphicHandle(*_pIT->getAs<types::GraphicHandle>());
-    }
-
-    return NULL;
-}
-}
diff --git a/scilab/modules/api_scilab/src/cpp/api_int_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_int_cpp.cpp
deleted file mode 100644 (file)
index f6668ff..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_int.hxx"
-
-namespace api_scilab
-{
-Int8::Int8(char _cVal)
-{
-    data = new types::Int8(_cVal);
-    created = true;
-}
-
-Int8::Int8(int _iRows, int _iCols)
-{
-    data = new types::Int8(_iRows, _iCols);
-    created = true;
-}
-
-Int8::Int8(int _iDims, int* _piDims)
-{
-    data = new types::Int8(_iDims, _piDims);
-    created = true;
-}
-
-Int8::Int8(int _iRows, int _iCols, char** _pcData)
-{
-    data = new types::Int8(_iRows, _iCols, _pcData);
-    created = true;
-}
-
-Int8* Int8::getAsInt8(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isInt8())
-    {
-        return new Int8(*_pIT->getAs<types::Int8>());
-    }
-
-    return NULL;
-}
-
-UInt8::UInt8(unsigned char _ucVal)
-{
-    data = new types::UInt8(_ucVal);
-    created = true;
-}
-
-UInt8::UInt8(int _iRows, int _iCols)
-{
-    data = new types::UInt8(_iRows, _iCols);
-    created = true;
-}
-
-UInt8::UInt8(int _iDims, int* _piDims)
-{
-    data = new types::UInt8(_iDims, _piDims);
-    created = true;
-}
-
-UInt8::UInt8(int _iRows, int _iCols, unsigned char** _pucData)
-{
-    data = new types::UInt8(_iRows, _iCols, _pucData);
-    created = true;
-}
-
-UInt8* UInt8::getAsUInt8(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isUInt8())
-    {
-        return new UInt8(*_pIT->getAs<types::UInt8>());
-    }
-
-    return NULL;
-}
-
-Int16::Int16(short _sVal)
-{
-    data = new types::Int16(_sVal);
-    created = true;
-}
-
-Int16::Int16(int _iRows, int _iCols)
-{
-    data = new types::Int16(_iRows, _iCols);
-    created = true;
-}
-
-Int16::Int16(int _iDims, int* _piDims)
-{
-    data = new types::Int16(_iDims, _piDims);
-    created = true;
-}
-
-Int16::Int16(int _iRows, int _iCols, short** _psData)
-{
-    data = new types::Int16(_iRows, _iCols, _psData);
-    created = true;
-}
-
-Int16* Int16::getAsInt16(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isInt16())
-    {
-        return new Int16(*_pIT->getAs<types::Int16>());
-    }
-
-    return NULL;
-}
-
-UInt16::UInt16(unsigned short _usVal)
-{
-    data = new types::UInt16(_usVal);
-    created = true;
-}
-
-UInt16::UInt16(int _iRows, int _iCols)
-{
-    data = new types::UInt16(_iRows, _iCols);
-    created = true;
-}
-
-UInt16::UInt16(int _iDims, int* _piDims)
-{
-    data = new types::UInt16(_iDims, _piDims);
-    created = true;
-}
-
-UInt16::UInt16(int _iRows, int _iCols, unsigned short** _pusData)
-{
-    data = new types::UInt16(_iRows, _iCols, _pusData);
-    created = true;
-}
-
-UInt16* UInt16::getAsUInt16(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isUInt16())
-    {
-        return new UInt16(*_pIT->getAs<types::UInt16>());
-    }
-
-    return NULL;
-}
-
-Int32::Int32(int _iVal)
-{
-    data = new types::Int32(_iVal);
-    created = true;
-}
-
-Int32::Int32(int _iRows, int _iCols)
-{
-    data = new types::Int32(_iRows, _iCols);
-    created = true;
-}
-
-Int32::Int32(int _iDims, int* _piDims)
-{
-    data = new types::Int32(_iDims, _piDims);
-    created = true;
-}
-
-Int32::Int32(int _iRows, int _iCols, int** _piData)
-{
-    data = new types::Int32(_iRows, _iCols, _piData);
-    created = true;
-}
-
-Int32* Int32::getAsInt32(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isInt32())
-    {
-        return new Int32(*_pIT->getAs<types::Int32>());
-    }
-
-    return NULL;
-}
-
-UInt32::UInt32(unsigned int _uiVal)
-{
-    data = new types::UInt32(_uiVal);
-    created = true;
-}
-
-UInt32::UInt32(int _iRows, int _iCols)
-{
-    data = new types::UInt32(_iRows, _iCols);
-    created = true;
-}
-
-UInt32::UInt32(int _iDims, int* _piDims)
-{
-    data = new types::UInt32(_iDims, _piDims);
-    created = true;
-}
-
-UInt32::UInt32(int _iRows, int _iCols, unsigned int** _puiData)
-{
-    data = new types::UInt32(_iRows, _iCols, _puiData);
-    created = true;
-}
-
-UInt32* UInt32::getAsUInt32(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isUInt32())
-    {
-        return new UInt32(*_pIT->getAs<types::UInt32>());
-    }
-
-    return NULL;
-}
-
-Int64::Int64(long long _llVal)
-{
-    data = new types::Int64(_llVal);
-    created = true;
-}
-
-Int64::Int64(int _iRows, int _iCols)
-{
-    data = new types::Int64(_iRows, _iCols);
-    created = true;
-}
-
-Int64::Int64(int _iDims, int* _piDims)
-{
-    data = new types::Int64(_iDims, _piDims);
-    created = true;
-}
-
-Int64::Int64(int _iRows, int _iCols, long long** _pllData)
-{
-    data = new types::Int64(_iRows, _iCols, _pllData);
-    created = true;
-}
-
-Int64* Int64::getAsInt64(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isInt64())
-    {
-        return new Int64(*_pIT->getAs<types::Int64>());
-    }
-
-    return NULL;
-}
-
-UInt64::UInt64(unsigned long long _ullVal)
-{
-    data = new types::UInt64(_ullVal);
-    created = true;
-}
-
-UInt64::UInt64(int _iRows, int _iCols)
-{
-    data = new types::UInt64(_iRows, _iCols);
-    created = true;
-}
-
-UInt64::UInt64(int _iDims, int* _piDims)
-{
-    data = new types::UInt64(_iDims, _piDims);
-    created = true;
-}
-
-UInt64::UInt64(int _iRows, int _iCols, unsigned long long** _pullData)
-{
-    data = new types::UInt64(_iRows, _iCols, _pullData);
-    created = true;
-}
-
-UInt64* UInt64::getAsUInt64(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isUInt64())
-    {
-        return new UInt64(*_pIT->getAs<types::UInt64>());
-    }
-
-    return NULL;
-}
-}
diff --git a/scilab/modules/api_scilab/src/cpp/api_list_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_list_cpp.cpp
deleted file mode 100644 (file)
index eb5cf3d..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_list.hxx"
-#include "api_common.hxx"
-
-namespace api_scilab
-{
-List::List()
-{
-    data = new types::List();
-    created = true;
-}
-
-List* List::getAsList(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isList())
-    {
-        return new List(*_pIT->getAs<types::List>());
-    }
-
-    return NULL;
-}
-
-int List::getSize()
-{
-    if (data)
-    {
-        return data->getSize();
-    }
-
-    return 0;
-}
-
-Variable* List::get(const int _iIndex)
-{
-    if (data)
-    {
-        return getAsVariable(data->get(_iIndex));
-    }
-
-    return NULL;
-}
-
-bool List::set(const int _iIndex, Variable* _pV)
-{
-    if (data)
-    {
-        data->set(_iIndex, (types::InternalType*)_pV->getReturnVariable());
-    }
-
-    return false;
-}
-
-TList::TList()
-{
-    data = new types::TList();
-    created = true;
-}
-
-TList* TList::getAsTList(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isTList())
-    {
-        return new TList(*_pIT->getAs<types::TList>());
-    }
-
-    return NULL;
-}
-
-bool TList::exists(const std::wstring& _sKey)
-{
-    if (data)
-    {
-        return ((types::TList*)data)->exists(_sKey);
-    }
-
-    return false;
-}
-
-Variable* TList::getField(const std::wstring& _sKey)
-{
-    if (data)
-    {
-        return getAsVariable(((types::TList*)data)->getField(_sKey));
-    }
-
-    return NULL;
-}
-
-int TList::getIndexFromString(const std::wstring& _sKey)
-{
-    if (data)
-    {
-        return ((types::TList*)data)->getIndexFromString(_sKey);
-    }
-
-    return -1;
-}
-
-bool TList::set(const std::wstring& _sKey, Variable* _pV)
-{
-    if (data)
-    {
-        return ((types::TList*)data)->set(_sKey, (types::InternalType*)_pV->getReturnVariable()) != nullptr;
-    }
-
-    return false;
-}
-
-String* TList::getFieldNames()
-{
-    if (data)
-    {
-        return getAsString(((types::TList*)data)->getFieldNames());
-    }
-
-    return NULL;
-}
-
-
-MList::MList()
-{
-    data = new types::MList();
-    created = true;
-}
-
-MList* MList::getAsMList(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isMList())
-    {
-        return new MList(*_pIT->getAs<types::MList>());
-    }
-
-    return NULL;
-}
-}
\ No newline at end of file
diff --git a/scilab/modules/api_scilab/src/cpp/api_pointer_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_pointer_cpp.cpp
deleted file mode 100644 (file)
index bbc4263..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_pointer.hxx"
-
-namespace api_scilab
-{
-Pointer::Pointer()
-{
-    data = new types::Pointer();
-    created = true;
-}
-
-Pointer::Pointer(void* _p)
-{
-    data = new types::Pointer(_p);
-    created = true;
-}
-
-Pointer* Pointer::getAsPointer(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isPointer())
-    {
-        return new Pointer(*_pIT->getAs<types::Pointer>());
-    }
-
-    return NULL;
-}
-
-int Pointer::getSize()
-{
-    return 1;
-}
-
-void* Pointer::get()
-{
-    if (data)
-    {
-        return data->get();
-    }
-
-    return NULL;
-}
-
-void Pointer::set(void* _p)
-{
-    if (data)
-    {
-        return data->set(_p);
-    }
-}
-}
diff --git a/scilab/modules/api_scilab/src/cpp/api_sparse_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_sparse_cpp.cpp
deleted file mode 100644 (file)
index e238db7..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_sparse.hxx"
-#include "double.hxx"
-
-namespace api_scilab
-{
-Sparse::Sparse(Double& _pdbl)
-{
-    types::Double* pdbl = (types::Double*)_pdbl.getReturnVariable();
-    if (pdbl)
-    {
-        data = new types::Sparse(*pdbl);
-    }
-    else
-    {
-        data = new types::Sparse(1, 1);
-        data->set(0, 0);
-    }
-
-    created = true;
-}
-
-Sparse::Sparse(int _iRows, int _iCols, bool _bComplex)
-{
-    data = new types::Sparse(_iRows, _iCols, _bComplex);
-    created = true;
-}
-
-Sparse::Sparse(Double& _dblAadj, Double& _dblAdjncy, Double& _dblSrc, std::size_t _iRows, std::size_t _iCols)
-{
-    types::Double* pdblAadj = (types::Double*)_dblAadj.getReturnVariable();
-    types::Double* pdblAdjncy = (types::Double*)_dblAdjncy.getReturnVariable();
-    types::Double* pdblSrc = (types::Double*)_dblSrc.getReturnVariable();
-
-    if (pdblAadj && pdblAdjncy && pdblSrc)
-    {
-        data = new types::Sparse(*pdblAadj, *pdblAdjncy, *pdblSrc, _iRows, _iCols);
-    }
-    else
-    {
-        data = new types::Sparse(1, 1);
-        data->set(0, 0);
-    }
-    created = true;
-}
-
-Sparse* Sparse::getAsSparse(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isSparse())
-    {
-        return new Sparse(*_pIT->getAs<types::Sparse>());
-    }
-
-    return NULL;
-}
-
-int Sparse::getSize()
-{
-    return data->getSize();
-}
-
-int Sparse::getRows()
-{
-    if (data)
-    {
-        return data->getRows();
-    }
-
-    return 0;
-}
-
-int Sparse::getCols()
-{
-    if (data)
-    {
-        return data->getCols();
-    }
-
-    return 0;
-}
-
-bool Sparse::isScalar()
-{
-    if (data)
-    {
-        return data->isScalar();
-    }
-
-    return false;
-}
-
-bool Sparse::isComplex()
-{
-    if (data)
-    {
-        return data->isComplex();
-    }
-
-    return false;
-}
-
-double Sparse::getReal(int _iRows, int _iCols) const
-{
-    if (data)
-    {
-        return data->getReal(_iRows, _iCols);
-    }
-
-    return 0;
-}
-
-double Sparse::getReal(int _iIndex) const
-{
-    if (data)
-    {
-        return data->getReal(_iIndex);
-    }
-
-    return 0;
-}
-
-double Sparse::get(int _iRows, int _iCols) const
-{
-    if (data)
-    {
-        return data->get(_iRows, _iCols);
-    }
-
-    return 0;
-}
-
-double Sparse::get(int _iIndex) const
-{
-    if (data)
-    {
-        return data->get(_iIndex);
-    }
-
-    return 0;
-}
-
-std::complex<double> Sparse::getImg(int _iRows, int _iCols) const
-{
-    if (data)
-    {
-        return data->getImg(_iRows, _iCols);
-    }
-
-    return 0;
-}
-
-std::complex<double> Sparse::getImg(int _iIndex) const
-{
-    if (data)
-    {
-        return data->getImg(_iIndex);
-    }
-
-    return 0;
-}
-
-void Sparse::setComplex(bool _bComplex)
-{
-    if (data && data->isComplex() == false)
-    {
-        data->toComplex();
-    }
-}
-
-int* Sparse::getNbItemByRow(int* _piNbItemByRows)
-{
-    if (data)
-    {
-        return data->getNbItemByRow(_piNbItemByRows);
-    }
-
-    return NULL;
-}
-
-int* Sparse::getColPos(int* _piColPos)
-{
-    if (data)
-    {
-        return data->getColPos(_piColPos);
-    }
-
-    return NULL;
-}
-
-int Sparse::nonZeros() const
-{
-    if (data)
-    {
-        return (int)data->nonZeros();
-    }
-
-    return 0;
-}
-
-}
diff --git a/scilab/modules/api_scilab/src/cpp/api_string_cpp.cpp b/scilab/modules/api_scilab/src/cpp/api_string_cpp.cpp
deleted file mode 100644 (file)
index a11e82d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- */
-
-#include "api_string.hxx"
-
-namespace api_scilab
-{
-String::String(int _iRows, int _iCols)
-{
-    data = new types::String(_iRows, _iCols);
-    created = true;
-}
-
-String::String(int _iDims, int* _piDims)
-{
-    data = new types::String(_iDims, _piDims);
-    created = true;
-}
-
-String::String(int _iRows, int _iCols, wchar_t** _pwstData)
-{
-    data = new types::String(_iRows, _iRows, _pwstData);
-    created = true;
-}
-
-String::String(const wchar_t *_pwstData)
-{
-    data = new types::String(_pwstData);
-    created = true;
-}
-
-String::String(const char *_pstData)
-{
-    data = new types::String(_pstData);
-    created = true;
-}
-
-String* String::getAsString(types::InternalType* _pIT)
-{
-    if (_pIT && _pIT->isString())
-    {
-        return new String(*_pIT->getAs<types::String>());
-    }
-
-    return NULL;
-}
-}
index 4f53169..5e83f77 100644 (file)
@@ -18,7 +18,8 @@
 #include <cmath>
 
 #include "elem_func_gw.hxx"
-#include "api_scilab.hxx"
+#include "double.hxx"
+#include "int.hxx"
 #include "function.hxx"
 #include "overload.hxx"
 #include "polynom.hxx"
@@ -68,8 +69,8 @@ types::Function::ReturnValue sci_abs(types::typed_list &in, int _iRetCount, type
     {
         case types::InternalType::ScilabDouble:
         {
-            api_scilab::Double* pDblIn = api_scilab::getAsDouble(in[0]);
-            api_scilab::Double* pDblOut = new api_scilab::Double(pDblIn->getDims(), pDblIn->getDimsArray());
+            types::Double* pDblIn = in[0]->getAs<types::Double>();
+            types::Double* pDblOut = new types::Double(pDblIn->getDims(), pDblIn->getDimsArray());
 
             double* pdblInR = pDblIn->get();
             double* pdblInI = pDblIn->getImg();
@@ -108,9 +109,7 @@ types::Function::ReturnValue sci_abs(types::typed_list &in, int _iRetCount, type
                 }
             }
 
-            out.push_back(api_scilab::getReturnVariable(pDblOut));
-            delete pDblOut;
-            delete pDblIn;
+            out.push_back(pDblOut);
             break;
         }
         case types::InternalType::ScilabPolynom: