MayaFlux
1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
EvalReport.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
Lila
{
4
5
/**
6
* @brief Where an evaluated block came from.
7
*
8
* Local: a call on the Lila object itself, which includes everything the host
9
* evaluates and every block staged before the session started.
10
* Client: a message a connected client sent.
11
*/
12
enum class
EvalOrigin
: uint8_t {
13
Local,
14
Client
15
};
16
17
/**
18
* @brief What one evaluation did.
19
*
20
* The views are valid only for the duration of the observer call. Copy them to
21
* keep them. When ok is true, reason is empty.
22
*/
23
struct
EvalReport
{
24
EvalOrigin
origin
;
25
bool
ok
;
26
std::string_view
code
;
27
std::string_view
reason
;
28
};
29
30
/**
31
* @brief Receives each evaluation's report.
32
*
33
* A plain function and a pointer it is handed back, so nothing owned by one
34
* side of the library boundary is released by the other. It runs on the thread
35
* that evaluated, which for a client is the listener's, and must not block. An
36
* exception that escapes it is logged and dropped.
37
*/
38
using
EvalObserver
= void (*)(
void
* user,
const
EvalReport& report);
39
40
}
// namespace Lila
Lila::EvalOrigin
EvalOrigin
Where an evaluated block came from.
Definition
EvalReport.hpp:12
Lila::EvalObserver
void(*)(void *user, const EvalReport &report) EvalObserver
Receives each evaluation's report.
Definition
EvalReport.hpp:38
Lila
Definition
Address.hpp:3
Lila::EvalReport::origin
EvalOrigin origin
Definition
EvalReport.hpp:24
Lila::EvalReport::code
std::string_view code
Definition
EvalReport.hpp:26
Lila::EvalReport::ok
bool ok
Definition
EvalReport.hpp:25
Lila::EvalReport::reason
std::string_view reason
Definition
EvalReport.hpp:27
Lila::EvalReport
What one evaluation did.
Definition
EvalReport.hpp:23
src
Lila
EvalReport.hpp
Generated by
1.15.0