blob: 6f30586f89aafd7691d47402ab66b1cc7a05a42d (
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
35
36
37
38
39
40
41
42
43
44
|
#pragma once
#include <cstdint>
#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp>
#include "openvic-simulation/types/IdentifierRegistry.hpp"
namespace OpenVic {
struct BookmarkManager;
struct Bookmark : HasIdentifier {
friend struct BookmarkManager;
private:
const std::string PROPERTY(name);
const std::string PROPERTY(description);
const Date PROPERTY(date);
const uint32_t PROPERTY(initial_camera_x);
const uint32_t PROPERTY(initial_camera_y);
Bookmark(
size_t new_index, std::string_view new_name, std::string_view new_description, Date new_date,
uint32_t new_initial_camera_x, uint32_t new_initial_camera_y
);
public:
Bookmark(Bookmark&&) = default;
};
struct BookmarkManager {
private:
IdentifierRegistry<Bookmark> IDENTIFIER_REGISTRY(bookmark);
public:
bool add_bookmark(
std::string_view name, std::string_view description, Date date, uint32_t initial_camera_x,
uint32_t initial_camera_y
);
bool load_bookmark_file(ast::NodeCPtr root);
Date get_last_bookmark_date() const;
};
}
|