Committed Documentation patch for: [ 1941709 ] document (no)valuewrapper %features
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10374 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
87390fac26
commit
aeef2d516d
1 changed files with 20 additions and 4 deletions
|
|
@ -1431,10 +1431,10 @@ default constructor.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If <tt>Vector</tt> is defined as class in the interface, but it does
|
If <tt>Vector</tt> is defined as class in the interface, but it does not
|
||||||
not support a default constructor, SWIG changes the wrapper code by
|
support a default constructor, SWIG changes the wrapper code by encapsulating
|
||||||
encapsulating the arguments inside a special C++ template wrapper
|
the arguments inside a special C++ template wrapper class, through a process
|
||||||
class. This produces a wrapper that looks like this:
|
called the "Fulton Transform". This produces a wrapper that looks like this:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="code">
|
<div class="code">
|
||||||
|
|
@ -1457,6 +1457,22 @@ can be found by reading the SWIG wrapper code. This class is really nothing more
|
||||||
wrapper around a pointer.
|
wrapper around a pointer.
|
||||||
</p>
|
</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>
|
<p>
|
||||||
<b>Note:</b> this transformation has no effect on typemaps
|
<b>Note:</b> this transformation has no effect on typemaps
|
||||||
or any other part of SWIG---it should be transparent except that you
|
or any other part of SWIG---it should be transparent except that you
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue