CPP01
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Weapon.hpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* Weapon.hpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/04/15 19:40:47 by kamitsui #+# #+# */
9
/* Updated: 2025/04/23 01:41:43 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
18
#ifndef WEAPON_HPP
19
#define WEAPON_HPP
20
21
#include <
string
>
22
26
class
Weapon
{
27
private
:
28
std::string
type;
29
30
public
:
34
Weapon
(
std::string
type);
35
39
~Weapon
();
40
44
const
std::string
&
getType
()
const
;
45
49
void
setType
(
const
std::string
&newType);
50
};
51
52
#endif
string
std::basic_string
Weapon
Represents a Weapon with a specific type.
Definition
Weapon.hpp:26
Weapon::getType
const std::string & getType() const
Gets the type of the weapon.
Definition
Weapon.cpp:40
Weapon::~Weapon
~Weapon()
Destructor for the Weapon class.
Definition
Weapon.cpp:33
Weapon::setType
void setType(const std::string &newType)
Sets the type of the weapon.
Definition
Weapon.cpp:47
ex03
Weapon.hpp
構築:
1.9.8