| 113 | CUSTOM_PIMPL_CLS_DEFINE(Param) |
| 114 | |
| 115 | Param::Param(const ParamInfo& info) : m_impl(new ParamImpl(), impl_deleter<ParamImpl>) { |
| 116 | for (const auto& schema : info.meta()) { |
| 117 | TypedRef(ParamImpl, m_impl.get()) |
| 118 | .m_vals.emplace(schema.name(), schema.default_val()); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | ParamVal& Param::operator[](const std::string& name) { |
| 123 | return TypedRef(ParamImpl, m_impl.get()).m_vals.find(name)->second; |