Rerun C++ SDK
Loading...
Searching...
No Matches
view_contents.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/blueprint/archetypes/view_contents.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/query_expression.hpp"
7#include "../../collection.hpp"
8#include "../../component_batch.hpp"
9#include "../../indicator_component.hpp"
10#include "../../result.hpp"
11
12#include <cstdint>
13#include <utility>
14#include <vector>
15
16namespace rerun::blueprint::archetypes {
17 /// **Archetype**: The contents of a `View`.
18 ///
19 /// The contents are found by combining a collection of `QueryExpression`s.
20 ///
21 /// ```diff
22 /// + /world/** # add everything…
23 /// - /world/roads/** # …but remove all roads…
24 /// + /world/roads/main # …but show main road
25 /// ```
26 ///
27 /// If there is multiple matching rules, the most specific rule wins.
28 /// If there are multiple rules of the same specificity, the last one wins.
29 /// If no rules match, the path is excluded.
30 ///
31 /// Specifying a path without a `+` or `-` prefix is equivalent to `+`:
32 /// ```diff
33 /// /world/** # add everything…
34 /// - /world/roads/** # …but remove all roads…
35 /// /world/roads/main # …but show main road
36 /// ```
37 ///
38 /// The `/**` suffix matches the whole subtree, i.e. self and any child, recursively
39 /// (`/world/**` matches both `/world` and `/world/car/driver`).
40 /// Other uses of `*` are not (yet) supported.
41 ///
42 /// Internally, `EntityPathFilter` sorts the rule by entity path, with recursive coming before non-recursive.
43 /// This means the last matching rule is also the most specific one. For instance:
44 /// ```diff
45 /// + /world/**
46 /// - /world
47 /// - /world/car/**
48 /// + /world/car/driver
49 /// ```
50 ///
51 /// The last rule matching `/world/car/driver` is `+ /world/car/driver`, so it is included.
52 /// The last rule matching `/world/car/hood` is `- /world/car/**`, so it is excluded.
53 /// The last rule matching `/world` is `- /world`, so it is excluded.
54 /// The last rule matching `/world/house` is `+ /world/**`, so it is included.
55 struct ViewContents {
56 /// The `QueryExpression` that populates the contents for the view.
57 ///
58 /// They determine which entities are part of the view.
60
61 public:
62 static constexpr const char IndicatorComponentName[] =
63 "rerun.blueprint.components.ViewContentsIndicator";
64
65 /// Indicator component, used to identify the archetype when converting to a list of components.
67
68 public:
69 ViewContents() = default;
70 ViewContents(ViewContents&& other) = default;
71
73 : query(std::move(_query)) {}
74 };
75
76} // namespace rerun::blueprint::archetypes
77
78namespace rerun {
79 /// \private
80 template <typename T>
81 struct AsComponents;
82
83 /// \private
84 template <>
85 struct AsComponents<blueprint::archetypes::ViewContents> {
86 /// Serialize all set component batches.
87 static Result<std::vector<ComponentBatch>> serialize(
89 );
90 };
91} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
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
Archetype: The contents of a View.
Definition view_contents.hpp:55
Collection< rerun::blueprint::components::QueryExpression > query
The QueryExpression that populates the contents for the view.
Definition view_contents.hpp:59
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32