- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# FollowPlayerCommand Class Reference

`#include <Command.h>`

Inheritance diagram for FollowPlayerCommand:

List of all members.

## Public Member Functions
| FollowPlayerCommand (Person *person)
| FollowPlayerCommand (List *command)
void | execute ()
std::string | getString ()
## Static Public Member Functions
static std::string | id ()
## Private Attributes
Person * | _person
## Static Private Attributes
static const std::string | _id = "followPlayer"

## Detailed Description

Definition at line 130 of file Command.h.

## Constructor & Destructor Documentation

FollowPlayerCommand::FollowPlayerCommand | ( | Person * | person | ) |

| Definition at line 13 of file FollowPlayerCommand.cpp.

FollowPlayerCommand::FollowPlayerCommand | ( | List * | command | ) |

| Definition at line 18 of file FollowPlayerCommand.cpp. References _person, List::firstString(), Level::getObject(), Level::instance(), and List::rest().

## Member Function Documentation

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

| Implements Command. Definition at line 23 of file FollowPlayerCommand.cpp. References _person, Object::getBox(), Level::getPlayer(), Level::instance(), LEFT, and RIGHT.

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

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

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

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

## Member Data Documentation

const std::string FollowPlayerCommand::_id = "followPlayer"`[static, private]`

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

Person* FollowPlayerCommand::_person`[private]`

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

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