From d321a5d95e620a62e5ed42c6047e3fa14697da5c Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Fri, 13 Jul 2018 13:05:36 +0200 Subject: [PATCH] source no added --- src/core/entity.cpp | 8 ++++++++ src/core/entity.h | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/core/entity.cpp b/src/core/entity.cpp index 08614df..f203599 100644 --- a/src/core/entity.cpp +++ b/src/core/entity.cpp @@ -22,4 +22,12 @@ void Entity::setUuidFromString(const std::string& uuidString) inline Entity::State Entity::getState() const { return state_; +} + +void Entity::setSourceNo(int sourceNo) { + sourceNo_ = sourceNo; +} + +int Entity::getSourceNo() const { + return sourceNo_; } \ No newline at end of file diff --git a/src/core/entity.h b/src/core/entity.h index 11890c6..7c37fbf 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -12,15 +12,20 @@ class Entity enum class State { NEW, UPDATE, DELETE, OK }; virtual ~Entity() = 0; - const boost::uuids::uuid& getUuid() const { return uuid_; }; + void createUuid(); void setUuidFromString(const std::string& uuidString); - virtual State getState() const; void setState(State state) { state_ = state; } + void setSourceNo(int sourceNo); + + const boost::uuids::uuid& getUuid() const { return uuid_; }; + virtual State getState() const; + virtual int getSourceNo() const; private: boost::uuids::uuid uuid_{}; State state_{State::NEW}; + int sourceNo_{}; }; #endif // ENTITY_H \ No newline at end of file