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

Represents a HumanA, who always has a weapon. [詳解]

#include <HumanA.hpp>

HumanA 連携図
Collaboration graph

公開メンバ関数

 HumanA (std::string name, Weapon &weapon)
 Constructor for the HumanA class.
 
 ~HumanA ()
 Destructor for the HumanA class.
 
void attack () const
 Makes the HumanA attack.
 

詳解

Represents a HumanA, who always has a weapon.

HumanA.hpp26 行目に定義があります。

構築子と解体子

◆ HumanA()

HumanA::HumanA ( std::string  name,
Weapon weapon 
)

Constructor for the HumanA class.

Initializes a HumanA object with a name and a weapon.

引数
nameThe name of the HumanA.
weaponA reference to the Weapon the HumanA is holding.

HumanA.cpp29 行目に定義があります。

◆ ~HumanA()

HumanA::~HumanA ( )

Destructor for the HumanA class.

HumanA.cpp36 行目に定義があります。

関数詳解

◆ attack()

void HumanA::attack ( ) const

Makes the HumanA attack.

Makes the HumanA attack with their weapon.

Prints a message indicating the HumanA's name and the type of weapon they are using.

HumanA.cpp43 行目に定義があります。


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