foobar2000 SDK  2015-08-03
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types
pfc::list_base_const_t< T >abstract

#include <list.h>

+ Inheritance diagram for pfc::list_base_const_t< T >:

Public Types

typedef T t_item
 

Public Member Functions

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
 
virtual t_size get_count () const =0
 
T get_item (t_size n) const
 
virtual void get_item_ex (T &p_out, t_size n) const =0
 
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 bool g_equals (const t_self &item1, const t_self &item2)
 

Protected Member Functions

 list_base_const_t ()
 
 list_base_const_t (const t_self &)
 
 ~list_base_const_t ()
 
void operator= (const t_self &)
 

Private Types

typedef list_base_const_t< Tt_self
 

Detailed Description

template<typename T>
class pfc::list_base_const_t< T >

Definition at line 7 of file list.h.

Member Typedef Documentation

template<typename T>
typedef T pfc::list_base_const_t< T >::t_item

Definition at line 10 of file list.h.

template<typename T>
typedef list_base_const_t<T> pfc::list_base_const_t< T >::t_self
private

Definition at line 8 of file list.h.

Constructor & Destructor Documentation

template<typename T>
pfc::list_base_const_t< T >::list_base_const_t ( )
inlineprotected

Definition at line 81 of file list.h.

81 {}
template<typename T>
pfc::list_base_const_t< T >::~list_base_const_t ( )
inlineprotected

Definition at line 82 of file list.h.

82 {}
template<typename T>
pfc::list_base_const_t< T >::list_base_const_t ( const t_self )
inlineprotected

Definition at line 84 of file list.h.

84 {}

Member Function Documentation

template<typename T>
template<typename t_compare , typename t_param , typename t_permutation >
bool pfc::list_base_const_t< T >::bsearch_permutation_t ( t_compare  p_compare,
t_param const &  p_param,
const t_permutation &  p_permutation,
t_size p_index 
) const
inline

Definition at line 50 of file list.h.

50  {
51  return ::pfc::bsearch_permutation_t(get_count(),*this,p_compare,p_param,p_permutation,p_index);
52  }
bool bsearch_permutation_t(t_size p_count, const t_container &p_container, t_compare p_compare, const t_param &p_param, const t_permutation &p_permutation, t_size &p_index)
Definition: bsearch.h:56
virtual t_size get_count() const =0
template<typename T>
template<typename t_compare , typename t_param >
bool pfc::list_base_const_t< T >::bsearch_t ( t_compare  p_compare,
t_param const &  p_param,
t_size p_index 
) const
inline

Definition at line 45 of file list.h.

45  {
46  return ::pfc::bsearch_t(get_count(),*this,p_compare,p_param,p_index);
47  }
virtual t_size get_count() const =0
bool bsearch_t(t_size p_count, const t_container &p_container, t_compare p_compare, const t_param &p_param, t_size &p_index)
Definition: bsearch.h:48
template<typename T>
template<typename t_callback >
void pfc::list_base_const_t< T >::enumerate ( t_callback &  p_callback) const
inline

Definition at line 65 of file list.h.

65  {
66  for(t_size n = 0, m = get_count(); n < m; ++n ) {
67  p_callback( (*this)[n] );
68  }
69  }
size_t t_size
Definition: int_types.h:48
virtual t_size get_count() const =0
template<typename T>
template<typename t_compare , typename t_permutation >
t_size pfc::list_base_const_t< T >::find_duplicates_sorted_permutation_t ( t_compare  p_compare,
t_permutation const &  p_permutation,
bit_array_var p_out 
)
inline

Definition at line 26 of file list.h.

27  {
28  return ::pfc::find_duplicates_sorted_permutation_t<list_base_const_t<T> const &,t_compare,t_permutation>(*this,get_count(),p_compare,p_permutation,p_out);
29  }
virtual t_size get_count() const =0
template<typename T>
template<typename t_compare >
t_size pfc::list_base_const_t< T >::find_duplicates_sorted_t ( t_compare  p_compare,
bit_array_var p_out 
) const
inline

Definition at line 20 of file list.h.

21  {
22  return ::pfc::find_duplicates_sorted_t<list_base_const_t<T> const &,t_compare>(*this,get_count(),p_compare,p_out);
23  }
virtual t_size get_count() const =0
template<typename T>
template<typename t_search >
t_size pfc::list_base_const_t< T >::find_item ( const t_search &  p_item) const
inline

Definition at line 32 of file list.h.

33  {
34  t_size n,max = get_count();
35  for(n=0;n<max;n++)
36  if (get_item(n)==p_item) return n;
37  return ~0;
38  }
size_t t_size
Definition: int_types.h:48
virtual t_size get_count() const =0
T get_item(t_size n) const
Definition: list.h:16
template<typename T>
static bool pfc::list_base_const_t< T >::g_equals ( const t_self item1,
const t_self item2 
)
inlinestatic

Definition at line 71 of file list.h.

71  {
72  const t_size count = item1.get_count();
73  if (count != item2.get_count()) return false;
74  for(t_size walk = 0; walk < count; ++walk) if (item1[walk] != item2[walk]) return false;
75  return true;
76  }
size_t t_size
Definition: int_types.h:48
template<typename T>
virtual t_size pfc::list_base_const_t< T >::get_count ( ) const
pure virtual

Implemented in pfc::list_permutation_t< T >, pfc::list_const_permutation_t< T, P >, pfc::ptr_list_const_cast_t< T >, pfc::list_impl_t< T, t_storage >, pfc::list_impl_t< pfc::string, array_t< pfc::string, alloc_fast > >, pfc::list_impl_t< pfc::rcptr_t< audio_chunk >, array_t< pfc::rcptr_t< audio_chunk >, alloc_fast > >, pfc::list_impl_t< t_item, array_t< t_item, t_alloc > >, pfc::list_impl_t< t_object *, array_hybrid_t< t_object *, p_fixed_count, alloc_fast > >, pfc::list_impl_t< char *, array_t< char *, alloc_fast > >, pfc::list_impl_t< TObj, array_t< TObj, alloc_fast > >, pfc::list_impl_t< item, array_t< item, alloc_fast > >, pfc::list_impl_t< dsp_preset_impl *, array_t< dsp_preset_impl *, alloc_fast > >, pfc::list_impl_t< service_ptr_t< metadb_handle >, array_t< service_ptr_t< metadb_handle >, t_alloc > >, pfc::list_impl_t< HWND, array_hybrid_t< HWND, p_fixed_count, alloc_fast > >, pfc::list_impl_t< GUID, array_t< GUID, alloc_fast > >, pfc::list_impl_t< service_ptr_t< T >, array_t< service_ptr_t< T >, t_alloc > >, pfc::list_impl_t< T *, array_hybrid_t< T *, p_fixed_count, alloc_fast > >, pfc::list_impl_t< t_item, array_hybrid_t< t_item, p_fixed_count, t_alloc > >, pfc::list_impl_t< pfc::rcptr_t< foobar2000_io::directory_callback_impl::t_entry >, array_t< pfc::rcptr_t< foobar2000_io::directory_callback_impl::t_entry >, alloc_fast > >, pfc::list_impl_t< metadb_io_hintlist::t_entry, array_t< metadb_io_hintlist::t_entry, pfc::alloc_fast > >, pfc::list_const_ptr_t< T >, pfc::ptr_list_const_array_t< T, A >, pfc::list_const_cast_t< to, from >, pfc::list_const_array_ref_t< t_array >, pfc::list_const_array_t< T, A >, pfc::list_partial_ref_t< T >, pfc::list_single_ref_t< T >, metadb_io_hintlist::metadb_io_hintlist_wrapper_part3, metadb_io_hintlist::metadb_io_hintlist_wrapper_part2, metadb_io_hintlist::metadb_io_hintlist_wrapper_part1, file_list_helper::file_list_from_metadb_handle_list, pfc::string_list_impl, and uGetOpenFileNameMultiResult_impl.

template<typename T>
T pfc::list_base_const_t< T >::get_item ( t_size  n) const
inline

Definition at line 16 of file list.h.

16 {T temp; get_item_ex(temp,n); return std::move(temp);}
virtual void get_item_ex(T &p_out, t_size n) const =0
template<typename T>
virtual void pfc::list_base_const_t< T >::get_item_ex ( T p_out,
t_size  n 
) const
pure virtual

Implemented in pfc::list_permutation_t< T >, pfc::list_const_permutation_t< T, P >, pfc::ptr_list_const_cast_t< T >, pfc::list_impl_t< T, t_storage >, pfc::list_impl_t< pfc::string, array_t< pfc::string, alloc_fast > >, pfc::list_impl_t< pfc::rcptr_t< audio_chunk >, array_t< pfc::rcptr_t< audio_chunk >, alloc_fast > >, pfc::list_impl_t< t_item, array_t< t_item, t_alloc > >, pfc::list_impl_t< t_object *, array_hybrid_t< t_object *, p_fixed_count, alloc_fast > >, pfc::list_impl_t< char *, array_t< char *, alloc_fast > >, pfc::list_impl_t< TObj, array_t< TObj, alloc_fast > >, pfc::list_impl_t< item, array_t< item, alloc_fast > >, pfc::list_impl_t< dsp_preset_impl *, array_t< dsp_preset_impl *, alloc_fast > >, pfc::list_impl_t< service_ptr_t< metadb_handle >, array_t< service_ptr_t< metadb_handle >, t_alloc > >, pfc::list_impl_t< HWND, array_hybrid_t< HWND, p_fixed_count, alloc_fast > >, pfc::list_impl_t< GUID, array_t< GUID, alloc_fast > >, pfc::list_impl_t< service_ptr_t< T >, array_t< service_ptr_t< T >, t_alloc > >, pfc::list_impl_t< T *, array_hybrid_t< T *, p_fixed_count, alloc_fast > >, pfc::list_impl_t< t_item, array_hybrid_t< t_item, p_fixed_count, t_alloc > >, pfc::list_impl_t< pfc::rcptr_t< foobar2000_io::directory_callback_impl::t_entry >, array_t< pfc::rcptr_t< foobar2000_io::directory_callback_impl::t_entry >, alloc_fast > >, pfc::list_impl_t< metadb_io_hintlist::t_entry, array_t< metadb_io_hintlist::t_entry, pfc::alloc_fast > >, pfc::list_const_ptr_t< T >, pfc::ptr_list_const_array_t< T, A >, pfc::list_const_cast_t< to, from >, pfc::list_const_array_ref_t< t_array >, pfc::list_const_array_t< T, A >, pfc::list_partial_ref_t< T >, pfc::list_single_ref_t< T >, metadb_io_hintlist::metadb_io_hintlist_wrapper_part3, metadb_io_hintlist::metadb_io_hintlist_wrapper_part2, metadb_io_hintlist::metadb_io_hintlist_wrapper_part1, file_list_helper::file_list_from_metadb_handle_list, pfc::string_list_impl, and uGetOpenFileNameMultiResult_impl.

template<typename T>
t_size pfc::list_base_const_t< T >::get_size ( ) const
inline

Definition at line 14 of file list.h.

14 {return get_count();}
virtual t_size get_count() const =0
template<typename T>
template<typename t_search >
bool pfc::list_base_const_t< T >::have_item ( const t_search &  p_item) const
inline

Definition at line 41 of file list.h.

41 {return find_item<t_search>(p_item)!=~0;}
template<typename T>
bool pfc::list_base_const_t< T >::operator!= ( const t_self item2) const
inline

Definition at line 78 of file list.h.

78 {return !g_equals(*this,item2);}
static bool g_equals(const t_self &item1, const t_self &item2)
Definition: list.h:71
template<typename T>
void pfc::list_base_const_t< T >::operator= ( const t_self )
inlineprotected

Definition at line 85 of file list.h.

85 {}
template<typename T>
bool pfc::list_base_const_t< T >::operator== ( const t_self item2) const
inline

Definition at line 77 of file list.h.

77 {return g_equals(*this,item2);}
static bool g_equals(const t_self &item1, const t_self &item2)
Definition: list.h:71
template<typename T>
T pfc::list_base_const_t< T >::operator[] ( t_size  n) const
inline

Definition at line 17 of file list.h.

17 {T temp; get_item_ex(temp,n); return std::move(temp);}
virtual void get_item_ex(T &p_out, t_size n) const =0
template<typename T>
template<typename t_compare , typename t_permutation >
void pfc::list_base_const_t< T >::sort_get_permutation_t ( t_compare  p_compare,
t_permutation const &  p_permutation 
) const
inline

Definition at line 55 of file list.h.

55  {
56  ::pfc::sort_get_permutation_t<list_base_const_t<T>,t_compare,t_permutation>(*this,p_compare,get_count(),p_permutation);
57  }
virtual t_size get_count() const =0
template<typename T>
template<typename t_compare , typename t_permutation >
void pfc::list_base_const_t< T >::sort_stable_get_permutation_t ( t_compare  p_compare,
t_permutation const &  p_permutation 
) const
inline

Definition at line 60 of file list.h.

60  {
61  ::pfc::sort_stable_get_permutation_t<list_base_const_t<T>,t_compare,t_permutation>(*this,p_compare,get_count(),p_permutation);
62  }
virtual t_size get_count() const =0

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