summaryrefslogtreecommitdiff
path: root/core/script_language.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/script_language.h')
-rw-r--r--core/script_language.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/core/script_language.h b/core/script_language.h
index 1be1aabdab..d8b4c61b6c 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -87,7 +87,7 @@ public:
virtual bool has_source_code() const=0;
virtual String get_source_code() const=0;
virtual void set_source_code(const String& p_code)=0;
- virtual Error reload()=0;
+ virtual Error reload(bool p_keep_state=false)=0;
virtual bool is_tool() const=0;
@@ -127,6 +127,8 @@ public:
virtual Ref<Script> get_script() const=0;
+ virtual bool is_placeholder() const { return false; }
+
virtual ScriptLanguage *get_language()=0;
virtual ~ScriptInstance();
};
@@ -189,12 +191,28 @@ public:
virtual Vector<StackInfo> debug_get_current_stack_info() { return Vector<StackInfo>(); }
+ virtual void reload_all_scripts()=0;
/* LOADER FUNCTIONS */
virtual void get_recognized_extensions(List<String> *p_extensions) const=0;
virtual void get_public_functions(List<MethodInfo> *p_functions) const=0;
virtual void get_public_constants(List<Pair<String,Variant> > *p_constants) const=0;
+ struct ProfilingInfo {
+ StringName signature;
+ uint64_t call_count;
+ uint64_t total_time;
+ uint64_t self_time;
+
+ };
+
+ virtual void profiling_start()=0;
+ virtual void profiling_stop()=0;
+
+ virtual int profiling_get_accumulated_data(ProfilingInfo *p_info_arr,int p_info_max)=0;
+ virtual int profiling_get_frame_data(ProfilingInfo *p_info_arr,int p_info_max)=0;
+
+
virtual void frame();
virtual ~ScriptLanguage() {};
@@ -233,6 +251,8 @@ public:
void update(const List<PropertyInfo> &p_properties,const Map<StringName,Variant>& p_values); //likely changed in editor
+ virtual bool is_placeholder() const { return true; }
+
PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script,Object *p_owner);
~PlaceHolderScriptInstance();
@@ -309,6 +329,13 @@ public:
virtual void set_request_scene_tree_message_func(RequestSceneTreeMessageFunc p_func, void *p_udata) {}
virtual void set_live_edit_funcs(LiveEditFuncs *p_funcs) {}
+ virtual bool is_profiling() const=0;
+ virtual void add_profiling_frame_data(const StringName& p_name,const Array& p_data)=0;
+ virtual void profiling_start()=0;
+ virtual void profiling_end()=0;
+ virtual void profiling_set_frame_times(float p_frame_time,float p_idle_time,float p_fixed_time,float p_fixed_frame_time)=0;
+
+
ScriptDebugger();
virtual ~ScriptDebugger() {singleton=NULL;}