From: Roman Yakovenko <roman.yakovenko@gm...> - 2009-11-29 19:18:24
On Fri, Nov 27, 2009 at 4:47 PM, Berserker <berserker_r@...> wrote:
Sorry for late response, I was very busy for a few days.
> I have read this link in the documentation:
> I'd like to not switch to macros because of the three issues reported there.
> Is it possible to "customize" the registration order of a class/type in
Yes. Take a look on pyplusplus/creators_factory/sort_algorithms.py
You can write the following code:
import pyplusplus.creators_factory.sort_algorithm as sort_algs
sort_algs.sort_classes = << your function >>
Also the code sits in the "implementation directory", it belongs to
"public interface" and some day I will move it there.
> I'm thinking to something like a simple "int" property (default None)
> that defines the registration order of the classes or a similar solution.
It seems, that I am too tired and can't see how this will help you to
solve the problem. If you are able to define the classes order, then I
am sure we can improve "built-in" Py++ algorithm to handle with such
situation. Where I am wrong?
C++ Python language binding
Roman Yakovenko wrote:
> Yes. Take a look on pyplusplus/creators_factory/sort_algorithms.py
> You can write the following code:
> import pyplusplus.creators_factory.sort_algorithm as sort_algs
> sort_algs.sort_classes = << your function >>
> Also the code sits in the "implementation directory", it belongs to
> "public interface" and some day I will move it there.
Thanks Roman, I managed to sort classes using this method :)
Facile, veloce, sicuro: scarica Internet Explorer 8 per MSN