Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

immer::detail::arrays::with_capacity< T, MemoryPolicy > Struct Template Reference

#include <with_capacity.hpp>

+ Collaboration diagram for immer::detail::arrays::with_capacity< T, MemoryPolicy >:

Public Types

using no_capacity_t = no_capacity< T, MemoryPolicy >
 
using node_t = node< T, MemoryPolicy >
 
using edit_t = typename MemoryPolicy::transience_t::edit
 
using size_t = std::size_t
 

Public Member Functions

 with_capacity (node_t *p, size_t s, size_t c)
 
 with_capacity (const with_capacity &other)
 
 with_capacity (const no_capacity_t &other)
 
 with_capacity (with_capacity &&other)
 
with_capacityoperator= (const with_capacity &other)
 
with_capacityoperator= (with_capacity &&other)
 
 ~with_capacity ()
 
void inc ()
 
void dec ()
 
const T * data () const
 
T * data ()
 
 operator no_capacity_t () const
 
template<typename Fn >
void for_each_chunk (Fn &&fn) const
 
template<typename Fn >
bool for_each_chunk_p (Fn &&fn) const
 
const T & get (std::size_t index) const
 
const T & get_check (std::size_t index) const
 
bool equals (const with_capacity &other) const
 
with_capacity push_back (T value) const
 
void push_back_mut (edit_t e, T value)
 
with_capacity assoc (std::size_t idx, T value) const
 
void assoc_mut (edit_t e, std::size_t idx, T value)
 
template<typename Fn >
with_capacity update (std::size_t idx, Fn &&op) const
 
template<typename Fn >
void update_mut (edit_t e, std::size_t idx, Fn &&op)
 
with_capacity take (std::size_t sz) const
 
void take_mut (edit_t e, std::size_t sz)
 

Static Public Member Functions

static const with_capacityempty ()
 
template<typename Iter , typename Sent , std::enable_if_t< is_forward_iterator_v< Iter > &&compatible_sentinel_v< Iter, Sent >, bool > = true>
static with_capacity from_range (Iter first, Sent last)
 
template<typename U >
static with_capacity from_initializer_list (std::initializer_list< U > values)
 
static with_capacity from_fill (size_t n, T v)
 
static size_t recommend_up (size_t sz, size_t cap)
 
static size_t recommend_down (size_t sz, size_t cap)
 

Public Attributes

node_tptr
 
size_t size
 
size_t capacity
 

Friends

void swap (with_capacity &x, with_capacity &y)
 

Detailed Description

template<typename T, typename MemoryPolicy>
struct immer::detail::arrays::with_capacity< T, MemoryPolicy >

Definition at line 18 of file with_capacity.hpp.

Member Typedef Documentation

◆ edit_t

template<typename T , typename MemoryPolicy >
using immer::detail::arrays::with_capacity< T, MemoryPolicy >::edit_t = typename MemoryPolicy::transience_t::edit

Definition at line 23 of file with_capacity.hpp.

◆ no_capacity_t

template<typename T , typename MemoryPolicy >
using immer::detail::arrays::with_capacity< T, MemoryPolicy >::no_capacity_t = no_capacity<T, MemoryPolicy>

Definition at line 20 of file with_capacity.hpp.

◆ node_t

template<typename T , typename MemoryPolicy >
using immer::detail::arrays::with_capacity< T, MemoryPolicy >::node_t = node<T, MemoryPolicy>

Definition at line 22 of file with_capacity.hpp.

◆ size_t

template<typename T , typename MemoryPolicy >
using immer::detail::arrays::with_capacity< T, MemoryPolicy >::size_t = std::size_t

Definition at line 24 of file with_capacity.hpp.

Constructor & Destructor Documentation

◆ with_capacity() [1/4]

template<typename T , typename MemoryPolicy >
immer::detail::arrays::with_capacity< T, MemoryPolicy >::with_capacity ( node_t p,
size_t  s,
size_t  c 
)
inline

Definition at line 40 of file with_capacity.hpp.

◆ with_capacity() [2/4]

◆ with_capacity() [3/4]

template<typename T , typename MemoryPolicy >
immer::detail::arrays::with_capacity< T, MemoryPolicy >::with_capacity ( const no_capacity_t other)
inline

◆ with_capacity() [4/4]

template<typename T , typename MemoryPolicy >
immer::detail::arrays::with_capacity< T, MemoryPolicy >::with_capacity ( with_capacity< T, MemoryPolicy > &&  other)
inline

◆ ~with_capacity()

template<typename T , typename MemoryPolicy >
immer::detail::arrays::with_capacity< T, MemoryPolicy >::~with_capacity ( )
inline

Member Function Documentation

◆ assoc()

◆ assoc_mut()

◆ data() [1/2]

◆ data() [2/2]

template<typename T , typename MemoryPolicy >
T* immer::detail::arrays::with_capacity< T, MemoryPolicy >::data ( )
inline

◆ dec()

◆ empty()

template<typename T , typename MemoryPolicy >
static const with_capacity& immer::detail::arrays::with_capacity< T, MemoryPolicy >::empty ( )
inlinestatic

◆ equals()

template<typename T , typename MemoryPolicy >
bool immer::detail::arrays::with_capacity< T, MemoryPolicy >::equals ( const with_capacity< T, MemoryPolicy > &  other) const
inline

◆ for_each_chunk()

template<typename T , typename MemoryPolicy >
template<typename Fn >
void immer::detail::arrays::with_capacity< T, MemoryPolicy >::for_each_chunk ( Fn &&  fn) const
inline

◆ for_each_chunk_p()

template<typename T , typename MemoryPolicy >
template<typename Fn >
bool immer::detail::arrays::with_capacity< T, MemoryPolicy >::for_each_chunk_p ( Fn &&  fn) const
inline

◆ from_fill()

template<typename T , typename MemoryPolicy >
static with_capacity immer::detail::arrays::with_capacity< T, MemoryPolicy >::from_fill ( size_t  n,
v 
)
inlinestatic

◆ from_initializer_list()

template<typename T , typename MemoryPolicy >
template<typename U >
static with_capacity immer::detail::arrays::with_capacity< T, MemoryPolicy >::from_initializer_list ( std::initializer_list< U >  values)
inlinestatic

◆ from_range()

template<typename T , typename MemoryPolicy >
template<typename Iter , typename Sent , std::enable_if_t< is_forward_iterator_v< Iter > &&compatible_sentinel_v< Iter, Sent >, bool > = true>
static with_capacity immer::detail::arrays::with_capacity< T, MemoryPolicy >::from_range ( Iter  first,
Sent  last 
)
inlinestatic

◆ get()

template<typename T , typename MemoryPolicy >
const T& immer::detail::arrays::with_capacity< T, MemoryPolicy >::get ( std::size_t  index) const
inline

◆ get_check()

template<typename T , typename MemoryPolicy >
const T& immer::detail::arrays::with_capacity< T, MemoryPolicy >::get_check ( std::size_t  index) const
inline

◆ inc()

template<typename T , typename MemoryPolicy >
void immer::detail::arrays::with_capacity< T, MemoryPolicy >::inc ( )
inline

◆ operator no_capacity_t()

◆ operator=() [1/2]

template<typename T , typename MemoryPolicy >
with_capacity& immer::detail::arrays::with_capacity< T, MemoryPolicy >::operator= ( const with_capacity< T, MemoryPolicy > &  other)
inline

◆ operator=() [2/2]

template<typename T , typename MemoryPolicy >
with_capacity& immer::detail::arrays::with_capacity< T, MemoryPolicy >::operator= ( with_capacity< T, MemoryPolicy > &&  other)
inline

◆ push_back()

◆ push_back_mut()

◆ recommend_down()

template<typename T , typename MemoryPolicy >
static size_t immer::detail::arrays::with_capacity< T, MemoryPolicy >::recommend_down ( size_t  sz,
size_t  cap 
)
inlinestatic

◆ recommend_up()

template<typename T , typename MemoryPolicy >
static size_t immer::detail::arrays::with_capacity< T, MemoryPolicy >::recommend_up ( size_t  sz,
size_t  cap 
)
inlinestatic

◆ take()

◆ take_mut()

◆ update()

◆ update_mut()

Friends And Related Function Documentation

◆ swap

template<typename T , typename MemoryPolicy >
void swap ( with_capacity< T, MemoryPolicy > &  x,
with_capacity< T, MemoryPolicy > &  y 
)
friend

Member Data Documentation

◆ capacity

◆ ptr

◆ size


The documentation for this struct was generated from the following file:
Released under the MIT license