VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch > Class Template Reference

`#include <vulkan.hpp>`

Inheritance diagram for VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >:
[legend]
Collaboration diagram for VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >:
[legend]

## Public Member Functions

| UniqueHandle (Type const &value=Type(), Deleter const &deleter=Deleter())
| UniqueHandle (UniqueHandle const &)=delete
| UniqueHandle (UniqueHandle &&other)
| ~UniqueHandle ()
UniqueHandle & | operator= (UniqueHandle const &)=delete
UniqueHandle & | operator= (UniqueHandle &&other)
| operator bool () const
Type const * | operator-> () const
Type * | operator-> ()
Type const & | operator* () const
Type & | operator* ()
const Type & | get () const
Type & | get ()
void | reset (Type const &value=Type())
Type | release ()
void | swap (UniqueHandle< Type, Dispatch > &rhs)

## Private Types

using | Deleter = typename UniqueHandleTraits< Type, Dispatch >::deleter

## Private Attributes

Type | m_value

## Detailed Description

### template<typename Type, typename Dispatch>
class VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >

Definition at line 382 of file vulkan.hpp.

## Member Typedef Documentation

## Deleter

template<typename Type , typename Dispatch >

using VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::Deleter = typename UniqueHandleTraits<Type,Dispatch>::deleter

private

Definition at line 385 of file vulkan.hpp.

## Constructor & Destructor Documentation

## UniqueHandle() [1/3]

template<typename Type , typename Dispatch >

VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::UniqueHandle | ( | Type const & | value = `Type()`,
|  | Deleter const & | deleter = `Deleter()`
| ) |  |

inline explicit

Definition at line 387 of file vulkan.hpp.

: Deleter( deleter)
, m_value( value )
{}

## UniqueHandle() [2/3]

template<typename Type , typename Dispatch >

VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::UniqueHandle | ( | UniqueHandle< Type, Dispatch > const & |  | ) |

delete

## UniqueHandle() [3/3]

template<typename Type , typename Dispatch >

VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::UniqueHandle | ( | UniqueHandle< Type, Dispatch > && | other | ) |

inline

Definition at line 394 of file vulkan.hpp.

: Deleter( std::move( static_cast<Deleter&>( other ) ) )
, m_value( other.release() )
{}

## ~UniqueHandle()

template<typename Type , typename Dispatch >

VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::~UniqueHandle | ( |  | ) |

inline

Definition at line 399 of file vulkan.hpp.

{
if ( m_value ) this->destroy( m_value );
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## Member Function Documentation

## get() [1/2]

template<typename Type , typename Dispatch >

Type& VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::get | ( |  | ) |

inline

Definition at line 443 of file vulkan.hpp.

{
return m_value;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## get() [2/2]

template<typename Type , typename Dispatch >

const Type& VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::get | ( |  | ) | const

inline

Definition at line 438 of file vulkan.hpp.

{
return m_value;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## operator bool()

template<typename Type , typename Dispatch >

VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator bool | ( |  | ) | const

inline explicit

Definition at line 413 of file vulkan.hpp.

{
return m_value.operator bool();
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## operator*() [1/2]

template<typename Type , typename Dispatch >

Type& VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator* | ( |  | ) |

inline

Definition at line 433 of file vulkan.hpp.

{
return m_value;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## operator*() [2/2]

template<typename Type , typename Dispatch >

Type const& VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator* | ( |  | ) | const

inline

Definition at line 428 of file vulkan.hpp.

{
return m_value;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## operator->() [1/2]

template<typename Type , typename Dispatch >

Type* VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator-> | ( |  | ) |

inline

Definition at line 423 of file vulkan.hpp.

{
return &m_value;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## operator->() [2/2]

template<typename Type , typename Dispatch >

Type const* VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator-> | ( |  | ) | const

inline

Definition at line 418 of file vulkan.hpp.

{
return &m_value;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## operator=() [1/2]

template<typename Type , typename Dispatch >

UniqueHandle& VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator= | ( | UniqueHandle< Type, Dispatch > && | other | ) |

inline

Definition at line 406 of file vulkan.hpp.

{
reset( other.release() );
*static_cast<Deleter*>(this) = std::move( static_cast<Deleter&>(other) );
return *this;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::reset().

## operator=() [2/2]

template<typename Type , typename Dispatch >

UniqueHandle& VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator= | ( | UniqueHandle< Type, Dispatch > const & |  | ) |

delete

## release()

template<typename Type , typename Dispatch >

Type VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::release | ( |  | ) |

inline

Definition at line 457 of file vulkan.hpp.

{
Type value = m_value;
m_value = nullptr;
return value;
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

## reset()

template<typename Type , typename Dispatch >

void VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::reset | ( | Type const & | value = `Type()` | ) |

inline

Definition at line 448 of file vulkan.hpp.

{
if ( m_value != value )
{
if ( m_value ) this->destroy( m_value );
m_value = value;
}
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value.

Referenced by VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator=().

## swap()

template<typename Type , typename Dispatch >

void VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::swap | ( | UniqueHandle< Type, Dispatch > & | rhs | ) |

inline

Definition at line 464 of file vulkan.hpp.

{
std::swap(m_value, rhs.m_value);
std::swap(static_cast<Deleter&>(*this), static_cast<Deleter&>(rhs));
}

References VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value, and VULKAN_HPP_NAMESPACE::swap().

Referenced by VULKAN_HPP_NAMESPACE::swap().

## Field Documentation

## m_value

template<typename Type , typename Dispatch >

Type VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::m_value

private

Definition at line 471 of file vulkan.hpp.

Referenced by VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::get(), VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator bool(), VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator*(), VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::operator->(), VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::release(), VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::reset(), VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::swap(), and VULKAN_HPP_NAMESPACE::UniqueHandle< Type, Dispatch >::~UniqueHandle().

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

- src/video/khronos/vulkan/vulkan.hpp

VULKAN_HPP_NAMESPACE::UniqueHandle::m_value
Type m_value
Definition: vulkan.hpp:471
Type
Type
Definition: SDL_windowsjoystick_c.h:46
VULKAN_HPP_NAMESPACE::UniqueHandle::reset
void reset(Type const &value=Type())
Definition: vulkan.hpp:448
VULKAN_HPP_NAMESPACE::swap
VULKAN_HPP_INLINE void swap(UniqueHandle< Type, Dispatch > &lhs, UniqueHandle< Type, Dispatch > &rhs)
Definition: vulkan.hpp:475
value
GLsizei const GLfloat * value
Definition: SDL_opengl_glext.h:698
VULKAN_HPP_NAMESPACE::UniqueHandle::Deleter
typename UniqueHandleTraits< Type, Dispatch >::deleter Deleter
Definition: vulkan.hpp:385