On Fri, Nov 27, 2009 at 4:47 PM, Berserker <ber...@ho...> wrote:
Sorry for late response, I was very busy for a few days.
> I have read this link in the documentation:
> http://language-binding.net/pyplusplus/documentation/functions/default_args.html#registration-order-problem
>
> 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
> Py++?
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?
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|