/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #include "DataFormat.hpp" #include namespace openVulkanoCpp { std::string_view DataFormat::GetName() const { return magic_enum::enum_name(m_format); } DataFormat DataFormat::GetFromName(std::string_view name) { auto result = magic_enum::enum_cast(name); if (result.has_value()) return { result.value() }; return { UNDEFINED }; } }