Rerun C++ SDK
Loading...
Searching...
No Matches
component_type.hpp
1#pragma once
2
3#include <memory>
4#include <string_view>
5
6#include "result.hpp"
7
8namespace arrow {
9 class DataType;
10} // namespace arrow
11
12namespace rerun {
13 /// Handle to a registered component types.
14 using ComponentTypeHandle = uint32_t;
15
16 /// A type of component that can be registered.
17 ///
18 /// All built-in components automatically register their types lazily upon first serialization.
20 std::string_view name;
21 const std::shared_ptr<arrow::DataType>& arrow_datatype;
22
24 std::string_view name_, const std::shared_ptr<arrow::DataType>& arrow_datatype_
25 )
26 : name(name_), arrow_datatype(arrow_datatype_) {}
27
28 /// Registers a component type with the SDK.
29 ///
30 /// There is currently no deregistration mechanism.
31 /// Ideally, this method is only ever called once per component type.
33 };
34} // namespace rerun
A class for representing either a usable value, or an error.
Definition result.hpp:14
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
uint32_t ComponentTypeHandle
Handle to a registered component types.
Definition component_type.hpp:14
A type of component that can be registered.
Definition component_type.hpp:19
Result< ComponentTypeHandle > register_component() const
Registers a component type with the SDK.