playrho::AllocatedArray< T, Deleter > Class Template Reference

Allocated Array. More...

#include <AllocatedArray.hpp>

Public Types

using size_type = std::size_t
 Size type. More...
 
using value_type = T
 Value type. More...
 
using const_value_type = const value_type
 Constant value type. More...
 
using reference = value_type &
 Reference type. More...
 
using const_reference = const value_type &
 Constant reference type. More...
 
using pointer = value_type *
 Pointer type. More...
 
using const_pointer = const value_type *
 Constant pointer type. More...
 
using difference_type = std::ptrdiff_t
 Difference type. More...
 
using deleter_type = Deleter
 Deleter type. More...
 
using iterator = pointer
 Iterator alias. More...
 
using const_iterator = const_pointer
 Constant iterator alias. More...
 

Public Member Functions

PLAYRHO_CONSTEXPR AllocatedArray (size_type max_size, pointer data, deleter_type deleter=noop_deleter)
 Initializing constructor. More...
 
 ~AllocatedArray () noexcept
 Destructor. More...
 
 AllocatedArray ()=delete
 
 AllocatedArray (const AllocatedArray &copy)=delete
 
 AllocatedArray (AllocatedArray &&other) noexcept
 Move constructor. More...
 
size_type size () const noexcept
 Gets the current size of this array. More...
 
size_type max_size () const noexcept
 Gets the maximum size this array can possibly get to. More...
 
bool empty () const noexcept
 Determines whether this array is empty. More...
 
pointer data () const noexcept
 Gets a direct pointer to this array's memory. More...
 
reference operator[] (size_type i)
 Indexed operator. More...
 
const_reference operator[] (size_type i) const
 Indexed operator. More...
 
iterator begin ()
 Gets the "begin" iterator value for this array. More...
 
iterator end ()
 Gets the "end" iterator value for this array. More...
 
const_iterator begin () const
 Gets the "begin" iterator value for this array. More...
 
const_iterator end () const
 Gets the "end" iterator value for this array. More...
 
const_iterator cbegin () const
 Gets the "begin" iterator value for this array. More...
 
const_iterator cend () const
 Gets the "end" iterator value for this array. More...
 
reference back () noexcept
 Gets a reference to the "back" element of this array. More...
 
const_reference back () const noexcept
 Gets a reference to the "back" element of this array. More...
 
void clear () noexcept
 Clears this array. More...
 
void push_back (const_reference value)
 Push "back" the given value. More...
 
void pop_back () noexcept
 Pop "back". More...
 

Detailed Description

template<typename T, typename Deleter = std::function<void (void *)>>
class playrho::AllocatedArray< T, Deleter >

Allocated Array.

Definition at line 32 of file AllocatedArray.hpp.

Member Typedef Documentation

◆ size_type

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::size_type = std::size_t

Size type.

Definition at line 37 of file AllocatedArray.hpp.

◆ value_type

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::value_type = T

Value type.

Definition at line 40 of file AllocatedArray.hpp.

◆ const_value_type

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::const_value_type = const value_type

Constant value type.

Definition at line 43 of file AllocatedArray.hpp.

◆ reference

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::reference = value_type&

Reference type.

Definition at line 46 of file AllocatedArray.hpp.

◆ const_reference

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::const_reference = const value_type&

Constant reference type.

Definition at line 49 of file AllocatedArray.hpp.

◆ pointer

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::pointer = value_type*

Pointer type.

Definition at line 52 of file AllocatedArray.hpp.

◆ const_pointer

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::const_pointer = const value_type*

Constant pointer type.

Definition at line 55 of file AllocatedArray.hpp.

◆ difference_type

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::difference_type = std::ptrdiff_t

Difference type.

Definition at line 58 of file AllocatedArray.hpp.

◆ deleter_type

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::deleter_type = Deleter

Deleter type.

Definition at line 61 of file AllocatedArray.hpp.

◆ iterator

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::iterator = pointer

Iterator alias.

Definition at line 64 of file AllocatedArray.hpp.

◆ const_iterator

template<typename T , typename Deleter = std::function<void (void *)>>
using playrho::AllocatedArray< T, Deleter >::const_iterator = const_pointer

Constant iterator alias.

Definition at line 67 of file AllocatedArray.hpp.

Constructor & Destructor Documentation

◆ AllocatedArray() [1/4]

template<typename T , typename Deleter = std::function<void (void *)>>
PLAYRHO_CONSTEXPR playrho::AllocatedArray< T, Deleter >::AllocatedArray ( size_type  max_size,
pointer  data,
deleter_type  deleter = noop_deleter 
)
inline

Initializing constructor.

Definition at line 70 of file AllocatedArray.hpp.

◆ ~AllocatedArray()

template<typename T , typename Deleter = std::function<void (void *)>>
playrho::AllocatedArray< T, Deleter >::~AllocatedArray ( )
inlinenoexcept

Destructor.

Definition at line 77 of file AllocatedArray.hpp.

◆ AllocatedArray() [2/4]

template<typename T , typename Deleter = std::function<void (void *)>>
playrho::AllocatedArray< T, Deleter >::AllocatedArray ( )
delete

◆ AllocatedArray() [3/4]

template<typename T , typename Deleter = std::function<void (void *)>>
playrho::AllocatedArray< T, Deleter >::AllocatedArray ( const AllocatedArray< T, Deleter > &  copy)
delete

◆ AllocatedArray() [4/4]

template<typename T , typename Deleter = std::function<void (void *)>>
playrho::AllocatedArray< T, Deleter >::AllocatedArray ( AllocatedArray< T, Deleter > &&  other)
inlinenoexcept

Move constructor.

Definition at line 87 of file AllocatedArray.hpp.

Member Function Documentation

◆ size()

template<typename T , typename Deleter = std::function<void (void *)>>
size_type playrho::AllocatedArray< T, Deleter >::size ( ) const
inlinenoexcept

Gets the current size of this array.

Definition at line 95 of file AllocatedArray.hpp.

◆ max_size()

template<typename T , typename Deleter = std::function<void (void *)>>
size_type playrho::AllocatedArray< T, Deleter >::max_size ( ) const
inlinenoexcept

Gets the maximum size this array can possibly get to.

Definition at line 98 of file AllocatedArray.hpp.

◆ empty()

template<typename T , typename Deleter = std::function<void (void *)>>
bool playrho::AllocatedArray< T, Deleter >::empty ( ) const
inlinenoexcept

Determines whether this array is empty.

Definition at line 101 of file AllocatedArray.hpp.

◆ data()

template<typename T , typename Deleter = std::function<void (void *)>>
pointer playrho::AllocatedArray< T, Deleter >::data ( ) const
inlinenoexcept

Gets a direct pointer to this array's memory.

Definition at line 104 of file AllocatedArray.hpp.

◆ operator[]() [1/2]

template<typename T , typename Deleter = std::function<void (void *)>>
reference playrho::AllocatedArray< T, Deleter >::operator[] ( size_type  i)
inline

Indexed operator.

Definition at line 107 of file AllocatedArray.hpp.

◆ operator[]() [2/2]

template<typename T , typename Deleter = std::function<void (void *)>>
const_reference playrho::AllocatedArray< T, Deleter >::operator[] ( size_type  i) const
inline

Indexed operator.

Definition at line 114 of file AllocatedArray.hpp.

◆ begin() [1/2]

template<typename T , typename Deleter = std::function<void (void *)>>
iterator playrho::AllocatedArray< T, Deleter >::begin ( )
inline

Gets the "begin" iterator value for this array.

Definition at line 121 of file AllocatedArray.hpp.

◆ end() [1/2]

template<typename T , typename Deleter = std::function<void (void *)>>
iterator playrho::AllocatedArray< T, Deleter >::end ( )
inline

Gets the "end" iterator value for this array.

Definition at line 124 of file AllocatedArray.hpp.

◆ begin() [2/2]

template<typename T , typename Deleter = std::function<void (void *)>>
const_iterator playrho::AllocatedArray< T, Deleter >::begin ( ) const
inline

Gets the "begin" iterator value for this array.

Definition at line 127 of file AllocatedArray.hpp.

◆ end() [2/2]

template<typename T , typename Deleter = std::function<void (void *)>>
const_iterator playrho::AllocatedArray< T, Deleter >::end ( ) const
inline

Gets the "end" iterator value for this array.

Definition at line 130 of file AllocatedArray.hpp.

◆ cbegin()

template<typename T , typename Deleter = std::function<void (void *)>>
const_iterator playrho::AllocatedArray< T, Deleter >::cbegin ( ) const
inline

Gets the "begin" iterator value for this array.

Definition at line 133 of file AllocatedArray.hpp.

◆ cend()

template<typename T , typename Deleter = std::function<void (void *)>>
const_iterator playrho::AllocatedArray< T, Deleter >::cend ( ) const
inline

Gets the "end" iterator value for this array.

Definition at line 136 of file AllocatedArray.hpp.

◆ back() [1/2]

template<typename T , typename Deleter = std::function<void (void *)>>
reference playrho::AllocatedArray< T, Deleter >::back ( )
inlinenoexcept

Gets a reference to the "back" element of this array.

Warning
Behavior is undefined if the size of this array is less than 1.

Definition at line 140 of file AllocatedArray.hpp.

◆ back() [2/2]

template<typename T , typename Deleter = std::function<void (void *)>>
const_reference playrho::AllocatedArray< T, Deleter >::back ( ) const
inlinenoexcept

Gets a reference to the "back" element of this array.

Warning
Behavior is undefined if the size of this array is less than 1.

Definition at line 148 of file AllocatedArray.hpp.

◆ clear()

template<typename T , typename Deleter = std::function<void (void *)>>
void playrho::AllocatedArray< T, Deleter >::clear ( )
inlinenoexcept

Clears this array.

Definition at line 155 of file AllocatedArray.hpp.

◆ push_back()

template<typename T , typename Deleter = std::function<void (void *)>>
void playrho::AllocatedArray< T, Deleter >::push_back ( const_reference  value)
inline

Push "back" the given value.

Definition at line 161 of file AllocatedArray.hpp.

◆ pop_back()

template<typename T , typename Deleter = std::function<void (void *)>>
void playrho::AllocatedArray< T, Deleter >::pop_back ( )
inlinenoexcept

Pop "back".

Definition at line 169 of file AllocatedArray.hpp.


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