|
EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
|
Public Member Functions | |
| 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. | |
Static Public Member Functions | |
| 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 |
Private Member Functions | |
| std::optional< std::pair< const Signal &, const Sensor & > > | resolve_pair (id_type signal_id, id_type sensor_id) const |
| Convenience function to simultaneously resolve observing references to a Signal and a Sensor from the Project storage based on their numerical IDs. | |
Private Attributes | |
| std::flat_map< id_type, std::shared_ptr< Signal > > | signals |
| std::flat_map< id_type, std::unique_ptr< Sensor > > | sensors |
| BidirectionalUnorderedMapping< id_type, id_type > | requested_channel_mapping |
| Mapping between Signal objects and Sensor objects (identified by their numerical IDs). | |
Additional Inherited Members | |
| Protected Member Functions inherited from echomap::Object< Project > | |
| void | move_identity_from (Object &&other) noexcept |
| Helper for derived classes to provide move-assignment operations. | |
Definition at line 25 of file Project.hpp.
|
explicit |
Creates a new named Project.
| project_name | Optional Project display name. |
Definition at line 15 of file Project.cpp.
Creates a new association between a Signal and Sensor.
This creates an immediately confirmed mapping: the Signal and Sensor provided must already belong to the Project.
| std::runtime_error | The given Signal was not known to the Project. |
| std::runtime_error | The given Sensor was not known to the Project. |
| std::runtime_error | A component (the Signal or the Sensor) is already mapped. |
Definition at line 46 of file Project.cpp.
| void echomap::Project::add_association | ( | id_type | signal_id, |
| id_type | sensor_id ) |
Creates a new association between a Signal and Sensor.
This requests a mapping: the Signal and Sensor of the given IDs may or may not already belong to the Project. If they do not belong to the Project at the time of insertion, the association will only become observable on the public Project API once both components are loaded; i.e., the prerequisites of add_association(const Signal&, const Sensor&) are met.
Definition at line 67 of file Project.cpp.
| const Sensor * echomap::Project::add_sensor | ( | std::unique_ptr< Sensor > && | sensor | ) |
Transfers ownership of a Sensor into the Project.
| sensor | The owning container of the Sensor object to transfer. |
nullptr if insertion was de-duplicated. Definition at line 35 of file Project.cpp.
| const Signal * echomap::Project::add_signal | ( | std::shared_ptr< Signal > && | signal | ) |
Transfers ownership of a Signal into the Project.
| signal | The shared-ownership container of the Signal object to transfer. |
nullptr if insertion was de-duplicated. Definition at line 24 of file Project.cpp.
|
nodiscard |
Retrieve a mutable reference to the Sensor with the given ID.
| sensor_id | The numerical ID of the Sensor to retrieve. |
Definition at line 98 of file Project.cpp.
|
staticnodiscardnoexcept |
Definition at line 87 of file Project.cpp.
|
nodiscardnoexcept |
Checks if any Sensor objects are owned by the Project.
Definition at line 82 of file Project.cpp.
|
inlinenodiscard |
Provides a transformed view for defined channel mappings.
Definition at line 151 of file Project.hpp.
|
inlinenodiscardnoexcept |
Provides a transformed view for stored Sensor objects in the Project.
Definition at line 137 of file Project.hpp.
|
inlinenodiscardnoexcept |
Provides a transformed view for stored Signal objects in the Project.
Definition at line 97 of file Project.hpp.
|
nodiscardprivate |
Convenience function to simultaneously resolve observing references to a Signal and a Sensor from the Project storage based on their numerical IDs.
Note that the returned Signal and Sensor needn't be associated in a channel mapping or any other way, besides being owned by the current Project.
| signal_id | The numerical ID of the desired Signal. |
| sensor_id | The numerical ID of the desired Sensor. |
| std::runtime_error | A Signal with the given ID is not owned by the Project. |
| std::runtime_error | A Sensor with the given ID is not owned by the Project. |
Definition at line 112 of file Project.cpp.
|
inlinenodiscardnoexcept |
Provides a view of Signal objects detained in shared-ownership containers.
Definition at line 120 of file Project.hpp.
|
private |
Mapping between Signal objects and Sensor objects (identified by their numerical IDs).
The structure stores all "requested" mappings, a non-strict subset of which are "confirmed". A mapping request is caused by an external caller, such as a factory, invoking add_association(id_type, id_type), which does not require that the corresponding Signal or Sensor is owned by the Project at the time of the request.
Mappings become confirmed once both the relevant Signal and Sensor have been loaded and are owned by the Project.
Only confirmed mappings may be observed on the public API.
Definition at line 215 of file Project.hpp.
|
private |
Definition at line 28 of file Project.hpp.
|
private |
Definition at line 27 of file Project.hpp.