MoveCommand Class Reference

#include <Command.h>

Inheritance diagram for MoveCommand:

Command List of all members.

Public Member Functions

 MoveCommand (Person *person, xDirection xDir)
 MoveCommand (List *command)
void execute ()
std::string getString ()

Static Public Member Functions

static std::string id ()

Private Attributes

Person_person
xDirection _xDir

Static Private Attributes

static const std::string _id = "move"

Detailed Description

Definition at line 65 of file Command.h.


Constructor & Destructor Documentation

MoveCommand::MoveCommand Person person,
xDirection  xDir
 

Definition at line 11 of file MoveCommand.cpp.

MoveCommand::MoveCommand List command  ) 
 

Definition at line 16 of file MoveCommand.cpp.

References _person, _xDir, List::firstInt(), List::firstString(), Level::getObject(), Level::instance(), and List::rest().


Member Function Documentation

void MoveCommand::execute  )  [virtual]
 

Implements Command.

Definition at line 23 of file MoveCommand.cpp.

References _person, _xDir, Person::getAccel(), Person::incrVelocity(), and Person::setXDirection().

std::string MoveCommand::getString  )  [virtual]
 

Implements Command.

Definition at line 29 of file MoveCommand.cpp.

References _id, _person, _xDir, List::getString(), Object::id(), and List::snoc().

static std::string MoveCommand::id  )  [inline, static]
 

Definition at line 73 of file Command.h.

References _id.

Referenced by Command::loadCommand().


Member Data Documentation

const std::string MoveCommand::_id = "move" [static, private]
 

Definition at line 78 of file Command.h.

Referenced by getString(), and id().

Person* MoveCommand::_person [private]
 

Definition at line 75 of file Command.h.

Referenced by execute(), getString(), and MoveCommand().

xDirection MoveCommand::_xDir [private]
 

Definition at line 76 of file Command.h.

Referenced by execute(), getString(), and MoveCommand().


The documentation for this class was generated from the following files:
Generated on Sat Apr 22 15:05:21 2006 for ProjectX by  doxygen 1.4.6-NO