Created
September 24, 2012 21:09
-
-
Save automatonic/3778393 to your computer and use it in GitHub Desktop.
SWIGing to C#: Inject "using" statement(s)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Into Intermediate (P/Invoke) Class | |
%pragma(csharp) imclassimports=%{ | |
using System; | |
using System.Runtime.InteropServices; | |
//The above are in the default version, additions follow: | |
using System.Collections.Generic; | |
using Some.Other.Namespace; | |
%} | |
//Into Generated Module Class (for globals, etc.) | |
%pragma(csharp) moduleimports=%{ | |
using System; | |
using System.Runtime.InteropServices; | |
//The above are in the default version, additions follow: | |
using System.Collections.Generic; | |
using Some.Other.Namespace; | |
%} | |
//Into each generated C# Wrapper class | |
%typemap(csimports) SWIGTYPE %{ | |
using System; | |
using System.Runtime.InteropServices; | |
//The above are in the default version, additions follow: | |
using System.Collections.Generic; | |
using Some.Other.Namespace; | |
%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment