|
CPP04 1.0
|
Represents a healing magic materia. [詳解]
#include <Cure.hpp>


公開メンバ関数 | |
| Cure () | |
| Default constructor for Cure. Initializes the materia type to "cure". | |
| Cure (const Cure &other) | |
| Copy constructor for Cure. Calls the AMateria base class copy constructor. | |
| Cure & | operator= (const Cure &other) |
| Copy assignment operator for Cure. Assigns values from another Cure object by calling the base class assignment operator. Handles self-assignment implicitly via base operator. | |
| virtual | ~Cure () |
| Destroys the Cure object. | |
| virtual AMateria * | clone () const |
| Creates a new, identical instance of a Cure materia. | |
| virtual void | use (ICharacter &target) |
| Uses the Cure materia to heal the target character. Prints a message indicating that the target's wounds are healed. | |
基底クラス AMateria に属する継承公開メンバ関数 | |
| AMateria (std::string const &type) | |
| Constructs an AMateria object with a specified type. | |
| AMateria (const AMateria &other) | |
| Copy constructor for AMateria. Performs a shallow copy of the type from another AMateria object. | |
| virtual | ~AMateria () |
| Destroys the AMateria object. | |
| virtual AMateria & | operator= (const AMateria &rhs) |
| Copy assignment operator for AMateria. Assigns the type from another AMateria object. Handles self-assignment. | |
| std::string const & | getType () const |
| Gets the type of the materia. | |
その他の継承メンバ | |
基底クラス AMateria に属する継承限定公開変数類 | |
| std::string const | type |
Represents a healing magic materia.
The Cure class is a concrete implementation of AMateria. It specializes the generic materia behavior to provide healing when used on a character. It correctly implements the orthodox canonical class form and overrides necessary virtual functions from its base.
| Cure::Cure | ( | ) |
| Cure::Cure | ( | const Cure & | other | ) |
|
virtual |
|
virtual |
Uses the Cure materia to heal the target character. Prints a message indicating that the target's wounds are healed.
| target | The ICharacter object whose wounds will be healed. |
AMateriaを再実装しています。