mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Add UniqueHandle non-const accessors, ensure all by reference. (#123)
* Add UniqueHandle non-const accessors, ensure all by reference. - Add `Type * operator->()` - Fix `Type get() const` to `const Type & get() const` - Add `Type & get()` * Add support for structure pointer chains was missing some generator code. * Update vulkan.hpp with changes.
This commit is contained in:
parent
bca6564dac
commit
daae0b6194
@ -381,8 +381,8 @@ const std::string structureChainHeader = R"(
|
|||||||
|
|
||||||
StructureChain& operator=(StructureChain const &rhs)
|
StructureChain& operator=(StructureChain const &rhs)
|
||||||
{
|
{
|
||||||
linkAndCopy(rhs);
|
linkAndCopy<StructureElements...>(rhs);
|
||||||
return this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename ClassType> ClassType& get() { return static_cast<ClassType&>(*this);}
|
template<typename ClassType> ClassType& get() { return static_cast<ClassType&>(*this);}
|
||||||
@ -608,12 +608,27 @@ const std::string uniqueHandleHeader = R"(
|
|||||||
return &m_value;
|
return &m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type * operator->()
|
||||||
|
{
|
||||||
|
return &m_value;
|
||||||
|
}
|
||||||
|
|
||||||
Type const& operator*() const
|
Type const& operator*() const
|
||||||
{
|
{
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Type get() const
|
Type & operator*()
|
||||||
|
{
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Type & get() const
|
||||||
|
{
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Type & get()
|
||||||
{
|
{
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
@ -362,12 +362,27 @@ namespace vk
|
|||||||
return &m_value;
|
return &m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type * operator->()
|
||||||
|
{
|
||||||
|
return &m_value;
|
||||||
|
}
|
||||||
|
|
||||||
Type const& operator*() const
|
Type const& operator*() const
|
||||||
{
|
{
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Type get() const
|
Type & operator*()
|
||||||
|
{
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Type & get() const
|
||||||
|
{
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Type & get()
|
||||||
{
|
{
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user