|
EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
|
Denotes a unit of work for loading and constructing an EchoMap Project from its serialised form on the filesystem. More...
#include <LoadProjectTask.hpp>
Public Member Functions | |
| LoadProjectTask (std::filesystem::path path, Worker *worker) | |
| Create a new LoadProjectTask for a serialised Project. | |
| Public Member Functions inherited from echomap::ITask | |
| ITask (const std::string_view task_name) | |
| virtual | ~ITask () noexcept=default |
| Destruct the ITask base. | |
| WorkerResult | execute (const std::stop_token &stop_token) |
| Execute the work, subject to the given token, and produce a WorkerResult. | |
| WorkerResult | operator() () |
| Alias for execute with a vacuous stop token. | |
| Public Member Functions inherited from echomap::Object< ITask > | |
| ~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 Member Functions | |
| WorkerResult | execute_work () override |
| Loads, deserialises, constructs, and validates the serialised Project file at the provided path. | |
Private Attributes | |
| std::filesystem::path | project_file_path |
| The deserialiser takes just strings for paths, so we "downgrade" the typed path to a string. | |
| Worker * | worker |
Static Private Attributes | |
| static JSONDeserialiser | deserialiser {} |
| Shared instance of the deserialiser. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from echomap::Object< ITask > | |
| static std::string_view | get_class_name () noexcept |
| Protected Member Functions inherited from echomap::Object< ITask > | |
| void | move_identity_from (Object &&other) noexcept |
| Helper for derived classes to provide move-assignment operations. | |
Denotes a unit of work for loading and constructing an EchoMap Project from its serialised form on the filesystem.
Definition at line 27 of file LoadProjectTask.hpp.
|
explicit |
Create a new LoadProjectTask for a serialised Project.
| path | The path of the serialised Project file. |
| worker | A thread-safe Worker capable of accepting sub-work requests. |
Definition at line 23 of file LoadProjectTask.cpp.
|
overrideprivatevirtual |
Loads, deserialises, constructs, and validates the serialised Project file at the provided path.
| std::runtime_error | If the Project could not be fully loaded and validated. |
Implements echomap::ITask.
Definition at line 33 of file LoadProjectTask.cpp.
|
staticprivate |
Shared instance of the deserialiser.
It is useful to persist the deserialiser object across numerous Project loads, since we may re-use the parser. See https://github.com/simdjson/simdjson/blob/b485fb2af4862176f291a6fc9d2cb1cfd05631ac/doc/performance.md#reusing-the-parser-for-maximum-efficiency. This comes at the small cost of making the LoadProjectTask not thread safe, as noted in the API docs.
Definition at line 60 of file LoadProjectTask.hpp.
|
private |
The deserialiser takes just strings for paths, so we "downgrade" the typed path to a string.
Definition at line 65 of file LoadProjectTask.hpp.
|
private |
Definition at line 67 of file LoadProjectTask.hpp.