|
2 | 2 | #define KOTLIN_JVM_LANGUAGE_H
|
3 | 3 |
|
4 | 4 | #include <core/object/script_language.h>
|
5 |
| - |
6 |
| -class JvmLanguage : public ScriptLanguage { |
7 |
| -public: |
8 |
| - void init() override; |
9 |
| - void frame() override; |
10 |
| - void finish() override; |
11 |
| - |
12 |
| - bool validate( |
13 |
| - const String& p_script, |
14 |
| - const String& p_path, |
15 |
| - List<String>* r_functions, |
16 |
| - List<ScriptLanguage::ScriptError>* r_errors, |
17 |
| - List<ScriptLanguage::Warning>* r_warnings, |
18 |
| - HashSet<int>* r_safe_lines |
19 |
| - ) const override; |
20 |
| - String validate_path(const String& p_path) const override; |
21 |
| - |
22 |
| - // Dummy Implementations |
23 |
| - bool supports_documentation() const override; |
24 |
| - int find_function(const String& p_function, const String& p_code) const override; |
25 |
| - String make_function(const String& p_class, const String& p_name, const PackedStringArray& p_args) const override; |
26 |
| - Error open_in_external_editor(const Ref<Script>& p_script, int p_line, int p_col) override; |
27 |
| - bool overrides_external_editor() override; |
28 |
| - |
29 |
| - Error complete_code(const String& p_code, const String& p_path, Object* p_owner, List<CodeCompletionOption>* r_options, bool& r_force, String& r_call_hint) override; |
30 |
| - Error lookup_code(const String& p_code, const String& p_symbol, const String& p_path, Object* p_owner, LookupResult& r_result) override; |
31 |
| - void auto_indent_code(String& p_code, int p_from_line, int p_to_line) const override; |
32 |
| - void add_global_constant(const StringName& p_variable, const Variant& p_value) override; |
33 |
| - void add_named_global_constant(const StringName& p_name, const Variant& p_value) override; |
34 |
| - void remove_named_global_constant(const StringName& p_name) override; |
35 |
| - |
36 |
| - void get_public_functions(List<MethodInfo>* p_functions) const override; |
37 |
| - void get_public_constants(List<Pair<String, Variant>>* p_constants) const override; |
38 |
| - void get_public_annotations(List<MethodInfo>* p_annotations) const override; |
39 |
| - |
40 |
| - String debug_get_error() const override; |
41 |
| - int debug_get_stack_level_count() const override; |
42 |
| - int debug_get_stack_level_line(int p_level) const override; |
43 |
| - String debug_get_stack_level_function(int p_level) const override; |
44 |
| - String debug_get_stack_level_source(int p_level) const override; |
45 |
| - void debug_get_stack_level_locals(int p_level, List<String>* p_locals, List<Variant>* p_values, int p_max_subitems, int p_max_depth) override; |
46 |
| - void debug_get_stack_level_members(int p_level, List<String>* p_members, List<Variant>* p_values, int p_max_subitems, int p_max_depth) override; |
47 |
| - void debug_get_globals(List<String>* p_globals, List<Variant>* p_values, int p_max_subitems, int p_max_depth) override; |
48 |
| - String debug_parse_stack_level_expression(int p_level, const String& p_expression, int p_max_subitems, int p_max_depth) override; |
49 |
| - |
50 |
| - void profiling_start() override; |
51 |
| - void profiling_stop() override; |
52 |
| - void profiling_set_save_native_calls(bool p_enable) override; |
53 |
| - int profiling_get_accumulated_data(ProfilingInfo* p_info_arr, int p_info_max) override; |
54 |
| - int profiling_get_frame_data(ProfilingInfo* p_info_arr, int p_info_max) override; |
55 |
| - |
56 |
| - void reload_scripts(const Array &p_scripts, bool p_soft_reload) override; |
57 |
| - void reload_all_scripts() override; |
58 |
| - void reload_tool_script(const Ref<Script>& p_script, bool p_soft_reload) override; |
59 |
| -}; |
60 |
| - |
| 5 | +namespace godot { |
| 6 | + class JvmLanguage : public ScriptLanguage { |
| 7 | + public: |
| 8 | + void init() override; |
| 9 | + void frame() override; |
| 10 | + void finish() override; |
| 11 | + |
| 12 | + bool validate( |
| 13 | + const String& p_script, |
| 14 | + const String& p_path, |
| 15 | + List<String>* r_functions, |
| 16 | + List<ScriptLanguage::ScriptError>* r_errors, |
| 17 | + List<ScriptLanguage::Warning>* r_warnings, |
| 18 | + HashSet<int>* r_safe_lines |
| 19 | + ) const override; |
| 20 | + String validate_path(const String& p_path) const override; |
| 21 | + |
| 22 | + // Dummy Implementations |
| 23 | + bool supports_documentation() const override; |
| 24 | + int find_function(const String& p_function, const String& p_code) const override; |
| 25 | + String make_function(const String& p_class, const String& p_name, const PackedStringArray& p_args) const override; |
| 26 | + Error open_in_external_editor(const Ref<Script>& p_script, int p_line, int p_col) override; |
| 27 | + bool overrides_external_editor() override; |
| 28 | + |
| 29 | + Error complete_code(const String& p_code, const String& p_path, Object* p_owner, List<CodeCompletionOption>* r_options, bool& r_force, String& r_call_hint) override; |
| 30 | + Error lookup_code(const String& p_code, const String& p_symbol, const String& p_path, Object* p_owner, LookupResult& r_result) override; |
| 31 | + void auto_indent_code(String& p_code, int p_from_line, int p_to_line) const override; |
| 32 | + void add_global_constant(const StringName& p_variable, const Variant& p_value) override; |
| 33 | + void add_named_global_constant(const StringName& p_name, const Variant& p_value) override; |
| 34 | + void remove_named_global_constant(const StringName& p_name) override; |
| 35 | + |
| 36 | + void get_public_functions(List<MethodInfo>* p_functions) const override; |
| 37 | + void get_public_constants(List<Pair<String, Variant>>* p_constants) const override; |
| 38 | + void get_public_annotations(List<MethodInfo>* p_annotations) const override; |
| 39 | + |
| 40 | + String debug_get_error() const override; |
| 41 | + int debug_get_stack_level_count() const override; |
| 42 | + int debug_get_stack_level_line(int p_level) const override; |
| 43 | + String debug_get_stack_level_function(int p_level) const override; |
| 44 | + String debug_get_stack_level_source(int p_level) const override; |
| 45 | + void debug_get_stack_level_locals(int p_level, List<String>* p_locals, List<Variant>* p_values, int p_max_subitems, int p_max_depth) override; |
| 46 | + void debug_get_stack_level_members(int p_level, List<String>* p_members, List<Variant>* p_values, int p_max_subitems, int p_max_depth) override; |
| 47 | + void debug_get_globals(List<String>* p_globals, List<Variant>* p_values, int p_max_subitems, int p_max_depth) override; |
| 48 | + String debug_parse_stack_level_expression(int p_level, const String& p_expression, int p_max_subitems, int p_max_depth) override; |
| 49 | + |
| 50 | + void profiling_start() override; |
| 51 | + void profiling_stop() override; |
| 52 | + void profiling_set_save_native_calls(bool p_enable) override; |
| 53 | + int profiling_get_accumulated_data(ProfilingInfo* p_info_arr, int p_info_max) override; |
| 54 | + int profiling_get_frame_data(ProfilingInfo* p_info_arr, int p_info_max) override; |
| 55 | + |
| 56 | + void reload_scripts(const Array& p_scripts, bool p_soft_reload) override; |
| 57 | + void reload_all_scripts() override; |
| 58 | + void reload_tool_script(const Ref<Script>& p_script, bool p_soft_reload) override; |
| 59 | + }; |
| 60 | +} |
61 | 61 | #endif// KOTLIN_JVM_LANGUAGE_H
|
0 commit comments