NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nstd::_continuous_container< TElement, _malloc, _delete > 模板类 参考

#include <ne_stl_continuous_container.h>

Public 类型

using size_type = std::size_t
 
using value_type = TElement
 
using pointer = TElement*
 
using iterator = nstd::iterator<TElement>
 
using reverse_iterator = nstd::reverse_iterator<TElement>
 
using const_iterator = nstd::const_iterator<TElement>
 

Public 成员函数

 _continuous_container ()
 
 _continuous_container (const _continuous_container &other)
 
 _continuous_container (_continuous_container &&other)
 
 _continuous_container (const _continuous_container &other, std::size_t pos, std::size_t len=container_npos::value)
 
 _continuous_container (const TElement *s, std::size_t n)
 
 _continuous_container (std::size_t n, const TElement &s)
 
 _continuous_container (const nstd::const_iterator< TElement > first, const nstd::const_iterator< TElement > second)
 
template<typename T >
 _continuous_container (const std::vector< T > &other)
 
 _continuous_container (const std::vector< TElement > &other)
 
 _continuous_container (std::initializer_list< TElement > init)
 
nstd::iterator< TElement > begin ()
 
nstd::const_iterator< TElement > begin () const
 
nstd::iterator< TElement > end ()
 
nstd::const_iterator< TElement > end () const
 
nstd::const_iterator< TElement > cbegin () const
 
nstd::const_iterator< TElement > cend () const
 
nstd::reverse_iterator< TElement > rbegin ()
 
nstd::const_reverse_iterator< TElement > rbegin () const
 
nstd::reverse_iterator< TElement > rend ()
 
nstd::const_reverse_iterator< TElement > rend () const
 
nstd::const_reverse_iterator< TElement > crbegin () const
 
nstd::const_reverse_iterator< TElement > crend () const
 
_continuous_containeroperator= (const _continuous_container &other)
 
_continuous_containeroperator= (_continuous_container &&other)
 
template<typename T >
_continuous_containeroperator= (const std::vector< T > &other)
 
 operator std::vector< TElement > ()
 
 operator std::vector< TElement > () const
 
template<class TSTDVectorItem >
 operator std::vector< TSTDVectorItem > ()
 
template<class TSTDVectorItem >
 operator std::vector< TSTDVectorItem > () const
 
std::string to_string () const
 
bool element_equal (const _continuous_container &other) const
 
 ~_continuous_container ()
 
const TElement & operator[] (std::size_t i) const
 
TElement & operator[] (std::size_t i)
 
const TElement & at (std::size_t i) const
 
TElement & at (std::size_t i)
 
const TElement & front () const
 
TElement & front ()
 
const TElement & back () const
 
TElement & back ()
 
_continuous_containeroperator+= (const _continuous_container &other)
 
_continuous_containeroperator+= (TElement element)
 
_continuous_containerappend (const _continuous_container &other)
 
_continuous_containerappend (const _continuous_container &other, std::size_t subpos, std::size_t sublen=container_npos::value)
 
_continuous_containerappend (const TElement elements)
 
_continuous_containerappend (std::size_t n, TElement element)
 
_continuous_containerappend (const nstd::const_iterator< TElement > first, const nstd::const_iterator< TElement > second)
 
_continuous_containerpush_back (TElement element)
 
_continuous_containererase (std::size_t pos=0, std::size_t len=container_npos::value)
 
nstd::iterator< TElement > erase (nstd::const_iterator< TElement > p)
 
nstd::iterator< TElement > erase (nstd::const_iterator< TElement > first, nstd::const_iterator< TElement > last)
 
void swap (_continuous_container &other)
 
template<class InputIt >
void insert (iterator pos, InputIt first, InputIt last)
 The function type imitates the STL std::vector: https://en.cppreference.com/w/cpp/container/vector/insert
 
void insert (const_iterator pos, const TElement &value)
 The function type differs the STL std::vector in the return type: https://en.cppreference.com/w/cpp/container/vector/insert
 
bool operator== (const _continuous_container &other) const
 
bool operator!= (const _continuous_container &other) const
 
nstd::iterator< TElement > find (const TElement &element)
 
nstd::const_iterator< TElement > find (const TElement &element) const
 
bool contains (const _continuous_container &other) const
 
const TElement * data () const
 
void set_element_malloc_function (element_malloc_fun_t< TElement > function)
 
void set_element_delete_function (element_delete_fun_t< TElement > function)
 
std::size_t size () const
 
std::size_t max_size () const
 
void resize (std::size_t n)
 
void resize (std::size_t n, TElement c)
 
std::size_t capacity () const
 
void reserve (std::size_t n=0)
 
void clear ()
 
bool empty () const
 
void shrink_to_fit ()
 

Private 成员函数

nstd::iterator_type< TElement > _ibegin () const
 
nstd::iterator_type< TElement > _rbegin () const
 
nstd::iterator_type< TElement > _end () const
 
std::size_t _getLength (const nstd::const_iterator< TElement > first, const nstd::const_iterator< TElement > second)
 
void _append (const TElement other)
 
void _append (const TElement *other, std::size_t n)
 
void _substr (TElement *&buffer, const TElement *other, std::size_t pos=0, std::size_t len=container_npos::value) const
 
void _erase (std::size_t pos, std::size_t size)
 
std::size_t _getLength (const _continuous_container &str, std::size_t pos, std::size_t len=container_npos::value) const
 
void _set_length (const std::size_t len)
 
void _set_capacity (const std::size_t cap)
 
void _increase_capacity (const std::size_t cap)
 
void _decrease_capacity (const std::size_t cap)
 
void _alloc_buffer (TElement *&buffer, const std::size_t n) const
 
void _alloc_buffer (TElement *&buffer, const std::size_t n, const TElement &element) const
 
void _alloc_buffer (TElement *&buffer, const std::size_t n, const nstd::const_iterator< TElement > i1, const nstd::const_iterator< TElement > i2) const
 
void _clear_str (const std::size_t pos, bool destruct=true)
 
TElement * _new_data (std::size_t count) const
 
void _delete_data (TElement *&data)
 

Private 属性

TElement * data_ {nullptr}
 
element_malloc_fun_t< TElement > malloc_fun_ {_malloc}
 
element_delete_fun_t< TElement > delete_fun_ {_delete}
 
std::size_t length_ {0}
 
std::size_t cap_length_ {0}
 
std::size_t increase_step_length_ {container_increase_step::value}
 

成员类型定义说明

◆ const_iterator

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
using nstd::_continuous_container< TElement, _malloc, _delete >::const_iterator = nstd::const_iterator<TElement>

◆ iterator

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
using nstd::_continuous_container< TElement, _malloc, _delete >::iterator = nstd::iterator<TElement>

◆ pointer

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
using nstd::_continuous_container< TElement, _malloc, _delete >::pointer = TElement*

◆ reverse_iterator

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
using nstd::_continuous_container< TElement, _malloc, _delete >::reverse_iterator = nstd::reverse_iterator<TElement>

◆ size_type

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
using nstd::_continuous_container< TElement, _malloc, _delete >::size_type = std::size_t

◆ value_type

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
using nstd::_continuous_container< TElement, _malloc, _delete >::value_type = TElement

构造及析构函数说明

◆ _continuous_container() [1/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( )
inline

◆ _continuous_container() [2/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( const _continuous_container< TElement, _malloc, _delete > & other)
inline

◆ _continuous_container() [3/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( _continuous_container< TElement, _malloc, _delete > && other)
inline

◆ _continuous_container() [4/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( const _continuous_container< TElement, _malloc, _delete > & other,
std::size_t pos,
std::size_t len = container_npos::value )
inline

◆ _continuous_container() [5/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( const TElement * s,
std::size_t n )
inline

◆ _continuous_container() [6/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( std::size_t n,
const TElement & s )
inline

◆ _continuous_container() [7/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( const nstd::const_iterator< TElement > first,
const nstd::const_iterator< TElement > second )
inline

◆ _continuous_container() [8/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
template<typename T >
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( const std::vector< T > & other)
inline

◆ _continuous_container() [9/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( const std::vector< TElement > & other)
inline

◆ _continuous_container() [10/10]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::_continuous_container ( std::initializer_list< TElement > init)
inline

◆ ~_continuous_container()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::~_continuous_container ( )
inline

成员函数说明

◆ _alloc_buffer() [1/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_alloc_buffer ( TElement *& buffer,
const std::size_t n ) const
inlineprivate

◆ _alloc_buffer() [2/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_alloc_buffer ( TElement *& buffer,
const std::size_t n,
const nstd::const_iterator< TElement > i1,
const nstd::const_iterator< TElement > i2 ) const
inlineprivate

◆ _alloc_buffer() [3/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_alloc_buffer ( TElement *& buffer,
const std::size_t n,
const TElement & element ) const
inlineprivate

◆ _append() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_append ( const TElement * other,
std::size_t n )
inlineprivate

◆ _append() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_append ( const TElement other)
inlineprivate

◆ _clear_str()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_clear_str ( const std::size_t pos,
bool destruct = true )
inlineprivate

◆ _decrease_capacity()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_decrease_capacity ( const std::size_t cap)
inlineprivate

◆ _delete_data()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_delete_data ( TElement *& data)
inlineprivate

◆ _end()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator_type< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::_end ( ) const
inlineprivate

◆ _erase()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_erase ( std::size_t pos,
std::size_t size )
inlineprivate

◆ _getLength() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::_getLength ( const _continuous_container< TElement, _malloc, _delete > & str,
std::size_t pos,
std::size_t len = container_npos::value ) const
inlineprivate

◆ _getLength() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::_getLength ( const nstd::const_iterator< TElement > first,
const nstd::const_iterator< TElement > second )
inlineprivate

◆ _ibegin()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator_type< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::_ibegin ( ) const
inlineprivate

◆ _increase_capacity()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_increase_capacity ( const std::size_t cap)
inlineprivate

◆ _new_data()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
TElement * nstd::_continuous_container< TElement, _malloc, _delete >::_new_data ( std::size_t count) const
inlineprivate

◆ _rbegin()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator_type< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::_rbegin ( ) const
inlineprivate

◆ _set_capacity()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_set_capacity ( const std::size_t cap)
inlineprivate

◆ _set_length()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_set_length ( const std::size_t len)
inlineprivate

◆ _substr()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::_substr ( TElement *& buffer,
const TElement * other,
std::size_t pos = 0,
std::size_t len = container_npos::value ) const
inlineprivate

◆ append() [1/5]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::append ( const _continuous_container< TElement, _malloc, _delete > & other)
inline

◆ append() [2/5]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::append ( const _continuous_container< TElement, _malloc, _delete > & other,
std::size_t subpos,
std::size_t sublen = container_npos::value )
inline

◆ append() [3/5]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::append ( const nstd::const_iterator< TElement > first,
const nstd::const_iterator< TElement > second )
inline

◆ append() [4/5]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::append ( const TElement elements)
inline

◆ append() [5/5]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::append ( std::size_t n,
TElement element )
inline

◆ at() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
TElement & nstd::_continuous_container< TElement, _malloc, _delete >::at ( std::size_t i)
inline

◆ at() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
const TElement & nstd::_continuous_container< TElement, _malloc, _delete >::at ( std::size_t i) const
inline

◆ back() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
TElement & nstd::_continuous_container< TElement, _malloc, _delete >::back ( )
inline

◆ back() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
const TElement & nstd::_continuous_container< TElement, _malloc, _delete >::back ( ) const
inline

◆ begin() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::begin ( )
inline

◆ begin() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::begin ( ) const
inline

◆ capacity()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::capacity ( ) const
inline

◆ cbegin()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::cbegin ( ) const
inline

◆ cend()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::cend ( ) const
inline

◆ clear()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::clear ( )
inline

◆ contains()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
bool nstd::_continuous_container< TElement, _malloc, _delete >::contains ( const _continuous_container< TElement, _malloc, _delete > & other) const
inline

◆ crbegin()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_reverse_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::crbegin ( ) const
inline

◆ crend()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_reverse_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::crend ( ) const
inline

◆ data()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
const TElement * nstd::_continuous_container< TElement, _malloc, _delete >::data ( ) const
inline

◆ element_equal()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
bool nstd::_continuous_container< TElement, _malloc, _delete >::element_equal ( const _continuous_container< TElement, _malloc, _delete > & other) const
inline

◆ empty()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
bool nstd::_continuous_container< TElement, _malloc, _delete >::empty ( ) const
inline

◆ end() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::end ( )
inline

◆ end() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::end ( ) const
inline

◆ erase() [1/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::erase ( nstd::const_iterator< TElement > first,
nstd::const_iterator< TElement > last )
inline

◆ erase() [2/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::erase ( nstd::const_iterator< TElement > p)
inline

◆ erase() [3/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::erase ( std::size_t pos = 0,
std::size_t len = container_npos::value )
inline

◆ find() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::find ( const TElement & element)
inline

◆ find() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::find ( const TElement & element) const
inline

◆ front() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
TElement & nstd::_continuous_container< TElement, _malloc, _delete >::front ( )
inline

◆ front() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
const TElement & nstd::_continuous_container< TElement, _malloc, _delete >::front ( ) const
inline

◆ insert() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::insert ( const_iterator pos,
const TElement & value )
inline

The function type differs the STL std::vector in the return type: https://en.cppreference.com/w/cpp/container/vector/insert

参数
pos
value

◆ insert() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
template<class InputIt >
void nstd::_continuous_container< TElement, _malloc, _delete >::insert ( iterator pos,
InputIt first,
InputIt last )
inline

The function type imitates the STL std::vector: https://en.cppreference.com/w/cpp/container/vector/insert

模板参数
InputIt
参数
pos
first
last

◆ max_size()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::max_size ( ) const
inline

◆ operator std::vector< TElement >() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::operator std::vector< TElement > ( )
inline

◆ operator std::vector< TElement >() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::_continuous_container< TElement, _malloc, _delete >::operator std::vector< TElement > ( ) const
inline

◆ operator std::vector< TSTDVectorItem >() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
template<class TSTDVectorItem >
nstd::_continuous_container< TElement, _malloc, _delete >::operator std::vector< TSTDVectorItem > ( )
inline

◆ operator std::vector< TSTDVectorItem >() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
template<class TSTDVectorItem >
nstd::_continuous_container< TElement, _malloc, _delete >::operator std::vector< TSTDVectorItem > ( ) const
inline

◆ operator!=()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
bool nstd::_continuous_container< TElement, _malloc, _delete >::operator!= ( const _continuous_container< TElement, _malloc, _delete > & other) const
inline

◆ operator+=() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::operator+= ( const _continuous_container< TElement, _malloc, _delete > & other)
inline

◆ operator+=() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::operator+= ( TElement element)
inline

◆ operator=() [1/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::operator= ( _continuous_container< TElement, _malloc, _delete > && other)
inline

◆ operator=() [2/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::operator= ( const _continuous_container< TElement, _malloc, _delete > & other)
inline

◆ operator=() [3/3]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
template<typename T >
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::operator= ( const std::vector< T > & other)
inline

◆ operator==()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
bool nstd::_continuous_container< TElement, _malloc, _delete >::operator== ( const _continuous_container< TElement, _malloc, _delete > & other) const
inline

◆ operator[]() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
TElement & nstd::_continuous_container< TElement, _malloc, _delete >::operator[] ( std::size_t i)
inline

◆ operator[]() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
const TElement & nstd::_continuous_container< TElement, _malloc, _delete >::operator[] ( std::size_t i) const
inline

◆ push_back()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
_continuous_container & nstd::_continuous_container< TElement, _malloc, _delete >::push_back ( TElement element)
inline

◆ rbegin() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::reverse_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::rbegin ( )
inline

◆ rbegin() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_reverse_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::rbegin ( ) const
inline

◆ rend() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::reverse_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::rend ( )
inline

◆ rend() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
nstd::const_reverse_iterator< TElement > nstd::_continuous_container< TElement, _malloc, _delete >::rend ( ) const
inline

◆ reserve()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::reserve ( std::size_t n = 0)
inline

◆ resize() [1/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::resize ( std::size_t n)
inline

◆ resize() [2/2]

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::resize ( std::size_t n,
TElement c )
inline

◆ set_element_delete_function()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::set_element_delete_function ( element_delete_fun_t< TElement > function)
inline

◆ set_element_malloc_function()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::set_element_malloc_function ( element_malloc_fun_t< TElement > function)
inline

◆ shrink_to_fit()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::shrink_to_fit ( )
inline

◆ size()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::size ( ) const
inline

◆ swap()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
void nstd::_continuous_container< TElement, _malloc, _delete >::swap ( _continuous_container< TElement, _malloc, _delete > & other)
inline

◆ to_string()

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::string nstd::_continuous_container< TElement, _malloc, _delete >::to_string ( ) const
inline

类成员变量说明

◆ cap_length_

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::cap_length_ {0}
private

◆ data_

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
TElement* nstd::_continuous_container< TElement, _malloc, _delete >::data_ {nullptr}
private

◆ delete_fun_

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
element_delete_fun_t<TElement> nstd::_continuous_container< TElement, _malloc, _delete >::delete_fun_ {_delete}
private

◆ increase_step_length_

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::increase_step_length_ {container_increase_step::value}
private

◆ length_

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
std::size_t nstd::_continuous_container< TElement, _malloc, _delete >::length_ {0}
private

◆ malloc_fun_

template<class TElement , element_malloc_fun_t< TElement > _malloc = memory::safe_malloc_container_element<TElement>, element_delete_fun_t< TElement > _delete = memory::safe_delete_container_element<TElement>>
element_malloc_fun_t<TElement> nstd::_continuous_container< TElement, _malloc, _delete >::malloc_fun_ {_malloc}
private

该类的文档由以下文件生成: