Quantcast

Define typemap just for specified classes in C#

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

Define typemap just for specified classes in C#

Emre Metin
I am newbie to SWIG and using it for C++ to C#.
I want to define a typemap for just specified classes work with it.
How can i do that?


Here is what i want;
StringU is our type in C++ and I would like to convert it in string.
TBLCEGRUPLAR is also our class that we use.

%typemap(cstype) StringU * "string"


%typemap(cstype,cscode) StringU * "string",TBLCEGRUPLAR

------------------------------------------------------------------------------
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://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381
_______________________________________________
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: Define typemap just for specified classes in C#

William S Fulton
On 15 June 2016 at 10:52, Emre Metin <[hidden email]> wrote:

> I am newbie to SWIG and using it for C++ to C#.
> I want to define a typemap for just specified classes work with it.
> How can i do that?
>
>
> Here is what i want;
> StringU is our type in C++ and I would like to convert it in string.
> TBLCEGRUPLAR is also our class that we use.
>
> %typemap(cstype) StringU * "string"
>
>
> %typemap(cstype,cscode) StringU * "string",TBLCEGRUPLAR
>

I suggest you read the documentation on typemaps
http://swig.org/Doc3.0/Typemaps.html and look at %apply. Also, the C#
and Java chapters will help.

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/zohomanageengine
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user
Loading...