diff --git a/SDK/include/NDK/BaseComponent.hpp b/SDK/include/NDK/BaseComponent.hpp index be738b737..5ec1d53b6 100644 --- a/SDK/include/NDK/BaseComponent.hpp +++ b/SDK/include/NDK/BaseComponent.hpp @@ -31,6 +31,8 @@ namespace Ndk ComponentIndex GetIndex() const; + inline static ComponentIndex GetMaxComponentIndex(); + BaseComponent& operator=(const BaseComponent&) = default; BaseComponent& operator=(BaseComponent&&) = default; diff --git a/SDK/include/NDK/BaseComponent.inl b/SDK/include/NDK/BaseComponent.inl index b8637b457..f6bd79578 100644 --- a/SDK/include/NDK/BaseComponent.inl +++ b/SDK/include/NDK/BaseComponent.inl @@ -2,6 +2,7 @@ // This file is part of the "Nazara Development Kit" // For conditions of distribution and use, see copyright notice in Prerequesites.hpp +#include #include namespace Ndk @@ -17,6 +18,11 @@ namespace Ndk return m_componentIndex; } + inline ComponentIndex BaseComponent::GetMaxComponentIndex() + { + return static_cast(s_entries.size()); + } + inline ComponentIndex BaseComponent::RegisterComponent(ComponentId id, Factory factoryFunc) { // Nous allons rajouter notre composant à la fin