having fun with virtual dtors
This commit is contained in:
parent
847e8aa8ba
commit
98fdffe5fb
4 changed files with 4 additions and 5 deletions
|
@ -5,7 +5,7 @@ class Entity
|
|||
{
|
||||
public:
|
||||
enum class State { NEW, UPDATE, DELETE, OK };
|
||||
//virtual ~Entity() = 0;
|
||||
virtual ~Entity() = default;
|
||||
void setState(State state) { state_ = state; }
|
||||
virtual State getState() const;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ class EntityInt : public Entity
|
|||
{
|
||||
public:
|
||||
EntityInt() = default;
|
||||
virtual ~EntityInt() = default;
|
||||
EntityInt(int id);
|
||||
void setId(int id);
|
||||
int getId() const { return id_; };
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include <boost/uuid/uuid_generators.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
|
||||
EntityUuid::~EntityUuid() = default;
|
||||
|
||||
void EntityUuid::createUuid()
|
||||
{
|
||||
static boost::uuids::random_generator generator{};
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
class EntityUuid : public Entity
|
||||
{
|
||||
public:
|
||||
// Entity() = default;
|
||||
virtual ~EntityUuid() = 0;
|
||||
EntityUuid() = default;
|
||||
virtual ~EntityUuid() = default;
|
||||
|
||||
void createUuid();
|
||||
void setUuidFromString(const std::string& uuidString);
|
||||
|
|
Loading…
Reference in a new issue