EnTT: entt::meta_associative_container Class Reference

EnTT 3.15.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
entt::meta_associative_container Class Reference

Proxy object for associative containers. More...

`#include <meta.hpp>`

## Public Types
using | size_type = std::size_t
| Unsigned integer type.
using | iterator = meta_iterator
| Meta iterator type.

## Public Member Functions
| meta_associative_container ()=default
| Default constructor.
template<typename Type>
| meta_associative_container (const meta_ctx &area, Type &instance) noexcept
| Context aware constructor.
meta_type | key_type () const noexcept
| Returns the meta key type of a container.
meta_type | mapped_type () const noexcept
| Returns the meta mapped type of a container.
meta_type | value_type () const noexcept
| Returns the meta value type of a container.
size_type | size () const noexcept
| Returns the size of a container.
bool | clear ()
| Clears the content of a container.
bool | reserve (size_type)
| Reserves storage for at least the given number of elements.
iterator | begin ()
| Returns an iterator to the first element of a container.
iterator | end ()
| Returns an iterator that is past the last element of a container.
bool | insert (meta_any, meta_any)
| Inserts a key-only or key/value element into a container.
size_type | erase (meta_any)
| Removes the specified element from a container.
iterator | find (meta_any)
| Returns an iterator to the element with a given key, if any.
| operator bool () const noexcept
| Returns false if a proxy is invalid, true otherwise.

## Detailed Description

Proxy object for associative containers.

Definition at line 94 of file meta.hpp.

## Member Typedef Documentation

## ◆ iterator

using entt::meta_associative_container::iterator = meta_iterator

Meta iterator type.

Definition at line 101 of file meta.hpp.

## ◆ size_type

using entt::meta_associative_container::size_type = std::size_t

Unsigned integer type.

Definition at line 99 of file meta.hpp.

## Constructor & Destructor Documentation

## ◆ meta_associative_container()

template<typename Type>

entt::meta_associative_container::meta_associative_container | ( | const meta_ctx & | area,
|  | Type & | instance )
| inlinenoexcept

Context aware constructor.

Template Parameters

  Type | Type of container to wrap.

Parameters

  area | The context from which to search for meta types.
  instance | The container to wrap.

Definition at line 113 of file meta.hpp.

## Member Function Documentation

## ◆ begin()

meta_associative_container::iterator entt::meta_associative_container::begin | ( |  | ) |
| inlinenodiscard

Returns an iterator to the first element of a container.

Returns
  An iterator to the first element of the container.

Definition at line 1907 of file meta.hpp.

## ◆ clear()

bool entt::meta_associative_container::clear | ( |  | ) |
| inline

Clears the content of a container.

Returns
  True in case of success, false otherwise.

Definition at line 1897 of file meta.hpp.

## ◆ end()

meta_associative_container::iterator entt::meta_associative_container::end | ( |  | ) |
| inlinenodiscard

Returns an iterator that is past the last element of a container.

Returns
  An iterator that is past the last element of the container.

Definition at line 1912 of file meta.hpp.

## ◆ erase()

meta_associative_container::size_type entt::meta_associative_container::erase | ( | meta_any | key | ) |
| inline

Removes the specified element from a container.

Parameters

  key | The key of the element to remove.

Returns
  A bool denoting whether the removal took place.

Definition at line 1933 of file meta.hpp.

## ◆ find()

meta_associative_container::iterator entt::meta_associative_container::find | ( | meta_any | key | ) |
| inlinenodiscard

Returns an iterator to the element with a given key, if any.

Parameters

  key | The key of the element to search.

Returns
  An iterator to the element with the given key, if any.

Definition at line 1942 of file meta.hpp.

## ◆ insert()

bool entt::meta_associative_container::insert | ( | meta_any | key,
|  | meta_any | value = {} )
| inline

Inserts a key-only or key/value element into a container.

Parameters

  key | The key of the element to insert.
  value | The value of the element to insert, if needed.

Returns
  A bool denoting whether the insertion took place.

Definition at line 1922 of file meta.hpp.

## ◆ key_type()

meta_type entt::meta_associative_container::key_type | ( |  | ) | const
| inlinenodiscardnoexcept

Returns the meta key type of a container.

Returns
  The meta key type of the a container.

Definition at line 1874 of file meta.hpp.

## ◆ mapped_type()

meta_type entt::meta_associative_container::mapped_type | ( |  | ) | const
| inlinenodiscardnoexcept

Returns the meta mapped type of a container.

Returns
  The meta mapped type of the a container.

Definition at line 1882 of file meta.hpp.

## ◆ operator bool()

entt::meta_associative_container::operator bool | ( |  | ) | const
| inlineexplicitnodiscardnoexcept

Returns false if a proxy is invalid, true otherwise.

Returns
  False if the proxy is invalid, true otherwise.

Definition at line 1950 of file meta.hpp.

## ◆ reserve()

bool entt::meta_associative_container::reserve | ( | size_type | sz | ) |
| inline

Reserves storage for at least the given number of elements.

Parameters

  sz | The new capacity of the container.

Returns
  True in case of success, false otherwise.

Definition at line 1902 of file meta.hpp.

## ◆ size()

meta_associative_container::size_type entt::meta_associative_container::size | ( |  | ) | const
| inlinenodiscardnoexcept

Returns the size of a container.

Returns
  The size of the container.

Definition at line 1892 of file meta.hpp.

## ◆ value_type()

meta_type entt::meta_associative_container::value_type | ( |  | ) | const
| inlinenodiscardnoexcept

Returns the meta value type of a container.

Returns
  The meta value type of the container.

Definition at line 1887 of file meta.hpp.

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

- src/entt/meta/meta.hpp