Skip to content

Commit

Permalink
Zero-length indicators on all codepaths in C++ (#8842)
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Reich <[email protected]>
  • Loading branch information
teh-cmc and Wumpf authored Jan 29, 2025
1 parent 42e47cd commit 0e13340
Show file tree
Hide file tree
Showing 68 changed files with 111 additions and 138 deletions.
3 changes: 1 addition & 2 deletions crates/build/re_types_builder/src/codegen/cpp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1831,8 +1831,7 @@ fn archetype_serialize(type_ident: &Ident, obj: &Object, hpp_includes: &mut Incl
#NEWLINE_TOKEN
#(#push_batches)*
{
auto indicator = #type_ident::IndicatorComponent();
auto result = ComponentBatch::from_loggable(indicator);
auto result = ComponentBatch::from_indicator<#type_ident>();
RR_RETURN_NOT_OK(result.error);
cells.emplace_back(std::move(result.value));
}
Expand Down
3 changes: 1 addition & 2 deletions docs/snippets/all/descriptors/descr_custom_archetype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ struct rerun::AsComponents<CustomPoints3D> {
static Result<std::vector<ComponentBatch>> serialize(const CustomPoints3D& archetype) {
std::vector<rerun::ComponentBatch> batches;

CustomPoints3D::IndicatorComponent indicator;
batches.push_back(ComponentBatch::from_loggable(indicator).value_or_throw());
batches.push_back(ComponentBatch::from_indicator<CustomPoints3D>().value_or_throw());

auto positions_descr = rerun::Loggable<CustomPosition3D>::Descriptor
.or_with_archetype_name("user.CustomPoints3D")
Expand Down
3 changes: 1 addition & 2 deletions docs/snippets/all/tutorials/custom_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ struct rerun::AsComponents<CustomPoints3D> {
auto batches = AsComponents<rerun::Points3D>::serialize(archetype.points).value_or_throw();

// Add a custom indicator component.
CustomPoints3D::IndicatorComponent indicator;
batches.push_back(ComponentBatch::from_loggable(indicator).value_or_throw());
batches.push_back(ComponentBatch::from_indicator<CustomPoints3D>().value_or_throw());

// Add custom confidence components if present.
if (archetype.confidences) {
Expand Down
3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/annotation_context.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/arrows2d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/arrows3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/asset3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/asset_video.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions rerun_cpp/src/rerun/archetypes/asset_video_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ namespace rerun::archetypes {
return std::vector<std::chrono::nanoseconds>();
}
auto blob_list_array = std::dynamic_pointer_cast<arrow::ListArray>(blob.value().array);
if (!blob_list_array) {
return Error(ErrorCode::InvalidArchetypeField, "Blob array is not a primitive array");
}
auto blob_array =
std::dynamic_pointer_cast<arrow::PrimitiveArray>(blob_list_array->values());
if (!blob_array) {
Expand Down
3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/bar_chart.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/boxes2d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/boxes3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/capsules3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/clear.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/depth_image.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/encoded_image.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/geo_points.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/graph_edges.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/graph_nodes.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/image.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/line_strips2d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/line_strips3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/mesh3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/pinhole.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/points2d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/points3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/scalar.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/segmentation_image.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/series_line.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/series_point.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/tensor.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/text_document.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/text_log.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/transform3d.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/archetypes/view_coordinates.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rerun_cpp/src/rerun/blueprint/archetypes/background.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e13340

Please sign in to comment.