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.
36 lines
1.0 KiB
36 lines
1.0 KiB
using System.Linq; |
|
using CppSharp.AST; |
|
using CppSharp.Generators; |
|
using CppSharp.Utils; |
|
|
|
namespace CppSharp.Tests |
|
{ |
|
public class TypeMaps : GeneratorTest |
|
{ |
|
public TypeMaps(GeneratorKind kind) |
|
: base("TypeMaps", kind) |
|
{ |
|
|
|
} |
|
|
|
public override void SetupPasses(Driver driver) |
|
{ |
|
driver.Options.MarshalCharAsManagedChar = true; |
|
driver.Options.GenerateProperties = true; |
|
driver.Options.GenerateConversionOperators = true; |
|
} |
|
|
|
public override void Preprocess(Driver driver, ASTContext ctx) |
|
{ |
|
ctx.SetClassAsValueType("HasQList"); |
|
ctx.FindCompleteClass("QList").Constructors.First(c => c.IsCopyConstructor).GenerationKind = GenerationKind.None; |
|
ctx.IgnoreClassWithName("IgnoredType"); |
|
} |
|
|
|
public static void Main(string[] args) |
|
{ |
|
ConsoleDriver.Run(new TypeMaps(GeneratorKind.CLI)); |
|
ConsoleDriver.Run(new TypeMaps(GeneratorKind.CSharp)); |
|
} |
|
} |
|
}
|
|
|