Last update July 13, 2004

Dwith Swig /
Examples



Difference (last change) (Author, normal page display)

Added: 34a35,38
=== C++ for symbolic manipulation using GiNaC ===

/Examples/GiNaC


Table of contents of this page
Examples of use of D with SWIG   
Simple C function   
C++ Class   
C++ Classes and pragma statements   
C++ for extended precision calculation   
C++ for symbolic manipulation using GiNaC   

Examples of use of D with SWIG    

These examples are intended to help the implementer of an interface to understand how to use SWIG to enable an existing C or C++ code to be made available in D. Each example shows use of SWIG to generate wrapping code and also how to compile and link the mixed language codes under either /Linux or /Windows.

Simple C function    

This simple example is given in considerable detail to give an idea of how it all works.

/Examples/Function in C

C++ Class    

This example shows how to wrap a set of C++ classes including inheritance.

/Examples/Class in C++

C++ Classes and pragma statements    

This example shows how to control the insertion of import statements into the generated D code.

/Examples/Pragma in C++

C++ for extended precision calculation    

This example of wrapping a class with real functionality demonstrates a number of further techniques for wrapping code.

  • module level import statements
  • extend command to add functionality
  • overloaded operators in the target language (D).
/Examples/Qdmath in C++

C++ for symbolic manipulation using GiNaC    

/Examples/GiNaC

More to follow

JohnFletcher

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: July 13, 2004 0:33 (diff))