AI Condition Logic Class. More...
#include <deAIConditionLogic.h>
Public Types | |
| enum | eLogicOperators { eloAnd, eloOr } |
Logic operators. More... | |
Public Member Functions | |
Constructors and Destructors | |
| deAIConditionLogic () | |
| Creates a new ai condition. | |
| virtual | ~deAIConditionLogic () |
| Cleans up the ai condition. | |
Management | |
| int | GetLogic () const |
| Retrieves the logic. | |
| void | SetLogic (int logic) |
| Sets the logic. | |
Conditions | |
| int | GetConditionCount () const |
| Retrieves the count of conditions. | |
| deAICondition * | GetConditionAt (int index) const |
| Retrieves the condition at the given index. | |
| int | IndexOfCondition (deAICondition *condition) const |
| Retrieves the index of the given condition or -1 if not found. | |
| bool | HasCondition (deAICondition *condition) const |
| Determines if the given condition exists. | |
| void | AddCondition (deAICondition *condition) |
| Adds a condition. | |
| void | RemoveCondition (deAICondition *condition) |
| Removes the given condition. | |
| void | RemoveAllConditions () |
| Removes all conditions. | |
Visiting | |
| virtual void | Visit (deAIConditionVisitor *visitor) |
| Visits the rule. | |
AI Condition Logic Class.
Evaluates multiple conditions using a logic operator. If the operator is the and operator all conditions have to be fulfilled for this condition to be true. For the or operator at least one of the conditions has to be fulfilled.
| deAIConditionLogic::deAIConditionLogic | ( | ) |
Creates a new ai condition.
| virtual deAIConditionLogic::~deAIConditionLogic | ( | ) | [virtual] |
Cleans up the ai condition.
| void deAIConditionLogic::AddCondition | ( | deAICondition * | condition ) |
Adds a condition.
| deAICondition* deAIConditionLogic::GetConditionAt | ( | int | index ) | const |
Retrieves the condition at the given index.
| int deAIConditionLogic::GetConditionCount | ( | ) | const [inline] |
Retrieves the count of conditions.
| int deAIConditionLogic::GetLogic | ( | ) | const [inline] |
Retrieves the logic.
| bool deAIConditionLogic::HasCondition | ( | deAICondition * | condition ) | const |
Determines if the given condition exists.
| int deAIConditionLogic::IndexOfCondition | ( | deAICondition * | condition ) | const |
Retrieves the index of the given condition or -1 if not found.
| void deAIConditionLogic::RemoveAllConditions | ( | ) |
Removes all conditions.
| void deAIConditionLogic::RemoveCondition | ( | deAICondition * | condition ) |
Removes the given condition.
| void deAIConditionLogic::SetLogic | ( | int | logic ) |
Sets the logic.
| virtual void deAIConditionLogic::Visit | ( | deAIConditionVisitor * | visitor ) | [virtual] |
Visits the rule.
Reimplemented from deAICondition.
1.7.2