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.
 
 
 
 
 

34 lines
1.0 KiB

//
// Mono.VisualC.Interop.Interfaces.cs
//
// Author:
// Alexander Corrado (alexander.corrado@gmail.com)
//
// Copyright (C) 2010 Alexander Corrado
//
using System;
using Mono.VisualC.Interop.ABI;
namespace Mono.VisualC.Interop {
public interface ICppObject : IDisposable {
CppInstancePtr Native { get; }
}
public interface ICppClass {
CppTypeInfo TypeInfo { get; }
}
// This should go without saying, but the C++ class must have a constructor
// if it is to be instantiatable.
public interface ICppClassInstantiatable : ICppClass {
CppInstancePtr Alloc ();
}
// It is recommended that managed wrappers implement ICppObject, but
// I'm not making it required so that any arbitrary object can be exposed to
// C++ via CppInstancePtr.ForManagedObject.
public interface ICppClassOverridable<T> : ICppClass /* where T : ICppObject */ {
CppInstancePtr Alloc (T managed);
}
}