CPP04 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Ice.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* Ice.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/06/02 00:52:01 by kamitsui #+# #+# */
9/* Updated: 2025/06/02 00:52:04 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
23#ifndef ICE_HPP
24#define ICE_HPP
25
26#include "AMateria.hpp" // Inherits from AMateria
27
36class Ice : public AMateria {
37 public:
38 Ice();
39 Ice(const Ice &other);
40 Ice &operator=(const Ice &other);
41 virtual ~Ice();
42
43 virtual AMateria *clone() const;
44 virtual void use(ICharacter &target);
45};
46
47#endif
Declares the AMateria abstract base class.
Represents an abstract base class for all magical materias.
Definition AMateria.hpp:42
An interface for any character that can interact with Materias.
Represents an ice-based offensive magic materia.
Definition Ice.hpp:36
virtual AMateria * clone() const
Creates a new, identical instance of an Ice materia. This method overrides the clone() pure virtual f...
Definition Ice.cpp:63
Ice()
Default constructor for Ice. Initializes the materia type to "ice" and displays a construction messag...
Definition Ice.cpp:29
Ice & operator=(const Ice &other)
Copy assignment operator for Ice. Assigns values from another Ice object by calling the base class as...
Definition Ice.cpp:46
virtual ~Ice()
Destroys the Ice object. Displays a destruction message.
Definition Ice.cpp:56
virtual void use(ICharacter &target)
Uses the Ice materia to shoot an ice bolt at the target character. This method overrides the use() vi...
Definition Ice.cpp:71