EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
echomap::ModifySensorColourNotification Struct Reference

A notification indicating that the colour of a Sensor should be changed. More...

#include <ModifySensorColourNotification.hpp>

Public Member Functions

 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.
void verify_project (const Project *context) const
 Verify that the given Project matches the intended target.

Public Attributes

id_type project_id
 The ID of the Project which owns the updated Sensor.
id_type sensor_id
 The ID of the moved Sensor.
Colour colour
 The new Colour of the referenced Sensor.

Detailed Description

A notification indicating that the colour of a Sensor should be changed.

Produced by the SensorGeometryPanel when the user requests to move the colour of a Sensor from the front-end.

Definition at line 28 of file ModifySensorColourNotification.hpp.

Constructor & Destructor Documentation

◆ ModifySensorColourNotification()

echomap::ModifySensorColourNotification::ModifySensorColourNotification ( id_type project_id,
id_type sensor_id,
const Colour & colour )
explicit

Create a new ModifySensorPositionNotification to indicate that a Sensor has changed in colour.

Parameters
project_idThe ID of the Project which owns the updated Sensor.
sensor_idThe ID of the moved Sensor.
colourThe new Colour of the referenced Sensor.

Definition at line 18 of file ModifySensorColourNotification.cpp.

22 :
26{
27}
Colour colour
The new Colour of the referenced Sensor.
id_type project_id
The ID of the Project which owns the updated Sensor.

Member Function Documentation

◆ verify_project()

void echomap::ModifySensorColourNotification::verify_project ( const Project * context) const

Verify that the given Project matches the intended target.

Parameters
contextThe context to which the notification will apply.
Exceptions
IgnoredWarningThe notification does not apply to the given context and should be ignored.

Definition at line 29 of file ModifySensorColourNotification.cpp.

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(
39 "Dropping ModifySensorColourNotification due to invalid project: requested {}, but have {}.",
41 context->get_id()
42 )
43 );
44}
T format(T... args)

Member Data Documentation

◆ colour

Colour echomap::ModifySensorColourNotification::colour

The new Colour of the referenced Sensor.

Definition at line 53 of file ModifySensorColourNotification.hpp.

◆ project_id

id_type echomap::ModifySensorColourNotification::project_id

The ID of the Project which owns the updated Sensor.

Definition at line 51 of file ModifySensorColourNotification.hpp.

◆ sensor_id

id_type echomap::ModifySensorColourNotification::sensor_id

The ID of the moved Sensor.

Definition at line 52 of file ModifySensorColourNotification.hpp.


The documentation for this struct was generated from the following files: