I am having trouble wrapping a container that can hold multiple object
types and therefore has multiple iterator types.
My C++ library has these classes:
class Tomato;
class Potato;
class Garden {
Iter<Tomato> get_tomatoes();
Iter<Potato> get_potatoes();
};
template<class T>
class Iter {
T get_next();
};
which allows to write:
Iter<Potato> potatoes = garden.get_potatoes();
while (Potato potato = potatoes.get_next()) {
cout << potato.name();
}
I am trying to use boost to wrap it so that I can write in python:
for potato in garden.get_potatoes():
print potato.name()
Any pointers how to achieve this with boost?
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig