- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# TurnCommand Class Reference

`#include <Command.h>`

Inheritance diagram for TurnCommand:

List of all members.

## Public Member Functions
| TurnCommand (Person *person, xDirection xDir)
| TurnCommand (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 = "turn"

## Detailed Description

Definition at line 85 of file Command.h.

## Constructor & Destructor Documentation

TurnCommand::TurnCommand | ( | Person * | person,
|  | xDirection | xDir
| ) |

| Definition at line 11 of file TurnCommand.cpp.

TurnCommand::TurnCommand | ( | List * | command | ) |

| Definition at line 16 of file TurnCommand.cpp. References _person, _xDir, List::firstInt(), List::firstString(), Level::getObject(), Level::instance(), and List::rest().

## Member Function Documentation

void TurnCommand::execute | ( |  | ) | `[virtual]`

| Implements Command. Definition at line 23 of file TurnCommand.cpp. References _person, _xDir, and Person::setXDirection().

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

| Implements Command. Definition at line 28 of file TurnCommand.cpp. References _id, _person, _xDir, List::getString(), Object::id(), and List::snoc().

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

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

## Member Data Documentation

const std::string TurnCommand::_id = "turn"`[static, private]`

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

Person* TurnCommand::_person`[private]`

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

xDirection TurnCommand::_xDir`[private]`

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

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/TurnCommand.cpp