Blender  V3.3
Public Member Functions | Protected Attributes | Friends | List of all members
blender::nodes::DSocket Class Reference

#include <NOD_derived_node_tree.hh>

Inheritance diagram for blender::nodes::DSocket:
blender::nodes::DInputSocket blender::nodes::DOutputSocket

Public Member Functions

 DSocket ()=default
 
#DSocket Inline Methods
 DSocket (const DTreeContext *context, const SocketRef *socket)
 
 DSocket (const DInputSocket &input_socket)
 
 DSocket (const DOutputSocket &output_socket)
 
const DTreeContextcontext () const
 
const SocketRefsocket_ref () const
 
const SocketRefoperator-> () const
 
 operator bool () const
 
uint64_t hash () const
 
DNode node () const
 

Protected Attributes

const DTreeContextcontext_ = nullptr
 
const SocketRefsocket_ref_ = nullptr
 

Friends

bool operator== (const DSocket &a, const DSocket &b)
 
bool operator!= (const DSocket &a, const DSocket &b)
 

Detailed Description

A (nullable) reference to a socket and the context it is in. It is unique within an entire nested node group hierarchy. This type is small and can be passed around by value.

A DSocket can represent an input or an output socket. If the type of a socket is known at compile time is preferable to use #DInputSocket or #DOutputSocket instead.

Definition at line 98 of file NOD_derived_node_tree.hh.

Constructor & Destructor Documentation

◆ DSocket() [1/4]

blender::nodes::DSocket::DSocket ( )
default

◆ DSocket() [2/4]

blender::nodes::DSocket::DSocket ( const DTreeContext context,
const SocketRef socket 
)
inline

◆ DSocket() [3/4]

blender::nodes::DSocket::DSocket ( const DInputSocket input_socket)
inline

Definition at line 340 of file NOD_derived_node_tree.hh.

◆ DSocket() [4/4]

blender::nodes::DSocket::DSocket ( const DOutputSocket output_socket)
inline

Definition at line 345 of file NOD_derived_node_tree.hh.

Member Function Documentation

◆ context()

const DTreeContext * blender::nodes::DSocket::context ( ) const
inline

Definition at line 350 of file NOD_derived_node_tree.hh.

References context_.

Referenced by DSocket().

◆ hash()

uint64_t blender::nodes::DSocket::hash ( ) const
inline

Definition at line 380 of file NOD_derived_node_tree.hh.

References context_, blender::get_default_hash_2(), and socket_ref_.

◆ node()

DNode blender::nodes::DSocket::node ( ) const
inline

◆ operator bool()

blender::nodes::DSocket::operator bool ( ) const
inline

Definition at line 370 of file NOD_derived_node_tree.hh.

◆ operator->()

const SocketRef * blender::nodes::DSocket::operator-> ( ) const
inline

Definition at line 375 of file NOD_derived_node_tree.hh.

References socket_ref_.

◆ socket_ref()

const SocketRef * blender::nodes::DSocket::socket_ref ( ) const
inline

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const DSocket a,
const DSocket b 
)
friend

Definition at line 365 of file NOD_derived_node_tree.hh.

◆ operator==

bool operator== ( const DSocket a,
const DSocket b 
)
friend

Definition at line 360 of file NOD_derived_node_tree.hh.

Member Data Documentation

◆ context_

const DTreeContext* blender::nodes::DSocket::context_ = nullptr
protected

◆ socket_ref_

const SocketRef* blender::nodes::DSocket::socket_ref_ = nullptr
protected

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