Object::Action Class Reference

Possible object actions. More...

#include <Object.h>

List of all members.

Public Types

 FIRST_ACTION = 1
 Never use this constant unless you need smallest usable value.
 WAIT = FIRST_ACTION
 Do nothing.
 GO
 Make one step.
 TURN_LEFT
 Turn left.
 TURN_RIGHT
 Turn right.
 TURN_BACK
 Turn back.
 TAKE_OBJECT
 Take object from it's place.
 DROP_OBJECT
 Drop carrying object.
 EXPIRED_REMOVE
 Object is no longer valid.
enum  Actions {
  FIRST_ACTION = 1, WAIT = FIRST_ACTION, GO, TURN_LEFT,
  TURN_RIGHT, TURN_BACK, TAKE_OBJECT, DROP_OBJECT,
  EXPIRED_REMOVE
}
 Possible actions. More...

Public Member Functions

 Action (Actions action=WAIT)
 Default constructor.
 Action (int action)
 Constructor - creates action from int (config reasons).
 ~Action ()
 Destructor.
Actions GetAction () const
 Returns current action.
void SetAction (Actions newAction)
 Set new action.

Private Attributes

Actions currentAction
 Current action.


Detailed Description

Possible object actions.

Note: Some of derived objects from Object are (of course) unable to perform specific actions, e.g. walls cannot move etc. but that's handled by virtual method SetAction().


Member Enumeration Documentation

enum Object::Action::Actions

Possible actions.

Enumerator:
FIRST_ACTION  Never use this constant unless you need smallest usable value.
WAIT  Do nothing.
GO  Make one step.
TURN_LEFT  Turn left.
TURN_RIGHT  Turn right.
TURN_BACK  Turn back.
TAKE_OBJECT  Take object from it's place.
DROP_OBJECT  Drop carrying object.
EXPIRED_REMOVE  Object is no longer valid.


Constructor & Destructor Documentation

Object::Action::Action ( Actions  action = WAIT  )  [inline]

Default constructor.

Parameters:
action Action

Object::Action::Action ( int  action  )  [inline, explicit]

Constructor - creates action from int (config reasons).

Parameters:
action Action

Object::Action::~Action (  )  [inline]

Destructor.


Member Function Documentation

Actions Object::Action::GetAction (  )  const [inline]

Returns current action.

void Object::Action::SetAction ( Actions  newAction  )  [inline]

Set new action.

Parameters:
newAction New action


Member Data Documentation

Actions Object::Action::currentAction [private]

Current action.


The documentation for this class was generated from the following file:
Generated on Sun Apr 29 11:46:11 2007 for IPP/ICP2007 by  doxygen 1.4.7