Clementine
Public Types | Public Member Functions | List of all members
entt::storage_adapter_mixin< Type > Struct Template Reference

Mixin type to use to wrap basic storage classes. More...

#include <entt.hpp>

Inheritance diagram for entt::storage_adapter_mixin< Type >:
Inheritance graph
[legend]
Collaboration diagram for entt::storage_adapter_mixin< Type >:
Collaboration graph
[legend]

Public Types

using value_type = typename Type::value_type
 Type of the objects associated with the entities.
 
using entity_type = typename Type::entity_type
 Underlying entity identifier.
 
using storage_category = typename Type::storage_category
 Storage category.
 

Public Member Functions

template<typename... Args>
decltype(auto) emplace (basic_registry< entity_type > &, const entity_type entity, Args &&... args)
 Assigns entities to a storage. More...
 
template<typename It , typename... Args>
void insert (basic_registry< entity_type > &, It first, It last, Args &&... args)
 Assigns entities to a storage. More...
 
void remove (basic_registry< entity_type > &, const entity_type entity)
 Removes entities from a storage. More...
 
template<typename It >
void remove (basic_registry< entity_type > &, It first, It last)
 Removes entities from a storage. More...
 
template<typename... Func>
decltype(auto) patch (basic_registry< entity_type > &, const entity_type entity, [[maybe_unused]] Func &&... func)
 Patches the given instance for an entity. More...
 

Detailed Description

template<typename Type>
struct entt::storage_adapter_mixin< Type >

Mixin type to use to wrap basic storage classes.

Template Parameters
TypeThe type of the underlying storage.

Member Function Documentation

◆ emplace()

template<typename Type >
template<typename... Args>
decltype(auto) entt::storage_adapter_mixin< Type >::emplace ( basic_registry< entity_type > &  ,
const entity_type  entity,
Args &&...  args 
)
inline

Assigns entities to a storage.

Template Parameters
ArgsTypes of arguments to use to construct the object.
Parameters
entityA valid entity identifier.
argsParameters to use to initialize the object.
Returns
A reference to the newly created object.

◆ insert()

template<typename Type >
template<typename It , typename... Args>
void entt::storage_adapter_mixin< Type >::insert ( basic_registry< entity_type > &  ,
It  first,
It  last,
Args &&...  args 
)
inline

Assigns entities to a storage.

Template Parameters
ItType of input iterator.
ArgsTypes of arguments to use to construct the objects associated with the entities.
Parameters
firstAn iterator to the first element of the range of entities.
lastAn iterator past the last element of the range of entities.
argsParameters to use to initialize the objects associated with the entities.

◆ patch()

template<typename Type >
template<typename... Func>
decltype(auto) entt::storage_adapter_mixin< Type >::patch ( basic_registry< entity_type > &  ,
const entity_type  entity,
[[maybe_unused] ] Func &&...  func 
)
inline

Patches the given instance for an entity.

Template Parameters
FuncTypes of the function objects to invoke.
Parameters
entityA valid entity identifier.
funcValid function objects.
Returns
A reference to the patched instance.

◆ remove() [1/2]

template<typename Type >
void entt::storage_adapter_mixin< Type >::remove ( basic_registry< entity_type > &  ,
const entity_type  entity 
)
inline

Removes entities from a storage.

Parameters
entityA valid entity identifier.

◆ remove() [2/2]

template<typename Type >
template<typename It >
void entt::storage_adapter_mixin< Type >::remove ( basic_registry< entity_type > &  ,
It  first,
It  last 
)
inline

Removes entities from a storage.

Template Parameters
ItType of input iterator.
Parameters
firstAn iterator to the first element of the range of entities.
lastAn iterator past the last element of the range of entities.

The documentation for this struct was generated from the following file: