|
Blender V5.3
|
#include <FN_lazy_function_graph.hh>
Inherits blender::blender::NonCopyable, and blender::blender::NonMovable.
Classes | |
| class | ToDotOptions |
Public Member Functions | |
| Graph (StringRef name="unknown") | |
| ~Graph () | |
| FunctionNode & | add_function (const LazyFunction &fn) |
| GraphInputSocket & | add_input (const CPPType &type, std::string name="") |
| GraphOutputSocket & | add_output (const CPPType &type, std::string name="") |
| void | add_link (OutputSocket &from, InputSocket &to) |
| void | clear_origin (InputSocket &socket) |
| void | update_node_indices () |
| void | update_socket_indices () |
| bool | node_indices_are_valid () const |
| std::string | to_dot (const ToDotOptions &options={}) const |
#Graph Inline Methods | |
| StringRefNull | name () const |
| Span< const Node * > | nodes () const |
| Span< Node * > | nodes () |
| Span< const FunctionNode * > | function_nodes () const |
| Span< FunctionNode * > | function_nodes () |
| Span< GraphInputSocket * > | graph_inputs () |
| Span< GraphOutputSocket * > | graph_outputs () |
| Span< const GraphInputSocket * > | graph_inputs () const |
| Span< const GraphOutputSocket * > | graph_outputs () const |
| int | socket_num () const |
A container for an arbitrary number of nodes and links between their sockets.
Definition at line 207 of file FN_lazy_function_graph.hh.
| blender::fn::lazy_function::Graph::Graph | ( | StringRef | name = "unknown" | ) |
Definition at line 17 of file lazy_function_graph.cc.
References name().
| blender::fn::lazy_function::Graph::~Graph | ( | ) |
Definition at line 26 of file lazy_function_graph.cc.
References function_nodes(), and node.
| FunctionNode & blender::fn::lazy_function::Graph::add_function | ( | const LazyFunction & | fn | ) |
Add a new function node with sockets that match the passed in LazyFunction.
Definition at line 48 of file lazy_function_graph.cc.
References blender::fn::lazy_function::Socket::index_in_node_, blender::Span< T >::index_range(), blender::fn::lazy_function::Socket::is_input_, node, blender::fn::lazy_function::Socket::node_, blender::Span< T >::size(), and blender::fn::lazy_function::Socket::type_.
Referenced by blender::fn::lazy_function::tests::TEST_F(), and blender::fn::lazy_function::tests::TEST_F().
| GraphInputSocket & blender::fn::lazy_function::Graph::add_input | ( | const CPPType & | type, |
| std::string | name = "" ) |
Add inputs and outputs to the graph.
Definition at line 77 of file lazy_function_graph.cc.
References blender::fn::lazy_function::Socket::index_in_node_, blender::fn::lazy_function::Socket::is_input_, name(), blender::fn::lazy_function::Socket::node_, and blender::fn::lazy_function::Socket::type_.
Referenced by blender::fn::lazy_function::tests::TEST_F(), and blender::fn::lazy_function::tests::TEST_F().
| void blender::fn::lazy_function::Graph::add_link | ( | OutputSocket & | from, |
| InputSocket & | to ) |
Add a link between the two given sockets. This has undefined behavior when the input is linked to something else already.
Definition at line 103 of file lazy_function_graph.cc.
References blender::BLI_assert(), and blender::fn::lazy_function::Socket::type_.
Referenced by blender::fn::lazy_function::tests::TEST_F(), and blender::fn::lazy_function::tests::TEST_F().
| GraphOutputSocket & blender::fn::lazy_function::Graph::add_output | ( | const CPPType & | type, |
| std::string | name = "" ) |
Definition at line 90 of file lazy_function_graph.cc.
References blender::fn::lazy_function::Socket::index_in_node_, blender::fn::lazy_function::Socket::is_input_, name(), blender::fn::lazy_function::Socket::node_, and blender::fn::lazy_function::Socket::type_.
Referenced by blender::fn::lazy_function::tests::TEST_F().
| void blender::fn::lazy_function::Graph::clear_origin | ( | InputSocket & | socket | ) |
If the socket is linked, remove the link.
Definition at line 111 of file lazy_function_graph.cc.
|
inline |
Definition at line 520 of file FN_lazy_function_graph.hh.
References blender::Span< T >::cast(), and blender::Span< T >::drop_front().
|
inline |
Definition at line 515 of file FN_lazy_function_graph.hh.
References blender::Span< T >::cast(), and blender::Span< T >::drop_front().
Referenced by ~Graph().
|
inline |
Definition at line 525 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 535 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 530 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 540 of file FN_lazy_function_graph.hh.
|
inline |
Definition at line 500 of file FN_lazy_function_graph.hh.
Referenced by add_input(), add_output(), Graph(), and blender::fn::lazy_function::GraphExecutor::GraphExecutor().
| bool blender::fn::lazy_function::Graph::node_indices_are_valid | ( | ) | const |
Can be used to assert that update_node_indices has been called.
Definition at line 140 of file lazy_function_graph.cc.
Definition at line 510 of file FN_lazy_function_graph.hh.
Get all nodes in the graph. The index in the span corresponds to #Node::index_in_graph.
Definition at line 505 of file FN_lazy_function_graph.hh.
Referenced by blender::fn::lazy_function::generic_graph_executor::GenericGraphExecutor::preprocess_graph().
|
inline |
Number of sockets in the graph.
Definition at line 545 of file FN_lazy_function_graph.hh.
| std::string blender::fn::lazy_function::Graph::to_dot | ( | const ToDotOptions & | options = {} | ) | const |
Utility to generate a dot graph string for the graph. This can be used for debugging.
Definition at line 196 of file lazy_function_graph.cc.
References blender::dot_export::NodeWithSockets::add_input(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::dot_export::NodeWithSockets::add_output(), blender::dot_export::Node::attributes, blender::dot_export::Ellipse, blender::dot_export::NodeWithSockets::Socket::fontcolor, blender::dot_export::NodeWithSocketsRef::input(), blender::CPPType::is_printable(), blender::dot_export::LeftToRight, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::CPPType::name(), blender::dot_export::DirectedGraph::new_edge(), blender::dot_export::Graph::new_node(), node, blender::dot_export::NodeWithSockets::node_name, options, blender::dot_export::NodeWithSocketsRef::output(), blender::dot_export::Attributes::set(), blender::dot_export::Node::set_background_color(), blender::dot_export::Graph::set_rankdir(), blender::dot_export::Node::set_shape(), blender::dot_export::DirectedGraph::to_dot_string(), and blender::CPPType::to_string().
| void blender::fn::lazy_function::Graph::update_node_indices | ( | ) |
Make sure that #Node::index_in_graph is up to date.
Definition at line 119 of file lazy_function_graph.cc.
Referenced by blender::fn::lazy_function::tests::TEST_F(), and blender::fn::lazy_function::tests::TEST_F().
| void blender::fn::lazy_function::Graph::update_socket_indices | ( | ) |
Make sure that #Socket::index_in_graph is up to date.
Definition at line 126 of file lazy_function_graph.cc.