Skip to main content

RuleProcessor.ixx File

Abstract interface for processing spawn rules. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespaceruntime

Runtime infrastructure for game execution and lifecycle orchestration. More...

namespacespawn

Entity spawning infrastructure for the helios engine. More...

namespacescheduling

Spawn scheduling and plan management. More...

Classes Index

classRuleProcessor

Abstract interface for processing spawn rules into spawn plans. More...

Description

Abstract interface for processing spawn rules.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file RuleProcessor.ixx
3 * @brief Abstract interface for processing spawn rules.
4 */
5module;
6
7
8export module helios.engine.runtime.spawn.scheduling.RuleProcessor;
9
10import helios.engine.runtime.world.UpdateContext;
11import helios.engine.runtime.spawn.SpawnContext;
12import helios.engine.runtime.spawn.scheduling.SpawnPlan;
13import helios.engine.core.data.SpawnProfileId;
14import helios.engine.runtime.spawn.policy.SpawnRule;
15import helios.engine.runtime.spawn.policy.SpawnRuleState;
16
17
19
20 /**
21 * @brief Abstract interface for processing spawn rules into spawn plans.
22 *
23 * @details RuleProcessor defines the contract for evaluating a single spawn
24 * rule and producing a SpawnPlan. This abstraction allows different processing
25 * strategies to be plugged into schedulers.
26 *
27 * ## Responsibilities
28 *
29 * - Retrieve pool and profile information from the game world
30 * - Update the rule's state (timers, counts)
31 * - Evaluate the rule's conditions
32 * - Produce a SpawnPlan if conditions are met
33 *
34 * @see DefaultRuleProcessor
35 * @see SpawnScheduler
36 * @see SpawnRule
37 */
39
40 public:
41
42 /**
43 * @brief Virtual destructor for proper cleanup.
44 */
45 virtual ~RuleProcessor() = default;
46
47 /**
48 * @brief Processes a spawn rule and produces a spawn plan.
49 *
50 * @details Evaluates the given rule against current game state and
51 * produces a SpawnPlan indicating how many entities should be spawned.
52 * A plan with `amount == 0` indicates the rule's conditions were not met.
53 *
54 * @param updateContext Current frame context with delta time and world access.
55 * @param spawnContext Context information for the spawn operation.
56 * @param spawnProfileId The profile ID associated with this rule.
57 * @param spawnRule The rule to evaluate.
58 * @param spawnRuleState Mutable state for the rule (timers, counts).
59 *
60 * @return SpawnPlan with amount > 0 if spawn should occur, otherwise amount == 0
61 */
68 ) noexcept = 0;
69
70
71 };
72
73}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.