// Generated by `scripts/generate.js`

use std::os::raw::c_char;
use std::ops::Deref;
use std::ptr;
use std::cmp;
use std::mem;
use utils::c_bindings::*;
use utils::vk_convert::*;
use utils::vk_null::*;
use utils::vk_ptr::*;
use utils::vk_traits::*;
use vulkan::vk::*;
use vulkan::vk::{VkStructureType,RawVkStructureType};
use vulkan::vk::{VkDeviceQueueCreateFlags,RawVkDeviceQueueCreateFlags};

/// Wrapper for [VkDeviceQueueCreateInfo](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceQueueCreateInfo.html).
#[derive(Debug, Clone)]
pub struct VkDeviceQueueCreateInfo {
    pub flags: VkDeviceQueueCreateFlags,
    pub queue_family_index: usize,
    pub queue_priorities: Vec<f32>,
}

#[doc(hidden)]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RawVkDeviceQueueCreateInfo {
    pub s_type: RawVkStructureType,
    pub next: *mut c_void,
    pub flags: RawVkDeviceQueueCreateFlags,
    pub queue_family_index: u32,
    pub queue_count: u32,
    pub queue_priorities: *mut f32,
}

impl VkWrappedType<RawVkDeviceQueueCreateInfo> for VkDeviceQueueCreateInfo {
    fn vk_to_raw(src: &VkDeviceQueueCreateInfo, dst: &mut RawVkDeviceQueueCreateInfo) {
        dst.s_type = vk_to_raw_value(&VkStructureType::DeviceQueueCreateInfo);
        dst.next = ptr::null_mut();
        dst.flags = vk_to_raw_value(&src.flags);
        dst.queue_family_index = vk_to_raw_value(&src.queue_family_index);
        dst.queue_count = src.queue_priorities.len() as u32;
        dst.queue_priorities = get_vec_ptr(&src.queue_priorities);
    }
}

impl VkRawType<VkDeviceQueueCreateInfo> for RawVkDeviceQueueCreateInfo {
    fn vk_to_wrapped(src: &RawVkDeviceQueueCreateInfo) -> VkDeviceQueueCreateInfo {
        VkDeviceQueueCreateInfo {
            flags: RawVkDeviceQueueCreateFlags::vk_to_wrapped(&src.flags),
            queue_family_index: u32::vk_to_wrapped(&src.queue_family_index),
            queue_priorities: vec_from_ptr(src.queue_count as usize, src.queue_priorities),
        }
    }
}

impl Default for VkDeviceQueueCreateInfo {
    fn default() -> VkDeviceQueueCreateInfo {
        VkDeviceQueueCreateInfo {
            flags: Default::default(),
            queue_family_index: 0,
            queue_priorities: Vec::new(),
        }
    }
}

impl VkSetup for VkDeviceQueueCreateInfo {
    fn vk_setup(&mut self, fn_table: *mut VkFunctionTable) {
        
    }
}

impl VkFree for RawVkDeviceQueueCreateInfo {
    fn vk_free(&self) {
        
    }
}