Blender V5.0
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
15struct ID;
16
17namespace blender::deg {
19 virtual NodeType type() const = 0;
20 virtual const char *type_name() const = 0;
21
22 virtual int id_recalc_tag() const = 0;
23
24 virtual Node *create_node(const ID *id, const char *subdata, StringRef name) const = 0;
25};
26
27template<class ModeObjectType> struct DepsNodeFactoryImpl : public DepsNodeFactory {
28 NodeType type() const override;
29 const char *type_name() const override;
30
31 int id_recalc_tag() const override;
32
33 Node *create_node(const ID *id, const char *subdata, StringRef name) const override;
34};
35
36/* Register typeinfo */
38
39/* Get typeinfo for specified type */
41
42} // namespace blender::deg
43
void register_node_typeinfo(DepsNodeFactory *factory)
DepsNodeFactory * type_get_factory(const NodeType type)
const char * name
Definition DNA_ID.h:414
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