Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::KoduCondition Class Reference

Kodu Condition (derived from Kodu Primitive). More...

#include <KoduCondition.h>

Inheritance diagram for Kodu::KoduCondition:

Detailed Description

Kodu Condition (derived from Kodu Primitive).

Definition at line 17 of file KoduCondition.h.

List of all members.

Public Types

enum  ConditionTypes {
  CT_ALWAYS = 0, CT_BUMP, CT_GOT, CT_SCORED,
  CT_SEE, CT_TIMER, CT_GAMEPAD, CT_HEAR
}

Public Member Functions

 KoduCondition (const std::string &kConditionName, ConditionTypes condType)
 Constructor.
 KoduCondition (const KoduCondition &kCondition)
 Copy constructor.
virtual ~KoduCondition ()
 Destructor.
KoduConditionoperator= (const KoduCondition &kCondition)
 Assignment operator.
virtual bool evaluate (const KoduWorld &)=0
 Evaluates the event portion of the rule (implementation in derived classes).
bool canEvaluate () const
virtual void reinitialize ()
 Used to reinitialize certain variables during, for example, switching to another page.
ConditionTypes getConditionType () const
 Returns the condition type.
virtual void printAttrs () const
 Prints the attributes of a particular instance.
void setKoduState (const KoduState &curstate)
const KoduStategetState () const

Protected Attributes

ConditionTypes conditionType
 the condition type
KoduState state

Member Enumeration Documentation

Enumerator:
CT_ALWAYS 
CT_BUMP 
CT_GOT 
CT_SCORED 
CT_SEE 
CT_TIMER 
CT_GAMEPAD 
CT_HEAR 

Definition at line 19 of file KoduCondition.h.


Constructor & Destructor Documentation

Kodu::KoduCondition::KoduCondition ( const std::string &  kConditionName,
ConditionTypes  condType 
)

Constructor.

Definition at line 31 of file KoduCondition.h.

Kodu::KoduCondition::KoduCondition ( const KoduCondition kCondition  ) 

Copy constructor.

Definition at line 37 of file KoduCondition.h.

virtual Kodu::KoduCondition::~KoduCondition (  )  [virtual]

Destructor.

Definition at line 43 of file KoduCondition.h.


Member Function Documentation

bool Kodu::KoduCondition::canEvaluate (  )  const

Definition at line 60 of file KoduCondition.h.

virtual bool Kodu::KoduCondition::evaluate ( const KoduWorld  )  [pure virtual]
ConditionTypes Kodu::KoduCondition::getConditionType (  )  const

Returns the condition type.

Definition at line 70 of file KoduCondition.h.

Referenced by Kodu::Parser::KodeCreator::createKode(), and KoduInterpreter::KoduConditionEvaluator::doStart().

const KoduState& Kodu::KoduCondition::getState (  )  const

Definition at line 84 of file KoduCondition.h.

KoduCondition& Kodu::KoduCondition::operator= ( const KoduCondition kCondition  ) 

Assignment operator.

Definition at line 48 of file KoduCondition.h.

virtual void Kodu::KoduCondition::printAttrs (  )  const [virtual]

Prints the attributes of a particular instance.

Reimplemented from Kodu::KoduPrimitive.

Reimplemented in Kodu::KoduConditionAlways, Kodu::KoduConditionBump, Kodu::KoduConditionGot, Kodu::KoduConditionHear, Kodu::KoduConditionScored, Kodu::KoduConditionSee, and Kodu::KoduConditionTimer.

Definition at line 75 of file KoduCondition.h.

virtual void Kodu::KoduCondition::reinitialize (  )  [virtual]

Used to reinitialize certain variables during, for example, switching to another page.

Reimplemented from Kodu::KoduPrimitive.

Reimplemented in Kodu::KoduConditionAlways, Kodu::KoduConditionBump, Kodu::KoduConditionGot, Kodu::KoduConditionHear, Kodu::KoduConditionScored, Kodu::KoduConditionSee, and Kodu::KoduConditionTimer.

Definition at line 65 of file KoduCondition.h.

Referenced by Kodu::KoduRule::reinitializePrimitives().

void Kodu::KoduCondition::setKoduState ( const KoduState curstate  ) 

Definition at line 80 of file KoduCondition.h.

Referenced by KoduInterpreter::KoduConditionEvaluator::doStart().


Member Data Documentation

the condition type

Definition at line 87 of file KoduCondition.h.

Referenced by getConditionType(), and operator=().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:23 2016 by Doxygen 1.6.3