DebugReportCallbackVk.h#
The PVRVk DebugReportCallback class.
Includes#
PVRVk/PVRVkObjectBaseVk.h
PVRVk/TypesVk.h
Included By#
Namespaces#
Classes#
Source Code#
#pragma once
#include "PVRVk/PVRVkObjectBaseVk.h"
#include "PVRVk/TypesVk.h"
namespace pvrvk {
struct DebugReportCallbackCreateInfo
{
public:
DebugReportCallbackCreateInfo() : _flags(DebugReportFlagsEXT::e_NONE), _callback(nullptr), _userData(nullptr) {}
DebugReportCallbackCreateInfo(DebugReportFlagsEXT flags, PFN_vkDebugReportCallbackEXT callback, void* pUserData = nullptr)
: _flags(flags), _callback(callback), _userData(pUserData)
{}
DebugReportFlagsEXT getFlags() const { return _flags; }
DebugReportCallbackCreateInfo& setFlags(const DebugReportFlagsEXT& flags)
{
this->_flags = flags;
return *this;
}
PFN_vkDebugReportCallbackEXT getCallback() const { return _callback; }
DebugReportCallbackCreateInfo& setCallback(const PFN_vkDebugReportCallbackEXT& callback)
{
this->_callback = callback;
return *this;
}
inline void* getPUserData() const { return _userData; }
inline void setPUserData(void* pUserData) { this->_userData = pUserData; }
private:
DebugReportFlagsEXT _flags;
PFN_vkDebugReportCallbackEXT _callback;
void* _userData;
};
namespace impl {
class DebugReportCallback_ : public PVRVkInstanceObjectBase<VkDebugReportCallbackEXT, ObjectType::e_DEBUG_REPORT_CALLBACK_EXT>
{
private:
friend class Instance_;
class make_shared_enabler
{
protected:
make_shared_enabler() {}
friend class DebugReportCallback_;
};
static DebugReportCallback constructShared(Instance& instance, const DebugReportCallbackCreateInfo& createInfo)
{
return std::make_shared<DebugReportCallback_>(make_shared_enabler{}, instance, createInfo);
}
public:
DECLARE_NO_COPY_SEMANTICS(DebugReportCallback_)
~DebugReportCallback_();
DebugReportCallback_(make_shared_enabler, Instance& instance, const DebugReportCallbackCreateInfo& createInfo);
};
} // namespace impl
} // namespace pvrvk