(Entity) Inlined most code

Former-commit-id: 287c7c557263497ba89451dd2d640fcd8522ef3a
This commit is contained in:
Lynix
2015-02-08 17:39:06 +01:00
parent 5fb728d0be
commit d5a8bdca12
3 changed files with 54 additions and 41 deletions

View File

@@ -0,0 +1,50 @@
// 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/World.hpp>
namespace Ndk
{
inline Entity::Entity() :
m_world(nullptr)
{
m_id.value = 0;
}
inline Entity::Entity(Id id, World* world) :
m_id(id),
m_world(world)
{
}
inline Entity::Id Entity::GetId() const
{
return m_id;
}
inline World* Entity::GetWorld() const
{
return m_world;
}
inline bool Entity::operator==(const Entity& other) const
{
return m_world == other.m_world && m_id == other.m_id;
}
inline bool Entity::operator!=(const Entity& other) const
{
return !operator==(other);
}
inline bool Entity::Id::operator==(const Id& other) const
{
return value == other.value;
}
inline bool Entity::Id::operator!=(const Id& other) const
{
return !operator==(other);
}
}