Fixes for HTML to validate

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6231 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-09-06 21:37:00 +00:00
commit 8f6341859e
30 changed files with 265 additions and 355 deletions

View file

@ -49,7 +49,6 @@ or not a wrapper generator can parse C++ is clearly the wrong question
to ask. Instead, the real question is whether or not a wrapper
generation tool that parses C++ can actually do anything useful.
<p>
<h3>The problem with using C++ as an interface definition language</h3>
If you cut through all of the low-level details of parsing, the primary
@ -100,7 +99,6 @@ more than just parse C++---it must give users the freedom to customize
various aspects of the wrapper generation process. Again, things aren't
looking too good for C++.
<p>
<h3>The SWIG approach: pattern matching</h3>
SWIG takes a different approach to the C++ wrapping problem.
@ -172,8 +170,8 @@ For example:
%exception Foo::getitem(int) {
try {
$action
} catch (std::out_of_range& e) {
SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
} catch (std::out_of_range&amp; e) {
SWIG_exception(SWIG_IndexError,const_cast&lt;char*&gt;(e.what()));
}
}
@ -181,7 +179,7 @@ For example:
template&lt;class T&gt; class Foo {
public:
...
T &getitem(int index); // Exception handling code attached
T &amp;getitem(int index); // Exception handling code attached
...
};
</pre>
@ -194,7 +192,7 @@ declaration that appears later in the input. This means that raw C++
header files can often be parsed and customized with few, if any,
modifications.
<h3>The SWIG difference</h2>
<h3>The SWIG difference</h3>
Pattern based approaches to wrapper code generation are not unique to SWIG.
However, most prior efforts have based their pattern matching engines on simple

View file

@ -1,6 +1,6 @@
SWIG Bug Tracking
<p><img src="images/bugs.png">
<p><img src="images/bugs.png" alt="Bugs">
<p>A <a href="http://sourceforge.net/bugs/?group_id=1645">bug-tracking system</a> for SWIG
is located on <a href="http://sourceforge.net">SourceForge</a>.
@ -8,13 +8,13 @@ Please log on to SourceForge before submitting a bug.
Anonymous bug submitters won't be able to receive emails on the bug progress.
This might be a problem should we require further feedback on the bug.
<p/>
<p>
Users who have found a bug and fixed it themselves can submit a
<a href="http://sourceforge.net/patch/?group_id=1645">patch</a>.
Please give the SWIG version or CVS snapshot date that the patch is against.
Again, please log on to SourceForge before submitting patches.
<p/>
<p>
Please note that due to time constraints, bug reports may not
receive an immediate response.
If you have an urgent problem, you may want to

View file

@ -1,6 +1,5 @@
SWIG Features
<p>
<h2>SWIG Features</h2>
<p>
@ -107,6 +106,3 @@ hierarchies, template instantiations, and more. Features include:
<li>Extended SWIG macro handling.
</ul>
</body>
</html>

View file

@ -1,9 +1,8 @@
Proposed SWIG Copyright
<p>
<img src="images/copyright.png">
<img src="images/copyright.png" alt="Copyright">
<p>
<pre>
Simplified Wrapper and Interface Generator (SWIG)

View file

@ -1,7 +1,7 @@
SWIG Copyright
<p>
<img src="images/copyright.png">
<img src="images/copyright.png" alt="Copyright">
<pre>
Simplified Wrapper and Interface Generator (SWIG)
@ -70,3 +70,6 @@ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
</pre>

View file

@ -18,7 +18,7 @@ name in brackets and use the ampersand like this
<blockquote>
<pre>
void foo(Bar <&b>) {
void foo(Bar <&amp;b>) {
b.frag(3); // Call some method
...
}
@ -36,25 +36,24 @@ Obviously, there are a few complicated cases such as:
<blockquote>
<pre>
void foo(const Bar *const *<&b>);
void foo(const Bar *const *<&amp;b>);
</pre>
</blockquote>
The interpretation of this is left as an exercise to the reader (hey,
it's good to be a professor).
<p>
<li><b>Circular shift operators.</b> Sure, one doesn't really need to
<li><p><b>Circular shift operators.</b> Sure, one doesn't really need to
do a circular bit shift very often, but they are sometimes useful in
cryptographic algorithms and for general-purpose bit-twiddling. I
propose the inclusion of the triple angle bracket operators
(<tt>&lt;&lt;&lt</tt> and <tt>&gt;&gt;&gt;</tt>) for this purpose. Of
(<tt>&lt;&lt;&lt;</tt> and <tt>&gt;&gt;&gt;</tt>) for this purpose. Of
course, these operators could also be overloaded just like the normal
shift operators. It's not that I really need these operators, but it
is yet another opportunity to include more angle brackets into the
language.
<p>
<li><b>The survival cast.</b> I'm not really sure where I got this idea,
<li><p><b>The survival cast.</b> I'm not really sure where I got this idea,
but basically it works like this: given an object, you can cast it using
a <tt>survival_cast</tt> like this
@ -87,13 +86,11 @@ precise mechanism and scope of destruction is implementation specific
and may depend on the type of objects to which the survival cast has
been applied.
<p>
<li><b>The non-castable function pointer</b>. Since function pointers are
<li><p><b>The non-castable function pointer</b>. Since function pointers are
too confusing for everyone, it should be impossible to cast them into any
other type. Oh wait, this is already a C++ feature.
<p>
<li><b>The identifier length cast</b>. Since we're on the subject of casting.... I would
<li><p><b>The identifier length cast</b>. Since we're on the subject of casting.... I would
also like to propose the identifier length cast. This is a cast that only works
if the identifier names of the two types are exactly the same length in
characters. For example:
@ -109,8 +106,7 @@ In addition, there should be an <tt>identifier_case_cast</tt> that works similar
which looks at the case of the type names. I'm not really sure what purpose these casts
would serve, but that doesn't really distinguish them from any of the other casts.
<p>
<li><b>The instance goto</b>. In a nutshell, I really want to be able to do
<li><p><b>The instance goto</b>. In a nutshell, I really want to be able to do
this:
<blockquote>
@ -140,20 +136,19 @@ possibilities of combining template classes with goto. For example:
<blockquote>
<pre>
template class Foo<x> {
template class Foo&lt;x&gt; {
public:
x:
... some code here ...
break;
...
};
</blockquote>
</pre>
</blockquote>
Clearly, the number of applications is endless.
<p>
<li><b>MP3 player</b>. Since compiling a C++ application takes so long, I think
<li><p><b>MP3 player</b>. Since compiling a C++ application takes so long, I think
it would be useful to modify the C++ compiler to go out and search the net for an
appropriate symphony or sonata to download and play while it is working. Ahhhh. Yes.
Of course, if you have a DVD player handy, I have personally found that watching "Apocalypse Now"

View file

@ -1,14 +1,11 @@
SWIG CVS
<p>
<img src="images/cvs.png">
<p>
<img src="images/cvs.png" alt="CVS">
<p>
Development versions of SWIG are available through the CVS server located at SourceForge.
<p>
<h3> Disclaimer </h3>
The CVS release represents work in progress and is not guaranteed to compile on your machine or be functional in any
@ -37,36 +34,28 @@ There are
available on the SourceForge site, but the following steps should be all you need.
<ol>
<li> Set the location of CVSROOT
<li><p> Set the location of CVSROOT
<p>
<pre>
% setenv CVSROOT :pserver:anonymous@cvs.sourceforge.net:/cvsroot/swig </pre>
<p>
(Alternatively, you can use the -d option to CVS)
<p>
<li> Log into the cvs server by issuing the following command:
<li><p> Log into the cvs server by issuing the following command:
<p>
<pre>
% cvs login
CVS password: &lt;press enter here&gt
CVS password: &lt;press enter here&gt;
</pre>
<p>
<p>
<li>The latest development version of SWIG can be retrieved using
<li><p>The latest development version of SWIG can be retrieved using
<p>
<pre>
% cvs checkout SWIG
</pre>
</p>
<p>
<li>To build the system, follow these steps
<p>
<li><p>To build the system, follow these steps
<pre>
% cd SWIG
% ./autogen.sh
@ -75,9 +64,8 @@ CVS password: &lt;press enter here&gt
% make install
</pre>
<p>
<li>To check the build, run the tests:
<p>
<li><p>To check the build, run the tests:
<pre>
% make -k check </pre>
This could take up to an hour or longer. If you are interested in a particular language,
@ -94,7 +82,7 @@ accept code modifications unless you are a developer.
<h3> Build Issues </h3>
Here are some guidelines should you be experiencing problems building SWIG from CVS.
<p>
<ol>
<li>Check that you have a complete update from the SWIG CVS repository.
@ -124,11 +112,10 @@ If you are still having problems, send an email to <a href="mail.html">swig-dev<
We are always looking for people to help out with various projects.
<ul>
<li> Send email to to the <a href="mail.html">swig-dev</a> mailing list.
<li><p> Send email to to the <a href="mail.html">swig-dev</a> mailing list.
if you are interested in doing developer work and gaining write access to the CVS repository.
<p>
<li> The <a href="mail.html">swig-dev</a> mailing list is the developer mailing list
<li><p> The <a href="mail.html">swig-dev</a> mailing list is the developer mailing list
and should be used to discuss coding issues, bugs, patches, and so forth.
Subscription information and archives of recent activity can be found on the <a href="mail.html">mailing lists</a> page.
</ul>

View file

@ -1,3 +1,3 @@
<center>
<img src="images/swig17.png">
<img src="images/swig17.png" alt="SWIG image">
</center>

View file

@ -1,11 +1,12 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<title>$title</title>
<body bgcolor="#ffffff" link="#0000ff" vlink="#8000ff">
<table width=780 border=0 cellpadding=0 cellspacing=0>
<table width=780 border=0 cellpadding=0 cellspacing=0 summary="Main web page">
<tr>
<td valign=top bgcolor="#000000">
<table width=180 valign=top cellpadding=0 cellspacing=0>
<td valign=middle bgcolor="#000000">
<table width=180 cellpadding=0 cellspacing=0 summary="Corner section">
<tr>
<td>
$corner
@ -13,10 +14,10 @@ $corner
</tr>
</table>
</td>
<td valign=top bgcolor="#e0e0e0">
<table width=600 cellpadding=0 cellspacing=0>
<td valign=middle bgcolor="#e0e0e0">
<table width=600 cellpadding=0 cellspacing=0 summary="Top section">
<tr>
<td valign=center>
<td valign=middle>
$top
</td>
</tr>
@ -25,7 +26,7 @@ $top
</tr>
<tr>
<td valign=top bgcolor="#e0e0e0">
<table width=180 valign=top>
<table width=180 summary="Side section">
<tr>
<td>
$side
@ -34,7 +35,7 @@ $side
</table>
</td>
<td valign=top>
<table width=600 valign=top>
<table width=600 summary="Web page body">
<tr>
<td>
$body

View file

@ -1,4 +1,4 @@
<table width="100%">
<table width="100%" summary="Side section links">
<tr>
<td bgcolor="#000000" align=center><font color="#ffffff"><b>Information</b></font></td>
</tr>
@ -30,7 +30,7 @@
<tr><td><a href="http://www.ocaml.org/">Ocaml</a></td></tr>
<tr><td bgcolor="#000000" align=center><font color="#ffffff"><b>Our Generous Host</b></font></td></tr>
<tr><td align=center><a href="http://sourceforge.net"><IMG src="http://sourceforge.net/images/sflogo2-steel.png" vspace="0" border=0></A></td></tr>
<tr><td align=center><a href="http://sourceforge.net"><img src="http://sourceforge.net/images/sflogo2-steel.png" vspace="0" border=0 alt="SourceForge logo"></A></td></tr>
</table>

View file

@ -1,4 +1,4 @@
<table width="100%" height=50 cellpadding=0 border=0>
<table width="100%" cellpadding=0 border=0 summary="Top section links">
<tr>
<td><a href="index.html">Home</a></td>
<td><a href="http://sourceforge.net/project/?group_id=1645">Development</a></td>

View file

@ -1,8 +1,6 @@
SWIG Documentation, Presentations, and Papers
<p><img src="images/doc.png">
<p>
<p><img src="images/doc.png" alt="Documentation">
<H3>SWIG-1.3</h3>
<ul>
@ -24,24 +22,20 @@ This paper, presented at the 1998 O'Reilly Perl Conference, describes the use
of SWIG with Perl5 and covers many advanced topics.
[ <a href="papers/Perl98/swigperl.pdf">PDF</a> ]. <br>
<p>
<li> <b><a href="papers/Tcl98/TclChap.html">Tcl and SWIG as a C/C++ Development Tool</a></b>.
<li><p> <b><a href="papers/Tcl98/TclChap.html">Tcl and SWIG as a C/C++ Development Tool</a></b>.
Originally written as a draft for a book chapter, this paper provides an overview of
using Tcl and SWIG. It also appears on the CD-ROM accompanying "Tcl/Tk for Real Programmers"
by Clif Flynt.<br>
<p>
<li> <b><a href="papers/Tcl96/tcl96.html">SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++</a></b>.
<li><p> <b><a href="papers/Tcl96/tcl96.html">SWIG : An Easy to Use Tool for Integrating Scripting Languages with C and C++</a></b>.
While a little dated, this is the first SWIG paper. Presented at
the 4th Tcl/Tk Workshop, Monterey, California, July 6-10, 1996. Also available
from <a href="http://www.usenix.org/publications/library/proceedings/tcl96/beazley.html">USENIX</a>. <br>
<p>
<li> <b><a href="papers/Py96/python96.html">Using SWIG to Control, Prototype, and Debug
<li><p> <b><a href="papers/Py96/python96.html">Using SWIG to Control, Prototype, and Debug
C Programs with Python</a></b>. Presented at the 4th International Python Conference,
Livermore, California, June, 1996. <br>
<p>
<li> <b><a href="papers/Py97/beazley.html">Feeding a Large-scale Physics Application to Python</a></b>. Presented at the 6th International Python Conference, San Jose, California.
October 14-17, 1997. This paper describes the use of Python/SWIG with a high-performance
physics application. This application was a runner-up in the 1998
@ -49,7 +43,6 @@ Gordon-Bell prize for achieving 10 Gflops sustained performance on the
<a href="http://loki-www.lanl.gov/papers/sc98/">Avalon</a> Linux
Cluster at Los Alamos National Laboratory. <br>
<p>
</ul>
<h3> Tutorials about SWIG </h3>
@ -58,12 +51,10 @@ Cluster at Los Alamos National Laboratory. <br>
<li> <b><a href="papers/PyTutorial98/PyTutorial98.pdf">Interfacing C/C++ and Python with SWIG</a></b> (PDF).
Half-day tutorial presented at the 7th International Python Conference, November, 1998. <br>
<p>
<li> <b><a href="papers/PyTutorial97/PyTutorial97.pdf">Interfacing C/C++ and Python with SWIG</a></b> (PDF).
<li><p> <b><a href="papers/PyTutorial97/PyTutorial97.pdf">Interfacing C/C++ and Python with SWIG</a></b> (PDF).
Half-day tutorial presented at the 6th International Python Conference, October, 1997. <br>
<p>
<li> <b><a href="papers/TclTutorial98/TclTutorial98.pdf">Tcl Extension Building with SWIG</a></b> (PDF). Tutorial presented at the 1998 Tcl/Tk Conference. </br>
<li><p> <b><a href="papers/TclTutorial98/TclTutorial98.pdf">Tcl Extension Building with SWIG</a></b> (PDF). Tutorial presented at the 1998 Tcl/Tk Conference. <br>
</ul>
<h3> Other Resources </h3>
@ -72,30 +63,25 @@ Half-day tutorial presented at the 6th International Python Conference, October,
<li> Perl users can find more information about SWIG in the O'Reilly book
<a href="http://www.ora.com/catalog/advperl">"Advanced Perl Programming"</a>. <br>
<p>
<li> Daniel Blezek wrote an article about SWIG in the November, 1998 issue
<li><p> Daniel Blezek wrote an article about SWIG in the November, 1998 issue
of the <a href="http://www.cuj.com/archive/1611/index.html">C/C++ Users Journal</a>.
<p>
<li>An article about SWIG appeared in the February, 1998 issue
<li><p>An article about SWIG appeared in the February, 1998 issue
of <a href="http://www.ddj.com/ddj/1998/1998_02/index.htm">Dr. Dobb's Journal</a> on
Scripting and Alternative Languages. <br>
<p>
<li>Scott Bolte wrote an article about SWIG in the Winter, 1997 issue of
<li><p>Scott Bolte wrote an article about SWIG in the Winter, 1997 issue of
<a href="http://www.tpj.com">The Perl Journal</a>. <br>
<p>
<li> John Ousterhout's <a href="http://home.pacbell.net/ouster/scripting.html">
<li><p> John Ousterhout's <a href="http://home.pacbell.net/ouster/scripting.html">
paper </a> on scripting languages provides a good overview
of the use of scripting languages and their relationship to
systems programming languages. SWIG was developed with many of these issues
in mind so this paper might be of interest to users who are new to
SWIG and its goals. <br>
<p>
<li> <b><a href="http://www.supercomp.org/sc96/proceedings/SC96PROC/BEAZLEY/INDEX.HTM"> Lightweight Computational Steering of Very Large Scale Molecular Dynamics Simulations </a></b>.
<li><p> <b><a href="http://www.supercomp.org/sc96/proceedings/SC96PROC/BEAZLEY/INDEX.HTM"> Lightweight Computational Steering of Very Large Scale Molecular Dynamics Simulations </a></b>.
Presented at Supercomputing'96. This paper describes the application that
motivated the development of SWIG. (See why SWIG was originally developed). <br>

View file

@ -22,7 +22,7 @@ languages with C/C++ code.
<p>SWIG is used in a number of ways:
<ul>
<li><b>Building more powerful C/C++ programs</b>. Using SWIG, you can
<li><p><b>Building more powerful C/C++ programs</b>. Using SWIG, you can
replace the main() function of a C program with a scripting
interpreter from which you can control the application. This adds
quite a lot of flexibility and makes the program "programmable." That
@ -33,22 +33,19 @@ of the large software packages that you use every day---nearly all of
them include special a macro language, configuration language, or even
a scripting engine that allows users to make customizations.
<p>
<li><b>Rapid prototyping and debugging</b>. SWIG allows C/C++ programs to be placed in
<li><p><b>Rapid prototyping and debugging</b>. SWIG allows C/C++ programs to be placed in
a scripting environment that can be used for testing and debugging.
For example, you might test a library with a collection of scripts or use the scripting
interpreter as an interactive debugger. Since SWIG requires no modifications to the
underlying C/C++ code, it can be used even if the final product does not rely upon scripting.
<p>
<li><b>Systems integration</b>. Scripting languages work fairly well
<li><p><b>Systems integration</b>. Scripting languages work fairly well
for controlling and gluing loosely-coupled software components
together. With SWIG, different C/C++ programs can be turned into
scripting language extension modules. These modules can then be
combined together to create new and interesting applications.
<p>
<li><b>Construction of scripting language extension modules</b>. SWIG
<li><p><b>Construction of scripting language extension modules</b>. SWIG
can be used to turn common C/C++ libraries into components for use in
popular scripting languages. Of course, you will still want to make
sure that no-one else has already created a module before doing this.
@ -61,34 +58,30 @@ make it so you don't have to add an extra layer of IDL specifications
to your application. If anything, it's much more of a rapid
application development and prototyping tool. Specifically:
<p>
<ul>
<li><b>ANSI C/C++ syntax</b>. SWIG parses ANSI C++ that has been
<li><p><b>ANSI C/C++ syntax</b>. SWIG parses ANSI C++ that has been
extended with a number of special directives. As a result, interfaces
are usually built by grabbing a header file and tweaking it a little
bit. This particular approach is especially useful when the
underlying C/C++ program undergoes frequent modification.
<p>
<li><b>SWIG is not a stub generator</b>. SWIG produces code that you
<li><p><b>SWIG is not a stub generator</b>. SWIG produces code that you
simply compile and run. You don't have to fill in any stubs or write
special client/server code as you do with RPC-like systems.
<p>
<li><b>SWIG does not define a protocol nor is it a component
<li><p><b>SWIG does not define a protocol nor is it a component
framework.</b> SWIG does not define mechanisms or enforce rules
regarding the way in which software components are supposed to
interact with each other. Nor is it a specialized runtime library
or alternative scripting language API. SWIG is merely a code generator
that provides the glue necessary to hook C/C++ to other languages.
<p> <li><b>Designed to work with existing C/C++ code</b>. SWIG
<li><p><b>Designed to work with existing C/C++ code</b>. SWIG
requires little, if any, modifications to existing code. For the most
part, it encourages you to keep a clean separation between C/C++ and
its scripting interface.
<p>
<li><b>Extensibility</b>. SWIG provides a variety of customization options that
<li><p><b>Extensibility</b>. SWIG provides a variety of customization options that
allow you to blow your whole leg off if that's what you want to do.
SWIG is not here to enforce programming morality.
</ul>

View file

@ -1,7 +1,7 @@
SWIG FAQ
<p>
<img src="images/faq.png">
<img src="images/faq.png" alt="FAQ">
<p>
To date, there has been no FAQ for SWIG. As a result, you may want to

View file

@ -232,15 +232,14 @@ useful to know that the whole system is essentially being built around
three extensions to the C++ type system:
<ul>
<p>
<li><b>Typemaps.</b> Typemaps are rules that define the process by which
<li><p><b>Typemaps.</b> Typemaps are rules that define the process by which
data is converted between languages. They are fully integrated
with the C++ type system and they are applied using a type-based
pattern matching mechanism. All data conversion SWIG is
defined by typemaps and is fully reconfigurable.
<p>
<li><b>Declaration annotation.</b> There are special directives that modify
<li><p><b>Declaration annotation.</b> There are special directives that modify
the wrapping behavior of individual declarations. Declarations
can be selectively identified and decorated with arbitrary
attributes that affect wrapper generation. Like typemaps,
@ -248,8 +247,7 @@ three extensions to the C++ type system:
Almost all SWIG customization directives are a form of declaration
annotation.
<p>
<li><b>Class extension.</b> The ability to extend classes and structures
<li><p><b>Class extension.</b> The ability to extend classes and structures
with new methods/attributes when building wrappers. Classes
are part of the type system so class extension is naturally
integrated with the C++ type system as well (big surprise).
@ -325,37 +323,33 @@ developers do the same. However, we only have limited resources and
we need your help.
<ul>
<li>
<li><p>
If you like SWIG and find it useful, we need you to try new versions.
We want you to torture test the releases and to break them. We need
bug reports. No bug is too obscure or unimportant---we *will* fix it
if we can. We also need feedback about things that are annoying or
compatibility features that might help in going from 1.1 to 2.0.
<p>
<li> We need help with documentation, examples, testing, libraries, and all
<li><p> We need help with documentation, examples, testing, libraries, and all
sorts of other aspects of the release. Even if you have never
written a SWIG language module or dived into its implementation,
there are many ways that you can help. Consider writing a case study
about how you wrapped a big library. Contribute tests that break the
implementation in horrible ways. Help with the web page or FAQ.
<p>
<li> Most of the SWIG-1.3.x work has focused on the SWIG core. However, as
<li><p> Most of the SWIG-1.3.x work has focused on the SWIG core. However, as
the 2.0 release nears, we will be working on a variety of enhancements
to the language modules. If there are things you would like to see
in any of the language modules, you need to let us know.
<p>
<li> There are SWIG language modules that have not made it into the
<li><p> There are SWIG language modules that have not made it into the
distribution. Examples that I know about include ITCL, Swig-Eiffel,
and Swig-Lua. We would gladly make these part of the standard SWIG
distribution. However, we also need help to do it. Porting from
SWIG-1.1 is no easy task, but we're more than willing to help. It's
not as bad as one might imagine.
<p>
<li> We are always looking for developers. Subscribe to
<li><p> We are always looking for developers. Subscribe to
to the <a href="mail.html">swig-dev</a> mailing list
or send me email to get involved.
</ul>

View file

@ -5,15 +5,15 @@ Guilty Parties
<p>
<b>Active Developers</b>
<table cellpadding=0 cellspacing=8 width="100%" border=0>
<table cellpadding=0 cellspacing=8 width="100%" border=0 summary="Developer mugshots">
<tr>
<td>
<img src="images/Dave3.jpg"><br>
<img src="images/Dave3.jpg" alt="Dave Beazley"><br>
<b>Dave Beazley (Chicago, Illinois).</b><br>
SWIG core, type system, Python, Tcl, Perl.
</td>
<td>
<img src="images/luigi.jpg"><br>
<img src="images/luigi.jpg" alt="Luigi Ballabio"><br>
<b>Luigi Ballabio (Milano, Italy).</b><br>
Macintosh port, STL libraries, Python.
</td>
@ -21,12 +21,12 @@ Macintosh port, STL libraries, Python.
<tr>
<td>
<img src="images/fulton3.jpg"><br>
<img src="images/fulton3.jpg" alt="William Fulton"><br>
<b>William Fulton (Bath, UK).</b> <br>
Java and C# modules. Cygwin/Windows.
</td>
<td>
<img src="images/lyle.jpg"><br>
<img src="images/lyle.jpg" alt="Lyle Johnson"><br>
<b>Lyle Johnson (Madison, Alabama).</b><br>
Ruby module.
</td>
@ -34,12 +34,12 @@ Ruby module.
<tr>
<td>
<img src="blank.jpg"><br>
<img src="blank.jpg" alt="Blank"><br>
<b>Matthias Köppe (Magdeburg, Germany).</b> <br>
Guile module.
</td>
<td>
<img src="images/sam.jpg"><br>
<img src="images/sam.jpg" alt="Sam Liddicott"><br>
<b>Sam Liddicott (Wakefield, UK).</b> <br>
PHP module.
</td>
@ -47,12 +47,12 @@ PHP module.
<tr>
<td>
<img src="blank.jpg"><br>
<img src="blank.jpg" alt="Blank"><br>
<b>Marcelo Matus (Tuscon, AZ).</b> <br>
Evil C++ testing.
</td>
<td>
<img src="blank.jpg"><br>
<img src="blank.jpg" alt="Blank"><br>
<b>Richard Palmer.</b> <br>
PHP module.
</td>
@ -60,12 +60,12 @@ PHP module.
<tr>
<td>
<img src="blank.jpg"><br>
<img src="blank.jpg" alt="Blank"><br>
<b>Jason Stewart (Albuquerque, New Mexico).</b> <br>
Perl module.
</td>
<td>
<img src="blank.jpg"><br>
<img src="blank.jpg" alt="Blank"><br>
<b>Klaus Wiederänders (Vienna, Austria).</b> <br>
XML module.
</td>
@ -73,12 +73,12 @@ XML module.
<tr>
<td>
<img src="images/arty.jpg"><br>
<img src="images/arty.jpg" alt="Art Yerkes"><br>
<b>Art Yerkes (Chicago, Illinois).</b> <br>
OCAML module.
</td>
<td>
<img src="images/yoshiki.jpg"><br>
<img src="images/yoshiki.jpg" alt="Shibukawa Yoshiki"><br>
<b>Shibukawa Yoshiki (Tokyo, Japan).</b> <br>
Japanese translation.
</td>

View file

@ -1,5 +1,5 @@
Simplified Wrapper and Interface Generator
<p>
<h2>Welcome to SWIG</h2>
[ <a href="http://swig-jp.dyndns.org">Japanese</a> ]
@ -8,9 +8,9 @@ Simplified Wrapper and Interface Generator
SWIG is a software development tool that connects programs written in
C and C++ with a variety of high-level programming
languages. SWIG is primarily used with common scripting languages
such as Perl, Python, Tcl/Tk, and Ruby, however the list of
such as Perl, Python, Tcl/Tk and Ruby, however the list of
<a href="compat.html#SupportedLanguages">supported languages</a> also includes
non-scripting languages such as C#, Java, Modula-3 and OCAML. Also several
non-scripting languages such as C#, Common Lisp (Allegro CL), Java, Modula-3 and OCAML. Also several
interpreted and compiled Scheme implementations (Chicken, Guile, MzScheme)
are supported. SWIG is most
commonly used to create high-level interpreted or compiled programming
@ -28,7 +28,6 @@ and non-commercial use.
<li> <a href="http://swig.cs.uchicago.edu/cgi-bin/wiki.pl">SwigWiki!</a>
</ul>
<p>
<h3>News</h3>
@ -199,10 +198,4 @@ for Ruby and Mzscheme, and has some new examples. Note: this is a somewhat
unstable release and may not be suitable for first time users.
Download SWIG-1.1 instead.
<p>
</blockquote>

View file

@ -1,7 +1,7 @@
SWIG Related Links
<p>
<img src="images/links.png">
<img src="images/links.png" alt="Links">
<H3> Projects </H3>
@ -10,7 +10,7 @@ Lots of people <a href="projects.html">use SWIG</a>.
<H3> Language related links </h3>
<ul>
<blockquote>
The <a href="http://www.scriptics.com"> Tcl/Tk </a> homepage at Scriptics<br>
The <a href ="http://www.python.org"> Python </a> homepage. <br>
@ -28,14 +28,14 @@ The <a href ="http://www.python.org"> Python </a> homepage. <br>
<a href="http://www.php.net/">PHP</a> homepage. <br>
<a href="http://www.call-with-current-continuation.org/chicken.html">CHICKEN</a> homepage. <br>
<a href="http://www.schemers.org/"> schemers.org </a> - a collection of resources for the Scheme programming language <br>
</ul>
</blockquote>
<h3> Code generators and other interesting packages</h3>
<ul>
<blockquote>
The <a href="ftp://ftp.parc.xerox.com/pub/ilu/ilu.html"> ILU </a> homepage (Xerox PARC) <br>
<a href="http://www.fpx.de/fp/Software/tclobj"> TclObj </a> </br>
<a href="http://www.amath.washington.edu/~lf/software/tcl++">Modular Tcl</a></br>
<a href="http://www.fpx.de/fp/Software/tclobj"> TclObj </a> <br>
<a href="http://www.amath.washington.edu/~lf/software/tcl++">Modular Tcl</a><br>
<a href="http://lnc.usc.edu/~holt/matwrap/">Matwrap</a>. A wrapper
generator for matrix languages. <br>
<a href="http://www.riverbankcomputing.co.uk/sip">SIP</a>. A wrapper generator
@ -82,18 +82,18 @@ sure to check it out.
<a href="http://elmer.sourceforge.net">Elmer</a>. Glue code generator so that Python modules can run in C and Tcl programs.<br>
</ul>
</blockquote>
<h3> Other interesting links</h3>
<ul>
<blockquote>
John Ousterhout's <a href="http://home.pacbell.net/ouster/scripting.html"> paper </a> on scripting languages
(appeared in IEEE Computer). <br>
<A HREF="http://SAL.KachinaTech.COM/"> SAL - Scientific Applications on Linux</a>. <br>
<a href="http://www.usenix.org">USENIX</a> <br>
<a href="http://www.mathtools.net">Mathtools.net</a> A technical computing portal for all scientific and engineering needs. Contains useful links to technical computing programmers, covering C/C++, Java, Excel, MATLAB, Fortran and others.<br>
</ul>
</blockquote>
<b>I am always on the lookout for projects that are either related to SWIG
or which provide alternative solutions to the problem of wrapping C/C++ code.

View file

@ -1,19 +1,20 @@
SWIG Mailing Lists
<p><img src="images/mail.png">
<p><img src="images/mail.png" alt="Mail">
<p/>
<p>
There are a number of mailing lists available. Please use them for any queries related to the use or development of SWIG.
<p/>
<p>
<b>Important</b>. The mailing lists are set with a very high level of spam rejection, meaning occasionally some SWIG user's email postings will be discarded. Emails classified as spam are quietly discarded, so please check the archives if you are unsure as whether your email was successfully posted. The mailing lists are also subscriber only lists, so you must subscribe to the relevant list in order to post to that list.
<p/>
<p>
To subscribe to any of the mailing lists or view the archives, use the links on the left column.
<p/>
<br>
<br>
<table BORDER="1">
<table BORDER="1" summary="Maling lists">
<tr>
<td><font size="+1">List</font></td>
<td><font size="+1">Purpose</font></td>
@ -48,7 +49,4 @@ SWIG CVS list. CVS commits are mailed to this list.
</table>
<ul>
</ul>
<p/>

View file

@ -1,6 +1,5 @@
SWIG Myths
<p>
<h2>SWIG Myths</h2>
<p>
@ -8,7 +7,7 @@ Here are some common misconceptions about SWIG that have occasionally
appeared on other web pages and in articles--especially those that
describe older SWIG versions.
<font color="#ff0000"><h4>Myth: SWIG only really works with ANSI C</h4></font>
<h4><font color="#ff0000">Myth: SWIG only really works with ANSI C</font></h4>
<h4>Fact:</h4>
@ -23,8 +22,8 @@ every C++ feature including templates, namespaces, operators, overloaded methods
and more. The only major C++ feature not supported is nested classes---and we're
working on that. See the <a href="compare.html">Features</a> page for more information.
<font color="#ff0000"><h4>Myth: SWIG wraps C++ into this unusable
low-level "C-tran" interface.</h4></font>
<h4><font color="#ff0000">Myth: SWIG wraps C++ into this unusable
low-level "C-tran" interface.</font></h4>
<h4>Fact:</h4>
@ -38,7 +37,7 @@ are wrapped as Python classes, in Perl, C++ classes are wrapped as
Perl classes, and so forth. The existence of procedural wrappers is
only an artifact of SWIG's layered approach to wrapper code generation.
<font color="#ff0000"><h4>Myth: SWIG doesn't support overloaded methods/functions</h4></font>
<h4><font color="#ff0000">Myth: SWIG doesn't support overloaded methods/functions</font></h4>
<h4>Fact:</h4>
@ -50,7 +49,7 @@ For example, if you have declarations like this:
class Foo {
public:
Foo();
Foo(const Foo &);
Foo(const Foo &amp;);
void spam(int x);
void spam(double x);
void spam(char *x, int n);
@ -119,7 +118,7 @@ or
</pre>
</blockquote>
<font color="#ff0000"><h4>Myth: SWIG doesn't support basic idiomatic C++ constructs like templates and smart pointers</h4></font>
<h4><font color="#ff0000">Myth: SWIG doesn't support basic idiomatic C++ constructs like templates and smart pointers</font></h4>
<h4>Fact:</h4>
@ -188,7 +187,7 @@ Now, in the target language, the wrapper object works just like you would expect
</blockquote>
<font color="#ff0000"><h4>Myth: SWIG is just too confusing to use</h4></font>
<h4><font color="#ff0000">Myth: SWIG is just too confusing to use</font></h4>
<h4>Fact:</h4>
@ -196,23 +195,20 @@ Most users find SWIG to be relatively easy to use. However, confusion can arise
from the following:
<ul>
<li>C programming. To effectively use SWIG, you should have a good grasp of
<li><p>C programming. To effectively use SWIG, you should have a good grasp of
basic C programming concepts like pointers, arrays, memory management, data structures,
functions, parameter passing semantics, and so forth. SWIG tries to make it easy for
C programmers to build extension modules, but it does not try to make C programming
easy.
<p>
<li>C++. This language is so large and complicated that certain parts of SWIG
<li><p>C++. This language is so large and complicated that certain parts of SWIG
may not make any sense unless you are also familiar with the underlying C++ concepts.
<P>
<li>Dynamic linking and shared libraries. To build extension modules, you usually
<li><p>Dynamic linking and shared libraries. To build extension modules, you usually
have to create DLLs. If you've never done this before, there is a small
learning curve associated with finding the right compiler and linker options.
<p>
<li>Customization features. SWIG provides a large number of customization features and
<li><p>Customization features. SWIG provides a large number of customization features and
options that can be used to control almost all parts of the wrapper generation
process. These are provided to better support power users and to provide the
flexibility needed to solve difficult real-world wrapping problems. However,

View file

@ -1,6 +1,6 @@
The SWIG Files
<p><img src="images/projects.png">
<p><img src="images/projects.png" alt="Projects">
<p>
SWIG is being used in an increasing number of applications, most of
@ -13,11 +13,10 @@ some of the ways in which SWIG is currently being used.
opinions expressed here do not necessarily reflect those of any
given employer or organization).
<p>
<hr>
<p>
David Beazley (dmb@viking.lanl.gov) and Peter Lomdahl (pxl@viking.lanl.gov)<br>
<p>
<p>
SWIG is being used to construct a Python interface to the <a
href="http://bifrost.lanl.gov/MD/MD.html">SPaSM</a> molecular dynamics
@ -35,11 +34,10 @@ interface is automatically generated during compilation. This work
was recently featured on the cover of "Computers in Physics" (June,
1997).
<p>
<hr>
<p>
John Schmidt (jas@cs.utah.edu) <br>
<p>
<p>
I am using SWIG to integrate four stand alone software packages into a
unified system controlled by Tcl/Tk scripts. The unified software
@ -52,11 +50,10 @@ written in C++ using OpenGL and Motif. SWIG has been crucial to the
development of this project. With SWIG, the integration of the
individual pieces was trivial.
<p>
<hr>
<p>
David Brydon (brydon@lanl.gov) <br>
<p>
<p>
We are using swig with python to retrieve, analyze, and visualize very
large data sets from ocean model simulations on parallel computers.
@ -64,11 +61,10 @@ We have written C routines that access our data. Graphics libraries
and Matlab are used to visualize the data. We are very happy with the
flexible, programmable, powerful tool that results.
<p>
<hr>
<p>
Mike Weiblen (mew@paradigmsim.com) <br>
<p>
<p>
Paradigm sells modular C toolkits for developing visual
simulation/virtual reality graphics applications called Vega and another
@ -84,15 +80,14 @@ Several years ago (I believe we discussed this stuff way back in 1994
;-), I created a set of C preprocessor macros that did SWIG-like
things. It was a very tedious process, making it difficult to follow
changes to an evolving API, but it was useful for proof-of-concept.
When SWIG 1.1B1 came out in October, I was generously given a R&D budget
When SWIG 1.1B1 came out in October, I was generously given a R&amp;D budget
to reimplement my project in SWIG. The project has been a resounding
success!
<p>
<hr>
<p>
Jonah Lee (jonah@melab.uafsoe.alaska.edu)
<p>
<p>
[We're using SWIG for] wrapping up engineering applications using
finite element method including pre- and post-processing. My program
@ -102,10 +97,9 @@ deformations. It's mainly used for rapid prototyping, development and
testing. The code runs on workstations, Cray Y-MPs and Cray T3E (when
I get there... that is).
<p>
<hr>
<p>Jody Winston (jody@sccsi.com)
<p>
<p>
I have used SWIG to wrap an API that controlled two stepper motors and
@ -119,11 +113,10 @@ SWIG has allowed me to move the time critical code into C, C++, or
FORTRAN while having the application being controlled by Python. I
can quickly embed an interpreter into an application.
<p>
<hr>
<p>
Peter Lister (p.lister@cranfield.ac.uk)<br>
<p>
<p>
I'm using [SWIG] for a Perl scriptable version of Van Jacobson's libpcap
packet capture library. I can now use Perl regular expressions to
@ -132,12 +125,11 @@ from ARP packets and automatically maintain our database of IP/MAC
address mappings directly from perl rather than hacking the output of
arpwatch or tcpdump.
<p>
<hr>
<p>
Harald Singer (singer@itl.atr.co.jp) <p>
<p>
Harald Singer (singer@itl.atr.co.jp)
<p>
[We are using SWIG for] wrapping C libraries to Python for speech recognition research
at ATR Interpreting Telecommunications Laboratories.
<p>
@ -151,17 +143,17 @@ The advantages of using Python become more evident every day. For
example, it was fairly easy to write a GUI using python/tk. We are
using this now for interactive error analysis. A typical scenario is
like this:
<p>
<ul>
<li> audio data is collected via microphone/AD (in Python) and sent to the
recognizer frame by frame.
<p>
<li> the recognizer (C code) makes a decision about speech endpointing and
once it has discovered end of utterance does a callback to the
application (python/tk) with a word lattice as result.
<p>
<li> this word lattice is now displayed for the user in python/tk.
<p>
<li> the user can now interactively rescore part of the lattices, look at
the detailed acoustic and language model scores, listen to parts of
the utterance, etc.
@ -171,10 +163,9 @@ SWIG helps us in taking away part of the error-prone task of making
the C routines accessible from python and has considerably improved
our efficiency.
<p>
<hr>
<p>
Dominique Dumont (domi@ss7serv.grenoble.hp.com) <p>
Dominique Dumont (domi@ss7serv.grenoble.hp.com)
<p>
I'm using SWIG to generate a perl5 API on top of HP's OpenCall TCAP
API. TCAP is the top protocol layer of HP's SS7 stack of telecom
@ -197,9 +188,9 @@ Hopefully (i.e. if we have some spare time), the next step will be to
combine Tk with Perl and SWIG so we'll be able to monitor with a user
friendly interface the progress of the test suite.
<p>
<hr>
<p>Daniel Michelson (Daniel.Michelson@smhi.se)
<p>
A collegue and I are using SWIG for two purposes, both of which
centre around the creation of a Python-based environment for analysis
@ -209,13 +200,14 @@ network:
<li> interfacing old code
<li> interfacing new, performance critical, code.
</ul>
We have a couple of other collegues, also at SMHI R&D, who are working
<p>
We have a couple of other collegues, also at SMHI R&amp;D, who are working
in satellite-based remote sensing activities and who will be starting to
use SWIG in the near future for their purposes.
<p>
<hr>
<p>Roger Burnham (rburnham@cri-inc.com)
<p>
Thanks again for SWIG... Its fun, allows great productivity while
avoiding much tedium...
@ -241,10 +233,9 @@ able to control a frame grabber, display live/acquired images, all
from within Python, within the same day I received the frame grabber
SDK, never having dealt with such hardware before!
<p>
<hr>
<p>
Simon Gibson (gibson@dstc.qut.edu.au) <p>
Simon Gibson (gibson@dstc.qut.edu.au)
<p>
I have been using SWIG to create a Python interface for our
@ -260,7 +251,7 @@ Hector is described in an article in the January/February
<hr>
<p>
Mark Hammond (MHammond@skippinet.com.au)
<p>
<p>
I'm using [SWIG] to write a commericial application, which runs as an NT
@ -272,10 +263,9 @@ The COM extensions will allow (once the .i file is up to it :-) any native
COM interface (ie, not IDispatch (eg, VB/Word/Excel) based) to be supported
by Python.
<p>
<hr>
<p> Michael Bell (michaelb@gold.net.au)
<p>
<p>
I've used SWIG on a Linux platform to create Python modules for
graphing and database access.
@ -304,10 +294,10 @@ and d.close(), returning data as Python lists and arrays.
<p>
I'm particularly pleased that I managed to do these things with my
reading only knowledge of C, and lots of cutting and pasting.
<p>
<hr>
<p>
Soeren Henkel (soeren@hni.uni-paderborn.de) <p>
Soeren Henkel (soeren@hni.uni-paderborn.de)
<p>
We are currently in the process of redeveloping OOPUS, a system for
modeling plant systems and generate plant control software from a model.
@ -317,10 +307,9 @@ into an OODBMS, namely POET. So we needed an integration of POET
(which is tightly coupled to C++) with Tcl/Tk, and we've successfully
done that with SWIG.
<p>
<hr>
<p>
Peter A. Tinker (patinker@msmail4.hac.com) <p>
Peter A. Tinker (patinker@msmail4.hac.com)
<p>
We're using SWIG to "glue" Tcl/Tk to custom and third-party libraries. In
particular, SWIG provides an elegant means for controlling Sense8
@ -331,10 +320,9 @@ functions from a Tcl script and/or a Tk GUI. This approach is
being used in a variety of projects involving advanced 3D visualization
on a variety of imcompatible systems.
<p>
<hr>
<p>
Peter-Pike Sloan (ppsloan@cs.utah.edu) <p>
Peter-Pike Sloan (ppsloan@cs.utah.edu)
<p>
I have been using SWIG for several projects, mostly to streamline
working with OpenGL under Tcl/Tk. Examples are a time-critical
@ -346,10 +334,9 @@ development time allowing me to develop code and debug state in an
interpreted environment (currently Tcl, but I think I am going to move
to Python).
<p>
<hr>
<p>
Chris Myers (myers@beamtech.com) <p>
Chris Myers (myers@beamtech.com)
<p>
We at Beam Technologies, Inc. have used SWIG to begin developing an
interpreted Python interface to our PDESolve library. PDESolve is a
@ -381,10 +368,9 @@ and running quickly with a Python interface to PDESolve, and
demonstrate the utility of such an approach for a complex C++ library
(something that SWIG was not originally designed to really tackle).
<p>
<hr>
<p>
Vladimir I.Ulogov (gandalf@starship.skyport.net) <p>
Vladimir I.Ulogov (gandalf@starship.skyport.net)
<p>
SWIG is being used to create a Python interface to CLIPS expert system shell
@ -399,50 +385,41 @@ too. Module was be tested on Windows/NT and SUN Solaris 2.4 host platforms,
CLIPS version: 6.04, Python version 1.4. This module consist about 270
functions. This job took 3 days of my job at october 1997.
<p>
<hr>
<p>
Pinhong Chen (phchenb@tsmc.com) <p>
Pinhong Chen (phchenb@tsmc.com)
<p>
I got a page for
<a href="http://www-cad.eecs.berkeley.edu/~pinhong/scriptEDA"
>EDA applications</a>
using SWIG.
<p>
<hr>
<h3> Tools and Modules </h3>
The following tools and modules have been produced using SWIG
or are related to SWIG.
<ul>
<li><a href="http://www.thestuff.net/bob/projects/blade">BLADE</a>. A web publishing environment.
<li><p><a href="http://www.thestuff.net/bob/projects/blade">BLADE</a>. A web publishing environment.
<p>
<li><a href="http://students.cs.byu.edu/~butler/jni/PyJava.html">PyJava</a>. Provides
<li><p><a href="http://students.cs.byu.edu/~butler/jni/PyJava.html">PyJava</a>. Provides
Python access to Java methods (Kevin Butler).
<p>
<li><a href="http://playground.sun.com/~bharat/pilotmgr.html">Pilot Manager</a>. Hook
<li><p><a href="http://playground.sun.com/~bharat/pilotmgr.html">Pilot Manager</a>. Hook
your US Robotics PalmPilot up to your Sun workstation (Bharat Mediratta).
<p>
<li> <a href="http://www.mic.atr.co.jp/~gulliver/WTK/www">PyWTK</a>. A Python
<li><p> <a href="http://www.mic.atr.co.jp/~gulliver/WTK/www">PyWTK</a>. A Python
interface to the WorldToolKit (a virtual reality modeling toolkit). (Roberto Lopez Gulliver)
<p>
<li> A Python interface to
<li><p> A Python interface to
<a href="http://starship.python.net/crew/robind/index.html">BSD DB 2.7.x</a> (Robin Dunn).
<p>
<li><a href="http://alldunn.com/wxPython/index.html">wxPython</a>. A Python extension
<li><p><a href="http://alldunn.com/wxPython/index.html">wxPython</a>. A Python extension
module that encapsulates the wxWindows GUI classes.
<p>
<li> Net-Pcap. A Perl interface to the libpcap library (Peter Lister).
<li><p> Net-Pcap. A Perl interface to the libpcap library (Peter Lister).
<p>
<li> X11::Wcl. A Perl interface to the Widget Creation Library (Joe Buehler).
<li><p> X11::Wcl. A Perl interface to the Widget Creation Library (Joe Buehler).
</ul>

View file

@ -1,6 +1,6 @@
SWIG Propaganda
<p><img src="images/propaganda.png">
<p><img src="images/propaganda.png" alt="Propaganda">
<p>
The following comments about SWIG were collected by a user survey conducted
@ -8,12 +8,12 @@ in March, 1998.
<ul>
<p><li>"SWIG has helped us minimize the hassle of writing manual wrappers.
<li><p>"SWIG has helped us minimize the hassle of writing manual wrappers.
Since SWIG has proven to be rather easy to use, I find I can carry out the types of wrapping
activities which would otherwise have been the responsibility of a
computer scientist."
<p><li>"I really love the fact that the learning curve is short
<li><p>"I really love the fact that the learning curve is short
and flat. I don't need to use this facility very often,
but when I absolutely have to link in external C routines,
or when I have to get the last drop of speed from something
@ -23,21 +23,21 @@ and debugging the system. This is the closest thing to
cut-and-paste I've ever seen in inter-language library
creation."
<p><li>"We are a research group that develops medical imaging software.
<li><p>"We are a research group that develops medical imaging software.
We are interested in image processing/visualization research,
and for our software, we want a simple and portable tool to
generate user interfaces. For this, we currently use
Tcl/Tk, and SWIG which provides a nice way to connect our
software (in C++) to the tcl-scripts."
<p><li>"Very quick first results."
<li><p>"Very quick first results."
<p><li>"Easy to use, no need to worry about language internals. It is a boon for application developers, like me."
<li><p>"Easy to use, no need to worry about language internals. It is a boon for application developers, like me."
<p><li>"I like the fact that it automates much of the tedious work
<li><p>"I like the fact that it automates much of the tedious work
in building an interface C/C++ functions. This makes development easier."
<p><li>"SWIG is by far the easiest way I have found to generate
<li><p>"SWIG is by far the easiest way I have found to generate
scripting interfaces for scientific software. SWIG makes it
practical to use a single, powerful scripting language for
all projects rather than writing a custom interface to each.
@ -45,16 +45,16 @@ It also encourages a consistent and modular form for a program,
and makes it easier to add contributions to my programs from
other users/programmers."
<p><li>"I like the ease with which scripting languages can be extended.
<li><p>"I like the ease with which scripting languages can be extended.
The fact that we could so easily interface with Lotus Notes on NT using Python was just amazing."
<p><li>"SWIG makes linking
<li><p>"SWIG makes linking
my application to a scripting language easy enough
that it is worthwhile."
<p><li>"I came, I saw, I wrapped. And it ran. Woo hoo!"
<li><p>"I came, I saw, I wrapped. And it ran. Woo hoo!"
<p><li>"Without SWIG it would have taken much, much longer for
<li><p>"Without SWIG it would have taken much, much longer for
our group to use Python as an extension language. Our whole
application was written mostly in C++. We wanted to look
into using Python for portions of it in order to make it
@ -66,55 +66,55 @@ SWIG allowed us to spend a minimal amount of time with
the wrapper code and most of our time moving stuff to Python
(which was the big point in the first place)."
<p><li>"SWIG is a huge time-saver. I have approximately 30,000
<li><p>"SWIG is a huge time-saver. I have approximately 30,000
lines of C and Python code that have been generated by
SWIG that I didn't have to write by hand, don't
have to fix syntax and fumble-finger errors in, and
don't have to aggressively test."
<p><li>"SWIG helps us in taking away part of the error-prone task of making
<li><p>"SWIG helps us in taking away part of the error-prone task of making
the C routines accessible from Python and has considerably improved
our efficiency."
<p><li>"I like all the time I have saved by not writing the interfaces myself."
<li><p>"I like all the time I have saved by not writing the interfaces myself."
<p><li>"SWIG saves a lot of my energy in interfacing with many free
<li><p>"SWIG saves a lot of my energy in interfacing with many free
C/C++ libraries in my project."
<p><li>"SWIG handles the gory details and allows me to concentrate on the important things."
<li><p>"SWIG handles the gory details and allows me to concentrate on the important things."
<p><li>"Using SWIG is really fun, because it saves you from
<li><p>"Using SWIG is really fun, because it saves you from
a lot of mechanical work and it takes care of all the
details you don't want to bother with letting you
concentrate on the real problem."
<p><li>"Thanks again for SWIG... It's fun and allows great productivity while
<li><p>"Thanks again for SWIG... It's fun and allows great productivity while
avoiding much tedium."
<p><li>"[I like] the ability to write extensions basically without having to think too
<li><p>"[I like] the ability to write extensions basically without having to think too
hard about what I'm doing."
<p><li>"SWIG allows me to get on with scripting
<li><p>"SWIG allows me to get on with scripting
and writing C++ code without having to worry about the
(usually considerable) issues involved in extending the
scripting language with my custom components."
<p><li>"Using a scripting language as glue between C++ components
<li><p>"Using a scripting language as glue between C++ components
is a powerful paradigm for combining flexibility with
robustness and efficiency. SWIG enables this model by
providing a solid bridge between the C++ component and
the scripting language."
<p><li>"The ability to ``follow'' the development of the core
<li><p>"The ability to ``follow'' the development of the core
application without constantly rebuilding the interface
is very effective. The developments of the kernel and its interface are
mutually protected to a large degree."
<p><li>"SWIG allows us to recycle a lot of ugly old C code and put
<li><p>"SWIG allows us to recycle a lot of ugly old C code and put
it into a reasonable module structure and snazzy new user
interfaces."
<p><li>"It allows us to leverage the advantages of the scripting
<li><p>"It allows us to leverage the advantages of the scripting
language, especially when so many other scripts are already
being written to glue programs together and some of our
other tools have their own scripting language interface.
@ -122,26 +122,26 @@ Using SWIG will allow us to properly integrate each of the
parts directly into the language instead of a collection
of system() calls."
<p><li>"Before I had to use C++ for my ``rapid'' prototyping.
<li><p>"Before I had to use C++ for my ``rapid'' prototyping.
Now I can script it!"
<p><li>"My code is cleaner and more compact which makes it easier to
<li><p>"My code is cleaner and more compact which makes it easier to
read and understand. SWIG also encourages modularize code--allowing
one to test/debug modules independently. This makes connecting
everything together a breeze."
<p><li>"The very idea of scripting programming on the one hand and
<li><p>"The very idea of scripting programming on the one hand and
systems programming on the other is quite nice, the most
important feature of SWIG is to make this approach
practical on a day-by-day basis."
<p><li>"On the whole, SWIG is my most important development tool
<li><p>"On the whole, SWIG is my most important development tool
after gcc!"
<p><li>"SWIG has enabled our customers to interact with our toolkits in fundamentally
<li><p>"SWIG has enabled our customers to interact with our toolkits in fundamentally
new ways."
<p><li>"We are using Tcl scripts as the data files driving our
<li><p>"We are using Tcl scripts as the data files driving our
simulations. Once the data is defined using a program
(which is pretty cool in itself), we can actually run the
simulation from script commands. In our experimental
@ -149,21 +149,21 @@ environment, that saves rewriting a lot of "main" programs
that exercise the same basic objects. This isn't exactly computational steering, but it does give
our engineers a lot of flexibility."
<p><li>"All (well most) of my C++ code (MC simulations of
<li><p>"All (well most) of my C++ code (MC simulations of
proteins and sequence analysis) is now driven by
a Python interface thanks to SWIG. Once I have decided on an interface, the
process of building it is usually trivial."
<p><li>"SWIG is an integral part of a user environment I am creating for a Molecular Dynamics company.
<li><p>"SWIG is an integral part of a user environment I am creating for a Molecular Dynamics company.
They have FORTRAN modules that require a steering language (Python) to enable flexible computational
research."
<p><li>"SWIG plays a critical role to automate the generation of
<li><p>"SWIG plays a critical role to automate the generation of
Perl client interfaces from the OMG IDLs for a CORBA ORB.
The Perl client interface is essential in script driven
testing."
<p><li>"I am enjoying rapidly developing complex projects using OO
<li><p>"I am enjoying rapidly developing complex projects using OO
and Python, but coming from a numerical background, I like
that I can get fast number crunching performance when I
need it from C modules wrapped up by SWIG. "

View file

@ -1,7 +1,7 @@
SWIG Rants
<p>
<img src="images/rants.png">
<img src="images/rants.png" alt="Rants">
<p>
Well, there's nothing here yet, but rest assured, there are plenty of things to rant

View file

@ -1,5 +1,5 @@
Release Notes
<p>
<h2>Release Notes</h2>
The following files are extracted from the SWIG CVS repository.

View file

@ -2,7 +2,7 @@ SWIG Screenshot
<p><img src="images/screen.png" alt="Screenshot">
<p><img src="images/screenshot.png">
<p><img src="images/screenshot.png" alt="Screenshot image">
<p>
It is lovely, isn't it?

View file

@ -2,7 +2,7 @@ SWIG Screenshot
<p><img src="images/screen.png" alt="Screenshot">
<p><img src="images/screenshot2.png">
<p><img src="images/screenshot2.png" alt="Screenshot image">
<p>
Much better than before, don't you think?

View file

@ -5,7 +5,6 @@ SWIG Subversion
<ul>
<li>The newly-revised SWIG mission statement:
<p>
<center>
<em>
"We are building a wrapper generator of extraordinary magnitude."
@ -13,16 +12,14 @@ SWIG Subversion
</em>
</center>
<p>
<li>Alternative mission statement:
<p>
<center>
<em>
"You know, for kids." <br>
</em>
</center>
<p>
<li>The ever-so-impressive SWIG-1.1 <a href="screenshot.html">screenshot</a>.
<li>An even more impressive <a href="screenshot2.html">screenshot</a> showing the new streamlined interface to SWIG-1.3.
<li><a href="visual.html">Visual SWIG 2002++ .NET</a>--the version for managers.

View file

@ -1,16 +1,14 @@
Survey
<p/>
<table> <tr>
<table summary="Before downloading..."> <tr>
<td bgcolor="#000000" align=center><font color="#ffffff"><b>Before downloading...</b></font></td>
</tr> </table>
Before downloading, please help us by filling in the simple survey below about your intended SWIG usage.
<p/>
<p>
If you like you can skip it and go straight to the <a href="download.html">Download area</a>.
<p/>
<table> <tr>
<table summary="Usage Survey"> <tr>
<td bgcolor="#000000" align=center><font color="#ffffff"><b>SWIG Usage Survey</b></font></td>
</tr> </table>
@ -18,41 +16,41 @@ If you like you can skip it and go straight to the <a href="download.html">Downl
<b>
Which target languages will you be using SWIG for? Please select all that apply.
</b>
<ol>
<blockquote>
<input name="langChicken" type=checkbox align="left" value="1"> Chicken <br/>
<input name="langCSharp" type=checkbox value="1"> C# <br/>
<input name="langGuile" type=checkbox value="1"> Guile <br/>
<input name="langJava" type=checkbox value="1"> Java <br/>
<input name="langMzscheme" type=checkbox value="1"> MzScheme <br/>
<input name="langOcaml" type=checkbox value="1"> Ocaml <br/>
<input name="langPerl" type=checkbox value="1"> Perl <br/>
<input name="langPhp" type=checkbox value="1"> Php <br/>
<input name="langPike" type=checkbox value="1"> Pike <br/>
<input name="langPython" type=checkbox value="1"> Python <br/>
<input name="langRuby" type=checkbox value="1"> Ruby <br/>
<input name="langSexp" type=checkbox value="1"> Lisp S-exp <br/>
<input name="langTcl" type=checkbox value="1"> Tcl <br/>
<input name="langXml" type=checkbox value="1"> Xml <br/>
<input name="langOtherLang" type=checkbox value="1"> Other, please specify: <input name="namedLanguage" size="20"> <br/>
<input name="langChicken" type=checkbox align="left" value="1"> Chicken <br>
<input name="langCSharp" type=checkbox value="1"> C# <br>
<input name="langGuile" type=checkbox value="1"> Guile <br>
<input name="langJava" type=checkbox value="1"> Java <br>
<input name="langMzscheme" type=checkbox value="1"> MzScheme <br>
<input name="langOcaml" type=checkbox value="1"> Ocaml <br>
<input name="langPerl" type=checkbox value="1"> Perl <br>
<input name="langPhp" type=checkbox value="1"> Php <br>
<input name="langPike" type=checkbox value="1"> Pike <br>
<input name="langPython" type=checkbox value="1"> Python <br>
<input name="langRuby" type=checkbox value="1"> Ruby <br>
<input name="langSexp" type=checkbox value="1"> Lisp S-exp <br>
<input name="langTcl" type=checkbox value="1"> Tcl <br>
<input name="langXml" type=checkbox value="1"> Xml <br>
<input name="langOtherLang" type=checkbox value="1"> Other, please specify: <input name="namedLanguage" size="20"> <br>
</ol>
<p/>
</blockquote>
<p>
<b>
Which operating systems will you be running SWIG on? Please select all that apply.
</b>
<ol>
<blockquote>
<input name="osBSD" type=checkbox align="left" value="1"> FreeBSD/OpenBSD/NetBSD <br/>
<input name="osHPUX" type=checkbox align="left" value="1"> HP-UX <br/>
<input name="osLinux" type=checkbox align="left" value="1"> Linux <br/>
<input name="osMacOSX" type=checkbox align="left" value="1"> Mac OS X <br/>
<input name="osSolaris" type=checkbox align="left" value="1"> Solaris <br/>
<input name="osWindows" type=checkbox align="left" value="1"> Windows <br/>
<input name="osOtherOS" type=checkbox align="left" value="1"> Other, please specify: <input name="namedOS" size="20"> <br/>
<input name="osBSD" type=checkbox align="left" value="1"> FreeBSD/OpenBSD/NetBSD <br>
<input name="osHPUX" type=checkbox align="left" value="1"> HP-UX <br>
<input name="osLinux" type=checkbox align="left" value="1"> Linux <br>
<input name="osMacOSX" type=checkbox align="left" value="1"> Mac OS X <br>
<input name="osSolaris" type=checkbox align="left" value="1"> Solaris <br>
<input name="osWindows" type=checkbox align="left" value="1"> Windows <br>
<input name="osOtherOS" type=checkbox align="left" value="1"> Other, please specify: <input name="namedOS" size="20"> <br>
</ol>
</blockquote>
<input type=submit value="Submit">

View file

@ -1,14 +1,14 @@
SWIG Tutorial
<p>
<img src="images/tutorial.png">
<img src="images/tutorial.png" alt="Tutorial">
<p>
So you want to get going in a hurry? To illustrate the use of SWIG,
suppose you have some C functions you want added to Tcl, Perl, Python, Java and C#.
Specifically, let's say you have them in a file 'example.c'
<ul><tt><pre>
<blockquote><pre>
/* File : example.c */
#include &lt;time.h&gt;
@ -30,7 +30,7 @@ char *get_time()
return ctime(&amp;ltime);
}
</pre></tt></ul>
</pre></blockquote>
<h3>Interface file </h3>
@ -38,7 +38,7 @@ Now, in order to add these files to your favorite language, you need to write an
"interface file" which is the input to SWIG. An interface file for these
C functions might look like this :
<ul><tt><pre>
<blockquote><pre>
/* example.i */
%module example
%{
@ -49,14 +49,14 @@ extern double My_variable;
extern int fact(int n);
extern int my_mod(int x, int y);
extern char *get_time();
</pre></tt></ul>
</pre></blockquote>
<h3> Building a Tcl module </h3>
At the UNIX prompt, type the following (shown for Linux, see the <a href="http://swig.cs.uchicago.edu/cgi-bin/wiki.pl?SwigFaq/SharedLibraries">SWIG Wiki Shared Libraries</a> page for help with other operating systems):
<blockquote>
<pre><tt>
<pre>
unix % swig -tcl example.i
unix % gcc -fpic -c example.c example_wrap.c \
-I/usr/local/include
@ -73,7 +73,7 @@ unix % tclsh
Sun Feb 11 23:01:07 1996
%
</tt></pre></blockquote>
</pre></blockquote>
The <tt> swig </tt> command produces a file <a href = "tutorial/example_wrap.html">
<tt> example_wrap.c </tt> </a> that should be compiled and linked with
@ -85,31 +85,31 @@ the 'load' command.
Turning C code into a Python module is also easy. Simply do the following (shown for Irix, see the <a href="http://swig.cs.uchicago.edu/cgi-bin/wiki.pl?SwigFaq/SharedLibraries">SWIG Wiki Shared Libraries</a> page for help with other operating systems):
<blockquote> <tt> <pre>
<blockquote> <pre>
unix % swig -python example.i
unix % gcc -c example.c example_wrap.c \
-I/usr/local/include/python2.1
unix % ld -shared example.o example_wrap.o -o _example.so
</pre> </tt> </blockquote>
</pre> </blockquote>
We can now use the Python module as follows :
<blockquote> <tt> <pre>
>>> import example
>>> example.fact(5)
<blockquote> <pre>
&gt;&gt;&gt; import example
&gt;&gt;&gt; example.fact(5)
120
>>> example.my_mod(7,3)
&gt;&gt;&gt; example.my_mod(7,3)
1
>>> example.get_time()
&gt;&gt;&gt; example.get_time()
'Sun Feb 11 23:01:07 1996'
>>>
&gt;&gt;&gt;
</pre>
</tt> </blockquote>
</blockquote>
<h3> Building a Perl module </h3>
You can also build a Perl5 module as follows (shown for Solaris, see the <a href="http://swig.cs.uchicago.edu/cgi-bin/wiki.pl?SwigFaq/SharedLibraries">SWIG Wiki Shared Libraries</a> page for help with other operating systems):
<blockquote><tt><pre>
<blockquote><pre>
unix % swig -perl5 example.i
unix % gcc -c example.c example_wrap.c \
-I/usr/lib/perl/solaris/5.003/CORE
@ -124,12 +124,12 @@ print example::get_time(),"\n";
120
Sun Feb 11 23:01:07 1996
unix %
</pre></tt></blockquote>
</pre></blockquote>
<h3> Building a Java module </h3>
SWIG will also generate JNI code for accessing C/C++ code from Java. Here is an example building a Java module (shown for Cygwin, see the <a href="http://swig.cs.uchicago.edu/cgi-bin/wiki.pl?SwigFaq/SharedLibraries">SWIG Wiki Shared Libraries</a> page for help with other operating systems):
<blockquote><tt><pre>
<blockquote><pre>
$ swig -java example.i
$ gcc -c example.c example_wrap.c -I/c/jdk1.3.1/include -I/c/jdk1.3.1/include/win32
$ gcc -shared example.o example_wrap.o -mno-cygwin -Wl,--add-stdcall-alias -o example.dll
@ -148,12 +148,12 @@ $ java main
120
Mon Mar 4 18:20:31 2002
$
</pre></tt></blockquote>
</pre></blockquote>
<h3> Building a C# module </h3>
SWIG will also generate code for accessing C/C++ code from C# using PInvoke. Here is an example building a C# module (shown for Linux, see the <a href="http://swig.cs.uchicago.edu/cgi-bin/wiki.pl?SwigFaq/SharedLibraries">SWIG Wiki Shared Libraries</a> page for help with other operating systems). It uses the open source <a href="http://www.southern-storm.com.au/portable_net.html">DotGNU Portable.NET</a> C# compiler which runs on most Unix systems, but works equally well using other C# compilers:
<blockquote><tt><pre>
<blockquote><pre>
$ swig -csharp example.i
$ gcc -c -fpic example.c example_wrap.c
$ gcc -shared example.o example_wrap.o -o libexample.so
@ -173,7 +173,7 @@ $ ilrun runme
Tue May 13 10:45:45 2003
$
</pre></tt></blockquote>
</pre></blockquote>
<h3> SWIG for the truly lazy </h3>
@ -182,7 +182,7 @@ file. If you have a header file, you can often just include it directly in the
SWIG interface. For example:
<blockquote>
<tt> <pre>
<pre>
%module example
%{
/* Includes the header in the wrapper code */
@ -191,7 +191,7 @@ SWIG interface. For example:
/* Parse the header file to generate wrappers */
%include "header.h"
</pre></tt>
</pre>
</blockquote>
Alternatively, some people might just include SWIG directives in a header
@ -254,7 +254,7 @@ namespace std {
T1 first;
T2 second;
pair() : first(T1()), second(T2()) { };
pair(const T1 &f, const T2 &s) : first(f), second(s) { }
pair(const T1 &amp;f, const T2 &amp;s) : first(f), second(s) { }
};
}
</pre>
@ -294,19 +294,19 @@ $ python
Python 2.1 (#3, Aug 20 2001, 15:41:42)
[GCC 2.95.2 19991024 (release)] on sunos5
Type "copyright", "credits" or "license" for more information.
>>> import pair
>>> a = pair.pairii(3,4)
>>> a.first
&gt;&gt;&gt; import pair
&gt;&gt;&gt; a = pair.pairii(3,4)
&gt;&gt;&gt; a.first
3
>>> a.second
&gt;&gt;&gt; a.second
4
>>> a.second = 16
>>> a.second
&gt;&gt;&gt; a.second = 16
&gt;&gt;&gt; a.second
16
>>> b = pair.pairdi(3.5,8)
>>> b.first
&gt;&gt;&gt; b = pair.pairdi(3.5,8)
&gt;&gt;&gt; b.first
3.5
>>> b.second
&gt;&gt;&gt; b.second
8
</pre>
</blockquote>

View file

@ -1,6 +1,6 @@
SWIG2K
<p><img src="images/y2k.png">
<p><img src="images/y2k.png" alt="Y2K">
<p>
SWIG does not use the date and should not be affected by Y2K.
@ -8,7 +8,6 @@ However, like any development tool, SWIG will not prevent you from
creating a buggy application. SWIG is distributed under the following
terms :
<p>
<pre>
IN NO EVENT SHALL THE AUTHOR, THE UNIVERSITY OF CALIFORNIA, THE