Blender V5.3
deg_node_factory.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_string_ref.hh"
12
14
15namespace blender {
16
17struct ID;
18
19namespace deg {
21 virtual NodeType type() const = 0;
22 virtual const char *type_name() const = 0;
23
24 virtual int id_recalc_tag() const = 0;
25
26 virtual Node *create_node(const ID *id, const char *subdata, StringRef name) const = 0;
27};
28
29template<class ModeObjectType> struct DepsNodeFactoryImpl : public DepsNodeFactory {
30 NodeType type() const override;
31 const char *type_name() const override;
32
33 int id_recalc_tag() const override;
34
35 Node *create_node(const ID *id, const char *subdata, StringRef name) const override;
36};
37
38/* Register typeinfo */
40
41/* Get typeinfo for specified type */
43
44} // namespace deg
45} // namespace blender
46
void register_node_typeinfo(DepsNodeFactory *factory)
DepsNodeFactory * type_get_factory(const NodeType type)
BMesh Iterators.
const char * type_name() const override
Node * create_node(const ID *id, const char *subdata, StringRef name) const override
virtual NodeType type() const =0
virtual const char * type_name() const =0
virtual Node * create_node(const ID *id, const char *subdata, StringRef name) const =0
virtual int id_recalc_tag() const =0