RuleExtensionMixin

A mixin object for IRules that extends the IRule with other IRules.  Some rules, in particular, rules related to the startup and initialization of the Game data and the board, want to allow plugin modules to be able to add their own plugin-specific extensions to the IRule, without having to have any knowledge of, or the ability to keep track of, any other plugin modules that want to do the same.  The RuleExtensionMixin meets this need.

If an IRule is derived from RuleExtensionMixin, it can choose to execute all available extension rules by calling the ExecuteExtensions function.  The ExecuteExtensions function iterates through all of the mixed-in rule names stored in the BaseMixin hash map, calling each of them via the RuleEngine.  This allows plugin modules to provide their own plugin-specific extensions to IRules that need it.

Derived From

BaseMixin

Project

RulesCore

Include

RuleExtensionMixin.h

Summary
A mixin object for IRules that extends the IRule with other IRules.
Executes all of the mixed-in IRule extensions.

Protected

Summary
Executes all of the mixed-in IRule extensions.

Functions

ExecuteExtensions

void ExecuteExtensions(const DataObject &object)

Executes all of the mixed-in IRule extensions.  Iterates through all of the mixin names stored in the BaseMixin hash map and calls the RuleEngine to execute each of them.

Parameters

objectThe DataObject to pass to each mixed-in IRule.
The interface for a single game rule.
void ExecuteExtensions(const DataObject &object)
Executes all of the mixed-in IRule extensions.
Still volatile.
The base class for any IRule or ILogic mixin objects.
The default implementation of the IRuleEngine interface.
RulesCore is the HOSS of Cities3D.
A generic container for passing any kind of data around.