[C++-sig] Protected virtual Functions with default implementation

Renato Araujo renatox at gmail.com
Mon Mar 23 18:50:35 CET 2009


Hi Roman

The problem is that: How export this class?

namespace geometry{

class point_t
{
public:
    point_t() {};

protected:
    virtual bool ret_bool() { return false; }
};

class point_2 : public point_t
{
public:
    point_2() {};
};
}

I put attached the Py++ genereted code and a small test.
My  question is, how export this protected virtual function? the way
used in Py++ not work in this case.

Thanks

On Mon, Mar 23, 2009 at 5:57 AM, Roman Yakovenko
<roman.yakovenko at gmail.com> wrote:
> 2009/3/19 Renato Araujo <renatox at gmail.com>:
>> Hi guys, I'm working again in my bindings generation and I get a new
>> question about virtual functions.
>>
>> I would like to know how export protected virtual functions with
>> default implementation, because I didn't find any documentation about
>> this and the code generated by Py++ not work in all cases.
>>
>> I have attached the test case on this e-mail, if someone would like to
>> try my implementation.
>
> Do you mind to be more specific?
>
> Can you show the original source code, the generated one and the
> "right\desired" one?
>
> Thanks
>
> --
> Roman Yakovenko
> C++ Python language binding
> http://www.language-binding.net/
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>



-- 
Renato Araujo Oliveira Filho
-------------- next part --------------
A non-text attachment was scrubbed...
Name: properties.py.cpp
Type: text/x-c++src
Size: 1637 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090323/83bde052/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 260 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090323/83bde052/attachment.py>


More information about the Cplusplus-sig mailing list