Skip to main content

EntityPoolSnapshot Struct

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

Declaration

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

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 EntityPool's current state.

EntityPoolSnapshot 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:

 auto snapshot = poolManager.poolSnapshot(bulletPoolId);
 if (snapshot.inactiveCount > 0) {
  // Pool has available capacity for spawning
 }
See Also

EntityPool

See Also

EntityPoolManager::poolSnapshot

Definition at line 35 of file EntityPoolSnapshot.ixx.

Public Member Attributes

activeCount

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

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

Definition at line 40 of file EntityPoolSnapshot.ixx.

40 const size_t activeCount;

inactiveCount

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

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

Definition at line 45 of file EntityPoolSnapshot.ixx.

45 const size_t inactiveCount;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.