Add getCurrentSize and getCurrentCapacity
This commit is contained in:
parent
16fd8e9ec3
commit
d809d34716
1 changed files with 23 additions and 0 deletions
|
@ -157,6 +157,29 @@ namespace EC
|
||||||
return hasEntity(index) && std::get<bool>(entities.at(index));
|
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.
|
\brief Returns a const reference to an Entity's info.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue