70template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
71inline ::collection::count raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::erase_all()
73 return this->allocate(0, -1);
76template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
77void raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::
84template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
85inline void raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::erase_last()
88 this->erase_at(this->get_upper_bound());
93template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
94inline TYPE& raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::get_at(::collection::index nIndex)
97 return get_data()[nIndex];
101template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
102inline const TYPE& raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::get_at(::collection::index nIndex)
const
105 return get_data()[nIndex];
110template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
111inline void raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::set_at(::collection::index nIndex, ARG_TYPE newElement)
114 get_data()[nIndex] = newElement;
119template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
120inline const TYPE* raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::get_data()
const
123 return (
const TYPE*)this->m_pData;
128template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
129inline TYPE* raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::get_data()
132 return (TYPE*)this->m_pData;
137template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
138inline ::collection::index raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::add(ARG_TYPE newElement)
141 ::collection::index nIndex = (::index_cast ) this->m_nSize;
143 set_at_grow(nIndex, newElement);
150template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
151inline ::collection::index raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::add(
const raw_array & src)
154 return this->append(src);
159template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
160inline ::collection::index raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::add_new(::collection::count count)
163 this->allocate(this->size() + count);
165 return this->get_upper_bound();
170template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
171inline TYPE & raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::add_new()
174 this->allocate(this->size() + 1);
181template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
182inline TYPE raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::pop(::collection::index n)
185 ::collection::index i = this->get_upper_bound(n);
187 TYPE t = this->element_at(i);
195template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
196inline void raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::pop_back(::collection::index n)
199 this->erase_at(this->get_upper_bound(n));
203template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
204inline ::collection::index raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::push(ARG_TYPE newElement, ::collection::index n)
206 return insert_at(this->get_upper_bound(n), newElement);
209template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
210inline void raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::push_back(ARG_TYPE newElement, ::collection::index n)
212 insert_at(this->get_upper_bound(n), newElement);
234template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
235inline void raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::__swap(::collection::index index1, ::collection::index index2)
237 TYPE t = get_data()[index1];
238 get_data()[index1] = get_data()[index2];
239 get_data()[index2] = t;
242template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
243inline raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer > & raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::operator = (
const raw_array & src)
256template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
257raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::raw_array(
::particle * pparticle)
265template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
266inline raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::raw_array(::std::initializer_list < TYPE > l)
270 add((ARG_TYPE)
item);
276template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
277raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::raw_array(
const raw_array <TYPE, ARG_TYPE, ALLOCATOR> & a)
280 ::base_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::operator = (a);
283template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
284raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::raw_array(raw_array <TYPE,ARG_TYPE,ALLOCATOR> && a)
288 this->m_nGrowBy = a.m_nGrowBy;
289 this->m_pData = a.m_pData;
290 this->m_nSize = a.m_nSize;
291 this->m_nMaxSize = a.m_nMaxSize;
301template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
302raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >:: raw_array(::collection::count n)
307template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
308raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::raw_array(ARG_TYPE t, ::collection::count n)
314template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
315raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::raw_array(TYPE * ptypea, ::collection::count n)
320 for(::i32 i = 0; i < n; i++)
323 this->element_at(i) = ptypea[i];
330template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
331raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::~raw_array()
537template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
538inline TYPE raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::get_at_grow(::collection::index nIndex)
540 return element_at_grow(nIndex);
553template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
554::collection::index raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::insert_at(::collection::index nIndex, ARG_TYPE newElement, ::collection::count nCount )
557 return base_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::insert_at(nIndex, newElement,nCount);
671template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
672::collection::index raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::raw_find_first(TYPE *point, ::collection::index find, ::collection::index last)
const
675 find += this->get_count();
677 last += this->get_count();
678 for(; find <= last; find++)
680 if(&this->element_at(find) == point)
685template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
686::collection::index raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::find_first(ARG_TYPE t, ::collection::index ( * pfnCompare )(ARG_TYPE, ARG_TYPE), ::collection::index find, ::collection::index last)
const
690 find += this->get_count();
692 last += this->get_count();
693 for(; find <= last; find++)
695 if(pfnCompare((ARG_TYPE)this->element_at(find), (ARG_TYPE)t) == 0)
705template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
706raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer > & raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::operator += (
const raw_array & a)
711 raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer > aCopy(a);
722template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
723raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer > raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::operator + (
const raw_array & a)
const
725 raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer > aNew(*
this);
737template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
738inline raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer > & raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::operator =(raw_array && a)
741 return transfer(::transfer(a));
749template <
typename TYPE,
typename ARG_TYPE,
typename ALLOCATOR, ::enum_type t_etypeContainer >
750inline raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer > & raw_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >::transfer(raw_array && a)
757 this->m_nGrowBy = a.m_nGrowBy;
758 this->m_pData = a.m_pData;
759 this->m_nSize = a.m_nSize;
760 this->m_nMaxSize = a.m_nMaxSize;