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.world.GameWorld;
12import helios.engine.runtime.spawn.types.SpawnContext;
13import helios.engine.runtime.spawn.scheduling.SpawnPlan;
14import helios.engine.runtime.spawn.types.SpawnProfileId;
15import helios.engine.runtime.spawn.policy.SpawnRule;
16import helios.engine.runtime.spawn.policy.SpawnRuleState;
17
18
22
24
25 /**
26 * @brief Abstract interface for processing spawn rules into spawn plans.
27 *
28 * @details RuleProcessor defines the contract for evaluating a single spawn
29 * rule and producing a SpawnPlan. This abstraction allows different processing
30 * strategies to be plugged into schedulers.
31 *
32 * ## Responsibilities
33 *
34 * - Retrieve pool and profile information from the game world
35 * - Update the rule's state (timers, counts)
36 * - Evaluate the rule's conditions
37 * - Produce a SpawnPlan if conditions are met
38 *
39 * @see DefaultRuleProcessor
40 * @see SpawnScheduler
41 * @see SpawnRule
42 */
44
45 public:
46
47 /**
48 * @brief Virtual destructor for proper cleanup.
49 */
50 virtual ~RuleProcessor() = default;
51
52 /**
53 * @brief Processes a spawn rule and produces a spawn plan.
54 *
55 * @details Evaluates the given rule against current game state and
56 * produces a SpawnPlan indicating how many entities should be spawned.
57 * A plan with `amount == 0` indicates the rule's conditions were not met.
58 *
59 * @param gameWorld The game world where the rule is processed.
60 * @param updateContext Current frame context with delta time and world access.
61 * @param spawnContext Context information for the spawn operation.
62 * @param spawnProfileId The profile ID associated with this rule.
63 * @param spawnRule The rule to evaluate.
64 * @param spawnRuleState Mutable state for the rule (timers, counts).
65 *
66 * @return SpawnPlan with amount > 0 if spawn should occur, otherwise amount == 0
67 */
69 const GameWorld& gameWorld,
70 const UpdateContext& updateContext,
71 const SpawnContext& spawnContext,
72 const SpawnProfileId spawnProfileId,
73 SpawnRule& spawnRule,
74 SpawnRuleState& spawnRuleState
75 ) noexcept = 0;
76
77
78 };
79
80}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.