Commit graph

17 commits

Author SHA1 Message Date
William S Fulton
6d0c495fd0 Add missing parameter names in STL container wrappers
Mostly in STL copy constructors.

Best to have parameter names as they make their way into the wrappers in
some target languages.
2019-02-13 22:45:47 +00:00
William S Fulton
6b4e57245d Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now
corrected to std::vector< ::X::Y >.
2015-12-12 14:05:46 +00:00
William S Fulton
92128eef44 C++11 support for new versions of erase and insert in the STL containers.
The erase and insert methods in the containers use const_iterator instead
of iterator in C++11.  There are times when the methods wrapped must match
the parameters exactly. Specifically when full type information for
template types is missing or SWIG fails to look up the type correctly,
for example:

  %include <std_vector.i>
  typedef float Real;
  %template(RealVector) std::vector<Real>;

SWIG does not find std::vector<Real>::iterator because %template using
typedefs does not always work and so SWIG doesn't know if the type is
copyable and so uses SwigValueWrapper<iterator> which does
not support conversion to another type (const_iterator). This resulted
in compilation errors when using the C++11 version of the containers.

Closes #73
2013-12-22 19:52:55 +00:00
William S Fulton
08a45afc1b Correct methods that were not as per the standard
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10062 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-28 22:33:20 +00:00
William S Fulton
69f7d011c0 add missing class declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10049 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-26 01:01:25 +00:00
William S Fulton
0da1552b26 Mods to match the C++ standard
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10039 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-25 22:31:12 +00:00
Gonzalo Garramuno
6a01528488 Fixed SWIG_EXPORT_ITERATOR_METHODS in std_set.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9823 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-18 23:32:55 +00:00
Gonzalo Garramuno
49c61cd129 Added missing size(), clear(), empty() functions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9822 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-18 23:31:14 +00:00
Gonzalo Garramuno
315bd2da6e Added new iterator changes to std.
This change does not break backwards compatability
with python, so all works.
The python stuff, however, will still not do all
that ruby can now do.
Updated manual to reflect the change and improve
typemap documentation on the ruby side.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9787 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-07 05:00:46 +00:00
Gonzalo Garramuno
8622de7595 Removed allocator from constructors.
Added copy constructors to stack/queue.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9780 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 05:54:48 +00:00
Gonzalo Garramuno
1cf8fd332b Added constructor that can take functors to all
containers that can use one.
Created file rubystdfunctors.swg to allow passing in
Ruby procs as functors to STL functions (swig-user list
suggestion for Python).
Fixed a bug in type_info() always failing for std::set.
Fixed a bug in type_info() always accepting any failed
conversion which could lead to overloaded functions to
fail when input wrong parameters.




git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9775 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 03:56:33 +00:00
William S Fulton
6abe1ccf2d correct some function declarations to match the standard - VC++ fails otherwise
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8424 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-14 00:20:37 +00:00
Marcelo Matus
f88acef831 include the language specific codes first since they can contain typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7763 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-31 09:47:41 +00:00
Marcelo Matus
bd0ccd3769 using new template resolution for def args, and cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6890 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-16 01:35:52 +00:00
Marcelo Matus
6b499410dd more fixes for template + def args
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-05 10:15:25 +00:00
Marcelo Matus
409e17e94a add guards for swig/language extra methods and comments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6386 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-10 17:58:14 +00:00
Marcelo Matus
dc4409a1f1 isolate language independent STD/STL/C++ code + more documentation + cleaning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6382 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-10 06:42:15 +00:00