Rerun C++ SDK
Loading...
Searching...
No Matches
utf8.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/datatypes/utf8.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <cstdint>
9#include <memory>
10#include <string>
11#include <utility>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class StringBuilder;
17} // namespace arrow
18
19namespace rerun::datatypes {
20 /// **Datatype**: A string of text, encoded as UTF-8.
21 struct Utf8 {
22 std::string value;
23
24 public: // START of extensions from utf8_ext.cpp:
25 const char* c_str() const {
26 return value.c_str();
27 }
28
29 // END of extensions from utf8_ext.cpp, start of generated code:
30
31 public:
32 Utf8() = default;
33
34 Utf8(std::string value_) : value(std::move(value_)) {}
35
36 Utf8& operator=(std::string value_) {
37 value = std::move(value_);
38 return *this;
39 }
40 };
41} // namespace rerun::datatypes
42
43namespace rerun {
44 template <typename T>
45 struct Loggable;
46
47 /// \private
48 template <>
49 struct Loggable<datatypes::Utf8> {
50 static constexpr const char Name[] = "rerun.datatypes.Utf8";
51
52 /// Returns the arrow data type this type corresponds to.
53 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
54
55 /// Serializes an array of `rerun::datatypes::Utf8` into an arrow array.
57 const datatypes::Utf8* instances, size_t num_instances
58 );
59
60 /// Fills an arrow array builder with an array of this type.
61 static rerun::Error fill_arrow_array_builder(
62 arrow::StringBuilder* builder, const datatypes::Utf8* elements, size_t num_elements
63 );
64 };
65} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:91
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:78
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Datatype: A string of text, encoded as UTF-8.
Definition utf8.hpp:21