-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogram.hpp
102 lines (57 loc) · 2.41 KB
/
program.hpp
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//
// Created by Johannes on 04.07.2020.
//
#ifndef HAR_PROGRAM_HPP
#define HAR_PROGRAM_HPP
#include <har/part.hpp>
#include <har/participant.hpp>
namespace har {
///
class program : public participant {
public:
/// \brief Default destructor
program();
using participant::request;
using participant::start;
using participant::step;
using participant::stop;
using participant::select;
using participant::include_part;
using participant::load_model;
using participant::store_model;
using participant::redraw_all;
using participant::attached;
using participant::detach;
using participant::exit;
[[nodiscard]]
std::string name() const override;
[[nodiscard]]
image_t get_image_base(const cell_h & hnd) override;
har::image_t process_image(har::cell_h hnd, har::image_t & img) override;
istream & input() override;
ostream & output() override;
void on_cycle(participant::context & ctx) override;
void on_attach(int argc, char * const argv[], char * const envp[]) override;
void on_part_included(const part & pt, bool_t commit) override;
void on_part_removed(part_h id) override;
void on_resize_grid(const gcoords_t & to) override;
void on_model_loaded() override;
void on_info_updated(const model_info & info) override;
void on_run(bool_t responsible) override;
void on_step() override;
void on_stop() override;
void on_message(const string_t & header, const string_t & content) override;
void on_exception(const exception::exception & e) override;
void on_selection_update(const cell_h & hnd, entry_h id, const value & val, bool_t commit) override;
void on_redraw(const cell_h & hnd, image_t && img, bool_t commit) override;
void on_connection_added(const gcoords_t & from, const gcoords_t & to, direction_t use) override;
void on_connection_removed(const gcoords_t & from, direction_t use) override;
void on_cargo_spawned(cargo_h num) override;
void on_cargo_moved(cargo_h num, ccoords_t to) override;
void on_cargo_destroyed(cargo_h num) override;
void on_commit() override;
void on_detach() override;
~program() noexcept override;
};
}
#endif //HAR_PROGRAM_HPP