diff options
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 */ | ||