[Bf-blender-cvs] [5176484fbc5] functions: rename UnlinkedInputsHandler to InputInserter

Jacques Lucke noreply at git.blender.org
Fri Aug 2 19:15:10 CEST 2019


Commit: 5176484fbc5b1bcb5108b9e41b671c4219646b2f
Author: Jacques Lucke
Date:   Fri Aug 2 16:22:06 2019 +0200
Branches: functions
https://developer.blender.org/rB5176484fbc5b1bcb5108b9e41b671c4219646b2f

rename UnlinkedInputsHandler to InputInserter

===================================================================

M	source/blender/functions/CMakeLists.txt
M	source/blender/functions/FN_data_flow_nodes.hpp
M	source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
M	source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
R100	source/blender/functions/frontends/data_flow_nodes/input_handlers.cpp	source/blender/functions/frontends/data_flow_nodes/input_inserters.cpp
R080	source/blender/functions/frontends/data_flow_nodes/input_handlers.hpp	source/blender/functions/frontends/data_flow_nodes/input_inserters.hpp

===================================================================

diff --git a/source/blender/functions/CMakeLists.txt b/source/blender/functions/CMakeLists.txt
index 247e50f72b6..6953941126f 100644
--- a/source/blender/functions/CMakeLists.txt
+++ b/source/blender/functions/CMakeLists.txt
@@ -145,6 +145,10 @@ set(SRC
   frontends/data_flow_nodes/function_generation.cpp
   frontends/data_flow_nodes/graph_generation.hpp
   frontends/data_flow_nodes/graph_generation.cpp
+  frontends/data_flow_nodes/vtree_data_graph.hpp
+  frontends/data_flow_nodes/vtree_data_graph.cpp
+  frontends/data_flow_nodes/input_inserters.hpp
+  frontends/data_flow_nodes/input_inserters.cpp
   frontends/data_flow_nodes/mappings.hpp
   frontends/data_flow_nodes/mappings.cpp
   frontends/data_flow_nodes/mappings/registry.hpp
@@ -152,10 +156,6 @@ set(SRC
   frontends/data_flow_nodes/mappings/socket_loaders.cpp
   frontends/data_flow_nodes/mappings/conversion_inserters.cpp
   frontends/data_flow_nodes/mappings/type_mappings.cpp
-  frontends/data_flow_nodes/vtree_data_graph.hpp
-  frontends/data_flow_nodes/vtree_data_graph.cpp
-  frontends/data_flow_nodes/input_handlers.hpp
-  frontends/data_flow_nodes/input_handlers.cpp
   frontends/data_flow_nodes/data_flow_nodes-c.h
   frontends/data_flow_nodes/data_flow_nodes-c.cpp
 )
diff --git a/source/blender/functions/FN_data_flow_nodes.hpp b/source/blender/functions/FN_data_flow_nodes.hpp
index 994f8216055..3514ffe19de 100644
--- a/source/blender/functions/FN_data_flow_nodes.hpp
+++ b/source/blender/functions/FN_data_flow_nodes.hpp
@@ -4,4 +4,4 @@
 #include "frontends/data_flow_nodes/function_generation.hpp"
 #include "frontends/data_flow_nodes/graph_generation.hpp"
 #include "frontends/data_flow_nodes/vtree_data_graph.hpp"
-#include "frontends/data_flow_nodes/input_handlers.hpp"
+#include "frontends/data_flow_nodes/input_inserters.hpp"
diff --git a/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp b/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
index 66ab893d1ff..f1ecfa91954 100644
--- a/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
+++ b/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
@@ -70,8 +70,7 @@ static bool insert_links(VTreeDataGraphBuilder &builder)
   return true;
 }
 
-static void insert_unlinked_inputs(VTreeDataGraphBuilder &builder,
-                                   UnlinkedInputsHandler &unlinked_inputs_handler)
+static void insert_unlinked_inputs(VTreeDataGraphBuilder &builder, InputInserter &input_inserter)
 {
 
   for (VirtualNode *vnode : builder.vtree().nodes()) {
@@ -90,7 +89,7 @@ static void insert_unlinked_inputs(VTreeDataGraphBuilder &builder,
 
     if (vsockets.size() > 0) {
       Vector<BuilderOutputSocket *> new_origins(vsockets.size());
-      unlinked_inputs_handler.insert(builder, vsockets, new_origins);
+      input_inserter.insert(builder, vsockets, new_origins);
       builder.insert_links(new_origins, sockets);
     }
   }
@@ -108,8 +107,8 @@ ValueOrError<VTreeDataGraph> generate_graph(VirtualNodeTree &vtree)
     return BLI_ERROR_CREATE("error inserting links");
   }
 
-  ConstantInputsHandler unlinked_inputs_handler;
-  insert_unlinked_inputs(builder, unlinked_inputs_handler);
+  ConstantInputsHandler input_inserter;
+  insert_unlinked_inputs(builder, input_inserter);
 
   return builder.build();
 }
diff --git a/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp b/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
index f43e7f42a36..6f421d7c105 100644
--- a/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
+++ b/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
@@ -5,7 +5,7 @@
 namespace FN {
 namespace DataFlowNodes {
 
-class UnlinkedInputsHandler {
+class InputInserter {
  public:
   virtual void insert(VTreeDataGraphBuilder &builder,
                       ArrayRef<VirtualSocket *> unlinked_inputs,
diff --git a/source/blender/functions/frontends/data_flow_nodes/input_handlers.cpp b/source/blender/functions/frontends/data_flow_nodes/input_inserters.cpp
similarity index 100%
rename from source/blender/functions/frontends/data_flow_nodes/input_handlers.cpp
rename to source/blender/functions/frontends/data_flow_nodes/input_inserters.cpp
diff --git a/source/blender/functions/frontends/data_flow_nodes/input_handlers.hpp b/source/blender/functions/frontends/data_flow_nodes/input_inserters.hpp
similarity index 80%
rename from source/blender/functions/frontends/data_flow_nodes/input_handlers.hpp
rename to source/blender/functions/frontends/data_flow_nodes/input_inserters.hpp
index 10e689a24ec..26bf610b71d 100644
--- a/source/blender/functions/frontends/data_flow_nodes/input_handlers.hpp
+++ b/source/blender/functions/frontends/data_flow_nodes/input_inserters.hpp
@@ -5,13 +5,13 @@
 namespace FN {
 namespace DataFlowNodes {
 
-class DynamicSocketLoader : public UnlinkedInputsHandler {
+class DynamicSocketLoader : public InputInserter {
   void insert(VTreeDataGraphBuilder &builder,
               ArrayRef<VirtualSocket *> unlinked_inputs,
               ArrayRef<BuilderOutputSocket *> r_new_origins) override;
 };
 
-class ConstantInputsHandler : public UnlinkedInputsHandler {
+class ConstantInputsHandler : public InputInserter {
   void insert(VTreeDataGraphBuilder &builder,
               ArrayRef<VirtualSocket *> unlinked_inputs,
               ArrayRef<BuilderOutputSocket *> r_new_origins) override;



More information about the Bf-blender-cvs mailing list