summaryrefslogtreecommitdiff
path: root/Doc/Manual/Octave.html
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/Manual/Octave.html')
-rw-r--r--Doc/Manual/Octave.html52
1 files changed, 26 insertions, 26 deletions
diff --git a/Doc/Manual/Octave.html b/Doc/Manual/Octave.html
index bc6873c4b..46a8941c2 100644
--- a/Doc/Manual/Octave.html
+++ b/Doc/Manual/Octave.html
@@ -8,7 +8,7 @@
<body bgcolor="#ffffff">
-<H1><a name="Octave"></a>31 SWIG and Octave</H1>
+<H1><a name="Octave"></a>32 SWIG and Octave</H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
@@ -55,15 +55,15 @@ More information can be found at <a href="http://www.gnu.org/software/octave/">O
Also, there are a dozen or so examples in the Examples/octave directory, and hundreds in the test suite (Examples/test-suite and Examples/test-suite/octave).
</p>
-<H2><a name="Octave_nn2"></a>31.1 Preliminaries</H2>
+<H2><a name="Octave_nn2"></a>32.1 Preliminaries</H2>
<p>
-As of SWIG 3.0.0, the Octave module has been tested with Octave versions 3.0.5, 3.2.4, 3.4.3, 3.6.4, and 3.8.0.
-Use of Octave versions older than 3.x.x is not recommended, as these versions are no longer tested with SWIG.
+As of SWIG 3.0.3, the Octave module has been tested with Octave versions 3.2.4, 3.4.3, 3.6.4, and 3.8.1.
+Use of older Octave versions is not recommended, as these versions are no longer tested with SWIG.
</p>
-<H2><a name="Octave_nn3"></a>31.2 Running SWIG</H2>
+<H2><a name="Octave_nn3"></a>32.2 Running SWIG</H2>
<p>
@@ -95,7 +95,7 @@ The <tt>-c++</tt> option is also required when wrapping C++ code:
This creates a C++ source file "example_wrap.cpp". A C++ file is generated even when wrapping C code as Octave is itself written in C++ and requires wrapper code to be in the same language. The generated C++ source file contains the low-level wrappers that need to be compiled and linked with the rest of your C/C++ application (in this case, the gcd implementation) to create an extension module.
</p>
-<H3><a name="Octave_nn4"></a>31.2.1 Command-line options</H3>
+<H3><a name="Octave_nn4"></a>32.2.1 Command-line options</H3>
<p>
@@ -118,7 +118,7 @@ The special name "." loads C global variables into the module namespace, i.e. al
The <em>-opprefix</em> options sets the prefix of the names of global/friend <a href="#Octave_nn18">operator</a> functions.
</p>
-<H3><a name="Octave_nn5"></a>31.2.2 Compiling a dynamic module</H3>
+<H3><a name="Octave_nn5"></a>32.2.2 Compiling a dynamic module</H3>
<p>
@@ -145,7 +145,7 @@ $ mkoctfile example_wrap.cpp example.c
<div class="targetlang"><pre>octave:1&gt; swigexample</pre></div>
-<H3><a name="Octave_nn6"></a>31.2.3 Using your module</H3>
+<H3><a name="Octave_nn6"></a>32.2.3 Using your module</H3>
<p>
@@ -163,10 +163,10 @@ octave:4&gt; swigexample.cvar.Foo=4;
octave:5&gt; swigexample.cvar.Foo
ans = 4 </pre></div>
-<H2><a name="Octave_nn7"></a>31.3 A tour of basic C/C++ wrapping</H2>
+<H2><a name="Octave_nn7"></a>32.3 A tour of basic C/C++ wrapping</H2>
-<H3><a name="Octave_nn8"></a>31.3.1 Modules</H3>
+<H3><a name="Octave_nn8"></a>32.3.1 Modules</H3>
<p>
@@ -211,7 +211,7 @@ octave:4&gt; swigexample.gcd(4,6)
ans = 2
</pre></div>
-<H3><a name="Octave_nn9"></a>31.3.2 Functions</H3>
+<H3><a name="Octave_nn9"></a>32.3.2 Functions</H3>
<p>
@@ -228,7 +228,7 @@ int fact(int n); </pre></div>
<div class="targetlang"><pre>octave:1&gt; swigexample.fact(4)
24 </pre></div>
-<H3><a name="Octave_nn10"></a>31.3.3 Global variables</H3>
+<H3><a name="Octave_nn10"></a>32.3.3 Global variables</H3>
<p>
@@ -281,7 +281,7 @@ octave:2&gt; swigexample.PI=3.142;
octave:3&gt; swigexample.PI
ans = 3.1420 </pre></div>
-<H3><a name="Octave_nn11"></a>31.3.4 Constants and enums</H3>
+<H3><a name="Octave_nn11"></a>32.3.4 Constants and enums</H3>
<p>
@@ -303,7 +303,7 @@ swigexample.SCONST="Hello World"
swigexample.SUNDAY=0
.... </pre></div>
-<H3><a name="Octave_nn12"></a>31.3.5 Pointers</H3>
+<H3><a name="Octave_nn12"></a>32.3.5 Pointers</H3>
<p>
@@ -350,7 +350,7 @@ octave:2&gt; f=swigexample.fopen("not there","r");
error: value on right hand side of assignment is undefined
error: evaluating assignment expression near line 2, column 2 </pre></div>
-<H3><a name="Octave_nn13"></a>31.3.6 Structures and C++ classes</H3>
+<H3><a name="Octave_nn13"></a>32.3.6 Structures and C++ classes</H3>
<p>
@@ -485,7 +485,7 @@ ans = 1
Depending on the ownership setting of a <tt>swig_ref</tt>, it may call C++ destructors when its reference count goes to zero. See the section on memory management below for details.
</p>
-<H3><a name="Octave_nn15"></a>31.3.7 C++ inheritance</H3>
+<H3><a name="Octave_nn15"></a>32.3.7 C++ inheritance</H3>
<p>
@@ -494,7 +494,7 @@ This information contains the full class hierarchy. When an indexing operation (
the tree is walked to find a match in the current class as well as any of its bases. The lookup is then cached in the <tt>swig_ref</tt>.
</p>
-<H3><a name="Octave_nn17"></a>31.3.8 C++ overloaded functions</H3>
+<H3><a name="Octave_nn17"></a>32.3.8 C++ overloaded functions</H3>
<p>
@@ -504,7 +504,7 @@ The dispatch function selects which overload to call (if any) based on the passe
<tt>typecheck</tt> typemaps are used to analyze each argument, as well as assign precedence. See the chapter on typemaps for details.
</p>
-<H3><a name="Octave_nn18"></a>31.3.9 C++ operators</H3>
+<H3><a name="Octave_nn18"></a>32.3.9 C++ operators</H3>
<p>
@@ -608,7 +608,7 @@ On the C++ side, the default mappings are as follows:
Octave can also utilise friend (i.e. non-member) operators with a simple %rename: see the example in the Examples/octave/operator directory.
</p>
-<H3><a name="Octave_nn19"></a>31.3.10 Class extension with %extend</H3>
+<H3><a name="Octave_nn19"></a>32.3.10 Class extension with %extend</H3>
<p>
@@ -638,7 +638,7 @@ octave:3&gt; printf("%s\n",a);
octave:4&gt; a.__str()
4
</pre></div>
-<H3><a name="Octave_nn20"></a>31.3.11 C++ templates</H3>
+<H3><a name="Octave_nn20"></a>32.3.11 C++ templates</H3>
<p>
@@ -715,14 +715,14 @@ ans =
</pre></div>
-<H3><a name="Octave_nn21"></a>31.3.12 C++ Smart Pointers</H3>
+<H3><a name="Octave_nn21"></a>32.3.12 C++ Smart Pointers</H3>
<p>
C++ smart pointers are fully supported as in other modules.
</p>
-<H3><a name="Octave_nn22"></a>31.3.13 Directors (calling Octave from C++ code)</H3>
+<H3><a name="Octave_nn22"></a>32.3.13 Directors (calling Octave from C++ code)</H3>
<p>
@@ -803,14 +803,14 @@ c-side routine called
octave-side routine called
</pre></div>
-<H3><a name="Octave_nn23"></a>31.3.14 Threads</H3>
+<H3><a name="Octave_nn23"></a>32.3.14 Threads</H3>
<p>
The use of threads in wrapped Director code is not supported; i.e., an Octave-side implementation of a C++ class must be called from the Octave interpreter's thread. Anything fancier (apartment/queue model, whatever) is left to the user. Without anything fancier, this amounts to the limitation that Octave must drive the module... like, for example, an optimization package that calls Octave to evaluate an objective function.
</p>
-<H3><a name="Octave_nn24"></a>31.3.15 Memory management</H3>
+<H3><a name="Octave_nn24"></a>32.3.15 Memory management</H3>
<p>
@@ -844,14 +844,14 @@ The %newobject directive may be used to control this behavior for pointers retur
In the case where one wishes for the C++ side to own an object that was created in Octave (especially a Director object), one can use the __disown() method to invert this logic. Then letting the Octave reference count go to zero will not destroy the object, but destroying the object will invalidate the Octave-side object if it still exists (and call destructors of other C++ bases in the case of multiple inheritance/<tt>subclass()</tt>'ing).
</p>
-<H3><a name="Octave_nn25"></a>31.3.16 STL support</H3>
+<H3><a name="Octave_nn25"></a>32.3.16 STL support</H3>
<p>
Various STL library files are provided for wrapping STL containers.
</p>
-<H3><a name="Octave_nn26"></a>31.3.17 Matrix typemaps</H3>
+<H3><a name="Octave_nn26"></a>32.3.17 Matrix typemaps</H3>
<p>