Can anyone explain about do copy means in do copy we are $cast and also extra child class handle?

function void do_copy(uvm_object rhs);
write_txn rhs_;

if(!($cast(rhs_,rhs)))
`uvm_fatal(“error”,“not assigned”);

super.do_copy(rhs);

data = rhs_.data;



endfunction

In reply to Lakshman4178:

rhs in do copy is of type uvm_object and rhs_ is mof type write_txn.
To work with both entries you have to perform a rype cast using $cast