MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _trim_parent_class

Function _trim_parent_class

modules/gdscript/gdscript_editor.cpp:714–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712// END LOCATION METHODS
713
714static String _trim_parent_class(const String &p_class, const String &p_base_class) {
715 if (p_base_class.is_empty()) {
716 return p_class;
717 }
718 Vector<String> names = p_class.split(".", false, 1);
719 if (names.size() == 2) {
720 const String &first = names[0];
721 if (ClassDB::class_exists(p_base_class) && ClassDB::class_exists(first) && ClassDB::is_parent_class(p_base_class, first)) {
722 const String &rest = names[1];
723 return rest;
724 }
725 }
726 return p_class;
727}
728
729static String _get_visual_datatype(const PropertyInfo &p_info, bool p_is_arg, const String &p_base_class = "") {
730 String class_name = p_info.class_name;

Callers 1

_get_visual_datatypeFunction · 0.85

Calls 3

splitMethod · 0.80
sizeMethod · 0.65
is_emptyMethod · 0.45

Tested by

no test coverage detected