differential_equations is no more a dynamic module 76/14576/3
Vincent COUVERT [Tue, 27 May 2014 15:42:24 +0000 (17:42 +0200)]
Change-Id: Ibbcdf2913b255f6306ea12d13480959f492850c8

scilab/modules/differential_equations/Makefile.am
scilab/modules/differential_equations/Makefile.in
scilab/modules/differential_equations/includes/differential_equations_gw.hxx
scilab/modules/differential_equations/includes/dynlib_differential_equations_gw.h
scilab/modules/differential_equations/sci_gateway/cpp/differential_equations_gw.cpp [new file with mode: 0644]
scilab/modules/differential_equations/sci_gateway/differential_equations_gw.vcxproj
scilab/modules/differential_equations/sci_gateway/differential_equations_gw.vcxproj.filters
scilab/modules/functions_manager/functions_manager.vcxproj
scilab/modules/functions_manager/includes/dynamic_modules.hxx
scilab/modules/functions_manager/src/cpp/dynamic_modules.cpp
scilab/modules/javasci/Makefile.in

index d2d2ebe..29273de 100644 (file)
@@ -88,6 +88,7 @@ sci_gateway/fortran/Ex-dassl.f \
 sci_gateway/fortran/Ex-bvode.f
 
 GATEWAY_CPP_SOURCES = \
+sci_gateway/cpp/differential_equations_gw.cpp \
 sci_gateway/cpp/sci_int2d.cpp \
 sci_gateway/cpp/sci_int3d.cpp \
 sci_gateway/cpp/sci_intg.cpp \
index eb030a1..9197e4e 100644 (file)
@@ -218,7 +218,7 @@ am__objects_4 = sci_gateway/fortran/Ex-ode.lo \
        sci_gateway/fortran/Ex-dasrt.lo \
        sci_gateway/fortran/Ex-dassl.lo \
        sci_gateway/fortran/Ex-bvode.lo
-am__objects_5 =  \
+am__objects_5 = sci_gateway/cpp/libscidifferential_equations_la-differential_equations_gw.lo \
        sci_gateway/cpp/libscidifferential_equations_la-sci_int2d.lo \
        sci_gateway/cpp/libscidifferential_equations_la-sci_int3d.lo \
        sci_gateway/cpp/libscidifferential_equations_la-sci_intg.lo \
@@ -703,6 +703,7 @@ sci_gateway/fortran/Ex-dassl.f \
 sci_gateway/fortran/Ex-bvode.f
 
 GATEWAY_CPP_SOURCES = \
+sci_gateway/cpp/differential_equations_gw.cpp \
 sci_gateway/cpp/sci_int2d.cpp \
 sci_gateway/cpp/sci_int3d.cpp \
 sci_gateway/cpp/sci_intg.cpp \
@@ -1099,6 +1100,9 @@ sci_gateway/cpp/$(am__dirstamp):
 sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) sci_gateway/cpp/$(DEPDIR)
        @: > sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libscidifferential_equations_la-differential_equations_gw.lo:  \
+       sci_gateway/cpp/$(am__dirstamp) \
+       sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/cpp/libscidifferential_equations_la-sci_int2d.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
@@ -1152,6 +1156,7 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-differential_equations_gw.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-sci_bvode.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-sci_daskr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-sci_dasrt.Plo@am__quote@
@@ -1284,6 +1289,13 @@ src/cpp/libscidifferential_equations_algo_la-differentialequationfunctions.lo: s
 @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) $(libscidifferential_equations_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libscidifferential_equations_algo_la-differentialequationfunctions.lo `test -f 'src/cpp/differentialequationfunctions.cpp' || echo '$(srcdir)/'`src/cpp/differentialequationfunctions.cpp
 
+sci_gateway/cpp/libscidifferential_equations_la-differential_equations_gw.lo: sci_gateway/cpp/differential_equations_gw.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscidifferential_equations_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscidifferential_equations_la-differential_equations_gw.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-differential_equations_gw.Tpo -c -o sci_gateway/cpp/libscidifferential_equations_la-differential_equations_gw.lo `test -f 'sci_gateway/cpp/differential_equations_gw.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/differential_equations_gw.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-differential_equations_gw.Tpo sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-differential_equations_gw.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/differential_equations_gw.cpp' object='sci_gateway/cpp/libscidifferential_equations_la-differential_equations_gw.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) $(libscidifferential_equations_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libscidifferential_equations_la-differential_equations_gw.lo `test -f 'sci_gateway/cpp/differential_equations_gw.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/differential_equations_gw.cpp
+
 sci_gateway/cpp/libscidifferential_equations_la-sci_int2d.lo: sci_gateway/cpp/sci_int2d.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscidifferential_equations_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscidifferential_equations_la-sci_int2d.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-sci_int2d.Tpo -c -o sci_gateway/cpp/libscidifferential_equations_la-sci_int2d.lo `test -f 'sci_gateway/cpp/sci_int2d.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_int2d.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-sci_int2d.Tpo sci_gateway/cpp/$(DEPDIR)/libscidifferential_equations_la-sci_int2d.Plo
index 800a683..12d17cd 100644 (file)
@@ -20,25 +20,35 @@ extern "C"
 #include "dynlib_differential_equations_gw.h"
 }
 
+class DifferentialEquationsModule
+{
+private :
+    DifferentialEquationsModule() {};
+    ~DifferentialEquationsModule() {};
+
+public :
+    DIFFERENTIAL_EQUATIONS_GW_IMPEXP static int Load();
+};
+
 // equation 1
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_ode, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);
+CPP_GATEWAY_PROTOTYPE(sci_ode);
 
 // equation 2
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_impl, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);    // Old function name was sciimpl
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_dassl, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);   // Old function name dassli
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_dasrt, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);   // Old function name was dasrti
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_daskr, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);
+CPP_GATEWAY_PROTOTYPE(sci_impl);    // Old function name was sciimpl
+CPP_GATEWAY_PROTOTYPE(sci_dassl);   // Old function name dassli
+CPP_GATEWAY_PROTOTYPE(sci_dasrt);   // Old function name was dasrti
+CPP_GATEWAY_PROTOTYPE(sci_daskr);
 
 // equation 3
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_odedc, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);   // Old function name was sci_odc
+CPP_GATEWAY_PROTOTYPE(sci_odedc);   // Old function name was sci_odc
 
 // equation 4
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_intg, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_int2d, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_int3d, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_feval, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);
+CPP_GATEWAY_PROTOTYPE(sci_intg);
+CPP_GATEWAY_PROTOTYPE(sci_int2d);
+CPP_GATEWAY_PROTOTYPE(sci_int3d);
+CPP_GATEWAY_PROTOTYPE(sci_feval);
 
 // equation 6
-CPP_GATEWAY_PROTOTYPE_EXPORT(sci_bvode, DIFFERENTIAL_EQUATIONS_GW_IMPEXP);   // Old function name was scibvode
+CPP_GATEWAY_PROTOTYPE(sci_bvode);   // Old function name was scibvode
 
 #endif /* !__DIFFERENTIAL_EQUATIONS_GW_HXX__ */
index 4105fd6..82d7e0b 100644 (file)
@@ -11,8 +11,8 @@
 */
 
 /*--------------------------------------------------------------------------*/
-#ifndef __DYNLIB_DIFFERENTIAL_EQUATIONS_GW_H__
-#define __DYNLIB_DIFFERENTIAL_EQUATIONS_GW_H__
+#ifndef __DIFFERENTIAL_EQUATIONS_GW_H__
+#define __DIFFERENTIAL_EQUATIONS_GW_H__
 
 #ifdef _MSC_VER
 #ifdef DIFFERENTIAL_EQUATIONS_GW_EXPORTS
@@ -24,5 +24,5 @@
 #define DIFFERENTIAL_EQUATIONS_GW_IMPEXP
 #endif
 
-#endif /* __DYNLIB_DIFFERENTIAL_EQUATIONS_GW_H__ */
+#endif /* __DIFFERENTIAL_EQUATIONS_GW_H__ */
 /*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/differential_equations_gw.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/differential_equations_gw.cpp
new file mode 100644 (file)
index 0000000..35c2d69
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2014 - Scilab Enterprises - Vincent COUVERT
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "differential_equations_gw.hxx"
+#include "function.hxx"
+#include "context.hxx"
+
+#define MODULE_NAME L"differential_equations"
+
+using namespace types;
+
+int DifferentialEquationsModule::Load()
+{
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"ode", &sci_ode, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"impl", &sci_impl, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"dassl", &sci_dassl, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"dasrt", &sci_dasrt, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"daskr", &sci_daskr, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"odedc", &sci_odedc, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"intg", &sci_intg, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"int2d", &sci_int2d, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"int3d", &sci_int3d, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"feval", &sci_feval, NULL, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"bvode", &sci_bvode, NULL, MODULE_NAME));
+    return 1;
+}
index e44c503..5608601 100644 (file)
     <ClInclude Include="..\includes\dynlib_differential_equations_gw.h" />
   </ItemGroup>
   <ItemGroup>
+    <ClCompile Include="cpp\differential_equations_gw.cpp" />
     <ClCompile Include="cpp\sci_bvode.cpp" />
     <ClCompile Include="cpp\sci_daskr.cpp" />
     <ClCompile Include="cpp\sci_dasrt.cpp" />
index 75962ff..738e8ae 100644 (file)
@@ -61,6 +61,9 @@
     <ClCompile Include="cpp\sci_daskr.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="cpp\differential_equations_gw.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="differential_equations_f_Import.def">
index d0069e4..daa72fe 100644 (file)
     <ProjectReference Include="..\data_structures\src\c\data_structures.vcxproj">
       <Project>{b7a168a0-dfc0-4c6d-b0cc-6079912a4a76}</Project>
     </ProjectReference>
+    <ProjectReference Include="..\differential_equations\sci_gateway\differential_equations_gw.vcxproj">
+      <Project>{99d6bdd6-2226-43a1-b0fa-9d412bbca6dd}</Project>
+    </ProjectReference>
     <ProjectReference Include="..\dynamic_link\sci_gateway\cpp\dynamic_link_gw.vcxproj">
       <Project>{f93ff3ee-217a-4554-ab17-2f8d56b4bf4b}</Project>
     </ProjectReference>
index a2b5b02..f7fef0a 100644 (file)
@@ -94,12 +94,6 @@ public :
     static int Load();
 };
 
-class DifferentialEquationsModule : public GenericModule
-{
-public :
-    static int Load();
-};
-
 class SpreadsheetModule : public GenericModule
 {
 public :
index 8cf7ec0..fa51c5d 100644 (file)
@@ -296,28 +296,6 @@ int ActionBindingModule::Load()
     return 1;
 }
 
-int DifferentialEquationsModule::Load()
-{
-    wstring wstPath = L"differential_equations";
-#ifdef _MSC_VER
-    wstring wstModuleName = L"differential_equations_gw";
-    wchar_t* pwstLibName = buildModuleDynLibraryNameW(wstModuleName.c_str(), DYNLIB_NAME_FORMAT_1);
-#else
-    wstring wstModuleName = L"differential_equations";
-    wchar_t* pwstLibName = buildModuleDynLibraryNameW(wstModuleName.c_str(), DYNLIB_NAME_FORMAT_3);
-#endif
-    vectGateway vect = loadGatewaysName(wstPath);
-
-    for (int i = 0 ; i < (int)vect.size() ; i++)
-    {
-        symbol::Context::getInstance()->addFunction(types::Function::createFunction(vect[i].wstFunction, vect[i].wstName, pwstLibName, vect[i].iType, NULL, wstModuleName));
-    }
-
-    FREE(pwstLibName);
-
-    return 1;
-}
-
 int SpreadsheetModule::Load()
 {
     wstring wstModuleName = L"spreadsheet";
index 000f8b0..0f297f8 100644 (file)
@@ -985,10 +985,10 @@ maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-@JAVASCI_FALSE@clean-local:
-@JAVASCI_FALSE@install-html-local:
 @JAVASCI_FALSE@distclean-local:
 @JAVASCI_FALSE@install-data-local:
+@JAVASCI_FALSE@clean-local:
+@JAVASCI_FALSE@install-html-local:
 clean: clean-am
 
 clean-am: clean-generic clean-libtool clean-local \