diff --git a/Doc/Manual/Android.html b/Doc/Manual/Android.html index 944a88d65..da475e9a4 100644 --- a/Doc/Manual/Android.html +++ b/Doc/Manual/Android.html @@ -6,7 +6,7 @@ -

21 SWIG and Android

+

22 SWIG and Android

-

12.1.3 Output parameters

+

13.1.3 Output parameters

@@ -315,7 +315,7 @@ iresult, dresult = foo(3.5, 2) -

12.1.4 Input/Output parameters

+

13.1.4 Input/Output parameters

@@ -380,7 +380,7 @@ rather than directly overwriting the value of the original input object. SWIG. Backwards compatibility is preserved, but deprecated.

-

12.1.5 Using different names

+

13.1.5 Using different names

@@ -414,7 +414,7 @@ Typemap declarations are lexically scoped so a typemap takes effect from the poi file or a matching %clear declaration.

-

12.2 Applying constraints to input values

+

13.2 Applying constraints to input values

@@ -424,7 +424,7 @@ insure that a value is positive, or that a pointer is non-NULL. This can be accomplished including the constraints.i library file.

-

12.2.1 Simple constraint example

+

13.2.1 Simple constraint example

@@ -450,7 +450,7 @@ the arguments violate the constraint condition, a scripting language exception will be raised. As a result, it is possible to catch bad values, prevent mysterious program crashes and so on.

-

12.2.2 Constraint methods

+

13.2.2 Constraint methods

@@ -466,7 +466,7 @@ NONNULL Non-NULL pointer (pointers only). -

12.2.3 Applying constraints to new datatypes

+

13.2.3 Applying constraints to new datatypes

diff --git a/Doc/Manual/CCache.html b/Doc/Manual/CCache.html index edd435fa1..1a94709ae 100644 --- a/Doc/Manual/CCache.html +++ b/Doc/Manual/CCache.html @@ -7,7 +7,7 @@ -

20 Using SWIG with ccache - ccache-swig(1) manpage

+

21 Using SWIG with ccache - ccache-swig(1) manpage

-

20.14 HISTORY

+

21.14 HISTORY

@@ -423,7 +423,7 @@ I wrote ccache because I wanted to get a bit more speed out of a compiler cache and I wanted to remove some of the limitations of the shell-script version.

-

20.15 DIFFERENCES FROM COMPILERCACHE

+

21.15 DIFFERENCES FROM COMPILERCACHE

@@ -441,7 +441,7 @@ are:

  • ccache avoids a double call to cpp on a cache miss

    -

    20.16 CREDITS

    +

    21.16 CREDITS

    @@ -453,7 +453,7 @@ Thanks to the following people for their contributions to ccache

  • Paul Russell for many suggestions and the debian packaging

    -

    20.17 AUTHOR

    +

    21.17 AUTHOR

    diff --git a/Doc/Manual/CSharp.html b/Doc/Manual/CSharp.html index d041bf5dd..ca568876a 100644 --- a/Doc/Manual/CSharp.html +++ b/Doc/Manual/CSharp.html @@ -6,7 +6,7 @@ -

    22 SWIG and C#

    +

    23 SWIG and C#

    -

    22.4 C# Arrays

    +

    23.4 C# Arrays

    @@ -595,7 +595,7 @@ with one of the following three approaches; namely the SWIG C arrays library, P/ pinned arrays.

    -

    22.4.1 The SWIG C arrays library

    +

    23.4.1 The SWIG C arrays library

    @@ -632,7 +632,7 @@ example.print_array(c.cast()); // Pass to C

  • -

    22.4.2 Managed arrays using P/Invoke default array marshalling

    +

    23.4.2 Managed arrays using P/Invoke default array marshalling

    @@ -759,7 +759,7 @@ and intermediary class method -

    22.4.3 Managed arrays using pinning

    +

    23.4.3 Managed arrays using pinning

    @@ -854,7 +854,7 @@ public static extern void myArrayCopy(global::System.IntPtr jarg1, global::Syste -

    22.5 C# Exceptions

    +

    23.5 C# Exceptions

    @@ -951,7 +951,7 @@ set so should only be used when a C# exception is not created.

    -

    22.5.1 C# exception example using "check" typemap

    +

    23.5.1 C# exception example using "check" typemap

    @@ -1133,7 +1133,7 @@ method and C# code does not handle pending exceptions via the canthrow attribute Actually it will issue this warning for any function beginning with SWIG_CSharpSetPendingException.

    -

    22.5.2 C# exception example using %exception

    +

    23.5.2 C# exception example using %exception

    @@ -1198,7 +1198,7 @@ The managed code generated does check for the pending exception as mentioned ear -

    22.5.3 C# exception example using exception specifications

    +

    23.5.3 C# exception example using exception specifications

    @@ -1254,7 +1254,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_evensonly(int jarg1) { Multiple catch handlers are generated should there be more than one exception specifications declared.

    -

    22.5.4 Custom C# ApplicationException example

    +

    23.5.4 Custom C# ApplicationException example

    @@ -1388,7 +1388,7 @@ try { -

    22.6 C# Directors

    +

    23.6 C# Directors

    @@ -1401,7 +1401,7 @@ The following sections provide information on the C# director implementation and However, the Java directors section should also be read in order to gain more insight into directors.

    -

    22.6.1 Directors example

    +

    23.6.1 Directors example

    @@ -1522,7 +1522,7 @@ CSharpDerived - UIntMethod(123) -

    22.6.2 Directors implementation

    +

    23.6.2 Directors implementation

    @@ -1730,7 +1730,7 @@ before SWIG parses the Base class will change all the delegates to internal< -

    22.6.3 Director caveats

    +

    23.6.3 Director caveats

    @@ -1778,7 +1778,7 @@ However, a call from C# to CSharpDefaults.DefaultMethod() will of cours should pass the call on to CSharpDefaults.DefaultMethod(int)using the C++ default value, as shown above.

    -

    22.7 Multiple modules

    +

    23.7 Multiple modules

    @@ -1813,7 +1813,7 @@ the [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrows if you don't want users to easily stumble upon these so called 'internal workings' of the wrappers.

    -

    22.8 C# Typemap examples

    +

    23.8 C# Typemap examples

    This section includes a few examples of typemaps. For more examples, you @@ -1821,7 +1821,7 @@ might look at the files "csharp.swg" and "typemaps.i" in the SWIG library. -

    22.8.1 Memory management when returning references to member variables

    +

    23.8.1 Memory management when returning references to member variables

    @@ -1945,7 +1945,7 @@ public class Bike : global::System.IDisposable { Note the addReference call.

    -

    22.8.2 Memory management for objects passed to the C++ layer

    +

    23.8.2 Memory management for objects passed to the C++ layer

    @@ -2077,7 +2077,7 @@ as mentioned earlier, setElement is actually: -

    22.8.3 Date marshalling using the csin typemap and associated attributes

    +

    23.8.3 Date marshalling using the csin typemap and associated attributes

    @@ -2363,7 +2363,7 @@ public class example { -

    22.8.4 A date example demonstrating marshalling of C# properties

    +

    23.8.4 A date example demonstrating marshalling of C# properties

    @@ -2463,7 +2463,7 @@ Some points to note:

  • The 'csin' typemap has 'pre', 'post' and 'cshin' attributes, and these are all ignored in the property set. The code in these attributes must instead be replicated within the 'csvarin' typemap. The line creating the temp$csinput variable is such an example; it is identical to what is in the 'pre' attribute. -

    22.8.5 Date example demonstrating the 'pre' and 'post' typemap attributes for directors

    +

    23.8.5 Date example demonstrating the 'pre' and 'post' typemap attributes for directors

    @@ -2525,7 +2525,7 @@ Pay special attention to the memory management issues, using these attributes.

    -

    22.8.6 Turning proxy classes into partial classes

    +

    23.8.6 Turning proxy classes into partial classes

    @@ -2625,7 +2625,7 @@ demonstrating that the class contains methods calling both unmanaged code - The following example is an alternative approach to adding managed code to the generated proxy class.

    -

    22.8.7 Turning proxy classes into sealed classes

    +

    23.8.7 Turning proxy classes into sealed classes

    @@ -2715,7 +2715,7 @@ Either suppress the warning or modify the generated code by copying and tweaking 'csbody' typemap code in csharp.swg by modifying swigCMemOwn to not be protected.

    -

    22.8.8 Extending proxy classes with additional C# code

    +

    23.8.8 Extending proxy classes with additional C# code

    @@ -2754,7 +2754,7 @@ public class ExtendMe : global::System.IDisposable { -

    22.8.9 Underlying type for enums

    +

    23.8.9 Underlying type for enums

    diff --git a/Doc/Manual/Contents.html b/Doc/Manual/Contents.html index 57aef5b8a..0d0c977cc 100644 --- a/Doc/Manual/Contents.html +++ b/Doc/Manual/Contents.html @@ -372,7 +372,19 @@ -

    10 Preprocessing

    +

    10 SWIG and C++20

    + + + + + +

    11 Preprocessing

    @@ -395,7 +407,7 @@
    -

    11 SWIG library

    +

    12 SWIG library

    @@ -438,7 +450,7 @@
    -

    12 Argument Handling

    +

    13 Argument Handling

    @@ -461,7 +473,7 @@
    -

    13 Typemaps

    +

    14 Typemaps

    @@ -555,7 +567,7 @@
    -

    14 Customization Features

    +

    15 Customization Features

    @@ -583,7 +595,7 @@
    -

    15 Contracts

    +

    16 Contracts

    @@ -596,7 +608,7 @@
    -

    16 Variable Length Arguments

    +

    17 Variable Length Arguments

    @@ -614,7 +626,7 @@
    -

    17 SWIG and Doxygen Translation

    +

    18 SWIG and Doxygen Translation

    @@ -662,7 +674,7 @@
    -

    18 Warning Messages

    +

    19 Warning Messages

    @@ -691,7 +703,7 @@
    -

    19 Working with Modules

    +

    20 Working with Modules

    @@ -707,7 +719,7 @@
    -

    20 Using SWIG with ccache - ccache-swig(1) manpage

    +

    21 Using SWIG with ccache - ccache-swig(1) manpage

    @@ -733,7 +745,7 @@
    -

    21 SWIG and Android

    +

    22 SWIG and Android

    @@ -751,7 +763,7 @@
    -

    22 SWIG and C#

    +

    23 SWIG and C#

    @@ -799,7 +811,7 @@
    -

    23 SWIG and D

    +

    24 SWIG and D

    @@ -833,7 +845,7 @@
    -

    24 SWIG and Go

    +

    25 SWIG and Go

    @@ -877,7 +889,7 @@
    -

    25 SWIG and Guile

    +

    26 SWIG and Guile

    @@ -913,7 +925,7 @@
    -

    26 SWIG and Java

    +

    27 SWIG and Java

    @@ -1067,7 +1079,7 @@
    -

    27 SWIG and Javascript

    +

    28 SWIG and Javascript

    @@ -1109,7 +1121,7 @@
    -

    28 SWIG and Lua

    +

    29 SWIG and Lua

    @@ -1177,7 +1189,7 @@
    -

    29 SWIG and Octave

    +

    30 SWIG and Octave

    @@ -1217,7 +1229,7 @@
    -

    30 SWIG and Perl5

    +

    31 SWIG and Perl5

    @@ -1293,7 +1305,7 @@
    -

    31 SWIG and PHP

    +

    32 SWIG and PHP

    @@ -1334,7 +1346,7 @@
    -

    32 SWIG and Python

    +

    33 SWIG and Python

    @@ -1476,7 +1488,7 @@
    -

    33 SWIG and R

    +

    34 SWIG and R

    @@ -1492,7 +1504,7 @@
    -

    34 SWIG and Ruby

    +

    35 SWIG and Ruby

    @@ -1630,7 +1642,7 @@
    -

    35 SWIG and Scilab

    +

    36 SWIG and Scilab

    @@ -1699,7 +1711,7 @@
    -

    36 SWIG and Tcl

    +

    37 SWIG and Tcl

    @@ -1765,7 +1777,7 @@
    -

    37 SWIG and MzScheme/Racket

    +

    38 SWIG and MzScheme/Racket

    @@ -1777,7 +1789,7 @@
    -

    38 SWIG and OCaml

    +

    39 SWIG and OCaml

    @@ -1832,7 +1844,7 @@
    -

    39 Extending SWIG to support new languages

    +

    40 Extending SWIG to support new languages

    diff --git a/Doc/Manual/Contract.html b/Doc/Manual/Contract.html index 93fb8c003..f7acbba3e 100644 --- a/Doc/Manual/Contract.html +++ b/Doc/Manual/Contract.html @@ -7,7 +7,7 @@ -

    15 Contracts

    +

    16 Contracts

      @@ -39,7 +39,7 @@ When one of the rules is violated by a script, a runtime exception is generated rather than having the program continue to execute.

      -

      15.1 The %contract directive

      +

      16.1 The %contract directive

      @@ -95,7 +95,7 @@ RuntimeError: Contract violation: require: (arg1>=0)

    -

    15.2 %contract and classes

    +

    16.2 %contract and classes

    @@ -174,7 +174,7 @@ specified for the derived class all must hold. In the above example, this means that both the arguments to Spam::bar must be positive.

    -

    15.3 Constant aggregation and %aggregate_check

    +

    16.3 Constant aggregation and %aggregate_check

    @@ -263,7 +263,7 @@ Regrettably, there is no automatic way to perform similar checks with enums valu release.

    -

    15.4 Notes

    +

    16.4 Notes

    diff --git a/Doc/Manual/Customization.html b/Doc/Manual/Customization.html index 328bc2391..5fe0f5b52 100644 --- a/Doc/Manual/Customization.html +++ b/Doc/Manual/Customization.html @@ -7,7 +7,7 @@ -

    14 Customization Features

    +

    15 Customization Features

    -

    14.1.4 Exception handlers for variables

    +

    15.1.4 Exception handlers for variables

    @@ -305,7 +305,7 @@ The %allowexception feature works like any other feature and so can be

    -

    14.1.5 Defining different exception handlers

    +

    15.1.5 Defining different exception handlers

    @@ -442,7 +442,7 @@ declarations. However, it never really worked that well and the new %exception directive is much better.

    -

    14.1.6 Special variables for %exception

    +

    15.1.6 Special variables for %exception

    @@ -545,7 +545,7 @@ Below shows the expansions for the 1st of the overloaded something wrap -

    14.1.7 Using The SWIG exception library

    +

    15.1.7 Using The SWIG exception library

    @@ -600,7 +600,7 @@ SWIG_NullReferenceError The SWIG_exception() function can also be used in typemaps.

    -

    14.2 Object ownership and %newobject

    +

    15.2 Object ownership and %newobject

    @@ -757,7 +757,7 @@ char *strdup(const char *s); The results might not be what you expect.

    -

    14.3 Features and the %feature directive

    +

    15.3 Features and the %feature directive

    @@ -839,7 +839,7 @@ The following are all equivalent: The syntax in the first variation will generate the { } delimiters used whereas the other variations will not.

    -

    14.3.1 Feature attributes

    +

    15.3.1 Feature attributes

    @@ -880,7 +880,7 @@ In the following example, MyExceptionClass is the name of the Java clas Further details can be obtained from the Java exception handling section.

    -

    14.3.2 Feature flags

    +

    15.3.2 Feature flags

    @@ -978,7 +978,7 @@ in the swig.swg Library file. The following shows the alternative synta The concept of clearing features is discussed next.

    -

    14.3.3 Clearing features

    +

    15.3.3 Clearing features

    @@ -1071,7 +1071,7 @@ The three macros below show this for the "except" feature: -

    14.3.4 Features and default arguments

    +

    15.3.4 Features and default arguments

    @@ -1146,7 +1146,7 @@ specifying or not specifying default arguments in a feature is not applicable as in SWIG-1.3.23 when the approach to wrapping methods with default arguments was changed.

    -

    14.3.5 Feature example

    +

    15.3.5 Feature example

    diff --git a/Doc/Manual/D.html b/Doc/Manual/D.html index d97267a5b..f9f2d53ca 100644 --- a/Doc/Manual/D.html +++ b/Doc/Manual/D.html @@ -6,7 +6,7 @@ -

    23 SWIG and D

    +

    24 SWIG and D

      @@ -41,7 +41,7 @@ -

      23.1 Introduction

      +

      24.1 Introduction

      From the D Programming Language web site: D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. [...] The D language is statically typed and compiles directly to machine code. As such, it is not very surprising that D is able to directly interface with C libraries. Why would a SWIG module for D be needed then in the first place?

      @@ -53,7 +53,7 @@

      To help addressing these issues, the SWIG C# module has been forked to support D. Is has evolved quite a lot since then, but there are still many similarities, so if you do not find what you are looking for on this page, it might be worth having a look at the chapter on C# (and also on Java, since the C# module was in turn forked from it).

      -

      23.2 Command line invocation

      +

      24.2 Command line invocation

      To activate the D module, pass the -d option to SWIG at the command line. The same standard command line options as with any other language module are available, plus the following D specific ones:

      @@ -83,10 +83,10 @@ -

      23.3 Typemaps

      +

      24.3 Typemaps

      -

      23.3.1 C# <-> D name comparison

      +

      24.3.1 C# <-> D name comparison

      If you already know the SWIG C# module, you might find the following name comparison table useful:

      @@ -112,7 +112,7 @@
    -

    23.3.2 ctype, imtype, dtype

    +

    24.3.2 ctype, imtype, dtype

    Mapping of types between the C/C++ library, the C/C++ library wrapper exposing the C functions, the D wrapper module importing these functions and the D proxy code.

    @@ -120,7 +120,7 @@

    The ctype typemap is used to determine the types to use in the C wrapper functions. The types from the imtype typemap are used in the extern(C) declarations of these functions in the intermediary D module. The dtype typemap contains the D types used in the D proxy module/class.

    -

    23.3.3 in, out, directorin, directorout

    +

    24.3.3 in, out, directorin, directorout

    Used for converting between the types for C/C++ and D when generating the code for the wrapper functions (on the C++ side).

    @@ -130,7 +130,7 @@

    The directorin typemap is used to convert parameters to the type used in the D director callback function, its return value is processed by directorout (see below).

    -

    23.3.4 din, dout, ddirectorin, ddirectorout

    +

    24.3.4 din, dout, ddirectorin, ddirectorout

    Typemaps for code generation in D proxy and type wrapper classes.

    @@ -157,13 +157,13 @@ dtype DClass.method(dtype a) -

    23.3.5 typecheck typemaps

    +

    24.3.5 typecheck typemaps

    Because, unlike many scripting languages supported by SWIG, D does not need any dynamic dispatch helper to access an overloaded function, the purpose of these is merely to issue a warning for overloaded C++ functions that cannot be overloaded in D (as more than one C++ type maps to a single D type).

    -

    23.3.6 Code injection typemaps

    +

    24.3.6 Code injection typemaps

    These typemaps are used for generating the skeleton of proxy classes for C++ types.

    @@ -178,7 +178,7 @@ Code can also be injected into the D proxy class using %proxycode.

    -

    23.3.7 Special variable macros

    +

    24.3.7 Special variable macros

    The standard SWIG special variables are available for use within typemaps as described in the Typemaps documentation, for example $1, $input, $result etc.

    @@ -299,7 +299,7 @@ $importtype(AnotherInterface) -

    23.4 D and %feature

    +

    24.4 D and %feature

    The D module defines a number of directives which modify the SWIG features set globally or for a specific declaration:

    @@ -329,7 +329,7 @@ struct A { -

    23.5 Pragmas

    +

    24.5 Pragmas

    There are a few SWIG pragmas specific to the D module, which you can use to influence the D code SWIG generates:

    @@ -368,7 +368,7 @@ struct A { -

    23.6 D Exceptions

    +

    24.6 D Exceptions

    Out of the box, C++ exceptions are fundamentally incompatible to their equivalent in the D world and cannot simply be propagated to a calling D method. There is, however, an easy way to solve this problem: Just catch the exception in the C/C++ wrapper layer, pass the contents to D, and make the wrapper code rethrow the exception in the D world.

    @@ -378,7 +378,7 @@ struct A {

    As this feature is implemented in exactly the same way it is for C#, please see the C# documentation for a more detailed explanation.

    -

    23.7 D Directors

    +

    24.7 D Directors

    When the directors feature is activated, SWIG generates extra code on both the C++ and the D side to enable cross-language polymorphism. Essentially, this means that if you subclass a proxy class in D, C++ code can access any overridden virtual methods just as if you created a derived class in C++.

    @@ -387,16 +387,16 @@ struct A {

    -

    23.8 Other features

    +

    24.8 Other features

    -

    23.8.1 Extended namespace support (nspace)

    +

    24.8.1 Extended namespace support (nspace)

    By default, SWIG flattens all C++ namespaces into a single target language namespace, but as for Java and C#, the nspace feature is supported for D. If it is active, C++ namespaces are mapped to D packages/modules. Note, however, that like for the other languages, free variables and functions are not supported yet; currently, they are all allows written to the main proxy D module.

    -

    23.8.2 Native pointer support

    +

    24.8.2 Native pointer support

    Contrary to many of the scripting languages supported by SWIG, D fully supports C-style pointers. The D module thus includes a custom mechanism to wrap C pointers directly as D pointers where applicable, that is, if the type that is pointed to is represented the same in C and D (on the bit-level), dubbed a primitive type below.

    @@ -408,7 +408,7 @@ struct A {

    To determine if a type should be considered primitive, the cprimitive attribute on its dtype attribute is used. For example, the dtype typemap for float has cprimitive="1", so the code from the nativepointer attribute is taken into account e.g. for float ** or the function pointer float (*)(float *).

    -

    23.8.3 Operator overloading

    +

    24.8.3 Operator overloading

    The D module comes with basic operator overloading support for both D1 and D2. There are, however, a few limitations arising from conceptual differences between C++ and D:

    @@ -420,7 +420,7 @@ struct A {

    There are also some cases where the operators can be translated to D, but the differences in the implementation details are big enough that a rather involved scheme would be required for automatic wrapping them, which has not been implemented yet. This affects, for example, the array subscript operator, [], in combination with assignments - while operator [] in C++ simply returns a reference which is then written to, D resorts to a separate opIndexAssign method -, or implicit casting (which was introduced in D2 via alias this). Despite the lack of automatic support, manually handling these cases should be perfectly possible.

    -

    23.8.4 Running the test-suite

    +

    24.8.4 Running the test-suite

    As with any other language, the SWIG test-suite can be built for D using the *-d-test-suite targets of the top-level Makefile. By default, D1 is targeted, to build it with D2, use the optional D_VERSION variable, e.g. make check-d-test-suite D_VERSION=2.

    @@ -428,14 +428,14 @@ struct A {

    Note: If you want to use GDC on Linux or another platform which requires you to link libdl for dynamically loading the shared library, you might have to add -ldl manually to the d_compile target in Examples/Makefile, because GDC does not currently honor the pragma(lib, ...) statement.

    -

    23.9 D Typemap examples

    +

    24.9 D Typemap examples

    There are no D-specific typemap examples yet. However, with the above name comparison table, you should be able to get an idea what can be done by looking at the corresponding C# section.

    -

    23.10 Work in progress and planned features

    +

    24.10 Work in progress and planned features

    There are a couple of features which are not implemented yet, but would be very useful and might be added in the near future:

    diff --git a/Doc/Manual/Doxygen.html b/Doc/Manual/Doxygen.html index 93e1153d5..40faa2014 100644 --- a/Doc/Manual/Doxygen.html +++ b/Doc/Manual/Doxygen.html @@ -5,7 +5,7 @@ -

    17 SWIG and Doxygen Translation

    +

    18 SWIG and Doxygen Translation

    -

    17.2.2.4 doxygen:nolinktranslate

    +

    18.2.2.4 doxygen:nolinktranslate

    @@ -430,7 +430,7 @@ This is only applicable to Java at the moment.

    -

    17.2.2.5 doxygen:nostripparams

    +

    18.2.2.5 doxygen:nostripparams

    @@ -440,14 +440,14 @@ This is only applicable to Java at the moment.

    -

    17.2.3 Additional command line options

    +

    18.2.3 Additional command line options

    ALSO TO BE ADDED (Javadoc auto brief?)

    -

    17.3 Doxygen to Javadoc

    +

    18.3 Doxygen to Javadoc

    @@ -456,7 +456,7 @@ automatically placed in the correct locations in the resulting module and proxy files.

    -

    17.3.1 Basic example

    +

    18.3.1 Basic example

    @@ -563,7 +563,7 @@ Javadoc translator features summary directives):

    -

    17.3.2 Javadoc tags

    +

    18.3.2 Javadoc tags

    @@ -825,7 +825,7 @@ Here is the list of all Doxygen tags and the description of how they are transla -

    17.3.3 Unsupported tags

    +

    18.3.3 Unsupported tags

    @@ -992,14 +992,14 @@ comment, the whole comment block is ignored: -

    17.3.4 Further details

    +

    18.3.4 Further details

    TO BE ADDED.

    -

    17.4 Doxygen to Pydoc

    +

    18.4 Doxygen to Pydoc

    @@ -1010,7 +1010,7 @@ Doxygen or Javadoc, so most of Doxygen commands are translated by merely copying the appropriate command text.

    -

    17.4.1 Basic example

    +

    18.4.1 Basic example

    @@ -1173,7 +1173,7 @@ docs), you may want to use some tool like doxypy to do the work.

    -

    17.4.2 Pydoc translator

    +

    18.4.2 Pydoc translator

    @@ -1426,7 +1426,7 @@ Here is the list of all Doxygen tags and the description of how they are transla -

    17.4.3 Unsupported tags

    +

    18.4.3 Unsupported tags

    @@ -1542,14 +1542,14 @@ Here is the list of these tags: -

    17.4.4 Further details

    +

    18.4.4 Further details

    TO BE ADDED.

    -

    17.5 Troubleshooting

    +

    18.5 Troubleshooting

    @@ -1571,7 +1571,7 @@ include the option and fix problems with Doxygen comments.

    -

    17.5.1 Problem with conditional compilation

    +

    18.5.1 Problem with conditional compilation

    @@ -1611,14 +1611,14 @@ class A { -

    17.6 Developer information

    +

    18.6 Developer information

    This section contains information for developers enhancing the Doxygen translator.

    -

    17.6.1 Doxygen translator design

    +

    18.6.1 Doxygen translator design

    @@ -1644,7 +1644,7 @@ class for translation into the target documentation language. For example, JavaDocConverter is the Javadoc module class.

    -

    17.6.2 Debugging the Doxygen parser and translator

    +

    18.6.2 Debugging the Doxygen parser and translator

    @@ -1657,7 +1657,7 @@ detailed debug information printing. -debug-doxygen-translator - Display Doxygen translator module debugging information -

    17.6.3 Tests

    +

    18.6.3 Tests

    @@ -1709,7 +1709,7 @@ Runtime tests in Python are just plain string comparisons of the __doc__ properties.

    -

    17.7 Extending to other languages

    +

    18.7 Extending to other languages

    diff --git a/Doc/Manual/Extending.html b/Doc/Manual/Extending.html index 5a640fbdc..7c2a6c66c 100644 --- a/Doc/Manual/Extending.html +++ b/Doc/Manual/Extending.html @@ -7,7 +7,7 @@ -

    39 Extending SWIG to support new languages

    +

    40 Extending SWIG to support new languages

    -

    39.4.4 Attribute namespaces

    +

    40.4.4 Attribute namespaces

    @@ -665,7 +665,7 @@ that matches the name of the target language. For example, python:foo perl:foo.

    -

    39.4.5 Symbol Tables

    +

    40.4.5 Symbol Tables

    @@ -756,7 +756,7 @@ example.i:5. Previous declaration is foo_i(int ) -

    39.4.6 The %feature directive

    +

    40.4.6 The %feature directive

    @@ -812,7 +812,7 @@ For example, the exception code above is simply stored without any modifications.

    -

    39.4.7 Code Generation

    +

    40.4.7 Code Generation

    @@ -934,7 +934,7 @@ public : The role of these functions is described shortly.

    -

    39.4.8 SWIG and XML

    +

    40.4.8 SWIG and XML

    @@ -947,7 +947,7 @@ internal data structures, it may be useful to keep XML in the back of your mind as a model.

    -

    39.5 Primitive Data Structures

    +

    40.5 Primitive Data Structures

    @@ -993,7 +993,7 @@ typedef Hash Typetab; -

    39.5.1 Strings

    +

    40.5.1 Strings

    @@ -1134,7 +1134,7 @@ Returns the number of replacements made (if any). -

    39.5.2 Hashes

    +

    40.5.2 Hashes

    @@ -1211,7 +1211,7 @@ Returns the list of hash table keys. -

    39.5.3 Lists

    +

    40.5.3 Lists

    @@ -1300,7 +1300,7 @@ If t is not a standard object, it is assumed to be a char * and is used to create a String object. -

    39.5.4 Common operations

    +

    40.5.4 Common operations

    The following operations are applicable to all datatypes. @@ -1355,7 +1355,7 @@ objects and report errors. Gets the line number associated with x. -

    39.5.5 Iterating over Lists and Hashes

    +

    40.5.5 Iterating over Lists and Hashes

    To iterate over the elements of a list or a hash table, the following functions are used: @@ -1400,7 +1400,7 @@ for (j = First(j); j.item; j= Next(j)) { -

    39.5.6 I/O

    +

    40.5.6 I/O

    Special I/O functions are used for all internal I/O. These operations @@ -1534,7 +1534,7 @@ Printf(f, "%s\n", s); Similarly, the preprocessor and parser all operate on string-files.

    -

    39.6 Navigating and manipulating parse trees

    +

    40.6 Navigating and manipulating parse trees

    Parse trees are built as collections of hash tables. Each node is a hash table in which @@ -1668,7 +1668,7 @@ Deletes a node from the parse tree. Deletion reconnects siblings and properly u the parent so that sibling nodes are unaffected. -

    39.7 Working with attributes

    +

    40.7 Working with attributes

    @@ -1785,7 +1785,7 @@ the attribute is optional. Swig_restore() must always be called after function. -

    39.8 Type system

    +

    40.8 Type system

    @@ -1794,7 +1794,7 @@ pointers, references, and pointers to members. A detailed discussion of type theory is impossible here. However, let's cover the highlights.

    -

    39.8.1 String encoding of types

    +

    40.8.1 String encoding of types

    @@ -1895,7 +1895,7 @@ make the final type, the two parts are just joined together using string concatenation.

    -

    39.8.2 Type construction

    +

    40.8.2 Type construction

    @@ -2064,7 +2064,7 @@ Returns the prefix of a type. For example, if ty is ty is unmodified. -

    39.8.3 Type tests

    +

    40.8.3 Type tests

    @@ -2151,7 +2151,7 @@ Checks if ty is a varargs type. Checks if ty is a templatized type. -

    39.8.4 Typedef and inheritance

    +

    40.8.4 Typedef and inheritance

    @@ -2253,7 +2253,7 @@ Fully reduces ty according to typedef rules. Resulting datatype will consist only of primitive typenames. -

    39.8.5 Lvalues

    +

    40.8.5 Lvalues

    @@ -2290,7 +2290,7 @@ Literal y; // type = 'Literal', ltype='p.char' -

    39.8.6 Output functions

    +

    40.8.6 Output functions

    @@ -2352,7 +2352,7 @@ SWIG, but is most commonly associated with type-descriptor objects that appear in wrappers (e.g., SWIGTYPE_p_double). -

    39.9 Parameters

    +

    40.9 Parameters

    @@ -2451,7 +2451,7 @@ included. Used to emit prototypes. Returns the number of required (non-optional) arguments in p. -

    39.10 Writing a Language Module

    +

    40.10 Writing a Language Module

    @@ -2466,7 +2466,7 @@ describes the creation of a minimal Python module. You should be able to extra this to other languages.

    -

    39.10.1 Execution model

    +

    40.10.1 Execution model

    @@ -2476,7 +2476,7 @@ the parsing of command line options, all aspects of code generation are controll different methods of the Language that must be defined by your module.

    -

    39.10.2 Starting out

    +

    40.10.2 Starting out

    @@ -2584,7 +2584,7 @@ that activates your module. For example, swig -python foo.i. The messages from your new module should appear.

    -

    39.10.3 Command line options

    +

    40.10.3 Command line options

    @@ -2643,7 +2643,7 @@ to mark the option as valid. If you forget to do this, SWIG will terminate wit unrecognized command line option error.

    -

    39.10.4 Configuration and preprocessing

    +

    40.10.4 Configuration and preprocessing

    @@ -2692,7 +2692,7 @@ an implementation file python.cxx and a configuration file python.swg.

    -

    39.10.5 Entry point to code generation

    +

    40.10.5 Entry point to code generation

    @@ -2750,7 +2750,7 @@ int Python::top(Node *n) { -

    39.10.6 Module I/O and wrapper skeleton

    +

    40.10.6 Module I/O and wrapper skeleton

    @@ -2898,7 +2898,7 @@ functionWrapper : void Shape_y_set(Shape *self, double y) -

    39.10.7 Low-level code generators

    +

    40.10.7 Low-level code generators

    @@ -3052,7 +3052,7 @@ but without the typemaps, there is still work to do.

    -

    39.10.8 Configuration files

    +

    40.10.8 Configuration files

    @@ -3196,7 +3196,7 @@ politely displays the ignoring language message. -

    39.10.9 Runtime support

    +

    40.10.9 Runtime support

    @@ -3205,7 +3205,7 @@ Discuss the kinds of functions typically needed for SWIG runtime support (e.g. the SWIG files that implement those functions.

    -

    39.10.10 Standard library files

    +

    40.10.10 Standard library files

    @@ -3224,7 +3224,7 @@ The following are the minimum that are usually supported: Please copy these and modify for any new language.

    -

    39.10.11 User examples

    +

    40.10.11 User examples

    @@ -3253,7 +3253,7 @@ during this process, see the section on .

    -

    39.10.12 Test driven development and the test-suite

    +

    40.10.12 Test driven development and the test-suite

    @@ -3312,7 +3312,7 @@ It is therefore essential that the runtime tests are written in a manner that di but error/exception out with an error message on stderr on failure.

    -

    39.10.12.1 Running the test-suite

    +

    40.10.12.1 Running the test-suite

    @@ -3504,7 +3504,7 @@ It can be run in the same way as the other language test-suites, replacing [lang The test cases used and the way it works is described in Examples/test-suite/errors/Makefile.in.

    -

    39.10.13 Documentation

    +

    40.10.13 Documentation

    @@ -3536,7 +3536,7 @@ Some topics that you'll want to be sure to address include: if available. -

    39.10.14 Coding style guidelines

    +

    40.10.14 Coding style guidelines

    @@ -3561,7 +3561,7 @@ should be avoided as unlike the SWIG developers, users will never have consisten

    -

    39.10.15 Target language status

    +

    40.10.15 Target language status

    @@ -3570,7 +3570,7 @@ the Target language in This section provides more details on how this status is given.

    -

    39.10.15.1 Supported status

    +

    40.10.15.1 Supported status

    @@ -3617,7 +3617,7 @@ A target language is given the 'Supported' status when

  • -

    39.10.15.2 Experimental status

    +

    40.10.15.2 Experimental status

    @@ -3682,7 +3682,7 @@ Some minimum requirements and notes about languages with the 'Experimental' stat -

    39.10.16 Prerequisites for adding a new language module to the SWIG distribution

    +

    40.10.16 Prerequisites for adding a new language module to the SWIG distribution

    @@ -3746,7 +3746,7 @@ the existing tests.

    -

    39.11 Debugging Options

    +

    40.11 Debugging Options

    @@ -3773,7 +3773,7 @@ There are various command line options which can aid debugging a SWIG interface The complete list of command line options for SWIG are available by running swig -help.

    -

    39.12 Guide to parse tree nodes

    +

    40.12 Guide to parse tree nodes

    @@ -4181,7 +4181,7 @@ extern "X" { ... } declaration. -

    39.13 Further Development Information

    +

    40.13 Further Development Information

    diff --git a/Doc/Manual/Go.html b/Doc/Manual/Go.html index c28cc03e1..1a5bb08c7 100644 --- a/Doc/Manual/Go.html +++ b/Doc/Manual/Go.html @@ -6,7 +6,7 @@ -

    24 SWIG and Go

    +

    25 SWIG and Go

    -

    24.3.1 Go-specific Commandline Options

    +

    25.3.1 Go-specific Commandline Options

    @@ -276,7 +276,7 @@ swig -go -help -

    24.3.2 Generated Wrapper Files

    +

    25.3.2 Generated Wrapper Files

    There are two different approaches to generating wrapper files, @@ -320,7 +320,7 @@ combined with the compiled MODULE.go using go tool pack. -

    24.4 A tour of basic C/C++ wrapping

    +

    25.4 A tour of basic C/C++ wrapping

    @@ -330,7 +330,7 @@ modifications have to occur. This section briefly covers the essential aspects of this wrapping.

    -

    24.4.1 Go Package Name

    +

    25.4.1 Go Package Name

    @@ -340,7 +340,7 @@ directive. You may override this by using SWIG's -package command line option.

    -

    24.4.2 Go Names

    +

    25.4.2 Go Names

    @@ -372,7 +372,7 @@ followed by that name, and the destructor will be named Delete followed by that name.

    -

    24.4.3 Go Constants

    +

    25.4.3 Go Constants

    @@ -380,7 +380,7 @@ C/C++ constants created via #define or the %constant directive become Go constants, declared with a const declaration. -

    24.4.4 Go Enumerations

    +

    25.4.4 Go Enumerations

    @@ -390,7 +390,7 @@ usual). The values of the enumeration will become variables in Go; code should avoid modifying those variables.

    -

    24.4.5 Go Classes

    +

    25.4.5 Go Classes

    @@ -468,7 +468,7 @@ returns a go interface. If the returned pointer can be null, you can check for this by calling the Swigcptr() method.

    -

    24.4.5.1 Go Class Memory Management

    +

    25.4.5.1 Go Class Memory Management

    @@ -590,7 +590,7 @@ func (o *GoClassName) Close() { -

    24.4.5.2 Go Class Inheritance

    +

    25.4.5.2 Go Class Inheritance

    @@ -602,7 +602,7 @@ Doing the reverse will require an explicit type assertion, which will be checked dynamically.

    -

    24.4.6 Go Templates

    +

    25.4.6 Go Templates

    @@ -611,7 +611,7 @@ wrappers for a particular template instantiation. To do this, use the %template directive. -

    24.4.7 Go Director Classes

    +

    25.4.7 Go Director Classes

    @@ -629,7 +629,7 @@ completely to avoid common pitfalls with directors in Go.

    -

    24.4.7.1 Example C++ code

    +

    25.4.7.1 Example C++ code

    @@ -701,7 +701,7 @@ be found in the end of the guide.

    -

    24.4.7.2 Enable director feature

    +

    25.4.7.2 Enable director feature

    @@ -736,7 +736,7 @@ documentation on directors.

    -

    24.4.7.3 Constructor and destructor

    +

    25.4.7.3 Constructor and destructor

    @@ -789,7 +789,7 @@ embedding.

    -

    24.4.7.4 Override virtual methods

    +

    25.4.7.4 Override virtual methods

    @@ -857,7 +857,7 @@ the Go methods.

    -

    24.4.7.5 Call base methods

    +

    25.4.7.5 Call base methods

    @@ -894,7 +894,7 @@ be found in the end of the guide.

    -

    24.4.7.6 Subclass via embedding

    +

    25.4.7.6 Subclass via embedding

    @@ -962,7 +962,7 @@ class.

    -

    24.4.7.7 Memory management with runtime.SetFinalizer

    +

    25.4.7.7 Memory management with runtime.SetFinalizer

    @@ -1027,7 +1027,7 @@ before using runtime.SetFinalizer to know all of its gotchas.

    -

    24.4.7.8 Complete FooBarGo example class

    +

    25.4.7.8 Complete FooBarGo example class

    @@ -1156,7 +1156,7 @@ SWIG/Examples/go/director/.

    -

    24.4.8 Default Go primitive type mappings

    +

    25.4.8 Default Go primitive type mappings

    @@ -1263,7 +1263,7 @@ that typemap, or add new values, to control how C/C++ types are mapped into Go types.

    -

    24.4.9 Output arguments

    +

    25.4.9 Output arguments

    Because of limitations in the way output arguments are processed in swig, @@ -1316,7 +1316,7 @@ void f(char *output); -

    24.4.10 Adding additional go code

    +

    25.4.10 Adding additional go code

    Often the APIs generated by swig are not very natural in go, especially if @@ -1411,7 +1411,7 @@ func bar() { -

    24.4.11 Go typemaps

    +

    25.4.11 Go typemaps

    diff --git a/Doc/Manual/Guile.html b/Doc/Manual/Guile.html index 31d822599..9d55b632b 100644 --- a/Doc/Manual/Guile.html +++ b/Doc/Manual/Guile.html @@ -8,7 +8,7 @@ -

    25 SWIG and Guile

    +

    26 SWIG and Guile

      @@ -48,7 +48,7 @@

      This section details guile-specific support in SWIG. -

      25.1 Supported Guile Versions

      +

      26.1 Supported Guile Versions

      @@ -62,7 +62,7 @@ improved performance. This is currently not tested with swig so your mileage may vary. To be safe set environment variable GUILE_AUTO_COMPILE to 0 when using swig generated guile code. -

      25.2 Meaning of "Module"

      +

      26.2 Meaning of "Module"

      @@ -70,7 +70,7 @@ There are three different concepts of "module" involved, defined separately for SWIG, Guile, and Libtool. To avoid horrible confusion, we explicitly prefix the context, e.g., "guile-module". -

      25.3 Old GH Guile API

      +

      26.3 Old GH Guile API

      Guile 1.8 and older could be interfaced using two different api's, the SCM @@ -81,7 +81,7 @@ or the GH API. The GH interface to guile is deprecated. Read more about why in version of SWIG that can still generate guile GH wrapper code is 2.0.9. Please use that version if you really need the GH wrapper code. -

      25.4 Linkage

      +

      26.4 Linkage

      @@ -89,7 +89,7 @@ Guile support is complicated by a lack of user community cohesiveness, which manifests in multiple shared-library usage conventions. A set of policies implementing a usage convention is called a linkage. -

      25.4.1 Simple Linkage

      +

      26.4.1 Simple Linkage

      @@ -194,7 +194,7 @@ placed between the define-module form and the SWIG_init via a preprocessor define to avoid symbol clashes. For this case, however, passive linkage is available. -

      25.4.2 Passive Linkage

      +

      26.4.2 Passive Linkage

      Passive linkage is just like simple linkage, but it generates an @@ -204,7 +204,7 @@ package name (see below).

      You should use passive linkage rather than simple linkage when you are using multiple modules. -

      25.4.3 Native Guile Module Linkage

      +

      26.4.3 Native Guile Module Linkage

      SWIG can also generate wrapper code that does all the Guile module @@ -245,7 +245,7 @@ Newer Guile versions have a shorthand procedure for this:

    -

    25.4.4 Old Auto-Loading Guile Module Linkage

    +

    26.4.4 Old Auto-Loading Guile Module Linkage

    Guile used to support an autoloading facility for object-code @@ -271,7 +271,7 @@ option, SWIG generates an exported module initialization function with an appropriate name. -

    25.4.5 Hobbit4D Linkage

    +

    26.4.5 Hobbit4D Linkage

    @@ -296,7 +296,7 @@ my/lib/libfoo.so.X.Y.Z and friends. This scheme is still very experimental; the (hobbit4d link) conventions are not well understood.

    -

    25.5 Underscore Folding

    +

    26.5 Underscore Folding

    @@ -308,7 +308,7 @@ complained so far. %rename to specify the Guile name of the wrapped functions and variables (see CHANGES). -

    25.6 Typemaps

    +

    26.6 Typemaps

    @@ -400,7 +400,7 @@ constant will appear as a scheme variable. See Features and the %feature directive for info on how to apply the %feature.

    -

    25.7 Representation of pointers as smobs

    +

    26.7 Representation of pointers as smobs

    @@ -421,7 +421,7 @@ representing the expected pointer type. See also If the Scheme object passed was not a SWIG smob representing a compatible pointer, a wrong-type-arg exception is raised. -

    25.7.1 Smobs

    +

    26.7.1 Smobs

    @@ -440,7 +440,7 @@ structure describing this type. If a generated GOOPS module has been loaded, sm the corresponding GOOPS class.

    -

    25.7.2 Garbage Collection

    +

    26.7.2 Garbage Collection

    Garbage collection is a feature of Guile since version 1.6. As SWIG now requires Guile > 1.8, @@ -454,14 +454,14 @@ is exactly like described in 25.8 Native Guile pointers +

    26.8 Native Guile pointers

    In addition to SWIG smob pointers, Guile's native pointer type are accepted as arguments to wrapped SWIG functions. This can be useful for passing pointers to bytevector data to wrapped functions.

    -

    25.9 Exception Handling

    +

    26.9 Exception Handling

    @@ -487,7 +487,7 @@ mapping: The default when not specified here is to use "swig-error". See Lib/exception.i for details. -

    25.10 Procedure documentation

    +

    26.10 Procedure documentation

    If invoked with the command-line option -procdoc @@ -522,7 +522,7 @@ like this: typemap argument doc. See Lib/guile/typemaps.i for details. -

    25.11 Procedures with setters

    +

    26.11 Procedures with setters

    For global variables, SWIG creates a single wrapper procedure @@ -550,7 +550,7 @@ struct members, the procedures (struct-member-get pointer) and (struct-member-set pointer value) are not generated. -

    25.12 GOOPS Proxy Classes

    +

    26.12 GOOPS Proxy Classes

    SWIG can also generate classes and generic functions for use with @@ -696,7 +696,7 @@ Notice that <Foo> is used before it is defined. The fix is to just put th %import "foo.h" before the %inline block.

    -

    25.12.1 Naming Issues

    +

    26.12.1 Naming Issues

    As you can see in the example above, there are potential naming conflicts. The default exported @@ -733,7 +733,7 @@ guile-modules. For example,

    (use-modules ((Test) #:renamer (symbol-prefix-proc 'goops:))) -

    25.12.2 Linking

    +

    26.12.2 Linking

    The guile-modules generated above all need to be linked together. GOOPS support requires diff --git a/Doc/Manual/Introduction.html b/Doc/Manual/Introduction.html index 8d161b73d..facfc7dd1 100644 --- a/Doc/Manual/Introduction.html +++ b/Doc/Manual/Introduction.html @@ -416,6 +416,7 @@ major features include: Most of C++11 is also supported. Details are in the C++11 chapter. C++14 support is covered in the C++14 chapter. C++17 support is covered in the C++17 chapter. +C++20 support is covered in the C++20 chapter.

    diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html index db5f041e4..b9234b24f 100644 --- a/Doc/Manual/Java.html +++ b/Doc/Manual/Java.html @@ -6,7 +6,7 @@ -

    26 SWIG and Java

    +

    27 SWIG and Java

    -

    26.3.3 Global variables

    +

    27.3.3 Global variables

    @@ -816,7 +816,7 @@ extern char *path; // Read-only (due to %immutable) -

    26.3.4 Constants

    +

    27.3.4 Constants

    @@ -956,7 +956,7 @@ Or if you decide this practice isn't so bad and your own class implements ex

    -

    26.3.5 Enumerations

    +

    27.3.5 Enumerations

    @@ -970,7 +970,7 @@ The final two approaches use simple integers for each enum item. Before looking at the various approaches for wrapping named C/C++ enums, anonymous enums are considered.

    -

    26.3.5.1 Anonymous enums

    +

    27.3.5.1 Anonymous enums

    @@ -1033,7 +1033,7 @@ As in the case of constants, you can access them through either the module class

    -

    26.3.5.2 Typesafe enums

    +

    27.3.5.2 Typesafe enums

    @@ -1126,7 +1126,7 @@ When upgrading to JDK 1.5 or later, proper Java enums could be used instead, wit The following section details proper Java enum generation.

    -

    26.3.5.3 Proper Java enums

    +

    27.3.5.3 Proper Java enums

    @@ -1179,7 +1179,7 @@ The additional support methods need not be generated if none of the enum items h Simpler Java enums for enums without initializers section.

    -

    26.3.5.4 Type unsafe enums

    +

    27.3.5.4 Type unsafe enums

    @@ -1227,7 +1227,7 @@ Note that unlike typesafe enums, this approach requires users to mostly use diff Thus the upgrade path to proper enums provided in JDK 1.5 is more painful.

    -

    26.3.5.5 Simple enums

    +

    27.3.5.5 Simple enums

    @@ -1246,7 +1246,7 @@ SWIG-1.3.21 and earlier versions wrapped all enums using this approach. The type unsafe approach is preferable to this one and this simple approach is only included for backwards compatibility with these earlier versions of SWIG.

    -

    26.3.6 Pointers

    +

    27.3.6 Pointers

    @@ -1334,7 +1334,7 @@ C-style cast may return a bogus result whereas as the C++-style cast will return a NULL pointer if the conversion can't be performed.

    -

    26.3.7 Structures

    +

    27.3.7 Structures

    @@ -1502,7 +1502,7 @@ x.setA(3); // Modify x.a - this is the same as b.f.a -

    26.3.8 C++ classes

    +

    27.3.8 C++ classes

    @@ -1565,7 +1565,7 @@ int bar = Spam.getBar(); -

    26.3.9 C++ inheritance

    +

    27.3.9 C++ inheritance

    @@ -1626,7 +1626,7 @@ Note that Java does not support multiple inheritance so any multiple inheritance A warning is given when multiple inheritance is detected and only the first base class is used.

    -

    26.3.10 Pointers, references, arrays and pass by value

    +

    27.3.10 Pointers, references, arrays and pass by value

    @@ -1681,7 +1681,7 @@ to hold the result and a pointer is returned (Java will release this memory when the returned object's finalizer is run by the garbage collector).

    -

    26.3.10.1 Null pointers

    +

    27.3.10.1 Null pointers

    @@ -1705,7 +1705,7 @@ For spam1 and spam4 above the Java null gets translat The converse also occurs, that is, NULL pointers are translated into null Java objects when returned from a C/C++ function.

    -

    26.3.11 C++ overloaded functions

    +

    27.3.11 C++ overloaded functions

    @@ -1820,7 +1820,7 @@ void spam(unsigned short); // Ignored -

    26.3.12 C++ default arguments

    +

    27.3.12 C++ default arguments

    @@ -1863,7 +1863,7 @@ Further details on default arguments and how to restore this approach are given

    -

    26.3.13 C++ namespaces

    +

    27.3.13 C++ namespaces

    @@ -1953,7 +1953,7 @@ If the resulting use of the nspace feature and hence packages results in a proxy you will need to open up the visibility for the pointer constructor and getCPtr method from the default 'protected' to 'public' with the SWIG_JAVABODY_PROXY macro. See Java code typemaps.

    -

    26.3.14 C++ templates

    +

    27.3.14 C++ templates

    @@ -2002,10 +2002,10 @@ Obviously, there is more to template wrapping than shown in this example. More details can be found in the SWIG and C++ chapter.

    -

    26.3.15 C++ Smart Pointers

    +

    27.3.15 C++ Smart Pointers

    -

    26.3.15.1 The shared_ptr Smart Pointer

    +

    27.3.15.1 The shared_ptr Smart Pointer

    @@ -2016,7 +2016,7 @@ in the shared_ptr smart pointer -

    26.3.15.2 Generic Smart Pointers

    +

    27.3.15.2 Generic Smart Pointers

    @@ -2100,7 +2100,7 @@ Foo f = p.__deref__(); // Returns underlying Foo * -

    26.4 Further details on the generated Java classes

    +

    27.4 Further details on the generated Java classes

    @@ -2115,7 +2115,7 @@ Finally enum classes are covered. First, the crucial intermediary JNI class is considered.

    -

    26.4.1 The intermediary JNI class

    +

    27.4.1 The intermediary JNI class

    @@ -2235,7 +2235,7 @@ If name is the same as modulename then the module class name g from modulename to modulenameModule.

    -

    26.4.1.1 The intermediary JNI class pragmas

    +

    27.4.1.1 The intermediary JNI class pragmas

    @@ -2317,7 +2317,7 @@ For example, let's change the intermediary JNI class access to just the default All the methods in the intermediary JNI class will then not be callable outside of the package as the method modifiers have been changed from public access to default access. This is useful if you want to prevent users calling these low level functions.

    -

    26.4.2 The Java module class

    +

    27.4.2 The Java module class

    @@ -2348,7 +2348,7 @@ example.egg(new Foo()); The primary reason for having the module class wrapping the calls in the intermediary JNI class is to implement static type checking. In this case only a Foo can be passed to the egg function, whereas any long can be passed to the egg function in the intermediary JNI class.

    -

    26.4.2.1 The Java module class pragmas

    +

    27.4.2.1 The Java module class pragmas

    @@ -2399,7 +2399,7 @@ See The intermediary JNI class pragmas secti

    -

    26.4.3 Java proxy classes

    +

    27.4.3 Java proxy classes

    @@ -2475,7 +2475,7 @@ int y = f.spam(5, new Foo()); -

    26.4.3.1 Memory management

    +

    27.4.3.1 Memory management

    @@ -2637,7 +2637,7 @@ and

    -

    26.4.3.2 Inheritance

    +

    27.4.3.2 Inheritance

    @@ -2753,7 +2753,7 @@ However, true cross language polymorphism can be achieved using the 26.4.3.3 Proxy classes and garbage collection +

    27.4.3.3 Proxy classes and garbage collection

    @@ -2836,7 +2836,7 @@ The section on Java typemaps details how to specify See the How to Handle Java Finalization's Memory-Retention Issues article for alternative approaches to managing memory by avoiding finalizers altogether.

    -

    26.4.3.4 The premature garbage collection prevention parameter for proxy class marshalling

    +

    27.4.3.4 The premature garbage collection prevention parameter for proxy class marshalling

    @@ -2958,7 +2958,7 @@ For example: Compatibility note: The generation of this additional parameter did not occur in versions prior to SWIG-1.3.30.

    -

    26.4.3.5 Single threaded applications and thread safety

    +

    27.4.3.5 Single threaded applications and thread safety

    @@ -3046,7 +3046,7 @@ for (int i=0; i<100000; i++) { -

    26.4.4 Type wrapper classes

    +

    27.4.4 Type wrapper classes

    @@ -3133,7 +3133,7 @@ public static void spam(SWIGTYPE_p_int x, SWIGTYPE_p_int y, int z) { ... } -

    26.4.5 Enum classes

    +

    27.4.5 Enum classes

    @@ -3142,7 +3142,7 @@ The Enumerations section discussed these but om The following sub-sections detail the various types of enum classes that can be generated.

    -

    26.4.5.1 Typesafe enum classes

    +

    27.4.5.1 Typesafe enum classes

    @@ -3226,7 +3226,7 @@ The swigValue method is used for marshalling in the other direction. The toString method is overridden so that the enum name is available.

    -

    26.4.5.2 Proper Java enum classes

    +

    27.4.5.2 Proper Java enum classes

    @@ -3304,7 +3304,7 @@ These needn't be generated if the enum being wrapped does not have any initializ Simpler Java enums for enums without initializers section describes how typemaps can be used to achieve this.

    -

    26.4.5.3 Type unsafe enum classes

    +

    27.4.5.3 Type unsafe enum classes

    @@ -3335,7 +3335,7 @@ public final class Beverage { -

    26.4.6 Interfaces

    +

    27.4.6 Interfaces

    @@ -3580,7 +3580,7 @@ typemap which is only used when a class is marked with the interface fe See Java code typemaps for details.

    -

    26.5 Cross language polymorphism using directors

    +

    27.5 Cross language polymorphism using directors

    @@ -3602,7 +3602,7 @@ The upshot is that C++ classes can be extended in Java and from C++ these extens Neither C++ code nor Java code needs to know where a particular method is implemented: the combination of proxy classes, director classes, and C wrapper functions transparently takes care of all the cross-language method routing.

    -

    26.5.1 Enabling directors

    +

    27.5.1 Enabling directors

    @@ -3670,7 +3670,7 @@ public: -

    26.5.2 Director classes

    +

    27.5.2 Director classes

    @@ -3698,7 +3698,7 @@ If the correct implementation is in Java, the Java API is used to call the metho

    -

    26.5.3 Overhead and code bloat

    +

    27.5.3 Overhead and code bloat

    @@ -3716,7 +3716,7 @@ This situation can be optimized by selectively enabling director methods (using

    -

    26.5.4 Simple directors example

    +

    27.5.4 Simple directors example

    @@ -3779,7 +3779,7 @@ DirectorDerived.upcall_method() invoked. -

    26.5.5 Director threading issues

    +

    27.5.5 Director threading issues

    @@ -3799,7 +3799,7 @@ Macros can be defined on the commandline when compiling your C++ code, or altern -

    26.5.6 Director performance tuning

    +

    27.5.6 Director performance tuning

    @@ -3820,7 +3820,7 @@ However, if all director methods are expected to usually be overridden by Java s The disadvantage is that invocation of director methods from C++ when Java doesn't actually override the method will require an additional call up into Java and back to C++. As such, this option is only useful when overrides are extremely common and instantiation is frequent enough that its performance is critical.

    -

    26.5.7 Java exceptions from directors

    +

    27.5.7 Java exceptions from directors

    @@ -3896,7 +3896,7 @@ Exception in thread "main" java.lang.RuntimeException: There was a problem! More on the Swig::DirectorException class can be found in the next section which details how to customize the handling of director exceptions.

    -

    26.5.7.1 Customizing director exceptions

    +

    27.5.7.1 Customizing director exceptions

    @@ -4454,7 +4454,7 @@ Exception in thread "main" java.lang.IndexOutOfBoundsException: Index is negativ -

    26.6 Accessing protected members

    +

    27.6 Accessing protected members

    @@ -4550,7 +4550,7 @@ class MyProtectedBase extends ProtectedBase -

    26.7 Common customization features

    +

    27.7 Common customization features

    @@ -4562,7 +4562,7 @@ be awkward. This section describes some common SWIG features that are used to improve the interface to existing C/C++ code.

    -

    26.7.1 C/C++ helper functions

    +

    27.7.1 C/C++ helper functions

    @@ -4628,7 +4628,7 @@ hard to implement. It is possible to improve on this using Java code, typemaps, customization features as covered in later sections, but sometimes helper functions are a quick and easy solution to difficult cases.

    -

    26.7.2 Class extension with %extend

    +

    27.7.2 Class extension with %extend

    @@ -4691,7 +4691,7 @@ Vector(2, 3, 4) in any way---the extensions only show up in the Java interface.

    -

    26.7.3 Class extension with %proxycode

    +

    27.7.3 Class extension with %proxycode

    @@ -4828,7 +4828,7 @@ public class ValueUnsignedInt { -

    26.7.4 Exception handling with %exception and %javaexception

    +

    27.7.4 Exception handling with %exception and %javaexception

    @@ -4987,7 +4987,7 @@ to raise exceptions. See the SWIG Library ch The typemap example Handling C++ exception specifications as Java exceptions provides further exception handling capabilities.

    -

    26.7.5 Method access with %javamethodmodifiers

    +

    27.7.5 Method access with %javamethodmodifiers

    @@ -5013,7 +5013,7 @@ protected static void protect_me() { -

    26.8 Tips and techniques

    +

    27.8 Tips and techniques

    @@ -5023,7 +5023,7 @@ strings and arrays. This chapter discusses the common techniques for solving these problems.

    -

    26.8.1 Input and output parameters using primitive pointers and references

    +

    27.8.1 Input and output parameters using primitive pointers and references

    @@ -5197,7 +5197,7 @@ void foo(Bar *OUTPUT); will not have the intended effect since typemaps.i does not define an OUTPUT rule for Bar.

    -

    26.8.2 Simple pointers

    +

    27.8.2 Simple pointers

    @@ -5263,7 +5263,7 @@ System.out.println("3 + 4 = " + result); See the SWIG Library chapter for further details.

    -

    26.8.3 Wrapping C arrays with Java arrays

    +

    27.8.3 Wrapping C arrays with Java arrays

    @@ -5330,7 +5330,7 @@ Please be aware that the typemaps in this library are not efficient as all the e There is an alternative approach using the SWIG array library and this is covered in the next section.

    -

    26.8.4 Unbounded C Arrays

    +

    27.8.4 Unbounded C Arrays

    @@ -5475,7 +5475,7 @@ well suited for applications in which you need to create buffers, package binary data, etc.

    -

    26.8.5 Binary data vs Strings

    +

    27.8.5 Binary data vs Strings

    @@ -5519,7 +5519,7 @@ len: 5 data: 68 69 0 6a 6b -

    26.8.6 Overriding new and delete to allocate from Java heap

    +

    27.8.6 Overriding new and delete to allocate from Java heap

    @@ -5636,7 +5636,7 @@ model and use these functions in place of malloc and free in your own code.

    -

    26.9 Java typemaps

    +

    27.9 Java typemaps

    @@ -5657,7 +5657,7 @@ Before proceeding, it should be stressed that typemaps are not a required part of using SWIG---the default wrapping behavior is enough in most cases. Typemaps are only used if you want to change some aspect of the generated code. -

    26.9.1 Default primitive type mappings

    +

    27.9.1 Default primitive type mappings

    @@ -5809,7 +5809,7 @@ However, the mappings allow the full range of values for each C type from Java.

    -

    26.9.2 Default typemaps for non-primitive types

    +

    27.9.2 Default typemaps for non-primitive types

    @@ -5824,7 +5824,7 @@ So in summary, the C/C++ pointer to non-primitive types is cast into the 64 bit The Java type is either the proxy class or type wrapper class.

    -

    26.9.3 Sixty four bit JVMs

    +

    27.9.3 Sixty four bit JVMs

    @@ -5837,7 +5837,7 @@ Unfortunately it won't of course hold true for JNI code.

    -

    26.9.4 What is a typemap?

    +

    27.9.4 What is a typemap?

    @@ -5960,7 +5960,7 @@ int c = example.count('e', "Hello World"); -

    26.9.5 Typemaps for mapping C/C++ types to Java types

    +

    27.9.5 Typemaps for mapping C/C++ types to Java types

    @@ -6240,7 +6240,7 @@ These are listed below: -

    26.9.6 Java typemap attributes

    +

    27.9.6 Java typemap attributes

    @@ -6286,7 +6286,7 @@ The "javain" typemap has the optional 'pre', 'post' and 'pgcppname' attributes. Note that when the 'pre' or 'post' attributes are specified and the associated type is used in a constructor, a constructor helper function is generated. This is necessary as the Java proxy constructor wrapper makes a call to a support constructor using a this call. In Java the this call must be the first statement in the constructor body. The constructor body thus calls the helper function and the helper function instead makes the JNI call, ensuring the 'pre' code is called before the JNI call is made. There is a Date marshalling example showing 'pre', 'post' and 'pgcppname' attributes in action.

    -

    26.9.7 Java special variables

    +

    27.9.7 Java special variables

    @@ -6468,7 +6468,7 @@ in that it is not fully qualified with the package name when using the nspace feature.

    -

    26.9.8 Typemaps for both C and C++ compilation

    +

    27.9.8 Typemaps for both C and C++ compilation

    @@ -6505,7 +6505,7 @@ If you do not intend your code to be targeting both C and C++ then your typemaps

    -

    26.9.9 Java code typemaps

    +

    27.9.9 Java code typemaps

    @@ -6803,7 +6803,7 @@ to make the method and constructor public: -

    26.9.10 Director specific typemaps

    +

    27.9.10 Director specific typemaps

    @@ -7080,7 +7080,7 @@ The basic strategy here is to provide a default package typemap for the majority -

    26.10 Typemap Examples

    +

    27.10 Typemap Examples

    @@ -7090,7 +7090,7 @@ the SWIG library.

    -

    26.10.1 Simpler Java enums for enums without initializers

    +

    27.10.1 Simpler Java enums for enums without initializers

    @@ -7169,7 +7169,7 @@ This would be done by using the original versions of these typemaps in "enums.sw

    -

    26.10.2 Handling C++ exception specifications as Java exceptions

    +

    27.10.2 Handling C++ exception specifications as Java exceptions

    @@ -7294,7 +7294,7 @@ We could alternatively have used %rename to rename what() into

    -

    26.10.3 NaN Exception - exception handling for a particular type

    +

    27.10.3 NaN Exception - exception handling for a particular type

    @@ -7449,7 +7449,7 @@ If we were a martyr to the JNI cause, we could replace the succinct code within If we had, we would have put it in the "in" typemap which, like all JNI and Java typemaps, also supports the 'throws' attribute.

    -

    26.10.4 Converting Java String arrays to char **

    +

    27.10.4 Converting Java String arrays to char **

    @@ -7593,7 +7593,7 @@ Lastly the "jni", "jtype" and "jstype" typemaps are also required to specify what Java types to use.

    -

    26.10.5 Expanding a Java object to multiple arguments

    +

    27.10.5 Expanding a Java object to multiple arguments

    @@ -7675,7 +7675,7 @@ example.foo(new String[]{"red", "green", "blue", "white"}); -

    26.10.6 Using typemaps to return arguments

    +

    27.10.6 Using typemaps to return arguments

    @@ -7793,7 +7793,7 @@ $ java runme 1 12.0 340.0 -

    26.10.7 Adding Java downcasts to polymorphic return types

    +

    27.10.7 Adding Java downcasts to polymorphic return types

    @@ -7999,7 +7999,7 @@ SWIG usually generates code which constructs the proxy classes using Java code a Note that the JNI code above uses a number of string lookups to call a constructor, whereas this would not occur using byte compiled Java code.

    -

    26.10.8 Adding an equals method to the Java classes

    +

    27.10.8 Adding an equals method to the Java classes

    @@ -8043,7 +8043,7 @@ System.out.println("foo1? " + foo1.equals(foo2)); -

    26.10.9 Void pointers and a common Java base class

    +

    27.10.9 Void pointers and a common Java base class

    @@ -8102,7 +8102,7 @@ This example contains some useful functionality which you may want in your code.

  • It also has a function which effectively implements a cast from the type of the proxy/type wrapper class to a void pointer. This is necessary for passing a proxy class or a type wrapper class to a function that takes a void pointer. -

    26.10.10 Struct pointer to pointer

    +

    27.10.10 Struct pointer to pointer

    @@ -8282,7 +8282,7 @@ The C functional interface has been completely morphed into an object-oriented i the Butler class would behave much like any pure Java class and feel more natural to Java users.

    -

    26.10.11 Memory management when returning references to member variables

    +

    27.10.11 Memory management when returning references to member variables

    @@ -8405,7 +8405,7 @@ public class Bike { Note the addReference call.

    -

    26.10.12 Memory management for objects passed to the C++ layer

    +

    27.10.12 Memory management for objects passed to the C++ layer

    @@ -8533,7 +8533,7 @@ as mentioned earlier, setElement is actually: -

    26.10.13 Date marshalling using the javain typemap and associated attributes

    +

    27.10.13 Date marshalling using the javain typemap and associated attributes

    @@ -8710,7 +8710,7 @@ A few things to note: -

    26.11 Living with Java Directors

    +

    27.11 Living with Java Directors

    @@ -8889,10 +8889,10 @@ public abstract class UserVisibleFoo extends Foo {

  • -

    26.12 Odds and ends

    +

    27.12 Odds and ends

    -

    26.12.1 JavaDoc comments

    +

    27.12.1 JavaDoc comments

    @@ -8948,7 +8948,7 @@ public class Barmy { -

    26.12.2 Functional interface without proxy classes

    +

    27.12.2 Functional interface without proxy classes

    @@ -9009,7 +9009,7 @@ All destructors have to be called manually for example the delete_Foo(foo) -

    26.12.3 Using your own JNI functions

    +

    27.12.3 Using your own JNI functions

    @@ -9059,7 +9059,7 @@ This directive is only really useful if you want to mix your own hand crafted JN

    -

    26.12.4 Performance concerns and hints

    +

    27.12.4 Performance concerns and hints

    @@ -9080,7 +9080,7 @@ However, you will have to be careful about memory management and make sure that This method normally calls the C++ destructor or free() for C code.

    -

    26.12.5 Debugging

    +

    27.12.5 Debugging

    @@ -9102,7 +9102,7 @@ The -verbose:jni and -verbose:gc are also useful options for monitoring code beh

    -

    26.13 Java Examples

    +

    27.13 Java Examples

    diff --git a/Doc/Manual/Javascript.html b/Doc/Manual/Javascript.html index 0b301377c..cce5b5e2e 100644 --- a/Doc/Manual/Javascript.html +++ b/Doc/Manual/Javascript.html @@ -7,7 +7,7 @@ -

    27 SWIG and Javascript

    +

    28 SWIG and Javascript

      @@ -52,7 +52,7 @@

      This chapter describes SWIG's support of Javascript. It does not cover SWIG basics, but only information that is specific to this module.

      -

      27.1 Overview

      +

      28.1 Overview

      Javascript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. Its arguably the most popular language for web development. @@ -63,10 +63,10 @@ Javascript has gone beyond being a browser-based scripting language and with node-webkit there is a platform which uses Google's Chromium as Web-Browser widget and node.js for javascript extensions.

      -

      27.2 Preliminaries

      +

      28.2 Preliminaries

      -

      27.2.1 Running SWIG

      +

      28.2.1 Running SWIG

      Suppose that you defined a SWIG module such as the following:

      @@ -121,7 +121,7 @@ void example_initialize(v8::Handle<v8::Object> exports) Note: be aware that v8 has a C++ API, and thus, the generated modules must be compiled as C++.

      -

      27.2.2 Running Tests and Examples

      +

      28.2.2 Running Tests and Examples

      The configuration for tests and examples currently supports Linux and Mac only and not MinGW (Windows) yet.

      @@ -153,7 +153,7 @@ $ make check-javascript-test-suite ENGINE=jsc $ make check-javascript-examples V8_VERSION=0x032530 ENGINE=v8
    -

    27.2.3 Known Issues

    +

    28.2.3 Known Issues

    At the moment, the Javascript generators pass all tests syntactically, i.e., the generated source code compiles. However, there are still remaining runtime issues.

    @@ -169,12 +169,12 @@ $ make check-javascript-examples V8_VERSION=0x032530 ENGINE=v8

    The primary development environment has been Linux (Ubuntu 12.04). Windows and Mac OS X have been tested sporadically. Therefore, the generators might have more issues on those platforms. Please report back any problem you observe to help us improving this module quickly.

    -

    27.3 Integration

    +

    28.3 Integration

    This chapter gives a short introduction how to use a native Javascript extension: as a node.js module, and as an extension for an embedded Webkit.

    -

    27.3.1 Creating node.js Extensions

    +

    28.3.1 Creating node.js Extensions

    To install node.js you can download an installer from their web-site for Mac OS X and Windows. For Linux you can either build the source yourself and run sudo checkinstall or keep to the (probably stone-age) packaged version. For Ubuntu there is a PPA available.

    @@ -220,7 +220,7 @@ require("./build/Release/example")

    A more detailed explanation is given in the Examples section.

    -

    27.3.1.1 Troubleshooting

    +

    28.3.1.1 Troubleshooting

      @@ -232,12 +232,12 @@ require("./build/Release/example") $ sudo apt-get remove gyp -

      27.3.2 Embedded Webkit

      +

      28.3.2 Embedded Webkit

      Webkit is pre-installed on Mac OS X and available as a library for GTK.

      -

      27.3.2.1 Mac OS X

      +

      28.3.2.1 Mac OS X

      There is general information about programming with WebKit on Apple Developer Documentation. Details about Cocoa programming are not covered here.

      @@ -285,7 +285,7 @@ extern bool example_initialize(JSGlobalContextRef context, JSObjectRef* exports) @end -

      27.3.2.2 GTK

      +

      28.3.2.2 GTK

      There is general information about programming GTK at GTK documentation and in the GTK tutorial, and for Webkit there is a Webkit GTK+ API Reference.

      @@ -330,7 +330,7 @@ int main(int argc, char* argv[]) } -

      27.3.3 Creating Applications with node-webkit

      +

      28.3.3 Creating Applications with node-webkit

      To get started with node-webkit there is a very informative set of wiki pages.

      @@ -421,12 +421,12 @@ open new windows, and many more things. }; -

      27.4 Examples

      +

      28.4 Examples

      Some basic examples are shown here in more detail.

      -

      27.4.1 Simple

      +

      28.4.1 Simple

      The common example simple looks like this:

      @@ -476,7 +476,7 @@ example.Foo = 3.1415926;

      Note: ECMAScript 5, the currently implemented Javascript standard, does not have modules. node.js and other implementations provide this mechanism defined by the CommonJS group. For browsers this is provided by Browserify, for instance.

      -

      27.4.2 Class

      +

      28.4.2 Class

      The common example class defines three classes, Shape, Circle, and Square:

      @@ -606,12 +606,12 @@ at emitKey (readline.js:1095:12) Note: In ECMAScript 5 there is no concept for classes. Instead each function can be used as a constructor function which is executed by the 'new' operator. Furthermore, during construction the key property prototype of the constructor function is used to attach a prototype instance to the created object. A prototype is essentially an object itself that is the first-class delegate of a class used whenever the access to a property of an object fails. The very same prototype instance is shared among all instances of one type. Prototypal inheritance is explained in more detail on in Inheritance and the prototype chain, for instance.

      -

      27.5 Implementation

      +

      28.5 Implementation

      The Javascript Module implementation has taken a very different approach compared to other language modules in order to support different Javascript interpreters.

      -

      27.5.1 Source Code

      +

      28.5.1 Source Code

      The Javascript module is implemented in Source/Modules/javascript.cxx. It dispatches the code generation to a JSEmitter instance, V8Emitter or JSCEmitter. Additionally there are some helpers: Template, for templated code generation, and JSEmitterState, which is used to manage state information during AST traversal. This rough map shall make it easier to find a way through this huge source file:

      @@ -712,7 +712,7 @@ Template::Template(const String *code_) { ... } ... -

      27.5.2 Code Templates

      +

      28.5.2 Code Templates

      All generated code is created on the basis of code templates. The templates for JavascriptCore can be found in Lib/javascript/jsc/javascriptcode.swg, for v8 in Lib/javascript/v8/javascriptcode.swg.

      @@ -751,7 +751,7 @@ t_register.replace("$jsparent", state.clazz(NAME_MANGLED))

      Template creates a copy of that string and Template::replace uses Swig's Replaceall to replace variables in the template. Template::trim can be used to eliminate leading and trailing whitespaces. Template::print is used to write the final template string to a Swig DOH (based on Printv). All methods allow chaining.

      -

      27.5.3 Emitter

      +

      28.5.3 Emitter

      The Javascript module delegates code generation to a JSEmitter instance. The following extract shows the essential interface:

      @@ -870,7 +870,7 @@ int JAVASCRIPT::classHandler(Node *n) {

      In enterClass the emitter stores state information that is necessary when processing class members. In exitClass the wrapper code for the whole class is generated.

      -

      27.5.4 Emitter states

      +

      28.5.4 Emitter states

      For storing information during the AST traversal the emitter provides a JSEmitterState with different slots to store data representing the scopes global, class, function, and variable.

      @@ -914,7 +914,7 @@ state.clazz(NAME, Getattr(n, "sym:name"));

      State information can be retrieved using state.clazz(NAME) or with Getattr on state.clazz() which actually returns a Hash instance.

      -

      27.5.5 Handling Exceptions in JavascriptCore

      +

      28.5.5 Handling Exceptions in JavascriptCore

      Applications with an embedded JavascriptCore should be able to present detailed exception messages that occur in the Javascript engine. Below is an example derived from code provided by Brian Barnes on how these exception details can be extracted.

      diff --git a/Doc/Manual/Library.html b/Doc/Manual/Library.html index 560859234..5f72b557d 100644 --- a/Doc/Manual/Library.html +++ b/Doc/Manual/Library.html @@ -7,7 +7,7 @@ -

      11 SWIG library

      +

      12 SWIG library

      -

      11.2.4 cdata.i

      +

      12.2.4 cdata.i

      @@ -769,7 +769,7 @@ char *cdata_name(type* ptr, int nitems) Clearly they are unsafe.

      -

      11.3 C string handling

      +

      12.3 C string handling

      @@ -789,7 +789,7 @@ morality. The modules in this section provide basic functionality for manipulating raw C strings.

      -

      11.3.1 Default string handling

      +

      12.3.1 Default string handling

      @@ -830,7 +830,7 @@ interpreter and lead to a crash). Furthermore, the default behavior does not work well with binary data. Instead, strings are assumed to be NULL-terminated.

      -

      11.3.2 Passing binary data

      +

      12.3.2 Passing binary data

      @@ -872,7 +872,7 @@ In the wrapper function, the passed string will be expanded to a pointer and len The (char *STRING, int LENGTH) multi-argument typemap is also available in addition to (char *STRING, size_t LENGTH).

      -

      11.3.3 Using %newobject to release memory

      +

      12.3.3 Using %newobject to release memory

      @@ -913,7 +913,7 @@ however, you may need to provide your own "newfree" typemap for other types. See Object ownership and %newobject for more details.

      -

      11.3.4 cstring.i

      +

      12.3.4 cstring.i

      @@ -1373,7 +1373,7 @@ structure or class instead.

    -

    11.4 STL/C++ library

    +

    12.4 STL/C++ library

    @@ -1420,7 +1420,7 @@ Please look for the library files in the appropriate language library directory.

    -

    11.4.1 std::string

    +

    12.4.1 std::string

    @@ -1504,7 +1504,7 @@ void foo(string s, const String &t); // std_string typemaps still applie -

    11.4.2 std::vector

    +

    12.4.2 std::vector

    @@ -1683,7 +1683,7 @@ if you want to make their head explode. details and the public API exposed to the interpreter vary.

    -

    11.4.3 STL exceptions

    +

    12.4.3 STL exceptions

    @@ -1733,10 +1733,10 @@ The %exception directive can be used by placing the following code befo Any thrown STL exceptions will then be gracefully handled instead of causing a crash.

    -

    11.4.4 shared_ptr smart pointer

    +

    12.4.4 shared_ptr smart pointer

    -

    11.4.4.1 shared_ptr basics

    +

    12.4.4.1 shared_ptr basics

    @@ -1832,7 +1832,7 @@ System.out.println(val1 + " " + val2); -

    11.4.4.2 shared_ptr and inheritance

    +

    12.4.4.2 shared_ptr and inheritance

    @@ -1923,7 +1923,7 @@ Adding the missing %shared_ptr macros will fix this: -

    11.4.4.3 shared_ptr and method overloading

    +

    12.4.4.3 shared_ptr and method overloading

    @@ -1945,7 +1945,7 @@ SWIG will choose to wrap just the first method by default. For the interested reader, SWIG detects that they are equivalent types via the typecheck typemaps in the shared_ptr library.

    -

    11.4.4.4 shared_ptr and templates

    +

    12.4.4.4 shared_ptr and templates

    @@ -1987,7 +1987,7 @@ The SWIG code below shows the required ordering: -

    11.4.4.5 shared_ptr and directors

    +

    12.4.4.5 shared_ptr and directors

    @@ -1995,7 +1995,7 @@ The languages that support shared_ptr also have support for using shared_ptr wit

    -

    11.4.5 auto_ptr smart pointer

    +

    12.4.5 auto_ptr smart pointer

    @@ -2044,10 +2044,10 @@ int value = k.getValue(); -

    11.5 Utility Libraries

    +

    12.5 Utility Libraries

    -

    11.5.1 exception.i

    +

    12.5.1 exception.i

    diff --git a/Doc/Manual/Lua.html b/Doc/Manual/Lua.html index 6633eaa38..60f7e1775 100644 --- a/Doc/Manual/Lua.html +++ b/Doc/Manual/Lua.html @@ -7,7 +7,7 @@ -

    28 SWIG and Lua

    +

    29 SWIG and Lua

      @@ -83,14 +83,14 @@ Lua is an extension programming language designed to support general procedural eLua stands for Embedded Lua (can be thought of as a flavor of Lua) and offers the full implementation of the Lua programming language to the embedded world, extending it with specific features for efficient and portable software embedded development. eLua runs on smaller devices like microcontrollers and provides the full features of the regular Lua desktop version. More information on eLua can be found here: http://www.eluaproject.net

      -

      28.1 Preliminaries

      +

      29.1 Preliminaries

      The current SWIG implementation is designed to work with Lua 5.0.x, 5.1.x and 5.2.x. It should work with later versions of Lua, but certainly not with Lua 4.0 due to substantial API changes. It is possible to either static link or dynamic link a Lua module into the interpreter (normally Lua static links its libraries, as dynamic linking is not available on all platforms). SWIG also has support for eLua starting from eLua 0.8. Due to substantial changes between SWIG 2.x and SWIG 3.0 and unavailability of testing platform, eLua status was downgraded to 'experimental'.

      -

      28.2 Running SWIG

      +

      29.2 Running SWIG

      @@ -138,7 +138,7 @@ $ swig -lua -eluac example.i The -elua option puts all the C function wrappers and variable get/set wrappers in rotables. It also generates a metatable which will control the access to these variables from eLua. It also offers a significant amount of module size compression. On the other hand, the -eluac option puts all the wrappers in a single rotable. With this option, no matter how huge the module, it will consume no additional microcontroller SRAM (crass compression). There is a catch though: Metatables are not generated with -eluac. To access any value from eLua, one must directly call the wrapper function associated with that value.

      -

      28.2.1 Additional command line options

      +

      29.2.1 Additional command line options

      @@ -179,7 +179,7 @@ swig -lua -help -

      28.2.2 Compiling and Linking and Interpreter

      +

      29.2.2 Compiling and Linking and Interpreter

      @@ -250,7 +250,7 @@ LUALIB_API int ( luaopen_mod )(lua_State *L ); More information on building and configuring eLua can be found here: http://www.eluaproject.net/doc/v0.8/en_building.html

      -

      28.2.3 Compiling a dynamic module

      +

      29.2.3 Compiling a dynamic module

      @@ -318,7 +318,7 @@ Is quite obvious (Go back and consult the Lua documents on how to enable loadlib -

      28.2.4 Using your module

      +

      29.2.4 Using your module

      @@ -336,19 +336,19 @@ $ ./my_lua >

    -

    28.3 A tour of basic C/C++ wrapping

    +

    29.3 A tour of basic C/C++ wrapping

    By default, SWIG tries to build a very natural Lua interface to your C/C++ code. This section briefly covers the essential aspects of this wrapping.

    -

    28.3.1 Modules

    +

    29.3.1 Modules

    The SWIG module directive specifies the name of the Lua module. If you specify `module example', then everything is wrapped into a Lua table 'example' containing all the functions and variables. When choosing a module name, make sure you don't use the same name as a built-in Lua command or standard module name.

    -

    28.3.2 Functions

    +

    29.3.2 Functions

    @@ -389,7 +389,7 @@ It is also possible to rename the module with an assignment. 24 -

    28.3.3 Global variables

    +

    29.3.3 Global variables

    @@ -477,7 +477,7 @@ If you have used the -eluac option for your eLua module, you will have In general, functions of the form "variable_get()" and "variable_set()" are automatically generated by SWIG for use with -eluac.

    -

    28.3.4 Constants and enums

    +

    29.3.4 Constants and enums

    @@ -512,7 +512,7 @@ If you're using eLua and have used -elua or -eluac to generate Hello World -

    28.3.4.1 Constants/enums and classes/structures

    +

    29.3.4.1 Constants/enums and classes/structures

    @@ -568,7 +568,7 @@ If the -no-old-metatable-bindings option is used, then these old-style It is worth mentioning, that example.Test.TEST1 and example.Test_TEST1 are different entities and changing one does not change the other. Given the fact that these are constantes and they are not supposed to be changed, it is up to you to avoid such issues.

    -

    28.3.5 Pointers

    +

    29.3.5 Pointers

    @@ -606,7 +606,7 @@ Lua enforces the integrity of its userdata, so it is virtually impossible to cor nil -

    28.3.6 Structures

    +

    29.3.6 Structures

    @@ -710,7 +710,7 @@ For eLua with the -eluac option, structure manipulation has to be perfo In general, functions of the form "new_struct()", "struct_member_get()", "struct_member_set()" and "free_struct()" are automatically generated by SWIG for each structure defined in C. (Please note: This doesn't apply for modules generated with the -elua option)

    -

    28.3.7 C++ classes

    +

    29.3.7 C++ classes

    @@ -785,7 +785,7 @@ Both style names are generated by default now. However, if the -no-old-metatable-bindings option is used, then the backward compatible names are not generated in addition to ordinary ones.

    -

    28.3.8 C++ inheritance

    +

    29.3.8 C++ inheritance

    @@ -810,7 +810,7 @@ then the function spam() accepts a Foo pointer or a pointer to any clas

    It is safe to use multiple inheritance with SWIG.

    -

    28.3.9 Pointers, references, values, and arrays

    +

    29.3.9 Pointers, references, values, and arrays

    @@ -841,7 +841,7 @@ Foo spam7();

    then all three functions will return a pointer to some Foo object. Since the third function (spam7) returns a value, newly allocated memory is used to hold the result and a pointer is returned (Lua will release this memory when the return value is garbage collected). The other two are pointers which are assumed to be managed by the C code and so will not be garbage collected.

    -

    28.3.10 C++ overloaded functions

    +

    29.3.10 C++ overloaded functions

    @@ -927,7 +927,7 @@ Please refer to the "SWIG and C++" chapter for more information about overloadin

    Dealing with the Lua coercion mechanism, the priority is roughly (integers, floats, strings, userdata). But it is better to rename the functions rather than rely upon the ordering.

    -

    28.3.11 C++ operators

    +

    29.3.11 C++ operators

    @@ -1059,7 +1059,7 @@ operators and pseudo-operators):

    No other lua metafunction is inherited. For example, __gc is not inherited and must be redefined in every class. __tostring is subject to a special handling. If absent in class and in class bases, a default one will be provided by SWIG.

    -

    28.3.12 Class extension with %extend

    +

    29.3.12 Class extension with %extend

    @@ -1116,7 +1116,7 @@ true Extend works with both C and C++ code, on classes and structs. It does not modify the underlying object in any way---the extensions only show up in the Lua interface. The only item to take note of is the code has to use the '$self' instead of 'this', and that you cannot access protected/private members of the code (as you are not officially part of the class).

    -

    28.3.13 Using %newobject to release memory

    +

    29.3.13 Using %newobject to release memory

    If you have a function that allocates memory like this,

    @@ -1140,7 +1140,7 @@ char *foo();

    This will release the allocated memory.

    -

    28.3.14 C++ templates

    +

    29.3.14 C++ templates

    @@ -1175,7 +1175,7 @@ In Lua:

    Obviously, there is more to template wrapping than shown in this example. More details can be found in the SWIG and C++ chapter. Some more complicated examples will appear later.

    -

    28.3.15 C++ Smart Pointers

    +

    29.3.15 C++ Smart Pointers

    @@ -1227,7 +1227,7 @@ If you ever need to access the underlying pointer returned by operator->( > f = p:__deref__() -- Returns underlying Foo * -

    28.3.16 C++ Exceptions

    +

    29.3.16 C++ Exceptions

    @@ -1370,7 +1370,7 @@ and the "Exception handling add exception specification to functions or globally (respectively).

    -

    28.3.17 Namespaces

    +

    29.3.17 Namespaces

    @@ -1421,7 +1421,7 @@ Now, from Lua usage is as follows: 19 > -

    28.3.17.1 Compatibility Note

    +

    29.3.17.1 Compatibility Note

    @@ -1437,7 +1437,7 @@ If SWIG is running in a backwards compatible way, i.e. without the -no-old-m -

    28.3.17.2 Names

    +

    29.3.17.2 Names

    If SWIG is launched without -no-old-metatable-bindings option, then it enters backward-compatible mode. While in this mode, it tries @@ -1481,7 +1481,7 @@ surrounding scope without any prefixing. Pretending that Test2 is a struct, not > -

    28.3.17.3 Inheritance

    +

    29.3.17.3 Inheritance

    The internal organization of inheritance has changed. @@ -1522,12 +1522,12 @@ function > -

    28.4 Typemaps

    +

    29.4 Typemaps

    This section explains what typemaps are and how to use them. The default wrapping behaviour of SWIG is enough in most cases. However sometimes SWIG may need a little additional assistance to know which typemap to apply to provide the best wrapping. This section will be explaining how to use typemaps to best effect

    -

    28.4.1 What is a typemap?

    +

    29.4.1 What is a typemap?

    A typemap is nothing more than a code generation rule that is attached to a specific C datatype. For example, to convert integers from Lua to C, you might define a typemap like this:

    @@ -1555,7 +1555,7 @@ Received an integer : 6 720 -

    28.4.2 Using typemaps

    +

    29.4.2 Using typemaps

    There are many ready written typemaps built into SWIG for all common types (int, float, short, long, char*, enum and more), which SWIG uses automatically, with no effort required on your part.

    @@ -1608,7 +1608,7 @@ void swap(int *sx, int *sy);

    Note: C++ references must be handled exactly the same way. However SWIG will automatically wrap a const int& as an input parameter (since that it obviously input).

    -

    28.4.3 Typemaps and arrays

    +

    29.4.3 Typemaps and arrays

    Arrays present a challenge for SWIG, because like pointers SWIG does not know whether these are input or output values, nor @@ -1672,7 +1672,7 @@ and Lua tables to be 1..N, (the indexing follows the norm for the language). In

    Note: SWIG also can support arrays of pointers in a similar manner.

    -

    28.4.4 Typemaps and pointer-pointer functions

    +

    29.4.4 Typemaps and pointer-pointer functions

    Several C++ libraries use a pointer-pointer functions to create its objects. These functions require a pointer to a pointer which is then filled with the pointer to the new object. Microsoft's COM and DirectX as well as many other libraries have this kind of function. An example is given below:

    @@ -1706,7 +1706,7 @@ int Create_Math(iMath** pptr); // its creator (assume it mallocs) ptr=nil -- the iMath* will be GC'ed as normal -

    28.5 Writing typemaps

    +

    29.5 Writing typemaps

    This section describes how you can modify SWIG's default wrapping behavior for various C/C++ datatypes using the %typemap directive. This is an advanced topic that assumes familiarity with the Lua C API as well as the material in the "Typemaps" chapter.

    @@ -1715,7 +1715,7 @@ ptr=nil -- the iMath* will be GC'ed as normal

    Before proceeding, you should read the previous section on using typemaps, and look at the existing typemaps found in luatypemaps.swg and typemaps.i. These are both well documented and fairly easy to read. You should not attempt to write your own typemaps until you have read and can understand both of these files (they may well also give you an idea to base your work on).

    -

    28.5.1 Typemaps you can write

    +

    29.5.1 Typemaps you can write

    There are many different types of typemap that can be written, the full list can be found in the "Typemaps" chapter. However the following are the most commonly used ones.

    @@ -1728,7 +1728,7 @@ ptr=nil -- the iMath* will be GC'ed as normal (the syntax for the typecheck is different from the typemap, see typemaps for details). -

    28.5.2 SWIG's Lua-C API

    +

    29.5.2 SWIG's Lua-C API

    This section explains the SWIG specific Lua-C API. It does not cover the main Lua-C api, as this is well documented and not worth covering.

    @@ -1777,7 +1777,7 @@ This macro, when called within the context of a SWIG wrapped function, will disp
    Similar to SWIG_fail_arg, except that it will display the swig_type_info information instead.
    -

    28.6 Customization of your Bindings

    +

    29.6 Customization of your Bindings

    @@ -1786,7 +1786,7 @@ This section covers adding of some small extra bits to your module to add the la -

    28.6.1 Writing your own custom wrappers

    +

    29.6.1 Writing your own custom wrappers

    @@ -1805,7 +1805,7 @@ int native_function(lua_State*L) // my native code The %native directive in the above example, tells SWIG that there is a function int native_function(lua_State*L); which is to be added into the module under the name 'my_func'. SWIG will not add any wrapper for this function, beyond adding it into the function table. How you write your code is entirely up to you.

    -

    28.6.2 Adding additional Lua code

    +

    29.6.2 Adding additional Lua code

    @@ -1843,7 +1843,7 @@ Good uses for this feature is adding of new code, or writing helper functions to See Examples/lua/arrays for an example of this code.

    -

    28.7 Details on the Lua binding

    +

    29.7 Details on the Lua binding

    @@ -1854,7 +1854,7 @@ See Examples/lua/arrays for an example of this code.

    -

    28.7.1 Binding global data into the module.

    +

    29.7.1 Binding global data into the module.

    @@ -1914,7 +1914,7 @@ end

    That way when you call 'a=example.Foo', the interpreter looks at the table 'example' sees that there is no field 'Foo' and calls __index. This will in turn check in '.get' table and find the existence of 'Foo' and then return the value of the C function call 'Foo_get()'. Similarly for the code 'example.Foo=10', the interpreter will check the table, then call the __newindex which will then check the '.set' table and call the C function 'Foo_set(10)'.

    -

    28.7.2 Userdata and Metatables

    +

    29.7.2 Userdata and Metatables

    @@ -1994,7 +1994,7 @@ Note: Both the opaque structures (like the FILE*) and normal wrapped classes/str

    Note: Operator overloads are basically done in the same way, by adding functions such as '__add' & '__call' to the class' metatable. The current implementation is a bit rough as it will add any member function beginning with '__' into the metatable too, assuming its an operator overload.

    -

    28.7.3 Memory management

    +

    29.7.3 Memory management

    diff --git a/Doc/Manual/Modules.html b/Doc/Manual/Modules.html index 7efd74e2b..b9b7b2b94 100644 --- a/Doc/Manual/Modules.html +++ b/Doc/Manual/Modules.html @@ -7,7 +7,7 @@ -

    19 Working with Modules

    +

    20 Working with Modules

    -

    37.3 External documentation

    +

    38.3 External documentation

    diff --git a/Doc/Manual/Ocaml.html b/Doc/Manual/Ocaml.html index 92b5260fe..4ae07e969 100644 --- a/Doc/Manual/Ocaml.html +++ b/Doc/Manual/Ocaml.html @@ -7,7 +7,7 @@ -

    38 SWIG and OCaml

    +

    39 SWIG and OCaml

    -

    38.1.3 The camlp4 module

    +

    39.1.3 The camlp4 module

    @@ -242,7 +242,7 @@ let b = C_string (getenv "PATH") -

    38.1.4 Using your module

    +

    39.1.4 Using your module

    @@ -256,7 +256,7 @@ option to build your functions into the primitive list. This option is not needed when you build native code.

    -

    38.1.5 Compilation problems and compiling with C++

    +

    39.1.5 Compilation problems and compiling with C++

    @@ -267,7 +267,7 @@ liberal with pointer types may not compile under the C++ compiler. Most code meant to be compiled as C++ will not have problems.

    -

    38.2 The low-level Ocaml/C interface

    +

    39.2 The low-level Ocaml/C interface

    @@ -367,7 +367,7 @@ value items pass through directly, but you must make your own type signature for a function that uses value in this way.

    -

    38.2.1 The generated module

    +

    39.2.1 The generated module

    @@ -401,7 +401,7 @@ it describes the output SWIG will generate for class definitions. -

    38.2.2 Enums

    +

    39.2.2 Enums

    @@ -464,7 +464,7 @@ val x : Enum_test.c_obj = C_enum `a

    -

    38.2.2.1 Enum typing in Ocaml

    +

    39.2.2.1 Enum typing in Ocaml

    @@ -477,10 +477,10 @@ functions imported from different modules. You must convert values to master values using the swig_val function before sharing them with another module.

    -

    38.2.3 Arrays

    +

    39.2.3 Arrays

    -

    38.2.3.1 Simple types of bounded arrays

    +

    39.2.3.1 Simple types of bounded arrays

    @@ -501,7 +501,7 @@ arrays of simple types with known bounds in your code, but this only works for arrays whose bounds are completely specified.

    -

    38.2.3.2 Complex and unbounded arrays

    +

    39.2.3.2 Complex and unbounded arrays

    @@ -514,7 +514,7 @@ SWIG can't predict which of these methods will be used in the array, so you have to specify it for yourself in the form of a typemap.

    -

    38.2.3.3 Using an object

    +

    39.2.3.3 Using an object

    @@ -528,7 +528,7 @@ Consider writing an object when the ending condition of your array is complex, such as using a required sentinel, etc.

    -

    38.2.3.4 Example typemap for a function taking float * and int

    +

    39.2.3.4 Example typemap for a function taking float * and int

    @@ -579,7 +579,7 @@ void printfloats( float *tab, int len ); -

    38.2.4 C++ Classes

    +

    39.2.4 C++ Classes

    @@ -622,7 +622,7 @@ the underlying pointer, so using create_[x]_from_ptr alters the returned value for the same object.

    -

    38.2.4.1 STL vector and string Example

    +

    39.2.4.1 STL vector and string Example

    @@ -702,7 +702,7 @@ baz # -

    38.2.4.2 C++ Class Example

    +

    39.2.4.2 C++ Class Example

    @@ -732,7 +732,7 @@ public: }; -

    38.2.4.3 Compiling the example

    +

    39.2.4.3 Compiling the example

    @@ -750,7 +750,7 @@ bash-2.05a$ ocamlmktop -custom swig.cmo -I `camlp4 -where` \
       -L$QTPATH/lib -cclib -lqt
     
    -

    38.2.4.4 Sample Session

    +

    39.2.4.4 Sample Session

    @@ -777,10 +777,10 @@ Assuming you have a working installation of QT, you will see a window
     containing the string "hi" in a button.
     

    -

    38.2.5 Director Classes

    +

    39.2.5 Director Classes

    -

    38.2.5.1 Director Introduction

    +

    39.2.5.1 Director Introduction

    @@ -807,7 +807,7 @@ class foo { };

    -

    38.2.5.2 Overriding Methods in Ocaml

    +

    39.2.5.2 Overriding Methods in Ocaml

    @@ -835,7 +835,7 @@ In this example, I'll examine the objective caml code involved in providing an overloaded class. This example is contained in Examples/ocaml/shapes.

    -

    38.2.5.3 Director Usage Example

    +

    39.2.5.3 Director Usage Example

    @@ -896,7 +896,7 @@ in a more effortless style in ocaml, while leaving the "engine" part of the program in C++.

    -

    38.2.5.4 Creating director objects

    +

    39.2.5.4 Creating director objects

    @@ -937,7 +937,7 @@ object from causing a core dump, as long as the object is destroyed properly.

    -

    38.2.5.5 Typemaps for directors, directorin, directorout, directorargout

    +

    39.2.5.5 Typemaps for directors, directorin, directorout, directorargout

    @@ -948,7 +948,7 @@ well as a function return value in the same way you provide function arguments, and to receive arguments the same way you normally receive function returns.

    -

    38.2.5.6 directorin typemap

    +

    39.2.5.6 directorin typemap

    @@ -959,7 +959,7 @@ code receives when you are called. In general, a simple directorin typ can use the same body as a simple out typemap.

    -

    38.2.5.7 directorout typemap

    +

    39.2.5.7 directorout typemap

    @@ -970,7 +970,7 @@ for the same type, except when there are special requirements for object ownership, etc.

    -

    38.2.5.8 directorargout typemap

    +

    39.2.5.8 directorargout typemap

    @@ -987,7 +987,7 @@ In the event that you don't specify all of the necessary values, integral values will read zero, and struct or object returns have undefined results.

    -

    38.2.6 Exceptions

    +

    39.2.6 Exceptions

    @@ -1075,7 +1075,7 @@ The language-independent exception.i library file can also be used to raise exceptions. See the SWIG Library chapter.

    -

    38.3 Documentation Features

    +

    39.3 Documentation Features

    @@ -1084,7 +1084,7 @@ comments (colloquially referred to as "docstrings") that can be read by OCamldoc.

    -

    38.3.1 Module docstring

    +

    39.3.1 Module docstring

    diff --git a/Doc/Manual/Octave.html b/Doc/Manual/Octave.html index bd6b08ff9..bdef5db7c 100644 --- a/Doc/Manual/Octave.html +++ b/Doc/Manual/Octave.html @@ -9,7 +9,7 @@ -

    29 SWIG and Octave

    +

    30 SWIG and Octave

      @@ -60,7 +60,7 @@ This chapter is intended to give an introduction to using the module. You should 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).

      -

      29.1 Preliminaries

      +

      30.1 Preliminaries

      @@ -76,7 +76,7 @@ This cannot be guaranteed however, as in recent times new Octave releases have r The SWIG runtime exports the function swig_octave_prereq() for checking the version of Octave.

      -

      29.2 Running SWIG

      +

      30.2 Running SWIG

      @@ -108,7 +108,7 @@ The -c++ 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.

      -

      29.2.1 Command-line options

      +

      30.2.1 Command-line options

      @@ -131,7 +131,7 @@ The special name "." loads C global variables into the module namespace, i.e. al The -opprefix options sets the prefix of the names of global/friend operator functions.

      -

      29.2.2 Compiling a dynamic module

      +

      30.2.2 Compiling a dynamic module

      @@ -158,7 +158,7 @@ $ mkoctfile example_wrap.cpp example.c

      octave:1> swigexample
      -

      29.2.3 Using your module

      +

      30.2.3 Using your module

      @@ -176,10 +176,10 @@ octave:4> swigexample.cvar.Foo=4; octave:5> swigexample.cvar.Foo ans = 4

    -

    29.3 A tour of basic C/C++ wrapping

    +

    30.3 A tour of basic C/C++ wrapping

    -

    29.3.1 Modules

    +

    30.3.1 Modules

    @@ -224,7 +224,7 @@ octave:4> swigexample.gcd(4, 6) ans = 2 -

    29.3.2 Functions

    +

    30.3.2 Functions

    @@ -241,7 +241,7 @@ int fact(int n);

    octave:1> swigexample.fact(4)
     24 
    -

    29.3.3 Global variables

    +

    30.3.3 Global variables

    @@ -294,7 +294,7 @@ octave:2> swigexample.PI=3.142; octave:3> swigexample.PI ans = 3.1420 -

    29.3.4 Constants and enums

    +

    30.3.4 Constants and enums

    @@ -316,7 +316,7 @@ swigexample.SCONST="Hello World" swigexample.SUNDAY=0 .... -

    29.3.5 Pointers

    +

    30.3.5 Pointers

    @@ -363,7 +363,7 @@ octave:2> 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 -

    29.3.6 Structures and C++ classes

    +

    30.3.6 Structures and C++ classes

    @@ -498,7 +498,7 @@ ans = 1 Depending on the ownership setting of a swig_ref, it may call C++ destructors when its reference count goes to zero. See the section on memory management below for details.

    -

    29.3.7 C++ inheritance

    +

    30.3.7 C++ inheritance

    @@ -507,7 +507,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 swig_ref.

    -

    29.3.8 C++ overloaded functions

    +

    30.3.8 C++ overloaded functions

    @@ -517,7 +517,7 @@ The dispatch function selects which overload to call (if any) based on the passe typecheck typemaps are used to analyze each argument, as well as assign precedence. See the chapter on typemaps for details.

    -

    29.3.9 C++ operators

    +

    30.3.9 C++ operators

    @@ -621,7 +621,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.

    -

    29.3.10 Class extension with %extend

    +

    30.3.10 Class extension with %extend

    @@ -660,7 +660,7 @@ Similarly, Octave can use the __float__ method to convert an object to Octave 3.8.0 and later versions will also map unary functions X() to the corresponding __X__ method, where X includes: abs(), acos(), acosh(), angle(), arg(), asin(), asinh(), atan(), atanh(), cbrt(), ceil(), conj(), cos(), cosh(), dawson(), erf(), erfc(), erfcinv(), erfcx(), erfi(), erfinv(), exp(), expm1(), finite(), fix(), floor(), gamma(), imag(), isalnum(), isalpha(), isascii(), iscntrl(), isdigit(), isgraph(), isinf(), islower(), isna(), isnan(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), lgamma(), log(), log10(), log1p(), log2(), real(), round(), roundb(), signbit(), signum(), sin(), sinh(), sqrt(), tan(), tanh(), toascii(), tolower(), toupper()

    -

    29.3.11 C++ templates

    +

    30.3.11 C++ templates

    @@ -737,10 +737,10 @@ ans = -

    29.3.12 C++ Smart Pointers

    +

    30.3.12 C++ Smart Pointers

    -

    29.3.12.1 The shared_ptr Smart Pointer

    +

    30.3.12.1 The shared_ptr Smart Pointer

    @@ -751,14 +751,14 @@ in the shared_ptr smart pointer -

    29.3.12.2 Generic Smart Pointers

    +

    30.3.12.2 Generic Smart Pointers

    C++ smart pointers are fully supported as in other modules.

    -

    29.3.13 Directors (calling Octave from C++ code)

    +

    30.3.13 Directors (calling Octave from C++ code)

    @@ -839,14 +839,14 @@ c-side routine called octave-side routine called -

    29.3.14 Threads

    +

    30.3.14 Threads

    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.

    -

    29.3.15 Memory management

    +

    30.3.15 Memory management

    @@ -880,14 +880,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/subclass()'ing).

    -

    29.3.16 STL support

    +

    30.3.16 STL support

    Various STL library files are provided for wrapping STL containers.

    -

    29.3.17 Matrix typemaps

    +

    30.3.17 Matrix typemaps

    diff --git a/Doc/Manual/Perl5.html b/Doc/Manual/Perl5.html index 766ccaede..1e7bd9f86 100644 --- a/Doc/Manual/Perl5.html +++ b/Doc/Manual/Perl5.html @@ -7,7 +7,7 @@ -

    30 SWIG and Perl5

    +

    31 SWIG and Perl5

    -

    30.2.2 Compiling a dynamic module

    +

    31.2.2 Compiling a dynamic module

    @@ -208,7 +208,7 @@ the target should be named `example.so', `example.sl', or the appropriate dynamic module name on your system.

    -

    30.2.3 Building a dynamic module with MakeMaker

    +

    31.2.3 Building a dynamic module with MakeMaker

    @@ -242,7 +242,7 @@ the preferred approach to compilation. More information about MakeMaker can be found in "Programming Perl, 2nd ed." by Larry Wall, Tom Christiansen, and Randal Schwartz.

    -

    30.2.4 Building a static version of Perl

    +

    31.2.4 Building a static version of Perl

    @@ -311,7 +311,7 @@ added to it. Depending on your machine, you may need to link with additional libraries such as -lsocket, -lnsl, -ldl, etc.

    -

    30.2.5 Using the module

    +

    31.2.5 Using the module

    @@ -464,7 +464,7 @@ system configuration (this requires root access and you will need to read the man pages).

    -

    30.2.6 Compilation problems and compiling with C++

    +

    31.2.6 Compilation problems and compiling with C++

    @@ -607,7 +607,7 @@ have to find the macro that conflicts and add an #undef into the .i file. Pleas any conflicting macros you find to swig-user mailing list.

    -

    30.2.7 Compiling for 64-bit platforms

    +

    31.2.7 Compiling for 64-bit platforms

    @@ -634,7 +634,7 @@ also introduce problems on platforms that support more than one linking standard (e.g., -o32 and -n32 on Irix).

    -

    30.3 Building Perl Extensions under Windows

    +

    31.3 Building Perl Extensions under Windows

    @@ -645,7 +645,7 @@ section assumes you are using SWIG with Microsoft Visual C++ although the procedure may be similar with other compilers.

    -

    30.3.1 Running SWIG from Developer Studio

    +

    31.3.1 Running SWIG from Developer Studio

    @@ -708,7 +708,7 @@ print "$a\n"; -

    30.3.2 Using other compilers

    +

    31.3.2 Using other compilers

    @@ -716,7 +716,7 @@ SWIG is known to work with Cygwin and may work with other compilers on Windows. For general hints and suggestions refer to the Windows chapter.

    -

    30.4 The low-level interface

    +

    31.4 The low-level interface

    @@ -726,7 +726,7 @@ can be used to control your application. However, it is also used to construct more user-friendly proxy classes as described in the next section.

    -

    30.4.1 Functions

    +

    31.4.1 Functions

    @@ -749,7 +749,7 @@ use example; $a = &example::fact(2); -

    30.4.2 Global variables

    +

    31.4.2 Global variables

    @@ -819,7 +819,7 @@ extern char *path; // Declared later in the input -

    30.4.3 Constants

    +

    31.4.3 Constants

    @@ -859,7 +859,7 @@ print example::FOO, "\n"; -

    30.4.4 Pointers

    +

    31.4.4 Pointers

    @@ -968,7 +968,7 @@ as XS and xsubpp. Given the advancement of the SWIG typesystem and the SWIG and XS, this is no longer supported.

    -

    30.4.5 Structures

    +

    31.4.5 Structures

    @@ -1102,7 +1102,7 @@ void Bar_f_set(Bar *b, Foo *val) { -

    30.4.6 C++ classes

    +

    31.4.6 C++ classes

    @@ -1167,7 +1167,7 @@ provides direct access to C++ objects. A higher level interface using Perl prox can be built using these low-level accessors. This is described shortly.

    -

    30.4.7 C++ classes and type-checking

    +

    31.4.7 C++ classes and type-checking

    @@ -1203,7 +1203,7 @@ If necessary, the type-checker also adjusts the value of the pointer (as is nece multiple inheritance is used).

    -

    30.4.8 C++ overloaded functions

    +

    31.4.8 C++ overloaded functions

    @@ -1247,7 +1247,7 @@ example::Spam_foo_d($s, 3.14); Please refer to the "SWIG Basics" chapter for more information.

    -

    30.4.9 Operators

    +

    31.4.9 Operators

    @@ -1274,7 +1274,7 @@ The following C++ operators are currently supported by the Perl module:

  • operator or
  • -

    30.4.10 Modules and packages

    +

    31.4.10 Modules and packages

    @@ -1369,7 +1369,7 @@ print Foo::fact(4), "\n"; # Call a function in package FooBar --> -

    30.5 Input and output parameters

    +

    31.5 Input and output parameters

    @@ -1588,7 +1588,7 @@ print "$c\n"; Note: The REFERENCE feature is only currently supported for numeric types (integers and floating point).

    -

    30.6 Exception handling

    +

    31.6 Exception handling

    @@ -1752,7 +1752,7 @@ This is still supported, but it is deprecated. The newer %exception di functionality, but it has additional capabilities that make it more powerful.

    -

    30.7 Remapping datatypes with typemaps

    +

    31.7 Remapping datatypes with typemaps

    @@ -1769,7 +1769,7 @@ Typemaps are only used if you want to change some aspect of the primitive C-Perl interface.

    -

    30.7.1 A simple typemap example

    +

    31.7.1 A simple typemap example

    @@ -1873,7 +1873,7 @@ example::count("e", "Hello World"); -

    30.7.2 Perl5 typemaps

    +

    31.7.2 Perl5 typemaps

    @@ -1978,7 +1978,7 @@ Return of C++ member data (all languages). Check value of input parameter. -

    30.7.3 Typemap variables

    +

    31.7.3 Typemap variables

    @@ -2049,7 +2049,7 @@ properly assigned. The Perl name of the wrapper function being created. -

    30.7.4 Useful functions

    +

    31.7.4 Useful functions

    @@ -2118,7 +2118,7 @@ int sv_isa(SV *, char *0; -

    30.8 Typemap Examples

    +

    31.8 Typemap Examples

    @@ -2127,7 +2127,7 @@ might look at the files "perl5.swg" and "typemaps.i" in the SWIG library.

    -

    30.8.1 Converting a Perl5 array to a char **

    +

    31.8.1 Converting a Perl5 array to a char **

    @@ -2219,7 +2219,7 @@ print @$b, "\n"; # Print it out -

    30.8.2 Return values

    +

    31.8.2 Return values

    @@ -2248,7 +2248,7 @@ can be done using the EXTEND() macro as in: } -

    30.8.3 Returning values from arguments

    +

    31.8.3 Returning values from arguments

    @@ -2302,7 +2302,7 @@ print "multout(7, 13) = @r\n"; ($x, $y) = multout(7, 13); -

    30.8.4 Accessing array structure members

    +

    31.8.4 Accessing array structure members

    @@ -2365,7 +2365,7 @@ the "in" typemap in the previous section would be used to convert an to copy the converted array into a C data structure.

    -

    30.8.5 Turning Perl references into C pointers

    +

    31.8.5 Turning Perl references into C pointers

    @@ -2430,7 +2430,7 @@ print "$c\n"; -

    30.8.6 Pointer handling

    +

    31.8.6 Pointer handling

    @@ -2515,7 +2515,7 @@ For example: -

    30.9 Proxy classes

    +

    31.9 Proxy classes

    @@ -2531,7 +2531,7 @@ to the underlying code. This section describes the implementation details of the proxy interface.

    -

    30.9.1 Preliminaries

    +

    31.9.1 Preliminaries

    @@ -2553,7 +2553,7 @@ SWIG creates a collection of high-level Perl wrappers. In your scripts, you wil high level wrappers. The wrappers, in turn, interact with the low-level procedural module.

    -

    30.9.2 Structure and class wrappers

    +

    31.9.2 Structure and class wrappers

    @@ -2680,7 +2680,7 @@ $v->DESTROY(); -

    30.9.3 Object Ownership

    +

    31.9.3 Object Ownership

    @@ -2767,7 +2767,7 @@ counting, garbage collection, or advanced features one might find in sophisticated languages.

    -

    30.9.4 Nested Objects

    +

    31.9.4 Nested Objects

    @@ -2820,7 +2820,7 @@ $p->{f}->{x} = 0.0; %${$p->{v}} = ( x=>0, y=>0, z=>0); -

    30.9.5 Proxy Functions

    +

    31.9.5 Proxy Functions

    @@ -2854,7 +2854,7 @@ This function replaces the original function, but operates in an identical manner.

    -

    30.9.6 Inheritance

    +

    31.9.6 Inheritance

    @@ -2930,7 +2930,7 @@ particular, inheritance of data members is extremely tricky (and I'm not even sure if it really works).

    -

    30.9.7 Modifying the proxy methods

    +

    31.9.7 Modifying the proxy methods

    @@ -2958,7 +2958,7 @@ public: }; -

    30.10 Adding additional Perl code

    +

    31.10 Adding additional Perl code

    @@ -3009,7 +3009,7 @@ set_transform($im, $a); -

    30.11 Cross language polymorphism

    +

    31.11 Cross language polymorphism

    @@ -3043,7 +3043,7 @@ proxy classes, director classes, and C wrapper functions takes care of all the cross-language method routing transparently.

    -

    30.11.1 Enabling directors

    +

    31.11.1 Enabling directors

    @@ -3133,7 +3133,7 @@ sub one { -

    30.11.2 Director classes

    +

    31.11.2 Director classes

    @@ -3214,7 +3214,7 @@ so there is no need for the extra overhead involved with routing the calls through Perl.

    -

    30.11.3 Ownership and object destruction

    +

    31.11.3 Ownership and object destruction

    @@ -3263,7 +3263,7 @@ sub DESTROY { -

    30.11.4 Exception unrolling

    +

    31.11.4 Exception unrolling

    @@ -3319,7 +3319,7 @@ Swig::DirectorMethodException is thrown, Perl will register the exception as soon as the C wrapper function returns.

    -

    30.11.5 Overhead and code bloat

    +

    31.11.5 Overhead and code bloat

    @@ -3353,7 +3353,7 @@ directive) for only those methods that are likely to be extended in Perl.

    -

    30.11.6 Typemaps

    +

    31.11.6 Typemaps

    diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html index d0ec0df7f..09c514e94 100644 --- a/Doc/Manual/Php.html +++ b/Doc/Manual/Php.html @@ -7,7 +7,7 @@ -

    31 SWIG and PHP

    +

    32 SWIG and PHP

    -

    31.1.2 Using PHP Extensions

    +

    32.1.2 Using PHP Extensions

    @@ -182,7 +182,7 @@ This PHP module also defines the PHP classes for the wrapped API, so you'll almost certainly want to include it anyway.

    -

    31.2 Basic PHP interface

    +

    32.2 Basic PHP interface

    @@ -194,7 +194,7 @@ SWIG doesn't have support for generating wrappers which make use of PHP's namespace feature.

    -

    31.2.1 Constants

    +

    32.2.1 Constants

    @@ -273,7 +273,7 @@ is treated as true by the if test, when the value of the intended constant would be treated as false!

    -

    31.2.2 Global Variables

    +

    32.2.2 Global Variables

    @@ -322,7 +322,7 @@ undefined. At this time SWIG does not support custom accessor methods.

    -

    31.2.3 Functions

    +

    32.2.3 Functions

    @@ -375,7 +375,7 @@ print $s; # The value of $s was not changed. --> -

    31.2.4 Overloading

    +

    32.2.4 Overloading

    @@ -430,7 +430,7 @@ taking the integer argument.

    --> -

    31.2.5 Pointers and References

    +

    32.2.5 Pointers and References

    @@ -568,7 +568,7 @@ PHP in a number of ways: by using unset on an existing variable, or assigning NULL to a variable.

    -

    31.2.6 Structures and C++ classes

    +

    32.2.6 Structures and C++ classes

    @@ -629,7 +629,7 @@ Would be used in the following way from PHP: Member variables and methods are accessed using the -> operator.

    -

    31.2.6.1 Using -noproxy

    +

    32.2.6.1 Using -noproxy

    @@ -655,7 +655,7 @@ Complex_im_set($obj, $d); Complex_im_get($obj); -

    31.2.6.2 Constructors and Destructors

    +

    32.2.6.2 Constructors and Destructors

    @@ -696,7 +696,7 @@ the programmer can either reassign the variable or call unset($v)

    -

    31.2.6.3 Static Member Variables

    +

    32.2.6.3 Static Member Variables

    @@ -739,7 +739,7 @@ Ko::threats(10); echo "There have now been " . Ko::threats() . " threats\n"; -

    31.2.6.4 Static Member Functions

    +

    32.2.6.4 Static Member Functions

    @@ -761,7 +761,7 @@ Ko::threats(); -

    31.2.6.5 Specifying Implemented Interfaces

    +

    32.2.6.5 Specifying Implemented Interfaces

    @@ -779,7 +779,7 @@ so: If there are multiple interfaces, just list them separated by commas.

    -

    31.2.7 PHP Pragmas, Startup and Shutdown code

    +

    32.2.7 PHP Pragmas, Startup and Shutdown code

    @@ -876,7 +876,7 @@ The %rinit and %rshutdown statements are very similar but inse into the request init (PHP_RINIT_FUNCTION) and request shutdown (PHP_RSHUTDOWN_FUNCTION) code respectively.

    -

    31.3 Cross language polymorphism

    +

    32.3 Cross language polymorphism

    @@ -911,7 +911,7 @@ wrapper functions takes care of all the cross-language method routing transparently.

    -

    31.3.1 Enabling directors

    +

    32.3.1 Enabling directors

    @@ -1000,7 +1000,7 @@ class MyFoo extends Foo { -

    31.3.2 Director classes

    +

    32.3.2 Director classes

    @@ -1081,7 +1081,7 @@ so there is no need for the extra overhead involved with routing the calls through PHP.

    -

    31.3.3 Ownership and object destruction

    +

    32.3.3 Ownership and object destruction

    @@ -1137,7 +1137,7 @@ In this example, we are assuming that FooContainer will take care of deleting all the Foo pointers it contains at some point.

    -

    31.3.4 Exception unrolling

    +

    32.3.4 Exception unrolling

    @@ -1204,7 +1204,7 @@ Swig::DirectorMethodException is thrown, PHP will register the exception as soon as the C wrapper function returns.

    -

    31.3.5 Overhead and code bloat

    +

    32.3.5 Overhead and code bloat

    @@ -1237,7 +1237,7 @@ optimized by selectively enabling director methods (using the %feature directive) for only those methods that are likely to be extended in PHP.

    -

    31.3.6 Typemaps

    +

    32.3.6 Typemaps

    @@ -1251,7 +1251,7 @@ need to be supported.

    -

    31.3.7 Miscellaneous

    +

    32.3.7 Miscellaneous

    Director typemaps for STL classes are mostly in place, and hence you diff --git a/Doc/Manual/Preprocessor.html b/Doc/Manual/Preprocessor.html index 3d1bb453e..63ee2c2d6 100644 --- a/Doc/Manual/Preprocessor.html +++ b/Doc/Manual/Preprocessor.html @@ -7,7 +7,7 @@ -

    10 Preprocessing

    +

    11 Preprocessing

      @@ -38,7 +38,7 @@ However, a number of modifications and enhancements have been made. This chapter describes some of these modifications.

      -

      10.1 File inclusion

      +

      11.1 File inclusion

      @@ -64,7 +64,7 @@ By default, the #include is ignored unless you run SWIG with the is that you often don't want SWIG to try and wrap everything included in standard header system headers and auxiliary files. -

      10.2 File imports

      +

      11.2 File imports

      @@ -93,7 +93,7 @@ The -importall directive tells SWIG to follow all #include sta as imports. This might be useful if you want to extract type definitions from system header files without generating any wrappers. -

      10.3 Conditional Compilation

      +

      11.3 Conditional Compilation

      @@ -151,7 +151,7 @@ SWIG (except for the symbol `SWIG' which is only defined within the SWIG compiler).

      -

      10.4 Macro Expansion

      +

      11.4 Macro Expansion

      @@ -206,7 +206,7 @@ like #x. This is a non-standard SWIG extension.

    -

    10.5 SWIG Macros

    +

    11.5 SWIG Macros

    @@ -252,7 +252,7 @@ many of SWIG's advanced features and libraries are built using this mechanism (s support).

    -

    10.6 C99 and GNU Extensions

    +

    11.6 C99 and GNU Extensions

    @@ -308,14 +308,14 @@ interface building. However, they are used internally to implement a number of SWIG directives and are provided to make SWIG more compatible with C99 code.

    -

    10.7 Preprocessing and delimiters

    +

    11.7 Preprocessing and delimiters

    The preprocessor handles { }, " " and %{ %} delimiters differently.

    -

    10.7.1 Preprocessing and %{ ... %} & " ... " delimiters

    +

    11.7.1 Preprocessing and %{ ... %} & " ... " delimiters

    @@ -340,7 +340,7 @@ the contents of the %{ ... %} block are copied without modification to the output (including all preprocessor directives).

    -

    10.7.2 Preprocessing and { ... } delimiters

    +

    11.7.2 Preprocessing and { ... } delimiters

    @@ -382,7 +382,7 @@ to actually go into the wrapper file, prefix the preprocessor directives with % and leave the preprocessor directive in the code.

    -

    10.8 Preprocessor and Typemaps

    +

    11.8 Preprocessor and Typemaps

    @@ -453,7 +453,7 @@ would generate

    -

    10.9 Viewing preprocessor output

    +

    11.9 Viewing preprocessor output

    @@ -463,7 +463,7 @@ Instead the results after the preprocessor has run are displayed. This might be useful as an aid to debugging and viewing the results of macro expansions.

    -

    10.10 The #error and #warning directives

    +

    11.10 The #error and #warning directives

    diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html index ee443be53..fd07301d4 100644 --- a/Doc/Manual/Python.html +++ b/Doc/Manual/Python.html @@ -7,7 +7,7 @@ -

    32 SWIG and Python

    +

    33 SWIG and Python

    -

    32.3.3 Global variables

    +

    33.3.3 Global variables

    @@ -1158,7 +1158,7 @@ that starts with a leading underscore. SWIG does not create cvar if there are no global variables in a module.

    -

    32.3.4 Constants and enums

    +

    33.3.4 Constants and enums

    @@ -1198,7 +1198,7 @@ other object. Unfortunately, there is no easy way for SWIG to generate code that prevents this. You will just have to be careful.

    -

    32.3.5 Pointers

    +

    33.3.5 Pointers

    @@ -1339,7 +1339,7 @@ C-style cast may return a bogus result whereas as the C++-style cast will return None if the conversion can't be performed.

    -

    32.3.6 Structures

    +

    33.3.6 Structures

    @@ -1549,7 +1549,7 @@ memory and use of it results in a segfault or some sort of other undefined behav

    -

    32.3.7 C++ classes

    +

    33.3.7 C++ classes

    @@ -1637,7 +1637,7 @@ they are accessed through cvar like this: -

    32.3.8 C++ inheritance

    +

    33.3.8 C++ inheritance

    @@ -1692,7 +1692,7 @@ then the function spam() accepts Foo * or a pointer to any cla It is safe to use multiple inheritance with SWIG.

    -

    32.3.9 Pointers, references, values, and arrays

    +

    33.3.9 Pointers, references, values, and arrays

    @@ -1753,7 +1753,7 @@ treated as a returning value, and it will follow the same allocation/deallocation process.

    -

    32.3.10 C++ overloaded functions

    +

    33.3.10 C++ overloaded functions

    @@ -1876,7 +1876,7 @@ first declaration takes precedence. Please refer to the "SWIG and C++" chapter for more information about overloading.

    -

    32.3.11 C++ operators

    +

    33.3.11 C++ operators

    @@ -1973,7 +1973,7 @@ instead of raising an exception when the comparison fails, that is, on any kind This follows the guidelines in PEP 207 - Rich Comparisons and NotImplemented Python constant.

    -

    32.3.12 C++ namespaces

    +

    33.3.12 C++ namespaces

    @@ -2040,7 +2040,7 @@ utilizes thousands of small deeply nested namespaces each with identical symbol names, well, then you get what you deserve.

    -

    32.3.13 C++ templates

    +

    33.3.13 C++ templates

    @@ -2094,10 +2094,10 @@ Some more complicated examples will appear later.

    -

    32.3.14 C++ Smart Pointers

    +

    33.3.14 C++ Smart Pointers

    -

    32.3.14.1 The shared_ptr Smart Pointer

    +

    33.3.14.1 The shared_ptr Smart Pointer

    @@ -2108,7 +2108,7 @@ in the shared_ptr smart pointer -

    32.3.14.2 Generic Smart Pointers

    +

    33.3.14.2 Generic Smart Pointers

    @@ -2192,7 +2192,7 @@ simply use the __deref__() method. For example: -

    32.3.15 C++ reference counted objects

    +

    33.3.15 C++ reference counted objects

    @@ -2201,7 +2201,7 @@ Python examples of memory management using referencing counting.

    -

    32.4 Further details on the Python class interface

    +

    33.4 Further details on the Python class interface

    @@ -2224,7 +2224,7 @@ the -builtin option are in the Built-in section.

    -

    32.4.1 Proxy classes

    +

    33.4.1 Proxy classes

    @@ -2313,7 +2313,7 @@ you can attach new Python methods to the class and you can even inherit from it by Python built-in types until Python 2.2).

    -

    32.4.2 Built-in Types

    +

    33.4.2 Built-in Types

    @@ -2357,7 +2357,7 @@ please refer to the Python documentation:

    https://docs.python.org/3/extending/newtypes.html

    -

    32.4.2.1 Limitations

    +

    33.4.2.1 Limitations

    Use of the -builtin option implies a couple of limitations: @@ -2518,7 +2518,7 @@ assert(issubclass(B.Derived, A.Base)) -

    32.4.2.2 Operator overloads and slots -- use them!

    +

    33.4.2.2 Operator overloads and slots -- use them!

    The entire justification for the -builtin option is improved @@ -2678,7 +2678,7 @@ in the file python/pyopers.swig in the SWIG library.

    -

    32.4.3 Memory management

    +

    33.4.3 Memory management

    NOTE: Although this section refers to proxy objects, everything here also applies @@ -2873,7 +2873,7 @@ It is also possible to deal with situations like this using typemaps--an advanced topic discussed later.

    -

    32.5 Cross language polymorphism

    +

    33.5 Cross language polymorphism

    @@ -2907,7 +2907,7 @@ proxy classes, director classes, and C wrapper functions takes care of all the cross-language method routing transparently.

    -

    32.5.1 Enabling directors

    +

    33.5.1 Enabling directors

    @@ -2999,7 +2999,7 @@ class MyFoo(mymodule.Foo): -

    32.5.2 Director classes

    +

    33.5.2 Director classes

    @@ -3079,7 +3079,7 @@ so there is no need for the extra overhead involved with routing the calls through Python.

    -

    32.5.3 Ownership and object destruction

    +

    33.5.3 Ownership and object destruction

    @@ -3146,7 +3146,7 @@ deleting all the Foo pointers it contains at some point. Note that no hard references to the Foo objects remain in Python.

    -

    32.5.4 Exception unrolling

    +

    33.5.4 Exception unrolling

    @@ -3205,7 +3205,7 @@ Swig::DirectorMethodException is thrown, Python will register the exception as soon as the C wrapper function returns.

    -

    32.5.5 Overhead and code bloat

    +

    33.5.5 Overhead and code bloat

    @@ -3239,7 +3239,7 @@ directive) for only those methods that are likely to be extended in Python.

    -

    32.5.6 Typemaps

    +

    33.5.6 Typemaps

    @@ -3253,7 +3253,7 @@ need to be supported.

    -

    32.5.7 Miscellaneous

    +

    33.5.7 Miscellaneous

    @@ -3300,7 +3300,7 @@ methods that return const references.

    -

    32.6 Common customization features

    +

    33.6 Common customization features

    @@ -3313,7 +3313,7 @@ This section describes some common SWIG features that are used to improve your the interface to an extension module.

    -

    32.6.1 C/C++ helper functions

    +

    33.6.1 C/C++ helper functions

    @@ -3394,7 +3394,7 @@ hard to implement. It is possible to clean this up using Python code, typemaps, customization features as covered in later sections.

    -

    32.6.2 Adding additional Python code

    +

    33.6.2 Adding additional Python code

    @@ -3650,7 +3650,7 @@ The same applies for overloaded constructors.

    -

    32.6.3 Class extension with %extend

    +

    33.6.3 Class extension with %extend

    @@ -3739,7 +3739,7 @@ Vector(12, 14, 16) in any way---the extensions only show up in the Python interface.

    -

    32.6.4 Exception handling with %exception

    +

    33.6.4 Exception handling with %exception

    @@ -3873,10 +3873,10 @@ The language-independent exception.i library file can also be used to raise exceptions. See the SWIG Library chapter.

    -

    32.6.5 Optimization options

    +

    33.6.5 Optimization options

    -

    32.6.5.1 -fastproxy

    +

    33.6.5.1 -fastproxy

    @@ -4009,7 +4009,7 @@ While this possibly provides the best of both worlds, the time to import the mod The command line options mentioned above also apply to wrapped C/C++ global functions, not just class methods.

    -

    32.7 Tips and techniques

    +

    33.7 Tips and techniques

    @@ -4019,7 +4019,7 @@ strings, binary data, and arrays. This chapter discusses the common techniques solving these problems.

    -

    32.7.1 Input and output parameters

    +

    33.7.1 Input and output parameters

    @@ -4232,7 +4232,7 @@ void foo(Bar *OUTPUT); may not have the intended effect since typemaps.i does not define an OUTPUT rule for Bar.

    -

    32.7.2 Simple pointers

    +

    33.7.2 Simple pointers

    @@ -4301,7 +4301,7 @@ If you replace %pointer_functions() by %pointer_class(type, name)SWIG Library chapter for further details.

    -

    32.7.3 Unbounded C Arrays

    +

    33.7.3 Unbounded C Arrays

    @@ -4363,7 +4363,7 @@ well suited for applications in which you need to create buffers, package binary data, etc.

    -

    32.7.4 String handling

    +

    33.7.4 String handling

    @@ -4433,7 +4433,7 @@ also be used to extra binary data from arbitrary pointers.

    -

    32.7.5 Default arguments

    +

    33.7.5 Default arguments

    @@ -4532,7 +4532,7 @@ Versions of SWIG prior to this varied in their ability to convert C++ default va equivalent Python default argument values.

    -

    32.8 Typemaps

    +

    33.8 Typemaps

    @@ -4549,7 +4549,7 @@ Typemaps are only used if you want to change some aspect of the primitive C-Python interface or if you want to elevate your guru status.

    -

    32.8.1 What is a typemap?

    +

    33.8.1 What is a typemap?

    @@ -4665,7 +4665,7 @@ parameter is omitted): -

    32.8.2 Python typemaps

    +

    33.8.2 Python typemaps

    @@ -4706,7 +4706,7 @@ a look at the SWIG library version 1.3.20 or so.

    -

    32.8.3 Typemap variables

    +

    33.8.3 Typemap variables

    @@ -4777,7 +4777,7 @@ properly assigned. The Python name of the wrapper function being created. -

    32.8.4 Useful Python Functions

    +

    33.8.4 Useful Python Functions

    @@ -4905,7 +4905,7 @@ write me -

    32.9 Typemap Examples

    +

    33.9 Typemap Examples

    @@ -4914,7 +4914,7 @@ might look at the files "python.swg" and "typemaps.i" in the SWIG library.

    -

    32.9.1 Converting Python list to a char **

    +

    33.9.1 Converting Python list to a char **

    @@ -4994,7 +4994,7 @@ memory allocation is used to allocate memory for the array, the the C function.

    -

    32.9.2 Expanding a Python object into multiple arguments

    +

    33.9.2 Expanding a Python object into multiple arguments

    @@ -5113,7 +5113,7 @@ TypeError: Wrong number or type of arguments for overloaded function 'foo'. -

    32.9.3 Using typemaps to return arguments

    +

    33.9.3 Using typemaps to return arguments

    @@ -5201,7 +5201,7 @@ function can now be used as follows: >>> -

    32.9.4 Mapping Python tuples into small arrays

    +

    33.9.4 Mapping Python tuples into small arrays

    @@ -5250,7 +5250,7 @@ array, such an approach would not be recommended for huge arrays, but for small structures, this approach works fine.

    -

    32.9.5 Mapping sequences to C arrays

    +

    33.9.5 Mapping sequences to C arrays

    @@ -5339,7 +5339,7 @@ static int convert_darray(PyObject *input, double *ptr, int size) { -

    32.9.6 Pointer handling

    +

    33.9.6 Pointer handling

    @@ -5436,7 +5436,7 @@ that has a this attribute. In addition, class object (if applicable).

    -

    32.9.7 Memory management when returning references to member variables

    +

    33.9.7 Memory management when returning references to member variables

    @@ -5597,7 +5597,7 @@ static PyObject *bike_reference() { -

    32.10 Docstring Features

    +

    33.10 Docstring Features

    @@ -5625,7 +5625,7 @@ of your users much simpler.

    -

    32.10.1 Module docstring

    +

    33.10.1 Module docstring

    @@ -5659,7 +5659,7 @@ layout of controls on a panel, etc. to be loaded from an XML file." -

    32.10.2 %feature("autodoc")

    +

    33.10.2 %feature("autodoc")

    @@ -5687,7 +5687,7 @@ four levels for autodoc controlled by the value given to the feature, %feature("autodoc", "level"). The four values for level are covered in the following sub-sections. -

    32.10.2.1 %feature("autodoc", "0")

    +

    33.10.2.1 %feature("autodoc", "0")

    @@ -5716,7 +5716,7 @@ def function_name(*args, **kwargs): -

    32.10.2.2 %feature("autodoc", "1")

    +

    33.10.2.2 %feature("autodoc", "1")

    @@ -5741,7 +5741,7 @@ def function_name(*args, **kwargs): -

    32.10.2.3 %feature("autodoc", "2")

    +

    33.10.2.3 %feature("autodoc", "2")

    @@ -5803,7 +5803,7 @@ def function_name(*args, **kwargs): -

    32.10.2.4 %feature("autodoc", "3")

    +

    33.10.2.4 %feature("autodoc", "3")

    @@ -5829,7 +5829,7 @@ def function_name(*args, **kwargs): -

    32.10.2.5 %feature("autodoc", "docstring")

    +

    33.10.2.5 %feature("autodoc", "docstring")

    @@ -5848,7 +5848,7 @@ void GetPosition(int* OUTPUT, int* OUTPUT); -

    32.10.3 %feature("docstring")

    +

    33.10.3 %feature("docstring")

    @@ -5880,7 +5880,7 @@ with more than one line. -

    32.11 Python Packages

    +

    33.11 Python Packages

    Python has concepts of modules and packages. Modules are separate units of @@ -5954,7 +5954,7 @@ users may need to use special features such as the package option in th %module directive or import related command line options. These are explained in the following sections.

    -

    32.11.1 Setting the Python package

    +

    33.11.1 Setting the Python package

    @@ -6008,7 +6008,7 @@ pkg1/pkg2/_foo.so # (shared library built from C/C++ code generated by SWI -

    32.11.2 Absolute and relative imports

    +

    33.11.2 Absolute and relative imports

    Suppose, we have the following hierarchy of files:

    @@ -6145,7 +6145,7 @@ uses relative imports. Second case is, when one puts import directives in __init__.py to import symbols from submodules or subpackages and the submodule depends on other submodules (discussed later).

    -

    32.11.3 Enforcing absolute import semantics

    +

    33.11.3 Enforcing absolute import semantics

    As you may know, there is an incompatibility in import semantics (for the @@ -6182,7 +6182,7 @@ from __future__ import absolute_import -

    32.11.4 Importing from __init__.py

    +

    33.11.4 Importing from __init__.py

    Imports in __init__.py are handy when you want to populate a @@ -6292,7 +6292,7 @@ class Bar(pkg3.foo.Foo): pass effect (note, that the Python 2 case also needs the -relativeimport workaround).

    -

    32.11.5 Implicit namespace packages

    +

    33.11.5 Implicit namespace packages

    Python 3.3 introduced @@ -6370,7 +6370,7 @@ zipimporter requires python-3.5.1 or newer to work with subpackages.

    -

    32.11.6 Location of modules

    +

    33.11.6 Location of modules

    @@ -6406,7 +6406,7 @@ The following sub-sections look more closely at the two default configurations a An input interface file, foo.i, results in the two modules foo.py and _foo.so for each of the configurations.

    -

    32.11.6.1 Both modules in the same package

    +

    33.11.6.1 Both modules in the same package

    @@ -6441,7 +6441,7 @@ from mypackage import foo -

    32.11.6.2 Both modules are global

    +

    33.11.6.2 Both modules are global

    @@ -6473,7 +6473,7 @@ import foo -

    32.11.6.3 Split modules custom configuration

    +

    33.11.6.3 Split modules custom configuration

    In this non-standard 'split module' configuration, the pure Python module is in a package and the low level C/C++ module is global. @@ -6523,7 +6523,7 @@ Using one of the two default configurations is the recommended approach now.

    -

    32.11.6.4 More on customizing the module import code

    +

    33.11.6.4 More on customizing the module import code

    @@ -6643,7 +6643,7 @@ The following will do this for the 32.11.6.5 Statically linked C modules +

    33.11.6.5 Statically linked C modules

    It is strongly recommended to use dynamically linked modules for the C @@ -6715,7 +6715,7 @@ module then you will either need to refer to the Python documentation on how to do this (remember you are now the Python importer) or use dynamic linking.

    -

    32.12 Python 3 Support

    +

    33.12 Python 3 Support

    @@ -6740,7 +6740,7 @@ The following are Python 3 new features that are currently supported by SWIG.

    -

    32.12.1 Function annotation

    +

    33.12.1 Function annotation

    @@ -6773,7 +6773,7 @@ For detailed usage of function annotation, see PEP 3107.

    -

    32.12.2 Buffer interface

    +

    33.12.2 Buffer interface

    @@ -6925,7 +6925,7 @@ modify the buffer. -

    32.12.3 Abstract base classes

    +

    33.12.3 Abstract base classes

    @@ -6975,7 +6975,7 @@ The collections.abc module was introduced in Python 3.3 and hence this requires Python 3.3 or later.

    -

    32.12.4 Byte string output conversion

    +

    33.12.4 Byte string output conversion

    @@ -7156,7 +7156,7 @@ overloads taking both std::string (as Python bytes) and std::wstring (as Python unicode).

    -

    32.12.5 Python 2 Unicode

    +

    33.12.5 Python 2 Unicode

    @@ -7228,7 +7228,7 @@ the first is allowing unicode conversion and the second is explicitly prohibiting it.

    -

    32.13 Support for Multithreaded Applications

    +

    33.13 Support for Multithreaded Applications

    By default, SWIG does not enable support for multithreaded Python applications. More @@ -7243,7 +7243,7 @@ will not be able to run any other threads, even if the wrapped C/C++ code is wai interface for this is described in the next section.

    -

    32.13.1 UI for Enabling Multithreading Support

    +

    33.13.1 UI for Enabling Multithreading Support

    The user interface is as follows:

    @@ -7286,7 +7286,7 @@ will not be able to run any other threads, even if the wrapped C/C++ code is wai -

    32.13.2 Multithread Performance

    +

    33.13.2 Multithread Performance

    diff --git a/Doc/Manual/R.html b/Doc/Manual/R.html index 373cd7ed9..6547ab128 100644 --- a/Doc/Manual/R.html +++ b/Doc/Manual/R.html @@ -7,7 +7,7 @@ -

    33 SWIG and R

    +

    34 SWIG and R

      @@ -36,7 +36,7 @@ compile and run an R interface to QuantLib running on Mandriva Linux with gcc. The R bindings also work on Microsoft Windows using Visual C++.

      -

      33.1 Bugs

      +

      34.1 Bugs

      @@ -48,7 +48,7 @@ Currently the following features are not implemented or broken:

    • C Array wrappings
    -

    33.2 Using R and SWIG

    +

    34.2 Using R and SWIG

    @@ -138,7 +138,7 @@ Error in .Call("R_swig_fact", s_arg1, as.logical(.copy), PACKAGE = "example") :

  • Make sure the architecture of the shared library(x64 for instance), matches the architecture of the R program you want to load your shared library into -

    33.3 Precompiling large R files

    +

    34.3 Precompiling large R files

    @@ -160,7 +160,7 @@ will save a large amount of loading time. -

    33.4 General policy

    +

    34.4 General policy

    @@ -169,7 +169,7 @@ wrapping over the underlying functions and rely on the R type system to provide R syntax.

    -

    33.5 Language conventions

    +

    34.5 Language conventions

    @@ -178,7 +178,7 @@ and [ are overloaded to allow for R syntax (one based indices and slices)

    -

    33.6 C++ classes

    +

    34.6 C++ classes

    @@ -190,7 +190,7 @@ keep track of the pointer object which removes the necessity for a lot of the proxy class baggage you see in other languages.

    -

    33.7 Enumerations

    +

    34.7 Enumerations

    diff --git a/Doc/Manual/Ruby.html b/Doc/Manual/Ruby.html index 6939a8a18..5581cc458 100644 --- a/Doc/Manual/Ruby.html +++ b/Doc/Manual/Ruby.html @@ -8,7 +8,7 @@ -

    34 SWIG and Ruby

    +

    35 SWIG and Ruby

      @@ -149,7 +149,7 @@

      This chapter describes SWIG's support of Ruby.

      -

      34.1 Preliminaries

      +

      35.1 Preliminaries

      SWIG 4.0 is known to work with Ruby versions 1.9 and later. @@ -164,7 +164,7 @@ read the "SWIG Basics" chapter. It is also assumed that the reader has a basic understanding of Ruby.

      -

      34.1.1 Running SWIG

      +

      35.1.1 Running SWIG

      To build a Ruby module, run SWIG using the -ruby @@ -188,7 +188,7 @@ if compiling a C++ extension) that contains all of the code needed to build a Ruby extension module. To finish building the module, you need to compile this file and link it with the rest of your program.

      -

      34.1.2 Getting the right header files

      +

      35.1.2 Getting the right header files

      In order to compile the wrapper code, the compiler needs the ruby.h @@ -202,7 +202,7 @@ the compiler options needed to compile the code is to ask Ruby itself:

    -

    34.1.3 Compiling a dynamic module

    +

    35.1.3 Compiling a dynamic module

    Ruby extension modules are typically compiled into shared @@ -275,7 +275,7 @@ manual pages for your compiler and linker to determine the correct set of options. You might also check the SWIG Wiki for additional information.

    -

    34.1.4 Using your module

    +

    35.1.4 Using your module

    Ruby module names must be capitalized, @@ -305,7 +305,7 @@ begins with:

    will result in an extension module using the feature name "example" and Ruby module name "Example".

    -

    34.1.5 Static linking

    +

    35.1.5 Static linking

    An alternative approach to dynamic linking is to rebuild the @@ -320,7 +320,7 @@ finding the Ruby source, adding an entry to the ext/Setup file, adding your directory to the list of extensions in the file, and finally rebuilding Ruby.

    -

    34.1.6 Compilation of C++ extensions

    +

    35.1.6 Compilation of C++ extensions

    On most machines, C++ extension modules should be linked @@ -352,7 +352,7 @@ $libs = append_library($libs, "supc++") create_makefile('example')

  • -

    34.2 Building Ruby Extensions under Windows 95/NT

    +

    35.2 Building Ruby Extensions under Windows 95/NT

    Building a SWIG extension to Ruby under Windows 95/NT is @@ -377,7 +377,7 @@ order to build extensions, you may need to download the source distribution to the Ruby package, as you will need the Ruby header files.

    -

    34.2.1 Running SWIG from Developer Studio

    +

    35.2.1 Running SWIG from Developer Studio

    If you are developing your application within Microsoft @@ -441,13 +441,13 @@ Foo = 3.0 -

    34.3 The Ruby-to-C/C++ Mapping

    +

    35.3 The Ruby-to-C/C++ Mapping

    This section describes the basics of how SWIG maps C or C++ declarations in your SWIG interface files to Ruby constructs.

    -

    34.3.1 Modules

    +

    35.3.1 Modules

    The SWIG %module directive specifies @@ -519,7 +519,7 @@ option to wrap everything into the global module, take care that the names of your constants, classes and methods don't conflict with any of Ruby's built-in names.

    -

    34.3.2 Functions

    +

    35.3.2 Functions

    Global functions are wrapped as Ruby module methods. For @@ -553,7 +553,7 @@ irb(main):002:0> Example.fact(4) 24 -

    34.3.3 Variable Linking

    +

    35.3.3 Variable Linking

    C/C++ global variables are wrapped as a pair of singleton @@ -633,7 +633,7 @@ irb(main):004:0> $Variable2 41.2 -

    34.3.4 Constants

    +

    35.3.4 Constants

    C/C++ constants are wrapped as module constants initialized @@ -661,7 +661,7 @@ irb(main):002:0> Example::PI 3.14159 -

    34.3.5 Pointers

    +

    35.3.5 Pointers

    "Opaque" pointers to arbitrary C/C++ types (i.e. types that @@ -685,7 +685,7 @@ returns an instance of an internally generated Ruby class:

    A NULL pointer is always represented by the Ruby nil object.

    -

    34.3.6 Structures

    +

    35.3.6 Structures

    C/C++ structs are wrapped as Ruby classes, with accessor @@ -790,7 +790,7 @@ void Bar_f_set(Bar *b, Foo *val) { } -

    34.3.7 C++ classes

    +

    35.3.7 C++ classes

    Like structs, C++ classes are wrapped by creating a new Ruby @@ -845,7 +845,7 @@ Ale 3 -

    34.3.8 C++ Inheritance

    +

    35.3.8 C++ Inheritance

    The SWIG type-checker is fully aware of C++ inheritance. @@ -998,7 +998,7 @@ inherit from both Base1 and Base2 (i.e. they exhibit "Duck Typing").

    -

    34.3.9 C++ Overloaded Functions

    +

    35.3.9 C++ Overloaded Functions

    C++ overloaded functions, methods, and constructors are @@ -1088,7 +1088,7 @@ arises--in this case, the first declaration takes precedence.

    Please refer to the "SWIG and C++" chapter for more information about overloading.

    -

    34.3.10 C++ Operators

    +

    35.3.10 C++ Operators

    For the most part, overloaded operators are handled @@ -1130,7 +1130,7 @@ c = Example.add_complex(a, b) is discussed in the section on operator overloading.

    -

    34.3.11 C++ namespaces

    +

    35.3.11 C++ namespaces

    SWIG is aware of C++ namespaces, but namespace names do not @@ -1187,7 +1187,7 @@ and create extension modules for each namespace separately. If your program utilizes thousands of small deeply nested namespaces each with identical symbol names, well, then you get what you deserve.

    -

    34.3.12 C++ templates

    +

    35.3.12 C++ templates

    C++ templates don't present a huge problem for SWIG. However, @@ -1229,7 +1229,7 @@ irb(main):004:0> p.second 4 -

    34.3.13 C++ Standard Template Library (STL)

    +

    35.3.13 C++ Standard Template Library (STL)

    On a related note, the standard SWIG library contains a @@ -1322,7 +1322,7 @@ puts v shown in these examples. More details can be found in the SWIG and C++ chapter.

    -

    34.3.14 C++ STL Functors

    +

    35.3.14 C++ STL Functors

    Some containers in the STL allow you to modify their default @@ -1383,7 +1383,7 @@ b -

    34.3.15 C++ STL Iterators

    +

    35.3.15 C++ STL Iterators

    The STL is well known for the use of iterators. There @@ -1466,10 +1466,10 @@ i

    If you'd rather have STL classes without any iterators, you should define -DSWIG_NO_EXPORT_ITERATOR_METHODS when running swig.

    -

    34.3.16 C++ Smart Pointers

    +

    35.3.16 C++ Smart Pointers

    -

    34.3.16.1 The shared_ptr Smart Pointer

    +

    35.3.16.1 The shared_ptr Smart Pointer

    @@ -1480,7 +1480,7 @@ in the shared_ptr smart pointer -

    34.3.16.2 Generic Smart Pointers

    +

    35.3.16.2 Generic Smart Pointers

    In certain C++ programs, it is common to use classes that @@ -1545,7 +1545,7 @@ method. For example:

    irb(main):004:0> f = p.__deref__() # Returns underlying Foo *
    -

    34.3.17 Cross-Language Polymorphism

    +

    35.3.17 Cross-Language Polymorphism

    SWIG's Ruby module supports cross-language polymorphism @@ -1554,7 +1554,7 @@ module. Rather than duplicate the information presented in the 34.3.17.1 Exception Unrolling +

    35.3.17.1 Exception Unrolling

    Whenever a C++ director class routes one of its virtual @@ -1577,7 +1577,7 @@ method is "wrapped" using the rb_rescue2() function from Ruby's C API. If any Ruby exception is raised, it will be caught here and a C++ exception is raised in its place.

    -

    34.4 Naming

    +

    35.4 Naming

    Ruby has several common naming conventions. Constants are @@ -1615,7 +1615,7 @@ generated by SWIG, it is turned off by default in SWIG 1.3.28. However, it is planned to become the default option in future releases.

    -

    34.4.1 Defining Aliases

    +

    35.4.1 Defining Aliases

    It's a fairly common practice in the Ruby built-ins and @@ -1685,7 +1685,7 @@ matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

    -

    34.4.2 Predicate Methods

    +

    35.4.2 Predicate Methods

    Ruby methods that return a boolean value and end in a @@ -1734,7 +1734,7 @@ using SWIG's "features" mechanism and so the same name matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

    -

    34.4.3 Bang Methods

    +

    35.4.3 Bang Methods

    Ruby methods that modify an object in-place and end in an @@ -1766,7 +1766,7 @@ using SWIG's "features" mechanism and so the same name matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

    -

    34.4.4 Getters and Setters

    +

    35.4.4 Getters and Setters

    Often times a C++ library will expose properties through @@ -1801,7 +1801,7 @@ irb(main):003:0> puts foo.value %rename("value=") Foo::setValue(int value); -

    34.5 Input and output parameters

    +

    35.5 Input and output parameters

    A common problem in some C programs is handling parameters @@ -1940,10 +1940,10 @@ void get_dimensions(Matrix *m, int *rows, int*columns);

    r, c = Example.get_dimensions(m)
    -

    34.6 Exception handling

    +

    35.6 Exception handling

    -

    34.6.1 Using the %exception directive

    +

    35.6.1 Using the %exception directive

    The SWIG %exception directive can be @@ -2052,7 +2052,7 @@ methods and functions named getitem and setitem. limited to C++ exception handling. See the chapter on Customization Features for more examples.

    -

    34.6.2 Handling Ruby Blocks

    +

    35.6.2 Handling Ruby Blocks

    One of the highlights of Ruby and most of its standard library @@ -2119,7 +2119,7 @@ a special in typemap, like:

    For more information on typemaps, see Typemaps.

    -

    34.6.3 Raising exceptions

    +

    35.6.3 Raising exceptions

    There are three ways to raise exceptions from C++ code to @@ -2276,7 +2276,7 @@ function. The first argument passed to rb_raise() is the exception type. You can raise a custom exception type or one of the built-in Ruby exception types.

    -

    34.6.4 Exception classes

    +

    35.6.4 Exception classes

    Starting with SWIG 1.3.28, the Ruby module supports the %exceptionclass @@ -2313,7 +2313,7 @@ end

    For another example look at swig/Examples/ruby/exception_class.

    -

    34.7 Typemaps

    +

    35.7 Typemaps

    This section describes how you can modify SWIG's default @@ -2328,7 +2328,7 @@ a required part of using SWIG---the default wrapping behavior is enough in most cases. Typemaps are only used if you want to change some aspect of the primitive C-Ruby interface.

    -

    34.7.1 What is a typemap?

    +

    35.7.1 What is a typemap?

    A typemap is nothing more than a code generation rule that is @@ -2485,7 +2485,7 @@ to be used as follows (notice how the length parameter is omitted):

    2 -

    34.7.2 Typemap scope

    +

    35.7.2 Typemap scope

    Once defined, a typemap remains in effect for all of the @@ -2531,7 +2531,7 @@ where the class itself is defined. For example:

    }; -

    34.7.3 Copying a typemap

    +

    35.7.3 Copying a typemap

    A typemap is copied by using assignment. For example:

    @@ -2573,7 +2573,7 @@ rules as for %apply (char *buf, int len) { (char *buffer, int size) }; // Multiple arguments -

    34.7.4 Deleting a typemap

    +

    35.7.4 Deleting a typemap

    A typemap can be deleted by simply defining no code. For @@ -2598,7 +2598,7 @@ defined by typemaps, clearing a fundamental type like int will make that type unusable unless you also define a new set of typemaps immediately after the clear operation.

    -

    34.7.5 Placement of typemaps

    +

    35.7.5 Placement of typemaps

    Typemap declarations can be declared in the global scope, @@ -2669,13 +2669,13 @@ In this example, this is done using the class declaration class string .

    -

    34.7.6 Ruby typemaps

    +

    35.7.6 Ruby typemaps

    The following list details all of the typemap methods that can be used by the Ruby module:

    -

    34.7.6.1 "in" typemap

    +

    35.7.6.1 "in" typemap

    Converts Ruby objects to input @@ -2742,7 +2742,7 @@ arguments to be specified. For example:

    At this time, only zero or one arguments may be converted.

    -

    34.7.6.2 "typecheck" typemap

    +

    35.7.6.2 "typecheck" typemap

    The "typecheck" typemap is used to support overloaded @@ -2764,7 +2764,7 @@ program uses overloaded methods, you should also define a collection of "typecheck" typemaps. More details about this follow in a later section on "Typemaps and Overloading."

    -

    34.7.6.3 "out" typemap

    +

    35.7.6.3 "out" typemap

    Converts return value of a C function @@ -2815,7 +2815,7 @@ version of the C datatype matched by the typemap.

    -

    34.7.6.4 "arginit" typemap

    +

    35.7.6.4 "arginit" typemap

    The "arginit" typemap is used to set the initial value of a @@ -2830,7 +2830,7 @@ applications. For example:

    } -

    34.7.6.5 "default" typemap

    +

    35.7.6.5 "default" typemap

    The "default" typemap is used to turn an argument into a @@ -2855,7 +2855,7 @@ arguments that follow must have default values. See the 34.7.6.6 "check" typemap +

    35.7.6.6 "check" typemap

    The "check" typemap is used to supply value checking code @@ -2870,7 +2870,7 @@ arguments have been converted. For example:

    } -

    34.7.6.7 "argout" typemap

    +

    35.7.6.7 "argout" typemap

    The "argout" typemap is used to return values from arguments. @@ -2924,7 +2924,7 @@ some function like SWIG_Ruby_AppendOutput.

    See the typemaps.i library for examples.

    -

    34.7.6.8 "freearg" typemap

    +

    35.7.6.8 "freearg" typemap

    The "freearg" typemap is used to cleanup argument data. It is @@ -2951,7 +2951,7 @@ This code is also placed into a special variable $cleanup that may be used in other typemaps whenever a wrapper function needs to abort prematurely.

    -

    34.7.6.9 "newfree" typemap

    +

    35.7.6.9 "newfree" typemap

    The "newfree" typemap is used in conjunction with the %newobject @@ -2975,7 +2975,7 @@ string *foo();

    See Object ownership and %newobject for further details.

    -

    34.7.6.10 "memberin" typemap

    +

    35.7.6.10 "memberin" typemap

    The "memberin" typemap is used to copy data from an @@ -2993,21 +2993,21 @@ example:

    already provides a default implementation for arrays, strings, and other objects.

    -

    34.7.6.11 "varin" typemap

    +

    35.7.6.11 "varin" typemap

    The "varin" typemap is used to convert objects in the target language to C for the purposes of assigning to a C/C++ global variable. This is implementation specific.

    -

    34.7.6.12 "varout" typemap

    +

    35.7.6.12 "varout" typemap

    The "varout" typemap is used to convert a C/C++ object to an object in the target language when reading a C/C++ global variable. This is implementation specific.

    -

    34.7.6.13 "throws" typemap

    +

    35.7.6.13 "throws" typemap

    The "throws" typemap is only used when SWIG parses a C++ @@ -3048,7 +3048,7 @@ specification yet they do throw exceptions, SWIG cannot know how to deal with them. For a neat way to handle these, see the Exception handling with %exception section.

    -

    34.7.6.14 directorin typemap

    +

    35.7.6.14 directorin typemap

    Converts C++ objects in director @@ -3107,7 +3107,7 @@ referring to the class itself. -

    34.7.6.15 directorout typemap

    +

    35.7.6.15 directorout typemap

    Converts Ruby objects in director @@ -3180,7 +3180,7 @@ exception.

    -

    34.7.6.16 directorargout typemap

    +

    35.7.6.16 directorargout typemap

    Output argument processing in director @@ -3238,19 +3238,19 @@ referring to the instance of the class itself -

    34.7.6.17 ret typemap

    +

    35.7.6.17 ret typemap

    Cleanup of function return values

    -

    34.7.6.18 globalin typemap

    +

    35.7.6.18 globalin typemap

    Setting of C global variables

    -

    34.7.7 Typemap variables

    +

    35.7.7 Typemap variables

    @@ -3300,7 +3300,7 @@ so that their values can be properly assigned.

    The Ruby name of the wrapper function being created.
    -

    34.7.8 Useful Functions

    +

    35.7.8 Useful Functions

    When you write a typemap, you usually have to work directly @@ -3315,7 +3315,7 @@ stick to the swig functions instead of the native Ruby functions. That should help you avoid having to rewrite a lot of typemaps across multiple languages.

    -

    34.7.8.1 C Datatypes to Ruby Objects

    +

    35.7.8.1 C Datatypes to Ruby Objects

    @@ -3357,7 +3357,7 @@ SWIG_From_float(float)
    -

    34.7.8.2 Ruby Objects to C Datatypes

    +

    35.7.8.2 Ruby Objects to C Datatypes

    Here, while the Ruby versions return the value directly, the SWIG @@ -3425,7 +3425,7 @@ versions do not, but return a status value to indicate success (SWIG_OK -

    34.7.8.3 Macros for VALUE

    +

    35.7.8.3 Macros for VALUE

    RSTRING_LEN(str)

    @@ -3448,7 +3448,7 @@ versions do not, but return a status value to indicate success (SWIG_OK
    pointer to array storage
    -

    34.7.8.4 Exceptions

    +

    35.7.8.4 Exceptions

    void rb_raise(VALUE exception, const char *fmt, @@ -3527,7 +3527,7 @@ message to standard error if Ruby was invoked with the -w flag. The given format string fmt and remaining arguments are interpreted as with printf(). -

    34.7.8.5 Iterators

    +

    35.7.8.5 Iterators

    void rb_iter_break()

    @@ -3573,14 +3573,14 @@ VALUE), VALUE value)

    Equivalent to Ruby's throw.
    -

    34.7.9 Typemap Examples

    +

    35.7.9 Typemap Examples

    This section includes a few examples of typemaps. For more examples, you might look at the examples in the Example/ruby directory.

    -

    34.7.10 Converting a Ruby array to a char **

    +

    35.7.10 Converting a Ruby array to a char **

    A common problem in many C programs is the processing of @@ -3645,7 +3645,7 @@ array. Since dynamic memory allocation is used to allocate memory for the array, the "freearg" typemap is used to later release this memory after the execution of the C function.

    -

    34.7.11 Collecting arguments in a hash

    +

    35.7.11 Collecting arguments in a hash

    Ruby's solution to the "keyword arguments" capability of some @@ -3859,7 +3859,7 @@ memory leak. Fortunately, this typemap is a lot easier to write:

    program that uses the extension, can be found in the Examples/ruby/hashargs directory of the SWIG distribution.

    -

    34.7.12 Pointer handling

    +

    35.7.12 Pointer handling

    Occasionally, it might be necessary to convert pointer values @@ -3918,7 +3918,7 @@ For example:

    } -

    34.7.12.1 Ruby Datatype Wrapping

    +

    35.7.12.1 Ruby Datatype Wrapping

    VALUE Data_Wrap_Struct(VALUE class, void @@ -3945,7 +3945,7 @@ as above. type c-type from the data object obj and assigns that pointer to ptr. -

    34.7.13 Example: STL Vector to Ruby Array

    +

    35.7.13 Example: STL Vector to Ruby Array

    Another use for macros and type maps is to create a Ruby array @@ -4037,7 +4037,7 @@ STL with ruby, you are advised to use the standard swig STL library, which does much more than this. Refer to the section called the C++ Standard Template Library. -

    34.8 Docstring Features

    +

    35.8 Docstring Features

    @@ -4071,7 +4071,7 @@ generate ri documentation from a c wrap file, you could do:

    $ rdoc -r file_wrap.c -

    34.8.1 Module docstring

    +

    35.8.1 Module docstring

    @@ -4101,7 +4101,7 @@ layout of controls on a panel, etc. to be loaded from an XML file." %module(docstring=DOCSTRING) xrc -

    34.8.2 %feature("autodoc")

    +

    35.8.2 %feature("autodoc")

    Since SWIG does know everything about the function it wraps, @@ -4122,7 +4122,7 @@ several options for autodoc controlled by the value given to the feature, described below.

    -

    34.8.2.1 %feature("autodoc", "0")

    +

    35.8.2.1 %feature("autodoc", "0")

    @@ -4146,7 +4146,7 @@ Then Ruby code like this will be generated: ... -

    34.8.2.2 %feature("autodoc", "1")

    +

    35.8.2.2 %feature("autodoc", "1")

    @@ -4166,7 +4166,7 @@ this: ... -

    34.8.2.3 %feature("autodoc", "2")

    +

    35.8.2.3 %feature("autodoc", "2")

    @@ -4178,7 +4178,7 @@ parameter types with the "2" option will result in Ruby code like this:

    -

    34.8.2.4 %feature("autodoc", "3")

    +

    35.8.2.4 %feature("autodoc", "3")

    @@ -4199,7 +4199,7 @@ Parameters: bar - Bar -

    34.8.2.5 %feature("autodoc", "docstring")

    +

    35.8.2.5 %feature("autodoc", "docstring")

    @@ -4215,7 +4215,7 @@ generated string. For example: void GetPosition(int* OUTPUT, int* OUTPUT); -

    34.8.3 %feature("docstring")

    +

    35.8.3 %feature("docstring")

    @@ -4226,10 +4226,10 @@ docstring associated with classes, function or methods are output. If an item already has an autodoc string then it is combined with the docstring and they are output together.

    -

    34.9 Advanced Topics

    +

    35.9 Advanced Topics

    -

    34.9.1 Operator overloading

    +

    35.9.1 Operator overloading

    SWIG allows operator overloading with, by using the %extend @@ -4410,7 +4410,7 @@ separate method for handling inequality since Ruby parses the expression a != b as !(a == b).

    -

    34.9.2 Creating Multi-Module Packages

    +

    35.9.2 Creating Multi-Module Packages

    The chapter on Working @@ -4536,7 +4536,7 @@ irb(main):005:0> c.getX() 5.0 -

    34.9.3 Specifying Mixin Modules

    +

    35.9.3 Specifying Mixin Modules

    The Ruby language doesn't support multiple inheritance, but @@ -4603,7 +4603,7 @@ matching rules used for other kinds of features apply (see the chapter on "Customization Features") for more details).

    -

    34.10 Memory Management

    +

    35.10 Memory Management

    One of the most common issues in generating SWIG bindings for @@ -4626,7 +4626,7 @@ to C++ (or vice versa) depending on what function or methods are invoked. Clearly, developing a SWIG wrapper requires a thorough understanding of how the underlying library manages memory.

    -

    34.10.1 Mark and Sweep Garbage Collector

    +

    35.10.1 Mark and Sweep Garbage Collector

    Ruby uses a mark and sweep garbage collector. When the garbage @@ -4657,7 +4657,7 @@ any memory has been allocated in creating the underlying C struct or C++ struct, then a "free" function must be defined that deallocates this memory.

    -

    34.10.2 Object Ownership

    +

    35.10.2 Object Ownership

    As described above, memory management depends on clearly @@ -4802,7 +4802,7 @@ public:

    This code can be seen in swig/examples/ruby/tracking.

    -

    34.10.3 Object Tracking

    +

    35.10.3 Object Tracking

    The remaining parts of this section will use the class library @@ -5028,7 +5028,7 @@ However, if you implement your own free functions (see below) you may also have to call the SWIG_RubyRemoveTracking and RubyUnlinkObjects methods.

    -

    34.10.4 Mark Functions

    +

    35.10.4 Mark Functions

    With a bit more testing, we see that our class library still @@ -5157,7 +5157,7 @@ irb(main):016:0>

    This code can be seen in swig/examples/ruby/mark_function.

    -

    34.10.5 Free Functions

    +

    35.10.5 Free Functions

    By default, SWIG creates a "free" function that is called when @@ -5325,7 +5325,7 @@ been freed, and thus raises a runtime exception.

    This code can be seen in swig/examples/ruby/free_function.

    -

    34.10.6 Embedded Ruby and the C++ Stack

    +

    35.10.6 Embedded Ruby and the C++ Stack

    As has been said, the Ruby GC runs and marks objects before diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html index dc9ae0f7e..0c259e393 100644 --- a/Doc/Manual/SWIGPlus.html +++ b/Doc/Manual/SWIGPlus.html @@ -91,6 +91,7 @@ For additions to the original C++ standard, please read the SWIG and C++11, SWIG and C++14 and SWIG and C++17 chapters. +SWIG and C++20 chapters. As a prerequisite, you should first read the chapter SWIG Basics to see how SWIG wraps ISO C. Support for C++ builds upon ISO C diff --git a/Doc/Manual/Scilab.html b/Doc/Manual/Scilab.html index 88ab8043e..5c4ef6269 100644 --- a/Doc/Manual/Scilab.html +++ b/Doc/Manual/Scilab.html @@ -9,7 +9,7 @@ -

    35 SWIG and Scilab

    +

    36 SWIG and Scilab

    -

    35.3 A basic tour of C/C++ wrapping

    +

    36.3 A basic tour of C/C++ wrapping

    -

    35.3.1 Overview

    +

    36.3.1 Overview

    @@ -332,7 +332,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.

    -

    35.3.2 Identifiers

    +

    36.3.2 Identifiers

    @@ -347,7 +347,7 @@ In these cases, the %rename directive Note: truncations can be disabled by specifying the target version 6 of Scilab in the targetversion argument (i.e. -targetversion 6).

    -

    35.3.3 Functions

    +

    36.3.3 Functions

    @@ -378,7 +378,7 @@ ans = 24. -

    35.3.3.1 Argument passing

    +

    36.3.3.1 Argument passing

    @@ -431,7 +431,7 @@ In Scilab, parameters are passed by value. The output (and inout) parameters are 7. -

    35.3.3.2 Multiple output arguments

    +

    36.3.3.2 Multiple output arguments

    @@ -480,7 +480,7 @@ int divide(int n, int d, int *OUTPUT, int *OUTPUT); -

    35.3.4 Global variables

    +

    36.3.4 Global variables

    @@ -549,10 +549,10 @@ It works the same:

    -

    35.3.5 Constants and enumerations

    +

    36.3.5 Constants and enumerations

    -

    35.3.5.1 Constants

    +

    36.3.5.1 Constants

    @@ -693,7 +693,7 @@ are mapped to Scilab variables, with the same name: 3.14 -

    35.3.5.2 Enumerations

    +

    36.3.5.2 Enumerations

    @@ -758,7 +758,7 @@ typedef enum { RED, BLUE, GREEN } color; -

    35.3.6 Pointers

    +

    36.3.6 Pointers

    @@ -820,7 +820,7 @@ Note: the type name _p_FILE which means "pointer to FILE". 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).

    -

    35.3.6.1 Utility functions

    +

    36.3.6.1 Utility functions

    @@ -861,7 +861,7 @@ ans = -

    35.3.6.2 Null pointers:

    +

    36.3.6.2 Null pointers:

    @@ -877,7 +877,7 @@ Using the previous SWIG_this() and SWIG_ptr(), it is possible -

    35.3.7 Structures

    +

    36.3.7 Structures

    @@ -986,7 +986,7 @@ Note: the pointer to the struct works as described in 35.3.8 C++ classes +

    36.3.8 C++ classes

    @@ -1054,7 +1054,7 @@ Note: like structs, class pointers are mapped as described in 35.3.9 C++ inheritance +

    36.3.9 C++ inheritance

    @@ -1129,7 +1129,7 @@ But we can use either use the get_perimeter() function of the parent cl 18.84 -

    35.3.10 C++ overloading

    +

    36.3.10 C++ overloading

    @@ -1169,7 +1169,7 @@ void magnify(Circle *circle, double factor) { -

    35.3.11 Pointers, references, values, and arrays

    +

    36.3.11 Pointers, references, values, and arrays

    @@ -1227,7 +1227,7 @@ All these functions will return a pointer to an instance of Foo. As the function spam7 returns a value, new instance of Foo has to be allocated, and a pointer on this instance is returned.

    -

    35.3.12 C++ templates

    +

    36.3.12 C++ templates

    @@ -1286,7 +1286,7 @@ Then in Scilab: More details on template support can be found in the templates documentation.

    -

    35.3.13 C++ operators

    +

    36.3.13 C++ operators

    @@ -1339,7 +1339,7 @@ private: -

    35.3.14 C++ namespaces

    +

    36.3.14 C++ namespaces

    @@ -1417,7 +1417,7 @@ Note: the nspace feature is not supp

    -

    35.3.15 C++ exceptions

    +

    36.3.15 C++ exceptions

    @@ -1500,17 +1500,17 @@ More complex or custom exception types require specific exception typemaps to be See the SWIG C++ documentation for more details.

    -

    35.3.16 C++ STL

    +

    36.3.16 C++ STL

    The Standard Template Library (STL) is partially supported. See STL for more details.

    -

    35.4 Type mappings and libraries

    +

    36.4 Type mappings and libraries

    -

    35.4.1 Default primitive type mappings

    +

    36.4.1 Default primitive type mappings

    @@ -1561,7 +1561,7 @@ The default behaviour is for SWIG to generate code that will give a runtime erro -

    35.4.2 Arrays

    +

    36.4.2 Arrays

    @@ -1616,7 +1616,7 @@ void printArray(int values[], int len) { [ 0 1 2 3 ] -

    35.4.3 Pointer-to-pointers

    +

    36.4.3 Pointer-to-pointers

    @@ -1689,7 +1689,7 @@ void print_matrix(double **M, int nbRows, int nbCols) { -

    35.4.4 Matrices

    +

    36.4.4 Matrices

    @@ -1782,7 +1782,7 @@ The remarks made earlier for arrays also apply here:

  • There is no control while converting double values to integers, double values are truncated without any checking or warning.
  • -

    35.4.5 STL

    +

    36.4.5 STL

    @@ -1982,7 +1982,7 @@ ans = --> delete_PersonPtrSet(p); -

    35.5 Module initialization

    +

    36.5 Module initialization

    @@ -2006,7 +2006,7 @@ For example, to initialize the module example: --> example_Init(); -

    35.6 Building modes

    +

    36.6 Building modes

    @@ -2021,7 +2021,7 @@ To produce a dynamic module, when generating the wrapper, there are two possibil

  • the builder mode. In this mode, Scilab is responsible of building. -

    35.6.1 No-builder mode

    +

    36.6.1 No-builder mode

    @@ -2034,7 +2034,7 @@ This mode is the best option to use when you have to integrate the module build

    -

    35.6.2 Builder mode

    +

    36.6.2 Builder mode

    @@ -2074,14 +2074,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 -

    35.7 Generated scripts

    +

    36.7 Generated scripts

    In this part we give some details about the generated Scilab scripts.

    -

    35.7.1 Builder script

    +

    36.7.1 Builder script

    @@ -2106,7 +2106,7 @@ ilib_build(ilib_name, table, files, libs);

  • table: two column string matrix containing a table of pairs of 'scilab function name', 'C function name'.
  • -

    35.7.2 Loader script

    +

    36.7.2 Loader script

    @@ -2145,7 +2145,7 @@ clear get_file_path; -

    35.8 Other resources

    +

    36.8 Other resources

    -

    13.4 Code generation rules

    +

    14.4 Code generation rules

    @@ -1878,7 +1878,7 @@ This section describes rules by which typemap code is inserted into the generated wrapper code.

    -

    13.4.1 Scope

    +

    14.4.1 Scope

    @@ -1956,7 +1956,7 @@ a block scope when it is emitted. This sometimes results in a less complicated Note that only the third of the three typemaps have the typemap code passed through the SWIG preprocessor.

    -

    13.4.2 Declaring new local variables

    +

    14.4.2 Declaring new local variables

    @@ -2123,7 +2123,7 @@ each type must have its own local variable declaration. -

    13.4.3 Special variables

    +

    14.4.3 Special variables

    @@ -2375,7 +2375,7 @@ Another approach, which only works for arrays is to use the $1_basetype -

    13.4.4 Special variable macros

    +

    14.4.4 Special variable macros

    @@ -2387,7 +2387,7 @@ it is done during the SWIG parsing/compilation stages. The following special variable macros are available across all language modules.

    -

    13.4.4.1 $descriptor(type)

    +

    14.4.4.1 $descriptor(type)

    @@ -2398,7 +2398,7 @@ For example, $descriptor(std::vector<int> *) will expand into Run-time type checker usage section.

    -

    13.4.4.2 $typemap(method, typepattern)

    +

    14.4.4.2 $typemap(method, typepattern)

    @@ -2456,7 +2456,7 @@ The result is the following expansion -

    13.4.5 Special variables and typemap attributes

    +

    14.4.5 Special variables and typemap attributes

    @@ -2483,7 +2483,7 @@ is equivalent to the following as $*1_ltype expands to unsigned int -

    13.4.6 Special variables combined with special variable macros

    +

    14.4.6 Special variables combined with special variable macros

    @@ -2525,7 +2525,7 @@ which then expands to: -

    13.5 Common typemap methods

    +

    14.5 Common typemap methods

    @@ -2533,7 +2533,7 @@ The family of typemaps recognized by a language module may vary. However, the following typemap methods are nearly universal:

    -

    13.5.1 "in" typemap

    +

    14.5.1 "in" typemap

    @@ -2593,7 +2593,7 @@ Usually numinputs is not specified, whereupon the default value is 1, t is the same as the old "ignore" typemap.

    -

    13.5.2 "typecheck" typemap

    +

    14.5.2 "typecheck" typemap

    @@ -2620,7 +2620,7 @@ If you define new "in" typemaps and your program uses overloaded method "typecheck" typemaps. More details about this follow in the Typemaps and overloading section.

    -

    13.5.3 "out" typemap

    +

    14.5.3 "out" typemap

    @@ -2651,7 +2651,7 @@ $symname - Name of function/method being wrapped The "out" typemap supports an optional attribute flag called "optimal". This is for code optimisation and is detailed in the Optimal code generation when returning by value section.

    -

    13.5.4 "arginit" typemap

    +

    14.5.4 "arginit" typemap

    @@ -2670,7 +2670,7 @@ For example: -

    13.5.5 "default" typemap

    +

    14.5.5 "default" typemap

    @@ -2703,7 +2703,7 @@ See the Default/optional arguments sec for further information on default argument wrapping.

    -

    13.5.6 "check" typemap

    +

    14.5.6 "check" typemap

    @@ -2722,7 +2722,7 @@ converted. For example: -

    13.5.7 "argout" typemap

    +

    14.5.7 "argout" typemap

    @@ -2768,7 +2768,7 @@ return values are often appended to return value of the function. See the typemaps.i library file for examples.

    -

    13.5.8 "freearg" typemap

    +

    14.5.8 "freearg" typemap

    @@ -2801,7 +2801,7 @@ be used in other typemaps whenever a wrapper function needs to abort prematurely.

    -

    13.5.9 "newfree" typemap

    +

    14.5.9 "newfree" typemap

    @@ -2830,7 +2830,7 @@ string *foo(); See Object ownership and %newobject for further details.

    -

    13.5.10 "ret" typemap

    +

    14.5.10 "ret" typemap

    @@ -2869,7 +2869,7 @@ This approach is an alternative to using the "newfree" typemap and %newobjec is no need to list all the functions that require the memory cleanup, it is purely done on types.

    -

    13.5.11 "memberin" typemap

    +

    14.5.11 "memberin" typemap

    @@ -2891,7 +2891,7 @@ It is rarely necessary to write "memberin" typemaps---SWIG already provides a default implementation for arrays, strings, and other objects.

    -

    13.5.12 "varin" typemap

    +

    14.5.12 "varin" typemap

    @@ -2899,7 +2899,7 @@ The "varin" typemap is used to convert objects in the target language to C for t purposes of assigning to a C/C++ global variable. This is implementation specific.

    -

    13.5.13 "varout" typemap

    +

    14.5.13 "varout" typemap

    @@ -2907,7 +2907,7 @@ The "varout" typemap is used to convert a C/C++ object to an object in the targe language when reading a C/C++ global variable. This is implementation specific.

    -

    13.5.14 "throws" typemap

    +

    14.5.14 "throws" typemap

    @@ -2957,7 +2957,7 @@ Note that if your methods do not have an exception specification but they do thr Please also see the Exception handling with %exception section for another way to handle exceptions.

    -

    13.6 Some typemap examples

    +

    14.6 Some typemap examples

    @@ -2965,7 +2965,7 @@ This section contains a few examples. Consult language module documentation for more examples.

    -

    13.6.1 Typemaps for arrays

    +

    14.6.1 Typemaps for arrays

    @@ -3224,7 +3224,7 @@ Now, you will find that member access is quite nice: useless and has since been eliminated. To return structure members, simply use the "out" typemap.

    -

    13.6.2 Implementing constraints with typemaps

    +

    14.6.2 Implementing constraints with typemaps

    @@ -3272,7 +3272,7 @@ a NULL pointer. As a result, SWIG can often prevent a potential segmentation faults or other run-time problems by raising an exception rather than blindly passing values to the underlying C/C++ program.

    -

    13.7 Typemaps for multiple target languages

    +

    14.7 Typemaps for multiple target languages

    @@ -3302,7 +3302,7 @@ The example above also shows a common approach of issuing a warning for an as ye %typemap(ruby, in) int "$1 = NUM2INT($input);".

    -

    13.8 Optimal code generation when returning by value

    +

    14.8 Optimal code generation when returning by value

    @@ -3491,7 +3491,7 @@ example.i:7: Warning 475: optimal attribute usage in the out typemap. However, it doesn't always get it right, for example when $1 is within some commented out code.

    -

    13.9 Multi-argument typemaps

    +

    14.9 Multi-argument typemaps

    @@ -3768,7 +3768,7 @@ with non-consecutive C/C++ arguments; a workaround such as a helper function re- the arguments to make them consecutive will need to be written.

    -

    13.10 Typemap warnings

    +

    14.10 Typemap warnings

    @@ -3777,7 +3777,7 @@ See the information in the issuing warnings

    -

    13.11 Typemap fragments

    +

    14.11 Typemap fragments

    @@ -4113,7 +4113,7 @@ fragment usage unless a desire to really get to grips with some powerful but tricky macro and fragment usage that is used in parts of the SWIG typemap library.

    -

    13.11.1 Fragment type specialization

    +

    14.11.1 Fragment type specialization

    @@ -4146,7 +4146,7 @@ struct A { -

    13.11.2 Fragments and automatic typemap specialization

    +

    14.11.2 Fragments and automatic typemap specialization

    @@ -4192,7 +4192,7 @@ The interested (or very brave) reader can take a look at the fragments.swg file

    -

    13.12 The run-time type checker

    +

    14.12 The run-time type checker

    @@ -4218,7 +4218,7 @@ language modules.

  • Modules can be unloaded from the type system.
  • -

    13.12.1 Implementation

    +

    14.12.1 Implementation

    @@ -4412,7 +4412,7 @@ structures rather than creating new ones. These swig_module_info structures are chained together in a circularly linked list.

    -

    13.12.2 Usage

    +

    14.12.2 Usage

    This section covers how to use these functions from typemaps. To learn how to @@ -4508,7 +4508,7 @@ probably just look at the output of SWIG to get a better sense for how types are managed.

    -

    13.13 Typemaps and overloading

    +

    14.13 Typemaps and overloading

    @@ -4847,7 +4847,7 @@ Subsequent "in" typemaps would then perform more extensive type-checking. -

    13.13.1 SWIG_TYPECHECK_POINTER precedence level and the typecheck typemap

    +

    14.13.1 SWIG_TYPECHECK_POINTER precedence level and the typecheck typemap

    @@ -4949,7 +4949,7 @@ Otherwise both can be wrapped by removing the overloading name ambiguity by rena The 'equivalent' attribute is used in the implementation for the shared_ptr smart pointer library.

    -

    13.14 More about %apply and %clear

    +

    14.14 More about %apply and %clear

    @@ -5054,7 +5054,7 @@ will delete the typemaps for all the typemap methods; namely "in", "check" and " -

    13.15 Passing data between typemaps

    +

    14.15 Passing data between typemaps

    @@ -5091,7 +5091,7 @@ sure that the typemaps sharing information have exactly the same types and names

    -

    13.16 C++ "this" pointer

    +

    14.16 C++ "this" pointer

    @@ -5151,7 +5151,7 @@ will also match the typemap. One work around is to create an interface file tha the method, but gives the argument a name other than self.

    -

    13.17 Where to go for more information?

    +

    14.17 Where to go for more information?

    diff --git a/Doc/Manual/Varargs.html b/Doc/Manual/Varargs.html index 9f20469d2..620f2e5a0 100644 --- a/Doc/Manual/Varargs.html +++ b/Doc/Manual/Varargs.html @@ -7,7 +7,7 @@ -

    16 Variable Length Arguments

    +

    17 Variable Length Arguments

      @@ -43,7 +43,7 @@ added in SWIG-1.3.12. Most other wrapper generation tools have wisely chosen to avoid this issue.

      -

      16.1 Introduction

      +

      17.1 Introduction

      @@ -140,7 +140,7 @@ List make_list(const char *s, ...) {

    -

    16.2 The Problem

    +

    17.2 The Problem

    @@ -233,7 +233,7 @@ can also support real varargs wrapping (with stack-frame manipulation) if you are willing to get hands dirty. Keep reading.

    -

    16.3 Default varargs support

    +

    17.3 Default varargs support

    @@ -302,7 +302,7 @@ Read on for further solutions.

    -

    16.4 Argument replacement using %varargs

    +

    17.4 Argument replacement using %varargs

    @@ -413,7 +413,7 @@ mixed argument types such as printf(). Providing general purpose wrappers to such functions presents special problems (covered shortly).

    -

    16.5 Varargs and typemaps

    +

    17.5 Varargs and typemaps

    @@ -593,7 +593,7 @@ really want to elevate your guru status and increase your job security, continue to the next section.

    -

    16.6 Varargs wrapping with libffi

    +

    17.6 Varargs wrapping with libffi

    @@ -845,7 +845,7 @@ provide an argument number for the first extra argument. This can be used to in values. Please consult the chapter on each language module for more details.

    -

    16.7 Wrapping of va_list

    +

    17.7 Wrapping of va_list

    @@ -899,7 +899,7 @@ int my_vprintf(const char *fmt, ...) { -

    16.8 C++ Issues

    +

    17.8 C++ Issues

    @@ -968,7 +968,7 @@ design or to provide an alternative interface using a helper function than it is fully general wrapper to a varargs C++ member function.

    -

    16.9 Discussion

    +

    17.9 Discussion

    diff --git a/Doc/Manual/Warnings.html b/Doc/Manual/Warnings.html index c63d7de0c..0cf2a1066 100644 --- a/Doc/Manual/Warnings.html +++ b/Doc/Manual/Warnings.html @@ -7,7 +7,7 @@ -

    18 Warning Messages

    +

    19 Warning Messages

    -

    18.5 Symbolic symbols

    +

    19.5 Symbolic symbols

    @@ -311,7 +311,7 @@ or -

    18.6 Commentary

    +

    19.6 Commentary

    @@ -328,7 +328,7 @@ no obvious recovery. There is no mechanism for suppressing error messages.

    -

    18.7 Warnings as errors

    +

    19.7 Warnings as errors

    @@ -337,7 +337,7 @@ option. This will cause SWIG to exit with a non successful exit code if a warning is encountered.

    -

    18.8 Message output format

    +

    19.8 Message output format

    @@ -356,10 +356,10 @@ $ swig -python -Fmicrosoft example.i example.i(4) : Syntax error in input(1). -

    18.9 Warning number reference

    +

    19.9 Warning number reference

    -

    18.9.1 Deprecated features (100-199)

    +

    19.9.1 Deprecated features (100-199)

      @@ -387,7 +387,7 @@ example.i(4) : Syntax error in input(1).
    • 126. The 'nestedworkaround' feature is deprecated.
    -

    18.9.2 Preprocessor (200-299)

    +

    19.9.2 Preprocessor (200-299)

      @@ -399,7 +399,7 @@ example.i(4) : Syntax error in input(1).
    • 206. Unexpected tokens after #directive directive.
    -

    18.9.3 C/C++ Parser (300-399)

    +

    19.9.3 C/C++ Parser (300-399)

      @@ -476,7 +476,7 @@ example.i(4) : Syntax error in input(1).
    • 395. operator delete[] ignored.
    -

    18.9.4 Types and typemaps (400-499)

    +

    19.9.4 Types and typemaps (400-499)