Skip to main content

GameObjectPoolSnapshot Struct

Immutable snapshot of a GameObjectPool's current state. More...

Declaration

struct helios::engine::runtime::pooling::GameObjectPoolSnapshot { ... }

Public Member Attributes Index

const size_tactiveCount

Number of currently active (in-use) entities in the pool. More...

const size_tinactiveCount

Number of currently inactive (available) entities in the pool. More...

Description

Immutable snapshot of a GameObjectPool's current state.

GameObjectPoolSnapshot provides a point-in-time view of a pool's active and inactive entity counts. This is useful for monitoring pool utilization, debugging spawn issues, and making spawn decisions based on available capacity.

The snapshot is read-only and captures the state at creation time; subsequent pool operations do not affect it.

Example usage: ```cpp auto snapshot = poolManager.poolSnapshot(bulletPoolId); if (snapshot.inactiveCount > 0) { // Pool has available capacity for spawning } ```

See Also

GameObjectPool

See Also

GameObjectPoolManager::poolSnapshot

Definition at line 33 of file GameObjectPoolSnapshot.ixx.

Public Member Attributes

activeCount

const size_t helios::engine::runtime::pooling::GameObjectPoolSnapshot::activeCount

Number of currently active (in-use) entities in the pool.

Definition at line 38 of file GameObjectPoolSnapshot.ixx.

38 const size_t activeCount;

inactiveCount

const size_t helios::engine::runtime::pooling::GameObjectPoolSnapshot::inactiveCount

Number of currently inactive (available) entities in the pool.

Definition at line 43 of file GameObjectPoolSnapshot.ixx.

43 const size_t inactiveCount;

Referenced by helios::engine::runtime::spawn::policy::amount::SpawnAll::getAmount.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.