CPP03 1.0
|
Represents a basic robot character. [詳解]
#include <ClapTrap.hpp>
公開メンバ関数 | |
ClapTrap () | |
Default constructor implementation. | |
ClapTrap (const std::string &name) | |
String constructor implementation. | |
ClapTrap (const ClapTrap &other) | |
Copy constructor implementation. | |
~ClapTrap () | |
Destructor implementation. | |
ClapTrap & | operator= (const ClapTrap &other) |
Copy assignment operator implementation. | |
void | attack (const std::string &target) |
Attack function implementation. | |
void | takeDamage (unsigned int amount) |
takeDamage function implementation. | |
void | beRepaired (unsigned int amount) |
beRepaired function implementation. | |
const std::string & | getName () const |
Gets the name of the ClapTrap. | |
unsigned int | getHitPoints () const |
Gets the current hit points of the ClapTrap. | |
unsigned int | getEnergyPoints () const |
Gets the current energy points of the ClapTrap. | |
unsigned int | getAttackDamage () const |
Gets the attack damage of the ClapTrap. | |
ClapTrap () | |
ClapTrap (const std::string &name) | |
ClapTrap (const ClapTrap &other) | |
virtual | ~ClapTrap () |
Destructor implementation. | |
ClapTrap & | operator= (const ClapTrap &other) |
virtual void | attack (const std::string &target) |
Attack function implementation. | |
void | takeDamage (unsigned int amount) |
void | beRepaired (unsigned int amount) |
const std::string & | getName () const |
Gets the name of the ClapTrap. | |
unsigned int | getHitPoints () const |
Gets the current hit points of the ClapTrap. | |
unsigned int | getEnergyPoints () const |
Gets the current energy points of the ClapTrap. | |
unsigned int | getAttackDamage () const |
Gets the attack damage of the ClapTrap. | |
ClapTrap () | |
ClapTrap (const std::string &name) | |
ClapTrap (const ClapTrap &other) | |
virtual | ~ClapTrap () |
Destructor implementation. | |
ClapTrap & | operator= (const ClapTrap &other) |
virtual void | attack (const std::string &target) |
Attack function implementation. | |
void | takeDamage (unsigned int amount) |
void | beRepaired (unsigned int amount) |
const std::string & | getName () const |
Gets the name of the ClapTrap. | |
unsigned int | getHitPoints () const |
Gets the current hit points of the ClapTrap. | |
unsigned int | getEnergyPoints () const |
Gets the current energy points of the ClapTrap. | |
unsigned int | getAttackDamage () const |
Gets the attack damage of the ClapTrap. | |
ClapTrap () | |
ClapTrap (const std::string &name) | |
ClapTrap (const ClapTrap &other) | |
ClapTrap (const std::string &name, unsigned int hp, unsigned int ep, unsigned int ad) | |
Constructor for the ClapTrap class with specified attributes. | |
ClapTrap & | operator= (const ClapTrap &other) |
virtual | ~ClapTrap () |
virtual void | attack (const std::string &target) |
void | takeDamage (unsigned int amount) |
void | beRepaired (unsigned int amount) |
virtual const std::string & | getName () const |
unsigned int | getHitPoints () const |
unsigned int | getEnergyPoints () const |
unsigned int | getAttackDamage () const |
静的公開変数類 | |
static const unsigned int | defaultHitPoints = 10 |
static const unsigned int | defaultEnergyPoints = 10 |
static const unsigned int | defaultAttackDamage = 0 |
Represents a basic robot character.
The ClapTrap class has attributes for name, hit points, energy points, and attack damage. It provides functionalities for attacking, taking damage, and repairing itself.
ClapTrap.hpp の 34 行目に定義があります。
ClapTrap::ClapTrap | ( | ) |
Default constructor implementation.
ClapTrap.cpp の 27 行目に定義があります。
ClapTrap::ClapTrap | ( | const std::string & | newName | ) |
String constructor implementation.
ClapTrap.cpp の 35 行目に定義があります。
ClapTrap::ClapTrap | ( | const ClapTrap & | other | ) |
ClapTrap::~ClapTrap | ( | ) |
Destructor implementation.
ClapTrap.cpp の 51 行目に定義があります。
ClapTrap::ClapTrap | ( | ) |
ClapTrap::ClapTrap | ( | const std::string & | name | ) |
ClapTrap::ClapTrap | ( | const ClapTrap & | other | ) |
|
virtual |
Destructor implementation.
ClapTrap::ClapTrap | ( | ) |
ClapTrap::ClapTrap | ( | const std::string & | name | ) |
ClapTrap::ClapTrap | ( | const ClapTrap & | other | ) |
|
virtual |
Destructor implementation.
ClapTrap::ClapTrap | ( | ) |
ClapTrap::ClapTrap | ( | const std::string & | name | ) |
ClapTrap::ClapTrap | ( | const ClapTrap & | other | ) |
ClapTrap::ClapTrap | ( | const std::string & | newName, |
unsigned int | hp, | ||
unsigned int | ep, | ||
unsigned int | ad | ||
) |
Constructor for the ClapTrap class with specified attributes.
newName | The newName to assign to the ClapTrap. |
hp | The initial hit points of the ClapTrap. |
ep | The initial energy points of the ClapTrap. |
ad | The initial attack damage of the ClapTrap. |
Initializes a ClapTrap object with the given newName, hit points, energy points, and attack damage.
ClapTrap.cpp の 67 行目に定義があります。
|
virtual |
void ClapTrap::attack | ( | const std::string & | target | ) |
|
virtual |
|
virtual |
|
virtual |
void ClapTrap::beRepaired | ( | unsigned int | amount | ) |
beRepaired function implementation.
amount | The amount of hit points to regain. |
ClapTrap.cpp の 108 行目に定義があります。
void ClapTrap::beRepaired | ( | unsigned int | amount | ) |
void ClapTrap::beRepaired | ( | unsigned int | amount | ) |
void ClapTrap::beRepaired | ( | unsigned int | amount | ) |
unsigned int ClapTrap::getAttackDamage | ( | ) | const |
unsigned int ClapTrap::getAttackDamage | ( | ) | const |
Gets the attack damage of the ClapTrap.
unsigned int ClapTrap::getAttackDamage | ( | ) | const |
Gets the attack damage of the ClapTrap.
unsigned int ClapTrap::getAttackDamage | ( | ) | const |
unsigned int ClapTrap::getEnergyPoints | ( | ) | const |
Gets the current energy points of the ClapTrap.
ClapTrap.cpp の 138 行目に定義があります。
unsigned int ClapTrap::getEnergyPoints | ( | ) | const |
Gets the current energy points of the ClapTrap.
unsigned int ClapTrap::getEnergyPoints | ( | ) | const |
Gets the current energy points of the ClapTrap.
unsigned int ClapTrap::getEnergyPoints | ( | ) | const |
unsigned int ClapTrap::getHitPoints | ( | ) | const |
Gets the current hit points of the ClapTrap.
ClapTrap.cpp の 132 行目に定義があります。
unsigned int ClapTrap::getHitPoints | ( | ) | const |
Gets the current hit points of the ClapTrap.
unsigned int ClapTrap::getHitPoints | ( | ) | const |
Gets the current hit points of the ClapTrap.
unsigned int ClapTrap::getHitPoints | ( | ) | const |
const std::string & ClapTrap::getName | ( | ) | const |
Gets the name of the ClapTrap.
ClapTrap.cpp の 126 行目に定義があります。
const std::string & ClapTrap::getName | ( | ) | const |
Gets the name of the ClapTrap.
const std::string & ClapTrap::getName | ( | ) | const |
Gets the name of the ClapTrap.
|
virtual |
DiamondTrapで再実装されています。
Copy assignment operator implementation.
other | The ClapTrap object to assign from. |
ClapTrap.cpp の 58 行目に定義があります。
void ClapTrap::takeDamage | ( | unsigned int | amount | ) |
takeDamage function implementation.
amount | The amount of damage taken. |
ClapTrap.cpp の 89 行目に定義があります。
void ClapTrap::takeDamage | ( | unsigned int | amount | ) |
void ClapTrap::takeDamage | ( | unsigned int | amount | ) |
void ClapTrap::takeDamage | ( | unsigned int | amount | ) |
|
static |
ClapTrap.hpp の 44 行目に定義があります。
|
static |
ClapTrap.hpp の 43 行目に定義があります。
|
static |
ClapTrap.hpp の 42 行目に定義があります。