Skip to content

Commit

Permalink
Commented out Structs from API.
Browse files Browse the repository at this point in the history
  • Loading branch information
nlupugla committed Sep 18, 2024
1 parent bf2ba7b commit 7e9d0b6
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 117 deletions.
60 changes: 30 additions & 30 deletions core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1433,14 +1433,14 @@ Dictionary ClassDB::class_get_signal(const StringName &p_class, const StringName
}
}

Struct<MethodInfo> ClassDB::class_get_signal_as_struct(const StringName &p_class, const StringName &p_signal) const {
MethodInfo signal;
if (::ClassDB::get_signal(p_class, p_signal, &signal)) {
return Struct<MethodInfo>(signal);
} else {
return Struct<MethodInfo>();
}
}
//Struct<MethodInfo> ClassDB::class_get_signal_as_struct(const StringName &p_class, const StringName &p_signal) const {
// MethodInfo signal;
// if (::ClassDB::get_signal(p_class, p_signal, &signal)) {
// return Struct<MethodInfo>(signal);
// } else {
// return Struct<MethodInfo>();
// }
//}

TypedArray<Dictionary> ClassDB::class_get_signal_list(const StringName &p_class, bool p_no_inheritance) const {
List<MethodInfo> signals;
Expand All @@ -1454,11 +1454,11 @@ TypedArray<Dictionary> ClassDB::class_get_signal_list(const StringName &p_class,
return ret;
}

TypedArray<Struct<MethodInfo>> ClassDB::class_get_signal_list_as_structs(const StringName &p_class, bool p_no_inheritance) const {
List<MethodInfo> signals;
::ClassDB::get_signal_list(p_class, &signals, p_no_inheritance);
return TypedArray<Struct<MethodInfo>>(&signals);
}
//TypedArray<Struct<MethodInfo>> ClassDB::class_get_signal_list_as_structs(const StringName &p_class, bool p_no_inheritance) const {
// List<MethodInfo> signals;
// ::ClassDB::get_signal_list(p_class, &signals, p_no_inheritance);
// return TypedArray<Struct<MethodInfo>>(&signals);
//}

TypedArray<Dictionary> ClassDB::class_get_property_list(const StringName &p_class, bool p_no_inheritance) const {
List<PropertyInfo> plist;
Expand All @@ -1471,11 +1471,11 @@ TypedArray<Dictionary> ClassDB::class_get_property_list(const StringName &p_clas
return ret;
}

TypedArray<Struct<PropertyInfo>> ClassDB::class_get_property_list_as_structs(const StringName &p_class, bool p_no_inheritance) const {
List<PropertyInfo> plist;
::ClassDB::get_property_list(p_class, &plist, p_no_inheritance);
return TypedArray<Struct<PropertyInfo>>(&plist);
}
//TypedArray<Struct<PropertyInfo>> ClassDB::class_get_property_list_as_structs(const StringName &p_class, bool p_no_inheritance) const {
// List<PropertyInfo> plist;
// ::ClassDB::get_property_list(p_class, &plist, p_no_inheritance);
// return TypedArray<Struct<PropertyInfo>>(&plist);
//}

StringName ClassDB::class_get_property_getter(const StringName &p_class, const StringName &p_property) {
return ::ClassDB::get_property_getter(p_class, p_property);
Expand Down Expand Up @@ -1537,11 +1537,11 @@ TypedArray<Dictionary> ClassDB::class_get_method_list(const StringName &p_class,
return ret;
}

TypedArray<Struct<MethodInfo>> ClassDB::class_get_method_list_as_structs(const StringName &p_class, bool p_no_inheritance) const {
List<MethodInfo> methods;
::ClassDB::get_method_list(p_class, &methods, p_no_inheritance);
return TypedArray<Struct<MethodInfo>>(&methods);
}
//TypedArray<Struct<MethodInfo>> ClassDB::class_get_method_list_as_structs(const StringName &p_class, bool p_no_inheritance) const {
// List<MethodInfo> methods;
// ::ClassDB::get_method_list(p_class, &methods, p_no_inheritance);
// return TypedArray<Struct<MethodInfo>>(&methods);
//}

Variant ClassDB::class_call_static_method(const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) {
if (p_argcount < 2) {
Expand Down Expand Up @@ -1679,9 +1679,9 @@ void ClassDB::get_argument_options(const StringName &p_function, int p_idx, List
if (p_idx == 0) {
first_argument_is_class = (pf == "get_inheriters_from_class" || pf == "get_parent_class" ||
pf == "class_exists" || pf == "can_instantiate" || pf == "instantiate" ||
pf == "class_has_signal" || pf == "class_get_signal" || pf == "class_get_signal_list" || pf == "class_get_signal_list_as_struct" ||
pf == "class_get_property_list" || pf == "class_get_property_list_as_structs" || pf == "class_get_property" || pf == "class_set_property" ||
pf == "class_has_method" || pf == "class_get_method_list" || pf == "class_get_method_list_as_structs" ||
pf == "class_has_signal" || pf == "class_get_signal" || pf == "class_get_signal_list" ||
pf == "class_get_property_list" || pf == "class_get_property" || pf == "class_set_property" ||
pf == "class_has_method" || pf == "class_get_method_list" ||
pf == "class_get_integer_constant_list" || pf == "class_has_integer_constant" || pf == "class_get_integer_constant" ||
pf == "class_has_enum" || pf == "class_get_enum_list" || pf == "class_get_enum_constants" || pf == "class_get_integer_constant_enum" ||
pf == "is_class_enabled" || pf == "is_class_enum_bitfield");
Expand All @@ -1707,12 +1707,12 @@ void ClassDB::_bind_methods() {

::ClassDB::bind_method(D_METHOD("class_has_signal", "class", "signal"), &ClassDB::class_has_signal);
::ClassDB::bind_method(D_METHOD("class_get_signal", "class", "signal"), &ClassDB::class_get_signal);
::ClassDB::bind_method(D_METHOD("class_get_signal_as_struct", "class", "signal"), &ClassDB::class_get_signal_as_struct);
//::ClassDB::bind_method(D_METHOD("class_get_signal_as_struct", "class", "signal"), &ClassDB::class_get_signal_as_struct);
::ClassDB::bind_method(D_METHOD("class_get_signal_list", "class", "no_inheritance"), &ClassDB::class_get_signal_list, DEFVAL(false));
::ClassDB::bind_method(D_METHOD("class_get_signal_list_as_structs", "class", "no_inheritance"), &ClassDB::class_get_signal_list_as_structs, DEFVAL(false));
//::ClassDB::bind_method(D_METHOD("class_get_signal_list_as_structs", "class", "no_inheritance"), &ClassDB::class_get_signal_list_as_structs, DEFVAL(false));

::ClassDB::bind_method(D_METHOD("class_get_property_list", "class", "no_inheritance"), &ClassDB::class_get_property_list, DEFVAL(false));
::ClassDB::bind_method(D_METHOD("class_get_property_list_as_structs", "class", "no_inheritance"), &ClassDB::class_get_property_list_as_structs, DEFVAL(false));
//::ClassDB::bind_method(D_METHOD("class_get_property_list_as_structs", "class", "no_inheritance"), &ClassDB::class_get_property_list_as_structs, DEFVAL(false));
::ClassDB::bind_method(D_METHOD("class_get_property_getter", "class", "property"), &ClassDB::class_get_property_getter);
::ClassDB::bind_method(D_METHOD("class_get_property_setter", "class", "property"), &ClassDB::class_get_property_setter);
::ClassDB::bind_method(D_METHOD("class_get_property", "object", "property"), &ClassDB::class_get_property);
Expand All @@ -1725,7 +1725,7 @@ void ClassDB::_bind_methods() {
::ClassDB::bind_method(D_METHOD("class_get_method_argument_count", "class", "method", "no_inheritance"), &ClassDB::class_get_method_argument_count, DEFVAL(false));

::ClassDB::bind_method(D_METHOD("class_get_method_list", "class", "no_inheritance"), &ClassDB::class_get_method_list, DEFVAL(false));
::ClassDB::bind_method(D_METHOD("class_get_method_list_as_structs", "class", "no_inheritance"), &ClassDB::class_get_method_list_as_structs, DEFVAL(false));
//::ClassDB::bind_method(D_METHOD("class_get_method_list_as_structs", "class", "no_inheritance"), &ClassDB::class_get_method_list_as_structs, DEFVAL(false));

::ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "class_call_static_method", &ClassDB::class_call_static_method, MethodInfo("class_call_static_method", PropertyInfo(Variant::STRING_NAME, "class"), PropertyInfo(Variant::STRING_NAME, "method")));

Expand Down
8 changes: 4 additions & 4 deletions core/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,12 @@ class ClassDB : public Object {

bool class_has_signal(const StringName &p_class, const StringName &p_signal) const;
Dictionary class_get_signal(const StringName &p_class, const StringName &p_signal) const;
Struct<MethodInfo> class_get_signal_as_struct(const StringName &p_class, const StringName &p_signal) const;
//Struct<MethodInfo> class_get_signal_as_struct(const StringName &p_class, const StringName &p_signal) const;
TypedArray<Dictionary> class_get_signal_list(const StringName &p_class, bool p_no_inheritance = false) const;
TypedArray<Struct<MethodInfo>> class_get_signal_list_as_structs(const StringName &p_class, bool p_no_inheritance = false) const;
//TypedArray<Struct<MethodInfo>> class_get_signal_list_as_structs(const StringName &p_class, bool p_no_inheritance = false) const;

TypedArray<Dictionary> class_get_property_list(const StringName &p_class, bool p_no_inheritance = false) const;
TypedArray<Struct<PropertyInfo>> class_get_property_list_as_structs(const StringName &p_class, bool p_no_inheritance = false) const;
//TypedArray<Struct<PropertyInfo>> class_get_property_list_as_structs(const StringName &p_class, bool p_no_inheritance = false) const;
StringName class_get_property_getter(const StringName &p_class, const StringName &p_property);
StringName class_get_property_setter(const StringName &p_class, const StringName &p_property);
Variant class_get_property(Object *p_object, const StringName &p_property) const;
Expand All @@ -475,7 +475,7 @@ class ClassDB : public Object {
int class_get_method_argument_count(const StringName &p_class, const StringName &p_method, bool p_no_inheritance = false) const;

TypedArray<Dictionary> class_get_method_list(const StringName &p_class, bool p_no_inheritance = false) const;
TypedArray<Struct<MethodInfo>> class_get_method_list_as_structs(const StringName &p_class, bool p_no_inheritance = false) const;
//TypedArray<Struct<MethodInfo>> class_get_method_list_as_structs(const StringName &p_class, bool p_no_inheritance = false) const;
Variant class_call_static_method(const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error);

PackedStringArray class_get_integer_constant_list(const StringName &p_class, bool p_no_inheritance = false) const;
Expand Down
64 changes: 32 additions & 32 deletions core/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -940,11 +940,11 @@ TypedArray<Dictionary> Object::_get_property_list_bind() const {
return convert_property_list(&lpi);
}

TypedArray<Struct<PropertyInfo>> Object::_get_property_list_as_structs_bind() const {
List<PropertyInfo> lpi;
get_property_list(&lpi);
return TypedArray<Struct<PropertyInfo>>(&lpi);
}
//TypedArray<Struct<PropertyInfo>> Object::_get_property_list_as_structs_bind() const {
// List<PropertyInfo> lpi;
// get_property_list(&lpi);
// return TypedArray<Struct<PropertyInfo>>(&lpi);
//}

TypedArray<Dictionary> Object::_get_method_list_bind() const {
List<MethodInfo> ml;
Expand All @@ -960,11 +960,11 @@ TypedArray<Dictionary> Object::_get_method_list_bind() const {
return ret;
}

TypedArray<Struct<MethodInfo>> Object::_get_method_list_as_structs_bind() const {
List<MethodInfo> ml;
get_method_list(&ml);
return TypedArray<Struct<MethodInfo>>(&ml);
}
//TypedArray<Struct<MethodInfo>> Object::_get_method_list_as_structs_bind() const {
// List<MethodInfo> ml;
// get_method_list(&ml);
// return TypedArray<Struct<MethodInfo>>(&ml);
//}

TypedArray<StringName> Object::_get_meta_list_bind() const {
TypedArray<StringName> _metaret;
Expand Down Expand Up @@ -1166,9 +1166,9 @@ void Object::_add_user_signal(const String &p_name, const Array &p_args) {
}
}

void Object::_add_user_signal_as_struct(const Struct<MethodInfo> &p_signal) {
add_user_signal(MethodInfo(p_signal));
}
//void Object::_add_user_signal_as_struct(const Struct<MethodInfo> &p_signal) {
// add_user_signal(MethodInfo(p_signal));
//}

TypedArray<Dictionary> Object::_get_signal_list() const {
List<MethodInfo> signal_list;
Expand All @@ -1182,11 +1182,11 @@ TypedArray<Dictionary> Object::_get_signal_list() const {
return ret;
}

TypedArray<Struct<MethodInfo>> Object::_get_signal_list_as_structs() const {
List<MethodInfo> signal_list;
get_signal_list(&signal_list);
return TypedArray<Struct<MethodInfo>>(&signal_list);
}
//TypedArray<Struct<MethodInfo>> Object::_get_signal_list_as_structs() const {
// List<MethodInfo> signal_list;
// get_signal_list(&signal_list);
// return TypedArray<Struct<MethodInfo>>(&signal_list);
//}

TypedArray<Dictionary> Object::_get_signal_connection_list(const StringName &p_signal) const {
List<Connection> conns;
Expand All @@ -1203,11 +1203,11 @@ TypedArray<Dictionary> Object::_get_signal_connection_list(const StringName &p_s
return ret;
}

TypedArray<Struct<Object::Connection>> Object::_get_signal_connection_list_as_structs(const StringName &p_signal) const {
List<Connection> conns;
get_all_signal_connections(&conns);
return TypedArray<Struct<Connection>>(&conns);
}
//TypedArray<Struct<Object::Connection>> Object::_get_signal_connection_list_as_structs(const StringName &p_signal) const {
// List<Connection> conns;
// get_all_signal_connections(&conns);
// return TypedArray<Struct<Connection>>(&conns);
//}

TypedArray<Dictionary> Object::_get_incoming_connections() const {
TypedArray<Dictionary> ret;
Expand All @@ -1218,9 +1218,9 @@ TypedArray<Dictionary> Object::_get_incoming_connections() const {
return ret;
}

TypedArray<Struct<Object::Connection>> Object::_get_incoming_connections_as_structs() const {
return TypedArray<Struct<Connection>>(&connections);
}
//TypedArray<Struct<Object::Connection>> Object::_get_incoming_connections_as_structs() const {
// return TypedArray<Struct<Connection>>(&connections);
//}

bool Object::has_signal(const StringName &p_name) const {
if (!script.is_null()) {
Expand Down Expand Up @@ -1578,9 +1578,9 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_indexed", "property_path", "value"), &Object::_set_indexed_bind);
ClassDB::bind_method(D_METHOD("get_indexed", "property_path"), &Object::_get_indexed_bind);
ClassDB::bind_method(D_METHOD("get_property_list"), &Object::_get_property_list_bind);
ClassDB::bind_method(D_METHOD("get_property_list_as_structs"), &Object::_get_property_list_as_structs_bind);
//ClassDB::bind_method(D_METHOD("get_property_list_as_structs"), &Object::_get_property_list_as_structs_bind);
ClassDB::bind_method(D_METHOD("get_method_list"), &Object::_get_method_list_bind);
ClassDB::bind_method(D_METHOD("get_method_list_as_structs"), &Object::_get_method_list_as_structs_bind);
//ClassDB::bind_method(D_METHOD("get_method_list_as_structs"), &Object::_get_method_list_as_structs_bind);
ClassDB::bind_method(D_METHOD("property_can_revert", "property"), &Object::property_can_revert);
ClassDB::bind_method(D_METHOD("property_get_revert", "property"), &Object::property_get_revert);
ClassDB::bind_method(D_METHOD("notification", "what", "reversed"), &Object::notification, DEFVAL(false));
Expand All @@ -1597,7 +1597,7 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_meta_list"), &Object::_get_meta_list_bind);

ClassDB::bind_method(D_METHOD("add_user_signal", "signal", "arguments"), &Object::_add_user_signal, DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("add_user_signal_as_struct", "signal"), &Object::_add_user_signal_as_struct);
//ClassDB::bind_method(D_METHOD("add_user_signal_as_struct", "signal"), &Object::_add_user_signal_as_struct);
ClassDB::bind_method(D_METHOD("has_user_signal", "signal"), &Object::_has_user_signal);
ClassDB::bind_method(D_METHOD("remove_user_signal", "signal"), &Object::_remove_user_signal);

Expand Down Expand Up @@ -1635,11 +1635,11 @@ void Object::_bind_methods() {

ClassDB::bind_method(D_METHOD("has_signal", "signal"), &Object::has_signal);
ClassDB::bind_method(D_METHOD("get_signal_list"), &Object::_get_signal_list);
ClassDB::bind_method(D_METHOD("get_signal_list_as_structs"), &Object::_get_signal_list_as_structs);
//ClassDB::bind_method(D_METHOD("get_signal_list_as_structs"), &Object::_get_signal_list_as_structs);
ClassDB::bind_method(D_METHOD("get_signal_connection_list", "signal"), &Object::_get_signal_connection_list);
ClassDB::bind_method(D_METHOD("get_signal_connection_list_as_structs", "signal"), &Object::_get_signal_connection_list_as_structs);
//ClassDB::bind_method(D_METHOD("get_signal_connection_list_as_structs", "signal"), &Object::_get_signal_connection_list_as_structs);
ClassDB::bind_method(D_METHOD("get_incoming_connections"), &Object::_get_incoming_connections);
ClassDB::bind_method(D_METHOD("get_incoming_connections_as_structs"), &Object::_get_incoming_connections_as_structs);
//ClassDB::bind_method(D_METHOD("get_incoming_connections_as_structs"), &Object::_get_incoming_connections_as_structs);

ClassDB::bind_method(D_METHOD("connect", "signal", "callable", "flags"), &Object::connect, DEFVAL(0));
ClassDB::bind_method(D_METHOD("disconnect", "signal", "callable"), &Object::disconnect);
Expand Down
12 changes: 6 additions & 6 deletions core/object/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,16 +407,16 @@ class Object {
mutable const StringName *_class_name_ptr = nullptr;

void _add_user_signal(const String &p_name, const Array &p_args = Array());
void _add_user_signal_as_struct(const Struct<MethodInfo> &p_signal);
//void _add_user_signal_as_struct(const Struct<MethodInfo> &p_signal);
bool _has_user_signal(const StringName &p_name) const;
void _remove_user_signal(const StringName &p_name);
Error _emit_signal(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
TypedArray<Dictionary> _get_signal_list() const;
TypedArray<Dictionary> _get_signal_connection_list(const StringName &p_signal) const;
TypedArray<Dictionary> _get_incoming_connections() const;
TypedArray<Struct<MethodInfo>> _get_signal_list_as_structs() const;
TypedArray<Struct<Connection>> _get_signal_connection_list_as_structs(const StringName &p_signal) const;
TypedArray<Struct<Connection>> _get_incoming_connections_as_structs() const;
//TypedArray<Struct<MethodInfo>> _get_signal_list_as_structs() const;
//TypedArray<Struct<Connection>> _get_signal_connection_list_as_structs(const StringName &p_signal) const;
//TypedArray<Struct<Connection>> _get_incoming_connections_as_structs() const;
void _set_bind(const StringName &p_set, const Variant &p_value);
Variant _get_bind(const StringName &p_name) const;
void _set_indexed_bind(const NodePath &p_name, const Variant &p_value);
Expand Down Expand Up @@ -521,9 +521,9 @@ class Object {

TypedArray<StringName> _get_meta_list_bind() const;
TypedArray<Dictionary> _get_property_list_bind() const;
TypedArray<Struct<PropertyInfo>> _get_property_list_as_structs_bind() const;
//TypedArray<Struct<PropertyInfo>> _get_property_list_as_structs_bind() const;
TypedArray<Dictionary> _get_method_list_bind() const;
TypedArray<Struct<MethodInfo>> _get_method_list_as_structs_bind() const;
//TypedArray<Struct<MethodInfo>> _get_method_list_as_structs_bind() const;

void _clear_internal_resource_paths(const Variant &p_var);

Expand Down
Loading

0 comments on commit 7e9d0b6

Please sign in to comment.