Re: [pygccxml-development] USE_CALLDEF_ORGANIZER
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2010-01-28 20:53:49
|
On Thu, Jan 28, 2010 at 11:53 AM, Roman Yakovenko <rom...@gm...> wrote: > On Thu, Jan 28, 2010 at 11:45 AM, Berserker <ber...@ho...> wrote: >>> That's okey. You will be able to define your own sort criteria. >> >> Thanks, what about the "implict conversion" problem? >> I'm looking at the Py++ sources and maybe I think that "is_convertible" >> method among t1, t2 should do the job when organizer_t_wrapper >> compares the two types. > > May be. It takes into account the conversion operators too. I am not > sure whether you want it or not. > > struct A{} > > struct B{ > operator A() const; > } > > I suggest you to start prepare a ton of test cases, so when you will > done with algorithm, you will be able to check the result. http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1821&view=rev I committed a change, which extends the algorithms to work with functions, that has any number of arguments. It doesn't take into account implicit conversion, cause it could break backward compatibility. I also changed the methods names, so they will not be private. All you need is to redefine "cmp_calldefs" and to introduce your logic. Both functions have same number of required arguments. You can take a look on pygccxml.declarations.type_traits module, which contains many useful functions. Enjoy. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |