foobar2000 SDK  2015-01-14
Public Member Functions | Private Attributes
pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >

#include <sort.h>

+ Inheritance diagram for pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >:

Public Member Functions

 sort_callback_impl_simple_wrap_t (t_container &p_data, t_compare p_compare)
 
int compare (t_size p_index1, t_size p_index2) const
 
void swap (t_size p_index1, t_size p_index2)
 
- Public Member Functions inherited from pfc::sort_callback
void swap_check (t_size p_index1, t_size p_index2)
 

Private Attributes

t_compare m_compare
 
t_container & m_data
 

Detailed Description

template<typename t_container, typename t_compare>
class pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >

Definition at line 105 of file sort.h.

Constructor & Destructor Documentation

template<typename t_container, typename t_compare>
pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >::sort_callback_impl_simple_wrap_t ( t_container &  p_data,
t_compare  p_compare 
)
inline

Definition at line 108 of file sort.h.

108 : m_data(p_data), m_compare(p_compare) {}

Member Function Documentation

template<typename t_container, typename t_compare>
int pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >::compare ( t_size  p_index1,
t_size  p_index2 
) const
inlinevirtual

Implements pfc::sort_callback.

Definition at line 109 of file sort.h.

110  {
111  return m_compare(m_data[p_index1],m_data[p_index2]);
112  }
template<typename t_container, typename t_compare>
void pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >::swap ( t_size  p_index1,
t_size  p_index2 
)
inlinevirtual

Implements pfc::sort_callback.

Definition at line 114 of file sort.h.

115  {
116  swap_t(m_data[p_index1],m_data[p_index2]);
117  }
void swap_t(T &p_item1, T &p_item2)
Definition: primitives.h:285

Field Documentation

template<typename t_container, typename t_compare>
t_compare pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >::m_compare
private

Definition at line 120 of file sort.h.

template<typename t_container, typename t_compare>
t_container& pfc::sort_callback_impl_simple_wrap_t< t_container, t_compare >::m_data
private

Definition at line 119 of file sort.h.


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