EnTT: entt::basic_meta_sequence_container_traits< Type > Struct Template Reference

EnTT 3.16.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 | iter (const meta_ctx &area, void *container, const void *as_const, const bool end)
| Returns a possibly const iterator to the beginning or 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 std::size_t | extent = internal::sequence_container_extent_v<Type>
| Number of elements, or meta_dynamic_extent if dynamic.
static constexpr bool | fixed_size = (extent != meta_dynamic_extent)
| True in case of fixed size 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

  Type | Type of underlying sequence container.

Definition at line 65 of file container.hpp.

## Member Typedef Documentation

## ◆ iterator

template<typename Type>

using entt::basic_meta_sequence_container_traits< Type >::iterator = typename meta_sequence_container::iterator

Meta iterator type.

Definition at line 71 of file container.hpp.

## ◆ size_type

template<typename Type>

using entt::basic_meta_sequence_container_traits< Type >::size_type = typename meta_sequence_container::size_type

Unsigned integer type.

Definition at line 69 of file container.hpp.

## Member Function Documentation

## ◆ clear()

template<typename Type>

bool entt::basic_meta_sequence_container_traits< Type >::clear | ( | void * | container | ) |
| inlinestaticnodiscard

Clears a container.

Parameters

  container | Opaque pointer to a container of the given type.

Returns
  True in case of success, false otherwise.

Definition at line 92 of file container.hpp.

## ◆ erase()

template<typename Type>

iterator entt::basic_meta_sequence_container_traits< Type >::erase | ( | const meta_ctx & | area,
|  | void * | container,
|  | const iterator & | it )
| inlinestaticnodiscard

Erases an element from a container.

Parameters

  area | The context to pass to the newly created iterator.
  container | Opaque pointer to a container of the given type.
  it | An opaque iterator to the element to erase.

Returns
  A possibly invalid iterator following the last removed element.

Definition at line 176 of file container.hpp.

## ◆ insert()

template<typename Type>

iterator entt::basic_meta_sequence_container_traits< Type >::insert | ( | const meta_ctx & | area,
|  | void * | container,
|  | const void * | value,
|  | const void * | cref,
|  | const iterator & | it )
| inlinestaticnodiscard

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

Parameters

  area | The context to pass to the newly created iterator.
  container | Opaque pointer to a container of the given type.
  value | Optional opaque instance of the object to construct (as value type).
  cref | Optional opaque instance of the object to construct (as decayed const reference type).
  it | Iterator before which the element will be inserted.

Returns
  A possibly invalid iterator to the inserted element.

Definition at line 158 of file container.hpp.

## ◆ iter()

template<typename Type>

iterator entt::basic_meta_sequence_container_traits< Type >::iter | ( | const meta_ctx & | area,
|  | void * | container,
|  | const void * | as_const,
|  | const bool | end )
| inlinestatic

Returns a possibly const iterator to the beginning or the end.

Parameters

  area | The context to pass to the newly created iterator.
  container | Opaque pointer to a container of the given type.
  as_const | Const opaque pointer fallback.
  end | False to get a pointer that is past the last element.

Returns
  An iterator to the first or past the last element of the container.

Definition at line 140 of file container.hpp.

## ◆ reserve()

template<typename Type>

bool entt::basic_meta_sequence_container_traits< Type >::reserve | ( | void * | container,
|  | const size_type | sz )
| inlinestaticnodiscard

Increases the capacity of a container.

Parameters

  container | Opaque pointer to a container of the given type.
  sz | Desired capacity.

Returns
  True in case of success, false otherwise.

Definition at line 107 of file container.hpp.

## ◆ resize()

template<typename Type>

bool entt::basic_meta_sequence_container_traits< Type >::resize | ( | void * | container,
|  | const size_type | sz )
| inlinestaticnodiscard

Resizes a container.

Parameters

  container | Opaque pointer to a container of the given type.
  sz | The new number of elements.

Returns
  True in case of success, false otherwise.

Definition at line 122 of file container.hpp.

## ◆ size()

template<typename Type>

size_type entt::basic_meta_sequence_container_traits< Type >::size | ( | const void * | container | ) |
| inlinestaticnodiscard

Returns the number of elements in a container.

Parameters

  container | Opaque pointer to a container of the given type.

Returns
  Number of elements.

Definition at line 83 of file container.hpp.

## Member Data Documentation

## ◆ extent

template<typename Type>

std::size_t entt::basic_meta_sequence_container_traits< Type >::extent = internal::sequence_container_extent_v<Type>
| staticconstexpr

Number of elements, or meta_dynamic_extent if dynamic.

Definition at line 74 of file container.hpp.

## ◆ fixed_size

template<typename Type>

bool entt::basic_meta_sequence_container_traits< Type >::fixed_size = (extent != meta_dynamic_extent)
| staticconstexpr

True in case of fixed size containers, false otherwise.

Definition at line 76 of file container.hpp.

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

- src/entt/meta/container.hpp