| 297 | } |
| 298 | |
| 299 | MethodInfo dict_to_method_info(const Dictionary &p_dict) { |
| 300 | MethodInfo info; |
| 301 | info.name = p_dict["name"]; |
| 302 | String type = p_dict.get("return_type", "void"); |
| 303 | info.return_val = get_pi_from_type(type); |
| 304 | Vector<String> parameter_names = p_dict.get("parameter_names", Vector<String>()); |
| 305 | Vector<String> parameter_types = p_dict.get("parameter_types", Vector<String>()); |
| 306 | for (int i = 0; i < parameter_names.size(); i++) { |
| 307 | info.arguments.push_back(get_pi_from_type(parameter_types[i], parameter_names[i])); |
| 308 | } |
| 309 | if (p_dict.get("is_static", false)) { |
| 310 | info.flags |= METHOD_FLAG_STATIC; |
| 311 | } |
| 312 | if (p_dict.get("is_abstract", false)) { |
| 313 | info.flags |= METHOD_FLAG_VIRTUAL_REQUIRED; |
| 314 | } |
| 315 | // if (p_dict.get("is_virtual", false)) { |
| 316 | // info.flags |= METHOD_FLAG_VIRTUAL; |
| 317 | // } |
| 318 | return info; |
| 319 | } |
| 320 | |
| 321 | PropertyInfo dict_to_property_info(const Dictionary &p_dict) { |
| 322 | PropertyInfo info = get_pi_from_type(p_dict.get("type", "void"), p_dict.get("name", "")); |
no test coverage detected