[pygccxml-development] Re: My log
Brought to you by:
mbaas,
roman_yakovenko
From: Lakin W. <lak...@gm...> - 2006-05-27 18:12:11
|
I don't mind switching to a public mailing list at all. It will be benificial to have all of this recorded somewhere. On 5/27/06, Roman Yakovenko <rom...@gm...> wrote: > On 5/27/06, Lakin Wecker <lak...@gm...> wrote: > > Here is the script that I'm currently using and the results: > > http://lakin.weckers.net/ogre/OgrePython.py > > http://lakin.weckers.net/ogre/pyplusplus.log > > > > Maybe this is one of the issues you were talking about. > > > > To start this project, these are the rules that I have come up with: > > 1) protected and private members aren't necessary. (I think this is a safe > > general rule to start out with, there may be some exceptions in the future, > > but none that I can think of currently). > > 2) Ogre will name methods starting with a '_' when they need them to be > > public (For internal use), but don't think that they should be part of the > > API. > > 3) There are a number of abstract base classes , Like GPUProgram, which are > > needed for the C++ api, but may not be necessary in the python API. (I'm > > not yet sure of this.) > > Excuse me, but I think I don't understand something. I talked about > next issues: > 1. Ogre SharedPtr class. We will have to create manual wrapper for this class. > I could be wrong, but it should be very similar to code from boost.python > library that works with boost.shared_ptr class > > 2. include bitset header - resolved > > 3. unnamed classes - this one I should solve this evening. > What are the issues you are talking about. Sorry. I was not clear. There is an exception raised (see the bottom of my log). Because I'm not yet familiar enough with py++, I thought that this exception might be caused by one of the issues that you had mentioned, (maybe #2?). And, because you were planning on fixing #2 tonight, I thought I would not waste my time trying to solve this problem until after it is fixed. > I took a look on your script. You are doing good. Your script is missing call > policies: > > http://boost.org/libs/python/doc/tutorial/doc/html/python/functions.html#python.call_policies > > For example Ogre defines "clone" member function, that returns raw pointer to > new object. > > mb.member_functions( 'clone' ).call_policies \ > = module_builder.call_policies.return_value_policy( > module_builder.call_policies.manage_new_object ) You're right, this is something that needs to be taken care of, although, I had not yet realized it. I will work on this for my next version. > Another issue, I found in your script: you write all generated code into > single file. I am almost sure, that most of compilers will not handle this. > You can use another API provided by module_builder_t class: > > mb.split_module( directory name ) I knew this was an issue and was going to investigate it, but you've answered my question already. Thanks. > All generated code will be split to multiple files, using classic C++ strategy: > 1 class == source + header files. > > You may have some issues using this API - template instantiations. > In python "vector<int>" is illegal name, so py++ replace is with something > ugly: "vector_less_int_more" or something like this. The name could be too > long, so file system will not let py++ to create file with such name. > You should give > an alias to the class: > > mb.class_( 'vector<int>' ).alias = "VectorOfInt" Ok, I will check into this. Thanks for your help. > Any way I am online and ready for hard work :-). Ok, sounds good. Me too. Lakin > P.S. > If you don't mind, I would like to switch to public mailing list. I am > almost sure, that > the issues you have, other people will have too. I would like to share > my answer. > Here is a page where you can subscribe to py++ mailing list( low traffic): > > https://lists.sourceforge.net/lists/listinfo/pygccxml-development > > Thanks. > -- > Roman Yakovenko > C++ Python language binding > http://www.language-binding.net/ > |