Blender V5.3
NOD_geometry_nodes_closure_signature.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BKE_node.hh"
12
13#include "BLI_vector_set.hh"
14
16
17namespace blender::nodes {
18
21 public:
22 struct Item {
23 std::string key;
24 const bke::bNodeSocketType *type = nullptr;
26
27 friend bool operator==(const Item &a, const Item &b) = default;
28 };
29
31 std::string operator()(const Item &item)
32 {
33 return item.key;
34 }
35 };
36
39
40 std::optional<int> find_input_index(StringRef key) const;
41 std::optional<int> find_output_index(StringRef key) const;
42
43 friend bool operator==(const ClosureSignature &a, const ClosureSignature &b);
44 friend bool operator!=(const ClosureSignature &a, const ClosureSignature &b);
45
47 bool allow_auto_structure_type);
49 bool allow_auto_structure_type);
51
53};
54
65 bool has_type_definition() const;
66
67 std::optional<ClosureSignature> get_merged_signature() const;
68};
69
70} // namespace blender::nodes
friend bool operator==(const ClosureSignature &a, const ClosureSignature &b)
std::optional< int > find_output_index(StringRef key) const
CustomIDVectorSet< Item, ItemKeyGetter > inputs
std::optional< int > find_input_index(StringRef key) const
CustomIDVectorSet< Item, ItemKeyGetter > outputs
friend bool operator!=(const ClosureSignature &a, const ClosureSignature &b)
static ClosureSignature from_evaluate_closure_node(const bNode &node, bool allow_auto_structure_type)
static ClosureSignature from_closure_output_node(const bNode &node, bool allow_auto_structure_type)
static ClosureSignature from_closure_to_list_node(const bNode &node)
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
Defines a socket type.
Definition BKE_node.hh:163
friend bool operator==(const Item &a, const Item &b)=default
std::optional< ClosureSignature > get_merged_signature() const