Making a A_get wrapper seems to be the only way to solve this problem.
THANK YOU JIM
--
View this message in context:
http://boost.2283326.n4.nabble.com/how-to-call-base-class-method-tp3504749p3505083.html
Sent from the Python - c++-sig mailing list archive at Nabble.com.
I have 2 class exposed to python:
class A {
public:
virtual int get() { return 1; }
};
class B : public A {
public:
virtual int get() { return 2; }
};
In python:
obj = B()
obj.get() # this will call B's get()
For some reason, I want to call A's get() in python, like obj->A::get() in
C++.
Thank you, Jim. ^-^
By using boost::intrusive_ptr, the problem is solved. Everything works well.
--
View this message in context:
http://boost.2283326.n4.nabble.com/transfer-ownership-problem-tp3495846p3497818.html
Sent from the Python - c++-sig mailing list archive at Nabble.com.
__
hi, I have some problem about transfer-ownership. C++ code is like this:
class RefCounter {
int _count;
public:
RefCounter() : _count(1) {}
virtual RefCounter() {}
void addRef() { ++_count; }
void release() { --_count; if (_count == 0) delete this; }
};
class A : public RefCoun
Thank you very much. It works!
--
View this message in context:
http://boost.2283326.n4.nabble.com/help-on-abstract-class-export-tp3483090p3483251.html
Sent from the Python - c++-sig mailing list archive at Nabble.com.
___
Cplusplus-sig mailing list
Cpl
Hi, I'm trying to export the following code to python, but failed. Please
help me!
Here is the code:
--
c++ code:
--
class IWorker {
public:
virtual int getData() = 0;
};
class Worker : public IWorker {
public:
int getData() {
return 100;