Clementine
Classes | Public Types | Public Member Functions | List of all members
entt::meta_associative_container Class Reference

Proxy object for associative containers. More...

#include <entt.hpp>

Classes

class  meta_iterator
 Opaque iterator for meta associative containers. More...
 

Public Types

using size_type = std::size_t
 Unsigned integer type.
 
using iterator = meta_iterator
 Meta iterator type.
 

Public Member Functions

 meta_associative_container () ENTT_NOEXCEPT=default
 Default constructor.
 
template<typename Type >
 meta_associative_container (std::in_place_type_t< Type >, any instance) ENTT_NOEXCEPT
 Construct a proxy object for associative containers. More...
 
bool key_only () const ENTT_NOEXCEPT
 Returns true if the associative container is also key-only, false otherwise. More...
 
meta_type key_type () const ENTT_NOEXCEPT
 Returns the key meta type of the wrapped container type. More...
 
meta_type mapped_type () const ENTT_NOEXCEPT
 Returns the mapped meta type of the wrapped container type. More...
 
meta_type value_type () const ENTT_NOEXCEPT
 Returns the value meta type of the wrapped container type. More...
 
size_type size () const ENTT_NOEXCEPT
 Returns the size of the wrapped container. More...
 
bool clear ()
 Clears the content of the wrapped container. More...
 
iterator begin ()
 Returns a meta iterator to the first element of the wrapped container. More...
 
iterator end ()
 Returns a meta iterator that is past the last element of the wrapped container. More...
 
bool insert (meta_any, meta_any)
 Inserts an element (a key/value pair) into the wrapped container. More...
 
bool erase (meta_any)
 Removes the specified element from the wrapped container. More...
 
iterator find (meta_any)
 Returns an iterator to the element with key equivalent to a given one, if any. More...
 
 operator bool () const ENTT_NOEXCEPT
 Returns false if a proxy is invalid, true otherwise. More...
 

Detailed Description

Proxy object for associative containers.

Constructor & Destructor Documentation

◆ meta_associative_container()

template<typename Type >
entt::meta_associative_container::meta_associative_container ( std::in_place_type_t< Type >  ,
any  instance 
)
inline

Construct a proxy object for associative containers.

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

Member Function Documentation

◆ begin()

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

Returns a meta iterator to the first element of the wrapped container.

Returns
A meta iterator to the first element of the wrapped container.

◆ clear()

bool entt::meta_associative_container::clear ( )
inline

Clears the content of the wrapped container.

Returns
True in case of success, false otherwise.

◆ end()

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

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

Returns
A meta iterator that is past the last element of the wrapped container.

◆ erase()

bool entt::meta_associative_container::erase ( meta_any  key)
inline

Removes the specified element from the wrapped container.

Parameters
keyThe key of the element to remove.
Returns
A bool denoting whether the removal took place.

◆ find()

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

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

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

◆ insert()

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

Inserts an element (a key/value pair) into the wrapped container.

Parameters
keyThe key of the element to insert.
valueThe value of the element to insert.
Returns
A bool denoting whether the insertion took place.

◆ key_only()

bool entt::meta_associative_container::key_only ( ) const
inline

Returns true if the associative container is also key-only, false otherwise.

Returns
True if the associative container is also key-only, false otherwise.

◆ key_type()

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

Returns the key meta type of the wrapped container type.

Returns
The key meta type of the wrapped container type.

◆ mapped_type()

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

Returns the mapped meta type of the wrapped container type.

Returns
The mapped meta type of the wrapped container type.

◆ operator bool()

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

Returns false if a proxy is invalid, true otherwise.

Returns
False if the proxy is invalid, true otherwise.

◆ size()

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

Returns the size of the wrapped container.

Returns
The size of the wrapped container.

◆ value_type()

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

Returns the value meta type of the wrapped container type.

Returns
The value meta type of the wrapped container type.

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