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
26class 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
Represents a Weapon with a specific type.
Definition Weapon.hpp:26
const std::string & getType() const
Gets the type of the weapon.
Definition Weapon.cpp:40
~Weapon()
Destructor for the Weapon class.
Definition Weapon.cpp:33
void setType(const std::string &newType)
Sets the type of the weapon.
Definition Weapon.cpp:47