Well I found a solution...rather straightforward...some sort of copy constructor.
ManagedFoo(ManagedFoo% other_ManagedFoo):Foo_point(other_ManagedFoo.get_native()){}
thats because If I have 2 managed foo instances I want to get the third by calling:
ManagedFoo one( );
ManagedFoo two( );
ManagedFoo three = one.divide(two);
this is the code for the divide implementation:
ManagedFoo ManagedFoo::divide(ManagedFoo %other_ManagedFoo)
{
Foo res = Foo_point->operator/ (*(other_ManagedFoo.get_native()));
ManagedFoo result(new Foo(res));
return result;
}
You can tell that .get_native() returns the pointer of the native instance.