How to cumulate %typemap(cscode) ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to cumulate %typemap(cscode) ?

RAVI NANJUNDAPPA

Hi,

 

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 !)

 

Is there a way to do it ?

 

Any help would be appreciated...

 

Thanks and Best Regards,

N Ravi


------------------------------------------------------------------------------

_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to cumulate %typemap(cscode) ?

William S Fulton


On 2 August 2016 at 10:51, RAVI NANJUNDAPPA <[hidden email]> wrote:
 

Hi,

 

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 !)

 

Is there a way to do it ?

 
Ravi, I'm afraid that you need to provide just one 'cscode' typemap per wrapped class, which I appreciate is what you are trying to avoid. This is a frustrating limitation with SWIG, which we ought to and could improve with a new feature. But nothing is available atm.

William


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to cumulate %typemap(cscode) ?

RAVI NANJUNDAPPA
In reply to this post by RAVI NANJUNDAPPA
Hi William,

Yes. That's true. Right now, am just using one cscode typemap while my actual requirement is to use multiple cscode typemaps for the same wrapper class.
Hope this requirement is taken care atleast in the next upcoming releases of SWIG.

Thanks and Best Regards,
N Ravi
 
 
--------- Original Message ---------
Sender : William S Fulton <[hidden email]>
Date   : 2016-08-15 22:15 (GMT+5:30)
Title  : Re: How to cumulate %typemap(cscode) ?
 


On 2 August 2016 at 10:51, RAVI NANJUNDAPPA <[hidden email]> wrote:
 
Hi,
 
 
 
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 !)
 
 
 
Is there a way to do it ?
 
Ravi, I'm afraid that you need to provide just one 'cscode' typemap per wrapped class, which I appreciate is what you are trying to avoid. This is a frustrating limitation with SWIG, which we ought to and could improve with a new feature. But nothing is available atm.

William

 
------------------------------------------------------------------------------

_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Loading...