Browse Source

Fixed gnarly Git-svn issue

git-svn-id: https://mono-soc-2010.googlecode.com/svn/trunk/cppinterop@12 a470b8cb-0e6f-1642-1b45-71e107334c4b
pull/1/head
alexander.corrado 15 years ago
parent
commit
566a3bdf0f
  1. 7
      CPPPOC/CSimpleClass.cs
  2. 5
      Mono.VisualC.Interop/ABI/VTable.cs
  3. 15
      Mono.VisualC.Interop/CppField.cs
  4. 18
      Mono.VisualC.Interop/Interfaces.cs

7
CPPPOC/CSimpleClass.cs

@ -8,12 +8,6 @@ using System.Runtime.InteropServices; @@ -8,12 +8,6 @@ using System.Runtime.InteropServices;
using Mono.VisualC.Interop;
namespace CPPPOC {
<<<<<<< HEAD
public class CSimpleClass : ICppInstance {
private interface __ICSimpleClass : ICppOverridable<CSimpleClass> {
=======
public class CSimpleClass : ICppObject {
#region C++ Header
@ -21,7 +15,6 @@ namespace CPPPOC { @@ -21,7 +15,6 @@ namespace CPPPOC {
// C++ class's interface. The order of methods must be the same as in the C++ header.
private interface __ICSimpleClass : ICppClassOverridable<CSimpleClass> {
// constructor
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
void CSimpleClass(CppInstancePtr ths, int value);
void M0(CppInstancePtr ths);

5
Mono.VisualC.Interop/ABI/VTable.cs

@ -107,13 +107,8 @@ namespace Mono.VisualC.Interop.ABI { @@ -107,13 +107,8 @@ namespace Mono.VisualC.Interop.ABI {
return result;
}
<<<<<<< HEAD
public static bool BindAny (MemberInfo member, object obj)
=======
public static bool BindToSignature (MemberInfo member, object obj)
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
{
MethodInfo imethod = (MethodInfo) obj;
MethodInfo candidate = (MethodInfo) member;

15
Mono.VisualC.Interop/CppField.cs

@ -23,16 +23,6 @@ namespace Mono.VisualC.Interop { @@ -23,16 +23,6 @@ namespace Mono.VisualC.Interop {
get {
Type retType = typeof (T);
object retVal;
<<<<<<< HEAD
if (retType.Equals(typeof(Byte)))
retVal = Marshal.ReadByte(ip.Native, fieldOffset);
else if (retType.Equals(typeof(Int16)))
retVal = Marshal.ReadInt16(ip.Native, fieldOffset);
else if (retType.Equals(typeof(Int32)))
retVal = Marshal.ReadInt32(ip.Native, fieldOffset);
else throw new NotImplementedException("Cannot read C++ fields of type " + retType.Name);
=======
if (retType.Equals (typeof (Byte)))
retVal = Marshal.ReadByte (ip.Native, fieldOffset);
else if (retType.Equals (typeof (Int16)))
@ -40,8 +30,7 @@ namespace Mono.VisualC.Interop { @@ -40,8 +30,7 @@ namespace Mono.VisualC.Interop {
else if (retType.Equals (typeof (Int32)))
retVal = Marshal.ReadInt32 (ip.Native, fieldOffset);
else throw new NotImplementedException ("Cannot read C++ fields of type " + retType.Name);
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
return (T)retVal;
}
set {
@ -53,7 +42,7 @@ namespace Mono.VisualC.Interop { @@ -53,7 +42,7 @@ namespace Mono.VisualC.Interop {
Marshal.WriteInt16 (ip.Native, fieldOffset, (Int16)setVal);
else if (setType.Equals (typeof (Int32)))
Marshal.WriteInt32 (ip.Native, fieldOffset, (Int32)setVal);
else throw new NotImplementedException("Cannot write C++ fields of type " + setType.Name);
else throw new NotImplementedException ("Cannot write C++ fields of type " + setType.Name);
}
}
}

18
Mono.VisualC.Interop/Interfaces.cs

@ -9,36 +9,18 @@ @@ -9,36 +9,18 @@
using System;
<<<<<<< HEAD
namespace Mono.VisualC.Interop
{
public interface ICppInstance : IDisposable
{
IntPtr Native { get; }
=======
namespace Mono.VisualC.Interop {
public interface ICppObject : IDisposable {
IntPtr Native { get; }
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
}
public interface ICppClassInstantiatable {
CppInstancePtr Alloc ();
void Destruct (CppInstancePtr instance);
}
<<<<<<< HEAD
public interface ICppOverridable<T> where T : ICppInstance
{
CppInstancePtr Alloc(T managed);
void Destruct(CppInstancePtr instance);
=======
public interface ICppClassOverridable<T> where T : ICppObject {
CppInstancePtr Alloc (T managed);
void Destruct (CppInstancePtr instance);
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
}
}
Loading…
Cancel
Save