SWIG module for Octave
SWIG is a powerful C/C++ wrapper
generator that takes special interface files (in the simplest case, a
C/C++ header) and produces extension modules for various target
languages.
- It is modular in that support for new languages can be added
without changing the SWIG core. Currently SWIG supports 17 languages:
AllegroCL, C# - Mono, C# - MS .NET, CFFI, CHICKEN, CLISP, Guile, Java,
Lua, MzScheme, Ocaml, Perl, PHP, Python, R, Ruby, Tcl/Tk.
- Many projects use SWIG to provide language bindings to one or
more of these targets (the swig site gives a partial list).
Once bindings/interface files are written for one target, it is
relatively easy to reuse them for another.
The SWIG/Octave project adds Octave
support to SWIG, enabling it to generate oct-file extensions.
Features:
- Basic wrapping: Octave code can use C/C++ functions, variables,
constants and enums, classes (member variables, methods,
single/multiple inheritance, etc), and templates.
- Argument/result translation is completely extensible via
%typemap and other declarations in interface files.
- Operator overloading: Octave operators map to C++ operators,
methods, or global functions.
- Directors: Octave code can subclass C++ types and implement
their virtual methods (i.e., C++ code transparently calls Octave code).
- Some support for STL containers.
- Manual %docstring and autodoc support for generating inline
texinfo help.
- Test coverage: 339 automated tests (under Examples/test-suite,
Examples/test-suite/octave).
- 15 examples, demonstrating most functionality (under
Examples/octave).
- Documentation.
Releases:
4/7/08: Officially released with SWIG 1.3.35. See www.swig.org for more information.
3/7/08: The module has been incorporated into SWIG. The latest
sources are available only from SWIG SVN.
2/28/08: first release; 24 tests still fail, STL support
incomplete, there are unresolved multi-module issues, documentation is
a bit thin.
See also:
octave-ann: Octave routines for
approximate nearest neighbor computation.
octave-db: Octave bindings for postgres,
mysql, sqlite3, and standard ODBC.
octave-opencv: Octave bindings for
OpenCV (Open Computer Vision Library).
SWIG/Octave was written by Xavier Delacour. Please send feedback,
bugs, and/or patches to one of the SWIG mailing lists,
or directly to xavier dot delacour at gmail dot com.