diff --git a/src/core/entity.cpp b/src/core/entity.cpp index c2a0313..6a6e5d8 100644 --- a/src/core/entity.cpp +++ b/src/core/entity.cpp @@ -19,7 +19,7 @@ void Entity::createUuidFromString(const std::string& uuidString) uuid_ = generator(uuidString); } -inline Entity::State Entity::getState() +inline Entity::State Entity::getState() const { return state_; } \ No newline at end of file diff --git a/src/core/entity.h b/src/core/entity.h index d67cc73..786d393 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -4,17 +4,19 @@ #include #include +#include class Entity { public: - enum class State { NEW, UPDATED, READ }; - // Entity(); + enum class State { NEW, UPDATED, CLEAN }; + virtual ~Entity() = 0; const boost::uuids::uuid& getUuid() const { return uuid_; }; void createUuid(); void createUuidFromString(const std::string& uuidString); - State getState(); + virtual State getState() const; + void setState(State state) { state_ = state; } private: boost::uuids::uuid uuid_{};