CPP03 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
FragTrap クラス

Represents a FragTrap robot, a specialized type derived from ClapTrap. [詳解]

#include <FragTrap.hpp>

FragTrap の継承関係図
Inheritance graph
FragTrap 連携図
Collaboration graph

公開メンバ関数

 FragTrap ()
 Default constructor implementation for FragTrap.
 
 FragTrap (const std::string &name)
 String constructor implementation for FragTrap.
 
 FragTrap (const FragTrap &other)
 Copy constructor implementation for FragTrap.
 
virtual ~FragTrap ()
 Virtual destructor implementation for FragTrap.
 
FragTrapoperator= (const FragTrap &other)
 
virtual void attack (const std::string &target)
 Attack function implementation for FragTrap.
 
void highFivesGuys (void)
 highFivesGuys function implementation for FragTrap.
 
 FragTrap ()
 
 FragTrap (const std::string &name)
 
 FragTrap (const FragTrap &other)
 
FragTrapoperator= (const FragTrap &other)
 
virtual ~FragTrap ()
 
virtual void attack (const std::string &target)
 Attack function implementation.
 
void highFivesGuys (void)
 
- 基底クラス ClapTrap に属する継承公開メンバ関数
 ClapTrap ()
 Default constructor implementation.
 
 ClapTrap (const std::string &name)
 String constructor implementation.
 
 ClapTrap (const ClapTrap &other)
 Copy constructor implementation.
 
 ~ClapTrap ()
 Destructor implementation.
 
ClapTrapoperator= (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::stringgetName () 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.
 
ClapTrapoperator= (const ClapTrap &other)
 
void takeDamage (unsigned int amount)
 
void beRepaired (unsigned int amount)
 
const std::stringgetName () 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.
 
ClapTrapoperator= (const ClapTrap &other)
 
void takeDamage (unsigned int amount)
 
void beRepaired (unsigned int amount)
 
const std::stringgetName () 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.
 
ClapTrapoperator= (const ClapTrap &other)
 
virtual ~ClapTrap ()
 
void takeDamage (unsigned int amount)
 
void beRepaired (unsigned int amount)
 
virtual const std::stringgetName () const
 
unsigned int getHitPoints () const
 
unsigned int getEnergyPoints () const
 
unsigned int getAttackDamage () const
 

静的公開変数類

static const unsigned int defaultHitPoints = 100
 
static const unsigned int defaultEnergyPoints = 100
 
static const unsigned int defaultAttackDamage = 30
 
- 基底クラス ClapTrap に属する継承静的公開変数類
static const unsigned int defaultHitPoints = 10
 
static const unsigned int defaultEnergyPoints = 10
 
static const unsigned int defaultAttackDamage = 0
 

詳解

Represents a FragTrap robot, a specialized type derived from ClapTrap.

FragTrap inherits from ClapTrap but has different default attributes (hit points: 100, energy points: 100, attack damage: 30) and a unique 'highFivesGuys' functionality. Its constructors, destructor, and attack() method also print distinct messages.

FragTrap.hpp38 行目に定義があります。

構築子と解体子

◆ FragTrap() [1/6]

FragTrap::FragTrap ( )

Default constructor implementation for FragTrap.

FragTrap.cpp28 行目に定義があります。

◆ FragTrap() [2/6]

FragTrap::FragTrap ( const std::string newName)

String constructor implementation for FragTrap.

引数
nameThe name for the FragTrap.
newNameThe newName for the FragTrap.

FragTrap.cpp40 行目に定義があります。

◆ FragTrap() [3/6]

FragTrap::FragTrap ( const FragTrap other)

Copy constructor implementation for FragTrap.

引数
otherThe FragTrap object to copy.

FragTrap.cpp51 行目に定義があります。

◆ ~FragTrap() [1/2]

FragTrap::~FragTrap ( )
virtual

Virtual destructor implementation for FragTrap.

FragTrap.cpp58 行目に定義があります。

◆ FragTrap() [4/6]

FragTrap::FragTrap ( )

◆ FragTrap() [5/6]

FragTrap::FragTrap ( const std::string name)

◆ FragTrap() [6/6]

FragTrap::FragTrap ( const FragTrap other)

◆ ~FragTrap() [2/2]

virtual FragTrap::~FragTrap ( )
virtual

関数詳解

◆ attack() [1/2]

void FragTrap::attack ( const std::string target)
virtual

Attack function implementation for FragTrap.

引数
targetThe target of the attack.

ClapTrapを再実装しています。

DiamondTrapで再実装されています。

FragTrap.cpp81 行目に定義があります。

◆ attack() [2/2]

virtual void FragTrap::attack ( const std::string target)
virtual

Attack function implementation.

ClapTrapを再実装しています。

DiamondTrapで再実装されています。

◆ highFivesGuys() [1/2]

void FragTrap::highFivesGuys ( void  )

highFivesGuys function implementation for FragTrap.

FragTrap.cpp96 行目に定義があります。

◆ highFivesGuys() [2/2]

void FragTrap::highFivesGuys ( void  )

◆ operator=() [1/2]

FragTrap & FragTrap::operator= ( const FragTrap other)

FragTrap.cpp69 行目に定義があります。

◆ operator=() [2/2]

FragTrap & FragTrap::operator= ( const FragTrap other)

メンバ詳解

◆ defaultAttackDamage

const unsigned int FragTrap::defaultAttackDamage = 30
static

FragTrap.hpp42 行目に定義があります。

◆ defaultEnergyPoints

const unsigned int FragTrap::defaultEnergyPoints = 100
static

FragTrap.hpp41 行目に定義があります。

◆ defaultHitPoints

const unsigned int FragTrap::defaultHitPoints = 100
static

FragTrap.hpp40 行目に定義があります。


このクラス詳解は次のファイルから抽出されました: