EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
AllNotificationsFwd.hpp
Go to the documentation of this file.
1
9
10#ifndef ECHOMAP_ALLNOTIFICATIONSFWD_HPP
11#define ECHOMAP_ALLNOTIFICATIONSFWD_HPP
12
14
15namespace echomap
16{
17
23
24#if !defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
25
26// Native-only notifications.
27
29
30#endif // __EMSCRIPTEN__
31
32#if defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
33
34// Web-only notifications.
35
39
40#endif // __EMSCRIPTEN__
41
46
76#if !defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
77 // Native-only notifications.
78 ,
80#endif // __EMSCRIPTEN__
81#if defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
82 // Web-only notifications.
83 ,
87#endif // __EMSCRIPTEN__
88 >;
89
96{
102 template <typename NotificationT>
104 NotificationT,
106 static constexpr std::string_view get()
107 {
108 // ReSharper disable once CppStaticAssertFailure
109 static_assert(false, "Missing notification name.");
110 return {};
111 }
112
117};
118
120{
121 return "Add Channel Mapping Notification";
122}
123
125{
126 return "Modify Sensor Colour Notification";
127}
128
129template <> constexpr std::string_view NotificationNames::get<ModifySensorPositionNotification>()
130{
131 return "Modify Sensor Position Notification";
132}
133
134template <> constexpr std::string_view NotificationNames::get<ProjectSelectionCompleteNotification>()
135{
136 return "Project Selected Notification";
137}
138
139template <> constexpr std::string_view NotificationNames::get<ClearErrorNotification>()
140{
141 return "Clear Error State Notification";
142}
143
144#if !defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
145
146// Names of native-only notifications.
147
148template <> constexpr std::string_view NotificationNames::get<RaiseFileChooserNotification>()
149{
150 return "Raise File Chooser Notification";
151}
152
153#endif // __EMSCRIPTEN__
154
155#if defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
156
157// Names of web-only notifications.
158
159template <> constexpr std::string_view NotificationNames::get<CancelProjectLoadNotification>()
160{
161 return "Cancel Project Load Notification";
162}
163
164template <> constexpr std::string_view NotificationNames::get<CompleteProjectLoadNotification>()
165{
166 return "Complete Project Load Notification";
167}
168
169template <> constexpr std::string_view NotificationNames::get<RegisterVFSMappingNotification>()
170{
171 return "Register VFS Mapping Notification";
172}
173
174#endif // __EMSCRIPTEN__
175
176constexpr std::array<std::string_view, std::variant_size_v<Notification>> NotificationNames::indexed_names =
178
179} // namespace echomap
180
181#endif // ECHOMAP_ALLNOTIFICATIONSFWD_HPP
VariantHelpers specification.
constexpr auto variant_name_array
Array of human-readable names for every alternative in a variant.
Constrains a type to be one of the alternatives of a std::variant.
std::variant< AddChannelMappingNotification, ModifySensorColourNotification, ModifySensorPositionNotification, ProjectSelectionCompleteNotification, ClearErrorNotification, RaiseFileChooserNotification, RegisterVFSMappingNotification, CompleteProjectLoadNotification, CancelProjectLoadNotification > Notification
A Notification is a trivial message sent exclusively to the EchoMap controller.
The main EchoMap outermost namespace for all non-exported symbols.
A notification indicating that a new channel mapping should be established.
A notification indicating that a pending Project load should be cancelled.
A notification indicating that any error state visible to the user should be reset.
A notification indicating that a pending Project is ready to be loaded.
A notification indicating that the colour of a Sensor should be changed.
A notification indicating that the position of a Sensor should be changed.
Helper to retrieve names of Notification variant alternatives.
static constexpr std::string_view get()
Retrieve a human-readable name for the templated Notification.
static const std::array< std::string_view, std::variant_size_v< Notification > > indexed_names
Aggregated names by the index of the alternative.
A notification indicating that a new Project file has been selected by the user, or the load operatio...
A notification indicating that the NativeFileChooser should be raised to prompt for a new Project.
A notification to indicate a new VFS mapping from an external source.