Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::KoduConditionTimer Class Reference

#include <KoduConditionTimer.h>

Inheritance diagram for Kodu::KoduConditionTimer:

Detailed Description

Definition at line 24 of file KoduConditionTimer.h.

List of all members.

Public Member Functions

 KoduConditionTimer (bool useNot, const NumericGenerator &kNumericGen)
 Constructor.
 KoduConditionTimer (const KoduConditionTimer &kCondition)
 Copy constructor.
 ~KoduConditionTimer ()
 Destructor.
KoduConditionTimeroperator= (const KoduConditionTimer &kCondition)
 Assignment operator.
virtual bool evaluate (const KoduWorld &)
 Checks if the timer threshold has been reached or exceeded.
virtual void reinitialize ()
 Used to reinitialize certain variables each condition and action type.
virtual void printAttrs () const
 Prints the attributes of a particular instance.
float getTimeInSec ()
 Gets the behavior runtime in seconds.

Static Public Member Functions

static bool isSameTypeAs (const KoduPrimitive *)
 Tests if the primitive argument is the same as the calling class.

Private Attributes

NumericGenerator numericGen
 returns a constant or random timer value
float timerThreshold
 amount of time needed to past
bool notModifierEnabled
 states if the not modifier is in use
bool needToInitialize
 used to initialize start time
float currentTime
 most recent time request
float startTime
 used for time elapsed calculation

Constructor & Destructor Documentation

Kodu::KoduConditionTimer::KoduConditionTimer ( bool  useNot,
const NumericGenerator kNumericGen 
)

Constructor.

Definition at line 27 of file KoduConditionTimer.h.

Kodu::KoduConditionTimer::KoduConditionTimer ( const KoduConditionTimer kCondition  ) 

Copy constructor.

Definition at line 38 of file KoduConditionTimer.h.

Kodu::KoduConditionTimer::~KoduConditionTimer (  ) 

Destructor.

Definition at line 49 of file KoduConditionTimer.h.


Member Function Documentation

bool Kodu::KoduConditionTimer::evaluate ( const KoduWorld kWorldState  )  [virtual]

Checks if the timer threshold has been reached or exceeded.

Implements Kodu::KoduCondition.

Definition at line 7 of file KoduConditionTimer.cc.

float Kodu::KoduConditionTimer::getTimeInSec (  ) 

Gets the behavior runtime in seconds.

Definition at line 51 of file KoduConditionTimer.cc.

Referenced by evaluate().

bool Kodu::KoduConditionTimer::isSameTypeAs ( const KoduPrimitive kPrimitive  )  [static]

Tests if the primitive argument is the same as the calling class.

Reimplemented from Kodu::KoduPrimitive.

Definition at line 34 of file KoduConditionTimer.cc.

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

Assignment operator.

Definition at line 54 of file KoduConditionTimer.h.

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

Prints the attributes of a particular instance.

Reimplemented from Kodu::KoduCondition.

Definition at line 43 of file KoduConditionTimer.cc.

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

Used to reinitialize certain variables each condition and action type.

Reimplemented from Kodu::KoduCondition.

Definition at line 38 of file KoduConditionTimer.cc.


Member Data Documentation

most recent time request

Definition at line 87 of file KoduConditionTimer.h.

Referenced by evaluate(), operator=(), and printAttrs().

used to initialize start time

Definition at line 86 of file KoduConditionTimer.h.

Referenced by evaluate(), operator=(), and reinitialize().

states if the not modifier is in use

Definition at line 85 of file KoduConditionTimer.h.

Referenced by evaluate(), operator=(), and printAttrs().

returns a constant or random timer value

Definition at line 83 of file KoduConditionTimer.h.

Referenced by evaluate(), operator=(), and printAttrs().

used for time elapsed calculation

Definition at line 88 of file KoduConditionTimer.h.

Referenced by evaluate(), operator=(), and printAttrs().

amount of time needed to past

Definition at line 84 of file KoduConditionTimer.h.

Referenced by evaluate(), operator=(), and printAttrs().


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

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