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
This commit is contained in:
Gonzalo Garramuno 2007-05-16 22:48:01 +00:00
commit b20fd0d06f
5 changed files with 102 additions and 37 deletions

View file

@ -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
{