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
App.cpp
Go to the documentation of this file.
1
7
8
#if defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
9
#include "
platform/EchoMapWeb.hpp
"
10
#else
11
#include "
platform/EchoMapNative.hpp
"
12
#endif
// __EMSCRIPTEN__
13
14
#include "
StaticInstanceController.hpp
"
15
#include "
errors/ConfigurationError.hpp
"
16
#include "
utility/Logger.hpp
"
17
23
int
main
()
24
{
25
try
{
26
#if defined(__EMSCRIPTEN__) || defined(__DOXYGEN__)
27
28
// NOLINTBEGIN(*-owning-memory, *-cplusplus.NewDeleteLeaks) - Emscripten will manage our heap memory.
29
30
auto
*
const
application =
new
echomap::EchoMapWeb
();
31
[[maybe_unused]]
auto
*
const
controller =
new
echomap::StaticInstanceController
(*application);
32
application->run_event_loop();
33
34
// NOLINTEND(*-owning-memory, *-cplusplus.NewDeleteLeaks)
35
36
#else
37
38
// Native platforms can use the RAII facilities of EchoMap and StaticInstanceController.
39
40
echomap::EchoMapNative
application;
41
const
echomap::StaticInstanceController
instance_controller(application);
42
application.
run_event_loop
();
43
44
#endif
45
}
catch
(
const
echomap::ConfigurationError
& error) {
46
echomap::Logger::log
(echomap::Logger::Level::Error, error.
what
(), error.
where
());
47
return
1;
48
}
49
50
return
0;
51
}
main
int main()
EchoMap common entry point.
Definition
App.cpp:23
ConfigurationError.hpp
EchoMap ConfigurationError exception specification.
EchoMapNative.hpp
EchoMapNative specification.
EchoMapWeb.hpp
EchoMapWeb specification.
Logger.hpp
EchoMap portable logger specification.
StaticInstanceController.hpp
StaticInstanceController specification.
echomap::ConfigurationError
A ConfigurationError indicates an error encountered during the initial configuration of the EchoMap g...
Definition
ConfigurationError.hpp:20
echomap::EchoMapNative
EchoMap application implementation for native (non-WebAssembly) platforms.
Definition
EchoMapNative.hpp:24
echomap::EchoMapNative::run_event_loop
void run_event_loop() override
Runs the platform-dependent event loop to manage and propagate interaction with the EchoMap applicati...
Definition
EchoMapNative.cpp:21
echomap::EchoMapWeb
EchoMap application implementation for WebAssembly/Emscripten platforms.
Definition
EchoMapWeb.hpp:26
echomap::LocatableError::where
const std::source_location & where() const noexcept
Retrieves the location of the throwing statement.
Definition
LocatableError.cpp:21
echomap::Logger::log
static void log(Level level, std::string_view message, std::source_location location=std::source_location::current())
Log an unformatted message to the backend.
Definition
Logger.cpp:22
echomap::StaticInstanceController
Provides a binding interface to connect static controllers to an instance of EchoMap.
Definition
StaticInstanceController.hpp:22
std::runtime_error::what
T what(T... args)
src
App.cpp
Generated by
1.17.0