Blender V4.5
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)
 
 operator bool () const
 
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 85 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 93 of file BLI_generic_pointer.hh.

◆ GPointer() [3/5]

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

Definition at line 95 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 101 of file BLI_generic_pointer.hh.

◆ GPointer() [5/5]

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

Definition at line 103 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 120 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 126 of file BLI_generic_pointer.hh.

References blender::CPPType::is().

Referenced by get().

◆ operator bool()

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

Definition at line 105 of file BLI_generic_pointer.hh.

◆ type()


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