Blender V4.3
GHOST_C_CustomDataWrapper Struct Reference

#include <GHOST_Util.hh>

Public Types

using FreeFn = std::function<void(void *)>
 

Public Member Functions

 GHOST_C_CustomDataWrapper (void *custom_data, FreeFn free_fn)
 
 ~GHOST_C_CustomDataWrapper ()
 

Public Attributes

void * custom_data_
 
FreeFn free_fn_
 

Detailed Description

RAII wrapper for typical C void * custom data. Used for exception safe custom-data handling during constructor calls.

Definition at line 17 of file GHOST_Util.hh.

Member Typedef Documentation

◆ FreeFn

using GHOST_C_CustomDataWrapper::FreeFn = std::function<void(void *)>

Definition at line 18 of file GHOST_Util.hh.

Constructor & Destructor Documentation

◆ GHOST_C_CustomDataWrapper()

GHOST_C_CustomDataWrapper::GHOST_C_CustomDataWrapper ( void * custom_data,
FreeFn free_fn )
inline

Definition at line 23 of file GHOST_Util.hh.

◆ ~GHOST_C_CustomDataWrapper()

GHOST_C_CustomDataWrapper::~GHOST_C_CustomDataWrapper ( )
inline

Definition at line 27 of file GHOST_Util.hh.

References custom_data_, and free_fn_.

Member Data Documentation

◆ custom_data_

void* GHOST_C_CustomDataWrapper::custom_data_

Definition at line 20 of file GHOST_Util.hh.

Referenced by ~GHOST_C_CustomDataWrapper().

◆ free_fn_

FreeFn GHOST_C_CustomDataWrapper::free_fn_

Definition at line 21 of file GHOST_Util.hh.

Referenced by ~GHOST_C_CustomDataWrapper().


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