Browse Source

Deleted the non-working marshalling interface and the option for it.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/719/head
Dimitar Dobrev 10 years ago
parent
commit
458f7ff25b
  1. 29
      src/Generator/Generators/CSharp/CSharpSources.cs
  2. 2
      src/Generator/Options.cs

29
src/Generator/Generators/CSharp/CSharpSources.cs

@ -489,11 +489,6 @@ namespace CppSharp.Generators.CSharp @@ -489,11 +489,6 @@ namespace CppSharp.Generators.CSharp
PopBlock(NewLineKind.BeforeNextBlock);
}
if (Options.GenerateClassMarshals)
{
GenerateClassMarshals(@class);
}
GenerateClassConstructors(@class);
GenerateClassMethods(@class.Methods);
@ -511,25 +506,6 @@ namespace CppSharp.Generators.CSharp @@ -511,25 +506,6 @@ namespace CppSharp.Generators.CSharp
Context.TypeMaps.TypeMaps.Add(@class.Name, typeMap);
}
private void GenerateClassMarshals(Class @class)
{
WriteLine("int CppSharp.Runtime.ICppMarshal.NativeDataSize");
WriteStartBraceIndent();
WriteLine("get {{ return {0}; }}", @class.Layout.DataSize);
WriteCloseBraceIndent();
NewLine();
WriteLine("void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance)");
WriteStartBraceIndent();
WriteCloseBraceIndent();
NewLine();
WriteLine("void CppSharp.Runtime.ICppMarshal.MarshalNativeToManaged(global::System.IntPtr instance)");
WriteStartBraceIndent();
WriteCloseBraceIndent();
NewLine();
}
private void GenerateInterface(Class @class)
{
if (!@class.IsGenerated || @class.IsIncomplete)
@ -744,11 +720,6 @@ namespace CppSharp.Generators.CSharp @@ -744,11 +720,6 @@ namespace CppSharp.Generators.CSharp
{
if (@class.IsRefType)
bases.Add("IDisposable");
if (Options.GenerateClassMarshals)
{
bases.Add("CppSharp.Runtime.ICppMarshal");
}
}
if (bases.Count > 0 && !@class.IsStatic)

2
src/Generator/Options.cs

@ -17,7 +17,6 @@ namespace CppSharp @@ -17,7 +17,6 @@ namespace CppSharp
Modules = new List<Module> { SystemModule };
GeneratorKind = GeneratorKind.CSharp;
GenerateClassMarshals = false;
OutputInteropIncludes = true;
CommentPrefix = "///";
@ -87,7 +86,6 @@ namespace CppSharp @@ -87,7 +86,6 @@ namespace CppSharp
public bool OutputInteropIncludes;
public bool GenerateFunctionTemplates;
public bool GenerateInternalImports;
public bool GenerateClassMarshals;
public bool UseHeaderDirectories;
/// <summary>

Loading…
Cancel
Save