"Leonard \"paniq\" Ritter" <paniq@paniq.org> writes:
i see there are easy methods of exporting operators that deal with values and mathematical operations, but is there any chance of exporting pointer-to operators?
in this particular case i am exporting a custom interface pointer class to python.
in c++ i can use such a smart pointer like this:
Ptr<View> view(L"µ.Sandoz.View"); if (view) { view->Attach(hWnd, true);
...
where Ptr<T> exposes its member T _object using
InterfaceType* operator->() { return _object; }
i'm exposing Ptr<View> as "View" and the View interface as "ViewInterface" to python.
what i'd like to write in python would be something along the lines of
view = View("µ.Sandoz.View") view.Attach(self.window, true)
can i realize this without much trouble?
Yeah, just export View using Ptr<View> as the HeldType. -- Dave Abrahams Boost Consulting www.boost-consulting.com