I have two places in my .i files where I use %typemap(cscode) on the same class.

 

e.g.:

%typemap(cscode) MyClass %{

                // part #1...

%}

...

%typemap(cscode) MyClass %{

                // part #2...

%}

 

The problem is that they dont cumulate.  The last one wins !

 

I know the best would be to merge the two typemaps together but it’s impossible in my context.

(i.e.: the %typemap(cscode) is part of a macro that I call more than once on the same class !)

 

I tried to do this before the second one:

$typemap(cscode,MyClass) ;

%typemap(cscode) MyClass %{

                // part #2...

%}

 

But not luck....

 

Is there a way to do it ?

 

Any help would be appreciated...

 

Thanks