summaryrefslogtreecommitdiff
path: root/Lib/ruby/rubyiterators.swg
diff options
context:
space:
mode:
authorGonzalo Garramuno <ggarra@advancedsl.com.ar>2007-05-16 22:48:01 +0000
committerGonzalo Garramuno <ggarra@advancedsl.com.ar>2007-05-16 22:48:01 +0000
commitb20fd0d06f13c0a70abfcb3a09cb7c9c62a3d560 (patch)
tree8e2b03f2feb38a4320cc54c0d9dafc2ce561fd80 /Lib/ruby/rubyiterators.swg
parent765e3d27f00f7440db89850110148c08c75f8d97 (diff)
downloadswig-b20fd0d06f13c0a70abfcb3a09cb7c9c62a3d560.tar.gz
Moved functors away from std_set.i and std_map.i
into their own std_functors.i file. Made binarypredicate, etc. be templates to allow more strict predicates/functors. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9815 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/ruby/rubyiterators.swg')
-rw-r--r--Lib/ruby/rubyiterators.swg19
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/ruby/rubyiterators.swg b/Lib/ruby/rubyiterators.swg
index fa70f74d3..b2482a61d 100644
--- a/Lib/ruby/rubyiterators.swg
+++ b/Lib/ruby/rubyiterators.swg
@@ -316,6 +316,10 @@ namespace swig {
}
public:
+ ConstIterator_T() : ConstIterator(Qnil)
+ {
+ }
+
ConstIterator_T(const_iter curr, VALUE seq = Qnil)
: ConstIterator(seq), current(curr)
{
@@ -326,6 +330,11 @@ namespace swig {
return current;
}
+ const value_type& operator*() const
+ {
+ return *current;
+ }
+
virtual VALUE inspect() const
{
VALUE ret = rb_str_new2("#<");
@@ -422,6 +431,16 @@ namespace swig {
*current = b;
return *this;
}
+
+ const value_type& operator*() const
+ {
+ return *current;
+ }
+
+ value_type& operator*()
+ {
+ return *current;
+ }
virtual VALUE inspect() const
{