summary refs log tree commit diff stats
path: root/scene.h
blob: db38f4c8d6f0643d145fd7df1357f4482163b114 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef SCENE_H
#define SCENE_H

#include <filesystem>
#include <map>
#include <tuple>
#include <vector>

#include "heading.h"
#include "script.h"

class Scene {
 public:
  explicit Scene(const std::filesystem::path& path);

  const std::map<int, Heading>& ext_resources() const { return ext_resources_; }

  int AddSubResource(const Script& script);

  void RemoveExtResource(int id);

  void ReplaceScriptReferences(int ext_id, int sub_id);

  std::string ToString() const;

 private:
  Heading file_descriptor_;
  std::map<int, Heading> ext_resources_;
  std::map<int, std::tuple<Heading, std::string, std::string>> sub_resources_;
  std::vector<std::tuple<Heading, std::string>> other_;
  int next_sub_id_ = 0;
};

#endif /* SCENE_H */