Correct links in html documentation using new version of makechap.py
Corrects position of heading text within A and H1, H2, ... elements.
This commit is contained in:
parent
abe42bbb16
commit
8288ac15a0
41 changed files with 1262 additions and 1262 deletions
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<body bgcolor="#ffffff">
|
||||
|
||||
<H1><a name="Scilab"></a>39 SWIG and Scilab</H1>
|
||||
<H1><a name="Scilab">39 SWIG and Scilab</a></H1>
|
||||
<!-- INDEX -->
|
||||
<div class="sectiontoc">
|
||||
<ul>
|
||||
|
|
@ -87,7 +87,7 @@ This chapter explains how to use SWIG for Scilab. After this introduction, you s
|
|||
</p>
|
||||
|
||||
|
||||
<H2><a name="Scilab_preliminaries"></a>39.1 Preliminaries</H2>
|
||||
<H2><a name="Scilab_preliminaries">39.1 Preliminaries</a></H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -104,7 +104,7 @@ SWIG for Scilab supports C language. C++ is partially supported. See <a href="#S
|
|||
</p>
|
||||
|
||||
|
||||
<H2><a name="Scilab_running_swig"></a>39.2 Running SWIG</H2>
|
||||
<H2><a name="Scilab_running_swig">39.2 Running SWIG</a></H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -138,7 +138,7 @@ Note: a code in an <tt>%inline</tt> section is both parsed and wrapped by SWIG,
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Scilab_running_swig_generating_module"></a>39.2.1 Generating the module</H3>
|
||||
<H3><a name="Scilab_running_swig_generating_module">39.2.1 Generating the module</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -181,7 +181,7 @@ The <tt>swig</tt> executable has several other command line options you can use.
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Scilab_running_swig_building_module"></a>39.2.2 Building the module</H3>
|
||||
<H3><a name="Scilab_running_swig_building_module">39.2.2 Building the module</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -201,7 +201,7 @@ $ gcc -shared example_wrap.o -o libexample.so
|
|||
Note: we supposed in this example that the path to the Scilab include directory is <tt>/usr/local/include/scilab</tt> (which is the case in a Debian environment), this should be changed for another environment.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_running_swig_loading_module"></a>39.2.3 Loading the module</H3>
|
||||
<H3><a name="Scilab_running_swig_loading_module">39.2.3 Loading the module</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -225,7 +225,7 @@ Link done.
|
|||
which means that Scilab has successfully loaded the shared library. The module functions and other symbols are now available in Scilab.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_running_swig_using_module"></a>39.2.4 Using the module</H3>
|
||||
<H3><a name="Scilab_running_swig_using_module">39.2.4 Using the module</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -259,7 +259,7 @@ ans =
|
|||
Note: for conciseness, we assume in the subsequent Scilab code examples that the modules have been beforehand built and loaded in Scilab.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_running_swig_options"></a>39.2.5 Scilab command line options</H3>
|
||||
<H3><a name="Scilab_running_swig_options">39.2.5 Scilab command line options</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -314,10 +314,10 @@ $ swig -scilab -help
|
|||
</pre></div>
|
||||
|
||||
|
||||
<H2><a name="Scilab_wrapping"></a>39.3 A basic tour of C/C++ wrapping</H2>
|
||||
<H2><a name="Scilab_wrapping">39.3 A basic tour of C/C++ wrapping</a></H2>
|
||||
|
||||
|
||||
<H3><a name="Scilab_wrapping_overview"></a>39.3.1 Overview</H3>
|
||||
<H3><a name="Scilab_wrapping_overview">39.3.1 Overview</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -326,7 +326,7 @@ This means that functions, structs, classes, variables, etc... are interfaced th
|
|||
There are a few exceptions, such as constants and enumerations, which can be wrapped directly as Scilab variables.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_wrapping_identifiers"></a>39.3.2 Identifiers</H3>
|
||||
<H3><a name="Scilab_wrapping_identifiers">39.3.2 Identifiers</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -337,7 +337,7 @@ In Scilab 5.x, identifier names are composed of 24 characters maximum (this limi
|
|||
In these cases, the <a href="SWIG.html#SWIG_rename_ignore">%rename directive</a> can be used to choose a different Scilab name.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_wrapping_functions"></a>39.3.3 Functions</H3>
|
||||
<H3><a name="Scilab_wrapping_functions">39.3.3 Functions</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -368,7 +368,7 @@ ans =
|
|||
24.
|
||||
</pre></div>
|
||||
|
||||
<H4><a name="Scilab_nn13"></a>39.3.3.1 Argument passing</H4>
|
||||
<H4><a name="Scilab_nn13">39.3.3.1 Argument passing</a></H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -421,7 +421,7 @@ In Scilab, parameters are passed by value. The output (and inout) parameters are
|
|||
7.
|
||||
</pre></div>
|
||||
|
||||
<H4><a name="Scilab_nn14"></a>39.3.3.2 Multiple output arguments</H4>
|
||||
<H4><a name="Scilab_nn14">39.3.3.2 Multiple output arguments</a></H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -469,7 +469,7 @@ int divide(int n, int d, int q*, int *r) {
|
|||
</pre></div>
|
||||
|
||||
|
||||
<H3><a name="Scilab_wrapping_global_variables"></a>39.3.4 Global variables</H3>
|
||||
<H3><a name="Scilab_wrapping_global_variables">39.3.4 Global variables</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -538,10 +538,10 @@ It works the same:</p>
|
|||
</pre></div>
|
||||
|
||||
|
||||
<H3><a name="Scilab_wrapping_constants_and_enums"></a>39.3.5 Constants and enumerations</H3>
|
||||
<H3><a name="Scilab_wrapping_constants_and_enums">39.3.5 Constants and enumerations</a></H3>
|
||||
|
||||
|
||||
<H4><a name="Scilab_wrapping_constants"></a>39.3.5.1 Constants</H4>
|
||||
<H4><a name="Scilab_wrapping_constants">39.3.5.1 Constants</a></H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -682,7 +682,7 @@ are mapped to Scilab variables, with the same name:
|
|||
3.14
|
||||
</pre></div>
|
||||
|
||||
<H4><a name="Scilab_wrapping_enums"></a>39.3.5.2 Enumerations</H4>
|
||||
<H4><a name="Scilab_wrapping_enums">39.3.5.2 Enumerations</a></H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -747,7 +747,7 @@ typedef enum { RED, BLUE, GREEN } color;
|
|||
|
||||
</pre></div>
|
||||
|
||||
<H3><a name="Scilab_wrapping_pointers"></a>39.3.6 Pointers</H3>
|
||||
<H3><a name="Scilab_wrapping_pointers">39.3.6 Pointers</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -789,7 +789,7 @@ These functions can be used in a natural way from Scilab:
|
|||
The user of a pointer is responsible for freeing it or, like in the example, closing any resources associated with it (just as is required in a C program).
|
||||
</p>
|
||||
|
||||
<H4><a name="Scilab_wrapping_pointers_pointer_adresses"></a>39.3.6.1 Utility functions</H4>
|
||||
<H4><a name="Scilab_wrapping_pointers_pointer_adresses">39.3.6.1 Utility functions</a></H4>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -820,7 +820,7 @@ SWIG comes with two pointer utility functions:
|
|||
--> fclose(f);
|
||||
</pre></div>
|
||||
|
||||
<H4><a name="Scilab_wrapping_pointers_null_pointers"></a>39.3.6.2 Null pointers</H4>
|
||||
<H4><a name="Scilab_wrapping_pointers_null_pointers">39.3.6.2 Null pointers</a></H4>
|
||||
|
||||
|
||||
<p>By default, Scilab does not provide a way to test or create null pointers.
|
||||
|
|
@ -836,7 +836,7 @@ But it is possible to have a null pointer by using the previous functions <tt>SW
|
|||
</pre></div>
|
||||
|
||||
|
||||
<H3><a name="Scilab_wrapping_structs"></a>39.3.7 Structures</H3>
|
||||
<H3><a name="Scilab_wrapping_structs">39.3.7 Structures</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -931,7 +931,7 @@ ans =
|
|||
</pre></div>
|
||||
|
||||
|
||||
<H3><a name="Scilab_wrapping_cpp_classes"></a>39.3.8 C++ classes</H3>
|
||||
<H3><a name="Scilab_wrapping_cpp_classes">39.3.8 C++ classes</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -981,7 +981,7 @@ ans =
|
|||
--> delete_Point(p2);
|
||||
</pre></div>
|
||||
|
||||
<H3><a name="Scilab_wrapping_cpp_inheritance"></a>39.3.9 C++ inheritance</H3>
|
||||
<H3><a name="Scilab_wrapping_cpp_inheritance">39.3.9 C++ inheritance</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1056,7 +1056,7 @@ But we can use either use the <tt>get_perimeter()</tt> function of the parent cl
|
|||
18.84
|
||||
</pre></div>
|
||||
|
||||
<H3><a name="Scilab_wrapping_pointers_references_values_arrays"></a>39.3.10 Pointers, references, values, and arrays</H3>
|
||||
<H3><a name="Scilab_wrapping_pointers_references_values_arrays">39.3.10 Pointers, references, values, and arrays</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1114,7 +1114,7 @@ All these functions will return a pointer to an instance of <tt>Foo</tt>.
|
|||
As the function <tt>spam7</tt> returns a value, new instance of <tt>Foo</tt> has to be allocated, and a pointer on this instance is returned.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_wrapping_cpp_templates"></a>39.3.11 C++ templates</H3>
|
||||
<H3><a name="Scilab_wrapping_cpp_templates">39.3.11 C++ templates</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1174,7 +1174,7 @@ Then in Scilab:
|
|||
More details on template support can be found in the <a href="SWIGPlus.html#SWIGPlus_nn30">templates</a> documentation.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_wrapping_cpp_operators"></a>39.3.12 C++ operators</H3>
|
||||
<H3><a name="Scilab_wrapping_cpp_operators">39.3.12 C++ operators</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1227,7 +1227,7 @@ private:
|
|||
</pre></div>
|
||||
|
||||
|
||||
<H3><a name="Scilab_wrapping_cpp_namespaces"></a>39.3.13 C++ namespaces</H3>
|
||||
<H3><a name="Scilab_wrapping_cpp_namespaces">39.3.13 C++ namespaces</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1305,7 +1305,7 @@ Note: the <a href="SWIGPlus.html#SWIGPlus_nspace"><tt>nspace</tt></a> feature is
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Scilab_wrapping_cpp_exceptions"></a>39.3.14 C++ exceptions</H3>
|
||||
<H3><a name="Scilab_wrapping_cpp_exceptions">39.3.14 C++ exceptions</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1388,17 +1388,17 @@ More complex or custom exception types require specific exception typemaps to be
|
|||
See the <a href="SWIGPlus.html#SWIGPlus">SWIG C++ documentation</a> for more details.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_wrapping_cpp_stl"></a>39.3.15 C++ STL</H3>
|
||||
<H3><a name="Scilab_wrapping_cpp_stl">39.3.15 C++ STL</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
The Standard Template Library (STL) is partially supported. See <a href="#Scilab_typemaps_stl">STL</a> for more details.
|
||||
</p>
|
||||
|
||||
<H2><a name="Scilab_typemaps"></a>39.4 Type mappings and libraries</H2>
|
||||
<H2><a name="Scilab_typemaps">39.4 Type mappings and libraries</a></H2>
|
||||
|
||||
|
||||
<H3><a name="Scilab_typemaps_primitive_types"></a>39.4.1 Default primitive type mappings</H3>
|
||||
<H3><a name="Scilab_typemaps_primitive_types">39.4.1 Default primitive type mappings</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1447,7 +1447,7 @@ The default behaviour is for SWIG to generate code that will give a runtime erro
|
|||
</ul>
|
||||
|
||||
|
||||
<H3><a name="Scilab_typemaps_non-primitive_types"></a>39.4.2 Default type mappings for non-primitive types</H3>
|
||||
<H3><a name="Scilab_typemaps_non-primitive_types">39.4.2 Default type mappings for non-primitive types</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1455,7 +1455,7 @@ The default mapped type for C/C++ non-primitive types is the Scilab pointer, for
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Scilab_typemaps_arrays"></a>39.4.3 Arrays</H3>
|
||||
<H3><a name="Scilab_typemaps_arrays">39.4.3 Arrays</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1510,7 +1510,7 @@ void printArray(int values[], int len) {
|
|||
[ 0 1 2 3 ]
|
||||
</pre></div>
|
||||
|
||||
<H3><a name="Scilab_typemaps_pointer-to-pointers"></a>39.4.4 Pointer-to-pointers</H3>
|
||||
<H3><a name="Scilab_typemaps_pointer-to-pointers">39.4.4 Pointer-to-pointers</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1583,7 +1583,7 @@ void print_matrix(double **M, int nbRows, int nbCols) {
|
|||
</pre></div>
|
||||
|
||||
|
||||
<H3><a name="Scilab_typemaps_matrices"></a>39.4.5 Matrices</H3>
|
||||
<H3><a name="Scilab_typemaps_matrices">39.4.5 Matrices</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1676,7 +1676,7 @@ The remarks made earlier for arrays also apply here:
|
|||
<li>There is no control while converting <tt>double</tt> values to integers, <tt>double</tt> values are truncated without any checking or warning.</li>
|
||||
</ul>
|
||||
|
||||
<H3><a name="Scilab_typemaps_stl"></a>39.4.6 STL</H3>
|
||||
<H3><a name="Scilab_typemaps_stl">39.4.6 STL</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1876,7 +1876,7 @@ ans =
|
|||
--> delete_PersonPtrSet(p);
|
||||
</pre></div>
|
||||
|
||||
<H2><a name="Scilab_module_initialization"></a>39.5 Module initialization</H2>
|
||||
<H2><a name="Scilab_module_initialization">39.5 Module initialization</a></H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1900,7 +1900,7 @@ For example, to initialize the module <tt>example</tt>:
|
|||
--> example_Init();
|
||||
</pre></div>
|
||||
|
||||
<H2><a name="Scilab_building_modes"></a>39.6 Building modes</H2>
|
||||
<H2><a name="Scilab_building_modes">39.6 Building modes</a></H2>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1915,7 +1915,7 @@ To produce a dynamic module, when generating the wrapper, there are two possibil
|
|||
<li>the <tt>builder</tt> mode. In this mode, Scilab is responsible of building.
|
||||
</ul>
|
||||
|
||||
<H3><a name="Scilab_building_modes_nobuilder_mode"></a>39.6.1 No-builder mode</H3>
|
||||
<H3><a name="Scilab_building_modes_nobuilder_mode">39.6.1 No-builder mode</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1928,7 +1928,7 @@ This mode is the best option to use when you have to integrate the module build
|
|||
</p>
|
||||
|
||||
|
||||
<H3><a name="Scilab_building_modes_builder_mode"></a>39.6.2 Builder mode</H3>
|
||||
<H3><a name="Scilab_building_modes_builder_mode">39.6.2 Builder mode</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -1968,14 +1968,14 @@ The command is:
|
|||
$ swig -scilab -builder -buildercflags -I/opt/foo/include -builderldflags "-L/opt/foo/lib -lfoo" -buildersources baa1.cxx,baa2.cxx example.i
|
||||
</pre></div>
|
||||
|
||||
<H2><a name="Scilab_generated_scripts"></a>39.7 Generated scripts</H2>
|
||||
<H2><a name="Scilab_generated_scripts">39.7 Generated scripts</a></H2>
|
||||
|
||||
|
||||
<p>
|
||||
In this part we give some details about the generated Scilab scripts.
|
||||
</p>
|
||||
|
||||
<H3><a name="Scilab_generated_scripts_builder_script"></a>39.7.1 Builder script</H3>
|
||||
<H3><a name="Scilab_generated_scripts_builder_script">39.7.1 Builder script</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2000,7 +2000,7 @@ ilib_build(ilib_name,table,files,libs);
|
|||
<li><tt><b>table</b></tt>: two column string matrix containing a table of pairs of 'scilab function name', 'C function name'.</li>
|
||||
</ul>
|
||||
|
||||
<H3><a name="Scilab_generated_scripts_loader_script"></a>39.7.2 Loader script</H3>
|
||||
<H3><a name="Scilab_generated_scripts_loader_script">39.7.2 Loader script</a></H3>
|
||||
|
||||
|
||||
<p>
|
||||
|
|
@ -2039,7 +2039,7 @@ clear get_file_path;
|
|||
</ul>
|
||||
|
||||
|
||||
<H2><a name="Scilab_other_resources"></a>39.8 Other resources</H2>
|
||||
<H2><a name="Scilab_other_resources">39.8 Other resources</a></H2>
|
||||
|
||||
|
||||
<ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue