Blender V4.3
blender::fn::lazy_function::Node Class Reference

#include <FN_lazy_function_graph.hh>

Inherits blender::NonCopyable, and blender::NonMovable.

Inherited by blender::fn::lazy_function::FunctionNode, and blender::fn::lazy_function::InterfaceNode.

Public Member Functions

std::string name () const
 
#Node Inline Methods
bool is_interface () const
 
bool is_function () const
 
int index_in_graph () const
 
Span< const InputSocket * > inputs () const
 
Span< const OutputSocket * > outputs () const
 
Span< InputSocket * > inputs ()
 
Span< OutputSocket * > outputs ()
 
const InputSocketinput (int index) const
 
const OutputSocketoutput (int index) const
 
InputSocketinput (int index)
 
OutputSocketoutput (int index)
 

Protected Attributes

const LazyFunctionfn_ = nullptr
 
Span< InputSocket * > inputs_
 
Span< OutputSocket * > outputs_
 
int index_in_graph_ = -1
 
friend Graph
 

Detailed Description

A Node has input and output sockets. Every node is either a #FunctionNode or an #InterfaceNode.

Definition at line 131 of file FN_lazy_function_graph.hh.

Member Function Documentation

◆ index_in_graph()

int Node::index_in_graph ( ) const
inline

Definition at line 435 of file FN_lazy_function_graph.hh.

References index_in_graph_.

◆ input() [1/2]

InputSocket & Node::input ( int index)
inline

Definition at line 470 of file FN_lazy_function_graph.hh.

References inputs_.

◆ input() [2/2]

◆ inputs() [1/2]

Span< InputSocket * > Node::inputs ( )
inline

Definition at line 450 of file FN_lazy_function_graph.hh.

References inputs_.

◆ inputs() [2/2]

Span< const InputSocket * > Node::inputs ( ) const
inline

Definition at line 440 of file FN_lazy_function_graph.hh.

References inputs_.

◆ is_function()

bool Node::is_function ( ) const
inline

Definition at line 430 of file FN_lazy_function_graph.hh.

References fn_.

Referenced by name(), and blender::fn::lazy_function::Socket::name().

◆ is_interface()

bool Node::is_interface ( ) const
inline

Definition at line 425 of file FN_lazy_function_graph.hh.

References fn_.

Referenced by blender::fn::lazy_function::GraphExecutor::GraphExecutor().

◆ name()

◆ output() [1/2]

OutputSocket & Node::output ( int index)
inline

Definition at line 475 of file FN_lazy_function_graph.hh.

References outputs_.

◆ output() [2/2]

◆ outputs() [1/2]

Span< OutputSocket * > Node::outputs ( )
inline

Definition at line 455 of file FN_lazy_function_graph.hh.

References outputs_.

◆ outputs() [2/2]

Span< const OutputSocket * > Node::outputs ( ) const
inline

Definition at line 445 of file FN_lazy_function_graph.hh.

References outputs_.

Member Data Documentation

◆ fn_

const LazyFunction* blender::fn::lazy_function::Node::fn_ = nullptr
protected

The function this node corresponds to. If this is null, the node is an #InterfaceNode. The function is not owned by this Node nor by the Graph.

Definition at line 137 of file FN_lazy_function_graph.hh.

Referenced by blender::fn::lazy_function::FunctionNode::function(), is_function(), is_interface(), and name().

◆ Graph

friend blender::fn::lazy_function::Node::Graph
protected

Definition at line 154 of file FN_lazy_function_graph.hh.

◆ index_in_graph_

int blender::fn::lazy_function::Node::index_in_graph_ = -1
protected

An index that is set when calling Graph::update_node_indices. This can be used to create efficient mappings from nodes to other data using just an array instead of a hash map.

This is technically not necessary but has better performance than always using hash maps.

Definition at line 152 of file FN_lazy_function_graph.hh.

Referenced by index_in_graph().

◆ inputs_

Span<InputSocket *> blender::fn::lazy_function::Node::inputs_
protected

Input sockets of the node.

Definition at line 141 of file FN_lazy_function_graph.hh.

Referenced by blender::fn::lazy_function::Graph::add_output(), input(), input(), inputs(), and inputs().

◆ outputs_

Span<OutputSocket *> blender::fn::lazy_function::Node::outputs_
protected

Output sockets of the node.

Definition at line 145 of file FN_lazy_function_graph.hh.

Referenced by blender::fn::lazy_function::Graph::add_input(), output(), output(), outputs(), and outputs().


The documentation for this class was generated from the following files: