Blender
V3.3
intern
ghost
intern
GHOST_Util.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
7
#pragma once
8
9
#include <functional>
10
15
struct
GHOST_C_CustomDataWrapper
{
16
using
FreeFn
= std::function<
void
(
void
*)>;
17
18
void
*
custom_data_
;
19
FreeFn
free_fn_
;
20
21
GHOST_C_CustomDataWrapper
(
void
*custom_data,
FreeFn
free_fn)
22
:
custom_data_
(custom_data),
free_fn_
(free_fn)
23
{
24
}
25
~GHOST_C_CustomDataWrapper
()
26
{
27
if
(
free_fn_
!=
nullptr
&&
custom_data_
!=
nullptr
) {
28
free_fn_
(
custom_data_
);
29
}
30
}
31
};
void
SyclQueue void void size_t num_bytes void
Definition:
dll_interface_template.h:38
GHOST_C_CustomDataWrapper
Definition:
GHOST_Util.h:15
GHOST_C_CustomDataWrapper::custom_data_
void * custom_data_
Definition:
GHOST_Util.h:18
GHOST_C_CustomDataWrapper::FreeFn
std::function< void(void *)> FreeFn
Definition:
GHOST_Util.h:16
GHOST_C_CustomDataWrapper::GHOST_C_CustomDataWrapper
GHOST_C_CustomDataWrapper(void *custom_data, FreeFn free_fn)
Definition:
GHOST_Util.h:21
GHOST_C_CustomDataWrapper::~GHOST_C_CustomDataWrapper
~GHOST_C_CustomDataWrapper()
Definition:
GHOST_Util.h:25
GHOST_C_CustomDataWrapper::free_fn_
FreeFn free_fn_
Definition:
GHOST_Util.h:19
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1