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

Proxy object for sequence containers. More...

#include <entt.hpp>

Classes

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

Public Types

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

Public Member Functions

 meta_sequence_container () ENTT_NOEXCEPT=default
 Default constructor.
 
template<typename Type >
 meta_sequence_container (std::in_place_type_t< Type >, any instance) ENTT_NOEXCEPT
 Construct a proxy object for sequence containers. 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 resize (size_type)
 Resizes the wrapped container to contain a given number of elements. 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...
 
std::pair< iterator, bool > insert (iterator, meta_any)
 Inserts an element at a specified location of the wrapped container. More...
 
std::pair< iterator, bool > erase (iterator)
 Removes the specified element from the wrapped container. More...
 
meta_any operator[] (size_type)
 Returns a reference to the element at a specified location of the wrapped container (no bounds checking is performed). More...
 
 operator bool () const ENTT_NOEXCEPT
 Returns false if a proxy is invalid, true otherwise. More...
 

Detailed Description

Proxy object for sequence containers.

Constructor & Destructor Documentation

◆ meta_sequence_container()

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

Construct a proxy object for sequence containers.

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

Member Function Documentation

◆ begin()

meta_sequence_container::iterator entt::meta_sequence_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_sequence_container::clear ( )
inline

Clears the content of the wrapped container.

Returns
True in case of success, false otherwise.

◆ end()

meta_sequence_container::iterator entt::meta_sequence_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()

std::pair< meta_sequence_container::iterator, bool > entt::meta_sequence_container::erase ( iterator  it)
inline

Removes the specified element from the wrapped container.

Parameters
itMeta iterator to the element to remove.
Returns
A pair consisting of a meta iterator following the last removed element (in case of success) and a bool denoting whether the insertion took place.

◆ insert()

std::pair< meta_sequence_container::iterator, bool > entt::meta_sequence_container::insert ( iterator  it,
meta_any  value 
)
inline

Inserts an element at a specified location of the wrapped container.

Parameters
itMeta iterator before which the element will be inserted.
valueElement value to insert.
Returns
A pair consisting of a meta iterator to the inserted element (in case of success) and a bool denoting whether the insertion took place.

◆ operator bool()

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

Returns false if a proxy is invalid, true otherwise.

Returns
False if the proxy is invalid, true otherwise.

◆ operator[]()

meta_any entt::meta_sequence_container::operator[] ( size_type  pos)
inline

Returns a reference to the element at a specified location of the wrapped container (no bounds checking is performed).

Parameters
posThe position of the element to return.
Returns
A reference to the requested element properly wrapped.

◆ resize()

bool entt::meta_sequence_container::resize ( size_type  sz)
inline

Resizes the wrapped container to contain a given number of elements.

Parameters
szThe new size of the container.
Returns
True in case of success, false otherwise.

◆ size()

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

Returns the size of the wrapped container.

Returns
The size of the wrapped container.

◆ value_type()

meta_type entt::meta_sequence_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: