Public Types

deAIConditionLogic Class Reference

AI Condition Logic Class. More...

#include <deAIConditionLogic.h>

Inheritance diagram for deAIConditionLogic:
deAICondition deObject

List of all members.

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.
deAIConditionGetConditionAt (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.

Detailed Description

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.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Member Enumeration Documentation

Logic operators.

Enumerator:
eloAnd 

Use And logic.

eloOr 

Use Or logic.


Constructor & Destructor Documentation

deAIConditionLogic::deAIConditionLogic (  )

Creates a new ai condition.

virtual deAIConditionLogic::~deAIConditionLogic (  ) [virtual]

Cleans up the ai condition.


Member Function Documentation

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.


The documentation for this class was generated from the following file: