foobar2000 SDK  2015-01-14
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
pfc::list_impl_t< T, t_storage >

#include <list.h>

+ Inheritance diagram for pfc::list_impl_t< T, t_storage >:

Data Structures

class  sort_callback_wrapper
 

Public Types

typedef list_base_t< Tt_base
 
typedef list_impl_t< T, t_storage > t_self
 
- Public Types inherited from pfc::list_base_const_t< T >
typedef T t_item
 

Public Member Functions

 list_impl_t ()
 
 list_impl_t (const t_self &p_source)
 
template<typename t_in >
t_size _insert_item_t (const t_in &item, t_size idx)
 
t_size _insert_items_v (const list_base_const_t< T > &source, t_size base)
 
t_size add_item (const T &item)
 
template<typename t_in >
t_size add_item (const t_in &item)
 
template<typename t_in >
void add_items (const t_in &in)
 
void filter_mask (const bit_array &mask)
 
void filter_mask (const bool *mask)
 
template<typename t_compare , typename t_permutation >
t_size find_duplicates_sorted_permutation_t (t_compare p_compare, t_permutation p_permutation, bit_array_var &p_out)
 
template<typename t_compare >
t_size find_duplicates_sorted_t (t_compare p_compare, bit_array_var &p_out) const
 
template<typename t_search >
t_size find_item (const t_search &p_item) const
 
t_size get_count () const
 
T get_item (t_size n) const
 
void get_item_ex (T &p_out, t_size n) const
 
const Tget_item_ref (t_size n) const
 
void get_items_mask (list_impl_t< T, t_storage > &out, const bit_array &mask)
 
const Tget_ptr () const
 
Tget_ptr ()
 
t_size get_size () const
 
template<typename t_search >
bool have_item (const t_search &p_item) const
 
template<typename t_in >
t_size insert_item (const t_in &item, t_size idx)
 
t_size insert_item (const T &item, t_size idx)
 
t_size insert_items (const list_base_const_t< T > &source, t_size base)
 
t_size insert_items (const list_base_t< T > &source, t_size base)
 
template<typename t_in >
t_size insert_items (const t_in &source, t_size base)
 
void move_from (t_self &other)
 
template<typename t_in >
t_selfoperator+= (t_in const &p_source)
 
template<typename t_in >
t_selfoperator= (t_in const &source)
 
const Toperator[] (t_size n) const
 
Toperator[] (t_size n)
 
template<typename t_in >
t_selfoperator|= (t_in const &p_source)
 
void prealloc (t_size count)
 
void remove_all ()
 
T remove_by_idx (t_size idx)
 
void remove_from_idx (t_size idx, t_size num)
 
void remove_item (const T &item)
 
void remove_mask (const bit_array &mask)
 
void remove_mask (const bool *mask)
 
void reorder_partial (t_size p_base, const t_size *p_order, t_size p_count)
 
void replace_item (t_size idx, const T &item)
 
void set_count (t_size p_count)
 
void set_size (t_size p_count)
 
void sort ()
 
void sort (typename t_base::sort_callback &p_callback)
 
void sort_stable (typename t_base::sort_callback &p_callback)
 
template<typename t_compare >
void sort_stable_t (t_compare p_compare)
 
template<typename t_compare >
void sort_t (t_compare p_compare)
 
void swap_item_with (t_size p_index, T &p_item)
 
void swap_items (t_size p_index1, t_size p_index2)
 
- Public Member Functions inherited from pfc::list_base_t< T >
t_size add_item (const T &item)
 
t_size add_items (const list_base_const_t< T > &items)
 
t_size add_items_fromptr (const T *source, t_size num)
 
t_size add_items_repeat (T item, t_size num)
 
template<typename t_func >
void for_each (t_func p_func)
 
template<typename t_func >
void for_each (t_func p_func, const bit_array &p_mask)
 
t_size insert_item (const T &item, t_size base)
 
t_size insert_items_fromptr (const T *source, t_size num, t_size base)
 
t_size insert_items_repeat (const T &item, t_size num, t_size base)
 
template<typename t_in >
t_selfoperator+= (t_in const &p_source)
 
template<typename t_in >
t_selfoperator= (t_in const &source)
 
T operator[] (t_size n) const
 
template<typename t_in >
t_selfoperator|= (t_in const &p_source)
 
void remove_all ()
 
template<typename t_releasefunc >
void remove_all_ex (t_releasefunc p_func)
 
template<typename t_compare >
void remove_duplicates_t (t_compare p_compare)
 
void remove_mask (const bit_array &mask)
 
template<typename t_releasefunc >
void remove_mask_ex (const bit_array &p_mask, t_releasefunc p_func)
 
void reorder (const t_size *p_data)
 
T replace_item_ex (t_size p_index, const T &p_item)
 
void sort ()
 
template<typename t_compare >
void sort_remove_duplicates_t (t_compare p_compare)
 
template<typename t_compare >
void sort_stable_remove_duplicates_t (t_compare p_compare)
 
template<typename t_compare >
void sort_stable_t (t_compare p_compare)
 
template<typename t_compare >
void sort_t (t_compare p_compare)
 
void truncate (t_size val)
 
- Public Member Functions inherited from pfc::list_base_const_t< T >
template<typename t_compare , typename t_param , typename t_permutation >
bool bsearch_permutation_t (t_compare p_compare, t_param const &p_param, const t_permutation &p_permutation, t_size &p_index) const
 
template<typename t_compare , typename t_param >
bool bsearch_t (t_compare p_compare, t_param const &p_param, t_size &p_index) const
 
template<typename t_callback >
void enumerate (t_callback &p_callback) const
 
template<typename t_compare , typename t_permutation >
t_size find_duplicates_sorted_permutation_t (t_compare p_compare, t_permutation const &p_permutation, bit_array_var &p_out)
 
template<typename t_compare >
t_size find_duplicates_sorted_t (t_compare p_compare, bit_array_var &p_out) const
 
template<typename t_search >
t_size find_item (const t_search &p_item) const
 
T get_item (t_size n) const
 
t_size get_size () const
 
template<typename t_search >
bool have_item (const t_search &p_item) const
 
bool operator!= (const t_self &item2) const
 
bool operator== (const t_self &item2) const
 
T operator[] (t_size n) const
 
template<typename t_compare , typename t_permutation >
void sort_get_permutation_t (t_compare p_compare, t_permutation const &p_permutation) const
 
template<typename t_compare , typename t_permutation >
void sort_stable_get_permutation_t (t_compare p_compare, t_permutation const &p_permutation) const
 

Static Public Member Functions

static void g_swap (list_impl_t< T, t_storage > &p_item1, list_impl_t< T, t_storage > &p_item2)
 
- Static Public Member Functions inherited from pfc::list_base_const_t< T >
static bool g_equals (const t_self &item1, const t_self &item2)
 

Protected Attributes

t_storage m_buffer
 

Additional Inherited Members

- Protected Member Functions inherited from pfc::list_base_t< T >
 list_base_t ()
 
 list_base_t (const t_self &)
 
 ~list_base_t ()
 
void operator= (const t_self &)
 
- Protected Member Functions inherited from pfc::list_base_const_t< T >
 list_base_const_t ()
 
 list_base_const_t (const t_self &)
 
 ~list_base_const_t ()
 
void operator= (const t_self &)
 

Detailed Description

template<typename T, typename t_storage>
class pfc::list_impl_t< T, t_storage >

Definition at line 305 of file list.h.

Member Typedef Documentation

template<typename T, typename t_storage>
typedef list_base_t<T> pfc::list_impl_t< T, t_storage >::t_base

Definition at line 308 of file list.h.

template<typename T, typename t_storage>
typedef list_impl_t<T, t_storage> pfc::list_impl_t< T, t_storage >::t_self

Definition at line 309 of file list.h.

Constructor & Destructor Documentation

template<typename T, typename t_storage>
pfc::list_impl_t< T, t_storage >::list_impl_t ( )
inline

Definition at line 310 of file list.h.

310 {}
template<typename T, typename t_storage>
pfc::list_impl_t< T, t_storage >::list_impl_t ( const t_self p_source)
inline

Definition at line 311 of file list.h.

311 { add_items(p_source); }
void add_items(const t_in &in)
Definition: list.h:424

Member Function Documentation

template<typename T, typename t_storage>
template<typename t_in >
t_size pfc::list_impl_t< T, t_storage >::_insert_item_t ( const t_in &  item,
t_size  idx 
)
inline

Definition at line 319 of file list.h.

319  {
320  return ::pfc::insert_t(m_buffer, item, idx);
321  }
t_storage m_buffer
Definition: list.h:575
t_size insert_t(t_array &p_array, const T &p_item, t_size p_index)
Definition: primitives.h:500
template<typename T, typename t_storage>
t_size pfc::list_impl_t< T, t_storage >::_insert_items_v ( const list_base_const_t< T > &  source,
t_size  base 
)
inline

Definition at line 385 of file list.h.

385  { //workaround for inefficient operator[] on virtual-interface-accessed lists
386  t_size count = get_size();
387  if (base>count) base = count;
388  t_size num = source.get_count();
389  m_buffer.set_size(count+num);
390  if (count > base) {
391  for(t_size n=count-1;(int)n>=(int)base;n--) {
392  ::pfc::move_t(m_buffer[n+num],m_buffer[n]);
393  }
394  }
395 
396  for(t_size n=0;n<num;n++) {
397  source.get_item_ex(m_buffer[n+base],n);
398  }
399  return base;
400  }
t_size get_size() const
Definition: list.h:366
void move_t(T &p_item1, T &p_item2)
This is similar to plain p_item1 = p_item2; assignment, but optimized for the case where p_item2 cont...
Definition: primitives.h:298
size_t t_size
Definition: int_types.h:48
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
t_size pfc::list_impl_t< T, t_storage >::add_item ( const T item)
inline

Definition at line 522 of file list.h.

522  {
523  return insert_item(item, ~0);
524  }
t_size insert_item(const t_in &item, t_size idx)
Definition: list.h:323
template<typename T, typename t_storage>
template<typename t_in >
t_size pfc::list_impl_t< T, t_storage >::add_item ( const t_in &  item)
inline

Definition at line 526 of file list.h.

526  {
527  return insert_item(item, ~0);
528  }
t_size insert_item(const t_in &item, t_size idx)
Definition: list.h:323
template<typename T, typename t_storage>
template<typename t_in >
void pfc::list_impl_t< T, t_storage >::add_items ( const t_in &  in)
inline

Definition at line 424 of file list.h.

424 {insert_items(in, ~0);}
t_size insert_items(const list_base_const_t< T > &source, t_size base)
Definition: list.h:402
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::filter_mask ( const bit_array mask)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 433 of file list.h.

434  {
435  t_size n,count = get_size(), total = 0;
436 
437  n = total = mask.find(false,0,count);
438 
439  if (n<count) {
440  for(n=mask.find(true,n+1,count-n-1);n<count;n=mask.find(true,n+1,count-n-1))
441  ::pfc::move_t(m_buffer[total++],m_buffer[n]);
442 
443  m_buffer.set_size(total);
444  }
445  }
t_size get_size() const
Definition: list.h:366
virtual t_size find(bool val, t_size start, t_ssize count) const
Returns the first occurance of val between start and start+count (excluding start+count), or start+count if not found; count may be negative to search back rather than forward. Can be overridden by bit_array implementations for improved speed in specific cases.
Definition: bit_array.h:11
void move_t(T &p_item1, T &p_item2)
This is similar to plain p_item1 = p_item2; assignment, but optimized for the case where p_item2 cont...
Definition: primitives.h:298
size_t t_size
Definition: int_types.h:48
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::filter_mask ( const bool *  mask)
inline

Definition at line 520 of file list.h.

t_size get_size() const
Definition: list.h:366
bit_array_table_t< bool > bit_array_table
void filter_mask(const bit_array &mask)
Definition: list.h:433
template<typename T, typename t_storage>
template<typename t_compare , typename t_permutation >
t_size pfc::list_impl_t< T, t_storage >::find_duplicates_sorted_permutation_t ( t_compare  p_compare,
t_permutation  p_permutation,
bit_array_var p_out 
)
inline

Definition at line 486 of file list.h.

487  {
488  return ::pfc::find_duplicates_sorted_permutation_t<list_impl_t<T,t_storage> const &,t_compare,t_permutation>(*this,get_size(),p_compare,p_permutation,p_out);
489  }
t_size get_size() const
Definition: list.h:366
template<typename T, typename t_storage>
template<typename t_compare >
t_size pfc::list_impl_t< T, t_storage >::find_duplicates_sorted_t ( t_compare  p_compare,
bit_array_var p_out 
) const
inline

Definition at line 480 of file list.h.

481  {
482  return ::pfc::find_duplicates_sorted_t<list_impl_t<T,t_storage> const &,t_compare>(*this,get_size(),p_compare,p_out);
483  }
t_size get_size() const
Definition: list.h:366
template<typename T, typename t_storage>
template<typename t_search >
t_size pfc::list_impl_t< T, t_storage >::find_item ( const t_search &  p_item) const
inline

Definition at line 560 of file list.h.

561  {
562  t_size n,max = get_size();
563  for(n=0;n<max;n++)
564  if (m_buffer[n]==p_item) return n;
565  return ~0;
566  }
t_size get_size() const
Definition: list.h:366
size_t t_size
Definition: int_types.h:48
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
static void pfc::list_impl_t< T, t_storage >::g_swap ( list_impl_t< T, t_storage > &  p_item1,
list_impl_t< T, t_storage > &  p_item2 
)
inlinestatic

Definition at line 554 of file list.h.

555  {
556  swap_t(p_item1.m_buffer,p_item2.m_buffer);
557  }
void swap_t(T &p_item1, T &p_item2)
Definition: primitives.h:285
template<typename T, typename t_storage>
t_size pfc::list_impl_t< T, t_storage >::get_count ( ) const
inlinevirtual

Implements pfc::list_base_const_t< T >.

Definition at line 365 of file list.h.

365 {return m_buffer.get_size();}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
T pfc::list_impl_t< T, t_storage >::get_item ( t_size  n) const
inline

Definition at line 358 of file list.h.

359  {
360  PFC_ASSERT(n >= 0);
361  PFC_ASSERT(n < get_size() );
362  return m_buffer[n];
363  };
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::get_item_ex ( T p_out,
t_size  n 
) const
inlinevirtual

Implements pfc::list_base_const_t< T >.

Definition at line 344 of file list.h.

345  {
346  PFC_ASSERT(n>=0);
347  PFC_ASSERT(n<get_size());
348  p_out = m_buffer[n];
349  }
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
const T& pfc::list_impl_t< T, t_storage >::get_item_ref ( t_size  n) const
inline

Definition at line 351 of file list.h.

352  {
353  PFC_ASSERT(n>=0);
354  PFC_ASSERT(n<get_size());
355  return m_buffer[n];
356  }
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::get_items_mask ( list_impl_t< T, t_storage > &  out,
const bit_array mask 
)
inline

Definition at line 426 of file list.h.

427  {
428  t_size n,count = get_size();
429  for_each_bit_array(n,mask,true,0,count)
430  out.add_item(m_buffer[n]);
431  }
t_size get_size() const
Definition: list.h:366
size_t t_size
Definition: int_types.h:48
t_size add_item(const T &item)
Definition: list.h:522
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
const T* pfc::list_impl_t< T, t_storage >::get_ptr ( ) const
inline

Definition at line 375 of file list.h.

375 {return m_buffer.get_ptr();}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
T* pfc::list_impl_t< T, t_storage >::get_ptr ( )
inline

Definition at line 376 of file list.h.

376 {return m_buffer.get_ptr();}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
t_size pfc::list_impl_t< T, t_storage >::get_size ( ) const
inline

Definition at line 366 of file list.h.

366 {return m_buffer.get_size();}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
template<typename t_search >
bool pfc::list_impl_t< T, t_storage >::have_item ( const t_search &  p_item) const
inline

Definition at line 569 of file list.h.

569 {return this->template find_item<t_search>(p_item)!=~0;}
template<typename T, typename t_storage>
template<typename t_in >
t_size pfc::list_impl_t< T, t_storage >::insert_item ( const t_in &  item,
t_size  idx 
)
inline

Definition at line 323 of file list.h.

323  {
324  return _insert_item_t(item, idx);
325  }
t_size _insert_item_t(const t_in &item, t_size idx)
Definition: list.h:319
template<typename T, typename t_storage>
t_size pfc::list_impl_t< T, t_storage >::insert_item ( const T item,
t_size  idx 
)
inline

Definition at line 327 of file list.h.

327  {
328  return _insert_item_t(item, idx);
329  }
t_size _insert_item_t(const t_in &item, t_size idx)
Definition: list.h:319
template<typename T, typename t_storage>
t_size pfc::list_impl_t< T, t_storage >::insert_items ( const list_base_const_t< T > &  source,
t_size  base 
)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 402 of file list.h.

402 {return _insert_items_v(source, base);}
t_size _insert_items_v(const list_base_const_t< T > &source, t_size base)
Definition: list.h:385
template<typename T, typename t_storage>
t_size pfc::list_impl_t< T, t_storage >::insert_items ( const list_base_t< T > &  source,
t_size  base 
)
inline

Definition at line 403 of file list.h.

403 {return _insert_items_v(source, base);}
t_size _insert_items_v(const list_base_const_t< T > &source, t_size base)
Definition: list.h:385
template<typename T, typename t_storage>
template<typename t_in >
t_size pfc::list_impl_t< T, t_storage >::insert_items ( const t_in &  source,
t_size  base 
)
inline

Definition at line 406 of file list.h.

406  {
407  t_size count = get_size();
408  if (base>count) base = count;
409  t_size num = array_size_t(source);
410  m_buffer.set_size(count+num);
411  if (count > base) {
412  for(t_size n=count-1;(int)n>=(int)base;n--) {
413  ::pfc::move_t(m_buffer[n+num],m_buffer[n]);
414  }
415  }
416 
417  for(t_size n=0;n<num;n++) {
418  m_buffer[n+base] = source[n];
419  }
420  return base;
421  }
t_size get_size() const
Definition: list.h:366
void move_t(T &p_item1, T &p_item2)
This is similar to plain p_item1 = p_item2; assignment, but optimized for the case where p_item2 cont...
Definition: primitives.h:298
size_t t_size
Definition: int_types.h:48
t_size array_size_t(const t_array &p_array)
Definition: primitives.h:309
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::move_from ( t_self other)
inline

Definition at line 492 of file list.h.

492  {
493  remove_all();
494  m_buffer = std::move(other.m_buffer);
495  }
void remove_all()
Definition: list.h:530
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
template<typename t_in >
t_self& pfc::list_impl_t< T, t_storage >::operator+= ( t_in const &  p_source)
inline

Definition at line 572 of file list.h.

572 {add_item(p_source); return *this;}
t_size add_item(const T &item)
Definition: list.h:522
template<typename T, typename t_storage>
template<typename t_in >
t_self& pfc::list_impl_t< T, t_storage >::operator= ( t_in const &  source)
inline

Definition at line 571 of file list.h.

571 {remove_all(); add_items(source); return *this;}
void add_items(const t_in &in)
Definition: list.h:424
void remove_all()
Definition: list.h:530
template<typename T, typename t_storage>
const T& pfc::list_impl_t< T, t_storage >::operator[] ( t_size  n) const
inline

Definition at line 368 of file list.h.

369  {
370  PFC_ASSERT(n>=0);
371  PFC_ASSERT(n<get_size());
372  return m_buffer[n];
373  }
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
T& pfc::list_impl_t< T, t_storage >::operator[] ( t_size  n)
inline

Definition at line 378 of file list.h.

378 {return m_buffer[n];}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
template<typename t_in >
t_self& pfc::list_impl_t< T, t_storage >::operator|= ( t_in const &  p_source)
inline

Definition at line 573 of file list.h.

573 {add_items(p_source); return *this;}
void add_items(const t_in &in)
Definition: list.h:424
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::prealloc ( t_size  count)
inline

Definition at line 313 of file list.h.

313 {m_buffer.prealloc(count);}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::remove_all ( )
inline

Definition at line 530 of file list.h.

void remove_mask(const bit_array &mask)
Definition: list.h:517
template<typename T, typename t_storage>
T pfc::list_impl_t< T, t_storage >::remove_by_idx ( t_size  idx)
inline

Definition at line 331 of file list.h.

332  {
333  T ret = m_buffer[idx];
334  t_size n;
335  t_size max = m_buffer.get_size();
336  for(n=idx+1;n<max;n++) {
338  }
339  m_buffer.set_size(max-1);
340  return ret;
341  }
void move_t(T &p_item1, T &p_item2)
This is similar to plain p_item1 = p_item2; assignment, but optimized for the case where p_item2 cont...
Definition: primitives.h:298
size_t t_size
Definition: int_types.h:48
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::remove_from_idx ( t_size  idx,
t_size  num 
)
inline

Definition at line 380 of file list.h.

381  {
382  remove_mask(bit_array_range(idx,num));
383  }
void remove_mask(const bit_array &mask)
Definition: list.h:517
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::remove_item ( const T item)
inline

Definition at line 532 of file list.h.

533  {
534  t_size n,max = get_size();
535  bit_array_bittable mask(max);
536  for(n=0;n<max;n++)
537  mask.set(n,get_item(n)==item);
538  remove_mask(mask);
539  }
T get_item(t_size n) const
Definition: list.h:358
t_size get_size() const
Definition: list.h:366
Generic variable bit_array implementation. Needs to be initialized with requested array size before ...
void remove_mask(const bit_array &mask)
Definition: list.h:517
size_t t_size
Definition: int_types.h:48
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::remove_mask ( const bit_array mask)
inline

Definition at line 517 of file list.h.

517 {filter_mask(bit_array_not(mask));}
void filter_mask(const bit_array &mask)
Definition: list.h:433
Negation of another array. Valid index range is the same as valid index range of the parameter array...
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::remove_mask ( const bool *  mask)
inline

Definition at line 519 of file list.h.

t_size get_size() const
Definition: list.h:366
bit_array_table_t< bool > bit_array_table
void remove_mask(const bit_array &mask)
Definition: list.h:517
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::reorder_partial ( t_size  p_base,
const t_size p_order,
t_size  p_count 
)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 473 of file list.h.

474  {
475  PFC_ASSERT(p_base+p_count<=get_size());
476  ::pfc::reorder_partial_t(m_buffer,p_base,p_order,p_count);
477  }
t_size get_size() const
Definition: list.h:366
void reorder_partial_t(t_container &p_data, t_size p_base, const t_size *p_order, t_size p_count)
Definition: sort.h:49
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::replace_item ( t_size  idx,
const T item 
)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 447 of file list.h.

448  {
449  PFC_ASSERT(idx>=0);
450  PFC_ASSERT(idx<get_size());
451  m_buffer[idx] = item;
452  }
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::set_count ( t_size  p_count)
inline

Definition at line 315 of file list.h.

315 {m_buffer.set_size(p_count);}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::set_size ( t_size  p_count)
inline

Definition at line 316 of file list.h.

316 {m_buffer.set_size(p_count);}
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::sort ( )
inline

Definition at line 454 of file list.h.

455  {
457  ::pfc::sort(wrapper,get_size());
458  }
void sort(pfc::sort_callback &p_callback, t_size p_num)
Definition: sort.cpp:225
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::sort ( typename t_base::sort_callback p_callback)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 507 of file list.h.

508  {
509  sort_t(sort_callback_wrapper(p_callback));
510  }
void sort_t(t_compare p_compare)
Definition: list.h:461
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::sort_stable ( typename t_base::sort_callback p_callback)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 512 of file list.h.

513  {
514  sort_stable_t(sort_callback_wrapper(p_callback));
515  }
void sort_stable_t(t_compare p_compare)
Definition: list.h:468
template<typename T, typename t_storage>
template<typename t_compare >
void pfc::list_impl_t< T, t_storage >::sort_stable_t ( t_compare  p_compare)
inline

Definition at line 468 of file list.h.

469  {
471  ::pfc::sort_stable(wrapper,get_size());
472  }
t_size get_size() const
Definition: list.h:366
void sort_stable(sort_callback &p_callback, t_size p_count)
Definition: sort.cpp:261
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
template<typename t_compare >
void pfc::list_impl_t< T, t_storage >::sort_t ( t_compare  p_compare)
inline

Definition at line 461 of file list.h.

462  {
464  ::pfc::sort(wrapper,get_size());
465  }
void sort(pfc::sort_callback &p_callback, t_size p_num)
Definition: sort.cpp:225
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::swap_item_with ( t_size  p_index,
T p_item 
)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 541 of file list.h.

542  {
543  PFC_ASSERT(p_index < get_size());
544  swap_t(m_buffer[p_index],p_item);
545  }
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
void swap_t(T &p_item1, T &p_item2)
Definition: primitives.h:285
template<typename T, typename t_storage>
void pfc::list_impl_t< T, t_storage >::swap_items ( t_size  p_index1,
t_size  p_index2 
)
inlinevirtual

Implements pfc::list_base_t< T >.

Definition at line 547 of file list.h.

548  {
549  PFC_ASSERT(p_index1 < get_size());
550  PFC_ASSERT(p_index2 < get_size());
551  swap_t(m_buffer[p_index1],m_buffer[p_index2]);
552  }
t_size get_size() const
Definition: list.h:366
t_storage m_buffer
Definition: list.h:575
void swap_t(T &p_item1, T &p_item2)
Definition: primitives.h:285

Field Documentation

template<typename T, typename t_storage>
t_storage pfc::list_impl_t< T, t_storage >::m_buffer
protected

Definition at line 575 of file list.h.


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