zhon1231 Posted November 29, 2011 Report Share Posted November 29, 2011 Hi all, I am in the middle of writing a parametrized class, and I hit a road block. Is there a way I can overwrite a parameter in the type_id::create call? For example, can I do something similar to this? Class A #(int j=10) .... endclass Class B A m_a; function void build(); case(mode) 0: m_a = A#(7)::type_id::create(...); 1: m_a = A#(2)::type_id::create(...); 2: m_a = A#(11)::type_id::create(...); default: m_a = A#(4)::type_id::create(...); endcase endfunction endclass Any comment is greatly appreciated! Thanks, Billy endclass Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.