[Xapian-discuss] Swig on matchspy

Yann ROBIN me.show at gmail.com
Mon Dec 8 17:46:03 GMT 2008


I'm currently testing the trunk version of Xapian using CSharp.
And i needed to test the CategorySelectMatchSpy.

So i change a little bit the xapian.i file to generate the needed
class and learn on the way how to use swig.

For the get_value of ValueCountMatchSpy i have now a class that wrap
the std::map<std::string, Xapian::doccount> class but i don't have any
method to get the iterator.
So i added an extension

%extend std::map {
   std::map<K, T>::iterator get_begin_iterator() {
     return (*self).begin();

but it seems that there is no mapping for the iterator so it generates
an "empty" class.

Could someone give me a tips ?



More information about the Xapian-discuss mailing list