- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# RunFromPlayerInRangeCommand Class Reference

`#include <Command.h>`

Inheritance diagram for RunFromPlayerInRangeCommand:

List of all members.

## Public Member Functions
| RunFromPlayerInRangeCommand (Person *person, int range)
| RunFromPlayerInRangeCommand (List *command)
void | execute ()
std::string | getString ()
## Static Public Member Functions
static std::string | id ()
## Private Attributes
Person * | _person
int | _range
## Static Private Attributes
static const std::string | _id = "runFromPlayerInRange"

## Detailed Description

Definition at line 161 of file Command.h.

## Constructor & Destructor Documentation

RunFromPlayerInRangeCommand::RunFromPlayerInRangeCommand | ( | Person * | person,
|  | int | range
| ) |

| Definition at line 14 of file RunFromPlayerInRangeCommand.cpp.

RunFromPlayerInRangeCommand::RunFromPlayerInRangeCommand | ( | List * | command | ) |

| Definition at line 19 of file RunFromPlayerInRangeCommand.cpp. References _person, _range, List::firstInt(), List::firstString(), Level::getObject(), Level::instance(), and List::rest().

## Member Function Documentation

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

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

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

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

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

| Definition at line 169 of file Command.h. References _id.

## Member Data Documentation

const std::string RunFromPlayerInRangeCommand::_id = "runFromPlayerInRange"`[static, private]`

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

Person* RunFromPlayerInRangeCommand::_person`[private]`

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

int RunFromPlayerInRangeCommand::_range`[private]`

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

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