Files
42_SIDE_exam_05_cpp/cpp_module_01/ASpell.hpp
2022-12-09 13:39:46 +01:00

56 lines
806 B
C++

#ifndef ASPELL_HPP
# define ASPELL_HPP
# include <iostream>
# include <string>
class ATarget;
class ASpell {
private:
std::string name;
std::string effects;
public:
ASpell()
{};
ASpell(ASpell const & other)
{
*this = other;
};
ASpell & operator=(ASpell const & other)
{
this->name = other.name;
this->effects = other.effects;
return (*this);
};
ASpell(std::string const & name, std::string const & effects)
{
this->name = name;
this->effects = effects;
};
virtual ~ASpell()
{};
std::string const & getName() const
{
return (this->name);
};
std::string const & getEffects() const
{
return (this->effects);
};
void launch(ATarget const & atarget) const;
virtual ASpell * clone() const = 0;
};
#include "ATarget.hpp"
#endif