files renamed
This commit is contained in:
parent
dd23da5f72
commit
46d6468e5c
8 changed files with 80 additions and 11 deletions
35
src/core/entityuuid.h
Normal file
35
src/core/entityuuid.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef ENTITY_UUID_H
|
||||
#define ENTITY_UUID_H
|
||||
|
||||
#include "entity.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
|
||||
class EntityUuid : public Entity
|
||||
{
|
||||
public:
|
||||
// Entity() = default;
|
||||
virtual ~EntityUuid() = 0;
|
||||
|
||||
void createUuid();
|
||||
void setUuidFromString(const std::string& uuidString);
|
||||
void setState(State state) { state_ = state; }
|
||||
void setSourceNo(int sourceNo);
|
||||
|
||||
const boost::uuids::uuid& getUuid() const { return uuid_; };
|
||||
std::string getUuidAsString() const { return boost::uuids::to_string(uuid_); }
|
||||
virtual State getState() const;
|
||||
virtual int getSourceNo() const;
|
||||
|
||||
protected:
|
||||
int sourceNo_{};
|
||||
|
||||
private:
|
||||
boost::uuids::uuid uuid_{};
|
||||
State state_{State::NEW};
|
||||
};
|
||||
|
||||
#endif // ENTITY_UUID_H
|
Loading…
Add table
Add a link
Reference in a new issue