Files
test2/source/blender/depsgraph/intern/builder/pipeline.h
Hans Goudey 3630fd78d5 Cleanup: Depsgraph: Avoid transative includes and type aliases
Instead of the monolothic `depsgraph_type.hh` header that includes
most types used in the despgraph, just add includes where they are
actually necessary. Also remove the `using` keywords for `std` types.
The lack of specificity isn't considered good practice nowadays.

Removing unnecessary transitive includes can help improve compile
times because the time spent parsing headers decreases. Using the
"include what you use" pattern makes futher improvements much
easier too, since it the path to further reduce transitive includes
becomes much clearer.

Pull Request: https://projects.blender.org/blender/blender/pulls/133749
2025-01-31 21:17:49 +01:00

59 lines
1.3 KiB
C++

/* SPDX-FileCopyrightText: 2020 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup depsgraph
*/
#pragma once
#include "deg_builder_cache.h"
struct Depsgraph;
struct Main;
struct Scene;
struct ViewLayer;
namespace blender::deg {
struct Depsgraph;
class DepsgraphNodeBuilder;
class DepsgraphRelationBuilder;
/* Base class for Depsgraph Builder pipelines.
*
* Basically it runs through the following steps:
* - sanity check
* - build nodes
* - build relations
* - finalize
*/
class AbstractBuilderPipeline {
public:
AbstractBuilderPipeline(::Depsgraph *graph);
virtual ~AbstractBuilderPipeline() = default;
void build();
protected:
Depsgraph *deg_graph_;
Main *bmain_;
Scene *scene_;
ViewLayer *view_layer_;
DepsgraphBuilderCache builder_cache_;
virtual std::unique_ptr<DepsgraphNodeBuilder> construct_node_builder();
virtual std::unique_ptr<DepsgraphRelationBuilder> construct_relation_builder();
virtual void build_step_sanity_check();
void build_step_nodes();
void build_step_relations();
void build_step_finalize();
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) = 0;
virtual void build_relations(DepsgraphRelationBuilder &relation_builder) = 0;
};
} // namespace blender::deg