summary refs log tree commit diff stats
path: root/script.h
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-11-23 01:47:18 +0000
committerStar Rauchenberger <fefferburbia@gmail.com>2023-11-23 01:47:18 +0000
commit4e206fae5be6093b36c7779ba2a4a3679f0e754b (patch)
tree3a1377ae7781debeb04c17464f9eab13f7e47131 /script.h
downloadgodot3-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.h36
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
11class 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 */