<?xml version="1.0" encoding="windows-1252"?>
<node id="798002" title="Re: Using XS To Wrap A C++ Smart Pointer" created="2009-09-28 17:09:31" updated="2009-09-28 17:09:31">
<type id="11">
note</type>
<author id="287302">
tsee</author>
<data>
<field name="doctext">
&lt;p&gt;
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).
&lt;/p&gt;&lt;p&gt;
Furthermore, you may be able to play tricks with typemaps, i.e. have the smart pointer dereferenced there.
&lt;/p&gt;&lt;p&gt;
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).
&lt;/p&gt;&lt;p&gt;
Cheers,&lt;/br&gt;
Steffen&lt;/p&gt;</field>
<field name="root_node">
797970</field>
<field name="parent_node">
797970</field>
</data>
</node>
