Ndk/Algorithm: Fixed headers cyclic dependency
Former-commit-id: a6d4d21586ef948dd68f1d3e7dc01e8275aaac3f
This commit is contained in:
parent
31227ca567
commit
9bffaaaa84
|
|
@ -11,16 +11,13 @@
|
|||
|
||||
namespace Ndk
|
||||
{
|
||||
class BaseComponent;
|
||||
class BaseSystem;
|
||||
|
||||
template<unsigned int N> ComponentId BuildComponentId(const char (&name)[N]);
|
||||
template<typename ComponentType> constexpr ComponentIndex GetComponentIndex();
|
||||
template<typename SystemType> constexpr SystemIndex GetSystemIndex();
|
||||
template<typename ComponentType, unsigned int N> ComponentIndex InitializeComponent(const char (&name)[N]);
|
||||
template<typename SystemType> SystemIndex InitializeSystem();
|
||||
template<typename ComponentType> bool IsComponent(BaseComponent& component);
|
||||
template<typename SystemType> bool IsSystem(BaseSystem& system);
|
||||
template<typename ComponentType, typename C> bool IsComponent(C& component);
|
||||
template<typename SystemType, typename S> bool IsSystem(S& system);
|
||||
}
|
||||
|
||||
#include <Ndk/Algorithm.inl>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
||||
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
#include <Ndk/BaseComponent.hpp>
|
||||
#include <Ndk/BaseSystem.hpp>
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
|
|
@ -47,14 +45,14 @@ namespace Ndk
|
|||
return SystemType::systemIndex;
|
||||
}
|
||||
|
||||
template<typename ComponentType>
|
||||
bool IsComponent(BaseComponent& component)
|
||||
template<typename ComponentType, typename C>
|
||||
bool IsComponent(C& component)
|
||||
{
|
||||
return component.GetIndex() == GetComponentIndex<ComponentType>();
|
||||
}
|
||||
|
||||
template<typename SystemType>
|
||||
bool IsSystem(BaseSystem& system)
|
||||
template<typename SystemType, typename S>
|
||||
bool IsSystem(S& system)
|
||||
{
|
||||
return system.GetIndex() == GetSystemIndex<SystemType>();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue