[C++-sig] functions whose return type is a pointer

Beetle BeetleHoHo at hotmail.com
Wed Jan 22 13:43:44 CET 2003


Dear All :
    I have several C++ class member functions, whose return type is a pointer. For example, consider this snippet :

class A : 
{
public :
// function getAttributeX returns a pointer of class B 
    B * getAttributeX(int x, int y);
//...
}

// boost.python
    class <A>("A")
        .def("getAttributeX",(B (A::*)(int,int)) A ::getAttributeX)

   If I do this : 
    >>> a = A()
    >>> px = a.getAttributeX()
    what is the data type of px anyway,  or I simply can't do this kind of wrapping ?
    Can anybody be so kind to tell me ?

Regards

Horace (T.L.Ho)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030122/88acba22/attachment.htm>


More information about the Cplusplus-sig mailing list