uvw 2.12.1
Loading...
Searching...
No Matches
uvw::UnderlyingType< T, U > Class Template Reference

Wrapper class for underlying types. More...

#include <underlying_type.hpp>

Inheritance diagram for uvw::UnderlyingType< T, U >:

Public Member Functions

Looploop () const noexcept
 Gets the loop from which the resource was originated.
 
const U * raw () const noexcept
 Gets the underlying raw data structure.
 
U * raw () noexcept
 Gets the underlying raw data structure.
 

Static Public Member Functions

template<typename... Args>
static std::shared_ptr< T > create (Args &&...args)
 Creates a new resource of the given type.
 

Detailed Description

template<typename T, typename U>
class uvw::UnderlyingType< T, U >

Wrapper class for underlying types.

It acts mainly as a wrapper around data structures of the underlying library.

Definition at line 17 of file underlying_type.hpp.

Member Function Documentation

◆ create()

template<typename T , typename U >
template<typename... Args>
static std::shared_ptr< T > uvw::UnderlyingType< T, U >::create ( Args &&... args)
inlinestatic

Creates a new resource of the given type.

Parameters
argsArguments to be forwarded to the actual constructor (if any).
Returns
A pointer to the newly created resource.

Definition at line 61 of file underlying_type.hpp.

◆ loop()

template<typename T , typename U >
Loop & uvw::UnderlyingType< T, U >::loop ( ) const
inlinenoexcept

Gets the loop from which the resource was originated.

Returns
A reference to a loop instance.

Definition at line 69 of file underlying_type.hpp.

◆ raw() [1/2]

template<typename T , typename U >
const U * uvw::UnderlyingType< T, U >::raw ( ) const
inlinenoexcept

Gets the underlying raw data structure.

This function should not be used, unless you know exactly what you are doing and what are the risks.
Going raw is dangerous, mainly because the lifetime management of a loop, a handle or a request is in charge to the library itself and users should not work around it.

Warning
Use this function at your own risk, but do not expect any support in case of bugs.
Returns
The underlying raw data structure.

Definition at line 88 of file underlying_type.hpp.

◆ raw() [2/2]

template<typename T , typename U >
U * uvw::UnderlyingType< T, U >::raw ( )
inlinenoexcept

Gets the underlying raw data structure.

This function should not be used, unless you know exactly what you are doing and what are the risks.
Going raw is dangerous, mainly because the lifetime management of a loop, a handle or a request is in charge to the library itself and users should not work around it.

Warning
Use this function at your own risk, but do not expect any support in case of bugs.
Returns
The underlying raw data structure.

Definition at line 107 of file underlying_type.hpp.


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