Correctly mangle the html section names to prevent name clashes in the pdf document
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11921 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b6b99bb148
commit
9006dc90ce
17 changed files with 55 additions and 55 deletions
|
|
@ -310,7 +310,7 @@ The <tt>directorinattributes</tt> and <tt>directoroutattributes</tt> typemap att
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
Support for attaching C# attributes to wrapped methods, variables and enum values.
|
Support for attaching C# attributes to wrapped methods, variables and enum values.
|
||||||
This is done using the <tt>%csattributes</tt> feature, see <a href="Customization.html#features">%feature directives</a>.
|
This is done using the <tt>%csattributes</tt> feature, see <a href="Customization.html#Customization_features">%feature directives</a>.
|
||||||
Note that C# attributes are attached to proxy classes and enums using the <tt>csattributes</tt> typemap.
|
Note that C# attributes are attached to proxy classes and enums using the <tt>csattributes</tt> typemap.
|
||||||
For example, imagine we have a custom attribute class, <tt>ThreadSafeAttribute</tt>, for labelling thread safety.
|
For example, imagine we have a custom attribute class, <tt>ThreadSafeAttribute</tt>, for labelling thread safety.
|
||||||
The following SWIG code shows how to attach this C# attribute to some methods and the class declaration itself:
|
The following SWIG code shows how to attach this C# attribute to some methods and the class declaration itself:
|
||||||
|
|
@ -729,7 +729,7 @@ It is possible to throw a C# Exception from C/C++ code.
|
||||||
SWIG already provides the framework for throwing C# exceptions if it is able to detect that a C++ exception could be thrown.
|
SWIG already provides the framework for throwing C# exceptions if it is able to detect that a C++ exception could be thrown.
|
||||||
Automatically detecting that a C++ exception could be thrown is only possible when a C++ exception specification is used,
|
Automatically detecting that a C++ exception could be thrown is only possible when a C++ exception specification is used,
|
||||||
see <a href="SWIGPlus.html#SWIGPlus_exception_specifications">Exception specifications</a>.
|
see <a href="SWIGPlus.html#SWIGPlus_exception_specifications">Exception specifications</a>.
|
||||||
The <a href="Customization.html#exception">Exception handling with %exception</a> section details the <tt>%exception</tt> feature.
|
The <a href="Customization.html#Customization_exception">Exception handling with %exception</a> section details the <tt>%exception</tt> feature.
|
||||||
Customised code for handling exceptions with or without a C++ exception specification is possible and the details follow.
|
Customised code for handling exceptions with or without a C++ exception specification is possible and the details follow.
|
||||||
However anyone wishing to do this should be familiar with the contents of the sections referred to above.
|
However anyone wishing to do this should be familiar with the contents of the sections referred to above.
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -1005,7 +1005,7 @@ Actually it will issue this warning for any function beginning with <tt>SWIG_CSh
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Let's consider a similar, but more common example that throws a C++ exception from within a wrapped function.
|
Let's consider a similar, but more common example that throws a C++ exception from within a wrapped function.
|
||||||
We can use <tt>%exception</tt> as mentioned in <a href="Customization.html#exception">Exception handling with %exception</a>.
|
We can use <tt>%exception</tt> as mentioned in <a href="Customization.html#Customization_exception">Exception handling with %exception</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="code">
|
<div class="code">
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<li><a href="#Chicken_nn16">Typemaps</a>
|
<li><a href="#Chicken_nn16">Typemaps</a>
|
||||||
<li><a href="#Chicken_nn17">Pointers</a>
|
<li><a href="#Chicken_nn17">Pointers</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#collection">Garbage collection</a>
|
<li><a href="#Chicken_collection">Garbage collection</a>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="#Chicken_nn18">Unsupported features and known problems</a>
|
<li><a href="#Chicken_nn18">Unsupported features and known problems</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
relies on some recent additions to CHICKEN, which are only
|
relies on some recent additions to CHICKEN, which are only
|
||||||
present in releases of CHICKEN with version number
|
present in releases of CHICKEN with version number
|
||||||
<strong>greater than or equal to 1.89</strong>.
|
<strong>greater than or equal to 1.89</strong>.
|
||||||
To use a chicken version between 1.40 and 1.89, see the <a href="#collection">Garbage collection</a>
|
To use a chicken version between 1.40 and 1.89, see the <a href="#Chicken_collection">Garbage collection</a>
|
||||||
section below.
|
section below.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -225,7 +225,7 @@
|
||||||
a function that must be called, the constant will appear as a
|
a function that must be called, the constant will appear as a
|
||||||
scheme variable. This causes the generated .scm file to just contain the code
|
scheme variable. This causes the generated .scm file to just contain the code
|
||||||
<tt>(set! MYCONSTANT1 (MYCONSTANT1))</tt>. See
|
<tt>(set! MYCONSTANT1 (MYCONSTANT1))</tt>. See
|
||||||
<a href="Customization.html#features">Features and the %feature directive</a>
|
<a href="Customization.html#Customization_features">Features and the %feature directive</a>
|
||||||
for info on how to apply the %feature.
|
for info on how to apply the %feature.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -253,7 +253,7 @@
|
||||||
|
|
||||||
<p>The SWIG chicken module has support for exceptions thrown from
|
<p>The SWIG chicken module has support for exceptions thrown from
|
||||||
C or C++ code to be caught in scheme.
|
C or C++ code to be caught in scheme.
|
||||||
See <a href="Customization.html#exception">Exception handling with %exception</a>
|
See <a href="Customization.html#Customization_exception">Exception handling with %exception</a>
|
||||||
for more information about declaring exceptions in the interface file.
|
for more information about declaring exceptions in the interface file.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -519,7 +519,7 @@ all the modules.</p>
|
||||||
type. flags is either zero or SWIG_POINTER_DISOWN (see below).
|
type. flags is either zero or SWIG_POINTER_DISOWN (see below).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="collection"></a>19.6.1 Garbage collection</H3>
|
<H3><a name="Chicken_collection"></a>19.6.1 Garbage collection</H3>
|
||||||
|
|
||||||
|
|
||||||
<p>If the owner flag passed to <code>SWIG_NewPointerObj</code> is 1, <code>NewPointerObj</code> will add a
|
<p>If the owner flag passed to <code>SWIG_NewPointerObj</code> is 1, <code>NewPointerObj</code> will add a
|
||||||
|
|
@ -530,7 +530,7 @@ all the modules.</p>
|
||||||
be garbage collected, SWIG will automatically set the owner flag to 1. For other functions,
|
be garbage collected, SWIG will automatically set the owner flag to 1. For other functions,
|
||||||
the <code>%newobject</code> directive must be specified for functions whose return values
|
the <code>%newobject</code> directive must be specified for functions whose return values
|
||||||
should be garbage collected. See
|
should be garbage collected. See
|
||||||
<a href="Customization.html#ownership">Object ownership and %newobject</a> for more information.
|
<a href="Customization.html#Customization_ownership">Object ownership and %newobject</a> for more information.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>In situations where a C or C++ function will assume ownership of a pointer, and thus
|
<p>In situations where a C or C++ function will assume ownership of a pointer, and thus
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="SWIGPlus.html#SWIGPlus_nn24">Dispatch function generation</a>
|
<li><a href="SWIGPlus.html#SWIGPlus_nn24">Dispatch function generation</a>
|
||||||
<li><a href="SWIGPlus.html#SWIGPlus_nn25">Ambiguity in Overloading</a>
|
<li><a href="SWIGPlus.html#SWIGPlus_nn25">Ambiguity in Overloading</a>
|
||||||
<li><a href="SWIGPlus.html#ambiguity_resolution_renaming">Ambiguity resolution and renaming</a>
|
<li><a href="SWIGPlus.html#SWIGPlus_ambiguity_resolution_renaming">Ambiguity resolution and renaming</a>
|
||||||
<li><a href="SWIGPlus.html#SWIGPlus_nn27">Comments on overloading</a>
|
<li><a href="SWIGPlus.html#SWIGPlus_nn27">Comments on overloading</a>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="SWIGPlus.html#SWIGPlus_nn28">Wrapping overloaded operators</a>
|
<li><a href="SWIGPlus.html#SWIGPlus_nn28">Wrapping overloaded operators</a>
|
||||||
|
|
@ -410,7 +410,7 @@
|
||||||
<!-- INDEX -->
|
<!-- INDEX -->
|
||||||
<div class="sectiontoc">
|
<div class="sectiontoc">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="Customization.html#exception">Exception handling with %exception</a>
|
<li><a href="Customization.html#Customization_exception">Exception handling with %exception</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="Customization.html#Customization_nn3">Handling exceptions in C code</a>
|
<li><a href="Customization.html#Customization_nn3">Handling exceptions in C code</a>
|
||||||
<li><a href="Customization.html#Customization_nn4">Exception handling with longjmp()</a>
|
<li><a href="Customization.html#Customization_nn4">Exception handling with longjmp()</a>
|
||||||
|
|
@ -420,14 +420,14 @@
|
||||||
<li><a href="Customization.html#Customization_exception_special_variables">Special variables for %exception</a>
|
<li><a href="Customization.html#Customization_exception_special_variables">Special variables for %exception</a>
|
||||||
<li><a href="Customization.html#Customization_nn7">Using The SWIG exception library</a>
|
<li><a href="Customization.html#Customization_nn7">Using The SWIG exception library</a>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="Customization.html#ownership">Object ownership and %newobject</a>
|
<li><a href="Customization.html#Customization_ownership">Object ownership and %newobject</a>
|
||||||
<li><a href="Customization.html#features">Features and the %feature directive</a>
|
<li><a href="Customization.html#Customization_features">Features and the %feature directive</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="Customization.html#Customization_feature_attributes">Feature attributes</a>
|
<li><a href="Customization.html#Customization_feature_attributes">Feature attributes</a>
|
||||||
<li><a href="Customization.html#Customization_feature_flags">Feature flags</a>
|
<li><a href="Customization.html#Customization_feature_flags">Feature flags</a>
|
||||||
<li><a href="Customization.html#Customization_clearing_features">Clearing features</a>
|
<li><a href="Customization.html#Customization_clearing_features">Clearing features</a>
|
||||||
<li><a href="Customization.html#Customization_features_default_args">Features and default arguments</a>
|
<li><a href="Customization.html#Customization_features_default_args">Features and default arguments</a>
|
||||||
<li><a href="Customization.html#features_example">Feature example</a>
|
<li><a href="Customization.html#Customization_features_example">Feature example</a>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -500,7 +500,7 @@
|
||||||
<li><a href="Modules.html#Modules_introduction">Modules Introduction</a>
|
<li><a href="Modules.html#Modules_introduction">Modules Introduction</a>
|
||||||
<li><a href="Modules.html#Modules_nn1">Basics</a>
|
<li><a href="Modules.html#Modules_nn1">Basics</a>
|
||||||
<li><a href="Modules.html#Modules_nn2">The SWIG runtime code</a>
|
<li><a href="Modules.html#Modules_nn2">The SWIG runtime code</a>
|
||||||
<li><a href="Modules.html#external_run_time">External access to the runtime</a>
|
<li><a href="Modules.html#Modules_external_run_time">External access to the runtime</a>
|
||||||
<li><a href="Modules.html#Modules_nn4">A word of caution about static libraries</a>
|
<li><a href="Modules.html#Modules_nn4">A word of caution about static libraries</a>
|
||||||
<li><a href="Modules.html#Modules_nn5">References</a>
|
<li><a href="Modules.html#Modules_nn5">References</a>
|
||||||
<li><a href="Modules.html#Modules_nn6">Reducing the wrapper file size</a>
|
<li><a href="Modules.html#Modules_nn6">Reducing the wrapper file size</a>
|
||||||
|
|
@ -685,7 +685,7 @@
|
||||||
<li><a href="Chicken.html#Chicken_nn16">Typemaps</a>
|
<li><a href="Chicken.html#Chicken_nn16">Typemaps</a>
|
||||||
<li><a href="Chicken.html#Chicken_nn17">Pointers</a>
|
<li><a href="Chicken.html#Chicken_nn17">Pointers</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="Chicken.html#collection">Garbage collection</a>
|
<li><a href="Chicken.html#Chicken_collection">Garbage collection</a>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="Chicken.html#Chicken_nn18">Unsupported features and known problems</a>
|
<li><a href="Chicken.html#Chicken_nn18">Unsupported features and known problems</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -1356,7 +1356,7 @@
|
||||||
<li><a href="Ruby.html#Ruby_nn22">C++ namespaces</a>
|
<li><a href="Ruby.html#Ruby_nn22">C++ namespaces</a>
|
||||||
<li><a href="Ruby.html#Ruby_nn23">C++ templates</a>
|
<li><a href="Ruby.html#Ruby_nn23">C++ templates</a>
|
||||||
<li><a href="Ruby.html#Ruby_nn23_1">C++ Standard Template Library (STL)</a>
|
<li><a href="Ruby.html#Ruby_nn23_1">C++ Standard Template Library (STL)</a>
|
||||||
<li><a href="Ruby.html#C_STL_Functors">C++ STL Functors</a>
|
<li><a href="Ruby.html#Ruby_C_STL_Functors">C++ STL Functors</a>
|
||||||
<li><a href="Ruby.html#Ruby_C_Iterators">C++ STL Iterators</a>
|
<li><a href="Ruby.html#Ruby_C_Iterators">C++ STL Iterators</a>
|
||||||
<li><a href="Ruby.html#Ruby_nn24">C++ Smart Pointers</a>
|
<li><a href="Ruby.html#Ruby_nn24">C++ Smart Pointers</a>
|
||||||
<li><a href="Ruby.html#Ruby_nn25">Cross-Language Polymorphism</a>
|
<li><a href="Ruby.html#Ruby_nn25">Cross-Language Polymorphism</a>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<!-- INDEX -->
|
<!-- INDEX -->
|
||||||
<div class="sectiontoc">
|
<div class="sectiontoc">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#exception">Exception handling with %exception</a>
|
<li><a href="#Customization_exception">Exception handling with %exception</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#Customization_nn3">Handling exceptions in C code</a>
|
<li><a href="#Customization_nn3">Handling exceptions in C code</a>
|
||||||
<li><a href="#Customization_nn4">Exception handling with longjmp()</a>
|
<li><a href="#Customization_nn4">Exception handling with longjmp()</a>
|
||||||
|
|
@ -20,14 +20,14 @@
|
||||||
<li><a href="#Customization_exception_special_variables">Special variables for %exception</a>
|
<li><a href="#Customization_exception_special_variables">Special variables for %exception</a>
|
||||||
<li><a href="#Customization_nn7">Using The SWIG exception library</a>
|
<li><a href="#Customization_nn7">Using The SWIG exception library</a>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="#ownership">Object ownership and %newobject</a>
|
<li><a href="#Customization_ownership">Object ownership and %newobject</a>
|
||||||
<li><a href="#features">Features and the %feature directive</a>
|
<li><a href="#Customization_features">Features and the %feature directive</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#Customization_feature_attributes">Feature attributes</a>
|
<li><a href="#Customization_feature_attributes">Feature attributes</a>
|
||||||
<li><a href="#Customization_feature_flags">Feature flags</a>
|
<li><a href="#Customization_feature_flags">Feature flags</a>
|
||||||
<li><a href="#Customization_clearing_features">Clearing features</a>
|
<li><a href="#Customization_clearing_features">Clearing features</a>
|
||||||
<li><a href="#Customization_features_default_args">Features and default arguments</a>
|
<li><a href="#Customization_features_default_args">Features and default arguments</a>
|
||||||
<li><a href="#features_example">Feature example</a>
|
<li><a href="#Customization_features_example">Feature example</a>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,7 +45,7 @@ of exception handling is presented. Then, a more general-purpose
|
||||||
customization mechanism known as "features" is described.
|
customization mechanism known as "features" is described.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H2><a name="exception"></a>11.1 Exception handling with %exception</H2>
|
<H2><a name="Customization_exception"></a>11.1 Exception handling with %exception</H2>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -351,7 +351,7 @@ In this case, the exception handler is only attached to declarations
|
||||||
named "allocate". This would include both global and member
|
named "allocate". This would include both global and member
|
||||||
functions. The names supplied to <tt>%exception</tt> follow the same
|
functions. The names supplied to <tt>%exception</tt> follow the same
|
||||||
rules as for <tt>%rename</tt> described in the section on
|
rules as for <tt>%rename</tt> described in the section on
|
||||||
<a href="SWIGPlus.html#ambiguity_resolution_renaming">Ambiguity resolution and renaming</a>.
|
<a href="SWIGPlus.html#SWIGPlus_ambiguity_resolution_renaming">Ambiguity resolution and renaming</a>.
|
||||||
For example, if you wanted to define
|
For example, if you wanted to define
|
||||||
an exception handler for a specific class, you might write this:
|
an exception handler for a specific class, you might write this:
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -582,7 +582,7 @@ it can be used elsewhere in SWIG. This includes typemaps and helper
|
||||||
functions.
|
functions.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H2><a name="ownership"></a>11.2 Object ownership and %newobject</H2>
|
<H2><a name="Customization_ownership"></a>11.2 Object ownership and %newobject</H2>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -734,7 +734,7 @@ char *strdup(const char *s);
|
||||||
The results might not be what you expect.
|
The results might not be what you expect.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H2><a name="features"></a>11.3 Features and the %feature directive</H2>
|
<H2><a name="Customization_features"></a>11.3 Features and the %feature directive</H2>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -1123,7 +1123,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.
|
in SWIG-1.3.23 when the approach to wrapping methods with default arguments was changed.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="features_example"></a>11.3.5 Feature example</H3>
|
<H3><a name="Customization_features_example"></a>11.3.5 Feature example</H3>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@ See also the "multivalue" example.
|
||||||
%feature("constasvar") can be applied to any constant, immutable variable, or enum.
|
%feature("constasvar") can be applied to any constant, immutable variable, or enum.
|
||||||
Instead of exporting the constant as a function that must be called, the
|
Instead of exporting the constant as a function that must be called, the
|
||||||
constant will appear as a scheme variable. See
|
constant will appear as a scheme variable. See
|
||||||
<a href="Customization.html#features">Features and the %feature directive</a>
|
<a href="Customization.html#Customization_features">Features and the %feature directive</a>
|
||||||
for info on how to apply the %feature.</p>
|
for info on how to apply the %feature.</p>
|
||||||
|
|
||||||
<H2><a name="Guile_nn12"></a>20.6 Representation of pointers as smobs</H2>
|
<H2><a name="Guile_nn12"></a>20.6 Representation of pointers as smobs</H2>
|
||||||
|
|
@ -487,7 +487,7 @@ to the destructor for this type. The destructor is the generated wrapper around
|
||||||
So swig still exports a wrapper for the destructor, it just does not call scm_c_define_gsubr() for
|
So swig still exports a wrapper for the destructor, it just does not call scm_c_define_gsubr() for
|
||||||
the wrapped delete function. So the only way to delete an object is from the garbage collector, since the
|
the wrapped delete function. So the only way to delete an object is from the garbage collector, since the
|
||||||
delete function is not available to scripts. How swig determines if a type should be garbage collected
|
delete function is not available to scripts. How swig determines if a type should be garbage collected
|
||||||
is exactly like described in <a href="Customization.html#ownership">
|
is exactly like described in <a href="Customization.html#Customization_ownership">
|
||||||
Object ownership and %newobject</a> in the SWIG manual. All typemaps use an $owner var, and
|
Object ownership and %newobject</a> in the SWIG manual. All typemaps use an $owner var, and
|
||||||
the guile module replaces $owner with 0 or 1 depending on feature:new.</p>
|
the guile module replaces $owner with 0 or 1 depending on feature:new.</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ rest of your C/C++ application.
|
||||||
The name of the wrapper file is derived from the name of the input file. For example, if the
|
The name of the wrapper file is derived from the name of the input file. For example, if the
|
||||||
input file is <tt>example.i</tt>, the name of the wrapper file is <tt>example_wrap.c</tt>.
|
input file is <tt>example.i</tt>, the name of the wrapper file is <tt>example_wrap.c</tt>.
|
||||||
To change this, you can use the <tt>-o</tt> option.
|
To change this, you can use the <tt>-o</tt> option.
|
||||||
It is also possible to change the <a href="SWIG.html#output">output directory </a> that the Java files are generated into using <tt>-outdir</tt>.
|
It is also possible to change the <a href="SWIG.html#SWIG_output">output directory </a> that the Java files are generated into using <tt>-outdir</tt>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -837,7 +837,7 @@ public interface exampleConstants {
|
||||||
Note that SWIG has inferred the C type and used an appropriate Java type that will fit the range of all possible values for the C type.
|
Note that SWIG has inferred the C type and used an appropriate Java type that will fit the range of all possible values for the C type.
|
||||||
By default SWIG generates <b>runtime constants</b>. They are not <b>compiler constants</b> that can, for example, be used
|
By default SWIG generates <b>runtime constants</b>. They are not <b>compiler constants</b> that can, for example, be used
|
||||||
in a switch statement. This can be changed by using the <tt>%javaconst(flag)</tt> directive. It works like all
|
in a switch statement. This can be changed by using the <tt>%javaconst(flag)</tt> directive. It works like all
|
||||||
the other <a href="Customization.html#features">%feature directives</a>. The default is <tt>%javaconst(0)</tt>.
|
the other <a href="Customization.html#Customization_features">%feature directives</a>. The default is <tt>%javaconst(0)</tt>.
|
||||||
It is possible to initialize all wrapped constants from pure Java code by placing a <tt>%javaconst(1)</tt> <b>before</b> SWIG parses the constants.
|
It is possible to initialize all wrapped constants from pure Java code by placing a <tt>%javaconst(1)</tt> <b>before</b> SWIG parses the constants.
|
||||||
Putting it at the top of your interface file would ensure this.
|
Putting it at the top of your interface file would ensure this.
|
||||||
Here is an example:
|
Here is an example:
|
||||||
|
|
@ -3751,7 +3751,7 @@ in any way---the extensions only show up in the Java interface.
|
||||||
If a C or C++ function throws an error, you may want to convert that error into a Java
|
If a C or C++ function throws an error, you may want to convert that error into a Java
|
||||||
exception. To do this, you can use the <tt>%exception</tt> directive. The <tt>%exception</tt> directive
|
exception. To do this, you can use the <tt>%exception</tt> directive. The <tt>%exception</tt> directive
|
||||||
simply lets you rewrite part of the generated wrapper code to include an error check.
|
simply lets you rewrite part of the generated wrapper code to include an error check.
|
||||||
It is detailed in full in the <a href="Customization.html#exception">Exception handling with %exception</a> section.
|
It is detailed in full in the <a href="Customization.html#Customization_exception">Exception handling with %exception</a> section.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -893,7 +893,7 @@ char *foo();
|
||||||
This will release the result if the appropriate target language support is available.
|
This will release the result if the appropriate target language support is available.
|
||||||
SWIG provides the appropriate "newfree" typemap for <tt>char *</tt> so that the memory is released,
|
SWIG provides the appropriate "newfree" typemap for <tt>char *</tt> so that the memory is released,
|
||||||
however, you may need to provide your own "newfree" typemap for other types.
|
however, you may need to provide your own "newfree" typemap for other types.
|
||||||
See <a href="Customization.html#ownership">Object ownership and %newobject</a> for more details.
|
See <a href="Customization.html#Customization_ownership">Object ownership and %newobject</a> for more details.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="Library_nn12"></a>8.3.4 cstring.i</H3>
|
<H3><a name="Library_nn12"></a>8.3.4 cstring.i</H3>
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ The generated SWIG Code will be:
|
||||||
want to lispify the names, also, before we forget you want to
|
want to lispify the names, also, before we forget you want to
|
||||||
export the generated lisp names. To do this, we will use the
|
export the generated lisp names. To do this, we will use the
|
||||||
SWIG <a
|
SWIG <a
|
||||||
href="Customization.html#features">feature directive</a>.
|
href="Customization.html#Customization_features">feature directive</a>.
|
||||||
Let's edit the interface file such that the C type "div_t*" is changed
|
Let's edit the interface file such that the C type "div_t*" is changed
|
||||||
to Lisp type ":my-pointer", we lispify all names,
|
to Lisp type ":my-pointer", we lispify all names,
|
||||||
export everything, and do some more stuff.
|
export everything, and do some more stuff.
|
||||||
|
|
|
||||||
|
|
@ -1105,7 +1105,7 @@ will require a pcall, followed by a set of if statements checking the type of th
|
||||||
<p>
|
<p>
|
||||||
All of this code assumes that your C++ code uses exception specification (which a lot doesn't).
|
All of this code assumes that your C++ code uses exception specification (which a lot doesn't).
|
||||||
If it doesn't consult the "<a href="SWIGPlus.html#SWIGPlus_catches">Exception handling with %catches</a>" section
|
If it doesn't consult the "<a href="SWIGPlus.html#SWIGPlus_catches">Exception handling with %catches</a>" section
|
||||||
and the "<a href="Customization.html#exception">Exception handling with %exception</a>" section, for more details on how to
|
and the "<a href="Customization.html#Customization_exception">Exception handling with %exception</a>" section, for more details on how to
|
||||||
add exception specification to functions or globally (respectively).
|
add exception specification to functions or globally (respectively).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -483,7 +483,7 @@ like
|
||||||
<li>
|
<li>
|
||||||
How to manage storage with the garbage collector of Modula-3?
|
How to manage storage with the garbage collector of Modula-3?
|
||||||
Support for
|
Support for
|
||||||
<a href="Customization.html#ownership">
|
<a href="Customization.html#Customization_ownership">
|
||||||
<tt>%newobject</tt> and <tt>%typemap(newfree)</tt></a>
|
<tt>%newobject</tt> and <tt>%typemap(newfree)</tt></a>
|
||||||
isn't implemented, yet.
|
isn't implemented, yet.
|
||||||
What's about resources that are managed by the garbage collector
|
What's about resources that are managed by the garbage collector
|
||||||
|
|
@ -494,7 +494,7 @@ as far as I know.
|
||||||
<li>
|
<li>
|
||||||
How to turn C++ exceptions into Modula-3 exceptions?
|
How to turn C++ exceptions into Modula-3 exceptions?
|
||||||
There's also no support for
|
There's also no support for
|
||||||
<a href="Customization.html#exception">
|
<a href="Customization.html#Customization_exception">
|
||||||
<tt>%exception</tt></a>, yet.
|
<tt>%exception</tt></a>, yet.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<li><a href="#Modules_introduction">Modules Introduction</a>
|
<li><a href="#Modules_introduction">Modules Introduction</a>
|
||||||
<li><a href="#Modules_nn1">Basics</a>
|
<li><a href="#Modules_nn1">Basics</a>
|
||||||
<li><a href="#Modules_nn2">The SWIG runtime code</a>
|
<li><a href="#Modules_nn2">The SWIG runtime code</a>
|
||||||
<li><a href="#external_run_time">External access to the runtime</a>
|
<li><a href="#Modules_external_run_time">External access to the runtime</a>
|
||||||
<li><a href="#Modules_nn4">A word of caution about static libraries</a>
|
<li><a href="#Modules_nn4">A word of caution about static libraries</a>
|
||||||
<li><a href="#Modules_nn5">References</a>
|
<li><a href="#Modules_nn5">References</a>
|
||||||
<li><a href="#Modules_nn6">Reducing the wrapper file size</a>
|
<li><a href="#Modules_nn6">Reducing the wrapper file size</a>
|
||||||
|
|
@ -241,7 +241,7 @@ can peacefully coexist. So the type structures are separated by the
|
||||||
is empty. Only modules compiled with the same pair will share type information.
|
is empty. Only modules compiled with the same pair will share type information.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H2><a name="external_run_time"></a>15.4 External access to the runtime</H2>
|
<H2><a name="Modules_external_run_time"></a>15.4 External access to the runtime</H2>
|
||||||
|
|
||||||
|
|
||||||
<p>As described in <a href="Typemaps.html#runtime_type_checker">The run-time type checker</a>,
|
<p>As described in <a href="Typemaps.html#runtime_type_checker">The run-time type checker</a>,
|
||||||
|
|
|
||||||
|
|
@ -2921,7 +2921,7 @@ not even sure if it really works).
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
It is possible to override the SWIG generated proxy/shadow methods, using <tt>%feature("shadow")</tt>.
|
It is possible to override the SWIG generated proxy/shadow methods, using <tt>%feature("shadow")</tt>.
|
||||||
It works like all the other <a href="Customization.html#features">%feature directives</a>.
|
It works like all the other <a href="Customization.html#Customization_features">%feature directives</a>.
|
||||||
Here is a simple example showing how to add some Perl debug code to the constructor:
|
Here is a simple example showing how to add some Perl debug code to the constructor:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
<li><a href="#Ruby_nn22">C++ namespaces</a>
|
<li><a href="#Ruby_nn22">C++ namespaces</a>
|
||||||
<li><a href="#Ruby_nn23">C++ templates</a>
|
<li><a href="#Ruby_nn23">C++ templates</a>
|
||||||
<li><a href="#Ruby_nn23_1">C++ Standard Template Library (STL)</a>
|
<li><a href="#Ruby_nn23_1">C++ Standard Template Library (STL)</a>
|
||||||
<li><a href="#C_STL_Functors">C++ STL Functors</a>
|
<li><a href="#Ruby_C_STL_Functors">C++ STL Functors</a>
|
||||||
<li><a href="#Ruby_C_Iterators">C++ STL Iterators</a>
|
<li><a href="#Ruby_C_Iterators">C++ STL Iterators</a>
|
||||||
<li><a href="#Ruby_nn24">C++ Smart Pointers</a>
|
<li><a href="#Ruby_nn24">C++ Smart Pointers</a>
|
||||||
<li><a href="#Ruby_nn25">Cross-Language Polymorphism</a>
|
<li><a href="#Ruby_nn25">Cross-Language Polymorphism</a>
|
||||||
|
|
@ -2336,7 +2336,7 @@ chapter.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<H3><a name="C_STL_Functors"></a>32.3.14 C++ STL Functors</H3>
|
<H3><a name="Ruby_C_STL_Functors"></a>32.3.14 C++ STL Functors</H3>
|
||||||
|
|
||||||
|
|
||||||
<p>Some containers in the STL allow you to modify their default
|
<p>Some containers in the STL allow you to modify their default
|
||||||
|
|
@ -6089,7 +6089,7 @@ a function. For example:</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p> See <a href="http://www.swig.org/Doc1.3/SWIGDocumentation.html#ownership">Object
|
<p> See <a href="http://www.swig.org/Doc1.3/SWIGDocumentation.html#Customization_ownership">Object
|
||||||
ownership and %newobject</a> for further details.</p>
|
ownership and %newobject</a> for further details.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -10050,7 +10050,7 @@ above. For example:</p>
|
||||||
<p>In this case, the default SWIG behavior for calling member
|
<p>In this case, the default SWIG behavior for calling member
|
||||||
functions is incorrect. The Ruby object should assume ownership of the
|
functions is incorrect. The Ruby object should assume ownership of the
|
||||||
returned object. This can be done by using the %newobject directive.
|
returned object. This can be done by using the %newobject directive.
|
||||||
See <a href="file:///d:/msys/1.0/src/SWIG/Doc/Manual/Customization.html#ownership">
|
See <a href="file:///d:/msys/1.0/src/SWIG/Doc/Manual/Customization.html#Customization_ownership">
|
||||||
Object ownership and %newobject</a> for more information. </p>
|
Object ownership and %newobject</a> for more information. </p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1618,7 +1618,7 @@ double y; // Read-write
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <tt>%mutable</tt> and <tt>%immutable</tt> directives are actually
|
The <tt>%mutable</tt> and <tt>%immutable</tt> directives are actually
|
||||||
<a href="Customization.html#features">%feature directives</a> defined like this:
|
<a href="Customization.html#Customization_features">%feature directives</a> defined like this:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="code"><pre>
|
<div class="code"><pre>
|
||||||
|
|
@ -1742,7 +1742,7 @@ declarations. If you need to remove a whole section of problematic code, the SW
|
||||||
<p>
|
<p>
|
||||||
More powerful variants of <tt>%rename</tt> and <tt>%ignore</tt> directives can be used to help
|
More powerful variants of <tt>%rename</tt> and <tt>%ignore</tt> directives can be used to help
|
||||||
wrap C++ overloaded functions and methods or C++ methods which use default arguments. This is described in the
|
wrap C++ overloaded functions and methods or C++ methods which use default arguments. This is described in the
|
||||||
<a href="SWIGPlus.html#ambiguity_resolution_renaming">Ambiguity resolution and renaming</a> section in the C++ chapter.
|
<a href="SWIGPlus.html#SWIGPlus_ambiguity_resolution_renaming">Ambiguity resolution and renaming</a> section in the C++ chapter.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#SWIGPlus_nn24">Dispatch function generation</a>
|
<li><a href="#SWIGPlus_nn24">Dispatch function generation</a>
|
||||||
<li><a href="#SWIGPlus_nn25">Ambiguity in Overloading</a>
|
<li><a href="#SWIGPlus_nn25">Ambiguity in Overloading</a>
|
||||||
<li><a href="#ambiguity_resolution_renaming">Ambiguity resolution and renaming</a>
|
<li><a href="#SWIGPlus_ambiguity_resolution_renaming">Ambiguity resolution and renaming</a>
|
||||||
<li><a href="#SWIGPlus_nn27">Comments on overloading</a>
|
<li><a href="#SWIGPlus_nn27">Comments on overloading</a>
|
||||||
</ul>
|
</ul>
|
||||||
<li><a href="#SWIGPlus_nn28">Wrapping overloaded operators</a>
|
<li><a href="#SWIGPlus_nn28">Wrapping overloaded operators</a>
|
||||||
|
|
@ -1128,7 +1128,7 @@ For example if a method has ten default arguments, then eleven wrapper methods a
|
||||||
<p>
|
<p>
|
||||||
Please see the <a href="Customization.html#Customization_features_default_args">Features and default arguments</a>
|
Please see the <a href="Customization.html#Customization_features_default_args">Features and default arguments</a>
|
||||||
section for more information on using <tt>%feature</tt> with functions with default arguments.
|
section for more information on using <tt>%feature</tt> with functions with default arguments.
|
||||||
The <a href="#ambiguity_resolution_renaming">Ambiguity resolution and renaming</a> section
|
The <a href="#SWIGPlus_ambiguity_resolution_renaming">Ambiguity resolution and renaming</a> section
|
||||||
also deals with using <tt>%rename</tt> and <tt>%ignore</tt> on methods with default arguments.
|
also deals with using <tt>%rename</tt> and <tt>%ignore</tt> on methods with default arguments.
|
||||||
If you are writing your own typemaps for types used in methods with default arguments, you may also need to write a <tt>typecheck</tt> typemap.
|
If you are writing your own typemaps for types used in methods with default arguments, you may also need to write a <tt>typecheck</tt> typemap.
|
||||||
See the <a href="Typemaps.html#Typemaps_overloading">Typemaps and overloading</a> section for details or otherwise
|
See the <a href="Typemaps.html#Typemaps_overloading">Typemaps and overloading</a> section for details or otherwise
|
||||||
|
|
@ -2127,7 +2127,7 @@ it means that the target language module has not yet implemented support for ove
|
||||||
functions and methods. The only way to fix the problem is to read the next section.
|
functions and methods. The only way to fix the problem is to read the next section.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="ambiguity_resolution_renaming"></a>6.15.3 Ambiguity resolution and renaming</H3>
|
<H3><a name="SWIGPlus_ambiguity_resolution_renaming"></a>6.15.3 Ambiguity resolution and renaming</H3>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -4103,7 +4103,7 @@ more advanced namespace support.
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Some target languages provide support for the <tt>nspace</tt> <a href="Customization.html#features">feature</a>.
|
Some target languages provide support for the <tt>nspace</tt> <a href="Customization.html#Customization_features">feature</a>.
|
||||||
The feature can be applied to any class, struct, union or enum declared within a named namespace.
|
The feature can be applied to any class, struct, union or enum declared within a named namespace.
|
||||||
The feature wraps the type within the target language specific concept of a namespace,
|
The feature wraps the type within the target language specific concept of a namespace,
|
||||||
for example, a Java package or C# namespace.
|
for example, a Java package or C# namespace.
|
||||||
|
|
@ -4304,7 +4304,7 @@ is outlined in the <a href="Typemaps.html#throws_typemap">"throws" typemap</a> s
|
||||||
<p>
|
<p>
|
||||||
Since exception specifications are sometimes only used sparingly, this alone may not be enough to
|
Since exception specifications are sometimes only used sparingly, this alone may not be enough to
|
||||||
properly handle C++ exceptions. To do that, a different set of special SWIG directives are used.
|
properly handle C++ exceptions. To do that, a different set of special SWIG directives are used.
|
||||||
Consult the "<a href="Customization.html#exception">Exception handling with %exception</a>" section for details.
|
Consult the "<a href="Customization.html#Customization_exception">Exception handling with %exception</a>" section for details.
|
||||||
The next section details a way of simulating an exception specification or replacing an existing one.
|
The next section details a way of simulating an exception specification or replacing an existing one.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2503,7 +2503,7 @@ string *foo();
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
See <a href="Customization.html#ownership">Object ownership and %newobject</a> for further details.
|
See <a href="Customization.html#Customization_ownership">Object ownership and %newobject</a> for further details.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="Typemaps_nn35"></a>10.5.10 "memberin" typemap</H3>
|
<H3><a name="Typemaps_nn35"></a>10.5.10 "memberin" typemap</H3>
|
||||||
|
|
@ -2587,7 +2587,7 @@ catch(char const *_e) {
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Note that if your methods do not have an exception specification yet they do throw exceptions, SWIG cannot know how to deal with them.
|
Note that if your methods do not have an exception specification yet they do throw exceptions, SWIG cannot know how to deal with them.
|
||||||
For a neat way to handle these, see the <a href="Customization.html#exception">Exception handling with %exception</a> section.
|
For a neat way to handle these, see the <a href="Customization.html#Customization_exception">Exception handling with %exception</a> section.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H2><a name="Typemaps_nn39"></a>10.6 Some typemap examples</H2>
|
<H2><a name="Typemaps_nn39"></a>10.6 Some typemap examples</H2>
|
||||||
|
|
@ -3075,7 +3075,7 @@ what the "optimal" attribute is telling SWIG to do.
|
||||||
<p>
|
<p>
|
||||||
The "optimal" attribute optimisation is not turned on by default as it has a number of restrictions.
|
The "optimal" attribute optimisation is not turned on by default as it has a number of restrictions.
|
||||||
Firstly, some code cannot be condensed into a simple call for passing into the copy constructor.
|
Firstly, some code cannot be condensed into a simple call for passing into the copy constructor.
|
||||||
One common occurrence is when <a href="Customization.html#exception">%exception</a> is used.
|
One common occurrence is when <a href="Customization.html#Customization_exception">%exception</a> is used.
|
||||||
Consider adding the following <tt>%exception</tt> to the example:
|
Consider adding the following <tt>%exception</tt> to the example:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -3610,7 +3610,7 @@ structures are chained together in a circularly linked list.
|
||||||
|
|
||||||
<p>This section covers how to use these functions from typemaps. To learn how to
|
<p>This section covers how to use these functions from typemaps. To learn how to
|
||||||
call these functions from external files (not the generated _wrap.c file), see
|
call these functions from external files (not the generated _wrap.c file), see
|
||||||
the <a href="Modules.html#external_run_time">External access to the run-time system</a>
|
the <a href="Modules.html#Modules_external_run_time">External access to the run-time system</a>
|
||||||
section.</p>
|
section.</p>
|
||||||
|
|
||||||
<p>When pointers are converted in a typemap, the typemap code often looks
|
<p>When pointers are converted in a typemap, the typemap code often looks
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ int foo(double); // Silently ignored.
|
||||||
<p>
|
<p>
|
||||||
The <tt>%warnfilter</tt> directive has the same semantics as other declaration modifiers like
|
The <tt>%warnfilter</tt> directive has the same semantics as other declaration modifiers like
|
||||||
<tt>%rename</tt>, <tt>%ignore</tt> and <tt>%feature</tt>, see the
|
<tt>%rename</tt>, <tt>%ignore</tt> and <tt>%feature</tt>, see the
|
||||||
<a href="Customization.html#features">%feature directive</a> section. For example, if you wanted to
|
<a href="Customization.html#Customization_features">%feature directive</a> section. For example, if you wanted to
|
||||||
suppress a warning for a method in a class hierarchy, you could do this:
|
suppress a warning for a method in a class hierarchy, you could do this:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue