5#ifndef ECHOMAP_PROJECT_HPP
6#define ECHOMAP_PROJECT_HPP
27 std::flat_map<id_type, std::shared_ptr<Signal>> signals;
28 std::flat_map<id_type, std::unique_ptr<Sensor>> sensors;
99 return signals | std::views::values |
122 return signals | std::views::values;
139 return sensors | std::views::values |
154 return resolve_pair(association.first, association.second);
156 std::views::filter([](
const auto& optional) {
157 return optional.has_value();
159 std::views::transform([](
const auto& optional) {
164 [[nodiscard]]
static ImPlot3DPoint get_sensor_point(
166 const void* project_instance
EchoMap bidirectional unordered mapping container specification and implementation.
Maintains a bidirectional mapping between a key and value, allowing fast lookup on both objects.
static constexpr std::string_view class_name
Display name for objects of the type determined by the templated class.
auto observe_signals() const noexcept
Provides a transformed view for stored Signal objects in the Project.
Project(std::string_view project_name={})
Creates a new named Project.
const Sensor * add_sensor(std::unique_ptr< Sensor > &&sensor)
Transfers ownership of a Sensor into the Project.
auto share_signals() const noexcept
Provides a view of Signal objects detained in shared-ownership containers.
auto observe_associations() const
Provides a transformed view for defined channel mappings.
const Signal * add_signal(std::shared_ptr< Signal > &&signal)
Transfers ownership of a Signal into the Project.
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...
BidirectionalUnorderedMapping< id_type, id_type > requested_channel_mapping
Mapping between Signal objects and Sensor objects (identified by their numerical IDs).
auto observe_sensors() const noexcept
Provides a transformed view for stored Sensor objects in the Project.
size_t get_sensors_count() const noexcept
Checks if any Sensor objects are owned by the Project.
void add_association(const Signal &signal, const Sensor &sensor)
Creates a new association between a Signal and Sensor.
Sensor & get_mutable_sensor(id_type sensor_id)
Retrieve a mutable reference to the Sensor with the given ID.
A single channel of discretely sampled audio data.
The main EchoMap outermost namespace for all non-exported symbols.