Added systems
It's now officially an ECS, yay! Former-commit-id: e2aacaa5c9fd362921cf3d064e346d11f942bd59
This commit is contained in:
27
SDK/include/NDK/System.inl
Normal file
27
SDK/include/NDK/System.inl
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Development Kit"
|
||||
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
||||
|
||||
#include <Ndk/Algorithm.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
template<typename SystemType>
|
||||
System<SystemType>::System() :
|
||||
BaseSystem(GetSystemId<SystemType>())
|
||||
{
|
||||
}
|
||||
|
||||
template<typename SystemType>
|
||||
System<SystemType>::~System() = default;
|
||||
|
||||
template<typename SystemType>
|
||||
BaseSystem* System<SystemType>::Clone() const
|
||||
{
|
||||
///FIXME: Pas encore supporté par GCC (4.9.2)
|
||||
//static_assert(std::is_trivially_copy_constructible<SystemType>::value, "SystemType should be copy-constructible");
|
||||
|
||||
return new SystemType(static_cast<const SystemType&>(*this));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user