Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Remove indicator_component.{cpp|hpp} from rerun_cpp
  • Loading branch information
grtlr committed Jul 10, 2025
commit 439d69b3f84d5d18de375b38d858de6b11f5a94c
4 changes: 0 additions & 4 deletions docs/snippets/all/archetypes/video_auto_frames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ int main(int argc, char* argv[]) {
for (size_t i = 0; i < frame_timestamps_ns.size(); i++) {
video_timestamps[i] = rerun::components::VideoTimestamp(frame_timestamps_ns[i]);
}
auto video_frame_reference_indicators =
rerun::ComponentColumn::from_indicators<rerun::VideoFrameReference>(
static_cast<uint32_t>(video_timestamps.size())
);

rec.send_columns(
"video",
Expand Down
4 changes: 0 additions & 4 deletions rerun_cpp/src/rerun/archetypes/asset_video.hpp

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

4 changes: 0 additions & 4 deletions rerun_cpp/src/rerun/archetypes/video_frame_reference.hpp

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

1 change: 0 additions & 1 deletion rerun_cpp/src/rerun/as_components.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "collection.hpp"
#include "component_batch.hpp"
#include "indicator_component.hpp"
#include "loggable.hpp"

namespace rerun {
Expand Down
9 changes: 0 additions & 9 deletions rerun_cpp/src/rerun/component_batch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ namespace rerun {
}
}

/// Creates a new component batch for an archetype indicator.
template <typename Archetype>
static Result<ComponentBatch> from_indicator() {
return ComponentBatch::from_loggable(
typename Archetype::IndicatorComponent(),
Loggable<typename Archetype::IndicatorComponent>::Descriptor
);
}

/// Creates a new component batch from an already existing arrow array.
///
/// Automatically registers the descriptor the first time it is encountered.
Expand Down
13 changes: 0 additions & 13 deletions rerun_cpp/src/rerun/component_column.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,6 @@ namespace rerun {
);
}

/// Creates a new component column with a given number of archetype indicators for a given archetype type.
template <typename Archetype>
static Result<ComponentColumn> from_indicators(uint32_t num_indicators) {
auto component_batch_result = ComponentBatch::from_indicator<Archetype>();
if (component_batch_result.is_err()) {
return component_batch_result.error;
}
return ComponentColumn::from_batch_with_lengths(
component_batch_result.value,
Collection<uint32_t>::take_ownership(std::vector<uint32_t>(num_indicators, 0))
);
}

/// Creates a new component batch partition from a batch and a collection of run lengths.
///
/// \param batch A batch of components which is about to be partitioned.
Expand Down
20 changes: 0 additions & 20 deletions rerun_cpp/src/rerun/indicator_component.cpp

This file was deleted.

59 changes: 0 additions & 59 deletions rerun_cpp/src/rerun/indicator_component.hpp

This file was deleted.

35 changes: 21 additions & 14 deletions rerun_cpp/tests/recording_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <optional>
#include <vector>

#include <arrow/array/array_base.h>
#include <arrow/buffer.h>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
Expand All @@ -18,6 +19,11 @@ namespace fs = std::filesystem;

struct BadComponent {};

const std::shared_ptr<arrow::Array>& null_arrow_array() {
static const std::shared_ptr<arrow::Array> null_array = std::make_shared<arrow::NullArray>(1);
return null_array;
}

template <>
struct rerun::Loggable<BadComponent> {
static constexpr rerun::ComponentDescriptor Descriptor = "bad!";
Expand Down Expand Up @@ -191,7 +197,8 @@ SCENARIO("RecordingStream can be used for logging archetypes and components", TE
THEN("collection of component batch results can be logged") {
rerun::Collection<rerun::Result<rerun::ComponentBatch>> batches = {
batch0,
batch1};
batch1
};
stream.log("log_archetype-splat", batches);
stream.log_static("log_archetype-splat", batches);
}
Expand All @@ -200,29 +207,29 @@ SCENARIO("RecordingStream can be used for logging archetypes and components", TE
THEN("an archetype can be logged") {
stream.log(
"log_archetype-splat",
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}}
).with_colors(rerun::Color(0xFF0000FF))
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}})
.with_colors(rerun::Color(0xFF0000FF))
);
stream.log_static(
"log_archetype-splat",
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}}
).with_colors(rerun::Color(0xFF0000FF))
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}})
.with_colors(rerun::Color(0xFF0000FF))
);
}
THEN("several archetypes can be logged") {
stream.log(
"log_archetype-splat",
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}}
).with_colors(rerun::Color(0xFF0000FF)),
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}}
).with_colors(rerun::Color(0xFF0000FF))
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}})
.with_colors(rerun::Color(0xFF0000FF)),
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}})
.with_colors(rerun::Color(0xFF0000FF))
);
stream.log_static(
"log_archetype-splat",
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}}
).with_colors(rerun::Color(0xFF0000FF)),
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}}
).with_colors(rerun::Color(0xFF0000FF))
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}})
.with_colors(rerun::Color(0xFF0000FF)),
rerun::Points2D({rerun::Vec2D{1.0, 2.0}, rerun::Vec2D{4.0, 5.0}})
.with_colors(rerun::Color(0xFF0000FF))
);
}

Expand Down Expand Up @@ -439,7 +446,7 @@ SCENARIO("Recording stream handles invalid logging gracefully", TEST_TAG) {
AND_GIVEN("a cell with an invalid component type") {
rerun::ComponentBatch cell = {};
cell.component_type = RR_COMPONENT_TYPE_HANDLE_INVALID;
cell.array = rerun::components::indicator_arrow_array();
cell.array = null_arrow_array();

THEN("try_log_data_row fails with InvalidComponentTypeHandle") {
CHECK(
Expand Down