kima2/src/core/entity.cpp

22 lines
424 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>
2018-07-09 17:50:43 +02:00
//Entity::Entity() {}
2018-07-09 13:03:25 +02:00
2018-07-09 20:51:33 +02:00
Entity::~Entity() {}
2018-07-09 13:03:25 +02:00
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
}