XRTraits C++ OpenXR Utilities
|
#include <InitXrType.h>
Public Types | |
using | xr_type = T |
The OpenXR structure type. More... | |
using | const_xr_type = std::add_const_t< T > |
The OpenXR structure type (const). More... | |
Public Member Functions | |
constexpr xr_type * | get () noexcept |
Get pointer to OpenXR type. More... | |
constexpr const_xr_type * | get () const noexcept |
Get pointer to OpenXR type (const overload). More... | |
void | type () const =delete |
void | next () const =delete |
constexpr | Initialized () noexcept |
Default constructor - initializes OpenXR struct's type member. More... | |
template<typename U , typename... Args> | |
constexpr | Initialized (Initialized< U > const &nextStruct, Args... a) noexcept |
template<typename U , typename... Args> | |
constexpr | Initialized (Initialized< U > &nextStruct, Args... a) noexcept |
template<typename A1 , typename... Args, typename = std::enable_if_t<!detail::is_chainable_struct_v<A1>>> | |
constexpr | Initialized (A1 &&a1, Args... a) noexcept |
constexpr | Initialized (Initialized &&) noexcept=default |
constexpr | Initialized (Initialized const &)=delete |
constexpr Initialized & | operator= (Initialized const &)=delete |
constexpr Initialized & | operator= (Initialized &&)=delete |
Wrapper for stack-allocated OpenXR tagged structs that auto-initializes the type member correctly.
Inherits from the type parameter, so this object is the same size as the OpenXR struct and exposes the same members, etc...
T | an OpenXR tagged type with known type tag. |
using xrtraits::Initialized< T >::const_xr_type = std::add_const_t<T> |
The OpenXR structure type (const).
using xrtraits::Initialized< T >::xr_type = T |
The OpenXR structure type.
|
inlinenoexcept |
Default constructor - initializes OpenXR struct's type member.
|
inlineexplicitnoexcept |
Constructor to reference a chained struct (passed as Initialized<U>).
Initializes OpenXR struct's type member, and the next member to the given structure's address. Any additional parameters are forwarded as member initializers to the underlying struct.
References xrtraits::is_same_v.
|
inlineexplicitnoexcept |
Constructor to reference a possibly non-const chained struct (passed as Initialized<U>).
Initializes OpenXR struct's type member, and the next member to the given structure's address. Any additional parameters are forwarded as member initializers to the underlying struct.
References xrtraits::is_same_v.
|
inlineexplicitnoexcept |
Constructor that forwards initializers and has no chained struct.
Initializes OpenXR struct's type member, and forwards the rest of the arguments on as initializers.
|
defaultnoexcept |
Default move-constructor - mainly for assignment-style initialization.
|
inlinenoexcept |
Get pointer to OpenXR type.
|
inlinenoexcept |
Get pointer to OpenXR type (const overload).
|
delete |
Can't access the underlying struct's next member by design.
Naming this here and explicitly deleting it makes it harder to accidentally mess up an OpenXR struct's next
member (unless you really try hard). If you get an error on this line, it's because you're trying to manually look at or modify type, which shouldn't be done.
|
delete |
Can't access the underlying struct's type member by design.
Naming this here and explicitly deleting it makes it harder to accidentally mess up an OpenXR struct's type
member (unless you really try hard). If you get an error on this line, it's because you're trying to manually look at or modify type, which shouldn't be done.