- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# AimCommand Class Reference

`#include <Command.h>`

Inheritance diagram for AimCommand:

List of all members.

## Public Member Functions
| AimCommand (Person *person, yDirection yDir)
| AimCommand (Person *person, Object *target=NULL)
| AimCommand (List *command)
void | execute ()
std::string | getString ()
## Static Public Member Functions
static std::string | id ()
## Private Attributes
std::string | _person
yDirection | _yDir
xDirection | _xDir
Object * | _target
## Static Private Attributes
static const std::string | _id = "aim"

## Detailed Description

Definition at line 291 of file Command.h.

## Constructor & Destructor Documentation

AimCommand::AimCommand | ( | Person * | person,
|  | yDirection | yDir
| ) |

| Definition at line 13 of file AimCommand.cpp.

AimCommand::AimCommand | ( | Person * | person,
|  | Object * | target = `NULL`
| ) |

| Definition at line 20 of file AimCommand.cpp. References _target, Level::getPlayer(), and Level::instance().

AimCommand::AimCommand | ( | List * | command | ) |

| Definition at line 29 of file AimCommand.cpp. References _person, _target, _yDir, List::firstInt(), List::firstList(), List::firstString(), and List::rest().

## Member Function Documentation

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

| Implements Command. Definition at line 46 of file AimCommand.cpp. References _person, _target, _yDir, Person::aim(), Object::getBox(), Level::getObject(), Level::instance(), glfuncs::intersectX(), and MIDDLE.

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

| Implements Command. Definition at line 72 of file AimCommand.cpp. References _id, _person, _target, _yDir, List::getString(), Object::id(), and List::snoc().

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

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

## Member Data Documentation

const string AimCommand::_id = "aim"`[static, private]`

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

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

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

Object* AimCommand::_target`[private]`

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

xDirection AimCommand::_xDir`[private]`

| Definition at line 305 of file Command.h.

yDirection AimCommand::_yDir`[private]`

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