OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::basic_wrapping_container< Container, Wrapper, T, initial, Transform > Class Template Reference

Template used in implementation of containers with wrapped elements. More...

#include <eagine/wrapping_container.hpp>

Public Types

using const_iterator = transforming_iterator< typename Container::const_iterator, Wrapper, T, Transform >
 Alias for the const iterator type.
 

Public Member Functions

constexpr basic_wrapping_container () noexcept
 Default constructor.
 
constexpr basic_wrapping_container (typename Container::size_type count)
 Resizing constructor.
 
 basic_wrapping_container (basic_wrapping_container &&temp) noexcept
 Move constructible.
 
constexpr basic_wrapping_container (const basic_wrapping_container &)=default
 Copy constructible.
 
auto operator= (basic_wrapping_container &&temp) noexcept -> basic_wrapping_container &
 Move assignable.
 
constexpr auto operator= (const basic_wrapping_container &) -> basic_wrapping_container &=default
 Copy assignable.
 
constexpr operator basic_wrapping_container< span< T >, Wrapper, T, initial, Transform > () noexcept
 Implicit conversion to mutable view container.
 
constexpr operator basic_wrapping_container< span< const T >, Wrapper, T, initial, Transform > () noexcept
 Implicit conversion to const view container.
 
constexpr auto empty () const noexcept -> bool
 Indicates if this container is empty. More...
 
constexpr auto size () const noexcept
 Returns the number of elements in this container. More...
 
constexpr auto operator[] (span_size_t index) const noexcept
 Subscript access. More...
 
constexpr auto at (span_size_t index) const
 Access the element at the specified index.
 
constexpr auto begin () const noexcept -> const_iterator
 Returns an iterator to the first element in this container.
 
constexpr auto end () const noexcept -> const_iterator
 Returns an iterator past the last element in this container.
 
constexpr auto raw_items () noexcept
 Returns view of the elements as they are stored, without transfomation.
 
constexpr auto raw_items () const noexcept
 Returns view of the elements as they are stored, without transfomation.
 

Detailed Description

template<typename Container, typename Wrapper, typename T, T initial = T{}, typename Transform = typename Wrapper::transform>
class eagine::basic_wrapping_container< Container, Wrapper, T, initial, Transform >

Template used in implementation of containers with wrapped elements.

Member Function Documentation

◆ empty()

template<typename Container , typename Wrapper , typename T , T initial = T{}, typename Transform = typename Wrapper::transform>
constexpr auto eagine::basic_wrapping_container< Container, Wrapper, T, initial, Transform >::empty ( ) const -> bool
inlineconstexprnoexcept

Indicates if this container is empty.

See also
size

◆ operator[]()

template<typename Container , typename Wrapper , typename T , T initial = T{}, typename Transform = typename Wrapper::transform>
constexpr auto eagine::basic_wrapping_container< Container, Wrapper, T, initial, Transform >::operator[] ( span_size_t  index) const
inlineconstexprnoexcept

Subscript access.

Precondition
index < size()

◆ size()

template<typename Container , typename Wrapper , typename T , T initial = T{}, typename Transform = typename Wrapper::transform>
constexpr auto eagine::basic_wrapping_container< Container, Wrapper, T, initial, Transform >::size ( ) const
inlineconstexprnoexcept

Returns the number of elements in this container.

See also
empty

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).