Consider the simple and tedious task of wrapping C++ classes into Managed C++ (MC++). The classic approach is to make a proxy around an instance of the C++ class allocated on the heap:
// the C++ class class A {...}; // the MC++ wrapper public __gc class MA { A* a; public: MA() { a = new A();} ~MA() { delete a;} }
This works well for individual classes (although it is a tedious work) but it fails when it comes to map inherance. Let's add a second class to our example:
class A { public: virtual void method(); }; class B : public A { public: virtual void method(); }
The proxies for A,B should map the inherance the original classes, therefore I would expect to have something like this:
public __gc class MB : MA { ??? }
Page rendered at Thursday, December 04, 2008 8:37:20 AM UTC
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.