diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/xcos/src/jni | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/xcos/src/jni')
20 files changed, 2890 insertions, 0 deletions
diff --git a/modules/xcos/src/jni/.deps/.dirstamp b/modules/xcos/src/jni/.deps/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/xcos/src/jni/.deps/.dirstamp diff --git a/modules/xcos/src/jni/.deps/libscixcos_algo_la-Modelica.Plo b/modules/xcos/src/jni/.deps/libscixcos_algo_la-Modelica.Plo new file mode 100755 index 000000000..faed5d5f9 --- /dev/null +++ b/modules/xcos/src/jni/.deps/libscixcos_algo_la-Modelica.Plo @@ -0,0 +1,341 @@ +src/jni/libscixcos_algo_la-Modelica.lo: src/jni/Modelica.cpp \ + /usr/include/stdc-predef.h src/jni/Modelica.hxx \ + /usr/include/c++/5/iostream \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h \ + /usr/include/c++/5/ostream /usr/include/c++/5/ios \ + /usr/include/c++/5/iosfwd /usr/include/c++/5/bits/stringfwd.h \ + /usr/include/c++/5/bits/memoryfwd.h /usr/include/c++/5/bits/postypes.h \ + /usr/include/c++/5/cwchar /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/5/exception \ + /usr/include/c++/5/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5/bits/char_traits.h \ + /usr/include/c++/5/bits/stl_algobase.h \ + /usr/include/c++/5/bits/functexcept.h \ + /usr/include/c++/5/bits/exception_defines.h \ + /usr/include/c++/5/bits/cpp_type_traits.h \ + /usr/include/c++/5/ext/type_traits.h \ + /usr/include/c++/5/ext/numeric_traits.h \ + /usr/include/c++/5/bits/stl_pair.h /usr/include/c++/5/bits/move.h \ + /usr/include/c++/5/bits/concept_check.h \ + /usr/include/c++/5/bits/stl_iterator_base_types.h \ + /usr/include/c++/5/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5/debug/debug.h /usr/include/c++/5/bits/stl_iterator.h \ + /usr/include/c++/5/bits/ptr_traits.h \ + /usr/include/c++/5/bits/predefined_ops.h \ + /usr/include/c++/5/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h \ + /usr/include/c++/5/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/5/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/c++/5/bits/ios_base.h /usr/include/c++/5/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h \ + /usr/include/c++/5/bits/locale_classes.h /usr/include/c++/5/string \ + /usr/include/c++/5/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h \ + /usr/include/c++/5/ext/new_allocator.h /usr/include/c++/5/new \ + /usr/include/c++/5/bits/ostream_insert.h \ + /usr/include/c++/5/bits/cxxabi_forced.h \ + /usr/include/c++/5/bits/stl_function.h \ + /usr/include/c++/5/backward/binders.h \ + /usr/include/c++/5/bits/range_access.h \ + /usr/include/c++/5/bits/basic_string.h \ + /usr/include/c++/5/ext/alloc_traits.h \ + /usr/include/c++/5/bits/basic_string.tcc \ + /usr/include/c++/5/bits/locale_classes.tcc /usr/include/c++/5/stdexcept \ + /usr/include/c++/5/streambuf /usr/include/c++/5/bits/streambuf.tcc \ + /usr/include/c++/5/bits/basic_ios.h \ + /usr/include/c++/5/bits/locale_facets.h /usr/include/c++/5/cwctype \ + /usr/include/wctype.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h \ + /usr/include/c++/5/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h \ + /usr/include/c++/5/bits/locale_facets.tcc \ + /usr/include/c++/5/bits/basic_ios.tcc \ + /usr/include/c++/5/bits/ostream.tcc /usr/include/c++/5/istream \ + /usr/include/c++/5/bits/istream.tcc /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \ + ../../modules/commons/src/jni/GiwsException.hxx + +/usr/include/stdc-predef.h: + +src/jni/Modelica.hxx: + +/usr/include/c++/5/iostream: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h: + +/usr/include/c++/5/ostream: + +/usr/include/c++/5/ios: + +/usr/include/c++/5/iosfwd: + +/usr/include/c++/5/bits/stringfwd.h: + +/usr/include/c++/5/bits/memoryfwd.h: + +/usr/include/c++/5/bits/postypes.h: + +/usr/include/c++/5/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +/usr/include/c++/5/exception: + +/usr/include/c++/5/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5/bits/char_traits.h: + +/usr/include/c++/5/bits/stl_algobase.h: + +/usr/include/c++/5/bits/functexcept.h: + +/usr/include/c++/5/bits/exception_defines.h: + +/usr/include/c++/5/bits/cpp_type_traits.h: + +/usr/include/c++/5/ext/type_traits.h: + +/usr/include/c++/5/ext/numeric_traits.h: + +/usr/include/c++/5/bits/stl_pair.h: + +/usr/include/c++/5/bits/move.h: + +/usr/include/c++/5/bits/concept_check.h: + +/usr/include/c++/5/bits/stl_iterator_base_types.h: + +/usr/include/c++/5/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5/debug/debug.h: + +/usr/include/c++/5/bits/stl_iterator.h: + +/usr/include/c++/5/bits/ptr_traits.h: + +/usr/include/c++/5/bits/predefined_ops.h: + +/usr/include/c++/5/bits/localefwd.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h: + +/usr/include/c++/5/clocale: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/c++/5/cctype: + +/usr/include/ctype.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/c++/5/bits/ios_base.h: + +/usr/include/c++/5/ext/atomicity.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/sched.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/timex.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/setjmp.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h: + +/usr/include/c++/5/bits/locale_classes.h: + +/usr/include/c++/5/string: + +/usr/include/c++/5/bits/allocator.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h: + +/usr/include/c++/5/ext/new_allocator.h: + +/usr/include/c++/5/new: + +/usr/include/c++/5/bits/ostream_insert.h: + +/usr/include/c++/5/bits/cxxabi_forced.h: + +/usr/include/c++/5/bits/stl_function.h: + +/usr/include/c++/5/backward/binders.h: + +/usr/include/c++/5/bits/range_access.h: + +/usr/include/c++/5/bits/basic_string.h: + +/usr/include/c++/5/ext/alloc_traits.h: + +/usr/include/c++/5/bits/basic_string.tcc: + +/usr/include/c++/5/bits/locale_classes.tcc: + +/usr/include/c++/5/stdexcept: + +/usr/include/c++/5/streambuf: + +/usr/include/c++/5/bits/streambuf.tcc: + +/usr/include/c++/5/bits/basic_ios.h: + +/usr/include/c++/5/bits/locale_facets.h: + +/usr/include/c++/5/cwctype: + +/usr/include/wctype.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h: + +/usr/include/c++/5/bits/streambuf_iterator.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h: + +/usr/include/c++/5/bits/locale_facets.tcc: + +/usr/include/c++/5/bits/basic_ios.tcc: + +/usr/include/c++/5/bits/ostream.tcc: + +/usr/include/c++/5/istream: + +/usr/include/c++/5/bits/istream.tcc: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h: + +../../modules/commons/src/jni/GiwsException.hxx: diff --git a/modules/xcos/src/jni/.deps/libscixcos_algo_la-Palette.Plo b/modules/xcos/src/jni/.deps/libscixcos_algo_la-Palette.Plo new file mode 100755 index 000000000..95a2836c0 --- /dev/null +++ b/modules/xcos/src/jni/.deps/libscixcos_algo_la-Palette.Plo @@ -0,0 +1,341 @@ +src/jni/libscixcos_algo_la-Palette.lo: src/jni/Palette.cpp \ + /usr/include/stdc-predef.h src/jni/Palette.hxx \ + /usr/include/c++/5/iostream \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h \ + /usr/include/c++/5/ostream /usr/include/c++/5/ios \ + /usr/include/c++/5/iosfwd /usr/include/c++/5/bits/stringfwd.h \ + /usr/include/c++/5/bits/memoryfwd.h /usr/include/c++/5/bits/postypes.h \ + /usr/include/c++/5/cwchar /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/5/exception \ + /usr/include/c++/5/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5/bits/char_traits.h \ + /usr/include/c++/5/bits/stl_algobase.h \ + /usr/include/c++/5/bits/functexcept.h \ + /usr/include/c++/5/bits/exception_defines.h \ + /usr/include/c++/5/bits/cpp_type_traits.h \ + /usr/include/c++/5/ext/type_traits.h \ + /usr/include/c++/5/ext/numeric_traits.h \ + /usr/include/c++/5/bits/stl_pair.h /usr/include/c++/5/bits/move.h \ + /usr/include/c++/5/bits/concept_check.h \ + /usr/include/c++/5/bits/stl_iterator_base_types.h \ + /usr/include/c++/5/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5/debug/debug.h /usr/include/c++/5/bits/stl_iterator.h \ + /usr/include/c++/5/bits/ptr_traits.h \ + /usr/include/c++/5/bits/predefined_ops.h \ + /usr/include/c++/5/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h \ + /usr/include/c++/5/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/5/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/c++/5/bits/ios_base.h /usr/include/c++/5/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h \ + /usr/include/c++/5/bits/locale_classes.h /usr/include/c++/5/string \ + /usr/include/c++/5/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h \ + /usr/include/c++/5/ext/new_allocator.h /usr/include/c++/5/new \ + /usr/include/c++/5/bits/ostream_insert.h \ + /usr/include/c++/5/bits/cxxabi_forced.h \ + /usr/include/c++/5/bits/stl_function.h \ + /usr/include/c++/5/backward/binders.h \ + /usr/include/c++/5/bits/range_access.h \ + /usr/include/c++/5/bits/basic_string.h \ + /usr/include/c++/5/ext/alloc_traits.h \ + /usr/include/c++/5/bits/basic_string.tcc \ + /usr/include/c++/5/bits/locale_classes.tcc /usr/include/c++/5/stdexcept \ + /usr/include/c++/5/streambuf /usr/include/c++/5/bits/streambuf.tcc \ + /usr/include/c++/5/bits/basic_ios.h \ + /usr/include/c++/5/bits/locale_facets.h /usr/include/c++/5/cwctype \ + /usr/include/wctype.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h \ + /usr/include/c++/5/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h \ + /usr/include/c++/5/bits/locale_facets.tcc \ + /usr/include/c++/5/bits/basic_ios.tcc \ + /usr/include/c++/5/bits/ostream.tcc /usr/include/c++/5/istream \ + /usr/include/c++/5/bits/istream.tcc /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \ + ../../modules/commons/src/jni/GiwsException.hxx + +/usr/include/stdc-predef.h: + +src/jni/Palette.hxx: + +/usr/include/c++/5/iostream: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h: + +/usr/include/c++/5/ostream: + +/usr/include/c++/5/ios: + +/usr/include/c++/5/iosfwd: + +/usr/include/c++/5/bits/stringfwd.h: + +/usr/include/c++/5/bits/memoryfwd.h: + +/usr/include/c++/5/bits/postypes.h: + +/usr/include/c++/5/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +/usr/include/c++/5/exception: + +/usr/include/c++/5/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5/bits/char_traits.h: + +/usr/include/c++/5/bits/stl_algobase.h: + +/usr/include/c++/5/bits/functexcept.h: + +/usr/include/c++/5/bits/exception_defines.h: + +/usr/include/c++/5/bits/cpp_type_traits.h: + +/usr/include/c++/5/ext/type_traits.h: + +/usr/include/c++/5/ext/numeric_traits.h: + +/usr/include/c++/5/bits/stl_pair.h: + +/usr/include/c++/5/bits/move.h: + +/usr/include/c++/5/bits/concept_check.h: + +/usr/include/c++/5/bits/stl_iterator_base_types.h: + +/usr/include/c++/5/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5/debug/debug.h: + +/usr/include/c++/5/bits/stl_iterator.h: + +/usr/include/c++/5/bits/ptr_traits.h: + +/usr/include/c++/5/bits/predefined_ops.h: + +/usr/include/c++/5/bits/localefwd.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h: + +/usr/include/c++/5/clocale: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/c++/5/cctype: + +/usr/include/ctype.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/c++/5/bits/ios_base.h: + +/usr/include/c++/5/ext/atomicity.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/sched.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/timex.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/setjmp.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h: + +/usr/include/c++/5/bits/locale_classes.h: + +/usr/include/c++/5/string: + +/usr/include/c++/5/bits/allocator.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h: + +/usr/include/c++/5/ext/new_allocator.h: + +/usr/include/c++/5/new: + +/usr/include/c++/5/bits/ostream_insert.h: + +/usr/include/c++/5/bits/cxxabi_forced.h: + +/usr/include/c++/5/bits/stl_function.h: + +/usr/include/c++/5/backward/binders.h: + +/usr/include/c++/5/bits/range_access.h: + +/usr/include/c++/5/bits/basic_string.h: + +/usr/include/c++/5/ext/alloc_traits.h: + +/usr/include/c++/5/bits/basic_string.tcc: + +/usr/include/c++/5/bits/locale_classes.tcc: + +/usr/include/c++/5/stdexcept: + +/usr/include/c++/5/streambuf: + +/usr/include/c++/5/bits/streambuf.tcc: + +/usr/include/c++/5/bits/basic_ios.h: + +/usr/include/c++/5/bits/locale_facets.h: + +/usr/include/c++/5/cwctype: + +/usr/include/wctype.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h: + +/usr/include/c++/5/bits/streambuf_iterator.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h: + +/usr/include/c++/5/bits/locale_facets.tcc: + +/usr/include/c++/5/bits/basic_ios.tcc: + +/usr/include/c++/5/bits/ostream.tcc: + +/usr/include/c++/5/istream: + +/usr/include/c++/5/bits/istream.tcc: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h: + +../../modules/commons/src/jni/GiwsException.hxx: diff --git a/modules/xcos/src/jni/.deps/libscixcos_algo_la-Xcos.Plo b/modules/xcos/src/jni/.deps/libscixcos_algo_la-Xcos.Plo new file mode 100755 index 000000000..08d58ac05 --- /dev/null +++ b/modules/xcos/src/jni/.deps/libscixcos_algo_la-Xcos.Plo @@ -0,0 +1,340 @@ +src/jni/libscixcos_algo_la-Xcos.lo: src/jni/Xcos.cpp \ + /usr/include/stdc-predef.h src/jni/Xcos.hxx /usr/include/c++/5/iostream \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h \ + /usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h \ + /usr/include/c++/5/ostream /usr/include/c++/5/ios \ + /usr/include/c++/5/iosfwd /usr/include/c++/5/bits/stringfwd.h \ + /usr/include/c++/5/bits/memoryfwd.h /usr/include/c++/5/bits/postypes.h \ + /usr/include/c++/5/cwchar /usr/include/wchar.h /usr/include/stdio.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/c++/5/exception \ + /usr/include/c++/5/bits/atomic_lockfree_defines.h \ + /usr/include/c++/5/bits/char_traits.h \ + /usr/include/c++/5/bits/stl_algobase.h \ + /usr/include/c++/5/bits/functexcept.h \ + /usr/include/c++/5/bits/exception_defines.h \ + /usr/include/c++/5/bits/cpp_type_traits.h \ + /usr/include/c++/5/ext/type_traits.h \ + /usr/include/c++/5/ext/numeric_traits.h \ + /usr/include/c++/5/bits/stl_pair.h /usr/include/c++/5/bits/move.h \ + /usr/include/c++/5/bits/concept_check.h \ + /usr/include/c++/5/bits/stl_iterator_base_types.h \ + /usr/include/c++/5/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/5/debug/debug.h /usr/include/c++/5/bits/stl_iterator.h \ + /usr/include/c++/5/bits/ptr_traits.h \ + /usr/include/c++/5/bits/predefined_ops.h \ + /usr/include/c++/5/bits/localefwd.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h \ + /usr/include/c++/5/clocale /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/c++/5/cctype \ + /usr/include/ctype.h /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h \ + /usr/include/c++/5/bits/ios_base.h /usr/include/c++/5/ext/atomicity.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/bits/sched.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/timex.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/x86_64-linux-gnu/bits/setjmp.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h \ + /usr/include/c++/5/bits/locale_classes.h /usr/include/c++/5/string \ + /usr/include/c++/5/bits/allocator.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h \ + /usr/include/c++/5/ext/new_allocator.h /usr/include/c++/5/new \ + /usr/include/c++/5/bits/ostream_insert.h \ + /usr/include/c++/5/bits/cxxabi_forced.h \ + /usr/include/c++/5/bits/stl_function.h \ + /usr/include/c++/5/backward/binders.h \ + /usr/include/c++/5/bits/range_access.h \ + /usr/include/c++/5/bits/basic_string.h \ + /usr/include/c++/5/ext/alloc_traits.h \ + /usr/include/c++/5/bits/basic_string.tcc \ + /usr/include/c++/5/bits/locale_classes.tcc /usr/include/c++/5/stdexcept \ + /usr/include/c++/5/streambuf /usr/include/c++/5/bits/streambuf.tcc \ + /usr/include/c++/5/bits/basic_ios.h \ + /usr/include/c++/5/bits/locale_facets.h /usr/include/c++/5/cwctype \ + /usr/include/wctype.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h \ + /usr/include/c++/5/bits/streambuf_iterator.h \ + /usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h \ + /usr/include/c++/5/bits/locale_facets.tcc \ + /usr/include/c++/5/bits/basic_ios.tcc \ + /usr/include/c++/5/bits/ostream.tcc /usr/include/c++/5/istream \ + /usr/include/c++/5/bits/istream.tcc /usr/include/string.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ + /usr/include/x86_64-linux-gnu/bits/sys_errlist.h \ + /usr/include/x86_64-linux-gnu/bits/stdio.h \ + /usr/include/x86_64-linux-gnu/bits/stdio2.h \ + /usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h \ + ../../modules/commons/src/jni/GiwsException.hxx + +/usr/include/stdc-predef.h: + +src/jni/Xcos.hxx: + +/usr/include/c++/5/iostream: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/cpu_defines.h: + +/usr/include/c++/5/ostream: + +/usr/include/c++/5/ios: + +/usr/include/c++/5/iosfwd: + +/usr/include/c++/5/bits/stringfwd.h: + +/usr/include/c++/5/bits/memoryfwd.h: + +/usr/include/c++/5/bits/postypes.h: + +/usr/include/c++/5/cwchar: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +/usr/include/c++/5/exception: + +/usr/include/c++/5/bits/atomic_lockfree_defines.h: + +/usr/include/c++/5/bits/char_traits.h: + +/usr/include/c++/5/bits/stl_algobase.h: + +/usr/include/c++/5/bits/functexcept.h: + +/usr/include/c++/5/bits/exception_defines.h: + +/usr/include/c++/5/bits/cpp_type_traits.h: + +/usr/include/c++/5/ext/type_traits.h: + +/usr/include/c++/5/ext/numeric_traits.h: + +/usr/include/c++/5/bits/stl_pair.h: + +/usr/include/c++/5/bits/move.h: + +/usr/include/c++/5/bits/concept_check.h: + +/usr/include/c++/5/bits/stl_iterator_base_types.h: + +/usr/include/c++/5/bits/stl_iterator_base_funcs.h: + +/usr/include/c++/5/debug/debug.h: + +/usr/include/c++/5/bits/stl_iterator.h: + +/usr/include/c++/5/bits/ptr_traits.h: + +/usr/include/c++/5/bits/predefined_ops.h: + +/usr/include/c++/5/bits/localefwd.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h: + +/usr/include/c++/5/clocale: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: + +/usr/include/c++/5/cctype: + +/usr/include/ctype.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/c++/5/bits/ios_base.h: + +/usr/include/c++/5/ext/atomicity.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h: + +/usr/include/pthread.h: + +/usr/include/sched.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/bits/sched.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/timex.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/x86_64-linux-gnu/bits/setjmp.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/atomic_word.h: + +/usr/include/c++/5/bits/locale_classes.h: + +/usr/include/c++/5/string: + +/usr/include/c++/5/bits/allocator.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h: + +/usr/include/c++/5/ext/new_allocator.h: + +/usr/include/c++/5/new: + +/usr/include/c++/5/bits/ostream_insert.h: + +/usr/include/c++/5/bits/cxxabi_forced.h: + +/usr/include/c++/5/bits/stl_function.h: + +/usr/include/c++/5/backward/binders.h: + +/usr/include/c++/5/bits/range_access.h: + +/usr/include/c++/5/bits/basic_string.h: + +/usr/include/c++/5/ext/alloc_traits.h: + +/usr/include/c++/5/bits/basic_string.tcc: + +/usr/include/c++/5/bits/locale_classes.tcc: + +/usr/include/c++/5/stdexcept: + +/usr/include/c++/5/streambuf: + +/usr/include/c++/5/bits/streambuf.tcc: + +/usr/include/c++/5/bits/basic_ios.h: + +/usr/include/c++/5/bits/locale_facets.h: + +/usr/include/c++/5/cwctype: + +/usr/include/wctype.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_base.h: + +/usr/include/c++/5/bits/streambuf_iterator.h: + +/usr/include/x86_64-linux-gnu/c++/5/bits/ctype_inline.h: + +/usr/include/c++/5/bits/locale_facets.tcc: + +/usr/include/c++/5/bits/basic_ios.tcc: + +/usr/include/c++/5/bits/ostream.tcc: + +/usr/include/c++/5/istream: + +/usr/include/c++/5/bits/istream.tcc: + +/usr/include/string.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/x86_64-linux-gnu/bits/stdio_lim.h: + +/usr/include/x86_64-linux-gnu/bits/sys_errlist.h: + +/usr/include/x86_64-linux-gnu/bits/stdio.h: + +/usr/include/x86_64-linux-gnu/bits/stdio2.h: + +/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jni_md.h: + +../../modules/commons/src/jni/GiwsException.hxx: diff --git a/modules/xcos/src/jni/.dirstamp b/modules/xcos/src/jni/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/xcos/src/jni/.dirstamp diff --git a/modules/xcos/src/jni/.libs/libscixcos_algo_la-Modelica.o b/modules/xcos/src/jni/.libs/libscixcos_algo_la-Modelica.o Binary files differnew file mode 100755 index 000000000..c91930827 --- /dev/null +++ b/modules/xcos/src/jni/.libs/libscixcos_algo_la-Modelica.o diff --git a/modules/xcos/src/jni/.libs/libscixcos_algo_la-Palette.o b/modules/xcos/src/jni/.libs/libscixcos_algo_la-Palette.o Binary files differnew file mode 100755 index 000000000..648533829 --- /dev/null +++ b/modules/xcos/src/jni/.libs/libscixcos_algo_la-Palette.o diff --git a/modules/xcos/src/jni/.libs/libscixcos_algo_la-Xcos.o b/modules/xcos/src/jni/.libs/libscixcos_algo_la-Xcos.o Binary files differnew file mode 100755 index 000000000..775419869 --- /dev/null +++ b/modules/xcos/src/jni/.libs/libscixcos_algo_la-Xcos.o diff --git a/modules/xcos/src/jni/Modelica.cpp b/modules/xcos/src/jni/Modelica.cpp new file mode 100755 index 000000000..b24bf22f8 --- /dev/null +++ b/modules/xcos/src/jni/Modelica.cpp @@ -0,0 +1,185 @@ +#include "Modelica.hxx" +/* Generated by GIWS (version 2.0.2) with command: +giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/Modelica.giws.xml +*/ +/* + +This is generated code. + +This software is a computer program whose purpose is to hide the complexity +of accessing Java objects/methods from C++ code. + +This software is governed by the CeCILL-B license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL-B +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL-B license and that you accept its terms. +*/ + +namespace org_scilab_modules_xcos_modelica { + + // Static declarations (if any) + +// Returns the current env + +JNIEnv * Modelica::getCurrentEnv() { +JNIEnv * curEnv = NULL; +jint res=this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +if (res != JNI_OK) { +throw GiwsException::JniException(getCurrentEnv()); +} +return curEnv; +} +// Destructor + +Modelica::~Modelica() { +JNIEnv * curEnv = NULL; +this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +curEnv->DeleteGlobalRef(this->instance); +curEnv->DeleteGlobalRef(this->instanceClass); +} +// Constructors +Modelica::Modelica(JavaVM * jvm_) { +jmethodID constructObject = NULL ; +jobject localInstance ; +jclass localClass ; + +const std::string construct="<init>"; +const std::string param="()V"; +jvm=jvm_; + +JNIEnv * curEnv = getCurrentEnv(); + +localClass = curEnv->FindClass( this->className().c_str() ) ; +if (localClass == NULL) { + throw GiwsException::JniClassNotFoundException(curEnv, this->className()); +} + +this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass)); + +/* localClass is not needed anymore */ +curEnv->DeleteLocalRef(localClass); + +if (this->instanceClass == NULL) { +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + + +constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ; +if(constructObject == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + +localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ; +if(localInstance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + +this->instance = curEnv->NewGlobalRef(localInstance) ; +if(this->instance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} +/* localInstance not needed anymore */ +curEnv->DeleteLocalRef(localInstance); + + /* Methods ID set to NULL */ +voidloadjstringjava_lang_Stringjstringjava_lang_StringID=NULL; + + +} + +Modelica::Modelica(JavaVM * jvm_, jobject JObj) { + jvm=jvm_; + + JNIEnv * curEnv = getCurrentEnv(); + +jclass localClass = curEnv->GetObjectClass(JObj); + this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass)); + curEnv->DeleteLocalRef(localClass); + + if (this->instanceClass == NULL) { +throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + this->instance = curEnv->NewGlobalRef(JObj) ; + if(this->instance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + /* Methods ID set to NULL */ + voidloadjstringjava_lang_Stringjstringjava_lang_StringID=NULL; + + +} + +// Generic methods + +void Modelica::synchronize() { +if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +throw GiwsException::JniMonitorException(getCurrentEnv(), "Modelica"); +} +} + +void Modelica::endSynchronize() { +if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +throw GiwsException::JniMonitorException(getCurrentEnv(), "Modelica"); +} +} +// Method(s) + +void Modelica::load (JavaVM * jvm_, char const* init, char const* relation){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidloadjstringjava_lang_Stringjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "load", "(Ljava/lang/String;Ljava/lang/String;)V" ) ; +if (voidloadjstringjava_lang_Stringjstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "load"); +} + +jstring init_ = curEnv->NewStringUTF( init ); +if (init != NULL && init_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + +jstring relation_ = curEnv->NewStringUTF( relation ); +if (relation != NULL && relation_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + curEnv->CallStaticVoidMethod(cls, voidloadjstringjava_lang_Stringjstringjava_lang_StringID ,init_, relation_); + curEnv->DeleteLocalRef(init_); +curEnv->DeleteLocalRef(relation_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +} diff --git a/modules/xcos/src/jni/Modelica.giws.xml b/modules/xcos/src/jni/Modelica.giws.xml new file mode 100755 index 000000000..38ee4b683 --- /dev/null +++ b/modules/xcos/src/jni/Modelica.giws.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<package name="org.scilab.modules.xcos.modelica"> + <object name="Modelica"> + <method name="load" returnType="void" modifier="static"> + <parameter name="init" type="String"/> + <parameter name="relation" type="String"/> + </method> + </object> +</package> diff --git a/modules/xcos/src/jni/Modelica.hxx b/modules/xcos/src/jni/Modelica.hxx new file mode 100755 index 000000000..9069a3881 --- /dev/null +++ b/modules/xcos/src/jni/Modelica.hxx @@ -0,0 +1,178 @@ +/* Generated by GIWS (version 2.0.2) with command: +giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/Modelica.giws.xml +*/ +/* + +This is generated code. + +This software is a computer program whose purpose is to hide the complexity +of accessing Java objects/methods from C++ code. + +This software is governed by the CeCILL-B license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL-B +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL-B license and that you accept its terms. +*/ + + +#ifndef __ORG_SCILAB_MODULES_XCOS_MODELICA_MODELICA__ +#define __ORG_SCILAB_MODULES_XCOS_MODELICA_MODELICA__ +#include <iostream> +#include <string> +#include <string.h> +#include <stdlib.h> +#include <jni.h> + +#include "GiwsException.hxx" + + #if defined(_MSC_VER) /* Defined anyway with Visual */ + #include <Windows.h> + #else + typedef signed char byte; + #endif + + +#ifndef GIWSEXPORT +# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define GIWSEXPORT +# else +# define GIWSEXPORT __declspec(dllexport) +# endif +# else +# if __GNUC__ >= 4 +# define GIWSEXPORT __attribute__ ((visibility ("default"))) +# else +# define GIWSEXPORT +# endif +# endif +#endif + +namespace org_scilab_modules_xcos_modelica { +class GIWSEXPORT Modelica { + +private: +JavaVM * jvm; + +protected: +jmethodID voidloadjstringjava_lang_Stringjstringjava_lang_StringID; // cache method id + + + +jobject instance; +jclass instanceClass; // cache class + + +// Caching (if any) + + +/** +* Get the environment matching to the current thread. +*/ +virtual JNIEnv * getCurrentEnv(); + +public: +// Constructor +/** +* Create a wrapping of the object from a JNIEnv. +* It will call the default constructor +* @param JEnv_ the Java Env +*/ +Modelica(JavaVM * jvm_); + +/** +* Create a wrapping of an already existing object from a JNIEnv. +* The object must have already been instantiated +* @param JEnv_ the Java Env +* @param JObj the object +*/ +Modelica(JavaVM * jvm_, jobject JObj); + + +/** +* This is a fake constructor to avoid the constructor +* chaining when dealing with extended giws classes +*/ +#ifdef FAKEGIWSDATATYPE +Modelica(fakeGiwsDataType::fakeGiwsDataType /* unused */) {} +#endif + +// Destructor +~Modelica(); + +// Generic method +// Synchronization methods +/** +* Enter monitor associated with the object. +* Equivalent of creating a "synchronized(obj)" scope in Java. +*/ +void synchronize(); + +/** +* Exit monitor associated with the object. +* Equivalent of ending a "synchronized(obj)" scope. +*/ +void endSynchronize(); + +// Methods +static void load(JavaVM * jvm_, char const* init, char const* relation); + + + /** + * Get class name to use for static methods + * @return class name to use for static methods + */ + + static const std::string className() + { + return "org/scilab/modules/xcos/modelica/Modelica"; + } + + + /** + * Get class to use for static methods + * @return class to use for static methods + */ + + static jclass initClass(JNIEnv * curEnv) + { + static jclass cls = 0; + + if (cls == 0) + { + jclass _cls = curEnv->FindClass(className().c_str()); + if (_cls) + { + cls = static_cast<jclass>(curEnv->NewGlobalRef(_cls)); + } + } + + return cls; + } + +}; + + +} +#endif diff --git a/modules/xcos/src/jni/Palette.cpp b/modules/xcos/src/jni/Palette.cpp new file mode 100755 index 000000000..5d2feee29 --- /dev/null +++ b/modules/xcos/src/jni/Palette.cpp @@ -0,0 +1,518 @@ +#include "Palette.hxx" +/* Generated by GIWS (version 2.0.2) with command: +giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/Palette.giws.xml +*/ +/* + +This is generated code. + +This software is a computer program whose purpose is to hide the complexity +of accessing Java objects/methods from C++ code. + +This software is governed by the CeCILL-B license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL-B +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL-B license and that you accept its terms. +*/ + +namespace org_scilab_modules_xcos_palette { + + // Static declarations (if any) + +// Returns the current env + +JNIEnv * Palette::getCurrentEnv() { +JNIEnv * curEnv = NULL; +jint res=this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +if (res != JNI_OK) { +throw GiwsException::JniException(getCurrentEnv()); +} +return curEnv; +} +// Destructor + +Palette::~Palette() { +JNIEnv * curEnv = NULL; +this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +curEnv->DeleteGlobalRef(this->instance); +curEnv->DeleteGlobalRef(this->instanceClass); +curEnv->DeleteGlobalRef(this->stringArrayClass);} +// Constructors +Palette::Palette(JavaVM * jvm_) { +jmethodID constructObject = NULL ; +jobject localInstance ; +jclass localClass ; + +const std::string construct="<init>"; +const std::string param="()V"; +jvm=jvm_; + +JNIEnv * curEnv = getCurrentEnv(); + +localClass = curEnv->FindClass( this->className().c_str() ) ; +if (localClass == NULL) { + throw GiwsException::JniClassNotFoundException(curEnv, this->className()); +} + +this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass)); + +/* localClass is not needed anymore */ +curEnv->DeleteLocalRef(localClass); + +if (this->instanceClass == NULL) { +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + + +constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ; +if(constructObject == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + +localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ; +if(localInstance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + +this->instance = curEnv->NewGlobalRef(localInstance) ; +if(this->instance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} +/* localInstance not needed anymore */ +curEnv->DeleteLocalRef(localInstance); + + /* Methods ID set to NULL */ +voidloadPaljstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidloadPaljstringjava_lang_StringID=NULL; +voidaddCategoryjobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID=NULL; +voidremovejobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidenablejobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID=NULL; +voidmovejobjectArray_java_lang_Stringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidgeneratePaletteIconjstringjava_lang_StringID=NULL; +voidgetjobjectArray_java_lang_Stringjava_lang_StringID=NULL; + + +} + +Palette::Palette(JavaVM * jvm_, jobject JObj) { + jvm=jvm_; + + JNIEnv * curEnv = getCurrentEnv(); + +jclass localClass = curEnv->GetObjectClass(JObj); + this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass)); + curEnv->DeleteLocalRef(localClass); + + if (this->instanceClass == NULL) { +throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + this->instance = curEnv->NewGlobalRef(JObj) ; + if(this->instance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + /* Methods ID set to NULL */ + voidloadPaljstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidloadPaljstringjava_lang_StringID=NULL; +voidaddCategoryjobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID=NULL; +voidremovejobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidenablejobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID=NULL; +voidmovejobjectArray_java_lang_Stringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidgeneratePaletteIconjstringjava_lang_StringID=NULL; +voidgetjobjectArray_java_lang_Stringjava_lang_StringID=NULL; + + +} + +// Generic methods + +void Palette::synchronize() { +if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +throw GiwsException::JniMonitorException(getCurrentEnv(), "Palette"); +} +} + +void Palette::endSynchronize() { +if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +throw GiwsException::JniMonitorException(getCurrentEnv(), "Palette"); +} +} +// Method(s) + +void Palette::loadPal (JavaVM * jvm_, char const* name, char const* const* category, int categorySize){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidloadPaljstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "loadPal", "(Ljava/lang/String;[Ljava/lang/String;)V" ) ; +if (voidloadPaljstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "loadPal"); +} + +jstring name_ = curEnv->NewStringUTF( name ); +if (name != NULL && name_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray category_ = curEnv->NewObjectArray( categorySize, stringArrayClass, NULL); +if (category_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < categorySize; i++) +{ +jstring TempString = curEnv->NewStringUTF( category[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( category_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} + curEnv->CallStaticVoidMethod(cls, voidloadPaljstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID ,name_, category_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(name_); +curEnv->DeleteLocalRef(category_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Palette::loadPal (JavaVM * jvm_, char const* name){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidloadPaljstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "loadPal", "(Ljava/lang/String;)V" ) ; +if (voidloadPaljstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "loadPal"); +} + +jstring name_ = curEnv->NewStringUTF( name ); +if (name != NULL && name_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + curEnv->CallStaticVoidMethod(cls, voidloadPaljstringjava_lang_StringID ,name_); + curEnv->DeleteLocalRef(name_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Palette::addCategory (JavaVM * jvm_, char const* const* name, int nameSize, bool visible){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidaddCategoryjobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID = curEnv->GetStaticMethodID(cls, "addCategory", "([Ljava/lang/String;Z)V" ) ; +if (voidaddCategoryjobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "addCategory"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray name_ = curEnv->NewObjectArray( nameSize, stringArrayClass, NULL); +if (name_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < nameSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( name[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( name_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} +jboolean visible_ = (static_cast<bool>(visible) ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidaddCategoryjobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID ,name_, visible_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(name_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Palette::remove (JavaVM * jvm_, char const* const* name, int nameSize){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidremovejobjectArray_java_lang_Stringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "remove", "([Ljava/lang/String;)V" ) ; +if (voidremovejobjectArray_java_lang_Stringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "remove"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray name_ = curEnv->NewObjectArray( nameSize, stringArrayClass, NULL); +if (name_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < nameSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( name[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( name_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} + curEnv->CallStaticVoidMethod(cls, voidremovejobjectArray_java_lang_Stringjava_lang_StringID ,name_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(name_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Palette::enable (JavaVM * jvm_, char const* const* name, int nameSize, bool status){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidenablejobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID = curEnv->GetStaticMethodID(cls, "enable", "([Ljava/lang/String;Z)V" ) ; +if (voidenablejobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "enable"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray name_ = curEnv->NewObjectArray( nameSize, stringArrayClass, NULL); +if (name_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < nameSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( name[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( name_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} +jboolean status_ = (static_cast<bool>(status) ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidenablejobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID ,name_, status_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(name_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Palette::move (JavaVM * jvm_, char const* const* source, int sourceSize, char const* const* target, int targetSize){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidmovejobjectArray_java_lang_Stringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "move", "([Ljava/lang/String;[Ljava/lang/String;)V" ) ; +if (voidmovejobjectArray_java_lang_Stringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "move"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray source_ = curEnv->NewObjectArray( sourceSize, stringArrayClass, NULL); +if (source_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < sourceSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( source[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( source_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} + +// create java array of strings. +jobjectArray target_ = curEnv->NewObjectArray( targetSize, stringArrayClass, NULL); +if (target_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < targetSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( target[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( target_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} + curEnv->CallStaticVoidMethod(cls, voidmovejobjectArray_java_lang_Stringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID ,source_, target_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(source_); +curEnv->DeleteLocalRef(target_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Palette::generatePaletteIcon (JavaVM * jvm_, char const* iconPath){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidgeneratePaletteIconjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "generatePaletteIcon", "(Ljava/lang/String;)V" ) ; +if (voidgeneratePaletteIconjstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "generatePaletteIcon"); +} + +jstring iconPath_ = curEnv->NewStringUTF( iconPath ); +if (iconPath != NULL && iconPath_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + curEnv->CallStaticVoidMethod(cls, voidgeneratePaletteIconjstringjava_lang_StringID ,iconPath_); + curEnv->DeleteLocalRef(iconPath_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Palette::get (JavaVM * jvm_, char const* const* path, int pathSize){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidgetjobjectArray_java_lang_Stringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "get", "([Ljava/lang/String;)V" ) ; +if (voidgetjobjectArray_java_lang_Stringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "get"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray path_ = curEnv->NewObjectArray( pathSize, stringArrayClass, NULL); +if (path_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < pathSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( path[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( path_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} + curEnv->CallStaticVoidMethod(cls, voidgetjobjectArray_java_lang_Stringjava_lang_StringID ,path_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(path_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +} diff --git a/modules/xcos/src/jni/Palette.giws.xml b/modules/xcos/src/jni/Palette.giws.xml new file mode 100755 index 000000000..a3a39f9fa --- /dev/null +++ b/modules/xcos/src/jni/Palette.giws.xml @@ -0,0 +1,32 @@ + <package name="org.scilab.modules.xcos.palette"> + <object name="Palette"> + <method name="loadPal" returnType="void" modifier="static"> + <parameter name="name" type="String"/> + <parameter name="category" type="String[]"/> + </method> + <method name="loadPal" returnType="void" modifier="static"> + <parameter name="name" type="String"/> + </method> + <method name="addCategory" returnType="void" modifier="static"> + <parameter name="name" type="String[]"/> + <parameter name="visible" type="boolean"/> + </method> + <method name="remove" returnType="void" modifier="static"> + <parameter name="name" type="String[]"/> + </method> + <method name="enable" returnType="void" modifier="static"> + <parameter name="name" type="String[]"/> + <parameter name="status" type="boolean"/> + </method> + <method name="move" returnType="void" modifier="static"> + <parameter name="source" type="String[]"/> + <parameter name="target" type="String[]"/> + </method> + <method name="generatePaletteIcon" returnType="void" modifier="static"> + <parameter name="iconPath" type="String"/> + </method> + <method name="get" returnType="void" modifier="static"> + <parameter name="path" type="String[]"/> + </method> + </object> +</package> diff --git a/modules/xcos/src/jni/Palette.hxx b/modules/xcos/src/jni/Palette.hxx new file mode 100755 index 000000000..d3a368e93 --- /dev/null +++ b/modules/xcos/src/jni/Palette.hxx @@ -0,0 +1,200 @@ +/* Generated by GIWS (version 2.0.2) with command: +giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/Palette.giws.xml +*/ +/* + +This is generated code. + +This software is a computer program whose purpose is to hide the complexity +of accessing Java objects/methods from C++ code. + +This software is governed by the CeCILL-B license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL-B +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL-B license and that you accept its terms. +*/ + + +#ifndef __ORG_SCILAB_MODULES_XCOS_PALETTE_PALETTE__ +#define __ORG_SCILAB_MODULES_XCOS_PALETTE_PALETTE__ +#include <iostream> +#include <string> +#include <string.h> +#include <stdlib.h> +#include <jni.h> + +#include "GiwsException.hxx" + + #if defined(_MSC_VER) /* Defined anyway with Visual */ + #include <Windows.h> + #else + typedef signed char byte; + #endif + + +#ifndef GIWSEXPORT +# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define GIWSEXPORT +# else +# define GIWSEXPORT __declspec(dllexport) +# endif +# else +# if __GNUC__ >= 4 +# define GIWSEXPORT __attribute__ ((visibility ("default"))) +# else +# define GIWSEXPORT +# endif +# endif +#endif + +namespace org_scilab_modules_xcos_palette { +class GIWSEXPORT Palette { + +private: +JavaVM * jvm; + +protected: +jmethodID voidloadPaljstringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID; // cache method id +jclass stringArrayClass; +jmethodID voidloadPaljstringjava_lang_StringID; // cache method id +jmethodID voidaddCategoryjobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID; // cache method id +jmethodID voidremovejobjectArray_java_lang_Stringjava_lang_StringID; // cache method id +jmethodID voidenablejobjectArray_java_lang_Stringjava_lang_StringjbooleanbooleanID; // cache method id +jmethodID voidmovejobjectArray_java_lang_Stringjava_lang_StringjobjectArray_java_lang_Stringjava_lang_StringID; // cache method id +jmethodID voidgeneratePaletteIconjstringjava_lang_StringID; // cache method id +jmethodID voidgetjobjectArray_java_lang_Stringjava_lang_StringID; // cache method id + + + +jobject instance; +jclass instanceClass; // cache class + + +// Caching (if any) + + +/** +* Get the environment matching to the current thread. +*/ +virtual JNIEnv * getCurrentEnv(); + +public: +// Constructor +/** +* Create a wrapping of the object from a JNIEnv. +* It will call the default constructor +* @param JEnv_ the Java Env +*/ +Palette(JavaVM * jvm_); + +/** +* Create a wrapping of an already existing object from a JNIEnv. +* The object must have already been instantiated +* @param JEnv_ the Java Env +* @param JObj the object +*/ +Palette(JavaVM * jvm_, jobject JObj); + + +/** +* This is a fake constructor to avoid the constructor +* chaining when dealing with extended giws classes +*/ +#ifdef FAKEGIWSDATATYPE +Palette(fakeGiwsDataType::fakeGiwsDataType /* unused */) {} +#endif + +// Destructor +~Palette(); + +// Generic method +// Synchronization methods +/** +* Enter monitor associated with the object. +* Equivalent of creating a "synchronized(obj)" scope in Java. +*/ +void synchronize(); + +/** +* Exit monitor associated with the object. +* Equivalent of ending a "synchronized(obj)" scope. +*/ +void endSynchronize(); + +// Methods +static void loadPal(JavaVM * jvm_, char const* name, char const* const* category, int categorySize); + +static void loadPal(JavaVM * jvm_, char const* name); + +static void addCategory(JavaVM * jvm_, char const* const* name, int nameSize, bool visible); + +static void remove(JavaVM * jvm_, char const* const* name, int nameSize); + +static void enable(JavaVM * jvm_, char const* const* name, int nameSize, bool status); + +static void move(JavaVM * jvm_, char const* const* source, int sourceSize, char const* const* target, int targetSize); + +static void generatePaletteIcon(JavaVM * jvm_, char const* iconPath); + +static void get(JavaVM * jvm_, char const* const* path, int pathSize); + + + /** + * Get class name to use for static methods + * @return class name to use for static methods + */ + + static const std::string className() + { + return "org/scilab/modules/xcos/palette/Palette"; + } + + + /** + * Get class to use for static methods + * @return class to use for static methods + */ + + static jclass initClass(JNIEnv * curEnv) + { + static jclass cls = 0; + + if (cls == 0) + { + jclass _cls = curEnv->FindClass(className().c_str()); + if (_cls) + { + cls = static_cast<jclass>(curEnv->NewGlobalRef(_cls)); + } + } + + return cls; + } + +}; + + +} +#endif diff --git a/modules/xcos/src/jni/Xcos.cpp b/modules/xcos/src/jni/Xcos.cpp new file mode 100755 index 000000000..1f25ce8a9 --- /dev/null +++ b/modules/xcos/src/jni/Xcos.cpp @@ -0,0 +1,475 @@ +#include "Xcos.hxx" +/* Generated by GIWS (version 2.0.2) with command: +giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/Xcos.giws.xml +*/ +/* + +This is generated code. + +This software is a computer program whose purpose is to hide the complexity +of accessing Java objects/methods from C++ code. + +This software is governed by the CeCILL-B license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL-B +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL-B license and that you accept its terms. +*/ + +namespace org_scilab_modules_xcos { + + // Static declarations (if any) + +// Returns the current env + +JNIEnv * Xcos::getCurrentEnv() { +JNIEnv * curEnv = NULL; +jint res=this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +if (res != JNI_OK) { +throw GiwsException::JniException(getCurrentEnv()); +} +return curEnv; +} +// Destructor + +Xcos::~Xcos() { +JNIEnv * curEnv = NULL; +this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +curEnv->DeleteGlobalRef(this->instance); +curEnv->DeleteGlobalRef(this->instanceClass); +curEnv->DeleteGlobalRef(this->stringArrayClass);} +// Constructors +Xcos::Xcos(JavaVM * jvm_) { +jmethodID constructObject = NULL ; +jobject localInstance ; +jclass localClass ; + +const std::string construct="<init>"; +const std::string param="()V"; +jvm=jvm_; + +JNIEnv * curEnv = getCurrentEnv(); + +localClass = curEnv->FindClass( this->className().c_str() ) ; +if (localClass == NULL) { + throw GiwsException::JniClassNotFoundException(curEnv, this->className()); +} + +this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass)); + +/* localClass is not needed anymore */ +curEnv->DeleteLocalRef(localClass); + +if (this->instanceClass == NULL) { +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + + +constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ; +if(constructObject == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + +localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ; +if(localInstance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} + +this->instance = curEnv->NewGlobalRef(localInstance) ; +if(this->instance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); +} +/* localInstance not needed anymore */ +curEnv->DeleteLocalRef(localInstance); + + /* Methods ID set to NULL */ +voidxcosjstringjava_lang_Stringjstringjava_lang_StringID=NULL; +voidwarnCellByUIDjobjectArray_java_lang_Stringjava_lang_Stringjstringjava_lang_StringID=NULL; +voidcloseXcosFromScilabID=NULL; +jintxcosDiagramToScilabjstringjava_lang_StringID=NULL; +voidxcosDiagramOpenjobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidxcosDiagramClosejobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidaddToolsMenujstringjava_lang_Stringjstringjava_lang_StringID=NULL; +voidupdateBlockjstringjava_lang_StringID=NULL; +voidxcosSimulationStartedID=NULL; + + +} + +Xcos::Xcos(JavaVM * jvm_, jobject JObj) { + jvm=jvm_; + + JNIEnv * curEnv = getCurrentEnv(); + +jclass localClass = curEnv->GetObjectClass(JObj); + this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass)); + curEnv->DeleteLocalRef(localClass); + + if (this->instanceClass == NULL) { +throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + this->instance = curEnv->NewGlobalRef(JObj) ; + if(this->instance == NULL){ +throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + /* Methods ID set to NULL */ + voidxcosjstringjava_lang_Stringjstringjava_lang_StringID=NULL; +voidwarnCellByUIDjobjectArray_java_lang_Stringjava_lang_Stringjstringjava_lang_StringID=NULL; +voidcloseXcosFromScilabID=NULL; +jintxcosDiagramToScilabjstringjava_lang_StringID=NULL; +voidxcosDiagramOpenjobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidxcosDiagramClosejobjectArray_java_lang_Stringjava_lang_StringID=NULL; +voidaddToolsMenujstringjava_lang_Stringjstringjava_lang_StringID=NULL; +voidupdateBlockjstringjava_lang_StringID=NULL; +voidxcosSimulationStartedID=NULL; + + +} + +// Generic methods + +void Xcos::synchronize() { +if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +throw GiwsException::JniMonitorException(getCurrentEnv(), "Xcos"); +} +} + +void Xcos::endSynchronize() { +if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +throw GiwsException::JniMonitorException(getCurrentEnv(), "Xcos"); +} +} +// Method(s) + +void Xcos::xcos (JavaVM * jvm_, char const* file, char const* variable){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidxcosjstringjava_lang_Stringjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "xcos", "(Ljava/lang/String;Ljava/lang/String;)V" ) ; +if (voidxcosjstringjava_lang_Stringjstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "xcos"); +} + +jstring file_ = curEnv->NewStringUTF( file ); +if (file != NULL && file_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + +jstring variable_ = curEnv->NewStringUTF( variable ); +if (variable != NULL && variable_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + curEnv->CallStaticVoidMethod(cls, voidxcosjstringjava_lang_Stringjstringjava_lang_StringID ,file_, variable_); + curEnv->DeleteLocalRef(file_); +curEnv->DeleteLocalRef(variable_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Xcos::warnCellByUID (JavaVM * jvm_, char const* const* uids, int uidsSize, char const* message){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidwarnCellByUIDjobjectArray_java_lang_Stringjava_lang_Stringjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "warnCellByUID", "([Ljava/lang/String;Ljava/lang/String;)V" ) ; +if (voidwarnCellByUIDjobjectArray_java_lang_Stringjava_lang_Stringjstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "warnCellByUID"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray uids_ = curEnv->NewObjectArray( uidsSize, stringArrayClass, NULL); +if (uids_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < uidsSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( uids[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( uids_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} +jstring message_ = curEnv->NewStringUTF( message ); +if (message != NULL && message_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + curEnv->CallStaticVoidMethod(cls, voidwarnCellByUIDjobjectArray_java_lang_Stringjava_lang_Stringjstringjava_lang_StringID ,uids_, message_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(uids_); +curEnv->DeleteLocalRef(message_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Xcos::closeXcosFromScilab (JavaVM * jvm_){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidcloseXcosFromScilabID = curEnv->GetStaticMethodID(cls, "closeXcosFromScilab", "()V" ) ; +if (voidcloseXcosFromScilabID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "closeXcosFromScilab"); +} + + curEnv->CallStaticVoidMethod(cls, voidcloseXcosFromScilabID ); + if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +int Xcos::xcosDiagramToScilab (JavaVM * jvm_, char const* xcosFile){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID jintxcosDiagramToScilabjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "xcosDiagramToScilab", "(Ljava/lang/String;)I" ) ; +if (jintxcosDiagramToScilabjstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "xcosDiagramToScilab"); +} + +jstring xcosFile_ = curEnv->NewStringUTF( xcosFile ); +if (xcosFile != NULL && xcosFile_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + jint res = static_cast<jint>( curEnv->CallStaticIntMethod(cls, jintxcosDiagramToScilabjstringjava_lang_StringID ,xcosFile_)); + curEnv->DeleteLocalRef(xcosFile_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +return res; + +} + +void Xcos::xcosDiagramOpen (JavaVM * jvm_, char const* const* UID, int UIDSize){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidxcosDiagramOpenjobjectArray_java_lang_Stringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "xcosDiagramOpen", "([Ljava/lang/String;)V" ) ; +if (voidxcosDiagramOpenjobjectArray_java_lang_Stringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "xcosDiagramOpen"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray UID_ = curEnv->NewObjectArray( UIDSize, stringArrayClass, NULL); +if (UID_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < UIDSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( UID[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( UID_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} + curEnv->CallStaticVoidMethod(cls, voidxcosDiagramOpenjobjectArray_java_lang_Stringjava_lang_StringID ,UID_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(UID_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Xcos::xcosDiagramClose (JavaVM * jvm_, char const* const* UID, int UIDSize){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidxcosDiagramClosejobjectArray_java_lang_Stringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "xcosDiagramClose", "([Ljava/lang/String;)V" ) ; +if (voidxcosDiagramClosejobjectArray_java_lang_Stringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "xcosDiagramClose"); +} +jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +// create java array of strings. +jobjectArray UID_ = curEnv->NewObjectArray( UIDSize, stringArrayClass, NULL); +if (UID_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +// convert each char * to java strings and fill the java array. +for ( int i = 0; i < UIDSize; i++) +{ +jstring TempString = curEnv->NewStringUTF( UID[i] ); +if (TempString == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + +curEnv->SetObjectArrayElement( UID_, i, TempString); + +// avoid keeping reference on too many strings +curEnv->DeleteLocalRef(TempString); +} + curEnv->CallStaticVoidMethod(cls, voidxcosDiagramClosejobjectArray_java_lang_Stringjava_lang_StringID ,UID_); + curEnv->DeleteLocalRef(stringArrayClass); +curEnv->DeleteLocalRef(UID_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Xcos::addToolsMenu (JavaVM * jvm_, char const* label, char const* command){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidaddToolsMenujstringjava_lang_Stringjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "addToolsMenu", "(Ljava/lang/String;Ljava/lang/String;)V" ) ; +if (voidaddToolsMenujstringjava_lang_Stringjstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "addToolsMenu"); +} + +jstring label_ = curEnv->NewStringUTF( label ); +if (label != NULL && label_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + +jstring command_ = curEnv->NewStringUTF( command ); +if (command != NULL && command_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + curEnv->CallStaticVoidMethod(cls, voidaddToolsMenujstringjava_lang_Stringjstringjava_lang_StringID ,label_, command_); + curEnv->DeleteLocalRef(label_); +curEnv->DeleteLocalRef(command_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Xcos::updateBlock (JavaVM * jvm_, char const* h5File){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidupdateBlockjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "updateBlock", "(Ljava/lang/String;)V" ) ; +if (voidupdateBlockjstringjava_lang_StringID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "updateBlock"); +} + +jstring h5File_ = curEnv->NewStringUTF( h5File ); +if (h5File != NULL && h5File_ == NULL) +{ +throw GiwsException::JniBadAllocException(curEnv); +} + + + curEnv->CallStaticVoidMethod(cls, voidupdateBlockjstringjava_lang_StringID ,h5File_); + curEnv->DeleteLocalRef(h5File_); +if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +void Xcos::xcosSimulationStarted (JavaVM * jvm_){ + +JNIEnv * curEnv = NULL; +jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL); +jclass cls = initClass(curEnv); +if ( cls == NULL) { +throw GiwsException::JniCallMethodException(curEnv); +} + +static jmethodID voidxcosSimulationStartedID = curEnv->GetStaticMethodID(cls, "xcosSimulationStarted", "()V" ) ; +if (voidxcosSimulationStartedID == NULL) { +throw GiwsException::JniMethodNotFoundException(curEnv, "xcosSimulationStarted"); +} + + curEnv->CallStaticVoidMethod(cls, voidxcosSimulationStartedID ); + if (curEnv->ExceptionCheck()) { +throw GiwsException::JniCallMethodException(curEnv); +} +} + +} diff --git a/modules/xcos/src/jni/Xcos.giws.xml b/modules/xcos/src/jni/Xcos.giws.xml new file mode 100755 index 000000000..ba8e90041 --- /dev/null +++ b/modules/xcos/src/jni/Xcos.giws.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<package name="org.scilab.modules.xcos"> + <object name="Xcos"> + <method name="xcos" returnType="void" modifier="static"> + <parameter name="file" type="String"/> + <parameter name="variable" type="String"/> + </method> + <method name="warnCellByUID" returnType="void" modifier="static"> + <parameter name="uids" type="String[]"/> + <parameter name="message" type="String"/> + </method> + <method name="closeXcosFromScilab" returnType="void" modifier="static"/> + <method name="xcosDiagramToScilab" returnType="int" modifier="static"> + <parameter name="xcosFile" type="String"/> + </method> + <method name="xcosDiagramOpen" returnType="void" modifier="static"> + <parameter name="UID" type="String[]"/> + </method> + <method name="xcosDiagramClose" returnType="void" modifier="static"> + <parameter name="UID" type="String[]"/> + </method> + <method name="addToolsMenu" returnType="void" modifier="static"> + <parameter name="label" type="String"/> + <parameter name="command" type="String"/> + </method> + <method name="updateBlock" returnType="void" modifier="static"> + <parameter name="h5File" type="String"/> + </method> + <method name="xcosSimulationStarted" returnType="void" modifier="static"> + </method> + </object> +</package> diff --git a/modules/xcos/src/jni/Xcos.hxx b/modules/xcos/src/jni/Xcos.hxx new file mode 100755 index 000000000..c9a56bf9f --- /dev/null +++ b/modules/xcos/src/jni/Xcos.hxx @@ -0,0 +1,203 @@ +/* Generated by GIWS (version 2.0.2) with command: +giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/Xcos.giws.xml +*/ +/* + +This is generated code. + +This software is a computer program whose purpose is to hide the complexity +of accessing Java objects/methods from C++ code. + +This software is governed by the CeCILL-B license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL-B +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL-B license and that you accept its terms. +*/ + + +#ifndef __ORG_SCILAB_MODULES_XCOS_XCOS__ +#define __ORG_SCILAB_MODULES_XCOS_XCOS__ +#include <iostream> +#include <string> +#include <string.h> +#include <stdlib.h> +#include <jni.h> + +#include "GiwsException.hxx" + + #if defined(_MSC_VER) /* Defined anyway with Visual */ + #include <Windows.h> + #else + typedef signed char byte; + #endif + + +#ifndef GIWSEXPORT +# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define GIWSEXPORT +# else +# define GIWSEXPORT __declspec(dllexport) +# endif +# else +# if __GNUC__ >= 4 +# define GIWSEXPORT __attribute__ ((visibility ("default"))) +# else +# define GIWSEXPORT +# endif +# endif +#endif + +namespace org_scilab_modules_xcos { +class GIWSEXPORT Xcos { + +private: +JavaVM * jvm; + +protected: +jmethodID voidxcosjstringjava_lang_Stringjstringjava_lang_StringID; // cache method id +jmethodID voidwarnCellByUIDjobjectArray_java_lang_Stringjava_lang_Stringjstringjava_lang_StringID; // cache method id +jclass stringArrayClass; +jmethodID voidcloseXcosFromScilabID; // cache method id +jmethodID jintxcosDiagramToScilabjstringjava_lang_StringID; // cache method id +jmethodID voidxcosDiagramOpenjobjectArray_java_lang_Stringjava_lang_StringID; // cache method id +jmethodID voidxcosDiagramClosejobjectArray_java_lang_Stringjava_lang_StringID; // cache method id +jmethodID voidaddToolsMenujstringjava_lang_Stringjstringjava_lang_StringID; // cache method id +jmethodID voidupdateBlockjstringjava_lang_StringID; // cache method id +jmethodID voidxcosSimulationStartedID; // cache method id + + + +jobject instance; +jclass instanceClass; // cache class + + +// Caching (if any) + + +/** +* Get the environment matching to the current thread. +*/ +virtual JNIEnv * getCurrentEnv(); + +public: +// Constructor +/** +* Create a wrapping of the object from a JNIEnv. +* It will call the default constructor +* @param JEnv_ the Java Env +*/ +Xcos(JavaVM * jvm_); + +/** +* Create a wrapping of an already existing object from a JNIEnv. +* The object must have already been instantiated +* @param JEnv_ the Java Env +* @param JObj the object +*/ +Xcos(JavaVM * jvm_, jobject JObj); + + +/** +* This is a fake constructor to avoid the constructor +* chaining when dealing with extended giws classes +*/ +#ifdef FAKEGIWSDATATYPE +Xcos(fakeGiwsDataType::fakeGiwsDataType /* unused */) {} +#endif + +// Destructor +~Xcos(); + +// Generic method +// Synchronization methods +/** +* Enter monitor associated with the object. +* Equivalent of creating a "synchronized(obj)" scope in Java. +*/ +void synchronize(); + +/** +* Exit monitor associated with the object. +* Equivalent of ending a "synchronized(obj)" scope. +*/ +void endSynchronize(); + +// Methods +static void xcos(JavaVM * jvm_, char const* file, char const* variable); + +static void warnCellByUID(JavaVM * jvm_, char const* const* uids, int uidsSize, char const* message); + +static void closeXcosFromScilab(JavaVM * jvm_); + +static int xcosDiagramToScilab(JavaVM * jvm_, char const* xcosFile); + +static void xcosDiagramOpen(JavaVM * jvm_, char const* const* UID, int UIDSize); + +static void xcosDiagramClose(JavaVM * jvm_, char const* const* UID, int UIDSize); + +static void addToolsMenu(JavaVM * jvm_, char const* label, char const* command); + +static void updateBlock(JavaVM * jvm_, char const* h5File); + +static void xcosSimulationStarted(JavaVM * jvm_); + + + /** + * Get class name to use for static methods + * @return class name to use for static methods + */ + + static const std::string className() + { + return "org/scilab/modules/xcos/Xcos"; + } + + + /** + * Get class to use for static methods + * @return class to use for static methods + */ + + static jclass initClass(JNIEnv * curEnv) + { + static jclass cls = 0; + + if (cls == 0) + { + jclass _cls = curEnv->FindClass(className().c_str()); + if (_cls) + { + cls = static_cast<jclass>(curEnv->NewGlobalRef(_cls)); + } + } + + return cls; + } + +}; + + +} +#endif diff --git a/modules/xcos/src/jni/libscixcos_algo_la-Modelica.lo b/modules/xcos/src/jni/libscixcos_algo_la-Modelica.lo new file mode 100755 index 000000000..66bbdcbce --- /dev/null +++ b/modules/xcos/src/jni/libscixcos_algo_la-Modelica.lo @@ -0,0 +1,12 @@ +# src/jni/libscixcos_algo_la-Modelica.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscixcos_algo_la-Modelica.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/xcos/src/jni/libscixcos_algo_la-Palette.lo b/modules/xcos/src/jni/libscixcos_algo_la-Palette.lo new file mode 100755 index 000000000..320b37736 --- /dev/null +++ b/modules/xcos/src/jni/libscixcos_algo_la-Palette.lo @@ -0,0 +1,12 @@ +# src/jni/libscixcos_algo_la-Palette.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscixcos_algo_la-Palette.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/xcos/src/jni/libscixcos_algo_la-Xcos.lo b/modules/xcos/src/jni/libscixcos_algo_la-Xcos.lo new file mode 100755 index 000000000..56c705364 --- /dev/null +++ b/modules/xcos/src/jni/libscixcos_algo_la-Xcos.lo @@ -0,0 +1,12 @@ +# src/jni/libscixcos_algo_la-Xcos.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscixcos_algo_la-Xcos.o' + +# Name of the non-PIC object +non_pic_object=none + |