This information is based on the SWIG-2.0.2 release.
SWIG currently generates wrapper code for nineteen different target languages:
In addition to this, the parse tree can be exported as XML and Lisp s-expressions.
Experimental work is also available for a Pike module.
- Allegro CL
SWIG is capable of wrapping all of ANSI C. Features include:
- Handling of all ANSI C datatypes.
- Global functions, global variables, and constants.
- Structures and unions.
- Arrays and multidimensional arrays.
- Pointers to functions.
- Variable length arguments.
SWIG provides wrapping support for almost all of ANSI C++.
The only major C++ feature not currently supported by SWIG is the
wrapping of nested classes.
- All C++ datatypes.
- Pointers to members.
- Inheritance and multiple inheritance.
- Overloaded functions and methods (using dynamic dispatch).
- Overloaded operators.
- Static members.
- Namespaces (including using declarations, aliases, nesting, etc.)
- Member templates
- Template specialization and partial specialization.
- Smart pointers
- C++ library support for strings and the STL.
C++ users who rely on advanced template programming techniques
(e.g., template meta-programming) should also be aware that SWIG
currently requires manual instantiation of all template classes.
Therefore, if your application somehow involves the instantiation of 50000
template classes, your mileage might vary.
SWIG provides a full C preprocessor with the following features:
- Macro expansion.
- Automatic wrapping of #define statements as constants (when applicable).
- Support for C99 (variadic macro expansion).
SWIG provides control over most aspects of wrapper generation. Most
of these customization options are fully integrated into the C++ type
system--making it easy to apply customizations across inheritance
hierarchies, template instantiations, and more. Features include:
- Customized type conversion/marshaling.
- Exception handling.
- Class/structure extension.
- Memory management.
- Ambiguity resolution.
- Template instantiation.
- File import and cross-module linking.
- Code inclusion, helper function support.
- Extensive diagnostics (error/warning messages including fine grained warning suppression).
- Extended SWIG macro handling.
Feedback and questions concerning this site should be posted to the swig-devel mailing list.
Last modified : Sun Mar 16 17:47:11 2014