WARPXM v1.10.0
Loading...
Searching...
No Matches
WmConstOpaquePtr 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.

Points to constant payload.

Public Member Functions

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

Constructor & Destructor Documentation

◆ WmConstOpaquePtr() [1/2]

template<typename VALUETYPE >
WmConstOpaquePtr::WmConstOpaquePtr ( const VALUETYPE *  pointer)
inline

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

Parameters
pointerPointer to be stored

◆ WmConstOpaquePtr() [2/2]

WmConstOpaquePtr::WmConstOpaquePtr ( const WmOpaquePtr source)
inline

convert from WmOpaquePtr to WmConstOpaquePtr

Member Function Documentation

◆ getDataPtr()

const void * WmConstOpaquePtr::getDataPtr ( ) const
inline

◆ getType()

const WmTypeWrapper WmConstOpaquePtr::getType ( ) const
inline

◆ getTypedPointer()

template<typename VALUETYPE >
const VALUETYPE * WmConstOpaquePtr::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: