Obtaining list of variables inside a uvm object

Hi

I was looking for some help to find a solution for the following problem statement

There is a uvm_object
class obj extends uvm_object
uvm_object_utils_begin(obj) uvm_field_int(x,UVM_ALL_ON)
uvm_field_int(y,UVM_ALL_ON) uvm_object_utils_end

rand int x;
rand int y;

endclass : obj

I need to write a function inside the uvm_object where i can automatically get the list of variables and their types (in the above example x and y) to use them to perform an operation . Is there any way I can use any structures of uvm_object to accomplish this?

Thanks
Venkatesh

In reply to Venkatesh Maddibande Sheshadrivasan:

2 remarks:
(1) don’t use fieled macros
(2) implement your individual function which returns the data you need. Ther is nothing available in the UVM library for doing this.

In reply to chr_sue:

Thanks chr_sue

Venkatesh