// Copyright (C) 2017 Jérôme Leclercq // This file is part of the "Nazara Engine - Utility module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #include namespace Nz { namespace Detail { template struct IsSuitableForComponent { constexpr static bool value = false; }; } template constexpr ComponentType ComponentTypeId() { static_assert(Detail::IsSuitableForComponent::value, "This type cannot be used as a component."); return ComponentType{}; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Color; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Double1; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Double2; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Double3; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Double4; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Float1; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Float2; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Float3; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Float4; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Int1; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Int2; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Int3; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Int4; } template<> constexpr ComponentType ComponentTypeId() { return ComponentType_Quaternion; } template constexpr ComponentType GetComponentTypeOf() { return ComponentTypeId>(); } } #include