Blender V4.3
blender::GPointer Class Reference

#include <BLI_generic_pointer.hh>

Public Member Functions

 GPointer ()=default
 
 GPointer (GMutablePointer ptr)
 
 GPointer (const CPPType *type, const void *data=nullptr)
 
 GPointer (const CPPType &type, const void *data=nullptr)
 
template<typename T >
 GPointer (T *data)
 
const void * get () const
 
const CPPTypetype () const
 
template<typename T >
const Tget () const
 
template<typename T >
bool is_type () const
 

Detailed Description

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

Definition at line 76 of file BLI_generic_pointer.hh.

Constructor & Destructor Documentation

◆ GPointer() [1/5]

blender::GPointer::GPointer ( )
default

◆ GPointer() [2/5]

blender::GPointer::GPointer ( GMutablePointer ptr)
inline

Definition at line 84 of file BLI_generic_pointer.hh.

◆ GPointer() [3/5]

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

Definition at line 86 of file BLI_generic_pointer.hh.

References BLI_assert.

◆ GPointer() [4/5]

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

Definition at line 92 of file BLI_generic_pointer.hh.

◆ GPointer() [5/5]

template<typename T >
blender::GPointer::GPointer ( T * data)
inline

Definition at line 94 of file BLI_generic_pointer.hh.

Member Function Documentation

◆ get() [1/2]

◆ get() [2/2]

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

Definition at line 106 of file BLI_generic_pointer.hh.

References BLI_assert, and is_type().

◆ is_type()

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

Definition at line 112 of file BLI_generic_pointer.hh.

References blender::CPPType::is().

Referenced by get().

◆ type()

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

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