| 985 | } |
| 986 | |
| 987 | bool operator==(const structure &s) const |
| 988 | { |
| 989 | if (s.m_id != m_id) |
| 990 | return false; |
| 991 | if (!m_shadow && m_data->exist("equal")) |
| 992 | return invoke(m_data->get_var("equal"), var::make<structure>(this), |
| 993 | var::make<structure>(&s)) |
| 994 | .const_val<bool>(); |
| 995 | else { |
| 996 | for (auto &it : *m_data) |
| 997 | if (it.first != "parent" && s.m_data->get_var(it.first) != m_data->get_var_by_id(it.second)) |
| 998 | return false; |
| 999 | return true; |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | const std::string &type_name() const |
| 1004 | { |