aboutsummaryrefslogtreecommitdiff
path: root/Doc/Manual
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2013-09-03 23:58:05 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-09-03 23:58:05 +0100
commitf47075ec991716733d7e3588aea5e58673c004ff (patch)
treebadd6ccf2d8c2c55a07eb826a8aa35658e2c89d3 /Doc/Manual
parent67659773ccfd927ca86b35c31c7bb338532c2729 (diff)
downloadswig-f47075ec991716733d7e3588aea5e58673c004ff.tar.gz
Smart pointer documentation improvement
Diffstat (limited to 'Doc/Manual')
-rw-r--r--Doc/Manual/SWIGPlus.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html
index 716882f53..2713725d7 100644
--- a/Doc/Manual/SWIGPlus.html
+++ b/Doc/Manual/SWIGPlus.html
@@ -4433,7 +4433,7 @@ around some other class. For example:
template&lt;class T&gt; class SmartPtr {
T *pointee;
public:
- ...
+ SmartPtr(T *p) : pointee(p) { ... }
T *operator-&gt;() {
return pointee;
}
@@ -4453,7 +4453,7 @@ typedef SmartPtr&lt;Foo_Impl&gt; Foo;
// Create smart pointer Foo
Foo make_Foo() {
- return SmartPtr(new Foo_Impl());
+ return SmartPtr&lt;Foo_Impl&gt;(new Foo_Impl());
}
// Do something with smart pointer Foo
@@ -4461,6 +4461,9 @@ void do_something(Foo f) {
printf("x = %d\n", f-&gt;x);
f-&gt;bar();
}
+
+// Call the wrapped smart pointer proxy class in the target language 'Foo'
+%template(Foo) SmartPtr&lt;Foo_Impl&gt;;
</pre>
</div>