This class represents a rule. More...
Header: | #include <Rule> |
Rule() | |
QList<RuleAction> | actions() const |
bool | active() const |
bool | enabled() const |
QList<EventDescriptor> | eventDescriptors() const |
bool | executable() const |
QList<RuleAction> | exitActions() const |
RuleId | id() const |
bool | isConsistent() const |
bool | isValid() const |
QString | name() const |
void | setActions(const QList<RuleAction> actions) |
void | setEnabled(const bool & enabled) |
void | setEventDescriptors(const QList<EventDescriptor> & eventDescriptors) |
void | setExecutable(const bool & executable) |
void | setExitActions(const QList<RuleAction> exitActions) |
void | setId(const RuleId & ruleId) |
void | setName(const QString & name) |
void | setStateEvaluator(const StateEvaluator & stateEvaluator) |
void | setTimeDescriptor(const TimeDescriptor & timeDescriptor) |
StateEvaluator | stateEvaluator() const |
bool | statesActive() const |
bool | timeActive() const |
TimeDescriptor | timeDescriptor() const |
This class represents a rule.
A Rule is always triggered by an EventDescriptor, has States to be compared and RuleActions to be executed.
See also EventDescriptor, State, and RuleAction.
Constructs an empty, invalid Rule.
Returns the RuleActions to be executed when this Rule is matched and states match.
See also setActions().
Returns true if the rule is active.
Returns true if the rule is enabled.
See also setEnabled().
Returns the EventDescriptor for this Rule.
See also setEventDescriptors().
Returns true if the rule is executable.
See also setExecutable().
Returns the RuleActions to be executed when this Rule leaves the active state.
See also setExitActions().
Returns the id of this Rule.
See also setId().
Returns true if this Rule is consistent.
Returns true if this Rule is valid. A Rule with a valid id() is valid.
Returns the name of this rule.
See also setName().
Sets the actions of this Rule.
See also actions().
Set the enabled flag of this rule. In order to actually enable/disable the rule you still need to update the RuleEngine
See also enabled().
Sets the eventDescriptors of this Rule.
See also eventDescriptors().
Set the rule executable.
See also executable().
Sets the exitActions of this Rule.
See also exitActions().
Sets the ruleId of this Rule.
See also id().
Sets the name of this Rule.
See also name().
Sets the stateEvaluator of this Rule.
See also stateEvaluator().
Sets the timeDescriptor of this Rule.
See also timeDescriptor().
Returns the StateEvaluator that needs to evaluate successfully in order for this to Rule apply.
See also setStateEvaluator().
Returns true if the rule is active regarding the StateEvaluator evaluation.
Returns true if the rule is active regarding the TimeDescriptor evaluation.
Returns the TimeDescriptor or this Rule.
See also setTimeDescriptor().