kima2/src/core/entity.cpp

20 lines
402 B
C++
Raw Normal View History

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 13:03:25 +02:00
void Entity::createUuidFromString(const std::string& uuid_string)
2018-07-06 10:54:44 +02:00
{
2018-07-09 13:03:25 +02:00
boost::uuids::string_generator generator{};
uuid = generator(uuid_string);
2018-07-05 16:29:43 +02:00
}