diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-23 01:47:18 +0000 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-23 01:47:18 +0000 |
commit | 4e206fae5be6093b36c7779ba2a4a3679f0e754b (patch) | |
tree | 3a1377ae7781debeb04c17464f9eab13f7e47131 /script.h | |
download | godot3-tscn-compactor-4e206fae5be6093b36c7779ba2a4a3679f0e754b.tar.gz godot3-tscn-compactor-4e206fae5be6093b36c7779ba2a4a3679f0e754b.tar.bz2 godot3-tscn-compactor-4e206fae5be6093b36c7779ba2a4a3679f0e754b.zip |
something
Diffstat (limited to 'script.h')
-rw-r--r-- | script.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/script.h b/script.h new file mode 100644 index 0000000..fabf531 --- /dev/null +++ b/script.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef SCRIPT_H | ||
2 | #define SCRIPT_H | ||
3 | |||
4 | #include <filesystem> | ||
5 | #include <map> | ||
6 | #include <string> | ||
7 | #include <string_view> | ||
8 | #include <tuple> | ||
9 | #include <vector> | ||
10 | |||
11 | class Script { | ||
12 | public: | ||
13 | Script() = default; | ||
14 | |||
15 | Script(const std::filesystem::path& path, std::string_view file_prefix); | ||
16 | |||
17 | const std::vector<std::string>& loaded_scripts() const { | ||
18 | return loaded_scripts_; | ||
19 | } | ||
20 | |||
21 | const std::vector<std::tuple<std::string, int>>& exports() const { | ||
22 | return exports_; | ||
23 | } | ||
24 | |||
25 | void ReplaceScriptReferences(const std::map<std::string, int>& script_ids); | ||
26 | |||
27 | std::string ToString() const; | ||
28 | |||
29 | private: | ||
30 | std::string text_; | ||
31 | std::string file_prefix_; | ||
32 | std::vector<std::string> loaded_scripts_; | ||
33 | std::vector<std::tuple<std::string, int>> exports_; | ||
34 | }; | ||
35 | |||
36 | #endif /* SCRIPT_H */ | ||