Add CType to handle wrapper classes. (#354)

This commit is contained in:
Andreas Süßenbach 2019-07-03 13:49:40 +02:00 committed by Markus Tavenrath
parent 5414a2e232
commit f91fc93fc5
2 changed files with 114 additions and 0 deletions

View File

@ -3445,6 +3445,9 @@ void VulkanHppGenerator::writeHandle(std::ostream & os, std::pair<std::string, H
static const std::string templateString = R"( static const std::string templateString = R"(
class ${className} class ${className}
{ {
public:
using CType = Vk${className};
public: public:
VULKAN_HPP_CONSTEXPR ${className}() VULKAN_HPP_CONSTEXPR ${className}()
: m_${memberName}(VK_NULL_HANDLE) : m_${memberName}(VK_NULL_HANDLE)

View File

@ -11351,6 +11351,9 @@ namespace VULKAN_HPP_NAMESPACE
class SurfaceKHR class SurfaceKHR
{ {
public:
using CType = VkSurfaceKHR;
public: public:
VULKAN_HPP_CONSTEXPR SurfaceKHR() VULKAN_HPP_CONSTEXPR SurfaceKHR()
: m_surfaceKHR(VK_NULL_HANDLE) : m_surfaceKHR(VK_NULL_HANDLE)
@ -11415,6 +11418,9 @@ namespace VULKAN_HPP_NAMESPACE
class DebugReportCallbackEXT class DebugReportCallbackEXT
{ {
public:
using CType = VkDebugReportCallbackEXT;
public: public:
VULKAN_HPP_CONSTEXPR DebugReportCallbackEXT() VULKAN_HPP_CONSTEXPR DebugReportCallbackEXT()
: m_debugReportCallbackEXT(VK_NULL_HANDLE) : m_debugReportCallbackEXT(VK_NULL_HANDLE)
@ -11479,6 +11485,9 @@ namespace VULKAN_HPP_NAMESPACE
class DebugUtilsMessengerEXT class DebugUtilsMessengerEXT
{ {
public:
using CType = VkDebugUtilsMessengerEXT;
public: public:
VULKAN_HPP_CONSTEXPR DebugUtilsMessengerEXT() VULKAN_HPP_CONSTEXPR DebugUtilsMessengerEXT()
: m_debugUtilsMessengerEXT(VK_NULL_HANDLE) : m_debugUtilsMessengerEXT(VK_NULL_HANDLE)
@ -11543,6 +11552,9 @@ namespace VULKAN_HPP_NAMESPACE
class DisplayKHR class DisplayKHR
{ {
public:
using CType = VkDisplayKHR;
public: public:
VULKAN_HPP_CONSTEXPR DisplayKHR() VULKAN_HPP_CONSTEXPR DisplayKHR()
: m_displayKHR(VK_NULL_HANDLE) : m_displayKHR(VK_NULL_HANDLE)
@ -11607,6 +11619,9 @@ namespace VULKAN_HPP_NAMESPACE
class SwapchainKHR class SwapchainKHR
{ {
public:
using CType = VkSwapchainKHR;
public: public:
VULKAN_HPP_CONSTEXPR SwapchainKHR() VULKAN_HPP_CONSTEXPR SwapchainKHR()
: m_swapchainKHR(VK_NULL_HANDLE) : m_swapchainKHR(VK_NULL_HANDLE)
@ -11671,6 +11686,9 @@ namespace VULKAN_HPP_NAMESPACE
class Semaphore class Semaphore
{ {
public:
using CType = VkSemaphore;
public: public:
VULKAN_HPP_CONSTEXPR Semaphore() VULKAN_HPP_CONSTEXPR Semaphore()
: m_semaphore(VK_NULL_HANDLE) : m_semaphore(VK_NULL_HANDLE)
@ -11735,6 +11753,9 @@ namespace VULKAN_HPP_NAMESPACE
class Fence class Fence
{ {
public:
using CType = VkFence;
public: public:
VULKAN_HPP_CONSTEXPR Fence() VULKAN_HPP_CONSTEXPR Fence()
: m_fence(VK_NULL_HANDLE) : m_fence(VK_NULL_HANDLE)
@ -11799,6 +11820,9 @@ namespace VULKAN_HPP_NAMESPACE
class QueryPool class QueryPool
{ {
public:
using CType = VkQueryPool;
public: public:
VULKAN_HPP_CONSTEXPR QueryPool() VULKAN_HPP_CONSTEXPR QueryPool()
: m_queryPool(VK_NULL_HANDLE) : m_queryPool(VK_NULL_HANDLE)
@ -11863,6 +11887,9 @@ namespace VULKAN_HPP_NAMESPACE
class Buffer class Buffer
{ {
public:
using CType = VkBuffer;
public: public:
VULKAN_HPP_CONSTEXPR Buffer() VULKAN_HPP_CONSTEXPR Buffer()
: m_buffer(VK_NULL_HANDLE) : m_buffer(VK_NULL_HANDLE)
@ -11927,6 +11954,9 @@ namespace VULKAN_HPP_NAMESPACE
class PipelineLayout class PipelineLayout
{ {
public:
using CType = VkPipelineLayout;
public: public:
VULKAN_HPP_CONSTEXPR PipelineLayout() VULKAN_HPP_CONSTEXPR PipelineLayout()
: m_pipelineLayout(VK_NULL_HANDLE) : m_pipelineLayout(VK_NULL_HANDLE)
@ -11991,6 +12021,9 @@ namespace VULKAN_HPP_NAMESPACE
class DescriptorSet class DescriptorSet
{ {
public:
using CType = VkDescriptorSet;
public: public:
VULKAN_HPP_CONSTEXPR DescriptorSet() VULKAN_HPP_CONSTEXPR DescriptorSet()
: m_descriptorSet(VK_NULL_HANDLE) : m_descriptorSet(VK_NULL_HANDLE)
@ -12055,6 +12088,9 @@ namespace VULKAN_HPP_NAMESPACE
class Pipeline class Pipeline
{ {
public:
using CType = VkPipeline;
public: public:
VULKAN_HPP_CONSTEXPR Pipeline() VULKAN_HPP_CONSTEXPR Pipeline()
: m_pipeline(VK_NULL_HANDLE) : m_pipeline(VK_NULL_HANDLE)
@ -12119,6 +12155,9 @@ namespace VULKAN_HPP_NAMESPACE
class ImageView class ImageView
{ {
public:
using CType = VkImageView;
public: public:
VULKAN_HPP_CONSTEXPR ImageView() VULKAN_HPP_CONSTEXPR ImageView()
: m_imageView(VK_NULL_HANDLE) : m_imageView(VK_NULL_HANDLE)
@ -12183,6 +12222,9 @@ namespace VULKAN_HPP_NAMESPACE
class Image class Image
{ {
public:
using CType = VkImage;
public: public:
VULKAN_HPP_CONSTEXPR Image() VULKAN_HPP_CONSTEXPR Image()
: m_image(VK_NULL_HANDLE) : m_image(VK_NULL_HANDLE)
@ -12247,6 +12289,9 @@ namespace VULKAN_HPP_NAMESPACE
class AccelerationStructureNV class AccelerationStructureNV
{ {
public:
using CType = VkAccelerationStructureNV;
public: public:
VULKAN_HPP_CONSTEXPR AccelerationStructureNV() VULKAN_HPP_CONSTEXPR AccelerationStructureNV()
: m_accelerationStructureNV(VK_NULL_HANDLE) : m_accelerationStructureNV(VK_NULL_HANDLE)
@ -12311,6 +12356,9 @@ namespace VULKAN_HPP_NAMESPACE
class DescriptorUpdateTemplate class DescriptorUpdateTemplate
{ {
public:
using CType = VkDescriptorUpdateTemplate;
public: public:
VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplate() VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplate()
: m_descriptorUpdateTemplate(VK_NULL_HANDLE) : m_descriptorUpdateTemplate(VK_NULL_HANDLE)
@ -12376,6 +12424,9 @@ namespace VULKAN_HPP_NAMESPACE
class Event class Event
{ {
public:
using CType = VkEvent;
public: public:
VULKAN_HPP_CONSTEXPR Event() VULKAN_HPP_CONSTEXPR Event()
: m_event(VK_NULL_HANDLE) : m_event(VK_NULL_HANDLE)
@ -12440,6 +12491,9 @@ namespace VULKAN_HPP_NAMESPACE
class CommandBuffer class CommandBuffer
{ {
public:
using CType = VkCommandBuffer;
public: public:
VULKAN_HPP_CONSTEXPR CommandBuffer() VULKAN_HPP_CONSTEXPR CommandBuffer()
: m_commandBuffer(VK_NULL_HANDLE) : m_commandBuffer(VK_NULL_HANDLE)
@ -12958,6 +13012,9 @@ namespace VULKAN_HPP_NAMESPACE
class DeviceMemory class DeviceMemory
{ {
public:
using CType = VkDeviceMemory;
public: public:
VULKAN_HPP_CONSTEXPR DeviceMemory() VULKAN_HPP_CONSTEXPR DeviceMemory()
: m_deviceMemory(VK_NULL_HANDLE) : m_deviceMemory(VK_NULL_HANDLE)
@ -13022,6 +13079,9 @@ namespace VULKAN_HPP_NAMESPACE
class BufferView class BufferView
{ {
public:
using CType = VkBufferView;
public: public:
VULKAN_HPP_CONSTEXPR BufferView() VULKAN_HPP_CONSTEXPR BufferView()
: m_bufferView(VK_NULL_HANDLE) : m_bufferView(VK_NULL_HANDLE)
@ -13086,6 +13146,9 @@ namespace VULKAN_HPP_NAMESPACE
class CommandPool class CommandPool
{ {
public:
using CType = VkCommandPool;
public: public:
VULKAN_HPP_CONSTEXPR CommandPool() VULKAN_HPP_CONSTEXPR CommandPool()
: m_commandPool(VK_NULL_HANDLE) : m_commandPool(VK_NULL_HANDLE)
@ -13150,6 +13213,9 @@ namespace VULKAN_HPP_NAMESPACE
class PipelineCache class PipelineCache
{ {
public:
using CType = VkPipelineCache;
public: public:
VULKAN_HPP_CONSTEXPR PipelineCache() VULKAN_HPP_CONSTEXPR PipelineCache()
: m_pipelineCache(VK_NULL_HANDLE) : m_pipelineCache(VK_NULL_HANDLE)
@ -13214,6 +13280,9 @@ namespace VULKAN_HPP_NAMESPACE
class DescriptorPool class DescriptorPool
{ {
public:
using CType = VkDescriptorPool;
public: public:
VULKAN_HPP_CONSTEXPR DescriptorPool() VULKAN_HPP_CONSTEXPR DescriptorPool()
: m_descriptorPool(VK_NULL_HANDLE) : m_descriptorPool(VK_NULL_HANDLE)
@ -13278,6 +13347,9 @@ namespace VULKAN_HPP_NAMESPACE
class DescriptorSetLayout class DescriptorSetLayout
{ {
public:
using CType = VkDescriptorSetLayout;
public: public:
VULKAN_HPP_CONSTEXPR DescriptorSetLayout() VULKAN_HPP_CONSTEXPR DescriptorSetLayout()
: m_descriptorSetLayout(VK_NULL_HANDLE) : m_descriptorSetLayout(VK_NULL_HANDLE)
@ -13342,6 +13414,9 @@ namespace VULKAN_HPP_NAMESPACE
class Framebuffer class Framebuffer
{ {
public:
using CType = VkFramebuffer;
public: public:
VULKAN_HPP_CONSTEXPR Framebuffer() VULKAN_HPP_CONSTEXPR Framebuffer()
: m_framebuffer(VK_NULL_HANDLE) : m_framebuffer(VK_NULL_HANDLE)
@ -13406,6 +13481,9 @@ namespace VULKAN_HPP_NAMESPACE
class IndirectCommandsLayoutNVX class IndirectCommandsLayoutNVX
{ {
public:
using CType = VkIndirectCommandsLayoutNVX;
public: public:
VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutNVX() VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutNVX()
: m_indirectCommandsLayoutNVX(VK_NULL_HANDLE) : m_indirectCommandsLayoutNVX(VK_NULL_HANDLE)
@ -13470,6 +13548,9 @@ namespace VULKAN_HPP_NAMESPACE
class ObjectTableNVX class ObjectTableNVX
{ {
public:
using CType = VkObjectTableNVX;
public: public:
VULKAN_HPP_CONSTEXPR ObjectTableNVX() VULKAN_HPP_CONSTEXPR ObjectTableNVX()
: m_objectTableNVX(VK_NULL_HANDLE) : m_objectTableNVX(VK_NULL_HANDLE)
@ -13534,6 +13615,9 @@ namespace VULKAN_HPP_NAMESPACE
class RenderPass class RenderPass
{ {
public:
using CType = VkRenderPass;
public: public:
VULKAN_HPP_CONSTEXPR RenderPass() VULKAN_HPP_CONSTEXPR RenderPass()
: m_renderPass(VK_NULL_HANDLE) : m_renderPass(VK_NULL_HANDLE)
@ -13598,6 +13682,9 @@ namespace VULKAN_HPP_NAMESPACE
class Sampler class Sampler
{ {
public:
using CType = VkSampler;
public: public:
VULKAN_HPP_CONSTEXPR Sampler() VULKAN_HPP_CONSTEXPR Sampler()
: m_sampler(VK_NULL_HANDLE) : m_sampler(VK_NULL_HANDLE)
@ -13662,6 +13749,9 @@ namespace VULKAN_HPP_NAMESPACE
class SamplerYcbcrConversion class SamplerYcbcrConversion
{ {
public:
using CType = VkSamplerYcbcrConversion;
public: public:
VULKAN_HPP_CONSTEXPR SamplerYcbcrConversion() VULKAN_HPP_CONSTEXPR SamplerYcbcrConversion()
: m_samplerYcbcrConversion(VK_NULL_HANDLE) : m_samplerYcbcrConversion(VK_NULL_HANDLE)
@ -13727,6 +13817,9 @@ namespace VULKAN_HPP_NAMESPACE
class ShaderModule class ShaderModule
{ {
public:
using CType = VkShaderModule;
public: public:
VULKAN_HPP_CONSTEXPR ShaderModule() VULKAN_HPP_CONSTEXPR ShaderModule()
: m_shaderModule(VK_NULL_HANDLE) : m_shaderModule(VK_NULL_HANDLE)
@ -13791,6 +13884,9 @@ namespace VULKAN_HPP_NAMESPACE
class ValidationCacheEXT class ValidationCacheEXT
{ {
public:
using CType = VkValidationCacheEXT;
public: public:
VULKAN_HPP_CONSTEXPR ValidationCacheEXT() VULKAN_HPP_CONSTEXPR ValidationCacheEXT()
: m_validationCacheEXT(VK_NULL_HANDLE) : m_validationCacheEXT(VK_NULL_HANDLE)
@ -13855,6 +13951,9 @@ namespace VULKAN_HPP_NAMESPACE
class Queue class Queue
{ {
public:
using CType = VkQueue;
public: public:
VULKAN_HPP_CONSTEXPR Queue() VULKAN_HPP_CONSTEXPR Queue()
: m_queue(VK_NULL_HANDLE) : m_queue(VK_NULL_HANDLE)
@ -14034,6 +14133,9 @@ namespace VULKAN_HPP_NAMESPACE
class Device class Device
{ {
public:
using CType = VkDevice;
public: public:
VULKAN_HPP_CONSTEXPR Device() VULKAN_HPP_CONSTEXPR Device()
: m_device(VK_NULL_HANDLE) : m_device(VK_NULL_HANDLE)
@ -15637,6 +15739,9 @@ namespace VULKAN_HPP_NAMESPACE
class DisplayModeKHR class DisplayModeKHR
{ {
public:
using CType = VkDisplayModeKHR;
public: public:
VULKAN_HPP_CONSTEXPR DisplayModeKHR() VULKAN_HPP_CONSTEXPR DisplayModeKHR()
: m_displayModeKHR(VK_NULL_HANDLE) : m_displayModeKHR(VK_NULL_HANDLE)
@ -15706,6 +15811,9 @@ namespace VULKAN_HPP_NAMESPACE
class PhysicalDevice class PhysicalDevice
{ {
public:
using CType = VkPhysicalDevice;
public: public:
VULKAN_HPP_CONSTEXPR PhysicalDevice() VULKAN_HPP_CONSTEXPR PhysicalDevice()
: m_physicalDevice(VK_NULL_HANDLE) : m_physicalDevice(VK_NULL_HANDLE)
@ -16305,6 +16413,9 @@ namespace VULKAN_HPP_NAMESPACE
class Instance class Instance
{ {
public:
using CType = VkInstance;
public: public:
VULKAN_HPP_CONSTEXPR Instance() VULKAN_HPP_CONSTEXPR Instance()
: m_instance(VK_NULL_HANDLE) : m_instance(VK_NULL_HANDLE)