The interface for the rule engine. The IRuleEngine manages the database of IRule and ILogic and provides functions for executing IRules or ILogic. All of the data is stored in string-based hash maps so that an IRule or piece of ILogic is executed just by calling Execute or Decide with the name of the IRule or ILogic. IRuleEngine also provides functions for dealing with IRules that can be undone. If the last rule executed is undoable, the CanUndo function returns true. To actually undo the last action, the Undo function is provided. The IRuleEngine is accessible through the GameEngine.
IRuleEngine.h
The interface for the rule engine. | |
Executes the given rule with the given DataObject. | |
Calls the given logic with the given DataObjects. | |
Returns whether there is anything on the undo stack that can be undone. | |
Undoes the last action. | |
The IRuleEngine destructor. |
Executes the given rule with the given DataObject. | |
Calls the given logic with the given DataObjects. | |
Returns whether there is anything on the undo stack that can be undone. | |
Undoes the last action. |
|
Executes the given rule with the given DataObject.
| rule | The name of the IRule to execute. |
| object | The DataObject to pass to the IRule. |
|
Calls the given logic with the given DataObjects.
| logic | The name of the ILogic to call. |
| input | The input DataObject. |
| output | The output DataObject. Must be NULL. |
|
|
| virtual bool CanUndo() const=0 |
| virtual void Undo()=0 |
| virtual ~IRuleEngine()=0 |