Hello,
The Situation: I created an instance of a C++ class which contains
several virtual functions. The important thing going on here is that
the class contains function combinations looking like the following:
void callEvent()
virtual void onEvent(object eventData)
where callEvent essentially does some stuff and stores data in the
eventData object which is then passed to the onEvent(). In fact,
onEvent() is _called_ by the class upon the successful completion of
callEvent(). The point is that when you overload onEvent(), you write
your own instructions for what to do with eventData. The function
itself in the class contains no actual code aside from what you
overload.
Question: How do I wrap this intricate situation in Cython? It needs
to be something more than just.
------
.pxd
------
cdef extern from "the_class.h":
ctypedef struct the_class:
void callEvent()
void onEvent(object eventData)
cdef class MYWrapper:
cdef the_class wrapped_class
------
.pyx
------
cdef class MyWrapper:
def my_callEvent(self):
self.wrapped_class.callEvent()
def my_onEvent(self, object eventData):
self.wrapped_class.onEvent(eventData)
since the main problem is in handling the wrapped_class.onEvent()
situation. I don't need to call onEvent() since the completion of
callEvent() does so for me. I just want to overload it, I suppose, and
have my code be executed upon the calling of on Event().
Any hints as to what to do? I appreciate any help. Thanks in advance.
--
Chris Swierczewski
[EMAIL PROTECTED]
mobile: 253 2233721
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev