Struct Storage

Synopsis

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

template<typename Entity>
struct Storage: type_list<type_info() const ENTT_NOEXCEPT>

Description

Basic poly storage implementation.

Template Parameters

Entity - A valid entity type (see entt_traits for more details).

Mentioned in

Inheritance

Ancestors: type_list

Structures

typeConcept definition.

Source

Lines 20-43 in src/entt/entity/poly_storage.hpp.

template<typename Entity>
struct Storage: type_list<type_info() const ENTT_NOEXCEPT> {
    /**
     * @brief Concept definition.
     * @tparam Base Opaque base class from which to inherit.
     */
    template<typename Base>
    struct type: Base {
        /**
         * @brief Returns a type info for the contained objects.
         * @return The type info for the contained objects.
         */
        type_info value_type() const ENTT_NOEXCEPT {
            return poly_call<0>(*this);
        }
    };

    /**
     * @brief Concept implementation.
     * @tparam Type Type for which to generate an implementation.
     */
    template<typename Type>
    using impl = value_list<&type_id<typename Type::value_type>>;
};





Add Discussion

Log in to comment