Blender  V2.93
Public Member Functions | Static Public Member Functions | List of all members
blender::fn::CustomMF_SI_SO< In1, Out1 > Class Template Reference

#include <FN_multi_function_builder.hh>

Inherits blender::fn::MultiFunction.

Public Member Functions

 CustomMF_SI_SO (StringRef name, FunctionT function)
 
template<typename ElementFuncT >
 CustomMF_SI_SO (StringRef name, ElementFuncT element_fn)
 
void call (IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
 
- Public Member Functions inherited from blender::fn::MultiFunction
virtual ~MultiFunction ()
 
virtual void call (IndexMask mask, MFParams params, MFContext context) const =0
 
virtual uint64_t hash () const
 
virtual bool equals (const MultiFunction &UNUSED(other)) const
 
int param_amount () const
 
IndexRange param_indices () const
 
MFParamType param_type (int param_index) const
 
StringRefNull param_name (int param_index) const
 
StringRefNull name () const
 
bool depends_on_context () const
 
const MFSignaturesignature () const
 

Static Public Member Functions

template<typename ElementFuncT >
static FunctionT create_function (ElementFuncT element_fn)
 

Additional Inherited Members

- Protected Member Functions inherited from blender::fn::MultiFunction
void set_signature (const MFSignature *signature)
 

Detailed Description

template<typename In1, typename Out1>
class blender::fn::CustomMF_SI_SO< In1, Out1 >

Generates a multi-function with the following parameters:

  1. single input (SI) of type In1
  2. single output (SO) of type Out1

This example creates a function that adds 10 to the incoming values: CustomMF_SI_SO<int, int> fn("add 10", [](int value) { return value + 10; });

Definition at line 39 of file FN_multi_function_builder.hh.

Constructor & Destructor Documentation

◆ CustomMF_SI_SO() [1/2]

template<typename In1 , typename Out1 >
blender::fn::CustomMF_SI_SO< In1, Out1 >::CustomMF_SI_SO ( StringRef  name,
FunctionT  function 
)
inline

◆ CustomMF_SI_SO() [2/2]

template<typename In1 , typename Out1 >
template<typename ElementFuncT >
blender::fn::CustomMF_SI_SO< In1, Out1 >::CustomMF_SI_SO ( StringRef  name,
ElementFuncT  element_fn 
)
inline

Definition at line 56 of file FN_multi_function_builder.hh.

Member Function Documentation

◆ call()

template<typename In1 , typename Out1 >
void blender::fn::CustomMF_SI_SO< In1, Out1 >::call ( IndexMask  mask,
MFParams  params,
MFContext   UNUSEDcontext 
) const
inlineoverride

Definition at line 72 of file FN_multi_function_builder.hh.

References mask(), and params.

◆ create_function()

template<typename In1 , typename Out1 >
template<typename ElementFuncT >
static FunctionT blender::fn::CustomMF_SI_SO< In1, Out1 >::create_function ( ElementFuncT  element_fn)
inlinestatic

Definition at line 61 of file FN_multi_function_builder.hh.

References blender::devirtualize_varray(), and mask().


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