In reply to rbrtbrennan1:
You can’t pass the name of a type as an argument to a function. What you can do is either pass a string or some other encoded value as an argument and have the function branch to s statement that constructs the requires class, or you can use a proxy class object. A proxy class sole purpose is to stand in for the actual class you want to create with a virtual method.
class base;
endclass
class subclass1 extends base;
endclass
class subclass2 extends base;
endclass
virtual class base_proxy;
pure virtual function base create;
endclass
// this assumes T is a subclass of base
class wrapper #(type T) extends base_proxy;
virtual function T create;
create = new;
endfunction
endclass
class A;
base b_h;
function myFunction(proxy proxy_h);
b_h = proxy_h.create();
endfunction
endclass
Now in you can pass different wrapper class objects to your myFunction
base h1, h2;
h1 = wrapper#(subclass1)::new;
h2 = wrapper#(subclass2)::new;
myFunction(h1);
Proxy classes are used with the factory pattern. See my SystemVerilog OOP course, especially the third session of proxy classes and the factory.