Blender V5.0
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
 operator bool () 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 18 of file BLI_generic_pointer.hh.

Constructor & Destructor Documentation

◆ GMutablePointer() [1/4]

blender::GMutablePointer::GMutablePointer ( )
default

Referenced by GMutablePointer(), and GMutablePointer().

◆ GMutablePointer() [2/4]

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

Definition at line 26 of file BLI_generic_pointer.hh.

References BLI_assert, data, and type().

◆ GMutablePointer() [3/4]

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

Definition at line 32 of file BLI_generic_pointer.hh.

References data, GMutablePointer(), and type().

◆ GMutablePointer() [4/4]

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

Definition at line 35 of file BLI_generic_pointer.hh.

References data, get(), GMutablePointer(), and T.

Member Function Documentation

◆ destruct()

void blender::GMutablePointer::destruct ( )
inline

Definition at line 75 of file BLI_generic_pointer.hh.

References BLI_assert.

◆ get() [1/2]

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

Definition at line 54 of file BLI_generic_pointer.hh.

References BLI_assert, is_type(), and T.

◆ get() [2/2]

◆ is_type()

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

Definition at line 60 of file BLI_generic_pointer.hh.

References T.

Referenced by get(), blender::GValueMap< Key >::lookup(), and relocate_out().

◆ operator bool()

blender::GMutablePointer::operator bool ( ) const
inline

Definition at line 49 of file BLI_generic_pointer.hh.

◆ relocate_out()

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

Definition at line 65 of file BLI_generic_pointer.hh.

References BLI_assert, is_type(), and T.

◆ type()


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