My iterator works perfectly now! I don't fully understand what your code snippet is doing, is there any documentation on this?
Thanks so much for your help,
Am 27.02.2008, 23:23 Uhr, schrieb Gregory Bayard
> I am running SWIG 1.3.29 (I can't upgrade because an apparent bug where
> virtual functions in director classes go into infinite recursion loops in
> 1.3.30+) with Python 2.4.4. I am trying to wrap a class which provides a
> custom iterator to access price elements. I tried cloning the std_map.i
> behavior which I found in the examples/library code, but I'm getting the
> following error:
> My wrapping code is as follows where the MyOrderBook class has two
> "const_iterator begin()" and "const_iterator end()":
> pycontainer.swgfiles included in the distribution? Any help would be
> Sadly, I can't use a standard library container for wrapping. Does anyone
> see anything obvious I'm doing wrong or even better, does anyone have any
> custom iterator example code outside of the std_*.i and
> greatly appreciated.
The compile error you get can probably be fixed by something like
I am not sure if this fixes your whole iterator thing, but at least it
should fix the immediate compile error.