EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
Project File Action

Queries the user for the location of a Project file to load. More...

Collaboration diagram for Project File Action:

Classes

struct  echomap::RaiseFileChooserNotification
 A notification indicating that the NativeFileChooser should be raised to prompt for a new Project. More...
struct  echomap::ProjectSelectionCompleteNotification
 A notification indicating that a new Project file has been selected by the user, or the load operation was cancelled. More...

Functions

static void echomap::ActionControllerBase< Derived >::select_project_file ()
 Invokes the Project File Action.
EMSCRIPTEN_KEEPALIVE int echomap_on_project_file_picked (const char *const path) noexcept
 Services the Project File Action callback for Emscripten.
static void echomap::JSActionController::select_project_file_impl ()
 Invokes the JS function for Project File Action.
static void echomap::NativeActionController::select_project_file_impl ()
 Invokes the native function for Project File Action.

Detailed Description

Queries the user for the location of a Project file to load.

Function Documentation

◆ echomap_on_project_file_picked()

EMSCRIPTEN_KEEPALIVE int echomap_on_project_file_picked ( const char *const path)
noexcept

Services the Project File Action callback for Emscripten.

Parameters
pathThe file-system path (in the Wasm VFS) selected in the prompt.
Returns
Zero status to indicate success; non-zero to indicate failure.

Definition at line 92 of file JSActionController.cpp.

95{
96 using namespace echomap;
97
98 if (path == nullptr)
99 return 2;
100
101 try {
103 return 0;
104 } catch (const ConfigurationError& error) {
105 LOG_F_ERROR("Could not load path {} due to error: {}", path, error.what());
106 return 3;
107 } catch (const std::exception& error) {
108 LOG_F_ERROR("Could not load path {} due to unexpected error: {}", path, error.what());
109 return 4;
110 } catch (...) {
111 LOG_F_ERROR("Could not load path {} due to unknown error.", path);
112 return 5;
113 }
114}
#define LOG_F_ERROR(msg,...)
Logs a formatted error-level message using echomap::Logger::log_f.
Definition Logger.hpp:125
A ConfigurationError indicates an error encountered during the initial configuration of the EchoMap g...
The main EchoMap outermost namespace for all non-exported symbols.
T what(T... args)

◆ select_project_file()

template<typename Derived>
void echomap::ActionControllerBase< Derived >::select_project_file ( )
inlinestatic

Invokes the Project File Action.

Definition at line 93 of file ActionControllerBase.hpp.

94 {
96 }
Provides a platform-independent static mechanism for performing "system actions", such as raising a f...

◆ select_project_file_impl() [1/2]

void echomap::JSActionController::select_project_file_impl ( )
staticprivate

Invokes the JS function for Project File Action.

Definition at line 69 of file JSActionController.cpp.

70{
71 js::select_project_file();
72}

◆ select_project_file_impl() [2/2]

void echomap::NativeActionController::select_project_file_impl ( )
staticprivate