From: William S F. <ws...@fu...> - 2007-08-15 16:10:38
|
David Piepgrass wrote: > I would like SWIG to generate "partial" wrapper classes by default: > > public partial class Foo : IDisposable {...} > > This way I can easily add stuff to the wrapper in another file. It > shouldn't hurt anything; C# doesn't complain if a "partial" class has > only one part. > > I'd also like to use a struct when wrapping pointers. Maybe William > could give me some clues? > Use the csclassmodifiers typemap, eg: %typemap(csclassmodifiers) PartialClass "public partial class" class PartialClass { ... }; You can use the same typemap for the typewrapper classes, to modify it to use a struct, eg for SWIGTYPE_p_int: %typemap(csclassmodifiers) int *, int &, int[] "public struct" William |