- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# AddHealthCommand Class Reference

`#include <Command.h>`

Inheritance diagram for AddHealthCommand:

List of all members.

## Public Member Functions
| AddHealthCommand (Person *person, int dHealth)
| AddHealthCommand (List *command)
void | execute ()
std::string | getString ()
## Static Public Member Functions
static std::string | id ()
## Private Attributes
Person * | _person
int | _dHealth
## Static Private Attributes
static const std::string | _id = "addHealth"

## Detailed Description

Definition at line 312 of file Command.h.

## Constructor & Destructor Documentation

AddHealthCommand::AddHealthCommand | ( | Person * | person,
|  | int | dHealth
| ) |

| Definition at line 13 of file AddHealthCommand.cpp.

AddHealthCommand::AddHealthCommand | ( | List * | command | ) |

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

## Member Function Documentation

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

| Implements Command. Definition at line 25 of file AddHealthCommand.cpp. References _dHealth, _person, and Person::addHealth().

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

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

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

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

## Member Data Documentation

int AddHealthCommand::_dHealth`[private]`

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

const string AddHealthCommand::_id = "addHealth"`[static, private]`

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

Person* AddHealthCommand::_person`[private]`

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