Blender V5.0
FN_multi_function_context.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
16
17#include "FN_user_data.hh"
18
20
21class Context;
22class ContextBuilder;
23
24class Context {
25 public:
29 UserData *user_data = nullptr;
30
32
33 private:
34 Context() = default;
35
36 public:
37 Context(ContextBuilder & /*builder*/);
38};
39
41 private:
42 Context context_;
43
44 friend Context;
45
46 public:
48 {
49 context_.user_data = user_data;
50 }
51};
52
53inline Context::Context(ContextBuilder &builder)
54{
55 *this = builder.context_;
56}
57
58} // namespace blender::fn::multi_function