EnTT 3.14.0
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
entt::basic_meta_sequence_container_traits< Type > Struct Template Reference

General purpose implementation of meta sequence container traits. More...

#include <container.hpp>

Public Types

using size_type = typename meta_sequence_container::size_type
 Unsigned integer type.
 
using iterator = typename meta_sequence_container::iterator
 Meta iterator type.
 

Static Public Member Functions

static size_type size (const void *container)
 Returns the number of elements in a container.
 
static bool clear (void *container)
 Clears a container.
 
static bool reserve (void *container, const size_type sz)
 Increases the capacity of a container.
 
static bool resize (void *container, const size_type sz)
 Resizes a container.
 
static iterator begin (const meta_ctx &area, void *container, const void *as_const)
 Returns a possibly const iterator to the beginning.
 
static iterator end (const meta_ctx &area, void *container, const void *as_const)
 Returns a possibly const iterator to the end.
 
static iterator insert (const meta_ctx &area, void *container, const void *value, const void *cref, const iterator &it)
 Assigns one element to a container and constructs its object from a given opaque instance.
 
static iterator erase (const meta_ctx &area, void *container, const iterator &it)
 Erases an element from a container.
 

Static Public Attributes

static constexpr bool fixed_size = internal::fixed_size_sequence_container_v<Type>
 True in case of key-only containers, false otherwise.
 

Detailed Description

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

General purpose implementation of meta sequence container traits.

Template Parameters
TypeType of underlying sequence container.

Definition at line 62 of file container.hpp.

Member Typedef Documentation

◆ iterator

Meta iterator type.

Definition at line 68 of file container.hpp.

◆ size_type

Unsigned integer type.

Definition at line 66 of file container.hpp.

Member Function Documentation

◆ begin()

template<typename Type >
static iterator entt::basic_meta_sequence_container_traits< Type >::begin ( const meta_ctx & area,
void * container,
const void * as_const )
inlinestatic

Returns a possibly const iterator to the beginning.

Parameters
areaThe context to pass to the newly created iterator.
containerOpaque pointer to a container of the given type.
as_constConst opaque pointer fallback.
Returns
An iterator to the first element of the container.

Definition at line 133 of file container.hpp.

◆ clear()

template<typename Type >
static bool entt::basic_meta_sequence_container_traits< Type >::clear ( void * container)
inlinestatic

Clears a container.

Parameters
containerOpaque pointer to a container of the given type.
Returns
True in case of success, false otherwise.

Definition at line 87 of file container.hpp.

◆ end()

template<typename Type >
static iterator entt::basic_meta_sequence_container_traits< Type >::end ( const meta_ctx & area,
void * container,
const void * as_const )
inlinestatic

Returns a possibly const iterator to the end.

Parameters
areaThe context to pass to the newly created iterator.
containerOpaque pointer to a container of the given type.
as_constConst opaque pointer fallback.
Returns
An iterator that is past the last element of the container.

Definition at line 145 of file container.hpp.

◆ erase()

template<typename Type >
static iterator entt::basic_meta_sequence_container_traits< Type >::erase ( const meta_ctx & area,
void * container,
const iterator & it )
inlinestatic

Erases an element from a container.

Parameters
areaThe context to pass to the newly created iterator.
containerOpaque pointer to a container of the given type.
itAn opaque iterator to the element to erase.
Returns
A possibly invalid iterator following the last removed element.

Definition at line 180 of file container.hpp.

◆ insert()

template<typename Type >
static iterator entt::basic_meta_sequence_container_traits< Type >::insert ( const meta_ctx & area,
void * container,
const void * value,
const void * cref,
const iterator & it )
inlinestatic

Assigns one element to a container and constructs its object from a given opaque instance.

Parameters
areaThe context to pass to the newly created iterator.
containerOpaque pointer to a container of the given type.
valueOptional opaque instance of the object to construct (as value type).
crefOptional opaque instance of the object to construct (as decayed const reference type).
itIterator before which the element will be inserted.
Returns
A possibly invalid iterator to the inserted element.

Definition at line 162 of file container.hpp.

◆ reserve()

template<typename Type >
static bool entt::basic_meta_sequence_container_traits< Type >::reserve ( void * container,
const size_type sz )
inlinestatic

Increases the capacity of a container.

Parameters
containerOpaque pointer to a container of the given type.
szDesired capacity.
Returns
True in case of success, false otherwise.

Definition at line 102 of file container.hpp.

◆ resize()

template<typename Type >
static bool entt::basic_meta_sequence_container_traits< Type >::resize ( void * container,
const size_type sz )
inlinestatic

Resizes a container.

Parameters
containerOpaque pointer to a container of the given type.
szThe new number of elements.
Returns
True in case of success, false otherwise.

Definition at line 117 of file container.hpp.

◆ size()

template<typename Type >
static size_type entt::basic_meta_sequence_container_traits< Type >::size ( const void * container)
inlinestatic

Returns the number of elements in a container.

Parameters
containerOpaque pointer to a container of the given type.
Returns
Number of elements.

Definition at line 78 of file container.hpp.

Member Data Documentation

◆ fixed_size

template<typename Type >
constexpr bool entt::basic_meta_sequence_container_traits< Type >::fixed_size = internal::fixed_size_sequence_container_v<Type>
staticconstexpr

True in case of key-only containers, false otherwise.

Definition at line 71 of file container.hpp.


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