|
Boost : |
From: Prabhu Ramachandran (prabhu_at_[hidden])
Date: 2000-10-31 05:57:13
hi,
I've been trying out py_cpp and have manged to get the hang of it,
somewhat. Here are some issues...
(1) There are some bugs in the documentation.
In the section titled overridable virtual functions, the
default function definition is given as follows:
const char* default_get() const
{ return this->hello::world::get(); }
This does not _compile_ under gcc. I looked at your extclass_demo
and figured that the following works.
static const char* default_get (hello::world *self)
{ return self->hello::world::get (); }
This works fine. I'd appreciate a change in the docs that reflect
this. It was a pain assuming that the docs were right and looking
for other non-existent errors. Also, if it isnt too hard to
explain, I'd like to know why this works and why the first one
doesnt.
(2) Given a class library, it is normal for a useful concrete
class to have a large inheritance. Currently, with py_cpp, if I
have class_B derived from class_A (in the C++ code) and only
expose the methods new to class_B in the wrapper code, I cannot
call inherited methods for class_B under python unless I re-expose
them for class_B. This implies that for a large inheritance, I'd
have to look at every base class and pull out all the inherited
functions and wrap them all. This is rather painful. Is there a
way out of this? Or is this impossible to implement? Or am I
missing something.
I thought that discussions on py_cpp belong on the boost list, hence
sent this message to the boost list. If you folks disapprove, I can
post them personally to David Abrahams.
thanks,
prabhu
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk