26 lines
626 B
C++
26 lines
626 B
C++
#ifndef CREATURELIB_HISTORYELEMENT_HPP
|
|
#define CREATURELIB_HISTORYELEMENT_HPP
|
|
|
|
#include "../HistoryElementKind.hpp"
|
|
|
|
namespace CreatureLib::Battling {
|
|
class HistoryElement {
|
|
friend class HistoryHolder;
|
|
HistoryElement* _previous;
|
|
|
|
protected:
|
|
virtual void Clear() {
|
|
if (_previous != nullptr) {
|
|
_previous->Clear();
|
|
}
|
|
}
|
|
|
|
public:
|
|
virtual HistoryElementKind GetKind() const noexcept = 0;
|
|
ArbUt::BorrowedPtr<const HistoryElement> GetPrevious() const noexcept { return _previous; }
|
|
};
|
|
|
|
}
|
|
|
|
#endif // CREATURELIB_HISTORYELEMENT_HPP
|