mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
using Cxxi.Generators; |
|
using Cxxi.Passes; |
|
|
|
namespace Cxxi.Tests |
|
{ |
|
class Hello : ILibrary |
|
{ |
|
private LanguageGeneratorKind kind; |
|
|
|
public Hello(LanguageGeneratorKind kind) |
|
{ |
|
this.kind = kind; |
|
} |
|
|
|
public void Setup(DriverOptions options) |
|
{ |
|
options.LibraryName = "Hello"; |
|
options.GeneratorKind = kind; |
|
options.OutputDir = kind == LanguageGeneratorKind.CPlusPlusCLI ? |
|
"cli" : "cs"; |
|
options.Headers.Add("Hello.h"); |
|
options.IncludeDirs.Add("../../../examples/Hello"); |
|
} |
|
|
|
public void Preprocess(Library lib) |
|
{ |
|
} |
|
|
|
public void Postprocess(Library lib) |
|
{ |
|
} |
|
|
|
public void SetupPasses(Driver driver, PassBuilder p) |
|
{ |
|
} |
|
|
|
public void GenerateStart(TextTemplate template) |
|
{ |
|
} |
|
|
|
public void GenerateAfterNamespaces(TextTemplate template) |
|
{ |
|
} |
|
|
|
static class Program |
|
{ |
|
public static void Main(string[] args) |
|
{ |
|
Driver.Run(new Hello(LanguageGeneratorKind.CPlusPlusCLI)); |
|
Driver.Run(new Hello(LanguageGeneratorKind.CSharp)); |
|
} |
|
} |
|
} |
|
}
|
|
|