Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Using XS To Wrap A C++ Smart Pointer

by tsee (Curate)
on Sep 28, 2009 at 21:09 UTC ( #798002=note: print w/ replies, xml ) Need Help??


in reply to Using XS To Wrap A C++ Smart Pointer

I'm not aware of a sort of "DELEGATE" XS directive. But maybe some hacking with INTERFACE and INTERFACE_MACRO could help reduce the amount of code (depending on the number of different C method signatures).

Furthermore, you may be able to play tricks with typemaps, i.e. have the smart pointer dereferenced there.

Finally, you may want to have a look at the ExtUtils::XSpp module on CPAN and specifically the ultra-simple example in its examples/ subdirectory. It's meant to make wrapping C++ easier and while its documentation isn't very complete, the code should rather accessible (compared to ExtUtils::ParseXS) and we are open for improvements. There is even a simple plugin mechanism (without docs so far).

Cheers,
Steffen


Comment on Re: Using XS To Wrap A C++ Smart Pointer

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://798002]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2015-07-08 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls