WARPXM v1.10.0
Loading...
Searching...
No Matches
WmOpaquePtr Class Reference

Opaque Pointer object that carries the referenced data type, but does not expose this payload type as part of the pointer type. More...

#include <wmopaqueptr.h>

Detailed Description

Opaque Pointer object that carries the referenced data type, but does not expose this payload type as part of the pointer type.

Public Member Functions

template<typename VALUETYPE >
 WmOpaquePtr (VALUETYPE *pointer)
 Create new opaque pointer from a pointer of a given type.
 
const WmTypeWrapper getType () const
 
void * getDataPtr () const
 
template<typename VALUETYPE >
VALUETYPE * getTypedPointer () const
 Extract the typed pointer from the opaque pointer.
 

Constructor & Destructor Documentation

◆ WmOpaquePtr()

template<typename VALUETYPE >
WmOpaquePtr::WmOpaquePtr ( VALUETYPE *  pointer)
inline

Create new opaque pointer from a pointer of a given type.

Parameters
pointerPointer to be stored

Member Function Documentation

◆ getDataPtr()

void * WmOpaquePtr::getDataPtr ( ) const
inline

◆ getType()

const WmTypeWrapper WmOpaquePtr::getType ( ) const
inline

◆ getTypedPointer()

template<typename VALUETYPE >
VALUETYPE * WmOpaquePtr::getTypedPointer ( ) const
inline

Extract the typed pointer from the opaque pointer.

If the type specified by the template 'VALUETYPE' is not the correct type of the pointer stored, a std::bad_cast exception is thrown.


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