Struct entt_traits< std::uint64_t >

Synopsis

#include <src/entt/entity/entity.hpp>

template<>
struct entt_traits<std::uint64_t>

Description

Entity traits for a 64 bits entity identifier.

A 64 bits entity identifier guarantees:

  • 32 bits for the entity number (an indecently large number).
  • 32 bit for the version (an indecently large number).

Source

Lines 68-83 in src/entt/entity/entity.hpp.

template<>
struct entt_traits<std::uint64_t> {
    /*! @brief Underlying entity type. */
    using entity_type = std::uint64_t;
    /*! @brief Underlying version type. */
    using version_type = std::uint32_t;
    /*! @brief Difference type. */
    using difference_type = std::int64_t;

    /*! @brief Mask to use to get the entity number out of an identifier. */
    static constexpr entity_type entity_mask = 0xFFFFFFFF;
    /*! @brief Mask to use to get the version out of an identifier. */
    static constexpr entity_type version_mask = 0xFFFFFFFF;
    /*! @brief Extent of the entity number within an identifier. */
    static constexpr std::size_t entity_shift = 32u;
};





Add Discussion

Log in to comment