Tools and libraries to glue C/C++ APIs to high-level languages
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.
 
 
 
 
 

38 lines
1.5 KiB

using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using Mono.VisualC.Interop.ABI;
namespace Mono.VisualC.Interop {
public class VirtualOnlyAbi : CppAbi {
public VirtualOnlyAbi (MakeVTableDelegate makeVTable, MemberFilter vtableOverrideFilter)
{
this.makeVTableMethod = makeVTable;
this.vtableOverrideFilter = vtableOverrideFilter;
}
public VirtualOnlyAbi () { }
public override MethodType GetMethodType (MethodInfo imethod)
{
MethodType defaultType = base.GetMethodType (imethod);
if (defaultType == MethodType.NativeCtor || defaultType == MethodType.NativeDtor)
return MethodType.NoOp;
return defaultType;
}
public override string GetMangledMethodName (MethodInfo methodInfo)
{
throw new NotSupportedException ("Name mangling is not supported by this class. All C++ interface methods must be declared virtual.");
}
public override CallingConvention DefaultCallingConvention {
get {
throw new NotSupportedException ("This class does not support this property.");
}
}
}
}