Re: [e-users] Problem using boost::bind and ecore_ipc from Enlightenment
Before i posted to the List, i already managed too bind the Non-Member Functions to the Handler (e.g. ecore_event_handler_add) int Test( void *d, int t, void *e ) { return 0; } ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL, Test, NULL ); I think it's the same in Factory.*. My Problem is, if i have a class and a Memberfunctions Test like the one above, i can't right of it. ( xnowfall tells us a plausible Reason why it doesn't fit like i tried it ) This Version would look like int ClassA::Test( void *d, int t, void *e ) { return 0; } ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL, CannotBindIt, NULL ); CannotBindIt: ClassA::Test, ClassA-Test, bind...(...) Nothing worked. I guess this Example from avisynth is for Non-ClassMember Functions, or am i wrong? Greets, Christian --- SF.Net email is Sponsored by the Better Software Conference EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile Plan-Driven Development * Managing Projects Teams * Testing QA Security * Process Improvement Measurement * http://www.sqe.com/bsce5sf ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users
Re: [e-users] Problem using boost::bind and ecore_ipc from Enlightenment
For an example of implementation of callbacks with boost: http://cvs.sourceforge.net/viewcvs.py/avisynth2/avisynth/src/filters/source/gstreamer/?only_with_tag=avisynth_3_0 look at factory.* Vincent On Mon, 1 Aug 2005, Carsten Haitzler wrote: On Sun, 31 Jul 2005 22:08:37 +0200 Der Lockruf des Kaos [EMAIL PROTECTED] babbled: ecore_* takes a pointer to a function whereas boost::bind returns an object (that can be used as a function by operator overloading). to use a member function you need both a pointer to an object instance and a pointer to the function, which boost::bind wraps up in an object, but which the efl can't use. it would be nice to use stuff like boost::bind, but that's a c++ thing and the efl is c Ok so i must use something else then i guess. Thanks for this good Explanation! I didn't realize this. yeah - basically you will need to write a c callback to c++ boost::bind style calling to make it work. one side of this must me a standard C function call of the prototype ecore expects as handler callbacks. it is possible as you can create a generic callback handler that uses the data pointer as the pointer to the boots:bind: object and then proceeds to call down further from there using c++ as the object you gety is both an object AND a callback (from boost::bind). btw - just theorising here - no practical examples for you. remember efl is c and done in a c way making it easy for c. c++ is often very similar and it is possible to bridge the 2 BUT when you jump into heavily OO c++ construct systems like boost::bind the separation between c and it gets larger and harder to bridge. So i guess i must code a Mini IPC Thing or think about restructuring my Framework in another Fashion. ;) BtW: Enlightenment rocks! Greets, Christian --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 [EMAIL PROTECTED] Tokyo, Japan (東京 日本) --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users --- SF.Net email is Sponsored by the Better Software Conference EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile Plan-Driven Development * Managing Projects Teams * Testing QA Security * Process Improvement Measurement * http://www.sqe.com/bsce5sf ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users
Re: [e-users] Problem using boost::bind and ecore_ipc from Enlightenment
Can't you wrap ecore objects with a boost::smart_ptr ? I use the smart_ptr to wrap objects of the Gstreamer library without any problem. After that, I think it is not difficult to use the C++ stuff of boost. For examples, maybe you can have a look there: http://cvs.sourceforge.net/viewcvs.py/avisynth2/avisynth/src/gstreamer/?only_with_tag=avisynth_3_0 Hope this helps Vincent On Sun, 31 Jul 2005, xnowfall wrote: ecore_* takes a pointer to a function whereas boost::bind returns an object (that can be used as a function by operator overloading). to use a member function you need both a pointer to an object instance and a pointer to the function, which boost::bind wraps up in an object, but which the efl can't use. it would be nice to use stuff like boost::bind, but that's a c++ thing and the efl is c --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users --- SF.Net email is Sponsored by the Better Software Conference EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile Plan-Driven Development * Managing Projects Teams * Testing QA Security * Process Improvement Measurement * http://www.sqe.com/bsce5sf ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users
Re: [e-users] Problem using boost::bind and ecore_ipc from Enlightenment
ecore_* takes a pointer to a function whereas boost::bind returns an object (that can be used as a function by operator overloading). to use a member function you need both a pointer to an object instance and a pointer to the function, which boost::bind wraps up in an object, but which the efl can't use. it would be nice to use stuff like boost::bind, but that's a c++ thing and the efl is c --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users
Re: [e-users] Problem using boost::bind and ecore_ipc from Enlightenment
ecore_* takes a pointer to a function whereas boost::bind returns an object (that can be used as a function by operator overloading). to use a member function you need both a pointer to an object instance and a pointer to the function, which boost::bind wraps up in an object, but which the efl can't use. it would be nice to use stuff like boost::bind, but that's a c++ thing and the efl is c Ok so i must use something else then i guess. Thanks for this good Explanation! I didn't realize this. So i guess i must code a Mini IPC Thing or think about restructuring my Framework in another Fashion. ;) BtW: Enlightenment rocks! Greets, Christian --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users
Re: [e-users] Problem using boost::bind and ecore_ipc from Enlightenment
On Sun, 31 Jul 2005 22:08:37 +0200 Der Lockruf des Kaos [EMAIL PROTECTED] babbled: ecore_* takes a pointer to a function whereas boost::bind returns an object (that can be used as a function by operator overloading). to use a member function you need both a pointer to an object instance and a pointer to the function, which boost::bind wraps up in an object, but which the efl can't use. it would be nice to use stuff like boost::bind, but that's a c++ thing and the efl is c Ok so i must use something else then i guess. Thanks for this good Explanation! I didn't realize this. yeah - basically you will need to write a c callback to c++ boost::bind style calling to make it work. one side of this must me a standard C function call of the prototype ecore expects as handler callbacks. it is possible as you can create a generic callback handler that uses the data pointer as the pointer to the boots:bind: object and then proceeds to call down further from there using c++ as the object you gety is both an object AND a callback (from boost::bind). btw - just theorising here - no practical examples for you. remember efl is c and done in a c way making it easy for c. c++ is often very similar and it is possible to bridge the 2 BUT when you jump into heavily OO c++ construct systems like boost::bind the separation between c and it gets larger and harder to bridge. So i guess i must code a Mini IPC Thing or think about restructuring my Framework in another Fashion. ;) BtW: Enlightenment rocks! Greets, Christian --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 [EMAIL PROTECTED] Tokyo, Japan (東京 日本) --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users
Re: [e-users] Problem using boost::bind and ecore_ipc from Enlightenment
i'm not sure how you mean to use a smart_ptr - maybe we're talking about different things here? a smart_ptr is also an object and can't be passed to a function expecting a function pointer. as for the example, i'm guessing you mean the SignalHandler class? i don't really see the point of that template at all; have you tried calling that constructor with anything other than a function for the CallBack type? Vincent Torri wrote: Can't you wrap ecore objects with a boost::smart_ptr ? I use the smart_ptr to wrap objects of the Gstreamer library without any problem. After that, I think it is not difficult to use the C++ stuff of boost. For examples, maybe you can have a look there: http://cvs.sourceforge.net/viewcvs.py/avisynth2/avisynth/src/gstreamer/?only_with_tag=avisynth_3_0 Hope this helps Vincent On Sun, 31 Jul 2005, xnowfall wrote: ecore_* takes a pointer to a function whereas boost::bind returns an object (that can be used as a function by operator overloading). to use a member function you need both a pointer to an object instance and a pointer to the function, which boost::bind wraps up in an object, but which the efl can't use. it would be nice to use stuff like boost::bind, but that's a c++ thing and the efl is c --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ enlightenment-users mailing list enlightenment-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-users