My Project
Public Member Functions | Friends | List of all members
Entity Class Reference

Class that handle entity in a sparse array like an index. More...

#include <Entity.hpp>

Public Member Functions

 Entity (std::size_t id)
 Construct a new Entity object. More...
 
 ~Entity ()=default
 Destroy the Entity object.
 
 operator std::size_t () const
 Operator () to return _id of the entity. More...
 

Friends

class Registry
 Friend object so that the Entoty can access the Registry object.
 

Detailed Description

Class that handle entity in a sparse array like an index.

Constructor & Destructor Documentation

◆ Entity()

Entity::Entity ( std::size_t  id)
inlineexplicit

Construct a new Entity object.

Parameters
idIndex of the entity

Member Function Documentation

◆ operator std::size_t()

Entity::operator std::size_t ( ) const
inline

Operator () to return _id of the entity.

Returns
std::size_t Index of the entity

The documentation for this class was generated from the following file: