mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Introduce default constructors for UniqueHandle, ObjectDestroy, and ObjectFree (#446)
This commit is contained in:
parent
f2058303cb
commit
07edfc45d6
@ -4589,7 +4589,13 @@ int main( int argc, char **argv )
|
||||
class ObjectDestroy
|
||||
{
|
||||
public:
|
||||
ObjectDestroy( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
|
||||
ObjectDestroy()
|
||||
: m_owner()
|
||||
, m_allocationCallbacks( nullptr )
|
||||
, m_dispatch( nullptr )
|
||||
{}
|
||||
|
||||
ObjectDestroy( OwnerType owner, Optional<const AllocationCallbacks> allocationCallbacks, Dispatch const &dispatch ) VULKAN_HPP_NOEXCEPT
|
||||
: m_owner( owner )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
, m_dispatch( &dispatch )
|
||||
@ -4602,6 +4608,7 @@ int main( int argc, char **argv )
|
||||
template <typename T>
|
||||
void destroy(T t) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( m_owner && m_dispatch );
|
||||
m_owner.destroy( t, m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
@ -4617,6 +4624,11 @@ int main( int argc, char **argv )
|
||||
class ObjectDestroy<NoParent,Dispatch>
|
||||
{
|
||||
public:
|
||||
ObjectDestroy()
|
||||
: m_allocationCallbacks( nullptr )
|
||||
, m_dispatch( nullptr )
|
||||
{}
|
||||
|
||||
ObjectDestroy( Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
|
||||
: m_allocationCallbacks( allocationCallbacks )
|
||||
, m_dispatch( &dispatch )
|
||||
@ -4628,6 +4640,7 @@ int main( int argc, char **argv )
|
||||
template <typename T>
|
||||
void destroy(T t) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( m_dispatch );
|
||||
t.destroy( m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
@ -4642,7 +4655,13 @@ int main( int argc, char **argv )
|
||||
class ObjectFree
|
||||
{
|
||||
public:
|
||||
ObjectFree( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
|
||||
ObjectFree()
|
||||
: m_owner()
|
||||
, m_allocationCallbacks( nullptr )
|
||||
, m_dispatch( nullptr )
|
||||
{}
|
||||
|
||||
ObjectFree( OwnerType owner, Optional<const AllocationCallbacks> allocationCallbacks, Dispatch const &dispatch ) VULKAN_HPP_NOEXCEPT
|
||||
: m_owner( owner )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
, m_dispatch( &dispatch )
|
||||
@ -4655,6 +4674,7 @@ int main( int argc, char **argv )
|
||||
template <typename T>
|
||||
void destroy(T t) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( m_owner && m_dispatch );
|
||||
m_owner.free( t, m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
@ -4904,7 +4924,12 @@ int main( int argc, char **argv )
|
||||
public:
|
||||
using element_type = Type;
|
||||
|
||||
explicit UniqueHandle( Type const& value = Type(), Deleter const& deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
UniqueHandle()
|
||||
: Deleter()
|
||||
, m_value()
|
||||
{}
|
||||
|
||||
explicit UniqueHandle( Type const& value, Deleter const& deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
: Deleter( deleter)
|
||||
, m_value( value )
|
||||
{}
|
||||
|
@ -594,7 +594,12 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
public:
|
||||
using element_type = Type;
|
||||
|
||||
explicit UniqueHandle( Type const& value = Type(), Deleter const& deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
UniqueHandle()
|
||||
: Deleter()
|
||||
, m_value()
|
||||
{}
|
||||
|
||||
explicit UniqueHandle( Type const& value, Deleter const& deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
: Deleter( deleter)
|
||||
, m_value( value )
|
||||
{}
|
||||
@ -2646,7 +2651,13 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
class ObjectDestroy
|
||||
{
|
||||
public:
|
||||
ObjectDestroy( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
|
||||
ObjectDestroy()
|
||||
: m_owner()
|
||||
, m_allocationCallbacks( nullptr )
|
||||
, m_dispatch( nullptr )
|
||||
{}
|
||||
|
||||
ObjectDestroy( OwnerType owner, Optional<const AllocationCallbacks> allocationCallbacks, Dispatch const &dispatch ) VULKAN_HPP_NOEXCEPT
|
||||
: m_owner( owner )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
, m_dispatch( &dispatch )
|
||||
@ -2659,6 +2670,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
template <typename T>
|
||||
void destroy(T t) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( m_owner && m_dispatch );
|
||||
m_owner.destroy( t, m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
@ -2674,6 +2686,11 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
class ObjectDestroy<NoParent,Dispatch>
|
||||
{
|
||||
public:
|
||||
ObjectDestroy()
|
||||
: m_allocationCallbacks( nullptr )
|
||||
, m_dispatch( nullptr )
|
||||
{}
|
||||
|
||||
ObjectDestroy( Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
|
||||
: m_allocationCallbacks( allocationCallbacks )
|
||||
, m_dispatch( &dispatch )
|
||||
@ -2685,6 +2702,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
template <typename T>
|
||||
void destroy(T t) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( m_dispatch );
|
||||
t.destroy( m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
@ -2697,7 +2715,13 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
class ObjectFree
|
||||
{
|
||||
public:
|
||||
ObjectFree( OwnerType owner = OwnerType(), Optional<const AllocationCallbacks> allocationCallbacks = nullptr, Dispatch const &dispatch = VULKAN_HPP_DEFAULT_DISPATCHER ) VULKAN_HPP_NOEXCEPT
|
||||
ObjectFree()
|
||||
: m_owner()
|
||||
, m_allocationCallbacks( nullptr )
|
||||
, m_dispatch( nullptr )
|
||||
{}
|
||||
|
||||
ObjectFree( OwnerType owner, Optional<const AllocationCallbacks> allocationCallbacks, Dispatch const &dispatch ) VULKAN_HPP_NOEXCEPT
|
||||
: m_owner( owner )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
, m_dispatch( &dispatch )
|
||||
@ -2710,6 +2734,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
template <typename T>
|
||||
void destroy(T t) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( m_owner && m_dispatch );
|
||||
m_owner.free( t, m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user