summaryrefslogtreecommitdiffstats
path: root/core/object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/object.cpp')
-rw-r--r--core/object.cpp40
1 files changed, 39 insertions, 1 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 7bdec06c1b..cbe24a49f3 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -463,6 +463,11 @@ void Object::get_property_list(List<PropertyInfo> *p_list,bool p_reversed) const
}
}
+
+void Object::_validate_property(PropertyInfo& property) const {
+
+}
+
void Object::get_method_list(List<MethodInfo> *p_list) const {
ObjectTypeDB::get_method_list(get_type_name(),p_list);
@@ -1244,6 +1249,7 @@ void Object::emit_signal(const StringName& p_name,VARIANT_ARG_DECLARE) {
argc++;
}
+
emit_signal(p_name,argptr,argc);
}
@@ -1377,6 +1383,31 @@ void Object::get_signal_connection_list(const StringName& p_signal,List<Connecti
}
+bool Object::has_persistent_signal_connections() const {
+
+ const StringName *S=NULL;
+
+ while((S=signal_map.next(S))) {
+
+ const Signal *s=&signal_map[*S];
+
+ for(int i=0;i<s->slot_map.size();i++) {
+
+ if (s->slot_map.getv(i).conn.flags&CONNECT_PERSIST)
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void Object::get_signals_connected_to_this(List<Connection> *p_connections) const {
+
+ for (const List<Connection>::Element *E=connections.front();E;E=E->next()) {
+ p_connections->push_back(E->get());
+ }
+}
+
Error Object::connect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method,const Vector<Variant>& p_binds,uint32_t p_flags) {
@@ -1390,7 +1421,7 @@ Error Object::connect(const StringName& p_signal, Object *p_to_object, const Str
signal_is_valid=true;
if (!signal_is_valid) {
- ERR_EXPLAIN("Attempt to connect nonexistent signal '"+p_signal+"' to method '"+p_to_method+"'");
+ ERR_EXPLAIN("In Object of type '"+String(get_type())+"': Attempt to connect nonexistent signal '"+p_signal+"' to method '"+p_to_object->get_type()+"."+p_to_method+"'");
ERR_FAIL_COND_V(!signal_is_valid,ERR_INVALID_PARAMETER);
}
signal_map[p_signal]=Signal();
@@ -1750,6 +1781,7 @@ bool Object::is_queued_for_deletion() const {
void Object::set_edited(bool p_edited) {
_edited=p_edited;
+ _edited_version++;
}
bool Object::is_edited() const {
@@ -1757,6 +1789,11 @@ bool Object::is_edited() const {
return _edited;
}
+
+uint32_t Object::get_edited_version() const {
+
+ return _edited_version;
+}
#endif
Object::Object() {
@@ -1772,6 +1809,7 @@ Object::Object() {
#ifdef TOOLS_ENABLED
_edited=false;
+ _edited_version=0;
#endif
#ifdef DEBUG_ENABLED