Struct EntityId_t

Struct Documentation

struct EntityId_t

Structure EntityId_t, entity id part of GUID_t.

Public Functions

inline EntityId_t()

Default constructor. Unknown entity.

inline EntityId_t(uint32_t id)

Main constructor.

Parameters

id – Entity id

inline EntityId_t(const EntityId_t &id)

Copy constructor.

inline EntityId_t(EntityId_t &&id)

Move constructor.

inline EntityId_t &operator=(const EntityId_t &id)
inline EntityId_t &operator=(EntityId_t &&id)
inline EntityId_t &operator=(uint32_t id)

Assignment operator.

Parameters

id – Entity id to copy

inline void reverse()
inline uint32_t to_uint32() const

conversion to uint32_t

Returns

uint32_t representation

inline bool is_reader() const
inline bool is_writer() const
inline bool operator<(const EntityId_t &other) const

Entity Id minor operator

Parameters

other – Second entity id to compare

Returns

True if other is higher than this

Public Members

octet value[size]

Public Static Functions

static inline EntityId_t unknown()
static inline int cmp(const EntityId_t &entity1, const EntityId_t &entity2)

Entity Id compare static method.

Parameters
  • entity1 – First entity id to compare

  • entity2 – Second entity id to compare

Returns

0 if entity1 is equal to entity2 .

Returns

< 0 if entity1 is lower than entity2 .

Returns

> 0 if entity1 is higher than entity2 .

Public Static Attributes

static constexpr unsigned int size = 4