G
Guest
I am trying to create an managed wrapper but have some problems with it by
using abstract classes.
In my unmanaged library code i had the following three classes with the
following hierarchy
Referenced (class)
Object (abstract class, inheriting from referenced)
Node (class, inheriting from object)
I want to make an managed wrapper for it with the same type of classes. So i
created an managed referenced class, and because this is the base class i
give it the pointer to the unmanaged object referenced.
The object class will be an managed abstract class with no constructor,
because abstract class should not have one. One of the methods of the
unmanaged class is cloneObject which should be implemented by the classes
that are inheriting of the abstract class Node. CloneObject gives as result
an value of the type Object.
So now the problem, i create an managed class Node which implements the
cloneObject method. But how to define the body of this method. Because with
not abstract classes i have created an extra constructor which get the
unmanagedobject en wrapped it. But with an abstract return type this is not
possible.
Hope this gives you more details about my question, and i hope somebody had
an solution for it.
Thanx
WithPit
using abstract classes.
In my unmanaged library code i had the following three classes with the
following hierarchy
Referenced (class)
Object (abstract class, inheriting from referenced)
Node (class, inheriting from object)
I want to make an managed wrapper for it with the same type of classes. So i
created an managed referenced class, and because this is the base class i
give it the pointer to the unmanaged object referenced.
The object class will be an managed abstract class with no constructor,
because abstract class should not have one. One of the methods of the
unmanaged class is cloneObject which should be implemented by the classes
that are inheriting of the abstract class Node. CloneObject gives as result
an value of the type Object.
So now the problem, i create an managed class Node which implements the
cloneObject method. But how to define the body of this method. Because with
not abstract classes i have created an extra constructor which get the
unmanagedobject en wrapped it. But with an abstract return type this is not
possible.
Hope this gives you more details about my question, and i hope somebody had
an solution for it.
Thanx
WithPit