summaryrefslogtreecommitdiff
path: root/Lib/std
diff options
context:
space:
mode:
authorGonzalo Garramuno <ggarra@advancedsl.com.ar>2007-05-07 05:00:46 +0000
committerGonzalo Garramuno <ggarra@advancedsl.com.ar>2007-05-07 05:00:46 +0000
commit315bd2da6eb0f48c05d00d204e350cc46782631b (patch)
treebc30ec7f0b55bbf937867295c8d21ee26f31c9d1 /Lib/std
parent6f332a6e02cacdfec3269a70eb4a0f3cb0c91507 (diff)
downloadswig-315bd2da6eb0f48c05d00d204e350cc46782631b.tar.gz
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
Diffstat (limited to 'Lib/std')
-rw-r--r--Lib/std/std_map.i3
-rw-r--r--Lib/std/std_set.i26
2 files changed, 17 insertions, 12 deletions
diff --git a/Lib/std/std_map.i b/Lib/std/std_map.i
index 9851eb99d..05208418f 100644
--- a/Lib/std/std_map.i
+++ b/Lib/std/std_map.i
@@ -17,11 +17,8 @@
void erase(iterator first, iterator last);
iterator find(const key_type& x);
- const_iterator find(const key_type& x) const;
iterator lower_bound(const key_type& x);
- const_iterator lower_bound(const key_type& x) const;
iterator upper_bound(const key_type& x);
- const_iterator upper_bound(const key_type& x) const;
#endif
%enddef
diff --git a/Lib/std/std_set.i b/Lib/std/std_set.i
index 795144677..47d2af8aa 100644
--- a/Lib/std/std_set.i
+++ b/Lib/std/std_set.i
@@ -7,26 +7,35 @@
// Set
%define %std_set_methods_common(set...)
- %std_container_methods(set);
+ class const_iterator;
+ class const_reverse_iterator;
+
+ set();
+ set( const set& );
+ const_iterator begin() const;
+ const_iterator end() const;
+ const_reverse_iterator rbegin();
+ const_reverse_iterator rend();
+
size_type erase(const key_type& x);
size_type count(const key_type& x) const;
#ifdef SWIG_EXPORT_ITERATOR_METHODS
- void erase(iterator pos);
- void erase(iterator first, iterator last);
+ void erase(const_iterator pos);
+ void erase(const_iterator first, const_iterator last);
- iterator find(const key_type& x);
- iterator lower_bound(const key_type& x);
- iterator upper_bound(const key_type& x);
- std::pair<iterator,iterator> equal_range(const key_type& x);
+ const_iterator find(const key_type& x);
+ const_iterator lower_bound(const key_type& x);
+ const_iterator upper_bound(const key_type& x);
+ std::pair<const_iterator,const_iterator> equal_range(const key_type& x);
#endif
%enddef
%define %std_set_methods(set...)
%std_set_methods_common(set);
#ifdef SWIG_EXPORT_ITERATOR_METHODS
- std::pair<iterator,bool> insert(const value_type& __x);
+ std::pair<const_iterator,bool> insert(const value_type& __x);
#endif
%enddef
@@ -99,6 +108,5 @@ namespace std {
#endif
%std_set_methods(set);
-
};
}