Browse Source

Added default option to avoid generating ICppMarshal interface in the output files.

pull/173/head
gpetrou 12 years ago
parent
commit
1ec9686111
  1. 7
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs
  2. 2
      src/Generator/Options.cs

7
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -366,7 +366,11 @@ namespace CppSharp.Generators.CSharp @@ -366,7 +366,11 @@ namespace CppSharp.Generators.CSharp
PopBlock(NewLineKind.BeforeNextBlock);
}
if (Options.GenerateClassMarshals)
{
GenerateClassMarshals(@class);
}
GenerateClassConstructors(@class);
if (@class.IsUnion)
@ -772,7 +776,10 @@ namespace CppSharp.Generators.CSharp @@ -772,7 +776,10 @@ namespace CppSharp.Generators.CSharp
if (@class.IsRefType)
bases.Add("IDisposable");
if (Options.GenerateClassMarshals)
{
bases.Add("CppSharp.Runtime.ICppMarshal");
}
if (bases.Count > 0)
Write(" : {0}", string.Join(", ", bases));

2
src/Generator/Options.cs

@ -37,6 +37,7 @@ namespace CppSharp @@ -37,6 +37,7 @@ namespace CppSharp
GeneratorKind = GeneratorKind.CSharp;
GenerateLibraryNamespace = true;
GeneratePartialClasses = true;
GenerateClassMarshals = false;
OutputInteropIncludes = true;
MaxIndent = 80;
CommentPrefix = "///";
@ -89,6 +90,7 @@ namespace CppSharp @@ -89,6 +90,7 @@ namespace CppSharp
public bool GenerateInterfacesForMultipleInheritance;
public bool GenerateProperties;
public bool GenerateInternalImports;
public bool GenerateClassMarshals;
/// <summary>
/// Enable this option to enable generation of finalizers.

Loading…
Cancel
Save