SchedulerConfig Class
Fluent configuration for a single spawn rule. More...
Declaration
Public Constructors Index
| SchedulerConfig (helios::engine::runtime::spawn::types::SpawnProfileId profileId, helios::engine::runtime::spawn::types::SpawnRuleId ruleId) | |
|
Constructs a SchedulerConfig. More... | |
Public Member Functions Index
| SchedulerConfig & | timerCondition (const float intervalSeconds) |
|
Sets a timer-based spawn condition. More... | |
| SchedulerConfig & | timerWithAvailabilityCondition (const float intervalSeconds) |
|
Sets a combined condition: timer + pool availability. More... | |
| SchedulerConfig & | condition (std::unique_ptr< const helios::engine::runtime::spawn::policy::SpawnCondition > customCondition) |
|
Sets a custom spawn condition. More... | |
| SchedulerConfig & | fixedAmount (const size_t count) |
|
Sets a fixed spawn amount. More... | |
| SchedulerConfig & | amount (std::unique_ptr< const helios::engine::runtime::spawn::policy::amount::SpawnAmountProvider > customProvider) |
|
Sets a custom amount provider. More... | |
| helios::engine::runtime::spawn::types::SpawnProfileId | profileId () const noexcept |
|
Returns the profile ID for this rule. More... | |
| std::unique_ptr< helios::engine::runtime::spawn::policy::SpawnRule > | build () |
|
Builds and returns the configured SpawnRule. More... | |
Private Member Attributes Index
| helios::engine::runtime::spawn::types::SpawnProfileId | profileId_ |
|
Profile this rule is bound to. More... | |
| helios::engine::runtime::spawn::types::SpawnRuleId | ruleId_ |
|
Unique identifier for the rule. More... | |
| std::unique_ptr< const helios::engine::runtime::spawn::policy::SpawnCondition > | condition_ |
|
Condition determining when to spawn. More... | |
| std::unique_ptr< const helios::engine::runtime::spawn::policy::amount::SpawnAmountProvider > | amountProvider_ |
|
Provider determining how many to spawn. More... | |
Description
Fluent configuration for a single spawn rule.
Provides convenience methods for assembling a SpawnRule from condition and amount providers.
Definition at line 28 of file SchedulerConfig.ixx.
Public Constructors
SchedulerConfig()
| inline |
Constructs a SchedulerConfig.
- Parameters
-
profileId The spawn profile this rule targets.
ruleId Unique identifier for this rule.
Definition at line 58 of file SchedulerConfig.ixx.
Reference profileId.
Referenced by amount, condition, fixedAmount, timerCondition and timerWithAvailabilityCondition.
Public Member Functions
amount()
| inline |
Sets a custom amount provider.
- Parameters
-
customProvider Ownership is transferred.
- Returns
Reference to this config for chaining.
Definition at line 128 of file SchedulerConfig.ixx.
Reference SchedulerConfig.
build()
| inline nodiscard |
Builds and returns the configured SpawnRule.
- Returns
The assembled SpawnRule. Ownership is transferred to the caller.
Definition at line 149 of file SchedulerConfig.ixx.
condition()
| inline |
Sets a custom spawn condition.
- Parameters
-
customCondition Ownership is transferred.
- Returns
Reference to this config for chaining.
Definition at line 101 of file SchedulerConfig.ixx.
Reference SchedulerConfig.
fixedAmount()
| inline |
Sets a fixed spawn amount.
- Parameters
-
count Number of entities to spawn per trigger.
- Returns
Reference to this config for chaining.
Definition at line 115 of file SchedulerConfig.ixx.
Reference SchedulerConfig.
profileId()
| inline nodiscard noexcept |
Returns the profile ID for this rule.
- Returns
The spawn profile ID.
Definition at line 140 of file SchedulerConfig.ixx.
Referenced by SchedulerConfig.
timerCondition()
| inline |
Sets a timer-based spawn condition.
- Parameters
-
intervalSeconds Seconds between spawn evaluations.
- Returns
Reference to this config for chaining.
Definition at line 70 of file SchedulerConfig.ixx.
Reference SchedulerConfig.
timerWithAvailabilityCondition()
| inline |
Sets a combined condition: timer + pool availability.
- Parameters
-
intervalSeconds Seconds between spawn evaluations.
- Returns
Reference to this config for chaining.
Definition at line 85 of file SchedulerConfig.ixx.
Reference SchedulerConfig.
Private Member Attributes
amountProvider_
|
Provider determining how many to spawn.
Definition at line 48 of file SchedulerConfig.ixx.
condition_
|
Condition determining when to spawn.
Definition at line 43 of file SchedulerConfig.ixx.
profileId_
|
Profile this rule is bound to.
Definition at line 33 of file SchedulerConfig.ixx.
ruleId_
|
Unique identifier for the rule.
Definition at line 38 of file SchedulerConfig.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.