From: <jas...@us...> - 2008-04-14 04:57:14
|
Revision: 10374 http://swig.svn.sourceforge.net/swig/?rev=10374&view=rev Author: jason_e_stewart Date: 2008-04-13 21:57:11 -0700 (Sun, 13 Apr 2008) Log Message: ----------- Committed Documentation patch for: [ 1941709 ] document (no)valuewrapper %features Modified Paths: -------------- trunk/Doc/Manual/SWIGPlus.html Modified: trunk/Doc/Manual/SWIGPlus.html =================================================================== --- trunk/Doc/Manual/SWIGPlus.html 2008-04-13 21:16:12 UTC (rev 10373) +++ trunk/Doc/Manual/SWIGPlus.html 2008-04-14 04:57:11 UTC (rev 10374) @@ -1431,10 +1431,10 @@ </p> <p> -If <tt>Vector</tt> is defined as class in the interface, but it does -not support a default constructor, SWIG changes the wrapper code by -encapsulating the arguments inside a special C++ template wrapper -class. This produces a wrapper that looks like this: +If <tt>Vector</tt> is defined as class in the interface, but it does not +support a default constructor, SWIG changes the wrapper code by encapsulating +the arguments inside a special C++ template wrapper class, through a process +called the "Fulton Transform". This produces a wrapper that looks like this: </p> <div class="code"> @@ -1458,6 +1458,22 @@ </p> <p> +Although SWIG usually detects the classes to which the fulton transform should +be applied, in some situations it's necessary to override it. That's done with +<tt>%feature("valuewrapper")</tt> and <tt>%feature("novaluewraper")</tt>: +<div class="code"><pre> +%feature("novaluewrapper") A; +class A; + +%feature("valuewrapper") B; +struct B { + B(); + // .... +}; +</pre></div> +</p> + +<p> <b>Note:</b> this transformation has no effect on typemaps or any other part of SWIG---it should be transparent except that you may see this code when reading the SWIG output file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |