2018-07-05 16:29:43 +02:00
|
|
|
#include "entity.h"
|
|
|
|
|
2018-07-09 13:03:25 +02:00
|
|
|
#include <iostream>
|
|
|
|
|
2018-07-06 10:54:44 +02:00
|
|
|
#include <boost/uuid/uuid_generators.hpp>
|
2018-07-09 13:03:25 +02:00
|
|
|
#include <boost/uuid/uuid_io.hpp>
|
|
|
|
|
|
|
|
Entity::Entity() {}
|
|
|
|
|
|
|
|
void Entity::createUuid()
|
|
|
|
{
|
|
|
|
static boost::uuids::random_generator generator{};
|
|
|
|
uuid = generator();
|
|
|
|
}
|
2018-07-05 16:29:43 +02:00
|
|
|
|
2018-07-09 16:07:04 +02:00
|
|
|
void Entity::createUuidFromString(const std::string& uuidString)
|
2018-07-06 10:54:44 +02:00
|
|
|
{
|
2018-07-09 13:03:25 +02:00
|
|
|
boost::uuids::string_generator generator{};
|
2018-07-09 16:07:04 +02:00
|
|
|
uuid = generator(uuidString);
|
2018-07-05 16:29:43 +02:00
|
|
|
}
|