Blender V4.3
blender::GMutablePointer Class Reference

#include <BLI_generic_pointer.hh>

Public Member Functions

 GMutablePointer ()=default
 
 GMutablePointer (const CPPType *type, void *data=nullptr)
 
 GMutablePointer (const CPPType &type, void *data=nullptr)
 
template<typename T , BLI_ENABLE_IF(!std::is_void_v< T >) >
 GMutablePointer (T *data)
 
void * get () const
 
const CPPTypetype () const
 
template<typename T >
Tget () const
 
template<typename T >
bool is_type () const
 
template<typename T >
T relocate_out ()
 
void destruct ()
 

Detailed Description

A generic non-const pointer whose type is only known at runtime.

Definition at line 14 of file BLI_generic_pointer.hh.

Constructor & Destructor Documentation

◆ GMutablePointer() [1/4]

blender::GMutablePointer::GMutablePointer ( )
default

◆ GMutablePointer() [2/4]

blender::GMutablePointer::GMutablePointer ( const CPPType * type,
void * data = nullptr )
inline

Definition at line 22 of file BLI_generic_pointer.hh.

References BLI_assert.

◆ GMutablePointer() [3/4]

blender::GMutablePointer::GMutablePointer ( const CPPType & type,
void * data = nullptr )
inline

Definition at line 28 of file BLI_generic_pointer.hh.

◆ GMutablePointer() [4/4]

template<typename T , BLI_ENABLE_IF(!std::is_void_v< T >) >
blender::GMutablePointer::GMutablePointer ( T * data)
inline

Definition at line 31 of file BLI_generic_pointer.hh.

Member Function Documentation

◆ destruct()

void blender::GMutablePointer::destruct ( )
inline

Definition at line 66 of file BLI_generic_pointer.hh.

References BLI_assert, and blender::CPPType::destruct().

◆ get() [1/2]

void * blender::GMutablePointer::get ( ) const
inline

◆ get() [2/2]

template<typename T >
T * blender::GMutablePointer::get ( ) const
inline

Definition at line 45 of file BLI_generic_pointer.hh.

References BLI_assert, and is_type().

◆ is_type()

template<typename T >
bool blender::GMutablePointer::is_type ( ) const
inline

Definition at line 51 of file BLI_generic_pointer.hh.

References blender::CPPType::is().

Referenced by get(), and relocate_out().

◆ relocate_out()

template<typename T >
T blender::GMutablePointer::relocate_out ( )
inline

Definition at line 56 of file BLI_generic_pointer.hh.

References BLI_assert, is_type(), and blender::CPPType::relocate_assign().

◆ type()

const CPPType * blender::GMutablePointer::type ( ) const
inline

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