isolate language independent STD/STL/C++ code + more documentation + cleaning

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6382 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-10 06:42:15 +00:00
commit dc4409a1f1
50 changed files with 3502 additions and 3408 deletions

View file

@ -10,32 +10,15 @@
#include <complex.h>
%}
/*
*** swig workaround ***
the %{}% around these typedefs must be removed once
swig parser supports 'float complex'...
*/
%{
typedef float complex float_complex;
typedef double complex double_complex;
%}
/* C complex constructor */
#define CCplxConst(r, i) ((r) + I*(i))
%swig_cplxflt_convn(float_complex, CCplxConst, creal, cimag);
%swig_cplxdbl_convn(double_complex, CCplxConst, creal, cimag);
%swig_cplxflt_convn(float complex, CCplxConst, creal, cimag);
%swig_cplxdbl_convn(double complex, CCplxConst, creal, cimag);
%swig_cplxdbl_convn(complex, CCplxConst, creal, cimag);
/* declaring the typemaps */
%typemap_primitive(SWIG_TYPECHECK_CPLXFLT, float_complex);
%typemap_primitive(SWIG_TYPECHECK_CPLXDBL, double_complex);
/* empty complex. hack in the meantime */
%apply double_complex { complex };
%apply const double_complex& { const complex& };
%apply double_complex& { complex& };
%apply double_complex* { complex* };
%typemap_primitive(SWIG_TYPECHECK_CPLXFLT, float complex);
%typemap_primitive(SWIG_TYPECHECK_CPLXDBL, double complex);
%typemap_primitive(SWIG_TYPECHECK_CPLXDBL, complex);