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 /scene.h | |
| download | godot3-tscn-compactor-4e206fae5be6093b36c7779ba2a4a3679f0e754b.tar.gz godot3-tscn-compactor-4e206fae5be6093b36c7779ba2a4a3679f0e754b.tar.bz2 godot3-tscn-compactor-4e206fae5be6093b36c7779ba2a4a3679f0e754b.zip | |
something
Diffstat (limited to 'scene.h')
| -rw-r--r-- | scene.h | 34 | 
1 files changed, 34 insertions, 0 deletions
| diff --git a/scene.h b/scene.h new file mode 100644 index 0000000..0ee9450 --- /dev/null +++ b/scene.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef SCENE_H | ||
| 2 | #define SCENE_H | ||
| 3 | |||
| 4 | #include <filesystem> | ||
| 5 | #include <map> | ||
| 6 | #include <tuple> | ||
| 7 | #include <vector> | ||
| 8 | |||
| 9 | #include "heading.h" | ||
| 10 | #include "script.h" | ||
| 11 | |||
| 12 | class Scene { | ||
| 13 | public: | ||
| 14 | explicit Scene(const std::filesystem::path& path); | ||
| 15 | |||
| 16 | const std::map<int, Heading>& ext_resources() const { return ext_resources_; } | ||
| 17 | |||
| 18 | int AddSubResource(const Script& script); | ||
| 19 | |||
| 20 | void RemoveExtResource(int id); | ||
| 21 | |||
| 22 | void ReplaceScriptReferences(int ext_id, int sub_id); | ||
| 23 | |||
| 24 | std::string ToString() const; | ||
| 25 | |||
| 26 | private: | ||
| 27 | Heading file_descriptor_; | ||
| 28 | std::map<int, Heading> ext_resources_; | ||
| 29 | std::map<int, std::tuple<Heading, std::string>> sub_resources_; | ||
| 30 | std::vector<std::tuple<Heading, std::string>> other_; | ||
| 31 | int next_sub_id_ = 0; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #endif /* SCENE_H */ | ||
