koutil
Loading...
Searching...
No Matches
koutil::container::multi_vector< Types >::single_vector< T, Allocator > Class Template Reference

Public Member Functions

 single_vector (std::size_t n)
 
 single_vector (std::size_t n, const T &value)
 
 single_vector ()=default
 
 single_vector (const single_vector &other)
 
 ~single_vector ()
 
 single_vector (single_vector &&other)
 
single_vectoroperator= (single_vector &&other)
 
single_vectoroperator= (const single_vector &other)
 
void clear ()
 
void swap (single_vector &other)
 
void push_back (const T &value)
 
void push_back (T &&value)
 
template<typename Arg >
T & emplace_back (Arg &&arg)
 
T * erase (const T *element)
 
void pop_back ()
 
void resize (std::size_t n)
 
void resize (std::size_t n, const T &value)
 
void reserve (std::size_t n)
 
T & at (std::size_t i)
 
const T & at (std::size_t i) const
 
T * data ()
 
const T * data () const
 
std::size_t size () const
 
T * begin ()
 
const T * begin () const
 
T * end ()
 
const T * end () const
 

Private Member Functions

std::size_t next_capacity () const
 
void try_update_capacity ()
 
void realloc (std::size_t capacity)
 
void realloc_with_value (std::size_t capacity, const T &value={})
 
void realloc_without (std::size_t capacity, std::size_t index)
 

Private Attributes

T * m_data = nullptr
 
std::size_t m_capacity = 0
 
std::size_t m_size = 0
 

Constructor & Destructor Documentation

◆ single_vector() [1/5]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
koutil::container::multi_vector< Types >::single_vector< T, Allocator >::single_vector ( std::size_t n)
inline

◆ single_vector() [2/5]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
koutil::container::multi_vector< Types >::single_vector< T, Allocator >::single_vector ( std::size_t n,
const T & value )
inline

◆ single_vector() [3/5]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
koutil::container::multi_vector< Types >::single_vector< T, Allocator >::single_vector ( )
default

◆ single_vector() [4/5]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
koutil::container::multi_vector< Types >::single_vector< T, Allocator >::single_vector ( const single_vector< T, Allocator > & other)
inline

◆ ~single_vector()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
koutil::container::multi_vector< Types >::single_vector< T, Allocator >::~single_vector ( )
inline

◆ single_vector() [5/5]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
koutil::container::multi_vector< Types >::single_vector< T, Allocator >::single_vector ( single_vector< T, Allocator > && other)
inline

Member Function Documentation

◆ at() [1/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
T & koutil::container::multi_vector< Types >::single_vector< T, Allocator >::at ( std::size_t i)
inline

◆ at() [2/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
const T & koutil::container::multi_vector< Types >::single_vector< T, Allocator >::at ( std::size_t i) const
inlinenodiscard

◆ begin() [1/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
T * koutil::container::multi_vector< Types >::single_vector< T, Allocator >::begin ( )
inline

◆ begin() [2/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
const T * koutil::container::multi_vector< Types >::single_vector< T, Allocator >::begin ( ) const
inline

◆ clear()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::clear ( )
inline

◆ data() [1/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
T * koutil::container::multi_vector< Types >::single_vector< T, Allocator >::data ( )
inline

◆ data() [2/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
const T * koutil::container::multi_vector< Types >::single_vector< T, Allocator >::data ( ) const
inlinenodiscard

◆ emplace_back()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
template<typename Arg >
T & koutil::container::multi_vector< Types >::single_vector< T, Allocator >::emplace_back ( Arg && arg)
inline

◆ end() [1/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
T * koutil::container::multi_vector< Types >::single_vector< T, Allocator >::end ( )
inline

◆ end() [2/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
const T * koutil::container::multi_vector< Types >::single_vector< T, Allocator >::end ( ) const
inline

◆ erase()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
T * koutil::container::multi_vector< Types >::single_vector< T, Allocator >::erase ( const T * element)
inline

◆ next_capacity()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
std::size_t koutil::container::multi_vector< Types >::single_vector< T, Allocator >::next_capacity ( ) const
inlinenodiscardprivate

◆ operator=() [1/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
single_vector & koutil::container::multi_vector< Types >::single_vector< T, Allocator >::operator= ( const single_vector< T, Allocator > & other)
inline

◆ operator=() [2/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
single_vector & koutil::container::multi_vector< Types >::single_vector< T, Allocator >::operator= ( single_vector< T, Allocator > && other)
inline

◆ pop_back()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::pop_back ( )
inline

◆ push_back() [1/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::push_back ( const T & value)
inline

◆ push_back() [2/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::push_back ( T && value)
inline

◆ realloc()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::realloc ( std::size_t capacity)
inlineprivate

◆ realloc_with_value()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::realloc_with_value ( std::size_t capacity,
const T & value = {} )
inlineprivate

◆ realloc_without()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::realloc_without ( std::size_t capacity,
std::size_t index )
inlineprivate

◆ reserve()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::reserve ( std::size_t n)
inline

◆ resize() [1/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::resize ( std::size_t n)
inline

◆ resize() [2/2]

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::resize ( std::size_t n,
const T & value )
inline

◆ size()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
std::size_t koutil::container::multi_vector< Types >::single_vector< T, Allocator >::size ( ) const
inlinenodiscard

◆ swap()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::swap ( single_vector< T, Allocator > & other)
inline

◆ try_update_capacity()

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
void koutil::container::multi_vector< Types >::single_vector< T, Allocator >::try_update_capacity ( )
inlineprivate

Member Data Documentation

◆ m_capacity

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
std::size_t koutil::container::multi_vector< Types >::single_vector< T, Allocator >::m_capacity = 0
private

◆ m_data

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
T* koutil::container::multi_vector< Types >::single_vector< T, Allocator >::m_data = nullptr
private

◆ m_size

template<is_multi_vector_element... Types>
template<typename T , typename Allocator = std::allocator<T>>
std::size_t koutil::container::multi_vector< Types >::single_vector< T, Allocator >::m_size = 0
private

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