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

An interface for objects that can learn Materia templates and create new Materias. [詳解]

#include <IMateriaSource.hpp>

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

公開メンバ関数

virtual ~IMateriaSource ()
 Virtual destructor for the IMateriaSource interface. Ensures proper cleanup of derived class objects when deleted through an IMateriaSource pointer. It has an empty implementation here as it's an interface.
 
virtual void learnMateria (AMateria *)=0
 Learns a Materia template for later creation. This is a pure virtual function, requiring derived classes to implement it. The MateriaSource should make its own copy of the passed Materia.
 
virtual AMateriacreateMateria (std::string const &type) const =0
 Creates a new Materia based on a learned type. This is a pure virtual function, requiring derived classes to implement it.
 

詳解

An interface for objects that can learn Materia templates and create new Materias.

The IMateriaSource interface is a pure abstract class, meaning it cannot be instantiated directly. Its purpose is to define a contract for entities that act as a source of Materias. Any class implementing IMateriaSource must provide concrete implementations for all its pure virtual methods, ensuring a consistent way to manage Materia templates and create new instances polymorphically.

IMateriaSource.hpp46 行目に定義があります。

構築子と解体子

◆ ~IMateriaSource()

virtual IMateriaSource::~IMateriaSource ( )
inlinevirtual

Virtual destructor for the IMateriaSource interface. Ensures proper cleanup of derived class objects when deleted through an IMateriaSource pointer. It has an empty implementation here as it's an interface.

IMateriaSource.hpp53 行目に定義があります。

関数詳解

◆ createMateria()

virtual AMateria * IMateriaSource::createMateria ( std::string const &  type) const
pure virtual

Creates a new Materia based on a learned type. This is a pure virtual function, requiring derived classes to implement it.

引数
typeThe string type of the Materia to create (e.g., "ice", "cure").
戻り値
A pointer to a newly created AMateria object of the specified type, or NULL if the type is unknown.

MateriaSourceで実装されています。

◆ learnMateria()

virtual void IMateriaSource::learnMateria ( AMateria )
pure virtual

Learns a Materia template for later creation. This is a pure virtual function, requiring derived classes to implement it. The MateriaSource should make its own copy of the passed Materia.

(AMateria *) A pointer to the AMateria object to be learned as a template.

MateriaSourceで実装されています。


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