param_template_t<C, T>::param_template_t(device_t &device, const pstring name, const C val) : param_t(T, device, device.name() + "." + name) , m_param(val) { /* pstrings not yet supported, these need special logic */ if (T != param_t::STRING && T != param_t::MODEL) netlist().save(*this, m_param, "m_param"); device.setup().register_and_set_param(device.name() + "." + name, *this); }
pstring param_t::get_initial(const device_t &dev, bool *found) { pstring res = dev.setup().get_initial_param_val(this->name(), ""); *found = (res != ""); return res; }
param_str_t::param_str_t(device_t &device, const pstring &name, const pstring &val) : param_t(device, name) { m_param = device.setup().get_initial_param_val(this->name(),val); }
param_t::param_t(device_t &device, const pstring &name) : device_object_t(device, device.name() + "." + name) { device.setup().register_param_t(this->name(), *this); }