| 319 | } |
| 320 | |
| 321 | Boxed_Value get_attr(const std::string &t_name) |
| 322 | { |
| 323 | if (!m_data->m_attrs) |
| 324 | { |
| 325 | m_data->m_attrs = std::make_unique<std::map<std::string, std::shared_ptr<Data>>>(); |
| 326 | } |
| 327 | |
| 328 | auto &attr = (*m_data->m_attrs)[t_name]; |
| 329 | if (attr) { |
| 330 | return Boxed_Value(attr, Internal_Construction()); |
| 331 | } else { |
| 332 | Boxed_Value bv; //default construct a new one |
| 333 | attr = bv.m_data; |
| 334 | return bv; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | Boxed_Value ©_attrs(const Boxed_Value &t_obj) |
| 339 | { |
no test coverage detected