Improved multimap, vector and set by rearranging
some methods. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
163efb1923
commit
8564ff90c0
5 changed files with 144 additions and 87 deletions
|
|
@ -36,11 +36,11 @@
|
|||
%}
|
||||
|
||||
%define %swig_set_methods(set...)
|
||||
%swig_sequence_iterator(set);
|
||||
%swig_container_methods(set);
|
||||
%swig_sequence_methods_common(set);
|
||||
|
||||
%extend {
|
||||
const value_type& push(value_type x) {
|
||||
%alias push "<<";
|
||||
value_type push(value_type x) {
|
||||
self->insert(x);
|
||||
return x;
|
||||
}
|
||||
|
|
@ -57,4 +57,17 @@
|
|||
};
|
||||
%enddef
|
||||
|
||||
#if defined(SWIG_RUBY_AUTORENAME)
|
||||
|
||||
// %mixin std::set "Enumerable";
|
||||
%rename("empty?") std::set::empty;
|
||||
|
||||
#else
|
||||
|
||||
// %mixin std::set "Enumerable";
|
||||
%rename("empty?") std::set::empty;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
%include <std/std_set.i>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue