Say I have a class Foo:
class Foo {
private:
std::string bar;
public:
Foo () {}
Foo (const std::string& bar_) { this->bar = bar_; }
std::string get_bar () { return this->bar; }
};
and a Foo python wrapper FooWrapper.pyx:
from libcpp.string cimport string
cdef extern from "Foo.h":
cdef cppclass Foo:
Foo ()
Foo (string)
Is it possible to access std::string bar
in the .pyx file, without modifying Foo?