Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::KoduAction Class Reference

Kodu Action (derived from Kodu Behavior). More...

#include <KoduAction.h>

Inheritance diagram for Kodu::KoduAction:

Detailed Description

Kodu Action (derived from Kodu Behavior).

Definition at line 18 of file KoduAction.h.

List of all members.

Public Types

enum  ActionTypes {
  AT_DO_NOTHING = 0, AT_DROP, AT_GRAB, AT_GIVE,
  AT_MOTION, AT_PAGE_SWITCH, AT_PLAY, AT_SAY,
  AT_SCORING
}
 

The different action types.

More...

Public Member Functions

 KoduAction (const std::string &kActionName, ActionTypes actType, bool actionCanUseOnceMod, bool runOnce)
 Constructor.
 KoduAction (const KoduAction &kAction)
 Copy constructor.
virtual ~KoduAction ()
 Destructor.
KoduActionoperator= (const KoduAction &kAction)
 Assignment operator.
bool canRun () const
 Returns whether or not the action can ran.
bool onceModIsEnabled () const
 Checks if the once modifier is enabled.
virtual void reinitialize ()
 Used to reinitialize certain variables (e.g. when switching to another page).
ActionTypes getActionType () const
 Returns the action type.
virtual void printAttrs () const
 Prints the attributes for a particular behavior.
void setKoduState (const KoduState &curstate)

Private Attributes

ActionTypes actionType
 states the action type
bool onceModEnabled
 states if the once modifier is enabled (depends on action type too)
KoduState state

Member Enumeration Documentation

The different action types.

Enumerator:
AT_DO_NOTHING 
AT_DROP 
AT_GRAB 
AT_GIVE 
AT_MOTION 
AT_PAGE_SWITCH 
AT_PLAY 
AT_SAY 
AT_SCORING 

Definition at line 21 of file KoduAction.h.


Constructor & Destructor Documentation

Kodu::KoduAction::KoduAction ( const std::string &  kActionName,
ActionTypes  actType,
bool  actionCanUseOnceMod,
bool  runOnce 
)

Constructor.

Definition at line 34 of file KoduAction.h.

Kodu::KoduAction::KoduAction ( const KoduAction kAction  )  [explicit]

Copy constructor.

Definition at line 39 of file KoduAction.h.

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

Destructor.

Definition at line 44 of file KoduAction.h.


Member Function Documentation

bool Kodu::KoduAction::canRun (  )  const

Returns whether or not the action can ran.

Definition at line 59 of file KoduAction.h.

ActionTypes Kodu::KoduAction::getActionType (  )  const

Returns the action type.

Definition at line 79 of file KoduAction.h.

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

bool Kodu::KoduAction::onceModIsEnabled (  )  const

Checks if the once modifier is enabled.

Definition at line 64 of file KoduAction.h.

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

KoduAction& Kodu::KoduAction::operator= ( const KoduAction kAction  ) 

Assignment operator.

Definition at line 48 of file KoduAction.h.

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

Prints the attributes for a particular behavior.

Reimplemented from Kodu::KoduPrimitive.

Reimplemented in Kodu::KoduActionDoNothing, Kodu::KoduActionDrop, Kodu::KoduActionGive, Kodu::KoduActionGrab, Kodu::KoduActionPageSwitch, Kodu::KoduActionPlay, Kodu::KoduActionSay, and Kodu::KoduActionScore.

Definition at line 82 of file KoduAction.h.

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

Used to reinitialize certain variables (e.g. when switching to another page).

Reimplemented from Kodu::KoduPrimitive.

Reimplemented in Kodu::KoduActionDoNothing, Kodu::KoduActionDrop, Kodu::KoduActionGive, Kodu::KoduActionGrab, Kodu::KoduActionMotion, Kodu::KoduActionPageSwitch, Kodu::KoduActionPlay, Kodu::KoduActionSay, and Kodu::KoduActionScore.

Definition at line 69 of file KoduAction.h.

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

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

Definition at line 87 of file KoduAction.h.

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


Member Data Documentation

states the action type

Definition at line 92 of file KoduAction.h.

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

states if the once modifier is enabled (depends on action type too)

Definition at line 93 of file KoduAction.h.

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

Definition at line 94 of file KoduAction.h.

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


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