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

Represents a healing magic materia. [詳解]

#include <Cure.hpp>

Cure の継承関係図
Inheritance graph
Cure 連携図
Collaboration graph

公開メンバ関数

 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.
 
Cureoperator= (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 AMateriaclone () 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 AMateriaoperator= (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.hpp36 行目に定義があります。

構築子と解体子

◆ Cure() [1/2]

Cure::Cure ( )

Default constructor for Cure. Initializes the materia type to "cure".

Cure.cpp29 行目に定義があります。

◆ Cure() [2/2]

Cure::Cure ( const Cure other)

Copy constructor for Cure. Calls the AMateria base class copy constructor.

引数
otherThe Cure object to copy from.

Cure.cpp36 行目に定義があります。

◆ ~Cure()

Cure::~Cure ( )
virtual

Destroys the Cure object.

Cure.cpp54 行目に定義があります。

関数詳解

◆ clone()

AMateria * Cure::clone ( ) const
virtual

Creates a new, identical instance of a Cure materia.

戻り値
A pointer to a new Cure object.

AMateriaを実装しています。

Cure.cpp60 行目に定義があります。

◆ operator=()

Cure & 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.

引数
otherThe Cure object to assign from.
戻り値
A reference to the assigned Cure object.

Cure.cpp45 行目に定義があります。

◆ use()

void Cure::use ( ICharacter target)
virtual

Uses the Cure materia to heal the target character. Prints a message indicating that the target's wounds are healed.

引数
targetThe ICharacter object whose wounds will be healed.

AMateriaを再実装しています。

Cure.cpp67 行目に定義があります。


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