← Back to team overview

dolfin team mailing list archive

Re: Linear algebra

 

I refuse to add C++ to the output list since I am not a swig developer and that is currently outside of swig's capabilities. In gnu compilers, at least, the mapping from C bindings to C++ bindings is:

extern "C" {
#include "foo.h"
}

SWIG and other tools are incapable of inferring what the right OO hierarchy is unless the underlying code already is architected in such a way. You can't automate such architecting. On the other hand, one could do the OO design in some abstract environment (SIDL? UML?) which could be translated into Python, C++, Java, but one *still* must tell what class system there is.

What SWIG would let you do is this:
1.) First, you wrap up all your C code into C++
2.) Then, you use swig to bind your C++ into any other language you choose.

On Oct 26, 2004, at 1:51 PM, Anders Logg wrote:

I think you should add C++ to the output list. There are many people
who prefer to live inside C++. It is also the only option if not all
the tools are available (and I don't think you can always assume they
are).

If a tool is missing, you could of course create the tool in C/C++
with an appropriate wrapper, but that's an extra step.

/Anders

On Tue, Oct 26, 2004 at 01:27:28PM -0500, Robert C.Kirby wrote:

My thought is that:

input = { C, C++ }
output = { Python, perl, mzscheme, ruby, ocaml, pike, java }, but not
C++.

Has Beazley updated it?

On Oct 26, 2004, at 12:26 PM, Matthew Knepley wrote:

ridg@xxxxxxxxxxxxxxx (Ridgway Scott) writes:
If the issue is just a C++ interface for PETsc, then can't you
just use SWIG to do this? PETsc is a library, SWIG provides
wrappers, and off you go?
Yes, this is correct, although I thought SWIG was strictly Python.
We can find some way to do it easily.

         Matt

				Ridg







Follow ups

References