This moves all multi-function related code in the `functions` module into a new `multi_function` namespace. This is similar to how there is a `lazy_function` namespace. The main benefit of this is that many types names that were prefixed with `MF` (for "multi function") can be simplified. There is also a common shorthand for the `multi_function` namespace: `mf`. This is also similar to lazy-functions where the shortened namespace is called `lf`.
29 lines
605 B
C++
29 lines
605 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
/** \file
|
|
* \ingroup fn
|
|
*/
|
|
|
|
#include "FN_multi_function_procedure.hh"
|
|
|
|
namespace blender::fn::multi_function {
|
|
|
|
/** A multi-function that executes a procedure internally. */
|
|
class ProcedureExecutor : public MultiFunction {
|
|
private:
|
|
Signature signature_;
|
|
const Procedure &procedure_;
|
|
|
|
public:
|
|
ProcedureExecutor(const Procedure &procedure);
|
|
|
|
void call(IndexMask mask, MFParams params, Context context) const override;
|
|
|
|
private:
|
|
ExecutionHints get_execution_hints() const override;
|
|
};
|
|
|
|
} // namespace blender::fn::multi_function
|