summaryrefslogtreecommitdiff
path: root/Doc/Manual
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2023-04-20 07:35:34 +1200
committerOlly Betts <olly@survex.com>2023-04-20 07:35:34 +1200
commitb41107a215a2e9f1e25fed7d3928712d36bb88b5 (patch)
tree382fc0fd0d6338ef35be92108610de0ebc84ded1 /Doc/Manual
parent58160ca4eb5915b3be7873968f362cc26e784407 (diff)
parente351d7faee228acacc6cad893521ae10885e2a6b (diff)
downloadswig-b41107a215a2e9f1e25fed7d3928712d36bb88b5.tar.gz
Merge branch 'scilab-2023'
Closes #2524
Diffstat (limited to 'Doc/Manual')
-rw-r--r--Doc/Manual/Scilab.html24
1 files changed, 21 insertions, 3 deletions
diff --git a/Doc/Manual/Scilab.html b/Doc/Manual/Scilab.html
index 95eea340f..7d2c6a66e 100644
--- a/Doc/Manual/Scilab.html
+++ b/Doc/Manual/Scilab.html
@@ -96,8 +96,7 @@ SWIG for Scilab supports Linux. Other operating systems haven't been tested.
</p>
<p>
-Scilab is supported from version 5.3.3 onwards.
-The forthcoming version 6, as of January 2015, is also supported.
+Scilab is supported from version 5.3.3 onwards, the SWIG generated code is supported on both Scilab 5, Scilab 6 and more recent versions.
</p>
<p>
@@ -304,6 +303,11 @@ The following table lists the Scilab specific command line options in addition t
<td>Generate the gateway XML with the given &lt;gateway_id&gt;</td>
</tr>
+<tr>
+<td><tt>-gatewayxml6</tt></td>
+<td>Generate a gateway XML file compatible with Scilab 6</td>
+</tr>
+
</table>
<p>
@@ -2135,6 +2139,20 @@ clear get_file_path;
<li><tt><b>fcts</b></tt>: vector of character strings. The name of new Scilab function.</li>
</ul>
+<H3><a name="Scilab_generated_scripts_gateway">36.7.3 Gateway XML files</a></H3>
+
+<p>If you need to post-process the entry points, Scilab gateway files are XML files that can be used to retrieve all SWIG-generated entry points. With these XML files you can write your own <tt>builder_swig.sce</tt> file to add custom Scilab for building or linking the generated code. Documentation stubs can also be generated thanks to these function listings.</tt></p>
+<p>As an example, for a SWIG <a href="Modules.html">module</a> named <tt>fmuswig</tt> the Scilab code below can be used to store all SWIG-generated functions in a variable named <tt>funs</tt></tt>.</p>
+<div class="code"><pre>
+ // src_swig_path is a path to the directory containing the fmuswig.i file
+
+ doc = xmlRead(src_swig_path + "/fmuswig_gateway.xml");
+ names = xmlAsText(xmlXPath(doc, "//gateway/@name"));
+ funs = xmlAsText(xmlXPath(doc, "//gateway/@function"));
+ xmlDelete(doc);
+
+</pre></div>
+
<H2><a name="Scilab_other_resources">36.8 Other resources</a></H2>
@@ -2142,7 +2160,7 @@ clear get_file_path;
<ul>
<li>Example use cases can be found in the <tt>Examples/scilab</tt> directory.</li>
<li>The test suite in the <tt>Examples/test-suite/scilab</tt> can be another source of useful use cases.</li>
-<li>The <a href="https://help.scilab.org/docs/5.5.0/en_US/api_scilab.html">Scilab API</a> is used in the generated code and is a useful reference when examining the output.</li>
+<li>The <a href="https://help.scilab.org/api_scilab.html">Scilab API</a> is used in the generated code and is a useful reference when examining the output.</li>
<li>This <a href="https://wiki.scilab.org/howto/Create%20a%20toolbox">guide</a> describes the Scilab external modules structure and files, in particular the files that are generated by SWIG for Scilab.</li>
</ul>