Files
test2/source/blender/depsgraph/intern/node/deg_node_factory.h
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00

48 lines
1.1 KiB
C++

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2019 Blender Foundation. All rights reserved. */
/** \file
* \ingroup depsgraph
*/
#pragma once
#include "MEM_guardedalloc.h"
#include "intern/depsgraph_type.h"
#include "intern/node/deg_node.h"
struct ID;
namespace blender {
namespace deg {
struct DepsNodeFactory {
virtual NodeType type() const = 0;
virtual const char *type_name() const = 0;
virtual int id_recalc_tag() const = 0;
virtual Node *create_node(const ID *id, const char *subdata, const char *name) const = 0;
};
template<class ModeObjectType> struct DepsNodeFactoryImpl : public DepsNodeFactory {
virtual NodeType type() const override;
virtual const char *type_name() const override;
virtual int id_recalc_tag() const override;
virtual Node *create_node(const ID *id, const char *subdata, const char *name) const override;
};
/* Register typeinfo */
void register_node_typeinfo(DepsNodeFactory *factory);
/* Get typeinfo for specified type */
DepsNodeFactory *type_get_factory(NodeType type);
} // namespace deg
} // namespace blender
#include "intern/node/deg_node_factory_impl.h"