Blender V4.3
BLI_cpp_types_make.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
8#include "BLI_cpp_types.hh"
9
10namespace blender {
11
12template<typename ValueType>
14 : self(CPPType::get<Vector<ValueType>>()), value(CPPType::get<ValueType>())
15{
16 this->register_self();
17}
18
19} // namespace blender
20
22#define BLI_VECTOR_CPP_TYPE_MAKE(VALUE_TYPE) \
23 BLI_CPP_TYPE_MAKE(blender::Vector<VALUE_TYPE>, CPPTypeFlags::None) \
24 template<> const blender::VectorCPPType &blender::VectorCPPType::get_impl<VALUE_TYPE>() \
25 { \
26 static blender::VectorCPPType type{blender::TypeTag<VALUE_TYPE>{}}; \
27 return type; \
28 }
29
31#define BLI_VECTOR_CPP_TYPE_REGISTER(VALUE_TYPE) blender::VectorCPPType::get<VALUE_TYPE>()
PyObject * self
VectorCPPType(TypeTag< ValueType >)