Add getCurrentSize and getCurrentCapacity

This commit is contained in:
Stephen Seo 2017-11-03 17:11:20 +09:00
parent 16fd8e9ec3
commit d809d34716

View file

@ -157,6 +157,29 @@ namespace EC
return hasEntity(index) && std::get<bool>(entities.at(index));
}
/*!
\brief Returns the current size or number of entities in the system.
Note that this size includes entities that have been marked for
deletion but not yet cleaned up by the cleanup function.
*/
std::size_t getCurrentSize() const
{
return currentSize;
}
/*
\brief Returns the current capacity or number of entities the system
can hold.
Note that when capacity is exceeded, the capacity is increased by
EC_GROW_SIZE_AMOUNT.
*/
std::size_t getCurrentCapacity() const
{
return currentCapacity;
}
/*!
\brief Returns a const reference to an Entity's info.