EnTT 3.14.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.
 
 meta_associative_container (const meta_ctx &area) noexcept
 Context aware constructor.
 
template<typename Type >
void rebind (Type &instance) noexcept
 Rebinds a proxy object to an associative container type.
 
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 100 of file meta.hpp.

Member Typedef Documentation

◆ iterator

Meta iterator type.

Definition at line 107 of file meta.hpp.

◆ size_type

Unsigned integer type.

Definition at line 105 of file meta.hpp.

Constructor & Destructor Documentation

◆ meta_associative_container()

entt::meta_associative_container::meta_associative_container ( const meta_ctx & area)
inlinenoexcept

Context aware constructor.

Parameters
areaThe context from which to search for meta types.

Definition at line 116 of file meta.hpp.

Member Function Documentation

◆ begin()

meta_associative_container::iterator entt::meta_associative_container::begin ( )
inline

Returns an iterator to the first element of a container.

Returns
An iterator to the first element of the container.

Definition at line 1987 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 1977 of file meta.hpp.

◆ end()

meta_associative_container::iterator entt::meta_associative_container::end ( )
inline

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 1992 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
keyThe key of the element to remove.
Returns
A bool denoting whether the removal took place.

Definition at line 2013 of file meta.hpp.

◆ find()

meta_associative_container::iterator entt::meta_associative_container::find ( meta_any key)
inline

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

Parameters
keyThe key of the element to search.
Returns
An iterator to the element with the given key, if any.

Definition at line 2022 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
keyThe key of the element to insert.
valueThe value of the element to insert, if needed.
Returns
A bool denoting whether the insertion took place.

Definition at line 2002 of file meta.hpp.

◆ key_type()

meta_type entt::meta_associative_container::key_type ( ) const
inlinenoexcept

Returns the meta key type of a container.

Returns
The meta key type of the a container.

Definition at line 1954 of file meta.hpp.

◆ mapped_type()

meta_type entt::meta_associative_container::mapped_type ( ) const
inlinenoexcept

Returns the meta mapped type of a container.

Returns
The meta mapped type of the a container.

Definition at line 1962 of file meta.hpp.

◆ operator bool()

entt::meta_associative_container::operator bool ( ) const
inlineexplicitnoexcept

Returns false if a proxy is invalid, true otherwise.

Returns
False if the proxy is invalid, true otherwise.

Definition at line 2030 of file meta.hpp.

◆ rebind()

template<typename Type >
void entt::meta_associative_container::rebind ( Type & instance)
inlinenoexcept

Rebinds a proxy object to an associative container type.

Template Parameters
TypeType of container to wrap.
Parameters
instanceThe container to wrap.

Definition at line 125 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
szThe new capacity of the container.
Returns
True in case of success, false otherwise.

Definition at line 1982 of file meta.hpp.

◆ size()

meta_associative_container::size_type entt::meta_associative_container::size ( ) const
inlinenoexcept

Returns the size of a container.

Returns
The size of the container.

Definition at line 1972 of file meta.hpp.

◆ value_type()

meta_type entt::meta_associative_container::value_type ( ) const
inlinenoexcept

Returns the meta value type of a container.

Returns
The meta value type of the container.

Definition at line 1967 of file meta.hpp.


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