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

A notification to indicate a new VFS mapping from an external source. More...

#include <RegisterVFSMappingNotification.hpp>

Public Member Functions

 RegisterVFSMappingNotification (id_type project_id, std::filesystem::path external, std::filesystem::path internal)
 Creates a new RegisterVFSMappingNotification to express a mapping between the external and internal paths.
void verify_project (const PartialProject *context) const
 Verify that the given Project matches the intended target.

Public Attributes

id_type project_id
 The ID of the Project to which the mapping relates.
std::filesystem::path external
 The path on the external file system.
std::filesystem::path internal
 The path on the internal file system.

Detailed Description

A notification to indicate a new VFS mapping from an external source.

Produced by the ActionController on RegisterVFSMapping callbacks to indicate a new VFS file mapping has been defined by the user.

Definition at line 32 of file RegisterVFSMappingNotification.hpp.

Constructor & Destructor Documentation

◆ RegisterVFSMappingNotification()

echomap::RegisterVFSMappingNotification::RegisterVFSMappingNotification ( id_type project_id,
std::filesystem::path external,
std::filesystem::path internal )

Creates a new RegisterVFSMappingNotification to express a mapping between the external and internal paths.

Parameters
project_idThe ID of the Project to which the mapping relates.
externalThe path on the external (inaccessible) file system as referenced in Project files.
internalThe path on the internal (accessible) VFS corresponding to the external path.

Definition at line 20 of file RegisterVFSMappingNotification.cpp.

24 :
26 external(std::move(external)),
27 internal(std::move(internal))
28{
29}
std::filesystem::path external
The path on the external file system.
id_type project_id
The ID of the Project to which the mapping relates.
std::filesystem::path internal
The path on the internal file system.

Member Function Documentation

◆ verify_project()

void echomap::RegisterVFSMappingNotification::verify_project ( const PartialProject * 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 31 of file RegisterVFSMappingNotification.cpp.

34{
35 if (context == nullptr)
36 throw IgnoredWarning("Dropping RegisterVFSMappingNotification due to empty project.");
37
38 if (context->get_id() != project_id)
39 throw IgnoredWarning(
41 "Dropping RegisterVFSMappingNotification due to invalid project: requested {}, but have {}.",
43 context->get_id()
44 )
45 );
46}
T format(T... args)

Member Data Documentation

◆ external

std::filesystem::path echomap::RegisterVFSMappingNotification::external

The path on the external file system.

Definition at line 56 of file RegisterVFSMappingNotification.hpp.

◆ internal

std::filesystem::path echomap::RegisterVFSMappingNotification::internal

The path on the internal file system.

Definition at line 57 of file RegisterVFSMappingNotification.hpp.

◆ project_id

id_type echomap::RegisterVFSMappingNotification::project_id

The ID of the Project to which the mapping relates.

Definition at line 55 of file RegisterVFSMappingNotification.hpp.


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