I'm trying to use XS to wrap a C++ class that is accessible only through a separate, smart pointer class. So it appears that Perl objects should store a pointer to a smart pointer object. The double dereference necessary to call the methods I'm after is going to lead to miles of this.
bool
SmartPtr::isValid()
CODE:
RETVAL=(*THIS)->isValid();
OUTPUT:
RETVAL
const char *name
SmartPtr::name()
CODE:
RETVAL=(*THIS)->name();
OUTPUT:
RETVAL
I'd much rather the XS compiler somehow automate all of this repetition, given something more along these lines.
bool
SmartPtr::isValid()
const char *
SmartPtr::name()
Is there some sneaky XS directive or typemap game that will get me there with minimal fuss? The best alternative I can come up with is to write an
xsubpppp.
Thanks,
Jim