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

Represents a Weapon with a specific type. [詳解]

#include <Weapon.hpp>

Weapon 連携図
Collaboration graph

公開メンバ関数

 Weapon (std::string type)
 Constructor for the Weapon class.
 
 ~Weapon ()
 Destructor for the Weapon class.
 
const std::stringgetType () const
 Gets the type of the weapon.
 
void setType (const std::string &newType)
 Sets the type of the weapon.
 

詳解

Represents a Weapon with a specific type.

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

構築子と解体子

◆ Weapon()

Weapon::Weapon ( std::string  type)

Constructor for the Weapon class.

Initializes a Weapon object with a type.

引数
typeThe type of the weapon.

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

◆ ~Weapon()

Weapon::~Weapon ( )

Destructor for the Weapon class.

Weapon.cpp33 行目に定義があります。

関数詳解

◆ getType()

const std::string & Weapon::getType ( ) const

Gets the type of the weapon.

戻り値
A constant reference to the weapon's type.

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

◆ setType()

void Weapon::setType ( const std::string newType)

Sets the type of the weapon.

引数
newTypeThe new type for the weapon.

Weapon.cpp47 行目に定義があります。


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