MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / dict_to_method_info

Function dict_to_method_info

compat/fake_csharp_script.cpp:299–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299MethodInfo 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
321PropertyInfo dict_to_property_info(const Dictionary &p_dict) {
322 PropertyInfo info = get_pi_from_type(p_dict.get("type", "void"), p_dict.get("name", ""));

Callers 1

reloadMethod · 0.85

Calls 4

get_pi_from_typeFunction · 0.85
push_backMethod · 0.80
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected