CPP04 1.0
|
An interface for objects that can learn Materia templates and create new Materias. [詳解]
#include <IMateriaSource.hpp>
公開メンバ関数 | |
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 AMateria * | createMateria (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.hpp の 46 行目に定義があります。
|
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.hpp の 53 行目に定義があります。
|
pure virtual |
Creates a new Materia based on a learned type. This is a pure virtual function, requiring derived classes to implement it.
type | The string type of the Materia to create (e.g., "ice", "cure"). |
AMateria
object of the specified type, or NULL
if the type is unknown. MateriaSourceで実装されています。
|
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で実装されています。