CPP03 1.0
|
Represents a ScavTrap robot, a specialized type derived from ClapTrap. [詳解]
#include <ScavTrap.hpp>
公開メンバ関数 | |
ScavTrap () | |
Default constructor implementation for ScavTrap. | |
ScavTrap (const std::string &name) | |
String constructor implementation for ScavTrap. | |
ScavTrap (const ScavTrap &other) | |
Copy constructor implementation for ScavTrap. | |
virtual | ~ScavTrap () |
Virtual destructor implementation for ScavTrap. | |
ScavTrap & | operator= (const ScavTrap &other) |
Copy assignment operator implementation for ScavTrap. | |
virtual void | attack (const std::string &target) |
Attack function implementation for ScavTrap. | |
void | guardGate () |
guardGate function implementation for ScavTrap. | |
ScavTrap () | |
ScavTrap (const std::string &name) | |
ScavTrap (const ScavTrap &other) | |
virtual | ~ScavTrap () |
ScavTrap & | operator= (const ScavTrap &other) |
virtual void | attack (const std::string &target) |
Attack function implementation. | |
void | guardGate () |
ScavTrap () | |
ScavTrap (const std::string &name) | |
ScavTrap (const ScavTrap &other) | |
ScavTrap & | operator= (const ScavTrap &other) |
virtual | ~ScavTrap () |
virtual void | attack (const std::string &target) |
Attack function implementation. | |
void | guardGate () |
![]() | |
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) |
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) |
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 () |
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 = 100 |
static const unsigned int | defaultEnergyPoints = 50 |
static const unsigned int | defaultAttackDamage = 20 |
![]() | |
static const unsigned int | defaultHitPoints = 10 |
static const unsigned int | defaultEnergyPoints = 10 |
static const unsigned int | defaultAttackDamage = 0 |
Represents a ScavTrap robot, a specialized type derived from ClapTrap.
ScavTrap inherits from ClapTrap but has different default attributes (hit points: 100, energy points: 50, attack damage: 20) and a unique 'guardGate' functionality. Its constructors, destructor, and attack() method also print distinct messages.
ScavTrap.hpp の 38 行目に定義があります。
ScavTrap::ScavTrap | ( | ) |
Default constructor implementation for ScavTrap.
ScavTrap.cpp の 28 行目に定義があります。
ScavTrap::ScavTrap | ( | const std::string & | newName | ) |
String constructor implementation for ScavTrap.
ScavTrap.cpp の 40 行目に定義があります。
ScavTrap::ScavTrap | ( | const ScavTrap & | other | ) |
Copy constructor implementation for ScavTrap.
other | The ScavTrap object to copy. |
ScavTrap.cpp の 51 行目に定義があります。
|
virtual |
Virtual destructor implementation for ScavTrap.
ScavTrap.cpp の 58 行目に定義があります。
ScavTrap::ScavTrap | ( | ) |
ScavTrap::ScavTrap | ( | const std::string & | name | ) |
ScavTrap::ScavTrap | ( | const ScavTrap & | other | ) |
|
virtual |
ScavTrap::ScavTrap | ( | ) |
ScavTrap::ScavTrap | ( | const std::string & | name | ) |
ScavTrap::ScavTrap | ( | const ScavTrap & | other | ) |
|
virtual |
|
virtual |
Attack function implementation for ScavTrap.
target | The target of the attack. |
ClapTrapを再実装しています。
DiamondTrapで再実装されています。
ScavTrap.cpp の 77 行目に定義があります。
|
virtual |
|
virtual |
void ScavTrap::guardGate | ( | ) |
guardGate function implementation for ScavTrap.
ScavTrap.cpp の 92 行目に定義があります。
void ScavTrap::guardGate | ( | ) |
void ScavTrap::guardGate | ( | ) |
Copy assignment operator implementation for ScavTrap.
other | The ScavTrap object to assign from. |
ScavTrap.cpp の 65 行目に定義があります。
|
static |
ScavTrap.hpp の 42 行目に定義があります。
|
static |
ScavTrap.hpp の 41 行目に定義があります。
|
static |
ScavTrap.hpp の 40 行目に定義があります。