- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# MoveCommand Class Reference

`#include <Command.h>`

Inheritance diagram for MoveCommand:

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
std::string | _person
xDirection | _xDir
## Static Private Attributes
static const std::string | _id = "move"

## Detailed Description

Definition at line 68 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(), 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(), Level::getObject(), Person::incrVelocity(), Level::instance(), and Person::setXDirection().

std::string MoveCommand::getString | ( |  | ) | `[virtual]`

| Implements Command. Definition at line 33 of file MoveCommand.cpp. References _id, _person, _xDir, List::getString(), and List::snoc().

static std::string MoveCommand::id | ( |  | ) | `[inline, static]`

| Definition at line 76 of file Command.h. References _id. Referenced by Command::loadCommand().

## Member Data Documentation

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

| Definition at line 82 of file Command.h. Referenced by getString(), and id().

std::string MoveCommand::_person`[private]`

| Definition at line 79 of file Command.h. Referenced by execute(), getString(), and MoveCommand().

xDirection MoveCommand::_xDir`[private]`

| Definition at line 80 of file Command.h. Referenced by execute(), getString(), and MoveCommand().

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

- C:/Documents and Settings/jegan/Desktop/projectX/Command.h
- C:/Documents and Settings/jegan/Desktop/projectX/MoveCommand.cpp