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

Represents an ice-based offensive magic materia. [詳解]

#include <Ice.hpp>

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

公開メンバ関数

 Ice ()
 Default constructor for Ice. Initializes the materia type to "ice" and displays a construction message.
 
 Ice (const Ice &other)
 Copy constructor for Ice. Invokes the base AMateria copy constructor to copy the type. Displays a copy construction message.
 
Iceoperator= (const Ice &other)
 Copy assignment operator for Ice. Assigns values from another Ice object by calling the base class assignment operator. Displays a copy assignment message. Handles self-assignment implicitly via base operator.
 
virtual ~Ice ()
 Destroys the Ice object. Displays a destruction message.
 
virtual AMateriaclone () const
 Creates a new, identical instance of an Ice materia. This method overrides the clone() pure virtual function from AMateria.
 
virtual void use (ICharacter &target)
 Uses the Ice materia to shoot an ice bolt at the target character. This method overrides the use() virtual function from AMateria. Prints a message indicating the ice bolt attack on the target.
 
- 基底クラス 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 an ice-based offensive magic materia.

The Ice class is a concrete implementation of AMateria. It specializes the generic materia behavior to cast an ice bolt when used on a character. It correctly implements the orthodox canonical class form and overrides necessary virtual functions from its base.

Ice.hpp36 行目に定義があります。

構築子と解体子

◆ Ice() [1/2]

Ice::Ice ( )

Default constructor for Ice. Initializes the materia type to "ice" and displays a construction message.

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

◆ Ice() [2/2]

Ice::Ice ( const Ice other)

Copy constructor for Ice. Invokes the base AMateria copy constructor to copy the type. Displays a copy construction message.

引数
otherThe Ice object to copy from.

Ice.cpp37 行目に定義があります。

◆ ~Ice()

Ice::~Ice ( )
virtual

Destroys the Ice object. Displays a destruction message.

Ice.cpp56 行目に定義があります。

関数詳解

◆ clone()

AMateria * Ice::clone ( ) const
virtual

Creates a new, identical instance of an Ice materia. This method overrides the clone() pure virtual function from AMateria.

戻り値
A pointer to a newly created Ice object.

AMateriaを実装しています。

Ice.cpp63 行目に定義があります。

◆ operator=()

Ice & Ice::operator= ( const Ice other)

Copy assignment operator for Ice. Assigns values from another Ice object by calling the base class assignment operator. Displays a copy assignment message. Handles self-assignment implicitly via base operator.

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

Ice.cpp46 行目に定義があります。

◆ use()

void Ice::use ( ICharacter target)
virtual

Uses the Ice materia to shoot an ice bolt at the target character. This method overrides the use() virtual function from AMateria. Prints a message indicating the ice bolt attack on the target.

引数
targetThe ICharacter object at whom the ice bolt is shot.

AMateriaを再実装しています。

Ice.cpp71 行目に定義があります。


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