Commit c7919539 authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #72 from cournape/master

Adding a few words about wrapping static members
parents feefccc1 a827e7ec
...@@ -406,6 +406,27 @@ called, which allows one to do custom C++ to Python error "translations." If ...@@ -406,6 +406,27 @@ called, which allows one to do custom C++ to Python error "translations." If
raise_py_error does not actually raise an exception a RuntimeError will be raise_py_error does not actually raise an exception a RuntimeError will be
raised. raised.
Static member method
--------------------
If the Rectangle class has a static member:
.. sourcecode:: c++
namespace shapes {
class Rectangle {
...
public:
static void do_something();
};
}
you can declare it as a function living in the class namespace, i.e.::
cdef extern from "Rectangle.h" namespace "shapes::Rectangle":
void do_something()
Caveats and Limitations Caveats and Limitations
======================== ========================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment