I have the following code in my test_base:
class test_base extends uvm_test;
//factory registration
`uvm_component_utils(test_base)
//internal decleration
girobo2_env grb_env_i;
//configuration objects:
grb2_env_config m_env_cfg;
axi_agent_config m_axi_agent_cfg;
.........
//build_phase
// Create tx_agent agent configuration object
m_tx_agent_cfg = tx_agent_config::type_id::create("m_tx_agent_cfg");
if(!uvm_config_db #(virtual tx_interface)::get(this, "", "tx_vif", m_tx_agent_cfg.tx_vif))
`uvm_error("RESOURCE_ERROR", "tx_interface virtual interface not found")
m_env_cfg.m_tx_agent_cfg = m_tx_agent_cfg;
// Call function to configure the tx agent
configure_tx_agent(m_tx_agent_cfg);
//Create axi_agent agent configuration object
m_axi_agent_cfg = axi_agent_config::type_id::create("m_axi_agent_cfg");
if(!uvm_config_db #(virtual axi_interface)::get(this, "", "axi_vif", m_axi_agent_cfg.axi_vif)
`uvm_error("RESOURCE_ERROR", "axi_interface virtual interface not found")
m_env_cfg.m_axi_agent_cfg = m_axi_agent_cfg;
// Call function to configure the axi agent
configure_axi_agent(m_axi_agent_cfg);
//--------------------------------------------------------------------
// configure_tx_agent
//--------------------------------------------------------------------
// Convenience function to configure the agent
// This can be overloaded by extensions to this base class
virtual function void configure_tx_agent (tx_agent_config cfg);
cfg.is_active = UVM_PASSIVE;
endfunction: configure_tx_agent
//--------------------------------------------------------------------
// configure_my_agent
//--------------------------------------------------------------------
// Convenience function to configure the agent
// This can be overloaded by extensions to this base class
virtual function void configure_axi_agent (axi_agent_config cfg);
cfg.is_active = UVM_PASSIVE;
endfunction: configure_my_agent
endclass: test_base
Instead of creating 2 function which do the same Is there an option to use general function named configure_my_agent and define the type of the input of the configure_my_agent function general (like template in c++ for example.