mn::container::basic_array< T, TAllocator, TDeleter > Class Template Reference

Lightweight c++11 array implementation. More...

#include <mn_array.hpp>

+ Collaboration diagram for mn::container::basic_array< T, TAllocator, TDeleter >:

Public Types

using value_type = T
 
using pointer = T *
 
using reference = T &
 
using const_reference = const T &
 
using difference_type = mn::ptrdiff_t
 
using size_type = mn::size_t
 
using allocator_type = TAllocator
 
using deleter_type = TDeleter
 
using iterator = basic_array_iterator< T >
 
using const_iterator = basic_array_iterator< const T >
 
using self_type = basic_array< T, TAllocator, TDeleter >
 

Public Member Functions

 basic_array ()
 
 basic_array (pointer _ptrData, unsigned int _sSize)
 
 basic_array (const self_type &other)
 
 ~basic_array ()
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reference front () noexcept
 
const_reference front () const noexcept
 
reference back () noexcept
 
const_reference back () const noexcept
 
size_type size () const noexcept
 
reference at (size_type pos)
 
const_reference at (size_type pos) const
 
constexpr bool is_empty () const noexcept
 
constexpr bool is_full () const noexcept
 
int push (value_type entry)
 
reference pop ()
 
bool resize (size_type newSize)
 
bool is_equele (const self_type &other, bool bWithPos=false)
 
void swap (self_type &other) noexcept
 
reference operator[] (size_type pos) noexcept
 
constexpr const_reference operator[] (size_type pos) const noexcept
 
void fill (const value_type &val)
 

Static Public Attributes

static const size_type TypeSize = sizeof(value_type)
 

Private Member Functions

pointer construct (size_type n)
 
void deconstruct (pointer ptr, size_type size)
 

Private Attributes

pointer m_arData
 
size_type m_szSize
 
size_type m_szCurPos
 
allocator_type m_alloCator
 
deleter_type m_dDeleter
 

Detailed Description

template<typename T, class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
class mn::container::basic_array< T, TAllocator, TDeleter >

Lightweight c++11 array implementation.

Member Typedef Documentation

◆ allocator_type

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::allocator_type = TAllocator

◆ const_iterator

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::const_iterator = basic_array_iterator<const T>

◆ const_reference

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::const_reference = const T&

◆ deleter_type

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::deleter_type = TDeleter

◆ difference_type

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::difference_type = mn::ptrdiff_t

◆ iterator

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::iterator = basic_array_iterator<T>

◆ pointer

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::pointer = T*

◆ reference

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::reference = T&

◆ self_type

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::self_type = basic_array<T, TAllocator, TDeleter>

◆ size_type

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::size_type = mn::size_t

◆ value_type

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
using mn::container::basic_array< T, TAllocator, TDeleter >::value_type = T

Constructor & Destructor Documentation

◆ basic_array() [1/3]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
mn::container::basic_array< T, TAllocator, TDeleter >::basic_array ( )
inline

◆ basic_array() [2/3]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
mn::container::basic_array< T, TAllocator, TDeleter >::basic_array ( pointer  _ptrData,
unsigned int  _sSize 
)
inline

◆ basic_array() [3/3]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
mn::container::basic_array< T, TAllocator, TDeleter >::basic_array ( const self_type other)
inline

◆ ~basic_array()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
mn::container::basic_array< T, TAllocator, TDeleter >::~basic_array ( )
inline

Member Function Documentation

◆ at() [1/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
reference mn::container::basic_array< T, TAllocator, TDeleter >::at ( size_type  pos)
inline

◆ at() [2/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
const_reference mn::container::basic_array< T, TAllocator, TDeleter >::at ( size_type  pos) const
inline

◆ back() [1/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
const_reference mn::container::basic_array< T, TAllocator, TDeleter >::back ( ) const
inlinenoexcept

◆ back() [2/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
reference mn::container::basic_array< T, TAllocator, TDeleter >::back ( )
inlinenoexcept

◆ begin() [1/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
iterator mn::container::basic_array< T, TAllocator, TDeleter >::begin ( )
inline

◆ begin() [2/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
const_iterator mn::container::basic_array< T, TAllocator, TDeleter >::begin ( ) const
inline

◆ construct()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
pointer mn::container::basic_array< T, TAllocator, TDeleter >::construct ( size_type  n)
inlineprivate

◆ deconstruct()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
void mn::container::basic_array< T, TAllocator, TDeleter >::deconstruct ( pointer  ptr,
size_type  size 
)
inlineprivate

◆ end() [1/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
iterator mn::container::basic_array< T, TAllocator, TDeleter >::end ( )
inline

◆ end() [2/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
const_iterator mn::container::basic_array< T, TAllocator, TDeleter >::end ( ) const
inline

◆ fill()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
void mn::container::basic_array< T, TAllocator, TDeleter >::fill ( const value_type val)
inline

◆ front() [1/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
const_reference mn::container::basic_array< T, TAllocator, TDeleter >::front ( ) const
inlinenoexcept

◆ front() [2/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
reference mn::container::basic_array< T, TAllocator, TDeleter >::front ( )
inlinenoexcept

◆ is_empty()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
constexpr bool mn::container::basic_array< T, TAllocator, TDeleter >::is_empty ( ) const
inlineconstexprnoexcept

◆ is_equele()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
bool mn::container::basic_array< T, TAllocator, TDeleter >::is_equele ( const self_type other,
bool  bWithPos = false 
)
inline

◆ is_full()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
constexpr bool mn::container::basic_array< T, TAllocator, TDeleter >::is_full ( ) const
inlineconstexprnoexcept

◆ operator[]() [1/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
constexpr const_reference mn::container::basic_array< T, TAllocator, TDeleter >::operator[] ( size_type  pos) const
inlineconstexprnoexcept

◆ operator[]() [2/2]

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
reference mn::container::basic_array< T, TAllocator, TDeleter >::operator[] ( size_type  pos)
inlinenoexcept

◆ pop()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
reference mn::container::basic_array< T, TAllocator, TDeleter >::pop ( )
inline

◆ push()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
int mn::container::basic_array< T, TAllocator, TDeleter >::push ( value_type  entry)
inline

◆ resize()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
bool mn::container::basic_array< T, TAllocator, TDeleter >::resize ( size_type  newSize)
inline

◆ size()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
size_type mn::container::basic_array< T, TAllocator, TDeleter >::size ( ) const
inlinenoexcept

◆ swap()

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
void mn::container::basic_array< T, TAllocator, TDeleter >::swap ( self_type other)
inlinenoexcept

Member Data Documentation

◆ m_alloCator

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
allocator_type mn::container::basic_array< T, TAllocator, TDeleter >::m_alloCator
private

◆ m_arData

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
pointer mn::container::basic_array< T, TAllocator, TDeleter >::m_arData
private

◆ m_dDeleter

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
deleter_type mn::container::basic_array< T, TAllocator, TDeleter >::m_dDeleter
private

◆ m_szCurPos

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
size_type mn::container::basic_array< T, TAllocator, TDeleter >::m_szCurPos
private

◆ m_szSize

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
size_type mn::container::basic_array< T, TAllocator, TDeleter >::m_szSize
private

◆ TypeSize

template<typename T , class TAllocator = memory::default_allocator, class TDeleter = mn::memory::default_delete<T, TAllocator>>
const size_type mn::container::basic_array< T, TAllocator, TDeleter >::TypeSize = sizeof(value_type)
static

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