ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
frame_router.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include "resource_router.hpp"
8
9namespace rux::database {
10
29 public:
31
32 DataPayload get(const std::vector<PathComponent> &components) override;
33 void set(const std::vector<PathComponent> &components,
34 const DataPayload &data) override;
35 void del(const std::vector<PathComponent> &components) override;
36 std::vector<std::string> list() const override;
37
38 private:
39 int resolve_node_id(const PathComponent &component) const;
40 nlohmann::json metadata_json(int nodeId) const;
41};
42
43} // namespace rux::database
Router for sensor_frames (read-only).
void del(const std::vector< PathComponent > &components) override
Delete resource at the given path.
ResourceRouter(std::shared_ptr< reusex::ProjectDB > db)
void set(const std::vector< PathComponent > &components, const DataPayload &data) override
Set resource data at the given path.
std::vector< std::string > list() const override
List all items in this collection.
DataPayload get(const std::vector< PathComponent > &components) override
Get resource data at the given path.
ResourceRouter(std::shared_ptr< reusex::ProjectDB > db)
std::variant< std::string, std::vector< uint8_t >, nlohmann::json > DataPayload
Data payload that can be returned by routers.
Represents a single component in a resource path.