William S Fulton
5eb9f735da
Add generic approach in fragments for converting size_t to Java int
2017-06-05 18:49:54 +01:00
William S Fulton
32e7074d9b
Whitespace fixes in STL wrappers
2017-06-03 18:36:59 +01:00
William S Fulton
fdca8e9829
Better variable naming consistency in STL containers
2017-05-26 22:37:29 +01:00
William S Fulton
b51f32a915
Java std::vector tweaks
...
- Replace javacode typemap with %proxycode to make this typemap available to users
- Make doSize private.
2017-05-26 22:37:22 +01:00
William S Fulton
0bafadea5a
Fix potential STL std::vector wrappers <: digraphs problems.
2017-05-26 18:55:52 +01:00
Vadim Zeitlin
eba70ed16f
Add runtime checks for vector size in Java
...
It doesn't seem to be possible to have a Java collection with more than 2^31-1
items, but it is perfectly possible to have an std::vector with more elements
than that in C++, so add runtime checks verifying that we don't lose count of
elements in the Java wrappers.
2016-11-29 17:47:01 +01:00
Vadim Zeitlin
c79dd9d420
Make std::vector<> wrappers conform to List interface in Java
...
Derive the class wrapping std::vector<> in Java from java.util.AbstractList<>.
This makes it possible to use it with various algorithms working with Java
collections and, maybe even more importantly, makes it possible to iterate
over the wrapped vectors using for-each loops.
This commit is based on the original patch by Volker Diels-Grabsch from
https://sourceforge.net/p/swig/patches/278/
2016-11-29 17:46:38 +01:00
Vadim Zeitlin
7c4109c701
Add helper macro to avoid duplication in Java vector typemaps
...
No real changes yet, just use a C#-like macro in Java std::vector<> typemaps
too to avoid having to repeat almost exactly the same class declaration for
the general case and for the bool specialization.
2016-11-29 17:45:56 +01:00
Marvin Greenberg
843aa7cd65
Work around differences in clang libc++ std::vector<bool>::const_reference
...
clang++ using -stdlib=libc++ defines const_reference as a class,
to map boolean vectors onto a bit set. Because swig does
not "see" the type as "const &" it generates incorrect code for this case,
generating a declaration like:
const_reference result;
When const_reference is a typedef to 'bool' as is the case with stdlibc++
this works. When this is actually a constant reference, this is clearly
invalid since it is not initialized. For libc++, this is a class
which cannot be default constructed, resulting in an error. The fix
is to explicitly define the various accessor extensions as having a
bool return type for this specialization.
2014-02-04 16:00:12 -05:00
William S Fulton
4308dd03cf
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:26:02 +00:00
William S Fulton
956c57bb03
add in correct specialization for std::vector<bool> to follow C++ standard - to create compileable wrappers with vc++ and recent return by reference changes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11153 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-03-16 19:33:38 +00:00
William S Fulton
2b93511d17
complete last commit
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-07-20 22:35:07 +00:00
William S Fulton
176984f338
std::vector parameter name changes so that these parameters can be individually singled out with typemaps
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9856 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-25 21:30:13 +00:00
William S Fulton
49be05f4fd
Common template for head of each file detailing licence, distribution and authors information
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-07 00:14:10 +00:00
William S Fulton
c81c25f671
fix to set method
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8081 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-27 10:46:54 +00:00
William S Fulton
3db5c253df
Fix for vector of bool
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8076 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-27 01:50:49 +00:00
William S Fulton
03a67698a9
use exception specification instead of %exception to handle STL error checking
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7352 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-07-27 20:09:42 +00:00
William S Fulton
effe88404d
Stop using SWIG_exception. It is flawed.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7343 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-07-22 21:33:32 +00:00
William S Fulton
17e443899d
JVM link failure on some systems fixed when using std_vector.i.
...
Also adds default vector constructor for use from Java.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5915 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-18 20:46:13 +00:00
Luigi Ballabio
5e161fa7cd
Char and unsigned-char specialization added
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5348 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-19 08:38:27 +00:00
William S Fulton
2f38702eb6
Reworked std::string typemaps.
...
Fixes various string in std namespace problems.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5010 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-19 12:42:09 +00:00
William S Fulton
61e4fa4202
vector<std::string> specialization added
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5008 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-19 09:55:49 +00:00
William S Fulton
a63f480109
Fix for push_back as suggested by Gualtiero Chiaia
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4715 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-26 12:54:52 +00:00
Dave Beazley
12a43edc2d
The great merge
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-11-30 22:01:28 +00:00