kima2/src/core/entity.cpp

33 lines
600 B
C++

#include "entity.h"
#include <iostream>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
Entity::~Entity() = default;
void Entity::createUuid()
{
static boost::uuids::random_generator generator{};
uuid_ = generator();
}
void Entity::setUuidFromString(const std::string& uuidString)
{
boost::uuids::string_generator generator{};
uuid_ = generator(uuidString);
}
Entity::State Entity::getState() const
{
return state_;
}
void Entity::setSourceNo(int sourceNo) {
sourceNo_ = sourceNo;
}
int Entity::getSourceNo() const {
return sourceNo_;
}