Blender V4.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
9#pragma once
10
11#include "MEM_guardedalloc.h"
12
15
16struct ID;
17
18namespace blender::deg {
20 virtual NodeType type() const = 0;
21 virtual const char *type_name() const = 0;
22
23 virtual int id_recalc_tag() const = 0;
24
25 virtual Node *create_node(const ID *id, const char *subdata, const char *name) const = 0;
26};
27
28template<class ModeObjectType> struct DepsNodeFactoryImpl : public DepsNodeFactory {
29 virtual NodeType type() const override;
30 virtual const char *type_name() const override;
31
32 virtual int id_recalc_tag() const override;
33
34 virtual Node *create_node(const ID *id, const char *subdata, const char *name) const override;
35};
36
37/* Register typeinfo */
39
40/* Get typeinfo for specified type */
42
43} // namespace blender::deg
44
Read Guarded memory(de)allocation.
void register_node_typeinfo(DepsNodeFactory *factory)
DepsNodeFactory * type_get_factory(const NodeType type)
Definition DNA_ID.h:413
virtual Node * create_node(const ID *id, const char *subdata, const char *name) const override
virtual const char * type_name() const override
virtual NodeType type() const override
virtual int id_recalc_tag() const override
virtual NodeType type() const =0
virtual const char * type_name() const =0
virtual Node * create_node(const ID *id, const char *subdata, const char *name) const =0
virtual int id_recalc_tag() const =0