|
Monado OpenXR Runtime
|
Helper wrapper for xrt_device, Monado has C style inheritance where the first field is the base class. More...
#include <glue/g_device.hpp>
Public Member Functions | |
| DeviceBase () noexcept | |
| Fully resets and sets function pointers on xrt_device. More... | |
| ~DeviceBase () noexcept=default | |
| Destructor. More... | |
| const T & | derived () const noexcept |
| T & | derived () noexcept |
| const xrt_device * | getXDev () const noexcept |
| Gets the underlying xrt_device pointer. More... | |
| xrt_device * | getXDev () noexcept |
| Gets the underlying xrt_device pointer. More... | |
Static Public Member Functions | |
| static const T * | fromXDev (const xrt_device *xdev) noexcept |
| Gets the pointer to the derived class from a xrt_device. More... | |
| static T * | fromXDev (xrt_device *xdev) noexcept |
| Gets the pointer to the derived class from a xrt_device. More... | |
Helper wrapper for xrt_device, Monado has C style inheritance where the first field is the base class.
In order to safely cast the from the parent to the child class it needs to have a standard layout, it is very easy to not have that. So this class, which has standard layout, goes via itself to then using a static_cast to go to the derived class.
|
inlinenoexcept |
Fully resets and sets function pointers on xrt_device.
References xrt::util::DeviceBase< T, functions >::getXDev(), and u_device_populate_function_pointers().
|
defaultnoexcept |
Destructor.
|
inlinestaticnoexcept |
Gets the pointer to the derived class from a xrt_device.
|
inlinestaticnoexcept |
Gets the pointer to the derived class from a xrt_device.
|
inlinenoexcept |
Gets the underlying xrt_device pointer.
Referenced by xrt::util::DeviceBase< T, functions >::DeviceBase().
|
inlinenoexcept |
Gets the underlying xrt_device pointer.