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
|
namespace Ndk
|
||||||
{
|
{
|
||||||
class BaseComponent;
|
|
||||||
class BaseSystem;
|
|
||||||
|
|
||||||
template<unsigned int N> ComponentId BuildComponentId(const char (&name)[N]);
|
template<unsigned int N> ComponentId BuildComponentId(const char (&name)[N]);
|
||||||
template<typename ComponentType> constexpr ComponentIndex GetComponentIndex();
|
template<typename ComponentType> constexpr ComponentIndex GetComponentIndex();
|
||||||
template<typename SystemType> constexpr SystemIndex GetSystemIndex();
|
template<typename SystemType> constexpr SystemIndex GetSystemIndex();
|
||||||
template<typename ComponentType, unsigned int N> ComponentIndex InitializeComponent(const char (&name)[N]);
|
template<typename ComponentType, unsigned int N> ComponentIndex InitializeComponent(const char (&name)[N]);
|
||||||
template<typename SystemType> SystemIndex InitializeSystem();
|
template<typename SystemType> SystemIndex InitializeSystem();
|
||||||
template<typename ComponentType> bool IsComponent(BaseComponent& component);
|
template<typename ComponentType, typename C> bool IsComponent(C& component);
|
||||||
template<typename SystemType> bool IsSystem(BaseSystem& system);
|
template<typename SystemType, typename S> bool IsSystem(S& system);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <Ndk/Algorithm.inl>
|
#include <Ndk/Algorithm.inl>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
||||||
|
|
||||||
#include <Nazara/Core/Endianness.hpp>
|
#include <Nazara/Core/Endianness.hpp>
|
||||||
#include <Ndk/BaseComponent.hpp>
|
|
||||||
#include <Ndk/BaseSystem.hpp>
|
|
||||||
|
|
||||||
namespace Ndk
|
namespace Ndk
|
||||||
{
|
{
|
||||||
|
|
@ -47,14 +45,14 @@ namespace Ndk
|
||||||
return SystemType::systemIndex;
|
return SystemType::systemIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename ComponentType>
|
template<typename ComponentType, typename C>
|
||||||
bool IsComponent(BaseComponent& component)
|
bool IsComponent(C& component)
|
||||||
{
|
{
|
||||||
return component.GetIndex() == GetComponentIndex<ComponentType>();
|
return component.GetIndex() == GetComponentIndex<ComponentType>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename SystemType>
|
template<typename SystemType, typename S>
|
||||||
bool IsSystem(BaseSystem& system)
|
bool IsSystem(S& system)
|
||||||
{
|
{
|
||||||
return system.GetIndex() == GetSystemIndex<SystemType>();
|
return system.GetIndex() == GetSystemIndex<SystemType>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue