EchoMap
2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Toggle main menu visibility
Loading...
Searching...
No Matches
ModifySensorColourNotification.cpp
Go to the documentation of this file.
1
9
10
#include "
ModifySensorColourNotification.hpp
"
11
12
#include "
../errors/IgnoredWarning.hpp
"
13
#include "../objects/Project.hpp"
14
15
namespace
echomap
16
{
17
18
ModifySensorColourNotification::ModifySensorColourNotification
(
19
const
id_type
project_id
,
20
const
id_type
sensor_id
,
21
const
Colour
&
colour
22
) :
23
project_id
(
project_id
),
24
sensor_id
(
sensor_id
),
25
colour
(
colour
)
26
{
27
}
28
29
void
ModifySensorColourNotification::verify_project
(
30
const
Project
*
const
context
31
)
const
32
{
33
if
(context ==
nullptr
)
34
throw
IgnoredWarning
(
"Dropping ModifySensorColourNotification due to empty project."
);
35
36
if
(context->get_id() !=
project_id
)
37
throw
IgnoredWarning
(
38
std::format
(
39
"Dropping ModifySensorColourNotification due to invalid project: requested {}, but have {}."
,
40
project_id
,
41
context->get_id()
42
)
43
);
44
}
45
46
}
// namespace echomap
IgnoredWarning.hpp
IgnoredWarning specification.
ModifySensorColourNotification.hpp
ModifySensorColourNotification specification.
echomap::IgnoredWarning
Exception class to indicate a non-fatal warning indicating an exceptional case of dropping some notif...
Definition
IgnoredWarning.hpp:22
echomap::Project
Definition
Project.hpp:26
std::format
T format(T... args)
echomap
The main EchoMap outermost namespace for all non-exported symbols.
Definition
ActionController.hpp:20
echomap::Colour
A generic RGBA structure.
Definition
Colour.hpp:20
echomap::ModifySensorColourNotification::sensor_id
id_type sensor_id
The ID of the moved Sensor.
Definition
ModifySensorColourNotification.hpp:52
echomap::ModifySensorColourNotification::verify_project
void verify_project(const Project *context) const
Verify that the given Project matches the intended target.
Definition
ModifySensorColourNotification.cpp:29
echomap::ModifySensorColourNotification::colour
Colour colour
The new Colour of the referenced Sensor.
Definition
ModifySensorColourNotification.hpp:53
echomap::ModifySensorColourNotification::ModifySensorColourNotification
ModifySensorColourNotification(id_type project_id, id_type sensor_id, const Colour &colour)
Create a new ModifySensorPositionNotification to indicate that a Sensor has changed in colour.
Definition
ModifySensorColourNotification.cpp:18
echomap::ModifySensorColourNotification::project_id
id_type project_id
The ID of the Project which owns the updated Sensor.
Definition
ModifySensorColourNotification.hpp:51
src
notifications
ModifySensorColourNotification.cpp
Generated by
1.17.0