Given the following declarations :
type Food_T is abstract tagged null record;
type Food_Ptr is access all Food_T'Class;
type Wrapper_T is new Ada.Finalization.Controlled with record
Ptr : Food_Ptr;
end record;
procedure Adjust (Object : in out Wrapper_T) is
begin
null; -- what goes here ?
end Adjust;
I am wondering how to allocate & assign (Deep Copy) the correct derivitive of food_t when i dont know what type Object.ptr will be pointing to (and where Source & Destination are!).
Any help would be appreciated.
Thanks,
NWS.