Rerun C++ SDK
Loading...
Searching...
No Matches
component_type.hpp
1#pragma once
2
3#include <memory>
4
5#include "component_descriptor.hpp"
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 ComponentDescriptor descriptor;
21 const std::shared_ptr<arrow::DataType>& arrow_datatype;
22
24 const ComponentDescriptor& descriptor_,
25 const std::shared_ptr<arrow::DataType>& arrow_datatype_
26 )
27 : descriptor(descriptor_), arrow_datatype(arrow_datatype_) {}
28
29 /// Registers a component type with the SDK.
30 ///
31 /// There is currently no deregistration mechanism.
32 /// Ideally, this method is only ever called once per component type.
34 };
35} // 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:23
uint32_t ComponentTypeHandle
Handle to a registered component types.
Definition component_type.hpp:14
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:13
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.