- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# FollowPlayerInRangeCommand Class Reference

`#include <Command.h>`

Inheritance diagram for FollowPlayerInRangeCommand:

List of all members.

## Public Member Functions
| FollowPlayerInRangeCommand (Person *person, int range)
| FollowPlayerInRangeCommand (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 = "followPlayerInRange"

## Detailed Description

Definition at line 145 of file Command.h.

## Constructor & Destructor Documentation

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

| Definition at line 14 of file FollowPlayerInRangeCommand.cpp.

FollowPlayerInRangeCommand::FollowPlayerInRangeCommand | ( | List * | command | ) |

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

## Member Function Documentation

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

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

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

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

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

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

## Member Data Documentation

const std::string FollowPlayerInRangeCommand::_id = "followPlayerInRange"`[static, private]`

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

Person* FollowPlayerInRangeCommand::_person`[private]`

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

int FollowPlayerInRangeCommand::_range`[private]`

| Definition at line 156 of file Command.h. Referenced by execute(), FollowPlayerInRangeCommand(), 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/FollowPlayerInRangeCommand.cpp