| 83 | CUSTOM_PIMPL_CLS_DEFINE(ParamInfo) |
| 84 | |
| 85 | void ParamInfo::set_tag(const std::string& hash_str) { |
| 86 | const char* ptr = hash_str.c_str(); |
| 87 | TypedRef(ParamInfoImpl, m_impl.get()).TAG = 0; |
| 88 | for (size_t i = 0; i < hash_str.size(); i++) { |
| 89 | TypedRef(ParamInfoImpl, m_impl.get()).TAG = |
| 90 | mgb::hash_pair_combine( |
| 91 | TypedRef(ParamInfoImpl, m_impl.get()).TAG, |
| 92 | mgb::hash(*(ptr++))) % |
| 93 | std::numeric_limits<uint32_t>::max(); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void ParamInfo::set_meta(const std::vector<ParamSchema>& meta) { |
| 98 | TypedRef(ParamInfoImpl, m_impl.get()).m_meta = meta; |