37 std::optional<std::string_view> archetype_, std::string_view component_,
38 std::optional<std::string_view> component_type_
43 const char* archetype_,
const char* component_,
const char* component_type_
47 constexpr ComponentDescriptor(std::string_view component_) :
component(component_) {}
49 constexpr ComponentDescriptor(
const char* component_) :
component(component_) {}
52 std::size_t archetype_h = std::hash<std::optional<std::string_view>>{}(this->
archetype);
53 std::size_t component_type_h =
54 std::hash<std::optional<std::string_view>>{}(this->
component_type);
55 std::size_t component_h = std::hash<std::string_view>{}(this->
component);
56 return archetype_h ^ component_type_h ^ component_h;
90 if (this->archetype.has_value()) {
100 if (this->archetype.has_value()) {
111 if (this->component_type.has_value()) {
121 if (this->component_type.has_value()) {
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
uint64_t ComponentDescriptorHash
See ComponentDescriptor::hashed.
Definition component_descriptor.hpp:9
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
ComponentDescriptor or_with_component_type(std::optional< std::string_view > component_type_) const
Sets component_type to the given one iff it's not already set.
Definition component_descriptor.hpp:109
ComponentDescriptor with_component_type(const char *component_type_) const
Unconditionally sets component_type to the given one.
Definition component_descriptor.hpp:82
ComponentDescriptor with_component_type(std::optional< std::string_view > component_type_) const
Unconditionally sets component_type to the given one.
Definition component_descriptor.hpp:74
ComponentDescriptor or_with_archetype(std::optional< std::string_view > archetype_) const
Sets archetype to the given one iff it's not already set.
Definition component_descriptor.hpp:89
ComponentDescriptor or_with_archetype(const char *archetype_) const
Sets archetype to the given one iff it's not already set.
Definition component_descriptor.hpp:99
std::optional< std::string_view > component_type
Optional type information for this component.
Definition component_descriptor.hpp:34
std::optional< std::string_view > archetype
Optional name of the Archetype associated with this data.
Definition component_descriptor.hpp:22
ComponentDescriptor with_archetype(const char *archetype_) const
Unconditionally sets archetype to the given one.
Definition component_descriptor.hpp:67
ComponentDescriptor or_with_component_type(const char *component_type_) const
Sets component_type to the given one iff it's not already set.
Definition component_descriptor.hpp:120
std::string_view component
Uniquely identifies of the component associated with this data.
Definition component_descriptor.hpp:27
ComponentDescriptor with_archetype(std::optional< std::string_view > archetype_) const
Unconditionally sets archetype to the given one.
Definition component_descriptor.hpp:60