20 lines
402 B
C++
20 lines
402 B
C++
#include "entity.h"
|
|
|
|
#include <iostream>
|
|
|
|
#include <boost/uuid/uuid_generators.hpp>
|
|
#include <boost/uuid/uuid_io.hpp>
|
|
|
|
Entity::Entity() {}
|
|
|
|
void Entity::createUuid()
|
|
{
|
|
static boost::uuids::random_generator generator{};
|
|
uuid = generator();
|
|
}
|
|
|
|
void Entity::createUuidFromString(const std::string& uuid_string)
|
|
{
|
|
boost::uuids::string_generator generator{};
|
|
uuid = generator(uuid_string);
|
|
} |