Blender V5.3
COM_bundle_item.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_string_ref.hh"
8
10
11#include "COM_result.hh"
12
13namespace blender::compositor {
14
15class Context;
16
17/* A thin wrapper around a compositor result to be added and retrieved from bundles. */
19 private:
20 Result result_;
21
22 public:
23 /* Constructs the bundle item by shallow copying the given result to the result_ member. */
24 BundleItem(Context &context, Result &result);
25
26 /* Constructs a new BundleItemValue to be inserted into a bundle, which is essentially a wrapper
27 * around the constructor. */
29
30 /* Get a copy of the result stored inside the bundle item given a bundle item value. Releasing
31 * the returned result is the caller's responsibility. */
32 static Result get_result(Context &context, const nodes::BundleItemValue &item_value);
33
34 /* A name for logging. */
35 StringRefNull type_name() const override;
36
37 private:
38 /* Release the stored result and delete self. */
39 void delete_self() override;
40};
41
43
44} // namespace blender::compositor
static Result get_result(Context &context, const nodes::BundleItemValue &item_value)
StringRefNull type_name() const override
BundleItem(Context &context, Result &result)
static nodes::BundleItemValue new_bundle_item_value(Context &context, Result &result)
ImplicitSharingPtr< BundleItem > BundleItemPtr