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

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

@ -107,13 +107,8 @@ namespace Mono.VisualC.Interop.ABI {
return result; return result;
} }
<<<<<<< HEAD
public static bool BindAny (MemberInfo member, object obj)
=======
public static bool BindToSignature (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 imethod = (MethodInfo) obj;
MethodInfo candidate = (MethodInfo) member; MethodInfo candidate = (MethodInfo) member;

15
Mono.VisualC.Interop/CppField.cs

@ -23,16 +23,6 @@ namespace Mono.VisualC.Interop {
get { get {
Type retType = typeof (T); Type retType = typeof (T);
object retVal; 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))) if (retType.Equals (typeof (Byte)))
retVal = Marshal.ReadByte (ip.Native, fieldOffset); retVal = Marshal.ReadByte (ip.Native, fieldOffset);
else if (retType.Equals (typeof (Int16))) else if (retType.Equals (typeof (Int16)))
@ -40,8 +30,7 @@ namespace Mono.VisualC.Interop {
else if (retType.Equals (typeof (Int32))) else if (retType.Equals (typeof (Int32)))
retVal = Marshal.ReadInt32 (ip.Native, fieldOffset); retVal = Marshal.ReadInt32 (ip.Native, fieldOffset);
else throw new NotImplementedException ("Cannot read C++ fields of type " + retType.Name); else throw new NotImplementedException ("Cannot read C++ fields of type " + retType.Name);
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
return (T)retVal; return (T)retVal;
} }
set { set {
@ -53,7 +42,7 @@ namespace Mono.VisualC.Interop {
Marshal.WriteInt16 (ip.Native, fieldOffset, (Int16)setVal); Marshal.WriteInt16 (ip.Native, fieldOffset, (Int16)setVal);
else if (setType.Equals (typeof (Int32))) else if (setType.Equals (typeof (Int32)))
Marshal.WriteInt32 (ip.Native, fieldOffset, (Int32)setVal); 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 @@
using System; using System;
<<<<<<< HEAD
namespace Mono.VisualC.Interop
{
public interface ICppInstance : IDisposable
{
IntPtr Native { get; }
=======
namespace Mono.VisualC.Interop { namespace Mono.VisualC.Interop {
public interface ICppObject : IDisposable { public interface ICppObject : IDisposable {
IntPtr Native { get; } IntPtr Native { get; }
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
} }
public interface ICppClassInstantiatable { public interface ICppClassInstantiatable {
CppInstancePtr Alloc (); CppInstancePtr Alloc ();
void Destruct (CppInstancePtr instance); 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 { public interface ICppClassOverridable<T> where T : ICppObject {
CppInstancePtr Alloc (T managed); CppInstancePtr Alloc (T managed);
void Destruct (CppInstancePtr instance); void Destruct (CppInstancePtr instance);
>>>>>>> Refactored and completed managed VTable implementation. Prepared for
} }
} }
Loading…
Cancel
Save