|
EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
|
A Project with semantics for expressing an incomplete set of owned Signal objects. More...
#include <PartialProject.hpp>
Public Member Functions | |
| PartialProject (std::string_view project_name={}) | |
| void | indicate_unloaded_signal (std::unique_ptr< SignalFactory > &&factory) |
| Provide the factory for an unloaded Signal. | |
| void | add_vfs_mapping_for_unavailable_signal (const std::filesystem::path &external, std::filesystem::path &&internal) |
| Provide a VFS mapping for a previously indicated unloaded Signal. | |
| auto | observe_unloaded_signals () const noexcept |
| Provide an observing view to the unloaded signals. | |
| auto | take_unloaded_factories () noexcept |
| Provide a view to the mutable unloaded SignalFactory objects. | |
| Public Member Functions inherited from echomap::Project | |
| Project (std::string_view project_name={}) | |
| Creates a new named Project. | |
| const Signal * | add_signal (std::shared_ptr< Signal > &&signal) |
| Transfers ownership of a Signal into the Project. | |
| const Sensor * | add_sensor (std::unique_ptr< Sensor > &&sensor) |
| Transfers ownership of a Sensor into the Project. | |
| void | add_association (const Signal &signal, const Sensor &sensor) |
| Creates a new association between a Signal and Sensor. | |
| void | add_association (id_type signal_id, id_type sensor_id) |
| Creates a new association between a Signal and Sensor. | |
| auto | observe_signals () const noexcept |
| Provides a transformed view for stored Signal objects in the Project. | |
| auto | share_signals () const noexcept |
| Provides a view of Signal objects detained in shared-ownership containers. | |
| size_t | get_sensors_count () const noexcept |
| Checks if any Sensor objects are owned by the Project. | |
| auto | observe_sensors () const noexcept |
| Provides a transformed view for stored Sensor objects in the Project. | |
| auto | observe_associations () const |
| Provides a transformed view for defined channel mappings. | |
| Sensor & | get_mutable_sensor (id_type sensor_id) |
| Retrieve a mutable reference to the Sensor with the given ID. | |
| Public Member Functions inherited from echomap::Object< Project > | |
| ~Object ()=default | |
| Non-virtual base destructor. | |
| id_type | get_id () const noexcept |
| bool | is_valid () const noexcept |
| void | set_name (const std::string_view new_name) |
| std::string_view | get_name () const noexcept |
| const char * | get_imgui_name () const noexcept |
| Object (const Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| bool | operator== (const Object &other) const noexcept |
| Determine shallow equality between two Object instances. | |
Private Attributes | |
| std::map< std::filesystem::path, std::pair< std::optional< std::filesystem::path >, std::vector< std::unique_ptr< SignalFactory > > > > | unloaded_signals |
| Provides a mapping between stated paths of externally sourced signals, and paths in the WebAssembly VFS. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from echomap::Project | |
| static ImPlot3DPoint | get_sensor_point (int idx, const void *project_instance) noexcept |
| Static Public Member Functions inherited from echomap::Object< Project > | |
| static std::string_view | get_class_name () noexcept |
| Protected Member Functions inherited from echomap::Object< Project > | |
| void | move_identity_from (Object &&other) noexcept |
| Helper for derived classes to provide move-assignment operations. | |
A Project with semantics for expressing an incomplete set of owned Signal objects.
In addition to the regular Project, the PartialProject detains a number of SignalFactory objects that are reserved to construct Signal instances once their external sources become available. This is useful in WebAssembly environments to model mappings between the Signal path specified in the Project metadata, and a mapping to the Wasm VFS path.
Definition at line 31 of file PartialProject.hpp.
|
explicit |
Definition at line 19 of file PartialProject.cpp.
| void echomap::PartialProject::add_vfs_mapping_for_unavailable_signal | ( | const std::filesystem::path & | external, |
| std::filesystem::path && | internal ) |
Provide a VFS mapping for a previously indicated unloaded Signal.
| external | The external source path of the Signal. |
| internal | The VFS-mapped path to use for the Signal. |
| std::runtime_error | There was no unloaded Signal sourced by the given external path. |
Definition at line 57 of file PartialProject.cpp.
| void echomap::PartialProject::indicate_unloaded_signal | ( | std::unique_ptr< SignalFactory > && | factory | ) |
Provide the factory for an unloaded Signal.
An unloaded Signal is an externally sourced Signal defined by the Project, but whose sample data was not available at the time of the Project load, and has not yet been fully loaded.
| factory | The SignalFactory prepared to construct the Signal, once the data becomes available. |
| std::runtime_error | The given SignalFactory did not define an external source. |
| std::runtime_error | Could not take ownership of the SignalFactory for some implementation-defined reason. |
Definition at line 28 of file PartialProject.cpp.
|
inlinenodiscardnoexcept |
Provide an observing view to the unloaded signals.
Definition at line 84 of file PartialProject.hpp.
|
inlinenodiscardnoexcept |
Provide a view to the mutable unloaded SignalFactory objects.
For a description of the viewed values, see observe_unloaded_signals. Following this operation, ownership of the unloaded factories are transferred to the caller and their corresponding entries removed from the underlying storage.
Definition at line 98 of file PartialProject.hpp.
|
private |
Provides a mapping between stated paths of externally sourced signals, and paths in the WebAssembly VFS.
The key indicates the path of the referenced file. The value composes an optional mapping of the corresponding path in the VFS and a channel map of factories responsible for constructing the Signal of the file channel.
Definition at line 42 of file PartialProject.hpp.